Commit 536b3944 authored by zhangwanglin's avatar zhangwanglin

评定结算

parent afc08e18
...@@ -2,12 +2,21 @@ package com.hungraim.ltc.dao; ...@@ -2,12 +2,21 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper @Mapper
@Repository @Repository
public interface ChAssessAccountsDetailMapper extends BaseMapper<ChAssessDetailAccounts> { public interface ChAssessAccountsDetailMapper extends BaseMapper<ChAssessDetailAccounts> {
List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
List<AssessAccountsExportResp> assessAccountDetailExport(String assessAccountsId);
ChAssessDetailAccounts selectAssessDetailInfo(Integer applyId,Integer empId,Integer evaluateType);
} }
\ No newline at end of file
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author mq
*/
@Mapper
@Repository
public interface ChAssessDetailAccountsMapper extends BaseMapper<ChAssessDetailAccounts> {
List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
List<AssessAccountsExportResp> assessAccountDetailExport(String assessAccountsId);
}
...@@ -67,11 +67,10 @@ public class TaskServiceImpl implements TaskService { ...@@ -67,11 +67,10 @@ public class TaskServiceImpl implements TaskService {
private final ChTaskReportFractionDtlMapper chTaskReportFractionDtlMapper; private final ChTaskReportFractionDtlMapper chTaskReportFractionDtlMapper;
private final ChAssessAccountsDetailMapper chAssessAccountsDetailMapper;
private final ChAssessAccountsMapper chAssessAccountsMapper; private final ChAssessAccountsMapper chAssessAccountsMapper;
private final ChAssessDetailAccountsMapper chAssessDetailAccountsMapper; private final ChAssessAccountsDetailMapper chAssessDetailAccountsMapper;
...@@ -242,47 +241,60 @@ public class TaskServiceImpl implements TaskService { ...@@ -242,47 +241,60 @@ public class TaskServiceImpl implements TaskService {
// 根据评定机构id和评估结算时间查找表里有没有数据,有数据直接累加费用 // 根据评定机构id和评估结算时间查找表里有没有数据,有数据直接累加费用
// 评定人员结算表插入 // 评定人员结算表插入
if (person1 != null) { if (person1 != null) {
ChAssessDetailAccounts chAssessDetailAccounts = new ChAssessDetailAccounts(); ChAssessDetailAccounts chAssessDetailAccounts = chAssessDetailAccountsMapper.selectAssessDetailInfo(chDisableInfo.getApplyId(), person1, reportDetailVo.getEvaluateType());
chAssessDetailAccounts.setEmpId(String.valueOf(person1)); if(Objects.isNull(chAssessDetailAccounts)){
ChAprEmp chAprEmp = aprEmpMapper.selectById(person1); chAssessDetailAccounts = new ChAssessDetailAccounts();
chAssessDetailAccounts.setEmpId(String.valueOf(person1));
Integer aprOrganId = chAprEmp.getAprOrganId(); ChAprEmp chAprEmp = aprEmpMapper.selectById(person1);
chAssessDetailAccounts.setAprOrganId(String.valueOf(aprOrganId));
chAssessDetailAccounts.setApplyId(String.valueOf(chDisableInfo.getApplyId())); Integer aprOrganId = chAprEmp.getAprOrganId();
chAssessDetailAccounts.setCreationTime(new Date()); chAssessDetailAccounts.setAprOrganId(String.valueOf(aprOrganId));
chAssessDetailAccounts.setAccountsTime(evaluateDate); chAssessDetailAccounts.setApplyId(String.valueOf(chDisableInfo.getApplyId()));
chAssessDetailAccounts.setAssessTime(evaluateDate); chAssessDetailAccounts.setCreationTime(new Date());
Integer aprempTypeIdS = chAprEmp.getAprempTypeIdS(); chAssessDetailAccounts.setAccountsTime(evaluateDate);
// 1 评估员上门评估,每人次 100 元 chAssessDetailAccounts.setAssessTime(evaluateDate);
// 5 评估专家上门评估,每人次 150 元 chAssessDetailAccounts.setEvaluateType(reportDetailVo.getEvaluateType());
String assessCost = aprempTypeIdS==1? "100":"150"; Integer aprempTypeIdS = chAprEmp.getAprempTypeIdS();
chAssessDetailAccounts.setAssessCost(assessCost); // 1 评估员上门评估,每人次 100 元
Long assessAccountsId = saveAssess(aprOrganId, assessCost,srvModeId,evaluateDate); // 5 评估专家上门评估,每人次 150 元
if(assessAccountsId != null){ String assessCost = aprempTypeIdS==1? "100":"150";
chAssessDetailAccounts.setAssessAccountsId(assessAccountsId); chAssessDetailAccounts.setAssessCost(assessCost);
chAssessAccountsDetailMapper.insert(chAssessDetailAccounts); Long assessAccountsId = saveAssess(aprOrganId, assessCost,srvModeId,evaluateDate);
if(assessAccountsId != null){
chAssessDetailAccounts.setAssessAccountsId(assessAccountsId);
chAssessDetailAccountsMapper.insert(chAssessDetailAccounts);
}
}else {
log.info("{},该失能人员已进行评估结算,护理人员:{}",chDisableInfo.getApplyId(),person1);
} }
} }
if (person2 != null) { if (person2 != null) {
ChAssessDetailAccounts chAssessDetailAccounts = new ChAssessDetailAccounts(); ChAssessDetailAccounts chAssessDetailAccounts = chAssessDetailAccountsMapper.selectAssessDetailInfo(chDisableInfo.getApplyId(), person2, reportDetailVo.getEvaluateType());
chAssessDetailAccounts.setEmpId(String.valueOf(person2)); if (Objects.isNull(chAssessDetailAccounts)) {
ChAprEmp chAprEmp = aprEmpMapper.selectById(person2); chAssessDetailAccounts = new ChAssessDetailAccounts();
Integer aprOrganId = chAprEmp.getAprOrganId(); chAssessDetailAccounts.setEmpId(String.valueOf(person2));
chAssessDetailAccounts.setAprOrganId(String.valueOf(aprOrganId)); ChAprEmp chAprEmp = aprEmpMapper.selectById(person2);
chAssessDetailAccounts.setApplyId(String.valueOf(chDisableInfo.getApplyId())); Integer aprOrganId = chAprEmp.getAprOrganId();
chAssessDetailAccounts.setCreationTime(new Date()); chAssessDetailAccounts.setAprOrganId(String.valueOf(aprOrganId));
chAssessDetailAccounts.setAccountsTime(evaluateDate); chAssessDetailAccounts.setApplyId(String.valueOf(chDisableInfo.getApplyId()));
chAssessDetailAccounts.setAssessTime(evaluateDate); chAssessDetailAccounts.setCreationTime(new Date());
Integer aprempTypeIdS = chAprEmp.getAprempTypeIdS(); chAssessDetailAccounts.setAccountsTime(evaluateDate);
// 1 评估员上门评估,每人次 100 元 chAssessDetailAccounts.setAssessTime(evaluateDate);
// 5 评估专家上门评估,每人次 150 元 chAssessDetailAccounts.setEvaluateType(reportDetailVo.getEvaluateType());
String assessCost = aprempTypeIdS==1? "100":"150"; Integer aprempTypeIdS = chAprEmp.getAprempTypeIdS();
chAssessDetailAccounts.setAssessCost(assessCost); // 1 评估员上门评估,每人次 100 元
Long assessAccountsId = saveAssess(aprOrganId, assessCost,srvModeId,evaluateDate); // 5 评估专家上门评估,每人次 150 元
if(assessAccountsId != null) { String assessCost = aprempTypeIdS == 1 ? "100" : "150";
chAssessDetailAccounts.setAssessAccountsId(assessAccountsId); chAssessDetailAccounts.setAssessCost(assessCost);
chAssessAccountsDetailMapper.insert(chAssessDetailAccounts); Long assessAccountsId = saveAssess(aprOrganId, assessCost, srvModeId, evaluateDate);
if (assessAccountsId != null) {
chAssessDetailAccounts.setAssessAccountsId(assessAccountsId);
chAssessDetailAccountsMapper.insert(chAssessDetailAccounts);
}
}else {
log.info("{},该失能人员已进行评估结算,护理人员:{}",chDisableInfo.getApplyId(),person2);
} }
} }
...@@ -440,6 +452,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -440,6 +452,7 @@ public class TaskServiceImpl implements TaskService {
reportDetailVO.setPerson2(vo.getPerson2()); reportDetailVO.setPerson2(vo.getPerson2());
reportDetailVO.setDisableLevelId(vo.getDisableLevelId()); reportDetailVO.setDisableLevelId(vo.getDisableLevelId());
reportDetailVO.setEvaluateTime(vo.getEvaluateTime()); reportDetailVO.setEvaluateTime(vo.getEvaluateTime());
reportDetailVO.setEvaluateType(vo.getEvaluateType());
assessAccount(reportDetailVO); assessAccount(reportDetailVO);
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.ChAssessDetailAccountsMapper"> <mapper namespace="com.hungraim.ltc.dao.ChAssessAccountsDetailMapper">
<select id="queryAssessAccountsDetail" <select id="queryAssessAccountsDetail"
...@@ -38,5 +38,10 @@ FROM ...@@ -38,5 +38,10 @@ FROM
left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId} where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select> </select>
<select id="selectAssessDetailInfo" resultType="com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts">
select * from CH_ASSESS_ACCOUNTS_DETAIL d where d.APPLY_ID =#{applyId} and d.EMP_ID = #{empId}
and d.EVALUATE_TYPE = #{evaluateType}
</select>
</mapper> </mapper>
...@@ -54,6 +54,8 @@ public class ChAssessDetailAccounts implements Serializable { ...@@ -54,6 +54,8 @@ public class ChAssessDetailAccounts implements Serializable {
private String assessCost; private String assessCost;
private Integer evaluateType;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ 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