1.检测报告的仪器设备换行问题

2.去掉三级审批电子签名
3.调整布板图位置
dev
litao 3 years ago
parent 28f9f81d5b
commit 81423b98ff
  1. 16
      lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ReagentController.java
  2. 142
      lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java

@ -90,14 +90,14 @@ public class ReagentController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperation(value = "更改", notes = "更改") @ApiOperation(value = "更改", notes = "更改")
public R update(@RequestBody Reagent entry) throws Exception { public R update(@RequestBody Reagent entry) throws Exception {
List<Reagent> list = service.list(); // List<Reagent> list = service.list();
if (list != null && list.size() > 0) { // if (list != null && list.size() > 0) {
for (Reagent reagent : list) { // for (Reagent reagent : list) {
if (entry.getName().equals(reagent.getName()) && entry.getManufacturer().equals(reagent.getManufacturer())) { // if (entry.getName().equals(reagent.getName()) && entry.getManufacturer().equals(reagent.getManufacturer())) {
throw new Exception("名称重复"); // throw new Exception("名称重复");
} // }
} // }
} // }
List<TypeAndOperation> operationList = entry.getOperationList(); List<TypeAndOperation> operationList = entry.getOperationList();
if (operationList != null && operationList.size() > 0) { if (operationList != null && operationList.size() > 0) {
entry.setTypeAndOperation(JSON.toJSONString(operationList)); entry.setTypeAndOperation(JSON.toJSONString(operationList));

@ -1007,8 +1007,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
// 获取该仪器对象 // 获取该仪器对象
Instrument instrument = instrumentService.getById(s); Instrument instrument = instrumentService.getById(s);
// 拼接仪器编号及名称 // 拼接仪器编号及名称
instrumentName += instrument.getCode() + " " + instrument.getName() + "\r"; instrumentName += instrument.getName() + " " + instrument.getCode() + ",";
} }
String replace = instrumentName.replace(",", "\r");
result1.put("code", instrumentName); 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());
@ -1016,59 +1018,59 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
// 图片路劲 // 图片路劲
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); String path = sysClient.getParamValue("electronic_signature_real_path").getData();
// 编制人签名 // 编制人签名
if (StringUtil.isNotBlank(entrust.getOrganizationBy())) { // if (StringUtil.isNotBlank(entrust.getOrganizationBy())) {
User user = userClient.userInfoById(Long.parseLong(entrust.getOrganizationBy())).getData(); // User user = userClient.userInfoById(Long.parseLong(entrust.getOrganizationBy())).getData();
ImageEntity farView = new ImageEntity(); // ImageEntity farView = new ImageEntity();
farView.setHeight(50);//设置高度 // farView.setHeight(50);//设置高度
farView.setWidth(90);//设置宽度 // farView.setWidth(90);//设置宽度
farView.setType(ImageEntity.Data);//类型 // farView.setType(ImageEntity.Data);//类型
String s1 = path + user.getElectronicSignature(); // String s1 = path + user.getElectronicSignature();
FileInputStream fis = null; // FileInputStream fis = null;
try { // try {
fis = new FileInputStream(new File(s1)); // fis = new FileInputStream(new File(s1));
byte[] bytes = readInputStream(fis); // byte[] bytes = readInputStream(fis);
farView.setData(bytes); // farView.setData(bytes);
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
result1.put("1", farView); // result1.put("1", farView);
} // }
// 审核人签名 // 审核人签名
if (StringUtil.isNotBlank(entrust.getVerifyBy())) { // if (StringUtil.isNotBlank(entrust.getVerifyBy())) {
User user = userClient.userInfoById(Long.parseLong(entrust.getVerifyBy())).getData(); // User user = userClient.userInfoById(Long.parseLong(entrust.getVerifyBy())).getData();
ImageEntity farView = new ImageEntity(); // ImageEntity farView = new ImageEntity();
farView.setHeight(50);//设置高度 // farView.setHeight(50);//设置高度
farView.setWidth(90);//设置宽度 // farView.setWidth(90);//设置宽度
farView.setType(ImageEntity.Data);//类型 // farView.setType(ImageEntity.Data);//类型
String s1 = path + user.getElectronicSignature(); // String s1 = path + user.getElectronicSignature();
FileInputStream fis = null; // FileInputStream fis = null;
try { // try {
fis = new FileInputStream(new File(s1)); // fis = new FileInputStream(new File(s1));
byte[] bytes = readInputStream(fis); // byte[] bytes = readInputStream(fis);
farView.setData(bytes); // farView.setData(bytes);
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
result1.put("2", farView); // result1.put("2", farView);
} // }
// 审批人签名 // 审批人签名
if (StringUtil.isNotBlank(entrust.getApprovalBy())) { // if (StringUtil.isNotBlank(entrust.getApprovalBy())) {
User user = userClient.userInfoById(Long.parseLong(entrust.getApprovalBy())).getData(); // User user = userClient.userInfoById(Long.parseLong(entrust.getApprovalBy())).getData();
ImageEntity farView = new ImageEntity(); // ImageEntity farView = new ImageEntity();
farView.setHeight(50);//设置高度 // farView.setHeight(50);//设置高度
farView.setWidth(90);//设置宽度 // farView.setWidth(90);//设置宽度
farView.setType(ImageEntity.Data);//类型 // farView.setType(ImageEntity.Data);//类型
String s1 = path + user.getElectronicSignature(); // String s1 = path + user.getElectronicSignature();
FileInputStream fis = null; // FileInputStream fis = null;
try { // try {
fis = new FileInputStream(new File(s1)); // fis = new FileInputStream(new File(s1));
byte[] bytes = readInputStream(fis); // byte[] bytes = readInputStream(fis);
farView.setData(bytes); // farView.setData(bytes);
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
result1.put("3", farView); // result1.put("3", farView);
} // }
// 盖章图片 // 盖章图片
// ImageEntity farView = new ImageEntity(); // ImageEntity farView = new ImageEntity();
// farView.setHeight(80);//设置高度 // farView.setHeight(80);//设置高度
@ -1133,9 +1135,23 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
} }
} }
String s = yangNum + "份为阳性," + yinNum + "份为阴性"; String s = "共" + examine.getSimpleCount() + "份样品,";
if (yangNum == examine.getSimpleCount()) {
s += "均为阳性";
} else if (yinNum == examine.getSimpleCount()) {
s += "均为阴性";
} else if (keyiNum == examine.getSimpleCount()) {
s += "均为可疑";
} else {
if (yangNum > 0) {
s += yangNum + "份为阳性 ";
}
if (yinNum > 0) {
s += yinNum + "份为阴性 ";
}
if (keyiNum > 0) { if (keyiNum > 0) {
s += "," + keyiNum + "份为可疑"; s += keyiNum + "份为可疑";
}
} }
map.put("examineResult", s); map.put("examineResult", s);
ItemAndAllList.add(map); ItemAndAllList.add(map);
@ -1255,10 +1271,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
if (i == (split2.length - 1)) { if (i == (split2.length - 1)) {
instrumentName += s2; instrumentName += s2;
} else { } else {
instrumentName += s2 + "\r"; instrumentName += s2 + ",";
} }
} }
result.put("9", instrumentName); result.put("9", instrumentName.replace(",", "\r"));
// 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");
@ -1896,7 +1912,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
map.put("0", "布板图"); map.put("13", "布板图");
} else if (j == 1) { } else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
@ -2006,7 +2022,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO();
examineDataArrVO.setNum("临界值"); examineDataArrVO.setNum("临界值");
examineDataArrVO.setValue(""); examineDataArrVO.setValue("");
examineDataArrVO.setResult(format2); examineDataArrVO.setLog2(format2);
list1.add(examineDataArrVO); list1.add(examineDataArrVO);
for (int j = 0; j < 96; j++) { for (int j = 0; j < 96; j++) {
ExamineDataArrVO vo = list.get((i * 96) + j); ExamineDataArrVO vo = list.get((i * 96) + j);
@ -2181,7 +2197,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
map.put("0", "布板图"); map.put("13", "布板图");
} else if (j == 1) { } else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
@ -2291,7 +2307,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO();
examineDataArrVO.setNum("临界值"); examineDataArrVO.setNum("临界值");
examineDataArrVO.setValue(""); examineDataArrVO.setValue("");
examineDataArrVO.setResult(format2); examineDataArrVO.setLog2(format2);
list1.add(examineDataArrVO); list1.add(examineDataArrVO);
for (int j = 0; j < 96; j++) { for (int j = 0; j < 96; j++) {
ExamineDataArrVO vo = list.get((i * 96) + j); ExamineDataArrVO vo = list.get((i * 96) + j);
@ -2466,7 +2482,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
map.put("0", "布板图"); map.put("13", "布板图");
} else if (j == 1) { } else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
@ -2723,12 +2739,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
} }
} }
for (int j = 0; j < 10; j++) { for (int j = 0; j < 10; j++) {
int x = 0; int x = 0;
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
map.put("13", "布板图");
} else if (j == 1) { } else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
@ -2871,7 +2887,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
map.put("0", "布板图"); map.put("13", "布板图");
} else if (j == 1) { } else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");

Loading…
Cancel
Save