Commit 5242f498 authored by 刘林's avatar 刘林

fix(JG):气瓶导入功能开发Bug修改

parent 3dce5429
......@@ -82,9 +82,20 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
checkNotBlank(data.getEquCodeType(), "是否有设备代码不能为空");
if ("1".equals(data.getEquCodeType())) {
checkNotBlank(data.getEquCode(), "设备代码不能为空");
}
if ("1".equals(data.getEquCodeType()) && equCodeList.contains(data.getEquCode())) {
result.append("设备代码不能重复;");
String equCode = data.getEquCode();
if (equCode.matches("[a-zA-Z0-9]+")) {
if (equCode.length() <= 17) {
result.append("设备代码不能小于17位");
}
if (equCode.length() >= 20) {
result.append("设备代码不能大于20位");
}
} else {
result.append("设备代码不能包含特殊字符");
}
if (equCodeList.contains(data.getEquCode())) {
result.append("设备代码不能重复;");
}
}
this.checkEquCodeUniqueness(data.getEquCode());
checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空");
......
......@@ -173,6 +173,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
LambdaQueryWrapper<JgVehicleInformation> vehicleInfoWrapper = new LambdaQueryWrapper<>();
vehicleInfoWrapper.eq(JgVehicleInformation::getCarNumber, vehicleInfoDto.getCarNumber());
vehicleInfoWrapper.eq(JgVehicleInformation::getIsDelete, false);
vehicleInfoWrapper.ne(JgVehicleInformation::getStatus, "已作废");
vehicleInfoWrapper.ne(!ValidationUtil.isEmpty(vehicleInfoDto.getSequenceNbr()), JgVehicleInformation::getSequenceNbr, vehicleInfoDto.getSequenceNbr());
Integer count = this.baseMapper.selectCount(vehicleInfoWrapper);
if (count > 0) {
......@@ -183,6 +184,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
LambdaQueryWrapper<JgVehicleInformation> informationLambdaQueryWrapper = new LambdaQueryWrapper<>();
informationLambdaQueryWrapper.eq(JgVehicleInformation::getIdentificationCode, vehicleInfoDto.getIdentificationCode());
informationLambdaQueryWrapper.eq(JgVehicleInformation::getIsDelete, false);
informationLambdaQueryWrapper.ne(JgVehicleInformation::getStatus, "已作废");
informationLambdaQueryWrapper.ne(!ValidationUtil.isEmpty(vehicleInfoDto.getSequenceNbr()), JgVehicleInformation::getSequenceNbr, vehicleInfoDto.getSequenceNbr());
Integer identificationCodeCount = this.baseMapper.selectCount(informationLambdaQueryWrapper);
if (identificationCodeCount > 0) {
......
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