Commit 7c998a2a authored by 董天德's avatar 董天德

缺陷修改

parent 1cb178e0
......@@ -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;
......
......@@ -235,14 +235,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();
}
......
......@@ -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;
......@@ -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;
......@@ -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);
......
......@@ -190,7 +190,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;
}
......@@ -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 Integer disableLevelName;
private Integer srvOrganId;
}
......@@ -39,17 +39,18 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
" s.medical_card," +
" s.srv_mode_id," +
" o.evaluate_rating," +
" s.srv_organ_intent," +
" a.srv_organ_id," +
" s.gender," +
" s.certi_code," +
" s.DISE_TYPE_S," +
" i.finish_time," +
" i.re_apr_time" +
" i.re_apr_time,l.disable_level_name" +
" 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