Commit d917c161 authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/dev_20230306_评定报告录入及评定分配_zxl' into dev_ch_master

# Conflicts: # assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
parents 883a6348 3d12c283
......@@ -166,18 +166,17 @@ public class DisableServiceImpl implements DisableService {
//医保统筹区
ChDisableApply chDisableApply = disableApplyMapper.selectById(chDisableInfo.getApplyId());
disableUpdateDetailVo.setMedicalArea(chDisableApply.getMedicalArea());
// try {
// // TODO 需要确认信息表的附件类型
// Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(disabInfoId), AttachType.DISABLE.getUploadType());
// if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) {
// disableUpdateDetailVo.setFileDataList(listResult.getData());
// } else {
// log.info("请求获取附件列表错误:错误码{},错误信息:{}", listResult.getCode(), listResult.getMsg());
// }
// } catch (Exception e) {
// log.error(e.getMessage());
// e.printStackTrace();
// }
try {
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(chDisableInfo.getApplyId()), AttachType.DISABLE.getUploadType());
if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) {
disableUpdateDetailVo.setFileDataList(listResult.getData());
} else {
log.info("请求获取附件列表错误:错误码{},错误信息:{}", listResult.getCode(), listResult.getMsg());
}
} catch (Exception e) {
log.error(e.getMessage());
e.printStackTrace();
}
return disableUpdateDetailVo;
}
return null;
......
......@@ -68,9 +68,9 @@ public class TaskController {
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 taskStatus, String isReturn, String area) {
String daysRemaining, String taskStatus, String isReturn, String area,int type) {
Page<TaskDistributionVO> page = new Page<>(pageNum, pageSize);
page = taskService.taskDistributionList(page, organId, provincial, city, street, realName, certiCode, taskName, taskTel, daysRemaining, taskStatus, isReturn, area);
page = taskService.taskDistributionList(page, organId, provincial, city, street, realName, certiCode, taskName, taskTel, daysRemaining, taskStatus, isReturn, area,type);
return Result.success(page);
}
......@@ -216,16 +216,6 @@ public class TaskController {
/**
* 评定报告修改
*
* @param reportId 评定报告id
* @param person1 鉴定人员1id
* @param person2 鉴定人员2id
* @param person3 鉴定人员3id
* @param evaluateTime 评估时间 格式:2020-11-12
* @param disableLevelId 失能等级id
* @param polNo 保单号
* @param remark 备注
* @param remark 备注
* @param fileDataList 附件
*/
@RequestMapping("/updateReport")
public Result updateReport(ReportUpdateVO vo) {
......@@ -238,14 +228,8 @@ public class TaskController {
if (vo.getRemark() == null) {
vo.setRemark("");
}
Date evaluateDate;
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
evaluateDate = sdf.parse(vo.getEvaluateTime());
} catch (ParseException e) {
return Result.failed("评估时间格式不正确!");
}
taskService.updateReport(vo.getReportId(), vo.getPerson1(), vo.getPerson2(), vo.getPerson3(), evaluateDate, vo.getDisableLevelId(), vo.getPolNo(), vo.getRemark(), vo.getFileDataList(),vo.getChAprReportFractions());
taskService.updateReport(vo);
return Result.success();
}
......
......@@ -32,12 +32,12 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
* @param taskName 评定人员姓名
* @param taskTel 评定人员手机号码
* @param daysRemaining 评定剩余天数
* @param status 任务状态
* @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);
String daysRemaining, String taskStatus, String isReturn, String area,int type);
/**
* 评定报告录入列表
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.vo.ReportUpdateVO;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.assessment.*;
import com.hungraim.ltc.util.Result;
......@@ -25,7 +26,7 @@ public interface TaskService {
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 taskStatus, String isReturn, String area);
String daysRemaining, String taskStatus, String isReturn, String area,int type);
Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel);
......@@ -33,7 +34,7 @@ public interface TaskService {
Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions);
void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions);
void updateReport(ReportUpdateVO vo);
TaskReportVO getReportById(String reportId);
......
......@@ -16,6 +16,7 @@ import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.assessment.*;
......@@ -33,6 +34,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
......@@ -82,19 +85,19 @@ public class TaskServiceImpl implements TaskService {
* @param taskName 评定人员姓名
* @param taskTel 评定人员手机号码
* @param daysRemaining 评定剩余天数
* @param status 任务状态
* @param taskStatus 任务状态
* @param isReturn 是否退回
*/
@Override
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 taskStatus, String isReturn, String area) {
String daysRemaining, String taskStatus, String isReturn, String area,int type) {
List<String> organIds = null;
if (StrUtil.isNotBlank(organId)) {
organIds = Arrays.asList(organId.split(","));
}
return taskMapper.taskDistributionList(page, organIds, provincial, city,
street, realName, certiCode, taskName, taskTel, daysRemaining, taskStatus, isReturn, area);
street, realName, certiCode, taskName, taskTel, daysRemaining, taskStatus, isReturn, area,type);
}
/**
......@@ -316,72 +319,70 @@ public class TaskServiceImpl implements TaskService {
}
/**
* 评定报告修改
*
* @param reportId 评定报告id
* @param person1 鉴定人员1id
* @param person2 鉴定人员2id
* @param person3 鉴定人员3id
* @param evaluateDate 评估时间
* @param disableLevelId 失能等级id
* @param polNo 保单号
* @param remark 备注
* @param fileDataList 附件
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions) {
public void updateReport(ReportUpdateVO vo) {
Date evaluateDate = null;
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
evaluateDate = sdf.parse(vo.getEvaluateTime());
} catch (ParseException e) {
e.printStackTrace();
}
//update鉴定报告
ChAprReport chAprReport = aprReportMapper.selectById(reportId);
chAprReport.setDisableLevelId(disableLevelId);
chAprReport.setPolNo(polNo);
chAprReport.setRemark(remark);
ChAprReport chAprReport = aprReportMapper.selectById(vo.getReportId());
chAprReport.setDisableLevelId(vo.getDisableLevelId());
chAprReport.setPolNo(vo.getPolNo());
chAprReport.setRemark(vo.getRemark());
chAprReport.setEvaluateTime(evaluateDate);
chAprReport.setEvaluateType(vo.getEvaluateType());
aprReportMapper.updateById(chAprReport);
//附件上传
this.updateAttachs(fileDataList, chAprReport.getReportId().longValue());
this.updateAttachs(vo.getFileDataList(), chAprReport.getReportId().longValue());
//修改鉴定报告人员(有就update,没有就insert)
List<ChAprPersonInfo> personInfos = personInfoMapper.selectList(new QueryWrapper<ChAprPersonInfo>().eq("report_id", reportId).orderByDesc("info_id"));
if (person1 != null) {
List<ChAprPersonInfo> personInfos = personInfoMapper.selectList(new QueryWrapper<ChAprPersonInfo>().eq("report_id", vo.getReportId()).orderByDesc("info_id"));
if (vo.getPerson1() != null) {
if (personInfos.size() >= 1) {
ChAprPersonInfo personInfo = personInfos.get(0);
personInfo.setEmpId(person1);
personInfo.setEmpId(vo.getPerson1());
personInfoMapper.updateById(personInfo);
} else {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(chAprReport.getReportId());
personInfo.setEmpId(person1);
personInfo.setEmpId(vo.getPerson1());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
}
if (person2 != null) {
if (vo.getPerson2() != null) {
if (personInfos.size() >= 2) {
ChAprPersonInfo personInfo = personInfos.get(1);
personInfo.setEmpId(person2);
personInfo.setEmpId(vo.getPerson2());
personInfoMapper.updateById(personInfo);
} else {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(chAprReport.getReportId());
personInfo.setEmpId(person2);
personInfo.setEmpId(vo.getPerson2());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
}
if (person3 != null) {
if (vo.getPerson3() != null) {
if (personInfos.size() >= 3) {
ChAprPersonInfo personInfo = personInfos.get(2);
personInfo.setEmpId(person3);
personInfo.setEmpId(vo.getPerson3());
personInfoMapper.updateById(personInfo);
} else {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(chAprReport.getReportId());
personInfo.setEmpId(person3);
personInfo.setEmpId(vo.getPerson3());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
}
if(!chAprReportFractions.isEmpty() && chAprReportFractions.size()>0){
for (ChAprReportFraction chAprReportFraction: chAprReportFractions) {
if(!vo.getChAprReportFractions().isEmpty() && vo.getChAprReportFractions().size()>0){
for (ChAprReportFraction chAprReportFraction: vo.getChAprReportFractions()) {
chAprReportFraction.setReportId(chAprReport.getReportId());
if(chAprReportFraction.getChAprReportFractionId()==null){
chAprReportFractionMapper.insert(chAprReportFraction);
......
......@@ -61,6 +61,7 @@
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
<where>
and task.APR_TYPE = 0
<if test="organIds != null">
and task.ORGAN_ID in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
......@@ -103,6 +104,9 @@
<if test="isReturn != null and isReturn !='' and isReturn == 1">
and cate.is_valid = 0 or cate.is_valid is null
</if>
<if test ="type == 1">
and disable.LAST_TASK_ID is not null
</if>
</where>
</select>
......@@ -191,7 +195,8 @@
report.PUBLICITY_START_TIME publicityStartTime,
report.PUBLICITY_END_TIME publicityEndTime,
report.PUBLICITY_TIME publicityTime,
report.EFF_TIME effTime
report.EFF_TIME effTime,
report.evaluate_type
FROM ch_apr_report report
LEFT JOIN CH_APR_TASK task ON report.TASK_ID = task.TASK_ID
LEFT JOIN CH_DISABLE_INFO info ON task.disable_info_id = info.disab_info_id
......
......@@ -22,6 +22,7 @@ public class ReportUpdateVO {
Integer disableLevelId;
String polNo;
String remark;
Integer evaluateType;
List<ChFndAttach> fileDataList;
List<ChAprReportFraction> chAprReportFractions;
}
......@@ -95,4 +95,8 @@ public class TaskDistributionVO {
private String diseaseDesc;
//现住地址详细地址
private String operAddress;
//20230306业务类型 1-报告录入检索调用
private int type;
}
......@@ -72,6 +72,8 @@ public class TaskReportVO {
private String riskLevel;
//评估类型
private Integer evaluateType;
//评估类型名称
private String evaluateTypeName;
//公示开始时间
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
......
......@@ -28,5 +28,7 @@ public class DisableInfoTaskVO implements Serializable {
private String permitId;
private String tel;
private Integer taskStatus;
private String disableLevelName;
private Integer srvOrganId;
}
......@@ -44,12 +44,13 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
" s.certi_code," +
" s.DISE_TYPE_S," +
" i.finish_time," +
" i.re_apr_time" +
" i.re_apr_time,l.disable_level_name,a.srv_organ_id " +
" from ch_disable_info s" +
" left join ch_apr_task i" +
" on s.last_task_id = i.task_id" +
" left join ch_apr_report o" +
" on i.task_id = o.task_id " +
" on i.task_id = o.task_id left join CH_CFG_SRV_DISABLE_LEVEL l on l.disable_level_id = o.disable_level_id " +
" left join ch_disable_apply a on a.apply_id = s.apply_id " +
" where s.disab_info_id=#{disableInfoId}")
DisableInfoTaskVO selectBydisableInfoId(Integer disableInfoId);
......
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