Commit 0014ec2c authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix

parents 8cdf0c21 0f9f3662
...@@ -15,8 +15,10 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeEqSe ...@@ -15,8 +15,10 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeEqSe
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
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.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -52,6 +54,7 @@ public class ChangeEquipImpactCertListener { ...@@ -52,6 +54,7 @@ public class ChangeEquipImpactCertListener {
private final IdxBizJgProjectContraptionServiceImplService jgProjectContraptionService; private final IdxBizJgProjectContraptionServiceImplService jgProjectContraptionService;
private final JgInstallationNoticeEqServiceImpl jgInstallationNoticeEqService; private final JgInstallationNoticeEqServiceImpl jgInstallationNoticeEqService;
private final IdxBizJgUseInfoMapper useInfoMapper; private final IdxBizJgUseInfoMapper useInfoMapper;
private final IdxBizJgRegisterInfoMapper registerInfoMapper;
/** /**
* 事件监听:只把事件放入队列 * 事件监听:只把事件放入队列
...@@ -296,6 +299,25 @@ public class ChangeEquipImpactCertListener { ...@@ -296,6 +299,25 @@ public class ChangeEquipImpactCertListener {
private void handleNewEquipEdit(BaseBizDataChangeEvent event) { private void handleNewEquipEdit(BaseBizDataChangeEvent event) {
log.info("处理 handleNewEquipEdit 类型逻辑"); log.info("处理 handleNewEquipEdit 类型逻辑");
if (event.getBizRelationData().getBizIsFinished()){
String useOrgCode = "";
for (FieldChangeMeta meta : event.getData()) {
String columnKey = meta.getColumnKey();
if (columnKey.equals("useOrgCode")){
useOrgCode = meta.getColumnOldValue();
}else{
LambdaQueryWrapper<IdxBizJgRegisterInfo> queryRegisterWrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
queryRegisterWrapper.eq(IdxBizJgRegisterInfo::getRecord, event.getBizRelationData().getBizId());
IdxBizJgRegisterInfo registerInfo = registerInfoMapper.selectOne(queryRegisterWrapper);
useOrgCode = registerInfo.getUseOrgCode();
}
}
JgUseRegistrationManage jgUseRegistrationManage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, useOrgCode)
.eq(JgUseRegistrationManage::getIsDelete, 0)
.one();
this.handleFieldChange(event.getData(), jgUseRegistrationManage);
}
} }
private void handleNewProjectEdit(List<FieldChangeMeta> fieldChangeMetaList, String projectContraptionId) { private void handleNewProjectEdit(List<FieldChangeMeta> fieldChangeMetaList, String projectContraptionId) {
......
...@@ -3185,7 +3185,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -3185,7 +3185,7 @@ public class CommonServiceImpl implements ICommonService {
*/ */
public String castDataQualityScore2Name(String dataQualityScore, Boolean isIntoManagement){ public String castDataQualityScore2Name(String dataQualityScore, Boolean isIntoManagement){
String name = dataDictTypeHandler.handle(DATA_QUALITY_SCORE, dataQualityScore); String name = dataDictTypeHandler.handle(DATA_QUALITY_SCORE, dataQualityScore);
return name == null ? (isIntoManagement == null || !isIntoManagement) ? "Ⅱ级" : "Ⅲ级" : name; return name == null ? (isIntoManagement == null || !isIntoManagement) ? "二级" : "三级" : name;
} }
public void setDataQualityScore2Json(Map<String, Object> result, String bizId, BusinessTypeEnum businessTypeEnum) { public void setDataQualityScore2Json(Map<String, Object> result, String bizId, BusinessTypeEnum businessTypeEnum) {
......
...@@ -413,7 +413,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -413,7 +413,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo.put("equDefineName", projectContraption.getEquDefineName()); installationInfo.put("equDefineName", projectContraption.getEquDefineName());
equipListMaps = projectContraptionService.getBaseMapper().selectEquipList(projectContraptionId); equipListMaps = projectContraptionService.getBaseMapper().selectEquipList(projectContraptionId);
equipListMaps.forEach(item -> equipListMaps.forEach(item ->
item.put("deviceLevel", Optional.ofNullable(dataDictionaryMapper.getByCode(String.valueOf(item.get("deviceLevel")),"8300")) item.put("deviceLevel", Optional.ofNullable(dataDictionaryMapper.getByCode(String.valueOf(item.get("deviceLevel")), projectContraption.getEquCategory()))
.map(DataDictionary::getName) .map(DataDictionary::getName)
.orElse(""))); .orElse("")));
} else { } else {
...@@ -2024,7 +2024,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -2024,7 +2024,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List<Map<String, Object>> deviceList = projectContraptionService.getBaseMapper().selectEquipList(projectContraptionSeq); List<Map<String, Object>> deviceList = projectContraptionService.getBaseMapper().selectEquipList(projectContraptionSeq);
deviceList.forEach(device -> { deviceList.forEach(device -> {
String deviceLevel = String.valueOf(device.get("deviceLevel")); String deviceLevel = String.valueOf(device.get("deviceLevel"));
device.put("deviceLevel", dataDictionaryMapper.getByCode(deviceLevel,"8300").getName()); device.put("deviceLevel", dataDictionaryMapper.getByCode(deviceLevel, projectContraption.getEquCategory()).getName());
device.put("sequenceNbr", projectContraptionSeq); device.put("sequenceNbr", projectContraptionSeq);
device.put("equListName", projectContraption.getEquListName()); device.put("equListName", projectContraption.getEquListName());
}); });
......
...@@ -1951,7 +1951,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1951,7 +1951,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新es的下次检验日期 // 更新es的下次检验日期
param.put("NEXT_INSPECT_DATE", this.castDate2TimeStr(dataMap.getString("nextInspectDate"))); param.put("NEXT_INSPECT_DATE", this.castDate2TimeStr(dataMap.getString("nextInspectDate")));
param.put("USE_INNER_CODE", useInfo.getUseInnerCode()); param.put("USE_INNER_CODE", useInfo.getUseInnerCode());
if (!Arrays.asList("temp", "tempEdit").contains(dataMap.get("historySubmitType"))) { String historySubmitType = String.valueOf(dataMap.get("historySubmitType"));
if (!"temp".equals(historySubmitType) && !"tempEdit".equals(historySubmitType)) {
param.put("IS_INTO_MANAGEMENT", true); param.put("IS_INTO_MANAGEMENT", true);
} }
param.put("USE_PLACE_CODE", jsonObject.get("province") + "#" + jsonObject.get("city") + "#" + jsonObject.get("county") + "#" + jsonObject.get("factoryUseSiteStreet")); param.put("USE_PLACE_CODE", jsonObject.get("province") + "#" + jsonObject.get("city") + "#" + jsonObject.get("county") + "#" + jsonObject.get("factoryUseSiteStreet"));
...@@ -1963,6 +1964,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1963,6 +1964,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param.put("EQU_CODE", dataMap.get("equCode")); param.put("EQU_CODE", dataMap.get("equCode"));
param.put("USE_ORG_CODE", jgUseRegistration.getUseRegistrationCode()); param.put("USE_ORG_CODE", jgUseRegistration.getUseRegistrationCode());
param.put("CYLINDER_CATEGORY", dataMap.get("cylinderCategory")); param.put("CYLINDER_CATEGORY", dataMap.get("cylinderCategory"));
param.put("FACTORY_NUM", MapUtil.getStr(dataMap, "factoryNum"));
objMap.put((String) dataMap.get("equipId"), param); objMap.put((String) dataMap.get("equipId"), param);
tzsServiceFeignClient.commonUpdateEsDataByIds(objMap); tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
} }
...@@ -2372,7 +2374,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2372,7 +2374,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
new FillingUseRegisterResult(sequenceNbr, jsonObject, applicationContext).getData(); new FillingUseRegisterResult(sequenceNbr, jsonObject, applicationContext).getData();
// 结果增强,填充当前人是否有编辑按钮权限 // 结果增强,填充当前人是否有编辑按钮权限
new FillingEditPermForCurrentUser(jsonObject, Optional.ofNullable(selectedOrgInfo).map(ReginParams::getCompany).orElse(null), BusinessTypeEnum.JG_USAGE_REGISTRATION).getData(); new FillingEditPermForCurrentUser(jsonObject, Optional.ofNullable(selectedOrgInfo).map(ReginParams::getCompany).orElse(null), BusinessTypeEnum.JG_USAGE_REGISTRATION).getData();
commonServiceImpl.setDataQualityScore2Json(jsonObject, sequenceNbr + "", BusinessTypeEnum.JG_USAGE_REGISTRATION); //commonServiceImpl.setDataQualityScore2Json(jsonObject, sequenceNbr + "", BusinessTypeEnum.JG_USAGE_REGISTRATION);
return jsonObject; return jsonObject;
} }
// 基本信息 + 制造信息 // 基本信息 + 制造信息
......
...@@ -268,6 +268,6 @@ public class CommonServiceImpl { ...@@ -268,6 +268,6 @@ public class CommonServiceImpl {
public String castDataQualityScore2Name(String dataQualityScore, Boolean isIntoManagement) { public String castDataQualityScore2Name(String dataQualityScore, Boolean isIntoManagement) {
DataDictionary dataDictionary = dictionaryService.getByCode("DATA_QUALITY_SCORE", dataQualityScore); DataDictionary dataDictionary = dictionaryService.getByCode("DATA_QUALITY_SCORE", dataQualityScore);
String name = Optional.ofNullable(dataDictionary).map(DataDictionary::getName).orElse(null); String name = Optional.ofNullable(dataDictionary).map(DataDictionary::getName).orElse(null);
return name == null ? (isIntoManagement == null || !isIntoManagement) ? "Ⅱ级" : "Ⅲ级" : name; return name == null ? (isIntoManagement == null || !isIntoManagement) ? "二级" : "三级" : name;
} }
} }
...@@ -65,5 +65,14 @@ ...@@ -65,5 +65,14 @@
"6616": [], "6616": [],
"6617": [], "6617": [],
"6549": [] "6549": []
},
"个人主体": {
"6552": ["6713"],
"6546": [],
"6547": [],
"6548": [],
"6616": [],
"6617": [],
"6549": []
} }
} }
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