Commit db176c08 authored by zhangwanglin's avatar zhangwanglin

评定报告

parent 50a7453c
......@@ -13,4 +13,5 @@ import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
}
......@@ -3,6 +3,7 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.vo.assessment.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -78,4 +79,6 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
List<AprEmpExportVO> aprEmpExportList(String provincial, String city, String area, String organName, String name, String tel, String certiCode,String isLock,String empType, String groupLeader);
int insertSrvSend(Integer disableInfoId);
Integer selectDisableBycertiCode(@Param("certiCode") String certiCode);
}
......@@ -236,8 +236,8 @@ public class TaskServiceImpl implements TaskService {
Integer person2 = reportDetailVo.getPerson2();
String evaluateTime = reportDetailVo.getEvaluateTime();
Date evaluateDate = DateUtils.strToDate(evaluateTime);
List<ChDisableInfo> chDisableInfos = disableInfoMapper.selectList(new LambdaQueryWrapper<ChDisableInfo>().eq(ChDisableInfo::getApplyId, reportDetailVo.getApplyId()));
Integer srvModeId = chDisableInfos.get(0).getSrvModeId();
String certiCode = reportDetailVo.getCertiCode();
Integer srvModeId = taskMapper.selectDisableBycertiCode(certiCode);
// 根据评定机构id和评估结算时间查找表里有没有数据,有数据直接累加费用
// 评定人员结算表插入
if (person1 != null) {
......@@ -356,6 +356,19 @@ public class TaskServiceImpl implements TaskService {
chAprReport.setEvaluateTime(evaluateDate);
chAprReport.setEvaluateType(vo.getEvaluateType());
aprReportMapper.updateById(chAprReport);
// 2023-3-20 新增
// 更新评定任务状态为已完成,并记录完成时间
ChAprTask task = new ChAprTask();
task.setTaskId(chAprReport.getTaskId());
task.setFinishTime(new Date());
task.setTaskStatus(3); // 已完成
taskMapper.updateById(task);
if(2 == vo.getEvaluateType()){
ChAprTask chAprTask = taskMapper.selectById(chAprReport.getTaskId());
Integer disableInfoId = chAprTask.getDisableInfoId();
taskMapper.insertSrvSend(disableInfoId);
}
//附件上传
this.updateAttachs(vo.getFileDataList(), chAprReport.getReportId().longValue());
//修改鉴定报告人员(有就update,没有就insert)
......@@ -410,7 +423,14 @@ public class TaskServiceImpl implements TaskService {
}
}
// 评估结算
ReportDetailVO reportDetailVO = new ReportDetailVO();
reportDetailVO.setCertiCode(vo.getCertiCode());
reportDetailVO.setPerson1(vo.getPerson1());
reportDetailVO.setPerson2(vo.getPerson2());
reportDetailVO.setDisableLevelId(vo.getDisableLevelId());
reportDetailVO.setEvaluateTime(vo.getEvaluateTime());
assessAccount(reportDetailVO);
}
/**
......@@ -460,6 +480,23 @@ public class TaskServiceImpl implements TaskService {
disableInfoMapper.updateById(chDisableInfo);
}
//插入评定任报告 2023-03-20
ChAprReport report = new ChAprReport();
report.setTaskId(task.getTaskId());
report.setEffTime(new Date());
report.setFcd(new Date());
report.setStatus(0);
aprReportMapper.insert(report);
ChAprPersonInfo person1Info = new ChAprPersonInfo();
person1Info.setReportId(report.getReportId());
if(StringUtils.isNotEmpty(empId)) {
person1Info.setEmpId(Integer.parseInt(empId));
}
person1Info.setFcd(new Date());
personInfoMapper.insert(person1Info);
//生成组
ChAprTaskPush taskPush = new ChAprTaskPush();
taskPush.setAssignTime(new Date());
......
......@@ -542,4 +542,7 @@
</insert>
<select id="selectDisableBycertiCode" parameterType="java.lang.String" resultType="java.lang.Integer">
select info.SRV_MODE_ID srvModeId from CH_DISABLE_INFO info where info.CERTI_CODE = #{certiCode} and rownum = 1 order by info.FCD desc
</select>
</mapper>
\ No newline at end of file
......@@ -22,6 +22,8 @@ public class ReportUpdateVO {
Integer disableLevelId;
String polNo;
String remark;
String certiCode;
String applyId;
Integer evaluateType;
List<ChFndAttach> fileDataList;
List<ChAprReportFraction> chAprReportFractions;
......
......@@ -20,6 +20,7 @@ public class ReportDetailVO {
*/
String operAddress;
String applyId;
String certiCode;
String polNo;
String remark;
Integer evaluateType;
......
......@@ -224,7 +224,7 @@
where <![CDATA[ t.SRV_DATE < sysdate and
(info.EXIT_TIME > sysdate or info.EXIT_TIME is null)
and sysdate < program.PROGRAM_EDN_DATE
and sysdate > report.PUBLICITY_END_TIME and program.PROG_STATUS <>'2' ]]>
and sysdate > report.PUBLICITY_END_TIME and program.PROG_STATUS <>'2' and t.STATUS <>'2' ]]>
</select>
</mapper>
\ No newline at end of file
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