Commit cea3abdc authored by 刘林's avatar 刘林

fix(jg):告知单的使用单位为个人主体时,点击详情查看时使用单位显示为无匹配选项

parent 20049884
......@@ -48,7 +48,6 @@ public class PlatformUserTopicMessage extends EmqxListener {
.filter(jsonObject -> amosAgencyCode.equals(jsonObject.getString("agencyCode")))
.map(jsonObject -> jsonObject.getJSONObject("result"))
.filter(result -> StringUtils.isNotEmpty(result.getString("path")))
.map(result -> result.get("result"))
.flatMap(this::streamDataResult)
.forEach(this::processDataResult);
log.info("平台推送消息同步完成");
......
......@@ -160,6 +160,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private ESEquipmentCategory esEquipmentCategory;
@Autowired
private JgResumeInfoServiceImpl jgResumeInfoService;
@Autowired
private TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
/**
* 根据sequenceNbr查询
......@@ -179,8 +181,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo.put("province", notice.getProvince() + "_" + notice.getProvinceName());
installationInfo.put("city", notice.getCity() + "_" + notice.getCityName());
installationInfo.put("county", notice.getCounty() + "_" + notice.getCountyName());
installationInfo.put("useUnitCreditCode", notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName() +
"_"+ notice.getUseUnitCreditCode().substring(notice.getUseUnitCreditCode().length() - 4));
TzBaseEnterpriseInfo useCodeResult = tzBaseEnterpriseInfoMapper.selectOne(
new QueryWrapper<TzBaseEnterpriseInfo>()
.eq("use_unit_code", notice.getUseUnitCreditCode())
);
if (useCodeResult != null) {
String result = notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName() +
("个人主体".equals(useCodeResult.getUnitType())
? "_" + notice.getUseUnitCreditCode().substring(notice.getUseUnitCreditCode().length() - 4)
: "");
installationInfo.put("useUnitCreditCode", result);
}
//installationInfo.put("useUnitCreditCode", notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName());
installationInfo.put("receiveOrgCreditCode", notice.getReceiveOrgCreditCode() + "_" + notice.getReceiveOrgName());
installationInfo.put("installLeaderId", notice.getInstallLeaderId() + "_" + notice.getInstallLeaderName());
if (!ValidationUtil.isEmpty(notice.getInspectUnitId()) && !ValidationUtil.isEmpty(notice.getInspectUnitName())) {
......@@ -194,7 +209,17 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
if (!ValidationUtil.isEmpty(notice.getPropertyUnitCreditCode()) && !ValidationUtil.isEmpty(notice.getPropertyUnitName())) {
installationInfo.put("propertyUnitName", notice.getPropertyUnitCreditCode() + "_" + notice.getPropertyUnitName());
//installationInfo.put("propertyUnitName", notice.getPropertyUnitCreditCode() + "_" + notice.getPropertyUnitName());
TzBaseEnterpriseInfo useCodeResult1 = tzBaseEnterpriseInfoMapper.selectOne(
new QueryWrapper<TzBaseEnterpriseInfo>()
.eq("use_unit_code", notice.getPropertyUnitCreditCode())
);
if (useCodeResult1 != null) {
installationInfo.put("propertyUnitName", notice.getPropertyUnitCreditCode() + "_" + notice.getPropertyUnitName() +
("个人主体".equals(useCodeResult1.getUnitType())
? "_" + notice.getPropertyUnitCreditCode().substring(notice.getPropertyUnitCreditCode().length() - 4)
: ""));
}
}
String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard",
......@@ -433,7 +458,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 删除暂存的待办
jgInstallationNotices.forEach(installationNotice -> {
installationNotice.setIsDelete(true);
commonService.deleteTaskModel(String.valueOf(installationNotice.getSequenceNbr()),installationNotice.getInstanceId());
commonService.deleteTaskModel(String.valueOf(installationNotice.getSequenceNbr()), installationNotice.getInstanceId());
});
return this.updateBatchById(jgInstallationNotices);
}
......@@ -1297,7 +1322,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
private void processElseDataByStatus(FlowStatusEnum oldNoticeStatus, JgInstallationNotice installationNotice) {
switch (oldNoticeStatus){
switch (oldNoticeStatus) {
case TO_BE_SUBMITTED: // 待提交
// 1.写入历史表
this.saveHisDataBeforeUpdate(installationNotice);
......@@ -1352,12 +1377,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 强制更新字段为 NULL
LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(IdxBizJgUseInfo::getRecord, jgRelationEquip.getEquId()); // 设置更新条件
updateWrapper.set(IdxBizJgUseInfo::getUseUnitCreditCode,null);
updateWrapper.set(IdxBizJgUseInfo::getUseUnitName,null);
updateWrapper.set(IdxBizJgUseInfo::getUseUnitCreditCode, null);
updateWrapper.set(IdxBizJgUseInfo::getUseUnitName, null);
useInfoService.update(updateWrapper);
// 2.2 es的USE_UNIT_CREDIT_CODE赋空
Optional<ESEquipmentCategoryDto> optional = esEquipmentCategory.findById(jgRelationEquip.getEquId());
if(optional.isPresent()){
if (optional.isPresent()) {
ESEquipmentCategoryDto esEquipmentCategoryDto = optional.get();
esEquipmentCategoryDto.setUSE_UNIT_CREDIT_CODE(null);
esEquipmentCategoryDto.setUSE_UNIT_NAME(null);
......
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