Commit 8bc4db9a authored by zhangch's avatar zhangch

失能评定、服务机构分配等模块的bug修改

parent 0965d34b
......@@ -139,7 +139,16 @@ public class TaskController {
* @param fileDataList 附件
*/
@RequestMapping("/addReport")
public Result addReport(Integer taskId, Integer person1, Integer person2, Integer person3, String evaluateTime, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList) {
public Result addReport(ReportDetailVO reportDetailVo) {
Integer person1 = reportDetailVo.getPerson1();
Integer person2 = reportDetailVo.getPerson2();
Integer person3 = reportDetailVo.getPerson3();
Integer taskId = reportDetailVo.getTaskId();
Integer disableLevelId = reportDetailVo.getDisableLevelId();
String evaluateTime = reportDetailVo.getEvaluateTime();
String polNo = reportDetailVo.getPolNo();
String remark = reportDetailVo.getRemark();
List<ChFndAttach> fileDataList = reportDetailVo.getFileDataList();
if (person1 == null) {
return Result.failed("鉴定人员1不能为空!");
}
......@@ -226,8 +235,8 @@ public class TaskController {
* 分配历史信息列表
*/
@RequestMapping("/allotTaskHisList")
public Result<List<AllotTaskHisVO>> allotTaskHisList() {
List<AllotTaskHisVO> list = taskService.allotTaskHisList();
public Result<List<AllotTaskHisVO>> allotTaskHisList(Integer taskId) {
List<AllotTaskHisVO> list = taskService.allotTaskHisList(taskId);
return Result.success(list);
}
......
......@@ -54,7 +54,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
List<AllotTaskHisVO> allotTaskHisList();
List<AllotTaskHisVO> allotTaskHisList(@Param("taskId") Integer taskId);
Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, @Param("organIds") List<Long> organIds, String districtProvincial, String districtCity, String districtArea, String realName, String certiCode);
}
......@@ -47,7 +47,7 @@ public interface TaskService {
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
List<AllotTaskHisVO> allotTaskHisList();
List<AllotTaskHisVO> allotTaskHisList(Integer taskId);
Result<Object> updatePushTimeAndRemark(String pushId, Date timeDate, String remark);
......
package com.hungraim.ltc.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.AttachFeignService;
......@@ -127,11 +128,11 @@ public class TaskServiceImpl implements TaskService {
@Transactional(rollbackFor = Exception.class)
@Override
public Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList) {
ChAprTask task = taskMapper.selectById(taskId);
if (task != null) {
List<ChAprReport> chAprReports = aprReportMapper.selectList(new LambdaQueryWrapper<ChAprReport>().eq(ChAprReport::getStatus, 4).eq(ChAprReport::getTaskId, taskId));
if (chAprReports != null && chAprReports.size() > 0) {
return Result.failed("已存在的评定任务报告!");
}
//插入评定任
//插入评定任报告
ChAprReport report = new ChAprReport();
report.setTaskId(taskId);
report.setEffTime(new Date());
......@@ -166,6 +167,12 @@ public class TaskServiceImpl implements TaskService {
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
// 更新评定任务状态为已完成,并记录完成时间
ChAprTask task = new ChAprTask();
task.setTaskId(taskId);
task.setFinishTime(new Date());
task.setTaskStatus(3); // 已完成
taskMapper.updateById(task);
return Result.success();
}
......@@ -275,6 +282,7 @@ public class TaskServiceImpl implements TaskService {
task.setAprOrganId(chAprEmp.getAprOrganId());//鉴定机构id
task.setAprEmpId(Integer.parseInt(empId));//评定人员id
task.setAssignTime(assignTime);
task.setTaskStatus(1);
taskMapper.updateById(task);
//更新失能人员信息
ChDisableInfo chDisableInfo = disableInfoMapper.selectById(task.getDisableInfoId());
......@@ -406,8 +414,8 @@ public class TaskServiceImpl implements TaskService {
* 分配历史信息列表
*/
@Override
public List<AllotTaskHisVO> allotTaskHisList() {
return taskMapper.allotTaskHisList();
public List<AllotTaskHisVO> allotTaskHisList(Integer taskId) {
return taskMapper.allotTaskHisList(taskId);
}
/**
......
......@@ -49,7 +49,7 @@
push.refuse_remark refuseRemark
from CH_APR_TASK task
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_srv_organ organ on aprOrgan.organ_id = organ.organ_id
-- left join ch_srv_organ organ on aprOrgan.organ_id = organ.organ_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 and emp.IS_LOCK = 0
left join ch_apr_task_push push on task.task_id = push.task_id
......@@ -333,6 +333,7 @@
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
WHERE push.TASK_ID = #{taskId}
</select>
<select id="reTaskDistributionList" resultType="com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO">
......
package com.hungraim.ltc.pojo.vo.assessment;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
......@@ -18,11 +19,13 @@ public class AllotTaskHisVO {
private String taskId;
//分配时间
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date assignTime;
//组号
private String groupNumber;
//预约日期
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date time;
//评定机构
private String organName;
......@@ -30,6 +33,7 @@ public class AllotTaskHisVO {
private String realName;
//拒绝时间
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date refuseTime;
//状态
private String status;
......
package com.hungraim.ltc.pojo.vo.assessment;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import lombok.Data;
import java.util.List;
@Data
public class ReportDetailVO {
Integer taskId;
Integer person1;
Integer person2;
Integer person3;
String evaluateTime;
Integer disableLevelId;
String polNo;
String remark;
List<ChFndAttach> fileDataList;
}
......@@ -46,7 +46,7 @@ public class DisableVO implements Serializable {
private String disease;
private String diseTypeS;
//申请时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date effTime;
//申请来源 网厅:0,核心:1,手机端:2,待遇申请:3
private String dataFrom;
......
......@@ -8,7 +8,7 @@ import java.util.Date;
@Data
public class ExamineRecord {
//审核时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date checkTime;
//申请类型
private String teratmentType;
......
......@@ -20,10 +20,10 @@ public class DisableInfoTaskVO implements Serializable {
private Integer srvOrganIntent;
private String gender;
private String certiCode;
private String disease;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String diseTypeS;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date finishTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date reAprTime;
private String permitId;
private String tel;
......
......@@ -49,7 +49,7 @@ public class ProgramListVo {
/**
* 失能人员生日
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date birthday;
/**
......@@ -74,7 +74,7 @@ public class ProgramListVo {
/**
* 评定完成日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date assessDate;
/**
......@@ -95,7 +95,7 @@ public class ProgramListVo {
/**
* 创建时间(服务方案制定时间)
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date effTime;
......
......@@ -16,7 +16,7 @@ public class SrvSendVO extends PageInfo implements Serializable {
//id
@TableId
private Integer sendId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date stopTime;
//失能人员ID
private Integer disableInfoId;
......@@ -55,7 +55,7 @@ public class SrvSendVO extends PageInfo implements Serializable {
private String disease;
private String diseTypeS;
//申请时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date effTime;
//申请来源 网厅:0,核心:1,手机端:2,待遇申请:3
private String datafrom;
......
......@@ -49,7 +49,7 @@ public class SvrSendListVo {
/**
* 失能人员生日
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date birthday;
/**
......@@ -78,8 +78,8 @@ public class SvrSendListVo {
/**
* 创建时间(分配时间)
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date effTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date allotTime;
}
......@@ -117,9 +117,6 @@ public class BuildBedController {
if (StrUtil.isBlankIfStr(disableInfoId)) {
return Result.failed("失能人员ID 为空!");
}
if (StrUtil.isBlankIfStr(srvOrganId)) {
return Result.failed("机构id不能为空");
}
DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId);
List<DisableInfoTaskVO> disableInfoTaskVO1 = sendService.selectBydisableInfoId(disableInfoId);
Map map = new HashMap<>();
......
......@@ -132,6 +132,7 @@ public class SrvTaskController {
}
srvTaskService.addOrUpdateSrvTask(param);
} catch (RuntimeException e) {
e.printStackTrace();
return Result.failed(e.getMessage());
}
return Result.success();
......
......@@ -42,7 +42,7 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
" s.srv_organ_intent," +
" s.gender," +
" s.certi_code," +
" s.disease," +
" s.DISE_TYPE_S," +
" i.finish_time," +
" i.re_apr_time" +
" from ch_disable_info s" +
......@@ -56,7 +56,7 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
@Select("select s.real_name," +
" s.certi_code," +
" s.tel," +
" s.disease," +
" s.DISE_TYPE_S," +
" i.finish_time," +
" i.re_apr_time," +
" i.task_status" +
......
......@@ -41,8 +41,10 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im
@Override
public DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId) {
DisableInfoTaskVO disableInfoTaskVO = sendMapper.selectBydisableInfoId(disableInfoId);
String s = sendMapper.selectByOrganId(srvOrganId);
disableInfoTaskVO.setPermitId(s);
if (srvOrganId != null) {
String s = sendMapper.selectByOrganId(srvOrganId);
disableInfoTaskVO.setPermitId(s);
}
return disableInfoTaskVO;
}
......
......@@ -137,8 +137,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情
Long newSrvTaskId = chSrvTask.getSrvTaskId();
this.insertTaskDetail(newSrvTaskId, taskDetails);
//修改附件
this.updateAttachs(srvTaskInfoVO.getListAttach(), Long.parseLong(srvTaskId));
//添加附件
this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
} else {
// 修改服务计划
chSrvTaskDetailMapper.delete(new QueryWrapper<ChSrvTaskDetail>().eq("srv_task_id", Long.parseLong(srvTaskId)));//删除原来的计划详情
......
......@@ -47,7 +47,7 @@
T3.ACPT_SRV_STREET acptSrvStreet,
T3.ACPT_SRV_ADDRESS acptSrvAddress,
T1.STATUS sendStatus,
T1.EFF_TIME effTime,
T1.ALLOT_TIME allotTime,
(SELECT COUNT(0) FROM CH_SRV_PROGRAM T4 WHERE T1.SRV_ORGAN_ID = T4.SRV_ORGAN_ID AND T1.DISAB_INFO_ID = T4.DISAB_INFO_ID) programNum
FROM CH_SRV_SEND T1
INNER JOIN CH_SRV_ORGAN T2 ON T1.SRV_ORGAN_ID = T2.SRV_ORGAN_ID
......
......@@ -3,10 +3,10 @@
<mapper namespace="com.hungraim.ltc.governance.dao.SrvSendMapper">
<resultMap id="sendresultMap" type="com.hungraim.ltc.pojo.vo.governance.SrvSendVO">
<id column="srv_send_id" jdbcType="VARCHAR" property="sendId"/>
<result column="srv_organ_id" jdbcType="VARCHAR" property="srvOrganId"/>
<result column="SRV_ORGAN_INTENT" jdbcType="VARCHAR" property="srvOrganId"/>
<result column="organ_id" jdbcType="VARCHAR" property="organId"/>
<result column="disab_info_id" jdbcType="VARCHAR" property="disableInfoId"/>
<result column="SRV_ORGAN_NAME" jdbcType="VARCHAR" property="organName"/>
<result column="ORGAN_NAME" jdbcType="VARCHAR" property="organName"/>
<result column="district_provincial" jdbcType="VARCHAR" property="provincial"/>
<result column="district_city" jdbcType="VARCHAR" property="city"/>
<result column="district_area" jdbcType="VARCHAR" property="area"/>
......@@ -21,33 +21,35 @@
<!--查询服务分配信息列表-->
<select id="selectSendList" resultMap="sendresultMap">
select s.srv_send_id,
SELECT
s.srv_send_id,
i.disab_info_id,
o.srv_organ_id,
o.organ_id,
o.SRV_ORGAN_NAME,
i.district_provincial,
i.district_city,
i.district_area,
i.real_name,
i.certi_code,
i.gender,
i.tel,
s.stop_time,
i.birthday,
s.status
from ch_disable_info i
left join ch_srv_send s
on s.disab_info_id = i.disab_info_id
left join ch_srv_organ o
on s.srv_organ_id = o.srv_organ_id
o.ORGAN_NAME,
i.SRV_ORGAN_INTENT,
i.district_provincial,
i.district_city,
i.district_area,
i.real_name,
i.certi_code,
i.gender,
i.tel,
s.stop_time,
i.birthday,
s.status
FROM
ch_disable_info i
LEFT JOIN ch_srv_send s ON s.disab_info_id = i.disab_info_id
LEFT JOIN ch_fnd_organ o ON i.organ_id = o.organ_id
LEFT JOIN CH_APR_TASK t ON i.disab_info_id = t.DISABLE_INFO_ID
<where>
t.TASK_STATUS = 3
<if test="chSrvOrgan.srvOrganId != null and chSrvOrgan.srvOrganId != ''">
AND s.srv_organ_id = #{chSrvOrgan.srvOrganId}
AND o.organ_id = #{chSrvOrgan.srvOrganId}
</if>
<if test="disableInfo.realName != null and disableInfo.realName != ''">
AND i.real_name = #{disableInfo.realName}
AND i.real_name LIKE CONCAT(CONCAT('%',#{disableInfo.realName}),'%')
</if>
<if test="disableInfo.tel != null and disableInfo.tel != ''">
......
......@@ -120,7 +120,7 @@
and organ.SRV_ORGAN_ID = #{organId}
</if>
<if test="disableName != null and disableName != ''">
and disable.real_name = #{disableName}
and disable.real_name LIKE CONCAT(CONCAT('%',#{disableName}),'%')
</if>
<if test="disableTel != null and disableTel != ''">
and disable.tel = #{disableTel}
......
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