|
|
|
|
@ -47,6 +47,7 @@ import java.util.stream.Collectors; |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
@NoArgsConstructor |
|
|
|
|
@SuppressWarnings("all") |
|
|
|
|
public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> implements IEntrtrustService { |
|
|
|
|
|
|
|
|
|
@Lazy |
|
|
|
|
@ -298,114 +299,78 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void print(String id, HttpServletResponse response) { |
|
|
|
|
//委托单
|
|
|
|
|
// 委托单
|
|
|
|
|
Entrust entrust = this.getById(id); |
|
|
|
|
|
|
|
|
|
// 获取委托单下所有检测
|
|
|
|
|
LambdaQueryWrapper<Examine> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper.eq(Examine::getEntrustId, id); |
|
|
|
|
List<Examine> examineList = examineService.list(wrapper); |
|
|
|
|
|
|
|
|
|
//需要批量生成的map
|
|
|
|
|
List<Map<String, Object>> resultList1 = new ArrayList<>(); |
|
|
|
|
List<Map<String, Object>> resultList2 = new ArrayList<>(); |
|
|
|
|
for (Examine examine : examineList) { |
|
|
|
|
HashMap<String, Object> map = new HashMap<>(4); |
|
|
|
|
if (examine.getExamineItemId() != null) { |
|
|
|
|
ExamineItem byId = examineItemService.getById(examine.getExamineItemId()); |
|
|
|
|
if (byId != null) { |
|
|
|
|
map.put("examineItem", byId.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineWayId() != null) { |
|
|
|
|
ExamineWay byId1 = examineWayService.getById(examine.getExamineWayId()); |
|
|
|
|
if (byId1 != null) { |
|
|
|
|
map.put("examineWay", byId1.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineBasisId() != null) { |
|
|
|
|
ExamineBasis byId2 = examineBasisService.getById(examine.getExamineBasisId()); |
|
|
|
|
if (byId2 != null) { |
|
|
|
|
map.put("examineBasis", byId2.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
map.put("examineResult", "符合标准"); |
|
|
|
|
resultList1.add(map); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> result1 = new HashMap<>(); |
|
|
|
|
result1.put("acceptanceNum", entrust.getAcceptanceNum()); |
|
|
|
|
result1.put("simpleName", entrust.getSimpleName()); |
|
|
|
|
result1.put("takeCompany", entrust.getTakeCompany()); |
|
|
|
|
result1.put("takePerson", entrust.getTakePerson()); |
|
|
|
|
result1.put("takeCompanyAddress", entrust.getTakeCompanyAddress()); |
|
|
|
|
result1.put("takePhone", entrust.getTakePhone()); |
|
|
|
|
result1.put("entrustCustomerName", entrust.getEntrustCustomerName()); |
|
|
|
|
String value = DictBizCache.getValue(DictBizEnum.ENTRUST_INVESTIGATIVE_TYPE, entrust.getInvestigativeType()); |
|
|
|
|
result1.put("investigativeType", value); |
|
|
|
|
result1.put("mailAddr", entrust.getMailAddr()); |
|
|
|
|
result1.put("phone", entrust.getPhone()); |
|
|
|
|
result1.put("submittedBy", entrust.getSubmittedBy()); |
|
|
|
|
SimpleDateFormat format3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
String format4 = ""; |
|
|
|
|
if (entrust.getSamplingDate() != null) { |
|
|
|
|
format4 = format3.format(entrust.getSamplingDate()); |
|
|
|
|
} |
|
|
|
|
result1.put("samplingDate", format4); |
|
|
|
|
result1.put("simpleState", entrust.getSimpleState()); |
|
|
|
|
result1.put("simpleCount", entrust.getSimpleCount()); |
|
|
|
|
result1.put("code", "仪器");//???
|
|
|
|
|
result1.put("experieDate", "检测日期");//???
|
|
|
|
|
result1.put("remark", "备注");//???
|
|
|
|
|
result1.put("resultList1", resultList1); |
|
|
|
|
// 盖章图片
|
|
|
|
|
ImageEntity farView = new ImageEntity(); |
|
|
|
|
farView.setHeight(80);//设置高度
|
|
|
|
|
farView.setWidth(80);//设置宽度
|
|
|
|
|
farView.setType(ImageEntity.Data);//类型
|
|
|
|
|
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); |
|
|
|
|
String pictureName = sysClient.getParamValue("seal_picture_path").getData(); |
|
|
|
|
String s1 = path + pictureName; |
|
|
|
|
FileInputStream fis = null; |
|
|
|
|
try { |
|
|
|
|
fis = new FileInputStream(new File(s1)); |
|
|
|
|
byte[] bytes = readInputStream(fis); |
|
|
|
|
farView.setData(bytes); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
result1.put("11", farView); |
|
|
|
|
// 需要批量生成的map
|
|
|
|
|
List<Map<String, Object>> ItemAndAllList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
// 填充检验项目、方法、依据
|
|
|
|
|
ItemAndAllList.add(fillExamineItemAndAll(examineList)); |
|
|
|
|
|
|
|
|
|
if (examineList.size() > 0) { |
|
|
|
|
for (Examine examine : examineList) { |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>(); |
|
|
|
|
LambdaQueryWrapper<ExamineResult> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
queryWrapper.eq(ExamineResult::getExamineId, examine.getId()); |
|
|
|
|
// 检测结果
|
|
|
|
|
ExamineResult examineResult = examineResultService.getOne(queryWrapper); |
|
|
|
|
// 检测项目
|
|
|
|
|
// 填充报告的主体内容
|
|
|
|
|
Map<String, Object> reportMainBody = fillReportMainBody(entrust, ItemAndAllList); |
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// 当前使用的模板
|
|
|
|
|
String currTemplate = ""; |
|
|
|
|
|
|
|
|
|
int examineCount = examineList.size(); |
|
|
|
|
|
|
|
|
|
// 根据检测的数量判断用按个模板
|
|
|
|
|
switch (examineCount) { |
|
|
|
|
case 1: currTemplate = print; break; |
|
|
|
|
case 2: currTemplate = print; break; |
|
|
|
|
case 3: currTemplate = print; break; |
|
|
|
|
case 4: currTemplate = print; break; |
|
|
|
|
case 5: currTemplate = print; break; |
|
|
|
|
case 6: currTemplate = print; break; |
|
|
|
|
case 7: currTemplate = print; break; |
|
|
|
|
case 8: currTemplate = print; break; |
|
|
|
|
case 9: currTemplate = print; break; |
|
|
|
|
case 10: currTemplate = print; break; |
|
|
|
|
default: currTemplate = print; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<ExamineResultVo> resultList = new ArrayList<>(); |
|
|
|
|
// 根据检验判断有几个name
|
|
|
|
|
for (int i = 1; i <= examineList.size(); i++) { |
|
|
|
|
Examine examine = examineList.get(i); |
|
|
|
|
ExamineItem examineItem = examineItemService.getById(examine.getExamineItemId()); |
|
|
|
|
result.put("name", examineItem.getName()); |
|
|
|
|
// 检测项目名称
|
|
|
|
|
reportMainBody.put("name" + i, examineItem.getName()); |
|
|
|
|
|
|
|
|
|
// 判断是哪种检测
|
|
|
|
|
String inputMode = examineItem.getInputMode(); |
|
|
|
|
|
|
|
|
|
// 根据检测检测项目拿检测结果
|
|
|
|
|
ExamineResult examineResult = getExamineResultByExamineId(examine.getId()); |
|
|
|
|
|
|
|
|
|
// 布鲁氏检测
|
|
|
|
|
if ("2".equals(examineItem.getInputMode())) { |
|
|
|
|
List<ExamineTemplate2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), ExamineTemplate2Excel.class); |
|
|
|
|
if (list != null && list.size() > 0) { |
|
|
|
|
for (ExamineTemplate2Excel excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
for (int i1 = 0; i1 < list.size(); i1++) { |
|
|
|
|
ExamineTemplate2Excel excel = list.get(i1); |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getExperieNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getExperieNum()); |
|
|
|
|
map.put("value", excel.getValue()); |
|
|
|
|
map.put("result", excel.getResult()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getValue()); |
|
|
|
|
resultVo.setResult(excel.getResult()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// PCR检测
|
|
|
|
|
@ -413,20 +378,20 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
List<PCR2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), PCR2Excel.class); |
|
|
|
|
if (list != null && list.size() > 0) { |
|
|
|
|
for (PCR2Excel excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getExperieNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getExperieNum()); |
|
|
|
|
map.put("value", excel.getCtValue()); |
|
|
|
|
map.put("result", excel.getValue()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getCtValue()); |
|
|
|
|
resultVo.setResult(excel.getValue()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// XN检测
|
|
|
|
|
@ -434,268 +399,358 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
List<XN2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), XN2Excel.class); |
|
|
|
|
if (list != null && list.size() > 0) { |
|
|
|
|
for (XN2Excel excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getExperieNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getExperieNum()); |
|
|
|
|
map.put("value", excel.getCtValue()); |
|
|
|
|
map.put("result", excel.getValue()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getCtValue()); |
|
|
|
|
resultVo.setResult(excel.getValue()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 普通和口蹄疫检测
|
|
|
|
|
else { |
|
|
|
|
DecimalFormat df = new DecimalFormat("#0.000"); |
|
|
|
|
List<ExamineDataArrVO> list = JSON.parseArray(examineResult.getExamineDataArr(), ExamineDataArrVO.class); |
|
|
|
|
List<ExamineDataArrVO> list1 = new ArrayList<>(); |
|
|
|
|
// 普通检测原始记录
|
|
|
|
|
Collections.sort(list, new Comparator<ExamineDataArrVO>() { |
|
|
|
|
@Override |
|
|
|
|
public int compare(ExamineDataArrVO o1, ExamineDataArrVO o2) { |
|
|
|
|
return o1.getOrder() - o2.getOrder(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// position1
|
|
|
|
|
List<ExamineDataArrVO> list = JSON.parseArray(examineResult.getExamineDataArr(), ExamineDataArrVO.class); |
|
|
|
|
// 对普通检测原始记录进行按照order排序
|
|
|
|
|
sortByOrder(list); |
|
|
|
|
// 口蹄疫
|
|
|
|
|
if ("3".equals(examineItem.getInputMode())) { |
|
|
|
|
// 口蹄疫兰所单板
|
|
|
|
|
if ("1".equals(examine.getTemplateType())) { |
|
|
|
|
|
|
|
|
|
// OriginRecordResult 检验结果
|
|
|
|
|
List<ExamineDataArrVO> voList = JSON.parseArray(examineResult.getOriginRecordResult(), ExamineDataArrVO.class); |
|
|
|
|
Collections.sort(voList, new Comparator<ExamineDataArrVO>() { |
|
|
|
|
@Override |
|
|
|
|
public int compare(ExamineDataArrVO o1, ExamineDataArrVO o2) { |
|
|
|
|
return o1.getOrder() - o2.getOrder(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
List<Double> doubles = new ArrayList<>(); |
|
|
|
|
double a1 = Double.parseDouble(list.get(95).getValue()); |
|
|
|
|
double a2 = Double.parseDouble(list.get(94).getValue()); |
|
|
|
|
double a3 = Double.parseDouble(list.get(93).getValue()); |
|
|
|
|
double a4 = Double.parseDouble(list.get(92).getValue()); |
|
|
|
|
doubles.add(a1); |
|
|
|
|
doubles.add(a2); |
|
|
|
|
doubles.add(a3); |
|
|
|
|
doubles.add(a4); |
|
|
|
|
List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); |
|
|
|
|
String format2 = df.format((collect.get(1) + collect.get(2)) / 4); |
|
|
|
|
ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); |
|
|
|
|
examineDataArrVO.setNum("临界值"); |
|
|
|
|
examineDataArrVO.setValue(format2); |
|
|
|
|
examineDataArrVO.setResult(""); |
|
|
|
|
list1.add(examineDataArrVO); |
|
|
|
|
|
|
|
|
|
// 对 按照order排序
|
|
|
|
|
sortByOrder(voList); |
|
|
|
|
|
|
|
|
|
// 求临界值
|
|
|
|
|
String format2 = calcCriticalValue(list); |
|
|
|
|
|
|
|
|
|
// 处理临界值
|
|
|
|
|
list1.add(assembleCriticalValue(format2)); |
|
|
|
|
|
|
|
|
|
// 把检验结果:
|
|
|
|
|
list1.addAll(voList); |
|
|
|
|
|
|
|
|
|
if (list1.size() > 0) { |
|
|
|
|
for (ExamineDataArrVO excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
for (ExamineDataArrVO excel : list1) { |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); |
|
|
|
|
// 根据*取样品
|
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getNum()); |
|
|
|
|
map.put("value", excel.getValue()); |
|
|
|
|
map.put("result", excel.getResult()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getValue()); |
|
|
|
|
resultVo.setResult(excel.getResult()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 口蹄疫兰所多板
|
|
|
|
|
// 口蹄疫 兰所多板
|
|
|
|
|
else if ("2".equals(examine.getTemplateType())) { |
|
|
|
|
if (list.size() > 0) { |
|
|
|
|
for (int i = 0; i < list.size() / 96; i++) { |
|
|
|
|
List<Double> doubles = new ArrayList<>(); |
|
|
|
|
double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); |
|
|
|
|
double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); |
|
|
|
|
double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); |
|
|
|
|
double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); |
|
|
|
|
doubles.add(a1); |
|
|
|
|
doubles.add(a2); |
|
|
|
|
doubles.add(a3); |
|
|
|
|
doubles.add(a4); |
|
|
|
|
List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); |
|
|
|
|
String format2 = df.format((collect.get(1) + collect.get(2)) / 4); |
|
|
|
|
ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); |
|
|
|
|
examineDataArrVO.setNum("临界值"); |
|
|
|
|
examineDataArrVO.setValue(""); |
|
|
|
|
examineDataArrVO.setResult(format2); |
|
|
|
|
list1.add(examineDataArrVO); |
|
|
|
|
for (int j = 0; j < 96; j++) { |
|
|
|
|
ExamineDataArrVO vo = list.get((i * 96) + j); |
|
|
|
|
if (vo.getNum() != null) { |
|
|
|
|
list1.add(vo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (int j = 0; j < list.size() / 96; j++) { |
|
|
|
|
// 求临界值
|
|
|
|
|
String format2 = calcKTYCriticalValue(list, j); |
|
|
|
|
|
|
|
|
|
// 处理临界值
|
|
|
|
|
list1.add(assembleCriticalValue(format2)); |
|
|
|
|
|
|
|
|
|
// 取有检测编号的值放到list1里面
|
|
|
|
|
list1 = addInVoWhichHasExamNum(list1, list, j); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (list1.size() > 0) { |
|
|
|
|
for (ExamineDataArrVO excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
for (ExamineDataArrVO excel : list1) { |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getNum()); |
|
|
|
|
map.put("value", excel.getValue()); |
|
|
|
|
map.put("result", excel.getResult()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getValue()); |
|
|
|
|
resultVo.setResult(excel.getResult()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 口蹄疫非兰所
|
|
|
|
|
// 口蹄疫 非兰所
|
|
|
|
|
else { |
|
|
|
|
if (list.size() > 0) { |
|
|
|
|
for (int i = 0; i < list.size() / 96; i++) { |
|
|
|
|
List<Double> doubles = new ArrayList<>(); |
|
|
|
|
double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); |
|
|
|
|
double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); |
|
|
|
|
double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); |
|
|
|
|
double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); |
|
|
|
|
doubles.add(a1); |
|
|
|
|
doubles.add(a2); |
|
|
|
|
doubles.add(a3); |
|
|
|
|
doubles.add(a4); |
|
|
|
|
List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); |
|
|
|
|
String format2 = df.format((collect.get(1) + collect.get(2)) / 4); |
|
|
|
|
ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); |
|
|
|
|
examineDataArrVO.setNum("临界值"); |
|
|
|
|
examineDataArrVO.setValue(""); |
|
|
|
|
examineDataArrVO.setResult(format2); |
|
|
|
|
list1.add(examineDataArrVO); |
|
|
|
|
for (int j = 0; j < 96; j++) { |
|
|
|
|
ExamineDataArrVO vo = list.get((i * 96) + j); |
|
|
|
|
if (vo.getNum() != null) { |
|
|
|
|
list1.add(vo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (int j = 0; j < list.size() / 96; j++) { |
|
|
|
|
// 求临界值
|
|
|
|
|
String format2 = calcKTYCriticalValue(list, j); |
|
|
|
|
|
|
|
|
|
// 处理临界值
|
|
|
|
|
list1.add(assembleCriticalValue(format2)); |
|
|
|
|
|
|
|
|
|
// 取有检测编号的值放到list1里面
|
|
|
|
|
list1 = addInVoWhichHasExamNum(list1, list, j); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (list1.size() > 0) { |
|
|
|
|
for (ExamineDataArrVO excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
for (ExamineDataArrVO excel : list1) { |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getNum()); |
|
|
|
|
map.put("value", excel.getValue()); |
|
|
|
|
map.put("result", excel.getResult()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getValue()); |
|
|
|
|
resultVo.setResult(excel.getResult()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 普通检测
|
|
|
|
|
// 普通
|
|
|
|
|
else { |
|
|
|
|
// 判断是满版吗
|
|
|
|
|
if (list.size() % 96 == 0) { |
|
|
|
|
for (int i = 0; i < list.size() / 96; i++) { |
|
|
|
|
double a1 = Double.parseDouble(list.get(i * 96).getOriginResult()); |
|
|
|
|
double b1 = Double.parseDouble(list.get((i * 96) + 1).getOriginResult()); |
|
|
|
|
String format = df.format((a1 + b1) / 2); |
|
|
|
|
list.get(i * 96).setNum("阴性对照平均OD值"); |
|
|
|
|
list.get(i * 96).setValue(format); |
|
|
|
|
list.get(i * 96).setResult(" "); |
|
|
|
|
list1.add(list.get(i * 96)); |
|
|
|
|
double a2 = Double.parseDouble(list.get((i * 96) + 2).getOriginResult()); |
|
|
|
|
double b2 = Double.parseDouble(list.get((i * 96) + 3).getOriginResult()); |
|
|
|
|
String format1 = df.format((a2 + b2) / 2); |
|
|
|
|
list.get((i * 96) + 1).setNum("阳性对照平均OD值"); |
|
|
|
|
list.get((i * 96) + 1).setValue(format1); |
|
|
|
|
list.get((i * 96) + 1).setResult(" "); |
|
|
|
|
list1.add(list.get((i * 96) + 1)); |
|
|
|
|
for (int k = 0; k < list.size() / 96; k++) { |
|
|
|
|
// 求阴性对照平均OD值
|
|
|
|
|
String format = getYinOdAvg(list, k); |
|
|
|
|
list.get(k * 96).setNum("阴性对照平均OD值"); |
|
|
|
|
list.get(k * 96).setValue(format); |
|
|
|
|
list.get(k * 96).setResult(" "); |
|
|
|
|
list1.add(list.get(k * 96)); |
|
|
|
|
|
|
|
|
|
// 求阳性对照平均OD值
|
|
|
|
|
String format1 = getYangOdAvg(list, k); |
|
|
|
|
list.get((k * 96) + 1).setNum("阳性对照平均OD值"); |
|
|
|
|
list.get((k * 96) + 1).setValue(format1); |
|
|
|
|
list.get((k * 96) + 1).setResult(" "); |
|
|
|
|
list1.add(list.get((k * 96) + 1)); |
|
|
|
|
|
|
|
|
|
// 从第六个值开始往list1里加值
|
|
|
|
|
list1 = fillList1IntoValue(list1, list, k, 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 非满版
|
|
|
|
|
else { |
|
|
|
|
for (int k = 0; k < list.size() / 96 + 1; k++) { |
|
|
|
|
// 求阴性对照平均OD值
|
|
|
|
|
String format = getYinOdAvg(list, k); |
|
|
|
|
list.get(k * 96).setNum("阴性对照平均OD值"); |
|
|
|
|
list.get(k * 96).setValue(format); |
|
|
|
|
list.get(k * 96).setResult(" "); |
|
|
|
|
list1.add(list.get(k * 96)); |
|
|
|
|
|
|
|
|
|
for (int j = 0; j < 96; j++) { |
|
|
|
|
if (j > 5) { |
|
|
|
|
list1.add(list.get((i * 96) + j)); |
|
|
|
|
// 求阳性对照平均OD值
|
|
|
|
|
String format1 = getYangOdAvg(list, k); |
|
|
|
|
list.get((k * 96) + 1).setNum("阳性对照平均OD值"); |
|
|
|
|
list.get((k * 96) + 1).setValue(format1); |
|
|
|
|
list.get((k * 96) + 1).setResult(" "); |
|
|
|
|
list1.add(list.get((k * 96) + 1)); |
|
|
|
|
|
|
|
|
|
// 非满版时 从第六个值开始往list1里加值
|
|
|
|
|
list1 = fillList1IntoValue(list1, list, k, 0); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (list1.size() > 0) { |
|
|
|
|
for (ExamineDataArrVO excel : list) { |
|
|
|
|
ExamineResultVo resultVo = new ExamineResultVo(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
resultVo.setOriginalNum(simple.getOriginalNum()); |
|
|
|
|
resultVo.setNum(simple.getExperieNum()); |
|
|
|
|
resultVo.setIndex(i); |
|
|
|
|
resultVo.setValue(excel.getValue()); |
|
|
|
|
resultVo.setResult(excel.getResult()); |
|
|
|
|
resultList.add(resultVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
reportMainBody.put("list", resultList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
for (int i = 0; i < list.size() / 96 + 1; i++) { |
|
|
|
|
double a1 = Double.parseDouble(list.get(i * 96).getOriginResult()); |
|
|
|
|
double b1 = Double.parseDouble(list.get((i * 96) + 1).getOriginResult()); |
|
|
|
|
String format = df.format((a1 + b1) / 2); |
|
|
|
|
list.get(i * 96).setNum("阴性对照平均OD值"); |
|
|
|
|
list.get(i * 96).setValue(format); |
|
|
|
|
list.get(i * 96).setResult(" "); |
|
|
|
|
list1.add(list.get(i * 96)); |
|
|
|
|
double a2 = Double.parseDouble(list.get((i * 96) + 2).getOriginResult()); |
|
|
|
|
double b2 = Double.parseDouble(list.get((i * 96) + 3).getOriginResult()); |
|
|
|
|
String format1 = df.format((a2 + b2) / 2); |
|
|
|
|
list.get((i * 96) + 1).setNum("阳性对照平均OD值"); |
|
|
|
|
list.get((i * 96) + 1).setValue(format1); |
|
|
|
|
list.get((i * 96) + 1).setResult(" "); |
|
|
|
|
list1.add(list.get((i * 96) + 1)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 转换可展示的list
|
|
|
|
|
List<Map<String, Object>> resultResultList = new ArrayList<>(); |
|
|
|
|
// 根据检测编号分组
|
|
|
|
|
Map<String, List<ExamineResultVo>> collect = resultList.stream().collect(Collectors.groupingBy(ExamineResultVo::getNum)); |
|
|
|
|
Set<String> keys = collect.keySet(); |
|
|
|
|
for (String key : keys) { |
|
|
|
|
Map<String, Object> temp = new HashMap<>(); |
|
|
|
|
List<ExamineResultVo> everyExamines = collect.get(key); |
|
|
|
|
temp.put("num", key); |
|
|
|
|
temp.put("originalNum", everyExamines.get(0).getOriginalNum()); |
|
|
|
|
for (int i = 0; i < everyExamines.size(); i++) { |
|
|
|
|
ExamineResultVo everyObj = everyExamines.get(i); |
|
|
|
|
int index = everyObj.getIndex(); |
|
|
|
|
temp.put("value" + index, everyObj.getOriginalNum()); |
|
|
|
|
temp.put("result" + index, everyObj.getOriginalNum()); |
|
|
|
|
} |
|
|
|
|
resultResultList.add(temp); |
|
|
|
|
} |
|
|
|
|
// 将附表所需list加进最终map
|
|
|
|
|
reportMainBody.put("list", resultResultList); |
|
|
|
|
|
|
|
|
|
// 打印相关流操作
|
|
|
|
|
dealAboutPrintStream(response, reportMainBody, entrust, currTemplate); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<ExamineDataArrVO> fillList1IntoValue(List<ExamineDataArrVO> list1, List<ExamineDataArrVO> list, int i, int isFull) { |
|
|
|
|
for (int j = 0; j < 96; j++) { |
|
|
|
|
if ((i * 96) + j > list.size() - 1) { |
|
|
|
|
if (isFull == 0 && (i * 96) + j > list.size() - 1) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
if (j > 5) { |
|
|
|
|
list1.add(list.get((i * 96) + j)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return list1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 求阳性对照平均值 |
|
|
|
|
*/ |
|
|
|
|
private String getYangOdAvg(List<ExamineDataArrVO> list, int i) { |
|
|
|
|
DecimalFormat df = new DecimalFormat("#0.000"); |
|
|
|
|
double a2 = Double.parseDouble(list.get((i * 96) + 2).getOriginResult()); |
|
|
|
|
double b2 = Double.parseDouble(list.get((i * 96) + 3).getOriginResult()); |
|
|
|
|
String format = df.format((a2 + b2) / 2); |
|
|
|
|
return format; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (list1.size() > 0) { |
|
|
|
|
for (ExamineDataArrVO excel : list) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper1.eq(Simple::getExperieNum, excel.getNum()); |
|
|
|
|
Simple simple = simpleService.getOne(wrapper1); |
|
|
|
|
if (simple != null) { |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
map.put("num", excel.getNum()); |
|
|
|
|
map.put("value", excel.getValue()); |
|
|
|
|
map.put("result", excel.getResult()); |
|
|
|
|
resultList.add(map); |
|
|
|
|
/** |
|
|
|
|
* 求阴性对照平均值 |
|
|
|
|
*/ |
|
|
|
|
private String getYinOdAvg(List<ExamineDataArrVO> list, int i) { |
|
|
|
|
DecimalFormat df = new DecimalFormat("#0.000"); |
|
|
|
|
double a1 = Double.parseDouble(list.get(i * 96).getOriginResult()); |
|
|
|
|
double b1 = Double.parseDouble(list.get((i * 96) + 1).getOriginResult()); |
|
|
|
|
String format = df.format((a1 + b1) / 2); |
|
|
|
|
return format; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 过滤没有检测编号的值 |
|
|
|
|
*/ |
|
|
|
|
private List<ExamineDataArrVO> addInVoWhichHasExamNum(List<ExamineDataArrVO> list1, List<ExamineDataArrVO> list, int j) { |
|
|
|
|
for (int k = 0; k < 96; k++) { |
|
|
|
|
ExamineDataArrVO vo = list.get((j * 96) + k); |
|
|
|
|
if (vo.getNum() != null) { |
|
|
|
|
list1.add(vo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result.put("list", resultList); |
|
|
|
|
return list1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 计算口蹄疫的临界值 |
|
|
|
|
*/ |
|
|
|
|
private String calcKTYCriticalValue(List<ExamineDataArrVO> list, int i) { |
|
|
|
|
List<Double> doubles = new ArrayList<>(); |
|
|
|
|
DecimalFormat df = new DecimalFormat("#0.000"); |
|
|
|
|
double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); |
|
|
|
|
double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); |
|
|
|
|
double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); |
|
|
|
|
double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); |
|
|
|
|
doubles.add(a1); |
|
|
|
|
doubles.add(a2); |
|
|
|
|
doubles.add(a3); |
|
|
|
|
doubles.add(a4); |
|
|
|
|
List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); |
|
|
|
|
String format2 = df.format((collect.get(1) + collect.get(2)) / 4); |
|
|
|
|
return format2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 组装临界值、 |
|
|
|
|
*/ |
|
|
|
|
private ExamineDataArrVO assembleCriticalValue(String format2) { |
|
|
|
|
ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); |
|
|
|
|
examineDataArrVO.setNum("临界值"); |
|
|
|
|
examineDataArrVO.setValue(format2); |
|
|
|
|
examineDataArrVO.setResult(""); |
|
|
|
|
return examineDataArrVO; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 求临界值 |
|
|
|
|
*/ |
|
|
|
|
private String calcCriticalValue(List<ExamineDataArrVO> list) { |
|
|
|
|
List<Double> doubles = new ArrayList<>(); |
|
|
|
|
DecimalFormat df = new DecimalFormat("#0.000"); |
|
|
|
|
double a1 = Double.parseDouble(list.get(95).getValue()); |
|
|
|
|
double a2 = Double.parseDouble(list.get(94).getValue()); |
|
|
|
|
double a3 = Double.parseDouble(list.get(93).getValue()); |
|
|
|
|
double a4 = Double.parseDouble(list.get(92).getValue()); |
|
|
|
|
doubles.add(a1); |
|
|
|
|
doubles.add(a2); |
|
|
|
|
doubles.add(a3); |
|
|
|
|
doubles.add(a4); |
|
|
|
|
List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); |
|
|
|
|
String format2 = df.format((collect.get(1) + collect.get(2)) / 4); |
|
|
|
|
return format2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 排序 |
|
|
|
|
*/ |
|
|
|
|
private void sortByOrder(List<ExamineDataArrVO> list) { |
|
|
|
|
Collections.sort(list, new Comparator<ExamineDataArrVO>() { |
|
|
|
|
@Override |
|
|
|
|
public int compare(ExamineDataArrVO o1, ExamineDataArrVO o2) { |
|
|
|
|
return o1.getOrder() - o2.getOrder(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据检测那检测结果 |
|
|
|
|
*/ |
|
|
|
|
private ExamineResult getExamineResultByExamineId(Long examineId) { |
|
|
|
|
LambdaQueryWrapper<ExamineResult> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
queryWrapper.eq(ExamineResult::getExamineId, examineId); |
|
|
|
|
return examineResultService.getOne(queryWrapper); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// String handleUrl = "C://Users//AAA//Desktop//烁今//打印模板//检测报告(模板).docx";
|
|
|
|
|
/** |
|
|
|
|
* 打印相关流操作 |
|
|
|
|
*/ |
|
|
|
|
private void dealAboutPrintStream(HttpServletResponse response, Map<String, Object> reportMainBody, Entrust entrust, String templateUrl) { |
|
|
|
|
// String handleUrl = "C://Users//AAA//Desktop//烁今//打印模板//检测报告(模板).docx";
|
|
|
|
|
XWPFDocument doc = null; |
|
|
|
|
FileOutputStream fos = null; |
|
|
|
|
try { |
|
|
|
|
doc = WordExportUtil.exportWord07(print, result1); |
|
|
|
|
doc = WordExportUtil.exportWord07(templateUrl, reportMainBody); |
|
|
|
|
fos = new FileOutputStream("C://Users//AAA//Desktop//shuojin//dayin//1111111.docx"); |
|
|
|
|
String filename = "测试.docx"; |
|
|
|
|
|
|
|
|
|
response.setContentType("application/octet-stream"); |
|
|
|
|
response.setHeader("content-disposition", "attachment;filename=12344.docx"); |
|
|
|
|
|
|
|
|
|
doc.write(response.getOutputStream()); |
|
|
|
|
entrust.setEntrustStatus("6"); |
|
|
|
|
this.updateById(entrust); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} finally { |
|
|
|
|
@ -724,6 +779,84 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 填充报告的主体内容 |
|
|
|
|
*/ |
|
|
|
|
private Map<String, Object> fillReportMainBody(Entrust entrust, List<Map<String, Object>> ItemAndAllList) { |
|
|
|
|
Map<String, Object> result1 = new HashMap<>(); |
|
|
|
|
result1.put("acceptanceNum", entrust.getAcceptanceNum()); |
|
|
|
|
result1.put("simpleName", entrust.getSimpleName()); |
|
|
|
|
result1.put("takeCompany", entrust.getTakeCompany()); |
|
|
|
|
result1.put("takePerson", entrust.getTakePerson()); |
|
|
|
|
result1.put("takeCompanyAddress", entrust.getTakeCompanyAddress()); |
|
|
|
|
result1.put("takePhone", entrust.getTakePhone()); |
|
|
|
|
result1.put("entrustCustomerName", entrust.getEntrustCustomerName()); |
|
|
|
|
String value = DictBizCache.getValue(DictBizEnum.ENTRUST_INVESTIGATIVE_TYPE, entrust.getInvestigativeType()); |
|
|
|
|
result1.put("investigativeType", value); |
|
|
|
|
result1.put("mailAddr", entrust.getMailAddr()); |
|
|
|
|
result1.put("phone", entrust.getPhone()); |
|
|
|
|
result1.put("submittedBy", entrust.getSubmittedBy()); |
|
|
|
|
SimpleDateFormat format3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
String format4 = ""; |
|
|
|
|
if (entrust.getSamplingDate() != null) { |
|
|
|
|
format4 = format3.format(entrust.getSamplingDate()); |
|
|
|
|
} |
|
|
|
|
result1.put("samplingDate", format4); |
|
|
|
|
result1.put("simpleState", entrust.getSimpleState()); |
|
|
|
|
result1.put("simpleCount", entrust.getSimpleCount()); |
|
|
|
|
result1.put("code", "仪器");//???
|
|
|
|
|
result1.put("experieDate", "检测日期");//???
|
|
|
|
|
result1.put("remark", "备注");//???
|
|
|
|
|
result1.put("resultList1", ItemAndAllList); |
|
|
|
|
// 盖章图片
|
|
|
|
|
ImageEntity farView = new ImageEntity(); |
|
|
|
|
farView.setHeight(80);//设置高度
|
|
|
|
|
farView.setWidth(80);//设置宽度
|
|
|
|
|
farView.setType(ImageEntity.Data);//类型
|
|
|
|
|
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); |
|
|
|
|
String pictureName = sysClient.getParamValue("seal_picture_path").getData(); |
|
|
|
|
String s1 = path + pictureName; |
|
|
|
|
FileInputStream fis = null; |
|
|
|
|
try { |
|
|
|
|
fis = new FileInputStream(new File(s1)); |
|
|
|
|
byte[] bytes = readInputStream(fis); |
|
|
|
|
farView.setData(bytes); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
result1.put("11", farView); |
|
|
|
|
return result1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 填充检验项目、方法、依据 |
|
|
|
|
*/ |
|
|
|
|
private HashMap<String, Object> fillExamineItemAndAll(List<Examine> examineList) { |
|
|
|
|
HashMap<String, Object> map = new HashMap<>(4); |
|
|
|
|
for (Examine examine : examineList) { |
|
|
|
|
if (examine.getExamineItemId() != null) { |
|
|
|
|
ExamineItem byId = examineItemService.getById(examine.getExamineItemId()); |
|
|
|
|
if (byId != null) { |
|
|
|
|
map.put("examineItem", byId.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineWayId() != null) { |
|
|
|
|
ExamineWay byId1 = examineWayService.getById(examine.getExamineWayId()); |
|
|
|
|
if (byId1 != null) { |
|
|
|
|
map.put("examineWay", byId1.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineBasisId() != null) { |
|
|
|
|
ExamineBasis byId2 = examineBasisService.getById(examine.getExamineBasisId()); |
|
|
|
|
if (byId2 != null) { |
|
|
|
|
map.put("examineBasis", byId2.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
map.put("examineResult", "符合标准"); |
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void reportPrint(String examineId, HttpServletResponse response) { |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
|