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

失能评定调整

parent dc2d0f07
......@@ -76,8 +76,6 @@ public class DisableServiceImpl implements DisableService {
* @param certiCode 失能人员身份证号码
* @param dataFrom 申请来源
* @param srvOrganName 护理机构名称
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return list
*/
@Override
......
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.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.assessment.*;
......@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
......@@ -50,20 +51,13 @@ public class TaskController {
* @param pageSize 每页几条数据
*/
@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 daysRemaining, String status, String isReturn, String area,
Integer pageNum, Integer pageSize) {
if (pageNum == null) {
pageNum = 1;
}
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());
String daysRemaining, String status, String isReturn, String area) {
Page<TaskDistributionVO> page = new Page<>(pageNum, pageSize);
page = taskService.taskDistributionList(page, organId, provincial, city, street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area);
return Result.success(page);
}
/**
......@@ -93,14 +87,20 @@ public class TaskController {
/**
* 查询评定人员列表
*
* @param provincial 失能人员所在省
* @param city 失能人员所在市
* @param area 失能人员所在区
* @param organName 评定机构名称
* @param name 评定人员姓名
* @param tel 评定人员手机号码
* @param groupLeader 是否组长0组长,1非组长
*/
@RequestMapping("/aprEmpList")
public Result<List<AprEmpVO>> aprEmpList(String organName, String name, String tel, String groupLeader) {
List<AprEmpVO> aprEmpS = taskService.aprEmpList(organName, name, tel, groupLeader);
public Result<List<AprEmpVO>> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String 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);
}
......@@ -191,7 +191,7 @@ public class TaskController {
/**
* 评定任务分配
*
* @param taskId 评定任务id
* @param taskId 评定任务id,如果多条以逗号(,)分隔
* @param empId 评定人员id
*/
@RequestMapping("/allotTask")
......
......@@ -45,7 +45,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
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);
......
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.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.assessment.*;
......@@ -18,14 +18,13 @@ import java.util.List;
@Service
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 daysRemaining, String status, String isReturn, String area,
int pageNum, int pageSize);
String daysRemaining, String status, String isReturn, String area);
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);
......
......@@ -2,7 +2,6 @@ package com.hungraim.ltc.service.impl;
import cn.hutool.core.util.StrUtil;
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.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.assessment.*;
......@@ -60,19 +59,16 @@ public class TaskServiceImpl implements TaskService {
* @param daysRemaining 评定剩余天数
* @param status 任务状态
* @param isReturn 是否退回
* @param pageNum 当前页
* @param pageSize 每页几条数据
*/
@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 daysRemaining, String status, String isReturn, String area,
int pageNum, int pageSize) {
String daysRemaining, String status, String isReturn, String area) {
List<String> organIds = null;
if (StrUtil.isNotBlank(organId)) {
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);
}
......@@ -97,8 +93,18 @@ public class TaskServiceImpl implements TaskService {
* @param groupLeader 是否组长0组长,1非组长
*/
@Override
public List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader) {
return taskMapper.aprEmpList(organName, name, tel, groupLeader);
public List<AprEmpVO> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String 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 @@
SELECT emp.emp_id empId,
srvOrgan.srv_organ_name srvOrganName,
organ.organ_code organCode,
organ.district_provincial districtProvincial,
organ.district_city districtCity,
organ.district_area districtArea,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
organ.organ_name orgaName,
organ.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
emp.real_name realName,
......@@ -185,7 +185,13 @@
FROM ch_apr_emp emp
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
<where>
where organ.DISTRICT_PROVINCIAL = #{provincial}
<if test="city != null and city != ''">
and organ.district_city = #{city}
</if>
<if test="area != null and area != ''">
and organ.district_area = #{area}
</if>
<if test="organName != null and organName != ''">
and organ.organ_name like CONCAT(CONCAT('%',#{organName}) ,'%')
</if>
......@@ -196,9 +202,8 @@
and emp.tel = #{tel}
</if>
<if test="groupLeader != null and groupLeader != ''">
and emp.Group_leader = #{groupLeader}
and emp.group_leader = #{groupLeader}
</if>
</where>
</select>
<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