Commit c7c6c75c authored by 韩桐桐's avatar 韩桐桐

fix(jg): 设备复制时清使用登记证号

parent c2ba4c55
......@@ -586,7 +586,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 匹配车辆VIN码
List<Map<String, String>> VINMapList = commonMapper.VINAccountUniqueWithVehGasCyl(VIN, record);
boolean hasVIN = !VINMapList.isEmpty();
boolean VINOfTheEnterprise = hasVIN ? JSON.toJSONString(useRegMapList).contains(companyCode) : Boolean.FALSE;
boolean VINOfTheEnterprise = hasVIN ? JSON.toJSONString(VINMapList).contains(companyCode) : Boolean.FALSE;
// 无证无VIN 和 本企业的证本企业的VIN 两种情况可以放行
if ((!hasUseReg && !hasVIN) || (certificateOfTheEnterprise && VINOfTheEnterprise)) {
return;
......@@ -596,14 +596,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
log.info("历史车用气瓶==匹配到的==>使用登记证编号:{},车辆VIN码:{}", JSON.toJSONString(useRegMapList), JSON.toJSONString(VINMapList));
log.info("历史车用气瓶====>是否本企业使用登记证编号:{},是否本企业车辆VIN码:{}", certificateOfTheEnterprise, VINOfTheEnterprise);
}
// 本企业存在证 + VIN属于其他企业 无证 + VIN属于其他企业
if ((certificateOfTheEnterprise && hasVIN && !VINOfTheEnterprise) || (!hasUseReg && hasVIN && !VINOfTheEnterprise)) {
throw new BadRequest("车辆VIN码已被其他企业使用!");
}
// 本企业存在证 + 无VIN 无证 + 本企业存在VIN
if ((certificateOfTheEnterprise && !hasVIN) || (!hasUseReg && VINOfTheEnterprise)) {
throw new BadRequest("使用的登记证号,车辆VIN码与本企业原先录入的数据不一致!");
}
// 本企业存在证 + VIN属于其他企业 无证 + VIN属于其他企业
if ((certificateOfTheEnterprise && hasVIN && !VINOfTheEnterprise) || (!hasUseReg && hasVIN && !VINOfTheEnterprise)) {
throw new BadRequest("车辆VIN码已被其他企业使用!");
}
// 其他企业存在证 + 本企业存在VIN 其他企业存在证 + 无VIN
if ((hasUseReg && !certificateOfTheEnterprise && VINOfTheEnterprise) || (hasUseReg && !certificateOfTheEnterprise && !hasVIN)) {
throw new BadRequest("使用的登记证号已被其他企业使用!");
......@@ -742,10 +742,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
equipInfoMap.put("EQU_CODE_TYPE", "1");
equipInfoMap.put("SUPERVISORY_CODE", null);
equipInfoMap.put("CAR_NUMBER", null);
equipInfoMap.put("useRegistrationCode", null);
// 气瓶的部分信息赋空
equipInfoMap.put("INFORMATION_SITUATION", null);
equipInfoMap.put("INFORMATION_MANAGE_CODE", null);
equipInfoMap.put("CYLINDER_STAMP_ATTACHMENT", null);
equipInfoMap.put("identificationCode", null);
}
return resultMap;
}
......
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