Commit 153d3a31 authored by 刘林's avatar 刘林

fix(jg):处理管道历史设备刷数据问题

parent fd42717c
......@@ -1945,10 +1945,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject.put("carNumber", idxBizJgRegisterInfo.getCarNumber());
jsonObject.put("regType", jgUseRegistration.getRegType());
} else {
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) jsonObject.get("equipmentLists");
List<String> records = equipmentLists.stream().map(v -> (String) v.get("record")).collect(toList());
if (record == null || record.isEmpty()) {
record = records.stream().findFirst().orElse(null);
}
// 完成、作废时显示历史数据,其他状态显示实时数据
if (!(jgUseRegistration.getStatus().equals(FlowStatusEnum.TO_BE_FINISHED.getName()) || jgUseRegistration.getStatus().equals(FlowStatusEnum.TO_BE_DISCARD.getName()))) {
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) jsonObject.get("equipmentLists");
List<String> records = equipmentLists.stream().map(v -> (String) v.get("record")).collect(toList());
jsonObject.remove("equipmentLists");
// 查询气瓶设备详情
if (CylinderTypeEnum.CYLINDER.getCode().equals(jsonObject.get("EQU_CATEGORY_CODE"))) {
......@@ -1964,6 +1967,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject.put("equipmentLists", jgUseRegistrationMapper.queryForUnitPipelineEquipment(records));
}
}
this.fillLastEquipDetail(jsonObject, record);//历史管道信息,查询详情
}
jsonObject.put("useRegistrationCode", jgUseRegistration.getUseRegistrationCode());
// 转化 附件 字段
......
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