Commit b7acf247 authored by zhangwanglin's avatar zhangwanglin

失能

parent 0ea43743
...@@ -526,11 +526,11 @@ public class DisableController { ...@@ -526,11 +526,11 @@ public class DisableController {
* 失能人员退出 * 失能人员退出
*/ */
@RequestMapping("/disableInfoExit") @RequestMapping("/disableInfoExit")
public Result disableInfoExit(Integer disableInfoId,Integer exitReasonId,Integer applyId, Integer srvOrganId,Integer programId,String exitTime) { public Result disableInfoExit(DisableExitVO disableExitVO) {
if (disableInfoId == null|| exitReasonId == null||applyId == null) { if (disableExitVO.getDisableInfoId() == null|| disableExitVO.getExitReasonId() == null||disableExitVO.getApplyId() == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
int i = disableService.disableInfoExit(disableInfoId,exitReasonId,applyId,srvOrganId,programId,exitTime); int i = disableService.disableInfoExit(disableExitVO);
if (i > 0) { if (i > 0) {
return Result.success(); return Result.success();
} else { } else {
......
...@@ -39,6 +39,5 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> { ...@@ -39,6 +39,5 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
int updateSrvSendById(ChSrvSend chSrvSend); int updateSrvSendById(ChSrvSend chSrvSend);
int insertSrvSend(Integer disableInfoId);
} }
...@@ -182,7 +182,7 @@ public interface DisableService { ...@@ -182,7 +182,7 @@ public interface DisableService {
Integer applyMethod); Integer applyMethod);
int disableInfoExit(Integer disableInfoId,Integer exitReasonId,Integer applyId,Integer srvOrganId,Integer programId,String exitTime); int disableInfoExit(DisableExitVO disableExitVO);
List<ChDisableExit> getDisableExitHis(Integer disableInfoId); List<ChDisableExit> getDisableExitHis(Integer disableInfoId);
......
...@@ -618,7 +618,12 @@ public class DisableServiceImpl implements DisableService { ...@@ -618,7 +618,12 @@ public class DisableServiceImpl implements DisableService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int disableInfoExit(Integer disableInfoId, Integer exitReasonId,Integer applyId,Integer srvOrganId,Integer programId,String exitTime) { public int disableInfoExit(DisableExitVO disableExitVO) {
String exitTime = disableExitVO.getExitTime();
Integer applyId = disableExitVO.getApplyId();
Integer exitReasonId = disableExitVO.getExitReasonId();
Integer srvOrganId = disableExitVO.getSrvOrganId();
Integer disableInfoId = disableExitVO.getDisableInfoId();
ChDisableApply chDisableApply = new ChDisableApply(); ChDisableApply chDisableApply = new ChDisableApply();
Date date = DateUtils.strToDate(exitTime); Date date = DateUtils.strToDate(exitTime);
chDisableApply.setApplyId(Long.valueOf(applyId)); chDisableApply.setApplyId(Long.valueOf(applyId));
...@@ -648,7 +653,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -648,7 +653,7 @@ public class DisableServiceImpl implements DisableService {
ChSrvSend chSrvSend = new ChSrvSend(); ChSrvSend chSrvSend = new ChSrvSend();
chSrvSend.setDisabInfoId(Long.valueOf(disableInfoId)); chSrvSend.setDisabInfoId(Long.valueOf(disableInfoId));
chSrvSend.setEndTime(date); chSrvSend.setEndTime(date);
// 4, 转入医保 5, 异地 //4,转入医保 5, 异地 选择原因转入医保和异地,保留原服务机构分配数据,状态为已分配,只终止方案和计划,保留终止后的方案和计划历史数据
if (exitReasonId == 4||exitReasonId==5){ if (exitReasonId == 4||exitReasonId==5){
// chSrvSend.setStatus((short)3); // chSrvSend.setStatus((short)3);
// disableInfoMapper.updateSrvSendById(chSrvSend); // disableInfoMapper.updateSrvSendById(chSrvSend);
...@@ -658,8 +663,14 @@ public class DisableServiceImpl implements DisableService { ...@@ -658,8 +663,14 @@ public class DisableServiceImpl implements DisableService {
disableInfoMapper.updateSrvSendById(chSrvSend); disableInfoMapper.updateSrvSendById(chSrvSend);
}else { }else {
chSrvSend.setStatus((short)3); chSrvSend.setStatus((short)3);
// 更新为已退出
disableInfoMapper.updateSrvSendById(chSrvSend); disableInfoMapper.updateSrvSendById(chSrvSend);
disableInfoMapper.insertSrvSend(disableInfoId); // 插入一条未分配的记录
ChSrvSend chSrvSend1 = new ChSrvSend();
chSrvSend1.setDisabInfoId(Long.valueOf(disableInfoId));
chSrvSend1.setFcd(new Date());
chSrvSend1.setStatus((short)0);
chSrvSendInfoMapper.insert(chSrvSend1);
} }
} }
......
...@@ -74,11 +74,5 @@ ...@@ -74,11 +74,5 @@
</update> </update>
<insert id="insertSrvSend">
<selectKey resultType="java.lang.Integer" order="BEFORE" keyProperty="id">
SELECT seq_ch_srv_send.NEXTVAL as id FROM DUAL
</selectKey>
insert INTO ch_srv_send(SRV_SEND_ID,DISAB_INFO_ID,FCD,STATUS) values
(#{id},#{disableInfoId},SYSDATE,0)
</insert>
</mapper> </mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import lombok.Data;
/**
* @author zwl
* @ClassName DisableExitVO
* @description
* @date 2023/3/29 10:06
**/
@Data
public class DisableExitVO {
private Integer disableInfoId;
private Integer exitReasonId;
private Integer applyId;
private Integer srvOrganId;
private Integer programId;
private String exitTime;
}
...@@ -270,11 +270,6 @@ public class BuildBedController { ...@@ -270,11 +270,6 @@ public class BuildBedController {
chSrvSend.setAllotTime(new Date()); chSrvSend.setAllotTime(new Date());
chSrvSend.setStatus(Short.valueOf("1")); chSrvSend.setStatus(Short.valueOf("1"));
if (chrSrvVo.getSrvSendId() == null) { if (chrSrvVo.getSrvSendId() == null) {
// Long id = sendService.selectMaxId();
// if (id == null) {
// id = 0L;
// }
// chSrvSend.setSrvSendId(++id);
sendService.insertSrvSend(chSrvSend); sendService.insertSrvSend(chSrvSend);
}else { }else {
chSrvSend.setSrvSendId(chrSrvVo.getSrvSendId()); chSrvSend.setSrvSendId(chrSrvVo.getSrvSendId());
......
...@@ -44,4 +44,6 @@ public class SrvTaskScheduledController { ...@@ -44,4 +44,6 @@ public class SrvTaskScheduledController {
} }
} }
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