Commit 1a235765 authored by zhangwanglin's avatar zhangwanglin

校验

parent 3ed8759c
......@@ -25,7 +25,7 @@
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
<where>
<if test="req.realName != null and req.realName != ''">
and info.REAL_NAME = #{req.realName}
and info.REAL_NAME like CONCAT(CONCAT('%',#{req.realName}) ,'%')
</if>
<if test="req.accountsTime != null and req.accountsTime != ''">
and to_char(detail.accounts_time,'yyyy-MM-dd') = #{req.accountsTime}
......
......@@ -556,4 +556,16 @@ public class DisableController {
return Result.success(disableExitHis);
}
@RequestMapping("/getDisableCertiCode")
public Result getDisableCertiCode(String certiCode) {
if (certiCode == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
Integer integer = disableService.selectByCertiCode(certiCode);
if (integer > 0) {
return Result.failed("失能申请已存在该人员身份证,请联系管理员");
}
return Result.success();
}
}
......@@ -186,4 +186,5 @@ public interface DisableService {
List<ChDisableExit> getDisableExitHis(Integer disableInfoId);
Integer selectByCertiCode(String certiCode);
}
......@@ -649,6 +649,13 @@ public class DisableServiceImpl implements DisableService {
}
@Override
public Integer selectByCertiCode(String certiCode){
List<ChDisableApply> chDisableApplies = disableApplyMapper.selectList(new LambdaQueryWrapper<ChDisableApply>()
.eq(ChDisableApply::getCertiCode, certiCode));
return chDisableApplies.size();
}
......
......@@ -81,4 +81,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
int insertSrvSend(Integer disableInfoId);
ChDisableInfo selectDisableBycertiCode(@Param("certiCode") String certiCode);
Integer selectReportByTaskId(String taskId);
}
......@@ -490,6 +490,10 @@ public class TaskServiceImpl implements TaskService {
if (task == null) {
return Result.failed("无效的taskId!");
}
Integer integer = taskMapper.selectReportByTaskId(id);
if(integer>0){
return Result.failed("有已分配未进行评定报告录入的单子,请先录入!");
}
//更新评定任务信息
task.setAprOrganId(chAprEmp.getAprOrganId());//鉴定机构id
task.setAprEmpId(Integer.parseInt(empId));//评定人员id
......
......@@ -545,4 +545,10 @@
<select id="selectDisableBycertiCode" resultType="com.hungraim.ltc.pojo.entity.disable.ChDisableInfo">
select * from CH_DISABLE_INFO info where info.CERTI_CODE = #{certiCode} and rownum = 1 order by info.FCD desc
</select>
<select id="selectReportByTaskId" resultType="java.lang.Integer">
select count(1) from CH_APR_REPORT r left join CH_APR_TASK t on r.TASK_ID = t.TASK_ID
where r.TASK_ID = #{taskId} and t.TASK_STATUS !=3
</select>
</mapper>
\ No newline at end of file
......@@ -245,6 +245,19 @@ public class BuildBedController {
if (chSrvSendsList.size() > 0) {
return Result.failed("已分配护理机构,请先终止或退出再操作");
}
Integer srvModeId = disableInfoServie.querySrvModeId(disabInfoId);
Long srvModeId1 = chSrvSend.getSrvModeId();
if(srvModeId != srvModeId1.intValue()){
String srvModeName = null;
if(srvModeId==1){
srvModeName = "医疗";
}else if(srvModeId==2){
srvModeName = "养老";
}else if(srvModeId==3){
srvModeName = "上门";
}
return Result.failed("选择的服务方式和失能人员申请的不一致,申请的服务方式为" + srvModeName);
}
chSrvSend.setAllotTime(new Date());
chSrvSend.setStatus(Short.valueOf("1"));
......
......@@ -13,5 +13,5 @@ public interface DisableInfoServie extends IService<ChDisableInfo> {
Page<DisableInfoVo> querySrvYet(Integer disableInfoId, int current, int limit, Integer status, Integer sendId);
Integer querySrvModeId(Long disabInfoId);
}
......@@ -19,4 +19,12 @@ public class DisableInfoServieImpl extends ServiceImpl<DisableInfoMapper, ChDisa
Page<SrvSendVO> page = new Page<>(current,limit);
return this.baseMapper.querySrvYet(page,disableInfoId,status,sendId);
}
@Override
public Integer querySrvModeId(Long disabInfoId){
ChDisableInfo chDisableInfo = baseMapper.selectById(disabInfoId);
Integer srvModeId = chDisableInfo.getSrvModeId();
return srvModeId;
}
}
......@@ -6,7 +6,7 @@
<select id="queryPlan" resultType="com.hungraim.ltc.pojo.entity.governance.ChSrvPlan">
select
disable.DISAB_INFO_ID disabInfoId,
program.SRV_MODE_ID modeId,
disable.SRV_MODE_ID modeId,
--护理机构名称
organ.srv_organ_id srvOrganId,
emp.emp_id empId,
......
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