Commit 86ca77c1 authored by 刘林's avatar 刘林

fix(jg): 监管业务系统 ,安装单位录入设备后,发起安装告知并审核通过,监管单位对该告知流程进行作废之后,安装单位无法查到到该设备

parent 4c7f2135
......@@ -1328,8 +1328,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
map1.put("USE_UNIT_NAME", jgInstallationNotice.getUseUnitName());
map1.put("IS_INTO_MANAGEMENT", true);
map1.put("USE_PLACE_CODE", dto.getProvince().split("_")[0] + "#" + dto.getCity().split("_")[0] + "#" + dto.getCounty().split("_")[0] + "#" + dto.getFactoryUseSiteStreet().split("_")[0]);
map1.put("USC_UNIT_CREDIT_CODE", "");
map1.put("USC_UNIT_NAME", "");
map1.put("USC_UNIT_CREDIT_CODE", jgInstallationNotice.getInstallUnitCreditCode());
map1.put("USC_UNIT_NAME", jgInstallationNotice.getInstallUnitName());
map1.put("USE_PLACE", String.format("%s/%s/%s/%s", jgInstallationNotice.getProvinceName(), jgInstallationNotice.getCityName(), jgInstallationNotice.getCountyName(), jgInstallationNotice.getStreetName()));
map1.put("ADDRESS", jgInstallationNotice.getAddress());
objMap.put(tzsJgOtherInfo.getRecord(), map1);
......
......@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
......@@ -191,6 +192,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private IdxBizJgConstructionInfoServiceImpl idxBizJgConstructionInfoService;
@Autowired
private JgInstallationNoticeServiceImpl jgInstallationNoticeService;
@Autowired
private IdxBizJgConstructionInfoMapper constructionInfoMapper;
/**
* @param auditPassDate 通过时间
......@@ -1402,6 +1405,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param.put("USE_SITE_CODE", String.valueOf(jsonObject.get("usePlace")));
param.put("ORG_BRANCH_CODE", split[0]);
param.put("ORG_BRANCH_NAME", split[1]);
param.put("USC_UNIT_CREDIT_CODE", "");
param.put("USC_UNIT_NAME", "");
param.put("EQU_CODE", dataMap.get("equCode"));
param.put("USE_ORG_CODE", jgUseRegistration.getUseRegistrationCode());
objMap.put((String) dataMap.get("equipId"), param);
......@@ -2383,6 +2388,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
private void rollBackForEquipEsInfo(String record, Boolean flag) {
LambdaQueryWrapper<IdxBizJgConstructionInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.select(IdxBizJgConstructionInfo::getUscUnitCreditCode,
IdxBizJgConstructionInfo::getUscUnitName,
IdxBizJgConstructionInfo::getInformCode,
IdxBizJgConstructionInfo::getInformFilePath)
.eq(IdxBizJgConstructionInfo::getRecord, record)
.orderByDesc(TzsBaseEntity::getRecDate)
.last("limit 1");
IdxBizJgConstructionInfo jgConstructionInfo = constructionInfoMapper.selectOne(wrapper);
Optional<ESEquipmentCategoryDto> optional = esEquipmentCategory.findById(record);
if (optional.isPresent()) {
ESEquipmentCategoryDto esEquipmentCategoryDto = optional.get();
......@@ -2391,6 +2405,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
esEquipmentCategoryDto.setEQU_STATE(null);
esEquipmentCategoryDto.setORG_BRANCH_CODE(null);
esEquipmentCategoryDto.setORG_BRANCH_NAME(null);
if (jgConstructionInfo != null){
esEquipmentCategoryDto.setUSC_UNIT_NAME(jgConstructionInfo.getUscUnitName());
esEquipmentCategoryDto.setUSC_UNIT_CREDIT_CODE(jgConstructionInfo.getUscUnitCreditCode());
}
if (flag) {
esEquipmentCategoryDto.setIS_INTO_MANAGEMENT(Boolean.FALSE);
}
......
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