Commit e204a5b6 authored by zhangwanglin's avatar zhangwanglin

Merge remote-tracking branch 'origin/dev_ch_master' into dev_nursing_records_20230214

parents e0812e2d 89309f44
......@@ -19,6 +19,16 @@ import java.util.List;
@Repository
public interface TaskMapper extends BaseMapper<ChAprTask> {
/**
*
* @param certiCode 身份证号
* @param auditStatus 审核状态 2审核通过 1待审核
* @param type 1初评 2复评
* @return
*/
int queryApplyCount(String realName,String certiCode,int auditStatus,int type);
/**
* 评定任务分配列表
*
......@@ -35,9 +45,12 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
* @param taskStatus 任务状态
* @param isReturn 是否退回
*/
Page<TaskDistributionVO> taskDistributionList(Page<TaskDistributionVO> page, List<String> organIds, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String taskStatus, String isReturn, String area,int type);
String daysRemaining, String taskStatus, String isReturn, String area,int type,Integer aprType);
/**
* 评定报告录入列表
......
......@@ -14,6 +14,7 @@ import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
......@@ -96,8 +97,14 @@ public class TaskServiceImpl implements TaskService {
if (StrUtil.isNotBlank(organId)) {
organIds = Arrays.asList(organId.split(","));
}
int aprType=0;
if (StrUtil.isNotBlank(realName)||StrUtil.isNotBlank(certiCode)) {
int count = taskMapper.queryApplyCount(realName,certiCode,2,2);
aprType=count>0?1:0;//count>0 复评已过,查询复评数据,反之查询初评数据。
}
return taskMapper.taskDistributionList(page, organIds, provincial, city,
street, realName, certiCode, taskName, taskTel, daysRemaining, taskStatus, isReturn, area,type);
street, realName, certiCode, taskName, taskTel, daysRemaining, taskStatus, isReturn, area,type,aprType);
}
/**
......@@ -183,7 +190,7 @@ public class TaskServiceImpl implements TaskService {
if (reportDetailVO.getPerson2() != null) {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(report.getReportId());
personInfo.setEmpId(reportDetailVO.getPerson1());
personInfo.setEmpId(reportDetailVO.getPerson2());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
......
......@@ -2,6 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.TaskMapper">
<select id="queryApplyCount" resultType="int">
select count(1) from Ch_Disable_Apply a
where a.APPLY_METHOD =#{type} and a.APPLY_STATUS=#{auditStatus} and (a.certi_code = #{certiCode} or a.real_name like CONCAT(CONCAT('%',#{realName}) ,'%'))
</select>
<select id="taskDistributionList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO">
select
DISTINCT task.task_id taskId,
......@@ -60,8 +66,9 @@
left join ch_refuse_reason reason on push.refuse_reason = reason.refuse_reason_id
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
<where>
and task.APR_TYPE = 0
<if test="aprType != null ">
and task.APR_TYPE = #{aprType}
</if>
<if test="organIds != null">
and task.ORGAN_ID in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
......@@ -228,7 +235,7 @@
LEFT JOIN ch_apr_emp emp ON info.emp_id = emp.emp_id
LEFT JOIN ch_apr_organ organ ON organ.apr_organ_id = emp.apr_organ_id
where info.report_id = #{reportId}
order by info.info_id desc
order by info.info_id
</select>
<select id="aprEmpList" resultType="com.hungraim.ltc.pojo.vo.assessment.AprEmpVO">
......@@ -395,8 +402,8 @@
push.Refuse_remark refuseRemark
FROM ch_apr_task_push_his push
LEFT JOIN ch_apr_task task ON push.TASK_ID = task.TASK_ID
left join ch_apr_organ organ on task.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_apr_emp emp on push.emp_id = emp.emp_id
left join ch_apr_organ organ on emp.apr_organ_id = organ.apr_organ_id
WHERE push.TASK_ID = #{taskId}
</select>
......@@ -516,4 +523,6 @@
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -99,4 +99,6 @@ public class TaskDistributionVO {
//20230306业务类型 1-报告录入检索调用
private int type;
}
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