Commit 3807a89c authored by suhuiguang's avatar suhuiguang

1.修改安装告知完成时,产权单位信息未入库,导致使用登记时,选择安装告知的设备,未回填产权单位字段

parent 4f28ed5e
......@@ -955,37 +955,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
constructionInfoService.saveOrUpdateData(idxBizJgConstructionInfo);
}
// 使用信息表更新是否西咸
IdxBizJgUseInfo useInfo = useInfoService.getOneData(jgRelationEquip.getEquId());
if (!ObjectUtils.isEmpty(useInfo)) {
useInfo.setUseUnitCreditCode(jgInstallationNotice.getUseUnitCreditCode());
useInfo.setUseUnitName(jgInstallationNotice.getUseUnitName());
useInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian() == null ? "0" : jgInstallationNotice.getIsXixian());
useInfoService.saveOrUpdateData(useInfo);
}
// 修改属地 - 字段去除
// LambdaUpdateWrapper<SuperviseInfo> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
// lambdaUpdateWrapper.eq(SuperviseInfo::getRecord, jgRelationEquip.getEquId());
// SuperviseInfo superviseInfo = new SuperviseInfo();
// superviseInfo.setOrgBranchName(jgInstallationNotice.getOrgBranchName());
// superviseInfo.setOrgBranchCode(jgInstallationNotice.getOrgBranchCode());
// superviseInfoMapper.update(superviseInfo, lambdaUpdateWrapper);
// 修改使用信息
LambdaUpdateWrapper<IdxBizJgUseInfo> lambda = new LambdaUpdateWrapper<>();
lambda.eq(IdxBizJgUseInfo::getRecord, jgRelationEquip.getEquId());
IdxBizJgUseInfo idxBizJgUseInfo = new IdxBizJgUseInfo();
idxBizJgUseInfo.setProvince(jgInstallationNotice.getProvince());
idxBizJgUseInfo.setProvinceName(jgInstallationNotice.getProvinceName());
idxBizJgUseInfo.setCity(jgInstallationNotice.getCity());
idxBizJgUseInfo.setCityName(jgInstallationNotice.getCityName());
idxBizJgUseInfo.setCounty(jgInstallationNotice.getCounty());
idxBizJgUseInfo.setCountyName(jgInstallationNotice.getCountyName());
idxBizJgUseInfo.setFactoryUseSiteStreet(jgInstallationNotice.getFactoryUseSiteStreet());
idxBizJgUseInfo.setStreetName(jgInstallationNotice.getStreetName());
idxBizJgUseInfo.setAddress(jgInstallationNotice.getAddress());
idxBizJgUseInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian());
idxBizJgUseInfoMapper.update(idxBizJgUseInfo, lambda);
// 更新使用信息
updateJgUseInfo(jgInstallationNotice, jgRelationEquip);
// 上个代办改为已办
HashMap<String, Object> taskMap = new HashMap<>();
......@@ -1070,6 +1041,27 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
private void updateJgUseInfo(JgInstallationNotice jgInstallationNotice, JgInstallationNoticeEq jgRelationEquip) {
LambdaUpdateWrapper<IdxBizJgUseInfo> lambda = new LambdaUpdateWrapper<>();
lambda.eq(IdxBizJgUseInfo::getRecord, jgRelationEquip.getEquId());
IdxBizJgUseInfo idxBizJgUseInfo = new IdxBizJgUseInfo();
idxBizJgUseInfo.setUseUnitCreditCode(jgInstallationNotice.getUseUnitCreditCode());
idxBizJgUseInfo.setUseUnitName(jgInstallationNotice.getUseUnitName());
idxBizJgUseInfo.setProvince(jgInstallationNotice.getProvince());
idxBizJgUseInfo.setProvinceName(jgInstallationNotice.getProvinceName());
idxBizJgUseInfo.setCity(jgInstallationNotice.getCity());
idxBizJgUseInfo.setCityName(jgInstallationNotice.getCityName());
idxBizJgUseInfo.setCounty(jgInstallationNotice.getCounty());
idxBizJgUseInfo.setCountyName(jgInstallationNotice.getCountyName());
idxBizJgUseInfo.setFactoryUseSiteStreet(jgInstallationNotice.getFactoryUseSiteStreet());
idxBizJgUseInfo.setStreetName(jgInstallationNotice.getStreetName());
idxBizJgUseInfo.setAddress(jgInstallationNotice.getAddress());
idxBizJgUseInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian());
idxBizJgUseInfo.setEstateUnitCreditCode(jgInstallationNotice.getPropertyUnitCreditCode());
idxBizJgUseInfo.setEstateUnitName(jgInstallationNotice.getPropertyUnitName());
idxBizJgUseInfoMapper.update(idxBizJgUseInfo, lambda);
}
private void saveHisDataBeforeUpdate(JgInstallationNotice jgInstallationNotice, String equId) {
Map<String, Object> map = idxBizJgRegisterInfoService.getDetailFieldCamelCaseByRecord(equId);
commonService.saveOrUpdateHistory(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getName(), new JSONObject(map), equId, jgInstallationNotice.getSequenceNbr().toString());
......
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