Commit d0be3dc5 authored by zhangch's avatar zhangch
parents e3da208c 55bd9ae6
...@@ -207,6 +207,15 @@ public class TaskController { ...@@ -207,6 +207,15 @@ public class TaskController {
} }
/** /**
* 分配历史信息列表
*/
@RequestMapping("/allotTaskHisList")
public Result<List<AllotTaskHisVO>> allotTaskHisList() {
List<AllotTaskHisVO> list = taskService.allotTaskHisList();
return Result.success(list);
}
/**
* 评定任务分组管理列表 * 评定任务分组管理列表
* *
* @param name 评定人员姓名 * @param name 评定人员姓名
...@@ -234,6 +243,20 @@ public class TaskController { ...@@ -234,6 +243,20 @@ public class TaskController {
} }
/** /**
* 评定任务分组管理列表详情详情
*
* @param pushId 任务组id
*/
@RequestMapping("/taskGroupInfoListInfo")
public Result<TaskGroupInfoListInfoVO> taskGroupInfoListInfo(String pushId) {
if (StringUtils.isBlank(pushId)) {
return Result.failed("任务组id不能为空!");
}
TaskGroupInfoListInfoVO taskGroupInfoListInfoVO = taskService.taskGroupInfoListInfo(pushId);
return Result.success(taskGroupInfoListInfoVO);
}
/**
* 评定任务分组管理(整组操作) * 评定任务分组管理(整组操作)
* *
* @param groupNumber 组号 * @param groupNumber 组号
...@@ -245,7 +268,7 @@ public class TaskController { ...@@ -245,7 +268,7 @@ public class TaskController {
return Result.failed("组号不能为空!"); return Result.failed("组号不能为空!");
} }
if (status == null || status < 0 || status > 5) { if (status == null || status < 0 || status > 5) {
Result.failed("状态异常!"); return Result.failed("状态异常!");
} }
Result<Object> objectResult = taskService.taskGroupByGroup(groupNumber, status); Result<Object> objectResult = taskService.taskGroupByGroup(groupNumber, status);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) { if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
...@@ -258,16 +281,16 @@ public class TaskController { ...@@ -258,16 +281,16 @@ public class TaskController {
/** /**
* 评定任务分组管理 * 评定任务分组管理
* *
* @param pushId 任务清单id * @param pushId 任务id
* @param status 分组状态 未分配(拒绝(重新分配)):0;已分配:1;已接受:2;已完成:3;拒绝(中止):4,拒绝(终止):5 * @param status 分组状态 未分配(拒绝(重新分配)):0;已分配:1;已接受:2;已完成:3;拒绝(中止):4,拒绝(终止):5
*/ */
@RequestMapping("/taskGroup") @RequestMapping("/taskGroup")
public Result taskGroup(Integer pushId, Integer status) { public Result taskGroup(Integer pushId, Integer status) {
if (status == null || status < 0 || status > 5) { if (status == null || status < 0 || status > 5) {
Result.failed("状态异常!"); return Result.failed("状态异常!");
} }
if (pushId == null) { if (pushId == null) {
Result.failed("任务组不能为空!"); return Result.failed("任务组id不能为空!");
} }
Result<Object> objectResult = taskService.taskGroup(pushId, status); Result<Object> objectResult = taskService.taskGroup(pushId, status);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) { if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
...@@ -277,5 +300,4 @@ public class TaskController { ...@@ -277,5 +300,4 @@ public class TaskController {
return Result.success(); return Result.success();
} }
} }
...@@ -50,4 +50,8 @@ public interface TaskMapper extends BaseMapper<ChAprTask> { ...@@ -50,4 +50,8 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
List<PersonInfoVO> personInfoList(String reportId); List<PersonInfoVO> personInfoList(String reportId);
List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber); List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber);
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
List<AllotTaskHisVO> allotTaskHisList();
} }
...@@ -68,4 +68,8 @@ public interface TaskService { ...@@ -68,4 +68,8 @@ public interface TaskService {
List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber); List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber);
Result<Object> taskGroupByGroup(String groupNumber, Integer status); Result<Object> taskGroupByGroup(String groupNumber, Integer status);
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
List<AllotTaskHisVO> allotTaskHisList();
} }
...@@ -175,9 +175,10 @@ public class TaskServiceImpl implements TaskService { ...@@ -175,9 +175,10 @@ public class TaskServiceImpl implements TaskService {
//生成组 //生成组
ChAprTaskPush taskPush = new ChAprTaskPush(); ChAprTaskPush taskPush = new ChAprTaskPush();
taskPush.setTime(new Date()); taskPush.setTime(new Date());
taskPush.setAssignTime(new Date());
taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId)); taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId));
taskPush.setTaskId(Long.getLong(id)); taskPush.setTaskId(Long.parseLong(id));
taskPush.setEmpId(Long.getLong(empId)); taskPush.setEmpId(Long.parseLong(empId));
taskPush.setStatus((short) 1); taskPush.setStatus((short) 1);
taskPush.setIsManual((short) 1); taskPush.setIsManual((short) 1);
taskPushMapper.insert(taskPush); taskPushMapper.insert(taskPush);
...@@ -234,4 +235,14 @@ public class TaskServiceImpl implements TaskService { ...@@ -234,4 +235,14 @@ public class TaskServiceImpl implements TaskService {
} }
return Result.success(); return Result.success();
} }
@Override
public TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId) {
return taskMapper.taskGroupInfoListInfo(pushId);
}
@Override
public List<AllotTaskHisVO> allotTaskHisList() {
return taskMapper.allotTaskHisList();
}
} }
\ No newline at end of file
...@@ -151,6 +151,19 @@ ...@@ -151,6 +151,19 @@
</where> </where>
</select> </select>
<select id="personInfoList" resultType="com.hungraim.ltc.pojo.vo.assessment.PersonInfoVO">
SELECT emp.emp_id empId,
organ.organ_name orgaName,
emp.real_name realName,
emp.tel tel,
emp.certi_code certiCode
FROM ch_apr_person_info info
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
</select>
<select id="aprEmpList" resultType="com.hungraim.ltc.pojo.vo.assessment.AprEmpVO"> <select id="aprEmpList" resultType="com.hungraim.ltc.pojo.vo.assessment.AprEmpVO">
SELECT emp.emp_id empId, SELECT emp.emp_id empId,
srvOrgan.srv_organ_name srvOrganName, srvOrgan.srv_organ_name srvOrganName,
...@@ -204,17 +217,17 @@ ...@@ -204,17 +217,17 @@
LEFT JOIN CH_APR_ORGAN organ on task.apr_organ_id = organ.apr_organ_id LEFT JOIN CH_APR_ORGAN organ on task.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_apr_emp emp on task.apr_emp_id = emp.emp_id LEFT JOIN ch_apr_emp emp on task.apr_emp_id = emp.emp_id
LEFT JOIN CH_APR_ORGAN emp_organ on emp.apr_organ_id = emp_organ.apr_organ_id LEFT JOIN CH_APR_ORGAN emp_organ on emp.apr_organ_id = emp_organ.apr_organ_id
<where> where push.task_push_id in (SELECT MIN(push1.task_push_id) id FROM ch_apr_task_push push1 group by push1.Group_number)
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and emp.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%') and emp.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
</if> </if>
<if test="certiCode != null and certiCode != ''"> <if test="certiCode != null and certiCode != ''">
and emp.CERTI_CODE = #{certiCode} and emp.CERTI_CODE = #{certiCode}
</if> </if>
<if test="tel != null and tel != ''"> <if test="tel != null and tel != ''">
and emp.tel = #{tel} and emp.tel = #{tel}
</if> </if>
</where> order by taskPushId
</select> </select>
<select id="taskGroupInfoList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoVO"> <select id="taskGroupInfoList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoVO">
...@@ -249,17 +262,60 @@ ...@@ -249,17 +262,60 @@
where push.group_number = #{groupNumber} where push.group_number = #{groupNumber}
</select> </select>
<select id="personInfoList" resultType="com.hungraim.ltc.pojo.vo.assessment.PersonInfoVO"> <select id="taskGroupInfoListInfo" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoListInfoVO">
SELECT emp.emp_id empId, SELECT push.TASK_PUSH_ID taskPushId,
organ.organ_name orgaName, disable.real_name realName,
emp.real_name realName, (select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
emp.tel tel, (select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
emp.certi_code certiCode (select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
FROM ch_apr_person_info info disable.certi_code certiCode,
LEFT JOIN ch_apr_emp emp ON info.emp_id = emp.emp_id disable.birthday birthday,
LEFT JOIN ch_apr_organ organ ON organ.apr_organ_id = emp.apr_organ_id disable.gender gender,
where info.report_id = #{reportId} disable.tel tel,
order by info.info_id desc (SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE WHERE disable.DISE_TYPE_F = DISE_TYPE_ID) diseTypeF,
(SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE WHERE disable.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
disable.disease_desc diseaseDesc,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.adress_district_provincial = dis.DISTRICT_CODE) adressDistrictProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.adress_district_city = dis.DISTRICT_CODE) adressDistrictCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.Adress_district_code = dis.DISTRICT_CODE) adressDistrictCode,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.ACPT_PROVINCIAL = dis.DISTRICT_CODE) acptProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.ACPT_CITY = dis.DISTRICT_CODE) acptCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.ACPT_AREA = dis.DISTRICT_CODE) acptArea,
task.eff_time effTime,
task.Last_apr_date lastAprDate,
emp.real_name empRealName,
emp.certi_code empCertiCode,
emp.tel empTel,
push.accept_time acceptTime,
push.refuse_reason refuseReason,
organ.organ_name refuseOrganName,
push.refuse_emp refuseEmp,
push.status status,
push.refuse_remark refuseRemark
FROM ch_apr_task_push push
LEFT JOIN ch_apr_task task ON push.TASK_ID = task.TASK_ID
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
LEFT JOIN ch_apr_emp emp on task.apr_emp_id = emp.emp_id
LEFT JOIN CH_APR_ORGAN organ on push.refuse_organ_name = organ.apr_organ_id
where push.task_push_id = #{pushId}
</select>
<select id="allotTaskHisList" resultType="com.hungraim.ltc.pojo.vo.assessment.AllotTaskHisVO">
SELECT push.His_task_push_id hisTaskPushId,
push.task_id taskId,
push.assign_time assignTime,
push.group_number groupNumber,
push.time time,
organ.organ_name organName,
emp.real_name realName,
push.Refuse_time refuseTime,
push.status status,
push.Refuse_reason refuseReason,
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
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.assessment;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 分配历史信息列表VO
*
* @author czz
*/
@Data
public class AllotTaskHisVO {
//分配历史id
private String hisTaskPushId;
//评定任务id
private String taskId;
//分配时间
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date assignTime;
//组号
private String groupNumber;
//预约日期
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date time;
//评定机构
private String organName;
//评定组长
private String realName;
//拒绝时间
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date refuseTime;
//状态
private String status;
//拒绝原因
private String refuseReason;
//备注
private String refuseRemark;
}
package com.hungraim.ltc.pojo.vo.assessment;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class TaskGroupInfoListInfoVO {
/**
* 分组id
*/
private String taskPushId;
/**
* 申请人姓名
*/
private String realName;
/**
* 所在省市区
*/
private String districtProvincial;
private String districPity;
private String districtArea;
/**
* 身份证号码
*/
private String certiCode;
/**
* 出生年月
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
/**
* 性别
*/
private String gender;
/**
* 手机号
*/
private String tel;
/**
* 诊断疾病
*/
private String diseTypeF;
private String diseTypeS;
/**
* 病情描述及诊断
*/
private String diseaseDesc;
/**
* 现住址
*/
private String adressDistrictProvincial;
private String adressDistrictCity;
private String adressDistrictCode;
/**
* 接受评定地址
*/
private String acptProvincial;
private String acptCity;
private String acptArea;
/**
* 申请日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date effTime;
/**
* 评定截止日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date lastAprDate;
/**
* 组长姓名
*/
private String empRealName;
/**
* 组长身份证号码
*/
private String empCertiCode;
/**
* 组长手机号码
*/
private String empTel;
/**
* 拒绝时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date acceptTime;
/**
* 拒绝原因
*/
private String refuseReason;
/**
* 操作机构
*/
private String refuseOrganName;
/**
* 操作人
*/
private String refuseEmp;
/**
* 状态
*/
private String status;
/**
* 备注
*/
private String refuseRemark;
}
...@@ -24,7 +24,7 @@ public class TaskGroupVO { ...@@ -24,7 +24,7 @@ public class TaskGroupVO {
//评定起点地址 //评定起点地址
private String routeStatrtLocation; private String routeStatrtLocation;
//组号 //组号
private Integer groupNumber; private String groupNumber;
//评定人员姓名 //评定人员姓名
private String realName; private String realName;
//评定人员身份证号码 //评定人员身份证号码
......
...@@ -17,7 +17,6 @@ public class SerialNumberUtils { ...@@ -17,7 +17,6 @@ public class SerialNumberUtils {
*/ */
public static String getSerialNumber(String key) { public static String getSerialNumber(String key) {
DateFormat dateFormat = new SimpleDateFormat(DateUtils.DATE_PATTERN_yyyyMMddHHMMss); DateFormat dateFormat = new SimpleDateFormat(DateUtils.DATE_PATTERN_yyyyMMddHHMMss);
dateFormat.format(new Date()); return dateFormat.format(new Date()) + key;
return dateFormat.toString() + key;
} }
} }
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