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

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

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