1.修改了鉴定要求的生成,现在连续的检材,如果是同一筛查物,那么会生成为1号~N号检材中是否含有xxx进行xxx分析。
2.在生成的委托书和确认书,检定要求一栏加入检测二字。
This commit is contained in:
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 毒品概要实体 转换类
|
||||
@@ -21,7 +23,7 @@ public class DrugLiteConvert {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1511,8 +1511,8 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
||||
for (EntrustmentIdentificationMaterial material : list) {
|
||||
Integer analysisOption = material.getAnalysisOption();
|
||||
material.setQuantity(material.getQuantity().setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
material.setAnalysisOptionValue(AnalysisOptionEnums.fromCode(analysisOption).getChineseName());
|
||||
//2025-1-8日修改:在打印委托书或鉴定事项确认书时,将检测选项转换为中文名称后加上检测二字
|
||||
material.setAnalysisOptionValue(AnalysisOptionEnums.fromCode(analysisOption).getChineseName()+"检测");
|
||||
material.setPrintDrawTime(LocalDateTimeUtil.format(material.getDrawTime(), "yyyy-MM-dd"));
|
||||
List<DrugLite> candidateDrugs = material.getCandidateDrugs();
|
||||
String drugsValue = "";
|
||||
|
||||
@@ -485,7 +485,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
* @param caseEvent
|
||||
* @param entrustment
|
||||
* @param materialList
|
||||
* @param isAccepted -1 未受理,0 1 受理之后的状态
|
||||
* @param isAccepted -1 未受理,0 1 受理之后的状态
|
||||
* @return
|
||||
*/
|
||||
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("对检材中是否含有")
|
||||
.append(
|
||||
DrugLiteConvert.convertDirtyLiteByJSON(
|
||||
material.getCandidateDrugs()
|
||||
).stream()
|
||||
material.getCandidateDrugs()
|
||||
).stream()
|
||||
.map(DrugLite::getName)
|
||||
.collect(Collectors.joining("、"))
|
||||
)
|
||||
@@ -819,14 +819,30 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
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(",");
|
||||
if (retGroup.keySet().size() == 1) {
|
||||
EntrustmentIdentificationMaterial material = materialList.get(0);
|
||||
retSb.append("对1号至")
|
||||
.append(materialList.size())
|
||||
.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();
|
||||
}
|
||||
@@ -1988,6 +2004,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
|
||||
/**
|
||||
* 设置送检信息
|
||||
*
|
||||
* @param entrustment
|
||||
* @return
|
||||
*/
|
||||
@@ -3494,6 +3511,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
/**
|
||||
* 根据委托时间去取 年月日 修改一些时间类型的字段信息,例如 submit_time、check_claim_time、check_time、approve_claim_time、approve_time、"
|
||||
* deliver_confirm_time、accept_claim_time、accept_time、create_time以及process_info字段中的time类型的数据
|
||||
*
|
||||
* @param entrustment
|
||||
* @return
|
||||
*/
|
||||
@@ -3533,7 +3551,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
||||
|
||||
/**
|
||||
* 判断当前保存的委托检材数量是否符合,决定是否可以提交委托审核
|
||||
* @param entrustId 委托id
|
||||
*
|
||||
* @param entrustId 委托id
|
||||
* @param materialCount 当前用户所在的检材页面检材数量
|
||||
* @return
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user