master
杨海航 6 months ago
parent 251ac36139
commit 2f52d8c425
  1. 4
      src/main/java/digital/laboratory/platform/entrustment/controller/EntrustmentController.java
  2. 11
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java
  3. 3
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentServiceImpl.java

@ -206,8 +206,8 @@ public class EntrustmentController {
.in((statuses != null) && (statuses.size() > 0), "e.status", statuses) .in((statuses != null) && (statuses.size() > 0), "e.status", statuses)
.eq(dataSources != null, "e.data_sources", dataSources) .eq(dataSources != null, "e.data_sources", dataSources)
.like(StrUtil.isNotBlank(caseName), "c.case_name", caseName) .like(StrUtil.isNotBlank(caseName), "c.case_name", caseName)
.orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 9, "e.accept_no") .orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 9, "CAST(SUBSTRING(e.accept_no, 1,4) AS UNSIGNED)","CAST(SUBSTRING(e.accept_no, 6) AS UNSIGNED)")
.orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 7, "e.entrustment_no") .orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 7, "CAST(SUBSTRING(e.entrustment_no, 4,4) AS UNSIGNED)","CAST(SUBSTRING(e.entrustment_no, 9) AS UNSIGNED)")
); );
} else { } else {
//-- 当前用户是普通用户, 不是鉴定中心员工 //-- 当前用户是普通用户, 不是鉴定中心员工

@ -431,8 +431,8 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
//如果被占用,则编号自动+1 //如果被占用,则编号自动+1
String[] acceptArr = _acceptNo.split("-"); String[] acceptArr = _acceptNo.split("-");
int acceptSeq = Integer.parseInt(acceptArr[1]) + 1; int acceptSeq = Integer.parseInt(acceptArr[1]) + 1;
String acceptSeqStr = fillByZero(acceptSeq); // String acceptSeqStr = fillByZero(acceptSeq);
String newAcceptNo = acceptArr[0] + "-" + acceptSeqStr; String newAcceptNo = acceptArr[0] + "-" + acceptSeq;
return checkAcceptNoIsUse(newAcceptNo); return checkAcceptNoIsUse(newAcceptNo);
} }
return _acceptNo; return _acceptNo;
@ -621,7 +621,8 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
} }
if ((im.getAcceptPassed() != null) && (im.getAcceptPassed() != 0)) { if ((im.getAcceptPassed() != null) && (im.getAcceptPassed() != 0)) {
throw new RuntimeException(String.format("检材只能在未受理状态才能保存")); continue;
// throw new RuntimeException(String.format("检材只能在未受理状态才能保存"));
} }
Entrustment entrustment = entrustmentService.getById(im.getEntrustmentId()); Entrustment entrustment = entrustmentService.getById(im.getEntrustmentId());
@ -1241,7 +1242,6 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
public List<EntrustmentIdentificationMaterial> createNewIm(List<EntrustmentIdentificationMaterial> identificationMaterialList, DLPUser dlpUser) { public List<EntrustmentIdentificationMaterial> createNewIm(List<EntrustmentIdentificationMaterial> identificationMaterialList, DLPUser dlpUser) {
Entrustment entrustment = entrustmentService.getById(identificationMaterialList.get(0).getEntrustmentId()); Entrustment entrustment = entrustmentService.getById(identificationMaterialList.get(0).getEntrustmentId());
if (!dlpUser.isStaff() && entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { if (!dlpUser.isStaff() && entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) {
throw new RuntimeException(String.format("你已提交过该委托,无法再添加检材信息!")); throw new RuntimeException(String.format("你已提交过该委托,无法再添加检材信息!"));
} }
@ -1481,7 +1481,8 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
// data.put("evidence", evidence); // data.put("evidence", evidence);
maps.add(data); maps.add(data);
String templateFileName = AppStartupRunner.getCfg(CommonConstants.DLP_CODE_ENTRUSTMENT_LABEL_TEMPLATE_IM_SAMPLE1); // String templateFileName = AppStartupRunner.getCfg(CommonConstants.DLP_CODE_ENTRUSTMENT_LABEL_TEMPLATE_IM_SAMPLE1);
String templateFileName ="(大)受理时打印的检材条码模板.vm";
List<String> htmlA = remoteTemplate2htmlService.getManyHtml(templateFileName, maps); List<String> htmlA = remoteTemplate2htmlService.getManyHtml(templateFileName, maps);
htmlList.addAll(htmlA); htmlList.addAll(htmlA);
} }

@ -203,6 +203,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
// } // }
//新委托编号规则 //新委托编号规则
//2023-07-09 调整检材编号规则,规则为年份+委托流水号,流水号为4位,不需要用0补充不足的位数,中间用 “-”相连接 //2023-07-09 调整检材编号规则,规则为年份+委托流水号,流水号为4位,不需要用0补充不足的位数,中间用 “-”相连接
//2024-9-9 贵阳市局需求,不需要用0补位了
@Override @Override
public String getNewEntrustmentNo() { public String getNewEntrustmentNo() {
LocalDateTime date = LocalDateTime.now(); LocalDateTime date = LocalDateTime.now();
@ -213,7 +214,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
String newWtNO = ""; String newWtNO = "";
if (StringUtils.isNotBlank(maxNo)) { if (StringUtils.isNotBlank(maxNo)) {
maxNo = maxNo.substring(maxNo.lastIndexOf("-") + 1); maxNo = maxNo.substring(maxNo.lastIndexOf("-") + 1);
int newCount = Integer.valueOf(maxNo) + 1; int newCount = Integer.parseInt(maxNo) + 1;
// String second_part = fillByZero(newCount); // String second_part = fillByZero(newCount);
newWtNO = first_part + splitSymbol + newCount; newWtNO = first_part + splitSymbol + newCount;
} else { } else {

Loading…
Cancel
Save