From 753a303fec46c861e2ef16597552f1a7055326fe Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 23 Dec 2025 15:12:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=91=8A=E8=AE=BE=E5=A4=87=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PqReportServiceImpl.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java b/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java index fd2c83da..d8f320b1 100644 --- a/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java @@ -65,7 +65,9 @@ import com.njcn.gather.storage.service.AdNonHarmonicService; import com.njcn.gather.system.cfg.pojo.enums.SceneEnum; import com.njcn.gather.system.cfg.service.ISysTestConfigService; import com.njcn.gather.system.dictionary.pojo.po.DictData; +import com.njcn.gather.system.dictionary.pojo.po.DictType; import com.njcn.gather.system.dictionary.service.IDictDataService; +import com.njcn.gather.system.dictionary.service.IDictTypeService; import com.njcn.gather.type.pojo.po.DevType; import com.njcn.gather.type.service.IDevTypeService; import com.njcn.http.util.RestTemplateUtil; @@ -161,9 +163,13 @@ public class PqReportServiceImpl extends ServiceImpl i @Value("${report.dateFormat}") private String dateFormat; + // 设备出厂装置型号字典对应的code + private final String EX_FACTORY_DEV_TYPE = "Ex-factory_Dev_Type"; + private final IPqDevService iPqDevService; private final PqDevMapper pqDevMapper; + private final IDictTypeService dictTypeService; private final IDictDataService dictDataService; private final IAdPlanService adPlanService; @@ -1426,6 +1432,17 @@ public class PqReportServiceImpl extends ServiceImpl i Map baseModelMap = new HashMap<>(32); // 获取设备型号 baseModelMap.put(prefix + BaseReportKeyEnum.DEV_TYPE.getKey() + suffix, devType.getName()); + DictType dictType = dictTypeService.getByCode(EX_FACTORY_DEV_TYPE); + if (ObjectUtil.isNotNull(dictType)) { + List dictDataList = dictDataService.getDictDataByTypeId(dictType.getId()); + DictData targetDictData = dictDataList.stream().filter(dictData -> dictData.getCode().equals(pqDevVO.getDevType())).findFirst().orElse(null); + if (ObjectUtil.isNotNull(targetDictData)) { + String name = devType.getName(); + name = name.substring(0, name.lastIndexOf(StrUtil.C_UNDERLINE)); + baseModelMap.put(prefix + BaseReportKeyEnum.DEV_TYPE.getKey() + suffix, name + "(" + targetDictData.getCode() + ")"); + } + } + // 检测员 baseModelMap.put(prefix + BaseReportKeyEnum.INSPECTOR.getKey() + suffix, pqDevVO.getCheckBy() + ""); String datePattern = DatePattern.NORM_DATE_PATTERN;