Commit b57407d7 authored by zhangch's avatar zhangch

服务方式接口修改,服务方式接口调试

parent 7b9703b1
......@@ -3,10 +3,7 @@ package com.hungraim.ltc.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.service.DisableService;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
......@@ -79,8 +76,8 @@ public class DisableController {
* 查询所有服务方式
*/
@RequestMapping("/fndSrvMode")
public Result<List<ChFndSrvMode>> fndSrvMode() {
List<ChFndSrvMode> fndSrvModes = disableService.fndSrvModeList();
public Result cfgSrvMode() {
List<SrvModeVo> fndSrvModes = disableService.cfgSrvModeList();
return Result.success(fndSrvModes);
}
......
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface SrvModeMapper extends BaseMapper<ChCfgSrvMode> {
/**
* 查询全部服务方式
* @return 返回所有服务方式
*/
List<SrvModeVo> selectAll();
}
\ No newline at end of file
......@@ -2,10 +2,7 @@ package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import com.hungraim.ltc.pojo.vo.disable.*;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -48,7 +45,7 @@ public interface DisableService {
/**
* 查询所有服务方式
*/
List<ChFndSrvMode> fndSrvModeList();
List<SrvModeVo> cfgSrvModeList();
/**
* 查询机构下所有护理机构
......
......@@ -29,7 +29,7 @@ public class DisableServiceImpl implements DisableService {
@Autowired
private FndStreetMapper fndStreetMapper;
@Autowired
private FndSrvModeMapper fndSrvModeMapper;
private SrvModeMapper srvModeMapper;
@Autowired
private SrvOrganMapper srvOrganMapper;
@Autowired
......@@ -182,8 +182,9 @@ public class DisableServiceImpl implements DisableService {
}
@Override
public List<ChFndSrvMode> fndSrvModeList() {
return fndSrvModeMapper.selectList(new QueryWrapper<>());
public List<SrvModeVo> cfgSrvModeList() {
return srvModeMapper.selectAll();
}
@Override
......
......@@ -18,14 +18,14 @@
a.OPER_CERTI_CODE operCertiCode,
a.tel tel,
a.fixed_tel fixedTel,
m.SRV_MODE_NAME srvModeName,
m.MODE_NAME srvModeName,
(SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE c WHERE a.DISE_TYPE_S = c.DISE_TYPE_ID) diseTypeS,
a.eff_time effTime,
a.data_from dataFrom,
a.APPLY_STATUS applyStatus
from CH_DISABLE_APPLY a
LEFT JOIN CH_FND_ORGAN o ON a.organ_id = o.ORGAN_ID
LEFT JOIN CH_FND_SRV_MODE m ON a.srv_mode_id = m.SRV_MODE_ID
LEFT JOIN CH_CFG_SRV_MODE m ON a.srv_mode_id = m.MODE_ID
LEFT JOIN CH_SRV_ORGAN s ON a.SRV_ORGAN_ID = s.SRV_ORGAN_ID
<where>
<if test="organIds != null">
......@@ -154,7 +154,7 @@
--评定完成时间
task.finish_time finishTime,
--申请服务方式
mode1.srv_mode_name srvModeName,
mode1.mode_name srvModeName srvModeName,
--接受服务地址
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.acpt_srv_provincial = dis.DISTRICT_CODE) acptSrvProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.acpt_srv_city = dis.DISTRICT_CODE) acptSrvCity,
......@@ -163,7 +163,7 @@
left join ch_apr_report report on disable.last_task_id = report.task_id
left join ch_apr_task task on disable.last_task_id = task.task_id
left join ch_disable_apply apply on disable.apply_id = apply.apply_id
left join ch_fnd_srv_mode mode1 on apply.srv_mode_id = mode1.srv_mode_id
left join ch_cfg_srv_mode mode1 on apply.srv_mode_id = mode1.mode_id
where disable.disab_info_id = #{disableInfoId}
</select>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.SrvModeMapper">
<select id="selectAll" resultType="com.hungraim.ltc.pojo.vo.disable.SrvModeVo">
SELECT MODE_ID srvModeId,
MODE_NAME srvModeName
FROM CH_CFG_SRV_MODE
</select>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import lombok.Data;
/**
* 服务方式vo
*/
@Data
public class SrvModeVo {
private Integer srvModeId;
private String srvModeName;
}
......@@ -122,17 +122,31 @@ public class NursingServiceItemsController {
*
* @param modeId 服务方式定义id(如果为null就是新增,否则就是修改)
* @param modeName 服务方式定义列表 服务方式
* @param modeRemark 服务方式定义列表 备注
* @param remark 服务方式定义列表 备注
*/
@RequestMapping("/modeConfig")
public Result<Object> modeConfig(String modeId, String modeName, String modeRemark) {
public Result<Object> modeConfig(String modeId, String modeName, String remark) {
//参数校验
if (StringUtils.isBlank(modeId)
|| StringUtils.isBlank(modeName)
) {
if (StringUtils.isBlank(modeName)) {
return Result.failed("参数异常!");
}
nursingServiceItemsService.modeConfig(modeId, modeName, modeRemark);
nursingServiceItemsService.modeConfig(modeId, modeName, remark);
return Result.success();
}
/**
* 删除服务方式数据
*
* @param modeId 服务方式id
* @return 返回执行结果
*/
@DeleteMapping("/srvModel")
public Result deleteSrvModel(Long modeId) {
if (modeId == null || modeId == 0) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
nursingServiceItemsService.deleteSrvModel(modeId);
return Result.success();
}
......
......@@ -30,4 +30,12 @@ public interface NursingServiceItemsService {
* @param disableLevelId 失能等级id
*/
void delectDisableLevel(Long disableLevelId);
/**
* 删除服务方式数据
*
* @param modeId 服务方式id
* @return 返回执行结果
*/
void deleteSrvModel(Long modeId);
}
......@@ -42,8 +42,8 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
public void organProjectConfig(ChSrvOrganProject project) {
if (project.getProjectId() != null) {
project.setEffTime(new Date());//创建时间
chSrvOrganProjectMapper.updateById(project);
} else {
chSrvOrganProjectMapper.updateById(project);
chSrvOrganProjectMapper.insert(project);
}
}
......@@ -97,4 +97,8 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
disableLevelMapper.deleteById(disableLevelId);
}
@Override
public void deleteSrvModel(Long modeId) {
srvModeMapper.deleteById(modeId);
}
}
......@@ -25,7 +25,7 @@
<result column="ACPT_ADDRESS" property="acptAddress"/>
<result column="DISABLE_LEVEL_NAME" property="realLevel"/>
<result column="FINISH_TIME" property="assessDate"/>
<result column="SRV_MODE_NAME" property="svrModelName"/>
<result column="MODE_NAME" property="svrModelName"/>
<result column="SRV_ORGAN_NAME" property="svrOrganName"/>
<result column="PROG_STATUS" property="progStatus"/>
<result column="PROGRAM_EDN_DATE" property="programEndDate"/>
......@@ -55,7 +55,7 @@
T2.ACPT_ADDRESS,
T6.DISABLE_LEVEL_NAME,
T4.FINISH_TIME,
T7.SRV_MODE_NAME,
T7.MODE_NAME,
T5.SRV_ORGAN_NAME,
T1.PROG_STATUS,
T1.PROGRAM_DATE,
......@@ -63,7 +63,7 @@
T1.EFF_TIME
FROM CH_SRV_PROGRAM T1
INNER JOIN CH_DISABLE_INFO T2 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_FND_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.SRV_MODE_ID
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_APR_REPORT T3 ON T2.LAST_TASK_ID = T3.TASK_ID
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
......@@ -92,14 +92,14 @@
T2.ACPT_ADDRESS,
T6.DISABLE_LEVEL_NAME,
T4.FINISH_TIME,
T7.SRV_MODE_NAME,
T7.MODE_NAME,
T5.SRV_ORGAN_NAME,
NULL PROG_STATUS,
T1.ALLOT_TIME PROGRAM_DATE,
T1.STOP_TIME PROGRAM_EDN_DATE
FROM CH_SRV_SEND T1
INNER JOIN CH_DISABLE_INFO T2 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_FND_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.SRV_MODE_ID
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_APR_REPORT T3 ON T2.LAST_TASK_ID = T3.TASK_ID
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
......@@ -125,13 +125,13 @@
T2.ACPT_ADDRESS acptAddress,
T6.DISABLE_LEVEL_NAME realLevel,
T4.FINISH_TIME assessDate,
T7.SRV_MODE_NAME svrModelName,
T7.MODE_NAME svrModelName,
T5.SRV_ORGAN_NAME svrOrganName,
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime
FROM CH_SRV_PROGRAM T1
INNER JOIN CH_DISABLE_INFO T2 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_FND_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.SRV_MODE_ID
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_APR_REPORT T3 ON T2.LAST_TASK_ID = T3.TASK_ID
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
......
......@@ -95,7 +95,7 @@
--评定完成日期
aprtask.finish_time finishTime,
--服务方式
mode1.srv_mode_name srvModeName,
mode1.mode_name srvModeName,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员
......@@ -111,7 +111,7 @@
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_fnd_srv_mode mode1 on program.srv_mode_id = mode1.srv_mode_id--服务方式
left join ch_cfg_srv_mode mode1 on program.srv_mode_id = mode1.mode_id--服务方式
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
--失能等级
left join ch_cfg_srv_disable_level level1 on report.disable_level_id = level1.disable_level_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment