Commit 435f4dea authored by 刘林's avatar 刘林

fix(jg):【打印汇总表】压力管道使用登记完成之后,在改造告知、改造变更登记流程总均对管道设备进行了修改、增加和删除的操作,审核完成后,在使用登记单据详情中下载汇总表时,下载文件为空

parent f1c22ada
......@@ -226,7 +226,8 @@ public class JgUseRegistrationController extends BaseController {
public void exportSummaryBasicInfo(HttpServletResponse response,
@RequestParam("sequenceNbr") String sequenceNbr,
@RequestParam("category") String category) {
jgUseRegistrationServiceImpl.exportSummaryBasicInfo(Collections.singletonList(Long.valueOf(sequenceNbr)), response, category, null);
JgUseRegistration jgUseRegistration = jgUseRegistrationServiceImpl.getById(sequenceNbr);
jgUseRegistrationServiceImpl.exportSummaryBasicInfo(Collections.singletonList(Long.valueOf(sequenceNbr)), response, category, Collections.singleton(jgUseRegistration.getProjectContraptionId()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgSupervisionInfoS
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgTechParamsPipelineServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
......@@ -179,6 +180,7 @@ public class PieLineDataChangeServiceImpl {
useInfo.setUseDate(projectContraptionChangeDataDto.getUseDate());
useInfo.setDataSource(projectContraptionChangeDataDto.getDataSource());
useInfo.setIsIntoManagement(Boolean.FALSE);
useInfo.setEquState(String.valueOf(EquimentEnum.ZAIYONG.getCode()));
SingleProjectEquipChangeProcess.setNewUseAddressInfo(projectContraptionChangeDataDto, useInfo);
commonEquipDataProcessService.getIdxBizJgUseInfoService().save(useInfo);
......
......@@ -2639,15 +2639,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List<Map<String, Object>> deviceList = (List<Map<String, Object>>) jsonObject.get("deviceList");
if (CollectionUtils.isNotEmpty(deviceList)) {
deviceList.forEach(map -> {
JSONObject item = new JSONObject(map);
String equCode = item.getString("equCode");
String record = item.getString("record");
if ((whetherToFilterStatus || this.checkEquStatusInUse(record)) && addedEquCodes.add(equCode)) {
item.put("useDate", timeToMonths(useDate));
allEquipment.add(item);
Set<String> validCategories = new HashSet<>(Arrays.asList("8300", "8200", "8100"));
deviceList.stream()
.map(JSONObject::new)
.filter(item -> !validCategories.contains(category) ||
(whetherToFilterStatus || this.checkEquStatusInUse(item.getString("record"))))
.peek(item -> {
if (!validCategories.contains(category)) {
addedEquCodes.add(item.getString("equCode"));
}
});
item.put("useDate", timeToMonths(useDate));
})
.forEach(allEquipment::add);
}
});
}
......
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