Commit 8c3495a5 authored by 刘林's avatar 刘林

fix(jg):【现场问题】一码通已认领设备编辑信息保存时候提示96333吗已存在

parent 1b5db157
...@@ -126,6 +126,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -126,6 +126,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 96333识别码 // 96333识别码
private static final String CODE96333 = "CODE96333"; private static final String CODE96333 = "CODE96333";
private static final String SEQUENCE_NBR = "SEQUENCE_NBR"; private static final String SEQUENCE_NBR = "SEQUENCE_NBR";
private static final String OTHERINFO_SEQ = "OTHERINFO_SEQ";
private static final String FACTORY_NUM = "FACTORY_NUM"; private static final String FACTORY_NUM = "FACTORY_NUM";
// 新增设备是否复制而来 // 新增设备是否复制而来
private static final String IS_COPY = "isCopy"; private static final String IS_COPY = "isCopy";
...@@ -360,7 +361,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -360,7 +361,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 根据96333码检查唯一性 // 根据96333码检查唯一性
LambdaQueryWrapper<OtherInfo> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OtherInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(OtherInfo::getCode96333, equipmentInfoForm.get(CODE96333)); wrapper.eq(OtherInfo::getCode96333, equipmentInfoForm.get(CODE96333));
wrapper.ne(!ObjectUtils.isEmpty(equipmentInfoForm.get(SEQUENCE_NBR)), OtherInfo::getSequenceNbr, equipmentInfoForm.get(SEQUENCE_NBR)); wrapper.ne(!ObjectUtils.isEmpty(equipmentInfoForm.get(OTHERINFO_SEQ)), OtherInfo::getSequenceNbr, equipmentInfoForm.get(OTHERINFO_SEQ));
Integer count = otherInfoMapper.selectCount(wrapper); Integer count = otherInfoMapper.selectCount(wrapper);
if (count > 0) { if (count > 0) {
throw new BadRequest("96333码已存在,请确认后重新输入!"); throw new BadRequest("96333码已存在,请确认后重新输入!");
...@@ -2563,6 +2564,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2563,6 +2564,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.eq(JgUseRegistration::getProjectContraption, jsonObject.get("projectContraption")) .eq(JgUseRegistration::getProjectContraption, jsonObject.get("projectContraption"))
.eq(JgUseRegistration::getUseUnitCreditCode, useUnitCreditCode) .eq(JgUseRegistration::getUseUnitCreditCode, useUnitCreditCode)
.eq(JgUseRegistration::getIsAddEquip, "0") .eq(JgUseRegistration::getIsAddEquip, "0")
.eq(JgUseRegistration::getStatus, "已完成")
.ne(JgUseRegistration::getStatus, "已作废")).isEmpty() && "0".equals(jsonObject.get("isAddEquip"))) { .ne(JgUseRegistration::getStatus, "已作废")).isEmpty() && "0".equals(jsonObject.get("isAddEquip"))) {
throw new BadRequest("该工程装置已做过使用登记,再选择增补功能进行登记!"); throw new BadRequest("该工程装置已做过使用登记,再选择增补功能进行登记!");
} }
......
...@@ -1058,8 +1058,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1058,8 +1058,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_INSTALL_NOTICE_KEY).delDataForCheckEquipRepeatUsed(ids, jgInstallationNotice.getInstallUnitCreditCode()); EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_INSTALL_NOTICE_KEY).delDataForCheckEquipRepeatUsed(ids, jgInstallationNotice.getInstallUnitCreditCode());
} }
@GlobalTransactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 6000000)
public void accept(JgInstallationNoticeDto dto, String op) { public void accept(JgInstallationNoticeDto dto, String op) {
String xid = GlobalTransactionContext.getCurrentOrCreate().getXid(); String xid = GlobalTransactionContext.getCurrentOrCreate().getXid();
log.info(xid); log.info(xid);
......
...@@ -181,7 +181,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -181,7 +181,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private JgResumeInfoServiceImpl jgResumeInfoService; private JgResumeInfoServiceImpl jgResumeInfoService;
@Autowired @Autowired
private JgCertificateChangeRecordServiceImpl certificateChangeRecordService; private JgCertificateChangeRecordServiceImpl certificateChangeRecordService;
@Autowired @Autowired
private JgUseRegistrationManageMapper jgUseRegistrationManageMapper; private JgUseRegistrationManageMapper jgUseRegistrationManageMapper;
@Autowired @Autowired
...@@ -2531,6 +2530,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2531,6 +2530,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<JgUseRegistration> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgUseRegistration> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgUseRegistration::getApplyNo, applyNo); queryWrapper.eq(JgUseRegistration::getApplyNo, applyNo);
JgUseRegistration jgUseRegistration = this.baseMapper.selectOne(queryWrapper); JgUseRegistration jgUseRegistration = this.baseMapper.selectOne(queryWrapper);
LambdaQueryWrapper<JgUseRegistrationManage> wrapper = new LambdaQueryWrapper<JgUseRegistrationManage>()
.eq(JgUseRegistrationManage::getApplyNo, applyNo);
jgUseRegistrationManageMapper.delete(wrapper);
if (jgUseRegistration != null) { if (jgUseRegistration != null) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(jgUseRegistration.getInstanceId()); String lockKey = CommonServiceImpl.buildJgExecuteLockKey(jgUseRegistration.getInstanceId());
......
...@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; ...@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.dto.*; import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.*; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.*; import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationManageMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgVehicleInformationService; import com.yeejoin.amos.boot.module.jg.api.service.IJgVehicleInformationService;
...@@ -155,6 +156,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -155,6 +156,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
private JgUseRegistrationManageServiceImpl jgUseRegistrationManageService; private JgUseRegistrationManageServiceImpl jgUseRegistrationManageService;
@Autowired @Autowired
private WorkFlowFeignService workFlowFeignService; private WorkFlowFeignService workFlowFeignService;
@Autowired
private JgUseRegistrationManageMapper jgUseRegistrationManageMapper;
private Map<String, Object> fillingMediumMap; private Map<String, Object> fillingMediumMap;
...@@ -1603,6 +1606,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1603,6 +1606,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
LambdaQueryWrapper<JgVehicleInformation> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgVehicleInformation> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgVehicleInformation::getApplyNo, applyNo); queryWrapper.eq(JgVehicleInformation::getApplyNo, applyNo);
JgVehicleInformation jgVehicleInformation = this.baseMapper.selectOne(queryWrapper); JgVehicleInformation jgVehicleInformation = this.baseMapper.selectOne(queryWrapper);
LambdaQueryWrapper<JgUseRegistrationManage> wrapper = new LambdaQueryWrapper<JgUseRegistrationManage>()
.eq(JgUseRegistrationManage::getApplyNo, applyNo);
jgUseRegistrationManageMapper.delete(wrapper);
if (jgVehicleInformation != null) { if (jgVehicleInformation != null) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(jgVehicleInformation.getInstanceId()); String lockKey = CommonServiceImpl.buildJgExecuteLockKey(jgVehicleInformation.getInstanceId());
......
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