20250107 更新
1.修改生成的鉴定要求: 1.1.去掉定性分析检测中的分析两字 1.2.在检测含有的毒品后面加成分两字 1.3.对于单个检材和多个检材独立生成 2.添加鉴定委托书和鉴定事项确认书中的受字号年份,去委托送检时间的年份
This commit is contained in:
@@ -49,10 +49,7 @@ import digital.laboratory.platform.sewage.dto.StatisticsDiffStatusJobDTO;
|
||||
import digital.laboratory.platform.sewage.entity.UpdateInfo;
|
||||
import digital.laboratory.platform.sewage.feign.RemoteSewageJobService;
|
||||
import digital.laboratory.platform.sewage.utils.QRCodeUtils;
|
||||
import digital.laboratory.platform.sys.entity.Deliverer;
|
||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||
import digital.laboratory.platform.sys.entity.SysOrg;
|
||||
import digital.laboratory.platform.sys.entity.SysUser;
|
||||
import digital.laboratory.platform.sys.entity.*;
|
||||
import digital.laboratory.platform.sys.entity.entrustment.Sample;
|
||||
import digital.laboratory.platform.sys.feign.*;
|
||||
import digital.laboratory.platform.sys.vo.entrustment.MarkersVO;
|
||||
@@ -500,6 +497,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
//构造委托部分需要的数据
|
||||
dm.put("clientOrgName", entrustment.getClientOrgName());//委托单位
|
||||
dm.put("identificationNo", entrustment.getAcceptNo());//受理编号
|
||||
dm.put("year", entrustment.getEntrustmentTime().getYear());
|
||||
|
||||
dm.put("materialDes", buildMaterialDes(materialList));//检材描述
|
||||
dm.put("identifyReq", entrustment.getEntrustRequirement());//鉴定要求
|
||||
@@ -793,28 +791,43 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
|
||||
@Override
|
||||
public String buildEntrustReq(List<EntrustmentIdentificationMaterial> materialList) {
|
||||
Map<String, List<EntrustmentIdentificationMaterial>> retGroup = materialList
|
||||
.stream()
|
||||
.collect(
|
||||
Collectors.groupingBy(item ->
|
||||
item.getAnalysisOption() +
|
||||
"_" +
|
||||
DrugLiteConvert.convertDirtyLiteByJSON(item.getCandidateDrugs())
|
||||
.stream()
|
||||
.map(DrugLite::getName)
|
||||
.collect(Collectors.joining("")),
|
||||
LinkedHashMap::new, // 返回有序map
|
||||
Collectors.toList())
|
||||
);
|
||||
StringBuffer retSb = new StringBuffer();
|
||||
//先给group排一个序
|
||||
List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> orderedDataList =
|
||||
orderAnalysisOptionAndDrug(retGroup);
|
||||
//开始构建
|
||||
for (Map.Entry<String, List<EntrustmentIdentificationMaterial>> mapping : orderedDataList) {
|
||||
retSb.append(getNameDesStrForEntrust(mapping.getValue())).append(",");
|
||||
StringBuilder retSb = new StringBuilder();
|
||||
if (materialList.size() == 1) {
|
||||
EntrustmentIdentificationMaterial material = materialList.get(0);
|
||||
retSb.append("对检材中是否含有")
|
||||
.append(
|
||||
DrugLiteConvert.convertDirtyLiteByJSON(
|
||||
material.getCandidateDrugs()
|
||||
).stream()
|
||||
.map(DrugLite::getName)
|
||||
.collect(Collectors.joining("、"))
|
||||
)
|
||||
.append("成分进行")
|
||||
.append(AnalysisOptionEnums.fromCode(material.getAnalysisOption()).getChineseName())
|
||||
.append("检测");
|
||||
} else {
|
||||
Map<String, List<EntrustmentIdentificationMaterial>> retGroup = materialList
|
||||
.stream()
|
||||
.collect(
|
||||
Collectors.groupingBy(item ->
|
||||
item.getAnalysisOption() +
|
||||
"_" +
|
||||
DrugLiteConvert.convertDirtyLiteByJSON(item.getCandidateDrugs())
|
||||
.stream()
|
||||
.map(DrugLite::getName)
|
||||
.collect(Collectors.joining("")),
|
||||
LinkedHashMap::new, // 返回有序map
|
||||
Collectors.toList())
|
||||
);
|
||||
//先给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();
|
||||
}
|
||||
|
||||
@@ -897,8 +910,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
sbMaterialName.append(materialObj.getOrderNo1()).append(",");
|
||||
//只执行一次且执行一次
|
||||
if (executeCount == 0) {
|
||||
String drugToString = JSONArray.toJSONString(materialObj.getCandidateDrugs());
|
||||
List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class);
|
||||
// String drugToString = JSONArray.toJSONString(materialObj.getCandidateDrugs());
|
||||
List<DrugLite> drugLiteList = DrugLiteConvert.convertDirtyLiteByJSON(materialObj.getCandidateDrugs());
|
||||
drugLiteList.forEach(item -> {
|
||||
sbDrugDes.append(item.getName()).append("、");
|
||||
});
|
||||
@@ -911,7 +924,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
sbMaterialName.delete(sbMaterialName.length() - 1, sbMaterialName.length());
|
||||
String req1 = "对" + sbMaterialName.toString() + "中是否含有";
|
||||
String req2 = sbDrugDes.toString();
|
||||
String req3 = "进行" + sbAnalysisDes.toString() + "分析检测";
|
||||
// 20250107 自动生成的鉴定要求,去掉分析两个字现在是定性分析检测
|
||||
String req3 = "成分进行" + sbAnalysisDes.toString() + "检测";
|
||||
return req1 + req2 + req3;
|
||||
}
|
||||
|
||||
@@ -2138,7 +2152,6 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
// 构造对象 Map
|
||||
//Map<String, Object> dm = BeanMap.create(ev); //ClassUtils.objectToMap(ev);
|
||||
Map<String, Object> dm = ClassUtils.objectToMap(ev);
|
||||
|
||||
if (ev.getEntrustmentTime() == null) {
|
||||
ev.setEntrustmentTime(LocalDate.now());
|
||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
||||
@@ -2165,7 +2178,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
}
|
||||
dm.put("oldIdentification", oldIdentification);
|
||||
dm.put("entrustmentTime", LocalDateTimeUtil.format(ev.getEntrustmentTime(), "yyyy年MM月dd日"));
|
||||
|
||||
dm.put("year", ev.getEntrustmentTime().getYear());
|
||||
List<EntrustmentIdentificationMaterialVO> ems = entrustmentIdentificationMaterialService.getEntrustmentIdentificationMaterialVOList(Wrappers.<EntrustmentIdentificationMaterial>query()
|
||||
.eq("entrustment_id", ev.getId()).orderByAsc("im_no"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user