Commit c0ed0dd4 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' into develop_tze_register_his

parents a8e181b3 78a88228
......@@ -338,4 +338,16 @@ public class JgInstallationNoticeDto extends BaseDto {
* 管道工程装置id
*/
private String projectContraptionId;
/**
* 装置起始位置-压力管道使用
*/
@ApiModelProperty("start_latitude_longitude")
private String startLatitudeLongitude;
/**
* 装置结束位置-压力管道使用
*/
@ApiModelProperty("end_latitude_longitude")
private String endLatitudeLongitude;
}
......@@ -488,9 +488,20 @@ public class JgInstallationNotice extends BaseEntity {
@TableField("equ_list_code")
private String equListCode;
/**
* 工程装置主键
* 工程装置主键-压力管道使用
*/
@TableField("project_contraption_id")
private String projectContraptionId;
/**
* 装置起始位置-压力管道使用
*/
@TableField("start_latitude_longitude")
private String startLatitudeLongitude;
/**
* 装置结束位置-压力管道使用
*/
@TableField("end_latitude_longitude")
private String endLatitudeLongitude;
}
......@@ -116,6 +116,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
.like(!ValidationUtil.isEmpty(projectContraptionNo), IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionNo)
.isNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.TRUE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
.isNotNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.FALSE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
.orderByDesc(IdxBizJgProjectContraption::getRecDate)
.page(page);
pageList.getRecords().forEach(record -> {
record.setDataSourceName(EquipSourceEnum.getDataSourceName(record.getDataSource()));
......
......@@ -461,6 +461,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.collect(Collectors.toList());
idxBizJgRegisterInfoService.batchDeleteByRecord(MapBuilder.<String, Object>create()
.put("recordList", records)
.put("equCategory", equipmentInfoForm.get("EQU_CATEGORY"))
.build());
}
......@@ -988,9 +989,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentCategoryDto.setSEQUENCE_NBR(recordList.toString());
list.add(esEquipmentCategoryDto);
}
// 删除校验,被引用时不可删除
this.checkForDelete(records);
// 删除校验,被引用时不可删除,管道排除在外
if(!PipelineEnum.INDUSTRIAL_PIPELINE.getCode().equals(map.get("equCategory"))) {
this.checkForDelete(records);
}
// 删除涉及的19张表的数据
superviseInfoMapper.deleteDataAll(records);
// 删除es中的数据
......
......@@ -283,6 +283,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo.put(s, ObjectUtils.isEmpty(installationInfo.get(s)) ? new JSONArray() : parseArray(installationInfo.get(s).toString()));
}
}
String[] jsonObjFields = {"startLatitudeLongitude", "endLatitudeLongitude"};
for (String s : jsonObjFields) {
if (installationInfo.containsKey(s)) {
installationInfo.put(s, ObjectUtils.isEmpty(installationInfo.get(s)) ? null : JSON.parseObject(installationInfo.get(s).toString()));
}
}
if (Integer.parseInt(notice.getNoticeStatus()) >= FlowStatusEnum.TO_BE_FINISHED.getCode()) {
// 完成及作废时显示历史数据
JSONObject hisData = commonService.queryHistoryData(notice.getSequenceNbr());
......@@ -302,6 +308,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
} else {
// 显示最新的设备信息
Map<String, Object> detail = setNewEquipData(companyLevel, installationInfo);
detail.put("startLatitudeLongitude", JSON.parseObject(notice.getStartLatitudeLongitude()));
detail.put("endLatitudeLongitude", JSON.parseObject(notice.getEndLatitudeLongitude()));
return new HashMap<String, Map<String, Object>>() {{
this.put("installationInfo", detail);
}};
......@@ -1917,6 +1925,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
projectContraption.setUscUnitName(jgInstallationNotice.getInstallUnitName());
projectContraption.setUseUnitName(jgInstallationNotice.getUseUnitName());
projectContraption.setUseUnitCreditCode(jgInstallationNotice.getUseUnitCreditCode());
projectContraption.setStartLatitudeLongitude(jgInstallationNotice.getStartLatitudeLongitude());
projectContraption.setEndLatitudeLongitude(jgInstallationNotice.getEndLatitudeLongitude());
projectContraptionService.updateById(projectContraption);
// 更新安装告知业务表信息
......
......@@ -2430,15 +2430,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List<CompletableFuture<byte[]>> futures = IntStream.rangeClosed(1, page)
.mapToObj(current -> CompletableFuture.supplyAsync(() -> {
exportParamsMap.put("current", current);
// 创建独立的参数副本
Map<String, Object> currentExportParamsMap = new HashMap<>(exportParamsMap);
currentExportParamsMap.put("current", current);
// 数据分页
int start = (current - 1) * size;
int end = ((current - 1) * size + size) < total ? (current - 1) * size + size : (int) total;
// 数据截取
List<Object> equData = equipmentLists.subList(start, end);
// 设备数据填充
this.pressurePipeEquData(exportParamsMap, equData, current, size);
return commonService.generateSummaryOfCylinderInfo(exportParamsMap, wordPath, filePrefix);
this.pressurePipeEquData(currentExportParamsMap, equData, current, size);
return commonService.generateSummaryOfCylinderInfo(currentExportParamsMap, wordPath, filePrefix);
})).collect(Collectors.toList());
CompletableFuture.allOf(futures.toArray(new CompletableFuture[page])).join();
return futures;
......@@ -3802,6 +3804,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
re.put("equipmentLists", equList);
re.put("projectContraption", projectContraption.getProjectContraption());
re.put("projectContraptionId", projectContraptionSeq);
re.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
re.put("pipelineLength", projectContraption.getPipelineLength());
this.setPieLineInspectInfo(projectContraptionSeq, re);
this.setConstructionInfo(projectContraptionSeq, re);
return re;
......
......@@ -68,8 +68,8 @@
(select INSPECT_ORG_NAME from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectOrgName,
(select INSPECT_CONCLUSION from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectConclusion,
(select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) nextInspectDate,
(select USC_UNIT_NAME from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."REC_DATE" DESC limit 1) as uscUnitName,
(select USC_DATE from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."REC_DATE" DESC limit 1) as uscDate,
(select USC_UNIT_NAME from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscUnitName,
(select USC_DATE from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscDate,
ibjdi."DESIGN_UNIT_NAME" AS designUnitName,
ibjui."USE_DATE" AS useDate,
ibjui."RECORD" AS record
......@@ -96,7 +96,8 @@
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id = #{projectContraptionId}
AND (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]> '6610' and a.notice_status <![CDATA[ <> ]]> '6617')
AND (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]> '6610' and a.notice_status <![CDATA[ <> ]]> '6617'
and a.notice_status <![CDATA[ <> ]]> '6612')
)
</select>
......
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