Commit b7acf247 authored by zhangwanglin's avatar zhangwanglin

失能

parent 0ea43743
......@@ -526,11 +526,11 @@ public class DisableController {
* 失能人员退出
*/
@RequestMapping("/disableInfoExit")
public Result disableInfoExit(Integer disableInfoId,Integer exitReasonId,Integer applyId, Integer srvOrganId,Integer programId,String exitTime) {
if (disableInfoId == null|| exitReasonId == null||applyId == null) {
public Result disableInfoExit(DisableExitVO disableExitVO) {
if (disableExitVO.getDisableInfoId() == null|| disableExitVO.getExitReasonId() == null||disableExitVO.getApplyId() == null) {
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) {
return Result.success();
} else {
......
......@@ -39,6 +39,5 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
int updateSrvSendById(ChSrvSend chSrvSend);
int insertSrvSend(Integer disableInfoId);
}
......@@ -182,7 +182,7 @@ public interface DisableService {
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);
......
......@@ -618,7 +618,12 @@ public class DisableServiceImpl implements DisableService {
@Override
@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();
Date date = DateUtils.strToDate(exitTime);
chDisableApply.setApplyId(Long.valueOf(applyId));
......@@ -648,7 +653,7 @@ public class DisableServiceImpl implements DisableService {
ChSrvSend chSrvSend = new ChSrvSend();
chSrvSend.setDisabInfoId(Long.valueOf(disableInfoId));
chSrvSend.setEndTime(date);
// 4, 转入医保 5, 异地
//4,转入医保 5, 异地 选择原因转入医保和异地,保留原服务机构分配数据,状态为已分配,只终止方案和计划,保留终止后的方案和计划历史数据
if (exitReasonId == 4||exitReasonId==5){
// chSrvSend.setStatus((short)3);
// disableInfoMapper.updateSrvSendById(chSrvSend);
......@@ -658,8 +663,14 @@ public class DisableServiceImpl implements DisableService {
disableInfoMapper.updateSrvSendById(chSrvSend);
}else {
chSrvSend.setStatus((short)3);
// 更新为已退出
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 @@
</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>
\ 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 {
chSrvSend.setAllotTime(new Date());
chSrvSend.setStatus(Short.valueOf("1"));
if (chrSrvVo.getSrvSendId() == null) {
// Long id = sendService.selectMaxId();
// if (id == null) {
// id = 0L;
// }
// chSrvSend.setSrvSendId(++id);
sendService.insertSrvSend(chSrvSend);
}else {
chSrvSend.setSrvSendId(chrSrvVo.getSrvSendId());
......
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