|
@@ -0,0 +1,449 @@
|
|
|
|
+package com.lantone.report.facade;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.lantone.common.dto.report.CaseScoreDTO;
|
|
|
|
+import com.lantone.common.dto.report.QualityControlDTO;
|
|
|
|
+import com.lantone.common.dto.report.QualityControlNullDTO;
|
|
|
|
+import com.lantone.common.exception.ApiException;
|
|
|
|
+import com.lantone.common.util.BeanUtil;
|
|
|
|
+import com.lantone.common.util.BigDecimalUtil;
|
|
|
|
+import com.lantone.common.util.DateUtil;
|
|
|
|
+import com.lantone.common.util.ExcelUtils;
|
|
|
|
+import com.lantone.common.util.ListUtil;
|
|
|
|
+import com.lantone.common.util.SysUserUtils;
|
|
|
|
+import com.lantone.common.vo.report.AlgorithmVO;
|
|
|
|
+import com.lantone.common.vo.report.BehospitalPageVO;
|
|
|
|
+import com.lantone.common.vo.report.CaseScoreVO;
|
|
|
|
+import com.lantone.common.vo.report.QcResultAlgVO;
|
|
|
|
+import com.lantone.dblayermbg.facade.report.BehospitalInfoFacade;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
+
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.text.DecimalFormat;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@Component
|
|
|
|
+public class MedicalControlManagementFacade {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BehospitalInfoFacade behospitalInfoFacade;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 病历质控报表
|
|
|
|
+ *
|
|
|
|
+ * @param behospitalPageVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public IPage<QualityControlDTO> getQualityControl(BehospitalPageVO behospitalPageVO) {
|
|
|
|
+ behospitalPageSet(behospitalPageVO);
|
|
|
|
+ IPage<QualityControlDTO> records = behospitalInfoFacade.getBaseMapper().getQualityControl(behospitalPageVO);
|
|
|
|
+ List<QualityControlDTO> qualityControlDTOs = records.getRecords();
|
|
|
|
+ CaseScoreVO caseScoreVO = new CaseScoreVO();
|
|
|
|
+ BeanUtil.copyProperties(behospitalPageVO, caseScoreVO);
|
|
|
|
+ List<CaseScoreDTO> caseScoreDTOS = behospitalInfoFacade.getBaseMapper().getQualityCaseSorce(caseScoreVO);
|
|
|
|
+ if (ListUtil.isNotEmpty(qualityControlDTOs)) {
|
|
|
|
+ qualityControlDTOs.forEach(qualityControlDTO -> {
|
|
|
|
+ if (ListUtil.isNotEmpty(caseScoreDTOS)) {
|
|
|
|
+ AlgorithmVO algorithmVO = new AlgorithmVO();
|
|
|
|
+ BeanUtil.copyProperties(behospitalPageVO, algorithmVO);
|
|
|
|
+ algorithmVO.setType(0);
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<QcResultAlgVO>();
|
|
|
|
+ for (CaseScoreDTO caseScoreDTO : caseScoreDTOS) {
|
|
|
|
+ if (StringUtils.isNotEmpty(qualityControlDTO.getBehospitalCode()) &&
|
|
|
|
+ StringUtils.isNotEmpty(caseScoreDTO.getBehospitalCode()) &&
|
|
|
|
+ qualityControlDTO.getBehospitalCode().equals(caseScoreDTO.getBehospitalCode())) {
|
|
|
|
+ QcResultAlgVO qcResultAlgVO = new QcResultAlgVO();
|
|
|
|
+ BeanUtil.copyProperties(caseScoreDTO, qcResultAlgVO);
|
|
|
|
+ qcResultAlgVO.setIsReject(Integer.valueOf(caseScoreDTO.getIsReject()));
|
|
|
|
+ qcResultAlgVO.setScore(new BigDecimal(caseScoreDTO.getScore()));
|
|
|
|
+ qcResultAlgVO.setCasesScore(new BigDecimal(caseScoreDTO.getCasesScore()));
|
|
|
|
+ qcResultAlgVOList.add(qcResultAlgVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ algorithmVO.setType(0);
|
|
|
|
+ algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
|
+ getScoreForCx(algorithmVO, qualityControlDTO);
|
|
|
|
+ }
|
|
|
|
+ if (qualityControlDTO.getLevel().equals("未评分")) {
|
|
|
|
+ QualityControlNullDTO qualityControlNullDTO = new QualityControlNullDTO();
|
|
|
|
+ BeanUtil.copyProperties(qualityControlNullDTO, qualityControlDTO);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ ;
|
|
|
|
+ return records;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 病历质控报表导出
|
|
|
|
+ *
|
|
|
|
+ * @param behospitalPageVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public void qualityControlExport(HttpServletResponse response, BehospitalPageVO behospitalPageVO) {
|
|
|
|
+ behospitalPageVO.setHospitalId(SysUserUtils.getCurrentHospitalId());
|
|
|
|
+ Date startDate = behospitalPageVO.getLeaveHosDateStart();
|
|
|
|
+ Date endDate = behospitalPageVO.getLeaveHosDateEnd();
|
|
|
|
+ //时间间隔30天
|
|
|
|
+ long interval = 30 * 24l * 60l * 60l * 1000l;
|
|
|
|
+ if (endDate.getTime() < startDate.getTime()) {
|
|
|
|
+ throw new ApiException("截止时间不能小于起始时间");
|
|
|
|
+ }
|
|
|
|
+ if (endDate.getTime() - startDate.getTime() > interval) {
|
|
|
|
+ throw new ApiException("统计区间不能大于30天");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ behospitalPageVO.setCurrent(1L);
|
|
|
|
+ behospitalPageVO.setSize(Long.MAX_VALUE);
|
|
|
|
+ behospitalPageVO.setSearchCount(false);
|
|
|
|
+ IPage<QualityControlDTO> page = this.getQualityControl(behospitalPageVO);
|
|
|
|
+ List<QualityControlDTO> records = page.getRecords();
|
|
|
|
+
|
|
|
|
+ String fileName = "病历质控报表详情页.xls";
|
|
|
|
+ ExcelUtils.exportExcel(records, "病历质控报表", "sheet1", QualityControlDTO.class, fileName, response, 26.8f);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private void behospitalPageSet(BehospitalPageVO behospitalPageVO) {
|
|
|
|
+ //入参验证
|
|
|
|
+ //入院时间
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
|
|
|
|
+ behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
|
|
|
|
+ behospitalPageVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getBehosDateEnd(), 1)));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
|
|
|
|
+ if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
|
|
|
|
+ throw new ApiException("入院时间的开始时间必须小于结束时间!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //出院时间
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
|
|
|
|
+ behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
|
|
|
|
+ behospitalPageVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getLeaveHosDateEnd(), 1)));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
|
|
|
|
+ if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
|
|
|
|
+ throw new ApiException("出院时间的开始时间必须小于结束时间!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ behospitalPageVO.setHospitalId(SysUserUtils.getCurrentHospitalId());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 评结果分数(长兴)
|
|
|
|
+ *
|
|
|
|
+ * @param algorithmVO 操作条目的所有信息
|
|
|
|
+ * @return 评结果分数
|
|
|
|
+ */
|
|
|
|
+ private void getScoreForCx(AlgorithmVO algorithmVO, QualityControlDTO qualityControlDTO) {
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgHomePage = new ArrayList<>();
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgHomePageExt = new ArrayList<>();
|
|
|
|
+ for (QcResultAlgVO qcResultAlgVO : algorithmVO.getQcResultAlgVOList()) {
|
|
|
|
+ //首页的情况
|
|
|
|
+ if (qcResultAlgVO.getCasesId().equals(243L)) {
|
|
|
|
+ qcResultAlgHomePage.add(qcResultAlgVO);
|
|
|
|
+ } else {
|
|
|
|
+ //非首页
|
|
|
|
+ qcResultAlgHomePageExt.add(qcResultAlgVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //病案首页
|
|
|
|
+ AlgorithmVO homePage = new AlgorithmVO();
|
|
|
|
+ BeanUtil.copyProperties(algorithmVO, homePage);
|
|
|
|
+ homePage.setQcResultAlgVOList(qcResultAlgHomePage);
|
|
|
|
+ homePage.setIsHomePage(true);
|
|
|
|
+ cal(homePage, qualityControlDTO);
|
|
|
|
+
|
|
|
|
+ //病案首页以外
|
|
|
|
+ AlgorithmVO homePageExt = new AlgorithmVO();
|
|
|
|
+ BeanUtil.copyProperties(algorithmVO, homePageExt);
|
|
|
|
+ homePageExt.setQcResultAlgVOList(qcResultAlgHomePageExt);
|
|
|
|
+ cal(homePageExt, qualityControlDTO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 计算分数
|
|
|
|
+ *
|
|
|
|
+ * @param algorithmVO 操作条目的所有信息
|
|
|
|
+ * @return 评分分数
|
|
|
|
+ */
|
|
|
|
+ private void cal(AlgorithmVO algorithmVO, QualityControlDTO qualityControlDTO) {
|
|
|
|
+
|
|
|
|
+ //模块总分
|
|
|
|
+ Map<Long, BigDecimal> casesMap = new HashMap<>();
|
|
|
|
+ //单票否决计分
|
|
|
|
+ Map<Long, BigDecimal> rejectScoreMap = new HashMap<>();
|
|
|
|
+ //模块计分
|
|
|
|
+ Map<Long, BigDecimal> casesScoreMap = new HashMap<>();
|
|
|
|
+ //模块缺陷统计
|
|
|
|
+ Map<Long, String> casesNameMap = new HashMap<>();
|
|
|
|
+ //扣分统计
|
|
|
|
+ Map<Long, BigDecimal> scoreMap = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgVOList = algorithmVO.getQcResultAlgVOList();
|
|
|
|
+ if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
|
|
|
|
+ for (QcResultAlgVO qcResultAlgVO : qcResultAlgVOList) {
|
|
|
|
+ if (!casesMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ //模块总分
|
|
|
|
+ casesMap.put(qcResultAlgVO.getCasesId(), qcResultAlgVO.getCasesScore());
|
|
|
|
+ }
|
|
|
|
+ if (!casesScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ casesScoreMap.put(qcResultAlgVO.getCasesId(), BigDecimal.ZERO);
|
|
|
|
+ rejectScoreMap.put(qcResultAlgVO.getCasesId(), BigDecimal.ZERO);
|
|
|
|
+ casesNameMap.put(qcResultAlgVO.getCasesId(), "");
|
|
|
|
+ }
|
|
|
|
+ //单票否决计分
|
|
|
|
+ if (qcResultAlgVO.getIsReject().equals(1)) {
|
|
|
|
+ if (rejectScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ BigDecimal casesScore = rejectScoreMap.get(qcResultAlgVO.getCasesId());
|
|
|
|
+ casesScore = casesScore.add(qcResultAlgVO.getScore());
|
|
|
|
+ rejectScoreMap.put(qcResultAlgVO.getCasesId(), casesScore);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ //非单票否决计分
|
|
|
|
+ if (casesScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ BigDecimal casesScore = casesScoreMap.get(qcResultAlgVO.getCasesId());
|
|
|
|
+ casesScore = casesScore.add(qcResultAlgVO.getScore());
|
|
|
|
+ casesScoreMap.put(qcResultAlgVO.getCasesId(), casesScore);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ String casesName = casesNameMap.get(qcResultAlgVO.getCasesId());
|
|
|
|
+ if (StringUtils.isEmpty(casesName)) {
|
|
|
|
+ casesName = casesName + qcResultAlgVO.getMsg();
|
|
|
|
+ } else {
|
|
|
|
+ casesName = casesName + ";" + qcResultAlgVO.getMsg();
|
|
|
|
+ }
|
|
|
|
+ casesNameMap.put(qcResultAlgVO.getCasesId(), casesName);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //模块计分
|
|
|
|
+ for (Map.Entry<Long, BigDecimal> casesScore : casesScoreMap.entrySet()) {
|
|
|
|
+ BigDecimal allSccore = casesMap.get(casesScore.getKey());
|
|
|
|
+ if (BigDecimalUtil.le(allSccore, casesScore.getValue())) {
|
|
|
|
+ //模块标准分小于等于模块减分总和就用模块标准分
|
|
|
|
+ allSccore = allSccore.add(rejectScoreMap.get(casesScore.getKey()));
|
|
|
|
+ } else {
|
|
|
|
+ //模块标准分大于模块减分总和就用模块减分总和
|
|
|
|
+ allSccore = casesScore.getValue().add(rejectScoreMap.get(casesScore.getKey()));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (BigDecimalUtil.lt(allSccore, BigDecimal.ZERO)) {
|
|
|
|
+ allSccore = BigDecimal.ZERO;
|
|
|
|
+ }
|
|
|
|
+ scoreMap.put(casesScore.getKey(), allSccore);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ DecimalFormat df = new DecimalFormat("0.0");
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(237L))) {
|
|
|
|
+ qualityControlDTO.setAdmissionNote(casesNameMap.get(237L));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(237L) != null) {
|
|
|
|
+ qualityControlDTO.setAdmissionNoteScore(Double.valueOf(df.format(scoreMap.get(237L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(238L))) {
|
|
|
|
+ qualityControlDTO.setFirstCourseNote(casesNameMap.get(238L));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(238L) != null) {
|
|
|
|
+ qualityControlDTO.setFirstCourseNoteScore(Double.valueOf(df.format(scoreMap.get(238L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(242L))) {
|
|
|
|
+ qualityControlDTO.setDischargeNote(casesNameMap.get(242L));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(242L) != null) {
|
|
|
|
+ qualityControlDTO.setDischargeNoteScore(Double.valueOf(df.format(scoreMap.get(242L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(243L))) {
|
|
|
|
+ qualityControlDTO.setMedHomePage(casesNameMap.get(243L));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(243L) != null) {
|
|
|
|
+ qualityControlDTO.setMedHomePageScore(Double.valueOf(df.format(scoreMap.get(243L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(280L))) {
|
|
|
|
+ qualityControlDTO.setDocAdviceNote(casesNameMap.get(280L));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(280L) != null) {
|
|
|
|
+ qualityControlDTO.setDocAdviceNoteScore(Double.valueOf(df.format(scoreMap.get(280L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String operationInfo = "";
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(248L))) {
|
|
|
|
+ operationInfo = "围手术期病历讨论:" + casesNameMap.get(248L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(249L))) {
|
|
|
|
+ operationInfo = operationInfo + ";" + "术前讨论制度:" + casesNameMap.get(249L);
|
|
|
|
+ }
|
|
|
|
+ if (operationInfo.contains(";")) {
|
|
|
|
+ String[] split = operationInfo.split(";");
|
|
|
|
+ if (StringUtils.isEmpty(split[0])) {
|
|
|
|
+ operationInfo = operationInfo.substring(operationInfo.indexOf(split[1]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ qualityControlDTO.setOperationInfo(StringUtils.isEmpty(operationInfo) == true ? "无缺陷" : operationInfo);
|
|
|
|
+
|
|
|
|
+ Double score_248 = 0d;
|
|
|
|
+ Double score_11 = 0d;
|
|
|
|
+ Double score_249 = 0d;
|
|
|
|
+ if (scoreMap.get(248L) != null) {
|
|
|
|
+ score_248 = Double.valueOf(df.format(scoreMap.get(248L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(11L) != null) {
|
|
|
|
+ score_11 = Double.valueOf(df.format(scoreMap.get(11L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(249L) != null) {
|
|
|
|
+ score_249 = Double.valueOf(df.format(scoreMap.get(249L)));
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setOperationInfoScore(score_248 + score_11 + score_249);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String courseRecord = "";
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(239L))) {
|
|
|
|
+ courseRecord = "死亡病例讨论制度:" + casesNameMap.get(239L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(240L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "疑难病例讨论制度:" + casesNameMap.get(240L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(241L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "三级查房制度:" + casesNameMap.get(241L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(244L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "会诊制度:" + casesNameMap.get(244L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(245L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "分级护理制度:" + casesNameMap.get(245L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(246L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "值班及交接班制度:" + casesNameMap.get(246L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(247L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "临床用血审核制度:" + casesNameMap.get(247L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(250L))) {
|
|
|
|
+ courseRecord = courseRecord + ";" + "死亡记录:" + casesNameMap.get(250L);
|
|
|
|
+ }
|
|
|
|
+ if (courseRecord.contains(";")) {
|
|
|
|
+ String[] courseRecordSplit = courseRecord.split(";");
|
|
|
|
+ if (StringUtils.isEmpty(courseRecordSplit[0])) {
|
|
|
|
+ courseRecord = courseRecord.substring(courseRecord.indexOf(courseRecordSplit[1]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setCourseRecord(StringUtils.isEmpty(courseRecord) == true ? "无缺陷" : courseRecord);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Double score_239 = 0d;
|
|
|
|
+ Double score_240 = 0d;
|
|
|
|
+ Double score_241 = 0d;
|
|
|
|
+ Double score_244 = 0d;
|
|
|
|
+ Double score_245 = 0d;
|
|
|
|
+ Double score_246 = 0d;
|
|
|
|
+ Double score_247 = 0d;
|
|
|
|
+ Double score_250 = 0d;
|
|
|
|
+ DecimalFormat df = new DecimalFormat("0.0");
|
|
|
|
+ if (scoreMap.get(239L) != null) {
|
|
|
|
+ score_239 = Double.valueOf(df.format(scoreMap.get(239L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(240L) != null) {
|
|
|
|
+ score_240 = Double.valueOf(df.format(scoreMap.get(240L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(241L) != null) {
|
|
|
|
+ score_241 = Double.valueOf(df.format(scoreMap.get(241L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(244L) != null) {
|
|
|
|
+ score_244 = Double.valueOf(df.format(scoreMap.get(244L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(245L) != null) {
|
|
|
|
+ score_245 = Double.valueOf(df.format(scoreMap.get(245L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(246L) != null) {
|
|
|
|
+ score_246 = Double.valueOf(df.format(scoreMap.get(246L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(247L) != null) {
|
|
|
|
+ score_247 = Double.valueOf(df.format(scoreMap.get(247L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(250L) != null) {
|
|
|
|
+ score_250 = Double.valueOf(df.format(scoreMap.get(250L)));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setCourseRecordScore(score_239 + score_240 + score_241 + score_244 + score_245 + score_246 + score_247 + score_250);
|
|
|
|
+ /* qualityControlDTO.setCourseRecord(name_239+";"+name_240
|
|
|
|
+ +";"+name_241+";"+name_244+";"+name_245
|
|
|
|
+ +";"+name_246+";"+name_247+";"+name_250);
|
|
|
|
+ qualityControlDTO.setCourseRecordScore(score_239+score_240+score_241+score_244+score_245+score_246
|
|
|
|
+ +score_247+score_250);*/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Double score_262 = 0d;
|
|
|
|
+ Double score_281 = 0d;
|
|
|
|
+ Double score_282 = 0d;
|
|
|
|
+ Double score_283 = 0d;
|
|
|
|
+ Double score_284 = 0d;
|
|
|
|
+ if (scoreMap.get(262L) != null) {
|
|
|
|
+ score_262 = Double.valueOf(df.format(scoreMap.get(262L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(281L) != null) {
|
|
|
|
+ score_281 = Double.valueOf(df.format(scoreMap.get(281L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(282L) != null) {
|
|
|
|
+ score_282 = Double.valueOf(df.format(scoreMap.get(282L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(283L) != null) {
|
|
|
|
+ score_283 = Double.valueOf(df.format(scoreMap.get(283L)));
|
|
|
|
+ }
|
|
|
|
+ if (scoreMap.get(284L) != null) {
|
|
|
|
+ score_284 = Double.valueOf(df.format(scoreMap.get(284L)));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String otherCase = "";
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(262L))) {
|
|
|
|
+ otherCase = "危急值报告制度:" + casesNameMap.get(262L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(281L))) {
|
|
|
|
+ otherCase = otherCase + ";" + "危急值报告制度:" + casesNameMap.get(281L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(282L))) {
|
|
|
|
+ otherCase = otherCase + ";" + "危急值报告制度:" + casesNameMap.get(282L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(283L))) {
|
|
|
|
+ otherCase = otherCase + ";" + "危急值报告制度:" + casesNameMap.get(283L);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(casesNameMap.get(284L))) {
|
|
|
|
+ otherCase = otherCase + ";" + "危急值报告制度:" + casesNameMap.get(284L);
|
|
|
|
+ }
|
|
|
|
+ if (otherCase.contains(";")) {
|
|
|
|
+ String[] otherCaseSplit = otherCase.split(";");
|
|
|
|
+ if (StringUtils.isEmpty(otherCaseSplit[0])) {
|
|
|
|
+ otherCase = otherCase.substring(otherCase.indexOf(otherCaseSplit[1]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setOtherCase(StringUtils.isEmpty(otherCase) == true ? "无缺陷" : otherCase);
|
|
|
|
+ qualityControlDTO.setOtherCaseScore(score_262 + score_281 + score_282 + score_283 + score_284);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|