Commit c2180962 authored by wzs162's avatar wzs162

失能人员信息变更-新增+审核列表查询

parent 8925f35d
......@@ -9,6 +9,7 @@ import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
......@@ -336,4 +337,37 @@ public class DisableController {
return Result.success(disableInfoVO);
}
/**
* 失能人员信息变更-新增
* 先把info的数据带出来,更改完,存到这个变更表
*/
@PostMapping("/addDisInfoChange")
public void addDisInfochange(ChDisableInfoChange chDisableInfoChange){
disableService.DisInfoChange(chDisableInfoChange);
}
/**
* 失能人员信息变更-审核列表
*/
@PostMapping("/listDisInfoChangeExamine")
public Result<List<DisableInfoChangeVo>> getListDisInfoChangeExamine(String organId,String districtProvince,boolean ishasLowOrgan
,String districtCity,String districtArea,String realName,String certifNum,String aplOrganId){
return Result.success(disableService.ListDisInfoChangeExamine( organId, districtProvince, ishasLowOrgan
, districtCity, districtArea, realName, certifNum, aplOrganId));
}
/**
* 失能人员信息变更-审核
* 审核通过再更新到info表
*/
@PostMapping("/doDisInfoChangeExamine")
public void doDisInfoChangeExamine(String changeId,String checkName, Short applyStatus, String checkRemark){
disableService.DisableInfoChangeExamine( changeId, checkName, applyStatus, checkRemark);
}
/**
* 失能人员信息变更-列表
*/
/**
* 失能人员信息变更-查看修改详情页
*/
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfoChange;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoChangeVo;
import java.util.List;
public interface ChDisableInfoChangeMapper extends BaseMapper<ChDisableInfoChange> {
/**
* 失能人员信息变更-审核列表
*/
List<DisableInfoChangeVo> getListDisableInfoChange(String organId,String districtProvince,boolean ishasLowOrgan
,String districtCity,String districtArea,String realName,String certifNum,String aplOrganId);
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChDisableInfoHis;
public interface DisableInfoHisMapper extends BaseMapper<ChDisableInfoHis> {
}
......@@ -98,4 +98,20 @@ public interface DisableService {
* @return 返回列表
*/
List<ChFndOrgan> fndAllOrgan();
/**
* 失能人员信息变更表-新增
*/
void DisInfoChange(ChDisableInfoChange chDisableInfoChange);
/**
* 失能人员信息变更-审核
*/
void DisableInfoChangeExamine(String changeId,String checkName, Short applyStatus, String checkRemark);
/**
* 失能人员信息变更-审核列表
*/
List<DisableInfoChangeVo> ListDisInfoChangeExamine(String organId,String districtProvince,boolean ishasLowOrgan
,String districtCity,String districtArea,String realName,String certifNum,String aplOrganId);
}
......@@ -9,6 +9,7 @@ import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.assessment.ChDisableInfoHis;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import com.hungraim.ltc.pojo.vo.disable.*;
......@@ -43,6 +44,8 @@ public class DisableServiceImpl implements DisableService {
private final AprTaskMapper aprTaskMapper;
private final CfgParaMapper cfgParaMapper;
private final AttachFeignService attachFeignService;
private final ChDisableInfoChangeMapper chDisableInfoChangeMapper;
private final DisableInfoHisMapper disableInfoHisMapper;
/**
* 获取机构ids
......@@ -315,4 +318,61 @@ public class DisableServiceImpl implements DisableService {
queryWrapper.eq("STATUS", "1");
return fndOrganMapper.selectList(queryWrapper);
}
@Override
public void DisInfoChange(ChDisableInfoChange chDisableInfoChange) {
//先把info的数据带出来
List<ChDisableInfo> disableInfoList = disableInfoMapper.selectList(new LambdaQueryWrapper<ChDisableInfo>()
.eq(ChDisableInfo::getRealName, chDisableInfoChange.getRealName())
.eq(ChDisableInfo::getCertiCode, chDisableInfoChange.getCertifNum()));
ChDisableInfo chDisableInfo=null;
if (disableInfoList.size()!=0){
chDisableInfo = disableInfoList.get(0);
}
//更改完
ChDisableInfoChange newDisableInfoChange = new ChDisableInfoChange();
BeanUtil.copyProperties(chDisableInfo,newDisableInfoChange);
//存到这个变更表
chDisableInfoChangeMapper.insert(newDisableInfoChange);
}
@Override
public void DisableInfoChangeExamine(String changeId,String checkName, Short applyStatus, String checkRemark) {
Date date = new Date();
//更新审核状态
ChDisableInfoChange chDisableInfoChange = chDisableInfoChangeMapper.selectById(changeId);
chDisableInfoChange.setCheckName(checkName);//审核人
chDisableInfoChange.setApplyStatus(applyStatus);//申请状态
chDisableInfoChange.setCheckRemark(checkRemark);//审核备注
chDisableInfoChange.setCheckTime(date);//审核时间
chDisableInfoChangeMapper.updateById(chDisableInfoChange);
//审核通过
if (applyStatus.equals(Short.valueOf("2"))) {
//修改失能人员信息,首次申请只需新建
List<ChDisableInfo> disableInfoList = disableInfoMapper.selectList(new LambdaQueryWrapper<ChDisableInfo>()
.eq(ChDisableInfo::getRealName, chDisableInfoChange.getRealName())
.eq(ChDisableInfo::getCertiCode, chDisableInfoChange.getCertifNum()));
ChDisableInfo newDisableInfo = null;
if (disableInfoList.size() != 0) {
ChDisableInfo chDisableInfo = disableInfoList.get(0);
newDisableInfo = new ChDisableInfo();
newDisableInfo.setDisabInfoId(chDisableInfo.getDisabInfoId());
BeanUtil.copyProperties(chDisableInfoChange, newDisableInfo);
newDisableInfo.setDataFrom(1);//数据来源设置为1-信息变更
disableInfoMapper.updateById(newDisableInfo);
}
//新建disable_info_his表的一条数据
ChDisableInfoHis chDisableInfoHis = new ChDisableInfoHis();
BeanUtil.copyProperties(newDisableInfo, chDisableInfoHis);
disableInfoHisMapper.insert(chDisableInfoHis);
}
}
@Override
public List<DisableInfoChangeVo> ListDisInfoChangeExamine(String organId,String districtProvince,boolean ishasLowOrgan
,String districtCity,String districtArea,String realName,String certifNum,String aplOrganId) {
List<DisableInfoChangeVo> listDisableInfoChange = chDisableInfoChangeMapper.getListDisableInfoChange(organId, districtProvince, ishasLowOrgan
, districtCity, districtArea, realName, certifNum, aplOrganId);
return listDisableInfoChange;
}
}
\ No newline at end of file
<?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.ChDisableInfoChangeMapper">
<select id="getListDisableInfoChange" resultType="com.hungraim.ltc.pojo.vo.disable.DisableInfoChangeVo">
select
(select ORGAN_NAME from CH_FND_ORGAN organ where change.ORGAN_ID=organ.ORGAN_ID )organName,
change.ORGAN_ID organId,
change.DISTRICT_PROVINCE districtProvince,
change.DISTRICT_CITY districtCity,
change.DISTRICT_AREA districtArea,
(select ORGAN_NAME from CH_FND_ORGAN organ where change.APL_ORGAN_ID=organ.ORGAN_ID)aplOrganName,
change.REAL_NAME realName,
change.GENDER gender,
change.BIRTHDAY birthday,
change.CERTIF_NUM certifNum,
change.TEL tel,
(select SRV_MODE_NAME from CH_FND_SRV_MODE cfdt where disinfo.SRV_MODE_ID=cfdt.SRV_MODE_ID)srvModeName,
(select DISE_TYPE_CODE from CH_FND_DISEASE_TYPE where disinfo.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
change.EFF_TIME effTime,
change.APPLY_STATUS applyStatus
from CH_DISABLE_INFO_CHANGE change
left join CH_DISABLE_INFO disinfo on change.DISAB_INFO_ID=disinfo.DISAB_INFO_ID
<where>
and task.APR_TYPE = 0
<if test="organId != null">
and change.organId=#{organId}
</if>
<if test="provincial != null and provincial != ''">
and change.DISTRICT_PROVINCE = #{districtProvince}
</if>
<if test="city != null and city != ''">
and change.DISTRICT_CITY = #{districtCity}
</if>
<if test="area != null and area != ''">
and change.DISTRICT_AREA = #{districtArea}
</if>
<if test="realName != null and realName != ''">
and change.REAL_NAME like CONCAT(CONCAT('%',#{realName}) ,'%')
</if>
<if test="certiCode != null and certiCode != ''">
and change.CERTIF_NUM = #{certifNum}
</if>
<if test="aplOrganId != null and aplOrganId != ''">
and change.APL_ORGAN_ID = #{aplOrganId}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -93,7 +93,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
if (applyStatus.equals(Short.valueOf("2"))) {
//修改失能人员信息,首次申请只需新建
List<ChDisableInfo> disableInfoList = disableInfoMapper.selectList(new LambdaQueryWrapper<ChDisableInfo>()
.eq(ChDisableInfo::getRealName, checkName)
.eq(ChDisableInfo::getRealName, chDisableApply.getRealName())
.eq(ChDisableInfo::getCertiCode, chDisableApply.getCertiCode()));
ChDisableInfo newDisableInfo=null;
if (disableInfoList.size()!=0) {
......
......@@ -329,7 +329,7 @@ public class ChDisableInfoChange {
/**
* 状态(未提交:0;待审核:1;审核通过:2;不通过:3;删除:4;撤销:5)
*/
private Integer applyStatus;
private Short applyStatus;
/**
* 审核人
......
package com.hungraim.ltc.pojo.vo.disable;
import lombok.Data;
import java.util.Date;
@Data
public class DisableInfoChangeVo {
/**
* 适用机构
*/
private String organName;
/**
* 机构代码
*/
private String organId;
/**
* 所在省份
*/
private String districtProvince;
/**
* 所在城市
*/
private String districtCity;
/**
* 所在区
*/
private String districtArea;
/**
* 申请机构(只有网厅申请才有机构)
*/
private Integer aplOrganId;
/**
* 申请人姓名
*/
private String realName;
/**
* 身份证号
*/
private String certifNum;
/**
* 出生年月
*/
private Date birthday;
/**
* 性别
*/
private String gender;
/**
* 手机号
*/
private String tel;
/**
* 服务方式
*/
private String srvModeName;
/**
* 诊断疾病
*/
private String diseTypeS;
/**
* 申请提交时间
*/
private Date effTime;
/**
* 审核状态
*/
private short applyStatus;
}
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