Commit 43f436ec authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://39.100.92.250:5000/moa/amos-boot-biz into develop_tzs_register
parents 52e05a78 35f0a762
......@@ -112,7 +112,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private static final String CONSTRUCTION_TYPE = "SGLX";
private static final String CONSTRUCTION_TYPE_NAME = "安装";
@Autowired
JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper;
@Autowired
......@@ -1934,7 +1933,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
projectContraption.setProvince(jgInstallationNotice.getProvince());
projectContraption.setCity(jgInstallationNotice.getCity());
projectContraption.setCounty(jgInstallationNotice.getCounty());
projectContraption.setStreet(jgInstallationNotice.getStreet());
projectContraption.setStreet(jgInstallationNotice.getFactoryUseSiteStreet());
projectContraption.setAddress(jgInstallationNotice.getAddress());
projectContraptionService.updateById(projectContraption);
......
......@@ -2442,8 +2442,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
exportParamsMap.put("useUnitName", jsonObject.get("useUnitName"));
// 使用单位地址
String useUnitCreditCode = String.valueOf(jsonObject.get("useUnitCreditCode"));
CompanyModel companyModel = Privilege.companyClient.queryByCompanyCode(useUnitCreditCode).getResult();
exportParamsMap.put("fullAddress", companyModel.getAddress());
TzBaseEnterpriseInfo enterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new LambdaQueryWrapper<TzBaseEnterpriseInfo>().eq(TzBaseEnterpriseInfo::getUseCode, useUnitCreditCode));
exportParamsMap.put("fullAddress", this.spliceFullAddress(enterpriseInfo));
// 工程(装置)名称 取第一个设备的技术参数”工程装置名称“
JSONObject eqJSON = (JSONObject) equipmentLists.get(0);
String eqId = !ValidationUtil.isEmpty(eqJSON) ? String.valueOf(eqJSON.get("record")) : "";
......@@ -2478,6 +2478,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return futures;
}
private String spliceFullAddress(TzBaseEnterpriseInfo enterpriseInfo) {
String address = enterpriseInfo.getAddress();
boolean hasProvince = address.contains("省");
boolean hasCity = address.contains("市");
boolean hasDistrict = address.contains("区");
if (hasProvince && hasCity && hasDistrict) {
return address;
}
return enterpriseInfo.getProvince() + enterpriseInfo.getCity() + enterpriseInfo.getDistrict() + enterpriseInfo.getStreet() + enterpriseInfo.getCommunity() + enterpriseInfo.getAddress();
}
/**
* 气瓶设备数据填充
*/
......
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