Commit 9ae21881 authored by 蔡镇泽's avatar 蔡镇泽

失能评定调整

parent dc2d0f07
...@@ -76,8 +76,6 @@ public class DisableServiceImpl implements DisableService { ...@@ -76,8 +76,6 @@ public class DisableServiceImpl implements DisableService {
* @param certiCode 失能人员身份证号码 * @param certiCode 失能人员身份证号码
* @param dataFrom 申请来源 * @param dataFrom 申请来源
* @param srvOrganName 护理机构名称 * @param srvOrganName 护理机构名称
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return list * @return list
*/ */
@Override @Override
......
package com.hungraim.ltc.controller; package com.hungraim.ltc.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason; import com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
...@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException; import java.text.ParseException;
...@@ -50,20 +51,13 @@ public class TaskController { ...@@ -50,20 +51,13 @@ public class TaskController {
* @param pageSize 每页几条数据 * @param pageSize 每页几条数据
*/ */
@RequestMapping("/taskDistributionList") @RequestMapping("/taskDistributionList")
public Result<List<TaskDistributionVO>> taskDistributionList(String organId, String provincial, String city, public Result<Page<TaskDistributionVO>> taskDistributionList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
String organId, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel, String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area, String daysRemaining, String status, String isReturn, String area) {
Integer pageNum, Integer pageSize) { Page<TaskDistributionVO> page = new Page<>(pageNum, pageSize);
if (pageNum == null) { page = taskService.taskDistributionList(page, organId, provincial, city, street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area);
pageNum = 1; return Result.success(page);
}
if (pageSize == null) {
pageSize = 10;
}
IPage<TaskDistributionVO> iPage = taskService.taskDistributionList(organId, provincial, city,
street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area,
pageNum, pageSize);
return Result.success(iPage.getRecords());
} }
/** /**
...@@ -93,14 +87,20 @@ public class TaskController { ...@@ -93,14 +87,20 @@ public class TaskController {
/** /**
* 查询评定人员列表 * 查询评定人员列表
* *
* @param provincial 失能人员所在省
* @param city 失能人员所在市
* @param area 失能人员所在区
* @param organName 评定机构名称 * @param organName 评定机构名称
* @param name 评定人员姓名 * @param name 评定人员姓名
* @param tel 评定人员手机号码 * @param tel 评定人员手机号码
* @param groupLeader 是否组长0组长,1非组长 * @param groupLeader 是否组长0组长,1非组长
*/ */
@RequestMapping("/aprEmpList") @RequestMapping("/aprEmpList")
public Result<List<AprEmpVO>> aprEmpList(String organName, String name, String tel, String groupLeader) { public Result<List<AprEmpVO>> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader) {
List<AprEmpVO> aprEmpS = taskService.aprEmpList(organName, name, tel, groupLeader); if (StringUtils.isBlank(provincial) || StringUtils.isBlank(city) || StringUtils.isBlank(area)) {
Result.failed("参数异常!");
}
List<AprEmpVO> aprEmpS = taskService.aprEmpList(provincial, city, area, organName, name, tel, groupLeader);
return Result.success(aprEmpS); return Result.success(aprEmpS);
} }
...@@ -191,7 +191,7 @@ public class TaskController { ...@@ -191,7 +191,7 @@ public class TaskController {
/** /**
* 评定任务分配 * 评定任务分配
* *
* @param taskId 评定任务id * @param taskId 评定任务id,如果多条以逗号(,)分隔
* @param empId 评定人员id * @param empId 评定人员id
*/ */
@RequestMapping("/allotTask") @RequestMapping("/allotTask")
......
...@@ -45,7 +45,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> { ...@@ -45,7 +45,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel); List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel);
List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader); List<AprEmpVO> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader);
List<PersonInfoVO> personInfoList(String reportId); List<PersonInfoVO> personInfoList(String reportId);
......
package com.hungraim.ltc.service; package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason; import com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
...@@ -18,14 +18,13 @@ import java.util.List; ...@@ -18,14 +18,13 @@ import java.util.List;
@Service @Service
public interface TaskService { public interface TaskService {
IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city, Page<TaskDistributionVO> taskDistributionList(Page<TaskDistributionVO> page, String organId, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel, String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area, String daysRemaining, String status, String isReturn, String area);
int pageNum, int pageSize);
List<TaskReportVO> taskReportList(String name, String certiCode, String tel); List<TaskReportVO> taskReportList(String name, String certiCode, String tel);
List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader); List<AprEmpVO> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader);
Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark); Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark);
......
...@@ -2,7 +2,6 @@ package com.hungraim.ltc.service.impl; ...@@ -2,7 +2,6 @@ package com.hungraim.ltc.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.dao.*; import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.assessment.*; import com.hungraim.ltc.pojo.entity.assessment.*;
...@@ -60,19 +59,16 @@ public class TaskServiceImpl implements TaskService { ...@@ -60,19 +59,16 @@ public class TaskServiceImpl implements TaskService {
* @param daysRemaining 评定剩余天数 * @param daysRemaining 评定剩余天数
* @param status 任务状态 * @param status 任务状态
* @param isReturn 是否退回 * @param isReturn 是否退回
* @param pageNum 当前页
* @param pageSize 每页几条数据
*/ */
@Override @Override
public IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city, public Page<TaskDistributionVO> taskDistributionList(Page<TaskDistributionVO> page, String organId, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel, String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area, String daysRemaining, String status, String isReturn, String area) {
int pageNum, int pageSize) {
List<String> organIds = null; List<String> organIds = null;
if (StrUtil.isNotBlank(organId)) { if (StrUtil.isNotBlank(organId)) {
organIds = Arrays.asList(organId.split(",")); organIds = Arrays.asList(organId.split(","));
} }
return taskMapper.taskDistributionList(new Page<>(pageNum, pageSize), organIds, provincial, city, return taskMapper.taskDistributionList(page, organIds, provincial, city,
street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area); street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area);
} }
...@@ -97,8 +93,18 @@ public class TaskServiceImpl implements TaskService { ...@@ -97,8 +93,18 @@ public class TaskServiceImpl implements TaskService {
* @param groupLeader 是否组长0组长,1非组长 * @param groupLeader 是否组长0组长,1非组长
*/ */
@Override @Override
public List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader) { public List<AprEmpVO> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader) {
return taskMapper.aprEmpList(organName, name, tel, groupLeader); List<AprEmpVO> aprEmpVOS = taskMapper.aprEmpList(provincial, city, area, organName, name, tel, groupLeader);
/*
如果省市区下没有对应的组长,就查询省市下的对应组长,如果省市下也没有就查询省下的组长
*/
if (aprEmpVOS == null || aprEmpVOS.size() <= 0) {
aprEmpVOS = taskMapper.aprEmpList(provincial, city, null, organName, name, tel, groupLeader);
if (aprEmpVOS == null || aprEmpVOS.size() <= 0) {
aprEmpVOS = taskMapper.aprEmpList(provincial, null, null, organName, name, tel, groupLeader);
}
}
return aprEmpVOS;
} }
/** /**
......
...@@ -171,9 +171,9 @@ ...@@ -171,9 +171,9 @@
SELECT emp.emp_id empId, SELECT emp.emp_id empId,
srvOrgan.srv_organ_name srvOrganName, srvOrgan.srv_organ_name srvOrganName,
organ.organ_code organCode, organ.organ_code organCode,
organ.district_provincial districtProvincial, (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
organ.district_city districtCity, (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
organ.district_area districtArea, (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
organ.organ_name orgaName, organ.organ_name orgaName,
organ.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode, organ.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
emp.real_name realName, emp.real_name realName,
...@@ -185,20 +185,25 @@ ...@@ -185,20 +185,25 @@
FROM ch_apr_emp emp FROM ch_apr_emp emp
LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id
<where> where organ.DISTRICT_PROVINCIAL = #{provincial}
<if test="organName != null and organName != ''"> <if test="city != null and city != ''">
and organ.organ_name like CONCAT(CONCAT('%',#{organName}) ,'%') and organ.district_city = #{city}
</if> </if>
<if test="name != null and name != ''"> <if test="area != null and area != ''">
and emp.real_name like CONCAT(CONCAT('%',#{name}) ,'%') and organ.district_area = #{area}
</if> </if>
<if test="tel != null and tel != ''"> <if test="organName != null and organName != ''">
and emp.tel = #{tel} and organ.organ_name like CONCAT(CONCAT('%',#{organName}) ,'%')
</if> </if>
<if test="groupLeader != null and groupLeader != ''"> <if test="name != null and name != ''">
and emp.Group_leader = #{groupLeader} and emp.real_name like CONCAT(CONCAT('%',#{name}) ,'%')
</if> </if>
</where> <if test="tel != null and tel != ''">
and emp.tel = #{tel}
</if>
<if test="groupLeader != null and groupLeader != ''">
and emp.group_leader = #{groupLeader}
</if>
</select> </select>
<select id="taskGroupList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO"> <select id="taskGroupList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupVO">
......
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