Commit cabbf60c authored by chenzhao's avatar chenzhao

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

parents a7deaa0a cbd39cac
......@@ -667,6 +667,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
result.put("inspectConclusionCode", info.getInspectConclusion());
result.put("inspectConclusion", Optional.ofNullable(dataDictionaryServiceImpl.getByCode(info.getInspectConclusion(), "JYJL"))
.map(DataDictionary::getName).orElse(""));
result.put("jySeq", info.getSequenceNbr());
return result;
}
}
\ No newline at end of file
......@@ -1623,7 +1623,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
.eq(InspectionDetectionInfo::getInspectOrgCode, inspectionDetectionInfo.getInspectOrgCode());
List<InspectionDetectionInfo> inspectionDetectionInfos = inspectionDetectionInfoMapper.selectList(wrapper);
List<InspectionDetectionInfo> oInspectionDetectionInfos = new ArrayList<>(inspectionDetectionInfos);
JSONObject data = new JSONObject();
String insertId = null;
if(inspectionDetectionInfos.isEmpty()){
insertId = sequence.nextId() + "";
......@@ -1645,6 +1644,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
this.setInsertIds(inspectData, insertId);
// 被更新的原行数据
this.setOData(inspectData, oInspectionDetectionInfos);
oldData.put("inspectData", inspectData);
LambdaUpdateWrapper<JgRegistrationHistory> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(JgRegistrationHistory::getCurrentDocumentId, registrationReform.getApplyNo());
updateWrapper.set(JgRegistrationHistory::getOldData, JSONObject.toJSONString(oldData));
......@@ -1655,6 +1655,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
JSONArray oData = inspectData.getJSONArray("oData");
if(oData == null){
oData = new JSONArray();
inspectData.put("oData",oData);
}
oData.addAll(oInspectionDetectionInfos);
}
......@@ -1663,6 +1664,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
JSONArray existInsertIds = inspectData.getJSONArray("insertIds");
if(existInsertIds == null){
existInsertIds = new JSONArray();
inspectData.put("insertIds",existInsertIds);
}
if(insertId != null){
existInsertIds.add(insertId);
......
......@@ -2834,11 +2834,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 基本信息 + 制造信息 + 设计信息
fillLastEquipBaseInfo(jsonObject, record);
// 安装信息
if(!jsonObject.containsKey("installationIsComplete")) {
Map<String, Object> installDetail = this.baseMapper.getiInstallDetail(record);
// 历史设备登记来的数据没有安装业务信息 从一码通数据拿
if (ValidationUtil.isEmpty(installDetail)) {
installDetail = this.baseMapper.getiInstallDetailByIdx(record);
}
if (!ObjectUtils.isEmpty(installDetail)) {
jsonObject.putAll(installDetail);
}
}
// 维保信息
Map<String, Object> maintenanceDetail = this.baseMapper.getMaintenanceDetail(record);
// 历史设备登记来的数据没有维保业务信息 从一码通数据拿
......@@ -2848,9 +2853,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (!ObjectUtils.isEmpty(maintenanceDetail)) {
jsonObject.putAll(maintenanceDetail);
}
if (!ObjectUtils.isEmpty(installDetail)) {
jsonObject.putAll(installDetail);
}
}
public void fillLastEquipBaseInfo(JSONObject jsonObject, String record) {
......
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