|
|
|
@ -1007,11 +1007,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
// 获取该仪器对象
|
|
|
|
// 获取该仪器对象
|
|
|
|
Instrument instrument = instrumentService.getById(s); |
|
|
|
Instrument instrument = instrumentService.getById(s); |
|
|
|
// 拼接仪器编号及名称
|
|
|
|
// 拼接仪器编号及名称
|
|
|
|
instrumentName += instrument.getName() + " " + instrument.getCode() + ","; |
|
|
|
instrumentName += instrument.getName() + "" + instrument.getCode() + ","; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
result1.put("code", instrumentName.replace(",", "\r\n")); |
|
|
|
String replace = instrumentName.replace(",", "\r"); |
|
|
|
|
|
|
|
result1.put("code", instrumentName); |
|
|
|
|
|
|
|
result1.put("experieDate", format3.format(taskBlueprint.getCreateTime())); |
|
|
|
result1.put("experieDate", format3.format(taskBlueprint.getCreateTime())); |
|
|
|
result1.put("remark", entrust.getRemark()); |
|
|
|
result1.put("remark", entrust.getRemark()); |
|
|
|
result1.put("resultList1", ItemAndAllList); |
|
|
|
result1.put("resultList1", ItemAndAllList); |
|
|
|
@ -1191,76 +1189,86 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
// 诊断试剂
|
|
|
|
// 诊断试剂
|
|
|
|
String[] split1 = examineResult.getReagentId().split(","); |
|
|
|
String[] split1 = examineResult.getReagentId().split(","); |
|
|
|
String regentName = ""; |
|
|
|
String regentName = ""; |
|
|
|
Set<String> set = new HashSet(); |
|
|
|
|
|
|
|
for (int i = 0; i < split1.length; i++) { |
|
|
|
for (int i = 0; i < split1.length; i++) { |
|
|
|
Reagent reagent = reagentService.getById(split1[i]); |
|
|
|
Reagent reagent = reagentService.getById(split1[i]); |
|
|
|
if (i == (split1.length - 1)) { |
|
|
|
if (i == (split1.length - 1)) { |
|
|
|
regentName += reagent.getName(); |
|
|
|
regentName += reagent.getName() + "(生产批号:" + reagent.getBatchNo() + ")" + reagent.getManufacturer(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
regentName += reagent.getName() + ","; |
|
|
|
regentName += reagent.getName() + "(生产批号:" + reagent.getBatchNo() + ")" + reagent.getManufacturer() + "\r\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
set.add(reagent.getManufacturer()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
result.put("7", regentName); |
|
|
|
result.put("7", regentName); |
|
|
|
|
|
|
|
|
|
|
|
// 生产厂家及批号
|
|
|
|
// Set<String> set = new HashSet();
|
|
|
|
String manufacturer = ""; |
|
|
|
// for (int i = 0; i < split1.length; i++) {
|
|
|
|
List<String> strList = new ArrayList<>(); |
|
|
|
// Reagent reagent = reagentService.getById(split1[i]);
|
|
|
|
for (String m : set) { |
|
|
|
// if (i == (split1.length - 1)) {
|
|
|
|
strList.add(m); |
|
|
|
// regentName += reagent.getName();
|
|
|
|
} |
|
|
|
// } else {
|
|
|
|
for (int i = 0; i < strList.size(); i++) { |
|
|
|
// regentName += reagent.getName() + ",";
|
|
|
|
if (i == (strList.size() - 1)) { |
|
|
|
// }
|
|
|
|
manufacturer += strList.get(i); |
|
|
|
// set.add(reagent.getManufacturer());
|
|
|
|
} else { |
|
|
|
// }
|
|
|
|
manufacturer += strList.get(i) + ","; |
|
|
|
// result.put("7", regentName);
|
|
|
|
} |
|
|
|
//
|
|
|
|
} |
|
|
|
// // 生产厂家及批号
|
|
|
|
|
|
|
|
// String manufacturer = "";
|
|
|
|
// 1.先拿到批次号
|
|
|
|
// List<String> strList = new ArrayList<>();
|
|
|
|
String batchNos = examineResult.getBatchNos(); |
|
|
|
// for (String m : set) {
|
|
|
|
String[] split3 = batchNos.split(","); |
|
|
|
// strList.add(m);
|
|
|
|
Map<String, List<String>> tempListMap = new HashMap(); |
|
|
|
// }
|
|
|
|
for (String batch : split3) { |
|
|
|
// for (int i = 0; i < strList.size(); i++) {
|
|
|
|
String[] reagentIdAndBatchArr = batch.split("-"); |
|
|
|
// if (i == (strList.size() - 1)) {
|
|
|
|
String reagentId = reagentIdAndBatchArr[0]; |
|
|
|
// manufacturer += strList.get(i);
|
|
|
|
// 试剂中会有中线的情况,如:1101-3,-3也要带着;原以为只有1101
|
|
|
|
// } else {
|
|
|
|
String realBatch = ""; |
|
|
|
// manufacturer += strList.get(i) + ",";
|
|
|
|
if (reagentIdAndBatchArr.length > 2) { |
|
|
|
// }
|
|
|
|
for (int i = 1; i < reagentIdAndBatchArr.length; i++) { |
|
|
|
// }
|
|
|
|
realBatch += reagentIdAndBatchArr[i] + "-"; |
|
|
|
//
|
|
|
|
} |
|
|
|
// // 1.先拿到批次号
|
|
|
|
} else { |
|
|
|
// String batchNos = examineResult.getBatchNos();
|
|
|
|
realBatch = reagentIdAndBatchArr[1]; |
|
|
|
// String[] split3 = batchNos.split(",");
|
|
|
|
} |
|
|
|
// Map<String, List<String>> tempListMap = new HashMap();
|
|
|
|
List<String> list = tempListMap.get(reagentId); |
|
|
|
// for (String batch : split3) {
|
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
// String[] reagentIdAndBatchArr = batch.split("-");
|
|
|
|
list.add(realBatch); |
|
|
|
// String reagentId = reagentIdAndBatchArr[0];
|
|
|
|
} else { |
|
|
|
// // 试剂中会有中线的情况,如:1101-3,-3也要带着;原以为只有1101
|
|
|
|
List<String> temp = new ArrayList<>(); |
|
|
|
// String realBatch = "";
|
|
|
|
temp.add(realBatch); |
|
|
|
// if (reagentIdAndBatchArr.length > 2) {
|
|
|
|
tempListMap.put(reagentId, temp); |
|
|
|
// for (int i = 1; i < reagentIdAndBatchArr.length; i++) {
|
|
|
|
} |
|
|
|
// realBatch += reagentIdAndBatchArr[i] + "-";
|
|
|
|
} |
|
|
|
// }
|
|
|
|
String resultBatchStr = ""; |
|
|
|
// } else {
|
|
|
|
// 遍历处理批号
|
|
|
|
// realBatch = reagentIdAndBatchArr[1];
|
|
|
|
Set<String> strings = tempListMap.keySet(); |
|
|
|
// }
|
|
|
|
for (String reagentId : strings) { |
|
|
|
// List<String> list = tempListMap.get(reagentId);
|
|
|
|
// 根据试剂名称查询厂家名称
|
|
|
|
// if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
Reagent reagent = reagentService.getById(reagentId); |
|
|
|
// list.add(realBatch);
|
|
|
|
String manufacturerName = reagent.getManufacturer(); |
|
|
|
// } else {
|
|
|
|
List<String> list = tempListMap.get(reagentId); |
|
|
|
// List<String> temp = new ArrayList<>();
|
|
|
|
resultBatchStr += manufacturerName + ":批号("; |
|
|
|
// temp.add(realBatch);
|
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
// tempListMap.put(reagentId, temp);
|
|
|
|
String realBatch = list.get(i); |
|
|
|
// }
|
|
|
|
resultBatchStr += realBatch; |
|
|
|
// }
|
|
|
|
if (i != list.size() - 1) { |
|
|
|
// String resultBatchStr = "";
|
|
|
|
resultBatchStr += "、"; |
|
|
|
// // 遍历处理批号
|
|
|
|
} |
|
|
|
// Set<String> strings = tempListMap.keySet();
|
|
|
|
} |
|
|
|
// for (String reagentId : strings) {
|
|
|
|
resultBatchStr += ")"; |
|
|
|
// // 根据试剂名称查询厂家名称
|
|
|
|
} |
|
|
|
// Reagent reagent = reagentService.getById(reagentId);
|
|
|
|
result.put("8", resultBatchStr); |
|
|
|
// String manufacturerName = reagent.getManufacturer();
|
|
|
|
|
|
|
|
// List<String> list = tempListMap.get(reagentId);
|
|
|
|
|
|
|
|
// resultBatchStr += manufacturerName + ":批号(";
|
|
|
|
|
|
|
|
// for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
|
|
|
// String realBatch = list.get(i);
|
|
|
|
|
|
|
|
// resultBatchStr += realBatch;
|
|
|
|
|
|
|
|
// if (i != list.size() - 1) {
|
|
|
|
|
|
|
|
// resultBatchStr += "、";
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// resultBatchStr += ")";
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// result.put("8", resultBatchStr);
|
|
|
|
|
|
|
|
|
|
|
|
// 使用仪器名称及编号
|
|
|
|
// 使用仪器名称及编号
|
|
|
|
String[] split2 = examineResult.getInstrumentId().split(","); |
|
|
|
String[] split2 = examineResult.getInstrumentId().split(","); |
|
|
|
@ -1274,17 +1282,14 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
instrumentName += s2 + ","; |
|
|
|
instrumentName += s2 + ","; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
result.put("9", instrumentName.replace(",", "\r")); |
|
|
|
result.put("9", instrumentName.replace(",", "\r\n")); |
|
|
|
// String value = DictBizCache.getValue(DictBizEnum.SIMPLE_STATUS, examineResult.getSimpleStatus());
|
|
|
|
// String value = DictBizCache.getValue(DictBizEnum.SIMPLE_STATUS, examineResult.getSimpleStatus());
|
|
|
|
result.put("10", examineResult.getSimpleStatus()); |
|
|
|
result.put("10", examineResult.getSimpleStatus()); |
|
|
|
result.put("11", "温度" + examineResult.getTemperature() + "℃; " + "湿度" + examineResult.getHumidity() + "%RH"); |
|
|
|
result.put("11", "温度" + examineResult.getTemperature() + "℃; " + "湿度" + examineResult.getHumidity() + "%RH"); |
|
|
|
// 操作程序内容
|
|
|
|
// 操作程序内容
|
|
|
|
result.put("12", examineResult.getOperateContent().replace("#", "\r")); |
|
|
|
result.put("12", examineResult.getOperateContent().replace("\n", "\r\n")); |
|
|
|
// if (examineBasis != null) {
|
|
|
|
|
|
|
|
// result.put("13", examineBasis.getContent().replace("$", "(char)11"));
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 结果判定方法和依据
|
|
|
|
// 结果判定方法和依据
|
|
|
|
result.put("13", examineResult.getExamineBasisContent().replace("#", "\r")); |
|
|
|
result.put("13", examineResult.getExamineBasisContent().replace("\n", "\r\n")); |
|
|
|
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); |
|
|
|
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); |
|
|
|
// 检测人
|
|
|
|
// 检测人
|
|
|
|
if (!"".equals(examine.getExamineBy()) && examine.getExamineBy() != null) { |
|
|
|
if (!"".equals(examine.getExamineBy()) && examine.getExamineBy() != null) { |
|
|
|
@ -3347,10 +3352,14 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
result.put("flowTime", "/"); |
|
|
|
result.put("flowTime", "/"); |
|
|
|
} |
|
|
|
} |
|
|
|
//检测任务书交回日期
|
|
|
|
//检测任务书交回日期
|
|
|
|
result.put("backCrossTime", format.format(eTask.getBackCrossTime())); |
|
|
|
if (eTask.getBackCrossTime() != null) { |
|
|
|
String name1 = userClient.userInfoById(Long.parseLong(eTask.getBackCrossRecipientBy())).getData().getName(); |
|
|
|
result.put("backCrossTime", format.format(eTask.getBackCrossTime())); |
|
|
|
//接收人
|
|
|
|
} |
|
|
|
result.put("backCrossRecipient", name1); |
|
|
|
if (eTask.getBackCrossRecipientBy() != null) { |
|
|
|
|
|
|
|
String name1 = userClient.userInfoById(Long.parseLong(eTask.getBackCrossRecipientBy())).getData().getName(); |
|
|
|
|
|
|
|
//接收人
|
|
|
|
|
|
|
|
result.put("backCrossRecipient", name1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|