1.修改了鉴定要求的生成,现在连续的检材,如果是同一筛查物,那么会生成为1号~N号检材中是否含有xxx进行xxx分析。

2.在生成的委托书和确认书,检定要求一栏加入检测二字。
master
杨海航 2 months ago
parent 6618f439e7
commit 9a51708898
  1. 4
      src/main/java/digital/laboratory/platform/entrustment/convert/DrugLiteConvert.java
  2. 4
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java
  3. 41
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentServiceImpl.java

@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONArray;
import digital.laboratory.platform.sys.entity.DrugLite; import digital.laboratory.platform.sys.entity.DrugLite;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 毒品概要实体 转换类 * 毒品概要实体 转换类
@ -21,7 +23,7 @@ public class DrugLiteConvert {
return Collections.emptyList(); return Collections.emptyList();
} }
String drugToString = JSONArray.toJSONString(drugLitesJson); String drugToString = JSONArray.toJSONString(drugLitesJson);
List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class); List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class).stream().sorted(Comparator.comparing(DrugLite::getName)).collect(Collectors.toList());;
return drugLiteList; return drugLiteList;
} }

@ -1511,8 +1511,8 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
for (EntrustmentIdentificationMaterial material : list) { for (EntrustmentIdentificationMaterial material : list) {
Integer analysisOption = material.getAnalysisOption(); Integer analysisOption = material.getAnalysisOption();
material.setQuantity(material.getQuantity().setScale(2, BigDecimal.ROUND_HALF_UP)); material.setQuantity(material.getQuantity().setScale(2, BigDecimal.ROUND_HALF_UP));
//2025-1-8日修改:在打印委托书或鉴定事项确认书时,将检测选项转换为中文名称后加上检测二字
material.setAnalysisOptionValue(AnalysisOptionEnums.fromCode(analysisOption).getChineseName()); material.setAnalysisOptionValue(AnalysisOptionEnums.fromCode(analysisOption).getChineseName()+"检测");
material.setPrintDrawTime(LocalDateTimeUtil.format(material.getDrawTime(), "yyyy-MM-dd")); material.setPrintDrawTime(LocalDateTimeUtil.format(material.getDrawTime(), "yyyy-MM-dd"));
List<DrugLite> candidateDrugs = material.getCandidateDrugs(); List<DrugLite> candidateDrugs = material.getCandidateDrugs();
String drugsValue = ""; String drugsValue = "";

@ -485,7 +485,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
* @param caseEvent * @param caseEvent
* @param entrustment * @param entrustment
* @param materialList * @param materialList
* @param isAccepted -1 未受理0 1 受理之后的状态 * @param isAccepted -1 未受理0 1 受理之后的状态
* @return * @return
*/ */
private Map<String, Object> generateIdentifyItemsData(CaseEvent caseEvent, Entrustment entrustment, List<EntrustmentIdentificationMaterial> materialList, int isAccepted) { private Map<String, Object> generateIdentifyItemsData(CaseEvent caseEvent, Entrustment entrustment, List<EntrustmentIdentificationMaterial> materialList, int isAccepted) {
@ -797,8 +797,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
retSb.append("对检材中是否含有") retSb.append("对检材中是否含有")
.append( .append(
DrugLiteConvert.convertDirtyLiteByJSON( DrugLiteConvert.convertDirtyLiteByJSON(
material.getCandidateDrugs() material.getCandidateDrugs()
).stream() ).stream()
.map(DrugLite::getName) .map(DrugLite::getName)
.collect(Collectors.joining("、")) .collect(Collectors.joining("、"))
) )
@ -819,14 +819,30 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
LinkedHashMap::new, // 返回有序map LinkedHashMap::new, // 返回有序map
Collectors.toList()) Collectors.toList())
); );
//先给group排一个序 if (retGroup.keySet().size() == 1) {
List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> orderedDataList = EntrustmentIdentificationMaterial material = materialList.get(0);
orderAnalysisOptionAndDrug(retGroup); retSb.append("对1号至")
//开始构建 .append(materialList.size())
for (Map.Entry<String, List<EntrustmentIdentificationMaterial>> mapping : orderedDataList) { .append("号检材中是否含有")
retSb.append(getNameDesStrForEntrust(mapping.getValue())).append(","); .append(DrugLiteConvert.convertDirtyLiteByJSON(
material.getCandidateDrugs()
).stream()
.map(DrugLite::getName)
.collect(Collectors.joining("、")));
retSb.append("成分进行")
.append(AnalysisOptionEnums.fromCode(material.getAnalysisOption()).getChineseName())
.append("检测");
return retSb.toString();
} else {
//先给group排一个序
List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> orderedDataList =
orderAnalysisOptionAndDrug(retGroup);
//开始构建
for (Map.Entry<String, List<EntrustmentIdentificationMaterial>> mapping : orderedDataList) {
retSb.append(getNameDesStrForEntrust(mapping.getValue())).append(",");
}
retSb.delete(retSb.length() - 1, retSb.length());
} }
retSb.delete(retSb.length() - 1, retSb.length());
} }
return retSb.toString(); return retSb.toString();
} }
@ -1988,6 +2004,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
/** /**
* 设置送检信息 * 设置送检信息
*
* @param entrustment * @param entrustment
* @return * @return
*/ */
@ -3494,6 +3511,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
/** /**
* 根据委托时间去取 年月日 修改一些时间类型的字段信息例如 submit_timecheck_claim_timecheck_timeapprove_claim_timeapprove_time" * 根据委托时间去取 年月日 修改一些时间类型的字段信息例如 submit_timecheck_claim_timecheck_timeapprove_claim_timeapprove_time"
* deliver_confirm_timeaccept_claim_timeaccept_timecreate_time以及process_info字段中的time类型的数据 * deliver_confirm_timeaccept_claim_timeaccept_timecreate_time以及process_info字段中的time类型的数据
*
* @param entrustment * @param entrustment
* @return * @return
*/ */
@ -3533,7 +3551,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
/** /**
* 判断当前保存的委托检材数量是否符合决定是否可以提交委托审核 * 判断当前保存的委托检材数量是否符合决定是否可以提交委托审核
* @param entrustId 委托id *
* @param entrustId 委托id
* @param materialCount 当前用户所在的检材页面检材数量 * @param materialCount 当前用户所在的检材页面检材数量
* @return * @return
*/ */

Loading…
Cancel
Save