Commit 89e9e4bd authored by hcing's avatar hcing

bugfix:台套认领设备使用登记证编号校验修改

parent e1978de1
...@@ -835,6 +835,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -835,6 +835,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (dataSource.contains("his")) { if (dataSource.contains("his")) {
// 使用登记证编号校验 // 使用登记证编号校验
this.checkUseRegistrationCodeIsNotNUll(equipmentInfoForm);
this.checkUseRegistrationCode(equipmentInfoForm); this.checkUseRegistrationCode(equipmentInfoForm);
} }
...@@ -887,9 +888,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -887,9 +888,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.map(String::valueOf) .map(String::valueOf)
.map(String::trim) .map(String::trim)
.orElse(null); .orElse(null);
if (useRegistrationCode == null) {
throw new BadRequest("请填写使用登记证编号后进行暂存!");
}
String equipId = String.valueOf(equipmentInfoForm.get("RECORD")); String equipId = String.valueOf(equipmentInfoForm.get("RECORD"));
// 校验使用登记证编号的唯一性 // 校验使用登记证编号的唯一性
if (!CylinderTypeEnum.CYLINDER.getCode().equals(equipmentInfoForm.get("EQU_CATEGORY")) && commonService.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId)) { if (!CylinderTypeEnum.CYLINDER.getCode().equals(equipmentInfoForm.get("EQU_CATEGORY")) && commonService.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId)) {
...@@ -913,6 +911,20 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -913,6 +911,20 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
idxBizJgRegisterInfoService.checkUseRegistrationCode(useRegistrationCode, regType); idxBizJgRegisterInfoService.checkUseRegistrationCode(useRegistrationCode, regType);
} }
/**
* 使用登记证编号为空相关校验
* @param equipmentInfoForm
*/
private void checkUseRegistrationCodeIsNotNUll(LinkedHashMap equipmentInfoForm) {
String useRegistrationCode = Optional.ofNullable(equipmentInfoForm.get("useRegistrationCode"))
.map(String::valueOf)
.map(String::trim)
.orElse(null);
if (useRegistrationCode == null) {
throw new BadRequest("请填写使用登记证编号后进行暂存!");
}
}
private Object checkAndCast(Object obj) { private Object checkAndCast(Object obj) {
if (obj instanceof LinkedHashMap) { if (obj instanceof LinkedHashMap) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment