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

Merge remote-tracking branch 'origin/master'

parents 4b742b7a 9f81190c
...@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.dto.QueryDto; import com.hungraim.ltc.dto.QueryDto;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReport; import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason;
import com.hungraim.ltc.pojo.entity.assessment.ChTaskReportFractionDtl;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.ReportUpdateVO; import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
...@@ -155,6 +152,8 @@ public class TaskController { ...@@ -155,6 +152,8 @@ public class TaskController {
String polNo = reportDetailVo.getPolNo(); String polNo = reportDetailVo.getPolNo();
String remark = reportDetailVo.getRemark(); String remark = reportDetailVo.getRemark();
List<ChFndAttach> fileDataList = reportDetailVo.getFileDataList(); List<ChFndAttach> fileDataList = reportDetailVo.getFileDataList();
List<ChAprReportFraction> chTaskReportFractionDtls = reportDetailVo.getChAprReportFractions();
if (person1 == null) { if (person1 == null) {
return Result.failed("鉴定人员1不能为空!"); return Result.failed("鉴定人员1不能为空!");
} }
...@@ -174,7 +173,7 @@ public class TaskController { ...@@ -174,7 +173,7 @@ public class TaskController {
} catch (ParseException e) { } catch (ParseException e) {
return Result.failed("评估时间格式不正确!"); return Result.failed("评估时间格式不正确!");
} }
Result<Object> objectResult = taskService.addReport(taskId, person1, person2, person3, evaluateDate, disableLevelId, polNo, remark, fileDataList); Result<Object> objectResult = taskService.addReport(taskId, person1, person2, person3, evaluateDate, disableLevelId, polNo, remark, fileDataList,chTaskReportFractionDtls);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) { if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
//失败 //失败
return Result.failed(objectResult.getMsg()); return Result.failed(objectResult.getMsg());
...@@ -228,7 +227,7 @@ public class TaskController { ...@@ -228,7 +227,7 @@ public class TaskController {
} catch (ParseException e) { } catch (ParseException e) {
return Result.failed("评估时间格式不正确!"); return Result.failed("评估时间格式不正确!");
} }
taskService.updateReport(vo.getReportId(), vo.getPerson1(), vo.getPerson2(), vo.getPerson3(), evaluateDate, vo.getDisableLevelId(), vo.getPolNo(), vo.getRemark(), vo.getFileDataList()); taskService.updateReport(vo.getReportId(), vo.getPerson1(), vo.getPerson2(), vo.getPerson3(), evaluateDate, vo.getDisableLevelId(), vo.getPolNo(), vo.getRemark(), vo.getFileDataList(),vo.getChAprReportFractions());
return Result.success(); return Result.success();
} }
...@@ -649,9 +648,9 @@ public class TaskController { ...@@ -649,9 +648,9 @@ public class TaskController {
@RequestMapping(value= "/chIpad/taskReportFractionDtlQueryList") @RequestMapping(value= "/chIpad/taskReportFractionDtlQueryList")
@ResponseBody @ResponseBody
public Result taskReportFractionDtlQueryList() throws Exception { public Result taskReportFractionDtlQueryList() throws Exception {
List<ChTaskReportFractionDtl> resultList= taskService.taskReportFractionDtlQueryList(); Map map= taskService.taskReportFractionDtlQueryList();
if (resultList.size() >0) { if (map.size() >0) {
return Result.success(resultList); return Result.success(map);
} }
return Result.failed("没有查到日常生活活动能力数据"); return Result.failed("没有查到日常生活活动能力数据");
} }
......
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReportFraction;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author mq
*/
@Mapper
@Repository
public interface ChAprReportFractionMapper extends BaseMapper<ChAprReportFraction> {
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReportFraction;
import java.util.List;
/**
* @author mq
*/
public interface ChAprReportFractionService extends IService<ChAprReportFraction> {
/**
* 批量修改
* @return
*/
void updateChAprReportFraction(List<ChAprReportFraction> chAprReportFractions);
/**
* 批量新增
* @param chAprReportFractions
*/
void insertChAprReportFraction(List<ChAprReportFraction> chAprReportFractions);
}
...@@ -3,10 +3,7 @@ package com.hungraim.ltc.service; ...@@ -3,10 +3,7 @@ package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReport; import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason;
import com.hungraim.ltc.pojo.entity.assessment.ChTaskReportFractionDtl;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
...@@ -32,9 +29,9 @@ public interface TaskService { ...@@ -32,9 +29,9 @@ public interface TaskService {
List<AprEmpVO> aprEmpList(String provincial, String city, String area, 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, List<ChFndAttach> fileDataList); 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); void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions);
TaskReportVO getReportById(String reportId); TaskReportVO getReportById(String reportId);
...@@ -86,5 +83,5 @@ public interface TaskService { ...@@ -86,5 +83,5 @@ public interface TaskService {
IPage<ChAprTask> apprTaskDetailInfo(String appointStartTime, String appointEndTime, String status, String taskGroupNo, Integer pageNo, Integer pageSize) throws TppesApiException; IPage<ChAprTask> apprTaskDetailInfo(String appointStartTime, String appointEndTime, String status, String taskGroupNo, Integer pageNo, Integer pageSize) throws TppesApiException;
List<ChTaskReportFractionDtl> taskReportFractionDtlQueryList(); Map taskReportFractionDtlQueryList();
} }
package com.hungraim.ltc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.dao.ChAprReportFractionMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReportFraction;
import com.hungraim.ltc.service.ChAprReportFractionService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author mq
*/
@Service
@Slf4j
@AllArgsConstructor
public class ChAprReportFractionServiceImpl extends ServiceImpl<ChAprReportFractionMapper, ChAprReportFraction> implements ChAprReportFractionService {
@Autowired
ChAprReportFractionMapper chAprReportFractionMapper;
@Override
public void updateChAprReportFraction(List<ChAprReportFraction> chAprReportFractions) {
this.updateBatchById(chAprReportFractions);
}
@Override
public void insertChAprReportFraction(List<ChAprReportFraction> chAprReportFractions) {
this.saveBatch(chAprReportFractions,chAprReportFractions.size());
}
}
...@@ -15,6 +15,7 @@ import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; ...@@ -15,6 +15,7 @@ import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo; import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo; import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.service.ChAprReportFractionService;
import com.hungraim.ltc.service.TaskService; import com.hungraim.ltc.service.TaskService;
import com.hungraim.ltc.service.TppesApiException; import com.hungraim.ltc.service.TppesApiException;
import com.hungraim.ltc.util.AttachType; import com.hungraim.ltc.util.AttachType;
...@@ -28,7 +29,10 @@ import org.springframework.beans.BeanUtils; ...@@ -28,7 +29,10 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.awt.*;
import java.util.*; import java.util.*;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* @author czz * @author czz
...@@ -49,6 +53,10 @@ public class TaskServiceImpl implements TaskService { ...@@ -49,6 +53,10 @@ public class TaskServiceImpl implements TaskService {
private final RefuseReasonMapper refuseReasonMapper; private final RefuseReasonMapper refuseReasonMapper;
private final AttachFeignService attachFeignService; private final AttachFeignService attachFeignService;
private final ChAprReportFractionService chAprReportFractionService;
private final ChAprReportFractionMapper chAprReportFractionMapper;
private final ChTaskReportFractionDtlMapper chTaskReportFractionDtlMapper; private final ChTaskReportFractionDtlMapper chTaskReportFractionDtlMapper;
/** /**
...@@ -88,7 +96,34 @@ public class TaskServiceImpl implements TaskService { ...@@ -88,7 +96,34 @@ public class TaskServiceImpl implements TaskService {
*/ */
@Override @Override
public List<TaskReportVO> taskReportList(String name, String certiCode, String tel) { public List<TaskReportVO> taskReportList(String name, String certiCode, String tel) {
return taskMapper.taskReportList(name, certiCode, tel); List<TaskReportVO> taskReportVOS = taskMapper.taskReportList(name, certiCode, tel);
Map<Object, Object> typeMap = new HashMap<>();
Map<Object, Object> taskReportProxyMap = new HashMap<>();
for (int i = 0; i < taskReportVOS.size(); i++) {
String reportId = taskReportVOS.get(i).getReportId();
List<ChAprReportFraction> chAprReportFractions = chAprReportFractionMapper.selectList(new LambdaQueryWrapper<ChAprReportFraction>().eq(ChAprReportFraction::getReportId, reportId));
Map<String, Object> typeHashMap = new HashMap<>();
for (ChAprReportFraction chAprReportFraction: chAprReportFractions) {
String taskReportType = chAprReportFraction.getTaskReportType();
if(!typeHashMap.containsKey(taskReportType)){
List<ChAprReportFraction> typeList = chAprReportFractions.stream().filter(c-> c.getTaskReportType().equals(taskReportType)).collect(Collectors.toList());
Map<String, Object> hashMap = new HashMap<>();
for (ChAprReportFraction chTaskReportFraction:typeList) {
String taskReportProxy = chTaskReportFraction.getTaskReportProxy();
if(!hashMap.containsKey(taskReportProxy)){
List<ChAprReportFraction> collect = typeList.stream().filter(c->c.getTaskReportProxy().equals(taskReportProxy)).collect(Collectors.toList());
hashMap.put(taskReportProxy,collect);
}
}
taskReportVOS.get(i).getChAprReportFractions().put(taskReportType,hashMap);
//typeHashMap.put(taskReportType,hashMap);
}
}
}
return taskReportVOS;
} }
/** /**
...@@ -131,14 +166,14 @@ public class TaskServiceImpl implements TaskService { ...@@ -131,14 +166,14 @@ public class TaskServiceImpl implements TaskService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList) { public 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) {
List<ChAprReport> chAprReports = aprReportMapper.selectList(new LambdaQueryWrapper<ChAprReport>().eq(ChAprReport::getStatus, 4).eq(ChAprReport::getTaskId, taskId)); List<ChAprReport> chAprReports = aprReportMapper.selectList(new LambdaQueryWrapper<ChAprReport>().eq(ChAprReport::getStatus, 4).eq(ChAprReport::getTaskId, taskId));
if (chAprReports != null && chAprReports.size() > 0) { if (chAprReports != null && chAprReports.size() > 0) {
return Result.failed("已存在的评定任务报告!"); return Result.failed("已存在的评定任务报告!");
} }
//插入评定任报告 //插入评定任报告
ChAprReport report = new ChAprReport(); ChAprReport report = new ChAprReport();
report.setTaskId(taskId); //report.setTaskId(taskId);
report.setEffTime(new Date()); report.setEffTime(new Date());
report.setRemark(remark); report.setRemark(remark);
report.setDisableLevelId(disableLevelId); report.setDisableLevelId(disableLevelId);
...@@ -171,6 +206,9 @@ public class TaskServiceImpl implements TaskService { ...@@ -171,6 +206,9 @@ public class TaskServiceImpl implements TaskService {
personInfo.setFcd(new Date()); personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo); personInfoMapper.insert(personInfo);
} }
if(!chAprReportFractions.isEmpty() && chAprReportFractions.size()>0){
chAprReportFractionService.updateChAprReportFraction(chAprReportFractions);
}
// 更新评定任务状态为已完成,并记录完成时间 // 更新评定任务状态为已完成,并记录完成时间
ChAprTask task = new ChAprTask(); ChAprTask task = new ChAprTask();
task.setTaskId(taskId); task.setTaskId(taskId);
...@@ -199,7 +237,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -199,7 +237,7 @@ public class TaskServiceImpl implements TaskService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList) { 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) {
//update鉴定报告 //update鉴定报告
ChAprReport chAprReport = aprReportMapper.selectById(reportId); ChAprReport chAprReport = aprReportMapper.selectById(reportId);
chAprReport.setDisableLevelId(disableLevelId); chAprReport.setDisableLevelId(disableLevelId);
...@@ -250,6 +288,12 @@ public class TaskServiceImpl implements TaskService { ...@@ -250,6 +288,12 @@ public class TaskServiceImpl implements TaskService {
personInfoMapper.insert(personInfo); personInfoMapper.insert(personInfo);
} }
} }
if(!chAprReportFractions.isEmpty() && chAprReportFractions.size()>0){
chAprReportFractionService.updateChAprReportFraction(chAprReportFractions);
}
} }
/** /**
...@@ -637,7 +681,25 @@ public class TaskServiceImpl implements TaskService { ...@@ -637,7 +681,25 @@ public class TaskServiceImpl implements TaskService {
} }
@Override @Override
public List<ChTaskReportFractionDtl> taskReportFractionDtlQueryList() { public Map taskReportFractionDtlQueryList() {
return chTaskReportFractionDtlMapper.selectList(null); List<ChTaskReportFractionDtl> chTaskReportFractionDtls = chTaskReportFractionDtlMapper.selectList(null);
Map<String, Object> typeHashMap = new HashMap<>();
for (ChTaskReportFractionDtl chTaskReportFractionDtl : chTaskReportFractionDtls) {
String taskReportType = chTaskReportFractionDtl.getTaskReportType();
if(!typeHashMap.containsKey(taskReportType)){
List<ChTaskReportFractionDtl> typeList = chTaskReportFractionDtls.stream().filter(c-> c.getTaskReportType().equals(taskReportType)).collect(Collectors.toList());
Map<String, Object> hashMap = new HashMap<>();
for (ChTaskReportFractionDtl chTaskReportFraction:typeList) {
String taskReportProxy = chTaskReportFraction.getTaskReportProxy();
if(!hashMap.containsKey(taskReportProxy)){
List<ChTaskReportFractionDtl> collect = typeList.stream().filter(c->c.getTaskReportProxy().equals(taskReportProxy)).collect(Collectors.toList());
hashMap.put(taskReportProxy,collect);
}
}
typeHashMap.put(taskReportType,hashMap);
}
};
return typeHashMap;
} }
} }
package com.hungraim.ltc.pojo.entity.assessment;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* 评定报告录入评定量表-CH_APR_REPORT_FRACTION
* @author MQ
*/
@Data
@TableName("CH_APR_REPORT_FRACTION")
@KeySequence(value = "SEQ_CH_APR_REPORT_FRACTION")
public class ChAprReportFraction {
/**
* 评定报告录入评定量表ID
*/
@TableId(value = "CH_APR_REPORT_FRACTION_ID", type = IdType.INPUT)
private Integer chAprReportFractionId;
/**
* CH_APR_REPORT.ID
*/
private String reportId;
/**
* 评定报告序号
*/
private String taskReportNum;
/**
* 评定报告指标
*/
private String taskReportProxy;
/**
* 标准
*/
private String taskReportEvaluation;
/**
* c1(日常生活活动能力),c2(认知能力),c3(感知觉与沟通能力)分类
*/
private String taskReportType;
}
...@@ -56,5 +56,10 @@ public class ChTaskReportFractionDtl { ...@@ -56,5 +56,10 @@ public class ChTaskReportFractionDtl {
*/ */
private Integer lcu; private Integer lcu;
/**
* c1(日常生活活动能力),c2(认知能力),c3(感知觉与沟通能力)分类
*/
private String taskReportType;
} }
package com.hungraim.ltc.pojo.vo; package com.hungraim.ltc.pojo.vo;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReportFraction;
import com.hungraim.ltc.pojo.entity.assessment.ChTaskReportFractionDtl;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -21,4 +23,5 @@ public class ReportUpdateVO { ...@@ -21,4 +23,5 @@ public class ReportUpdateVO {
String polNo; String polNo;
String remark; String remark;
List<ChFndAttach> fileDataList; List<ChFndAttach> fileDataList;
List<ChAprReportFraction> chAprReportFractions;
} }
package com.hungraim.ltc.pojo.vo.assessment; package com.hungraim.ltc.pojo.vo.assessment;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReportFraction;
import com.hungraim.ltc.pojo.entity.assessment.ChTaskReportFractionDtl;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -16,4 +18,5 @@ public class ReportDetailVO { ...@@ -16,4 +18,5 @@ public class ReportDetailVO {
String polNo; String polNo;
String remark; String remark;
List<ChFndAttach> fileDataList; List<ChFndAttach> fileDataList;
List<ChAprReportFraction> chAprReportFractions;
} }
package com.hungraim.ltc.pojo.vo.assessment; package com.hungraim.ltc.pojo.vo.assessment;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.entity.assessment.ChAprReportFraction;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 评定报告录入列表 * 评定报告录入列表
...@@ -63,6 +66,9 @@ public class TaskReportVO { ...@@ -63,6 +66,9 @@ public class TaskReportVO {
private String acptSrvArea; private String acptSrvArea;
//评定结果 //评定结果
private String riskLevel; private String riskLevel;
private Map<String,Object> chAprReportFractions;
//录入时间 //录入时间
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date effTime; private Date effTime;
......
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