Commit af603e06 authored by tianbo's avatar tianbo

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents 38f26da1 b9e90bf1
package com.yeejoin.amos.boot.module.jg.biz.init; package com.yeejoin.amos.boot.module.jg.biz.init;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration; import com.yeejoin.amos.boot.module.jg.biz.service.impl.*;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner; import org.springframework.boot.ApplicationRunner;
...@@ -24,12 +21,34 @@ public class ApplicationRunnerImpl implements ApplicationRunner { ...@@ -24,12 +21,34 @@ public class ApplicationRunnerImpl implements ApplicationRunner {
private JgInstallationNoticeServiceImpl installationNoticeService; private JgInstallationNoticeServiceImpl installationNoticeService;
private JgMaintainNoticeServiceImpl jgMaintainNoticeService;
private JgReformNoticeServiceImpl jgReformNoticeService;
private JgTransferNoticeServiceImpl jgTransferNoticeService;
private JgEquipTransferServiceImpl jgEquipTransferService;
public ApplicationRunnerImpl(JgUseRegistrationServiceImpl useRegistrationService, public ApplicationRunnerImpl(JgUseRegistrationServiceImpl useRegistrationService,
CommonServiceImpl commonService, CommonServiceImpl commonService,
JgInstallationNoticeServiceImpl installationNoticeService) { JgInstallationNoticeServiceImpl installationNoticeService,
JgMaintainNoticeServiceImpl jgMaintainNoticeService,
JgReformNoticeServiceImpl jgReformNoticeService,
JgTransferNoticeServiceImpl jgTransferNoticeService,
JgEquipTransferServiceImpl jgEquipTransferService) {
this.commonService = commonService; this.commonService = commonService;
this.useRegistrationService = useRegistrationService; this.useRegistrationService = useRegistrationService;
this.installationNoticeService = installationNoticeService; this.installationNoticeService = installationNoticeService;
this.jgMaintainNoticeService = jgMaintainNoticeService;
this.jgReformNoticeService = jgReformNoticeService;
this.jgTransferNoticeService = jgTransferNoticeService;
this.jgEquipTransferService =jgEquipTransferService;
} }
...@@ -46,5 +65,25 @@ public class ApplicationRunnerImpl implements ApplicationRunner { ...@@ -46,5 +65,25 @@ public class ApplicationRunnerImpl implements ApplicationRunner {
jgInstallationNotices.forEach(jgInstallation -> { jgInstallationNotices.forEach(jgInstallation -> {
commonService.saveExecuteFlowData2Redis(jgInstallation.getInstanceId(), installationNoticeService.buildInstanceRuntimeData(jgInstallation)); commonService.saveExecuteFlowData2Redis(jgInstallation.getInstanceId(), installationNoticeService.buildInstanceRuntimeData(jgInstallation));
}); });
// 维修告知数据初始化
List<JgMaintainNotice> jgMaintainNotices = jgMaintainNoticeService.list(new LambdaQueryWrapper<JgMaintainNotice>().ne(JgMaintainNotice::getNoticeStatus, FlowStatusEnum.TO_BE_FINISHED.getCode()));
jgMaintainNotices.forEach(jgInstallation -> {
commonService.saveExecuteFlowData2Redis(jgInstallation.getInstanceId(), jgMaintainNoticeService.buildInstanceRuntimeData(jgInstallation));
});
// 改造告知数据初始化
List<JgReformNotice> jgReformNotices = jgReformNoticeService.list(new LambdaQueryWrapper<JgReformNotice>().ne(JgReformNotice::getNoticeStatus, FlowStatusEnum.TO_BE_FINISHED.getCode()));
jgReformNotices.forEach(jgInstallation -> {
commonService.saveExecuteFlowData2Redis(jgInstallation.getInstanceId(), jgReformNoticeService.buildInstanceRuntimeData(jgInstallation));
});
// 移装告知数据初始化
List<JgTransferNotice> jgTransferNotices = jgTransferNoticeService.list(new LambdaQueryWrapper<JgTransferNotice>().ne(JgTransferNotice::getNoticeStatus, FlowStatusEnum.TO_BE_FINISHED.getCode()));
jgTransferNotices.forEach(jgInstallation -> {
commonService.saveExecuteFlowData2Redis(jgInstallation.getInstanceId(), jgTransferNoticeService.buildInstanceRuntimeData(jgInstallation));
});
// 设备移交数据初始化
List<JgEquipTransfer> jgEquipTransfers = jgEquipTransferService.list(new LambdaQueryWrapper<JgEquipTransfer>().ne(JgEquipTransfer::getApplyStatus, FlowStatusEnum.TO_BE_FINISHED.getCode()));
jgEquipTransfers.forEach(jgInstallation -> {
commonService.saveExecuteFlowData2Redis(jgInstallation.getInstanceId(), jgEquipTransferService.buildInstanceRuntimeData(jgInstallation));
});
} }
} }
...@@ -510,6 +510,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -510,6 +510,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
designInfoMap.put("designinfoSeq", designInfo.getSequenceNbr()); designInfoMap.put("designinfoSeq", designInfo.getSequenceNbr());
designInfoMap.put("designDoc", JSON.parseArray(designInfo.getDesignDoc())); designInfoMap.put("designDoc", JSON.parseArray(designInfo.getDesignDoc()));
designInfoMap.put("designStandard", JSON.parseArray(designInfo.getDesignStandard())); designInfoMap.put("designStandard", JSON.parseArray(designInfo.getDesignStandard()));
if (!ObjectUtils.isEmpty(designInfoMap.get("otherAccessoriesDes"))) {
designInfoMap.put("otherAccessoriesDes", JSON.parse(String.valueOf(designInfoMap.get("otherAccessoriesDes"))));
}
} else { } else {
String[] fields = {"DESIGN_DOC", "DESIGN_STANDARD","OTHER_ACCESSORIES_DES"}; String[] fields = {"DESIGN_DOC", "DESIGN_STANDARD","OTHER_ACCESSORIES_DES"};
designInfoMap = convertCamelToUnderscore(designInfo, fields); designInfoMap = convertCamelToUnderscore(designInfo, fields);
...@@ -539,6 +542,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -539,6 +542,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
factoryInfoMap.put("factoryStandard", JSON.parseArray(factoryInfo.getFactoryStandard())); factoryInfoMap.put("factoryStandard", JSON.parseArray(factoryInfo.getFactoryStandard()));
factoryInfoMap.put("productQualityYieldProve", JSON.parseArray(factoryInfo.getProductQualityYieldProve())); factoryInfoMap.put("productQualityYieldProve", JSON.parseArray(factoryInfo.getProductQualityYieldProve()));
factoryInfoMap.put("insUseMaintainExplain", JSON.parseArray(factoryInfo.getInsUseMaintainExplain())); factoryInfoMap.put("insUseMaintainExplain", JSON.parseArray(factoryInfo.getInsUseMaintainExplain()));
if (!ObjectUtils.isEmpty(factoryInfoMap.get("otherAccessoriesFact"))) {
factoryInfoMap.put("otherAccessoriesFact", JSON.parse(String.valueOf(factoryInfoMap.get("otherAccessoriesFact"))));
}
} else { } else {
String[] fields = {"FACTORY_STANDARD", "PRODUCT_QUALITY_YIELD_PROVE", "INS_USE_MAINTAIN_EXPLAIN","OTHER_ACCESSORIES_FACT"}; String[] fields = {"FACTORY_STANDARD", "PRODUCT_QUALITY_YIELD_PROVE", "INS_USE_MAINTAIN_EXPLAIN","OTHER_ACCESSORIES_FACT"};
factoryInfoMap = convertCamelToUnderscore(factoryInfo, fields); factoryInfoMap = convertCamelToUnderscore(factoryInfo, fields);
...@@ -596,6 +602,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -596,6 +602,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (CollectionUtils.isNotEmpty(categoryList2)) { if (CollectionUtils.isNotEmpty(categoryList2)) {
registerInfoMap.put("equDefineDesc", categoryList2.get(0).getName()); registerInfoMap.put("equDefineDesc", categoryList2.get(0).getName());
} }
if (!ObjectUtils.isEmpty(registerInfoMap.get("otherAccessoriesReg"))) {
registerInfoMap.put("otherAccessoriesReg", JSON.parse(String.valueOf(registerInfoMap.get("otherAccessoriesReg"))));
}
} else { } else {
String[] fields = {"PRODUCT_PHOTO","OTHER_ACCESSORIES_REG"}; String[] fields = {"PRODUCT_PHOTO","OTHER_ACCESSORIES_REG"};
registerInfoMap = convertCamelToUnderscore(registerInfo, fields); registerInfoMap = convertCamelToUnderscore(registerInfo, fields);
...@@ -1083,7 +1092,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1083,7 +1092,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ubuilder.should(QueryBuilders.matchQuery("USE_UNIT_CREDIT_CODE", useCode)); ubuilder.should(QueryBuilders.matchQuery("USE_UNIT_CREDIT_CODE", useCode));
String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE")); String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE"));
ubuilder.should(QueryBuilders.matchPhraseQuery("USC_UNIT_CREDIT_CODE", "*" + uscCode + "*")); ubuilder.should(QueryBuilders.wildcardQuery("USC_UNIT_CREDIT_CODE", "*" + uscCode + "*"));
ubuilder.minimumShouldMatch(1); ubuilder.minimumShouldMatch(1);
boolMust.must(ubuilder); boolMust.must(ubuilder);
} else { } else {
...@@ -1098,7 +1107,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1098,7 +1107,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (!ObjectUtils.isEmpty(map.getString("USC_UNIT_CREDIT_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USC_UNIT_CREDIT_CODE"))) {
BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery();
String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE")); String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE"));
uuccBuilder.must(QueryBuilders.matchPhraseQuery("USC_UNIT_CREDIT_CODE", "*" + uscCode + "*")); uuccBuilder.must(QueryBuilders.wildcardQuery("USC_UNIT_CREDIT_CODE", "*" + uscCode + "*"));
boolMust.must(uuccBuilder); boolMust.must(uuccBuilder);
} }
} }
......
...@@ -529,7 +529,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -529,7 +529,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
Map<String, Object> installationInfo = BeanUtil.beanToMap(notice); Map<String, Object> installationInfo = BeanUtil.beanToMap(notice);
installationInfo.put("receiveOrgCode", notice.getReceiveCompanyCode() + "_" + notice.getReceiveOrgName()); installationInfo.put("receiveOrgCode", notice.getReceiveCompanyCode() + "_" + notice.getReceiveOrgName());
installationInfo.put("cancelCertificateList", JSON.parseArray(String.valueOf(installationInfo.get("cancelCertificate")))); installationInfo.put("cancelCertificateList", JSON.parseArray(String.valueOf(installationInfo.get("cancelCertificate"))));
installationInfo.put("otherAccessories", JSON.parseArray(String.valueOf(installationInfo.get("otherAccessories")))); installationInfo.put("otherAccessories", JSON.parseArray(JSONObject.toJSONString(installationInfo.get("otherAccessories"))));
LambdaQueryWrapper<JgScrapCancelEq> lambdaEq = new QueryWrapper<JgScrapCancelEq>().lambda(); LambdaQueryWrapper<JgScrapCancelEq> lambdaEq = new QueryWrapper<JgScrapCancelEq>().lambda();
lambdaEq.eq(JgScrapCancelEq::getEquipTransferId, sequenceNbr); lambdaEq.eq(JgScrapCancelEq::getEquipTransferId, sequenceNbr);
JgScrapCancelEq jgScrapCancelEq = jgScrapCancelEqMapper.selectOne(lambdaEq); JgScrapCancelEq jgScrapCancelEq = jgScrapCancelEqMapper.selectOne(lambdaEq);
......
...@@ -283,7 +283,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -283,7 +283,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration.setSupervisoryCode(supervisoryCode); jgUseRegistration.setSupervisoryCode(supervisoryCode);
jgUseRegistration.setUseUnitName(String.valueOf(map.get("useUnitName"))); jgUseRegistration.setUseUnitName(String.valueOf(map.get("useUnitName")));
jgUseRegistration.setUseUnitCreditCode(String.valueOf(map.get("useUnitCreditCode"))); jgUseRegistration.setUseUnitCreditCode(String.valueOf(map.get("useUnitCreditCode")));
jgUseRegistration.setOtherAccessories(String.valueOf(map.get("otherAccessories"))); jgUseRegistration.setOtherAccessories(JSONObject.toJSONString(map.get("otherAccessories")));
String equType = this.baseMapper.getEquType(String.valueOf(map.get("equipId"))); String equType = this.baseMapper.getEquType(String.valueOf(map.get("equipId")));
if (map.containsKey("receiveOrgCode")) { if (map.containsKey("receiveOrgCode")) {
// 接收单位信息 // 接收单位信息
......
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