Commit caf7aefa authored by 刘林's avatar 刘林

fix(jg):添加历史设备,添加使用登记证编号

parent 0bd312a8
......@@ -751,6 +751,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String record = (String) equipmentInfoForm.get(RECORD);
String dataSource = (String) equipmentInfoForm.get(DATA_SOURCE);
if (dataSource.startsWith("jg_his")) {
String useRegistrationCode = String.valueOf(equipmentInfoForm.get("USE_ORG_CODE")).trim();
String equipId = String.valueOf(equipmentInfoForm.get("RECORD"));
// 校验使用登记证编号的唯一性
if (commonService.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId)) {
throw new BadRequest("使用登记证编号已存在!");
}
String regType = Optional.ofNullable(equipmentInfoForm.get("EQU_LIST"))
.filter(code -> CylinderTypeEnum.CYLINDER.getCode().equals(code))
.map(code -> "1".equals(equipmentInfoForm.get("WHETHER_VEHICLE_CYLINDER")) ? "vehicle" : "cylinder")
.orElse("set");
// 判断是否使用未来系统生成编号
idxBizJgRegisterInfoService.checkUseRegistrationCode(useRegistrationCode, regType);
}
try {
// 设备代码 字段的唯一性校验
checkEquCodeUniqueness(equipmentInfoForm);
......
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