Commit e71ae4d7 authored by 韩桐桐's avatar 韩桐桐

fix(jg):安装告知公用长输通过审核设备状态为:在用

parent c2ed27a3
...@@ -50,6 +50,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils; ...@@ -50,6 +50,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.*; import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquCodeTypeEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquCodeTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*; import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
...@@ -1564,6 +1565,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1564,6 +1565,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
idxBizJgUseInfo.setStreetName(jgInstallationNotice.getStreetName()); idxBizJgUseInfo.setStreetName(jgInstallationNotice.getStreetName());
idxBizJgUseInfo.setAddress(jgInstallationNotice.getAddress()); idxBizJgUseInfo.setAddress(jgInstallationNotice.getAddress());
idxBizJgUseInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian()); idxBizJgUseInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian());
if ("8100".equals(jgInstallationNotice.getEquCategoryCode()) || "8200".equals(jgInstallationNotice.getEquCategoryCode())) {
idxBizJgUseInfo.setEquState(String.valueOf(EquimentEnum.ZAIYONG.getCode()));
}
idxBizJgUseInfo.setEstateUnitCreditCode(jgInstallationNotice.getPropertyUnitCreditCode()); idxBizJgUseInfo.setEstateUnitCreditCode(jgInstallationNotice.getPropertyUnitCreditCode());
idxBizJgUseInfo.setEstateUnitName(jgInstallationNotice.getPropertyUnitName()); idxBizJgUseInfo.setEstateUnitName(jgInstallationNotice.getPropertyUnitName());
idxBizJgUseInfo.setIsIntoManagement(Boolean.TRUE); idxBizJgUseInfo.setIsIntoManagement(Boolean.TRUE);
......
...@@ -2522,6 +2522,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2522,6 +2522,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
*/ */
private boolean checkEquStatusInUse(String record) { private boolean checkEquStatusInUse(String record) {
IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.lambdaQuery().eq(IdxBizJgUseInfo::getRecord, record).one(); IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.lambdaQuery().eq(IdxBizJgUseInfo::getRecord, record).one();
if (ValidationUtil.isEmpty(useInfo.getEquState())) {
return true;
}
return EquimentEnum.ZAIYONG.getCode().toString().equals(useInfo.getEquState()); return EquimentEnum.ZAIYONG.getCode().toString().equals(useInfo.getEquState());
} }
...@@ -2624,11 +2627,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2624,11 +2627,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
String useUnitCreditCode = String.valueOf(jsonObject.get("useUnitCreditCode")); String useUnitCreditCode = String.valueOf(jsonObject.get("useUnitCreditCode"));
TzBaseEnterpriseInfo enterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new LambdaQueryWrapper<TzBaseEnterpriseInfo>().eq(TzBaseEnterpriseInfo::getUseCode, useUnitCreditCode)); TzBaseEnterpriseInfo enterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new LambdaQueryWrapper<TzBaseEnterpriseInfo>().eq(TzBaseEnterpriseInfo::getUseCode, useUnitCreditCode));
exportParamsMap.put("fullAddress", enterpriseInfo.getAddress()); exportParamsMap.put("fullAddress", enterpriseInfo.getAddress());
// 工程(装置)名称 取第一个设备的技术参数”工程装置名称“ if (equipmentLists.isEmpty()) {
JSONObject eqJSON = (JSONObject) equipmentLists.get(0); exportParamsMap.put("nameOfProjectDevice", "");
String eqId = !ValidationUtil.isEmpty(eqJSON) ? String.valueOf(eqJSON.get("record")) : ""; } else {
IdxBizJgUseInfo idxBizJgUseInfo = useInfoMapper.selectOne(new LambdaQueryWrapper<IdxBizJgUseInfo>().eq(IdxBizJgUseInfo::getRecord, eqId)); // 工程(装置)名称 取第一个设备的技术参数”工程装置名称“
exportParamsMap.put("nameOfProjectDevice", ValidationUtil.isEmpty(idxBizJgUseInfo) ? "" : idxBizJgUseInfo.getProjectContraption()); JSONObject eqJSON = (JSONObject) equipmentLists.get(0);
String eqId = !ValidationUtil.isEmpty(eqJSON) ? String.valueOf(eqJSON.get("record")) : "";
IdxBizJgUseInfo idxBizJgUseInfo = useInfoMapper.selectOne(new LambdaQueryWrapper<IdxBizJgUseInfo>().eq(IdxBizJgUseInfo::getRecord, eqId));
exportParamsMap.put("nameOfProjectDevice", ValidationUtil.isEmpty(idxBizJgUseInfo) ? "" : idxBizJgUseInfo.getProjectContraption());
}
// 安全管理部门 // 安全管理部门
exportParamsMap.put("orgBranchName", String.valueOf(jsonObject.get("orgBranchCode")).contains("_") ? String.valueOf(jsonObject.get("orgBranchCode")).split("_")[1] : jsonObject.getString("orgBranchName") == null ? "": jsonObject.getString("orgBranchName")); exportParamsMap.put("orgBranchName", String.valueOf(jsonObject.get("orgBranchCode")).contains("_") ? String.valueOf(jsonObject.get("orgBranchCode")).split("_")[1] : jsonObject.getString("orgBranchName") == null ? "": jsonObject.getString("orgBranchName"));
// 安全管理员 // 安全管理员
......
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