diff --git a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java index 1eb2907..11b8040 100644 --- a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java +++ b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java @@ -73,14 +73,14 @@ @ApiOperation("人员登记导出") @PostMapping("/listExport") - public void exportList(@RequestBody StaffListRequest request,HttpServletResponse response) throws Exception { + public void exportList(@RequestBody StaffListRequest request, HttpServletResponse response) throws Exception { List list; if (!CollectionUtils.isEmpty(request.getIds())) { list = staffInfoService.listByIds(request.getIds()); } else { list = staffInfoService.list(request); } - staffInfoService.listExport(list,response); + staffInfoService.listExport(list, response); } @ApiOperation("人员登记详情基础信息") @@ -268,7 +268,6 @@ @ApiOperation("授权信息批量新增") @PostMapping("/authorize/batchAdd") public ReturnDTO authorizeBatchAdd(@RequestBody @Valid List staffAuthorizeList) { - return staffInfoService.authorizeBatchAdd(staffAuthorizeList); } @@ -298,8 +297,8 @@ @ApiOperation("人员授权信息情况统计表导出word、pdf、打印") @PostMapping("/authorize/exportFile") - public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response){ - staffInfoService.exportAuthorizeFile(exportDTO,response); + public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffInfoService.exportAuthorizeFile(exportDTO, response); } @ApiOperation("经验履历列表(分页)") @@ -435,20 +434,20 @@ }); return staffInfoService.verifierBatchDelete(idsDTO.getIds()); } + @ApiOperation("持证参数导出word/pdf/打印") @PostMapping("/verifier/exportFile") - public void verifierExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) { - staffVerifierService.exportFile(exportDTO,response); + public void verifierExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffVerifierService.exportFile(exportDTO, response); } @ApiOperation("人员持证导出word/pdf/打印") @PostMapping("/staff/exportFile") - public void staffExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) throws Exception { - staffInfoService.exportStaffFile(exportDTO,response); + public void staffExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) throws Exception { + staffInfoService.exportStaffFile(exportDTO, response); } - @ApiOperation("训练登记表&详情基础信息(分页)") @PostMapping("/train/listPage") public ReturnDTO> trainListPage(@RequestBody @Valid TrainListRequest request) throws Exception { @@ -535,7 +534,7 @@ @ApiOperation("导出word/pdf/打印") @PostMapping("/train/exportFile") public void trainExportFile(@RequestBody @Valid TrainListRequest request, HttpServletResponse response) throws Exception { - trainInfoService.trainExportFile(request,response); + trainInfoService.trainExportFile(request, response); } diff --git a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java index 1eb2907..11b8040 100644 --- a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java +++ b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java @@ -73,14 +73,14 @@ @ApiOperation("人员登记导出") @PostMapping("/listExport") - public void exportList(@RequestBody StaffListRequest request,HttpServletResponse response) throws Exception { + public void exportList(@RequestBody StaffListRequest request, HttpServletResponse response) throws Exception { List list; if (!CollectionUtils.isEmpty(request.getIds())) { list = staffInfoService.listByIds(request.getIds()); } else { list = staffInfoService.list(request); } - staffInfoService.listExport(list,response); + staffInfoService.listExport(list, response); } @ApiOperation("人员登记详情基础信息") @@ -268,7 +268,6 @@ @ApiOperation("授权信息批量新增") @PostMapping("/authorize/batchAdd") public ReturnDTO authorizeBatchAdd(@RequestBody @Valid List staffAuthorizeList) { - return staffInfoService.authorizeBatchAdd(staffAuthorizeList); } @@ -298,8 +297,8 @@ @ApiOperation("人员授权信息情况统计表导出word、pdf、打印") @PostMapping("/authorize/exportFile") - public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response){ - staffInfoService.exportAuthorizeFile(exportDTO,response); + public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffInfoService.exportAuthorizeFile(exportDTO, response); } @ApiOperation("经验履历列表(分页)") @@ -435,20 +434,20 @@ }); return staffInfoService.verifierBatchDelete(idsDTO.getIds()); } + @ApiOperation("持证参数导出word/pdf/打印") @PostMapping("/verifier/exportFile") - public void verifierExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) { - staffVerifierService.exportFile(exportDTO,response); + public void verifierExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffVerifierService.exportFile(exportDTO, response); } @ApiOperation("人员持证导出word/pdf/打印") @PostMapping("/staff/exportFile") - public void staffExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) throws Exception { - staffInfoService.exportStaffFile(exportDTO,response); + public void staffExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) throws Exception { + staffInfoService.exportStaffFile(exportDTO, response); } - @ApiOperation("训练登记表&详情基础信息(分页)") @PostMapping("/train/listPage") public ReturnDTO> trainListPage(@RequestBody @Valid TrainListRequest request) throws Exception { @@ -535,7 +534,7 @@ @ApiOperation("导出word/pdf/打印") @PostMapping("/train/exportFile") public void trainExportFile(@RequestBody @Valid TrainListRequest request, HttpServletResponse response) throws Exception { - trainInfoService.trainExportFile(request,response); + trainInfoService.trainExportFile(request, response); } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java index cc44586..eff1f98 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java @@ -17,65 +17,125 @@ @Data public class EquipmentInfoImportDTO { - @ExcelProperty(value = "设备名称") + /** + * 设备名称 + */ + @ExcelProperty(index = 0) private String equipmentName; - @ExcelProperty(value = "开箱记录id") + /** + * 开箱记录表编号 + */ + @ExcelProperty(index = 1) + private String unpackRecordNo; + + /** + * 开箱记录id + */ + @ExcelIgnore private Long unpackRecordId; - @ExcelProperty(value = "开箱记录名字") + /** + * 开箱记录名称 + */ + @ExcelProperty private String unpackRecordName; - @ExcelProperty(value = "购进日期") + /** + * 购进日期 + */ + @ExcelProperty(index = 2) private String purchaseDate; - @ExcelProperty(value = "生产国家") + /** + * 生产国家 + */ + @ExcelProperty(index = 3) private String productCountry; - @ExcelProperty(value = "生产厂家") + /** + * 生产厂家 + */ + @ExcelProperty(index = 4) private String manufacturer; - @ExcelProperty(value = "出厂编号") + /** + * 出场编号 + */ + @ExcelProperty(index = 5) private String manufactureNo; - @ExcelProperty(value = "生产日期") + /** + * 生产日期 + */ + @ExcelProperty(index = 6) private String produceDate; - @ExcelProperty(value = "单价(万元)") + /** + * 单价(万元) + */ + @ExcelProperty(index = 7) private BigDecimal unitPrice; - @ExcelProperty(value = "型号规格") + /** + * 使用年限 + */ + @ExcelProperty(index = 8) + private Integer usedYears; + + /** + * 型号规格 + */ + @ExcelProperty(index = 9) private String model; - @ExcelProperty(value = "质量状况") + /** + * 质量状况 + */ + @ExcelProperty(index = 10) private String qualityStatus; /** * 使用状态(字典code) */ - @ExcelProperty(value = "使用状态") + @ExcelProperty(index = 11) private String usageStatus; - @ExcelProperty(value = "重要等级") + /** + * 重要等级 + */ + @ExcelProperty(index = 12) private String level; /** * 设备类型(字典code) */ - @ExcelProperty(value = "设备类型") + @ExcelProperty(index = 13) private String type; /** * 标准类型(字典code) */ - @ExcelProperty(value = "标准类型") + @ExcelProperty(index = 14) private String standardType; - @ExcelProperty(value = "部门编号") - private Long deptId; +// @ExcelProperty(value = "部门编号") +// private Long deptId; - @ExcelIgnore - private String deptName; + /** + * 实验室 + */ + @ExcelProperty(index = 15) + private String labCode; + + /** + * 部门 + */ + @ExcelProperty(index = 16) + private String groupCode; + +// @ExcelIgnore +// private String deptName; @ExcelIgnore private Long directorId; @@ -83,49 +143,75 @@ @ExcelIgnore private String directorName; - @ExcelProperty(value = "负责人编号") + /** + * 负责人编号 + */ + @ExcelProperty(index = 17) private String directorNo; /** * 设备分类(字典code) */ - @ExcelProperty(value = "设备分类") - private String category; +// @ExcelProperty(value = "设备分类") +// private String category; - @ExcelProperty(value = "检定周期") + /** + * 检定周期 + */ + @ExcelProperty(index = 18) private String measureCycle; - @ExcelProperty(value = "位置信息") + /** + * 设备供方id + */ + @ExcelIgnore + private Long supplierId; + /** + * 设备供方名称 + */ + @ExcelIgnore + private String supplierName; + + /** + * 设备供方 + */ + @ExcelProperty(index = 19) + private String supplierNo; + + /** + * 位置信息 + */ + @ExcelProperty(index = 20) private String location; /** * 备注 */ - @ExcelProperty(value = "备注") + @ExcelProperty(index = 21) private String remark; /** * 溯源单位 */ - @ExcelProperty(value = "溯源单位") + @ExcelProperty(index = 22) private String traceCompany; /** * 溯源日期 */ - @ExcelProperty(value = "溯源日期") + @ExcelProperty(index = 23) private String traceDate; /** * 检定有效期 */ - @ExcelProperty(value = "检定有效期") + @ExcelProperty(index = 24) private String measureValidDate; /** * 计量标识(字典code),即溯源结果确认结论 */ - @ExcelProperty(value = "计量标识") + @ExcelProperty(index = 25) private String meterIdentify; } diff --git a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java index 1eb2907..11b8040 100644 --- a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java +++ b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java @@ -73,14 +73,14 @@ @ApiOperation("人员登记导出") @PostMapping("/listExport") - public void exportList(@RequestBody StaffListRequest request,HttpServletResponse response) throws Exception { + public void exportList(@RequestBody StaffListRequest request, HttpServletResponse response) throws Exception { List list; if (!CollectionUtils.isEmpty(request.getIds())) { list = staffInfoService.listByIds(request.getIds()); } else { list = staffInfoService.list(request); } - staffInfoService.listExport(list,response); + staffInfoService.listExport(list, response); } @ApiOperation("人员登记详情基础信息") @@ -268,7 +268,6 @@ @ApiOperation("授权信息批量新增") @PostMapping("/authorize/batchAdd") public ReturnDTO authorizeBatchAdd(@RequestBody @Valid List staffAuthorizeList) { - return staffInfoService.authorizeBatchAdd(staffAuthorizeList); } @@ -298,8 +297,8 @@ @ApiOperation("人员授权信息情况统计表导出word、pdf、打印") @PostMapping("/authorize/exportFile") - public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response){ - staffInfoService.exportAuthorizeFile(exportDTO,response); + public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffInfoService.exportAuthorizeFile(exportDTO, response); } @ApiOperation("经验履历列表(分页)") @@ -435,20 +434,20 @@ }); return staffInfoService.verifierBatchDelete(idsDTO.getIds()); } + @ApiOperation("持证参数导出word/pdf/打印") @PostMapping("/verifier/exportFile") - public void verifierExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) { - staffVerifierService.exportFile(exportDTO,response); + public void verifierExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffVerifierService.exportFile(exportDTO, response); } @ApiOperation("人员持证导出word/pdf/打印") @PostMapping("/staff/exportFile") - public void staffExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) throws Exception { - staffInfoService.exportStaffFile(exportDTO,response); + public void staffExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) throws Exception { + staffInfoService.exportStaffFile(exportDTO, response); } - @ApiOperation("训练登记表&详情基础信息(分页)") @PostMapping("/train/listPage") public ReturnDTO> trainListPage(@RequestBody @Valid TrainListRequest request) throws Exception { @@ -535,7 +534,7 @@ @ApiOperation("导出word/pdf/打印") @PostMapping("/train/exportFile") public void trainExportFile(@RequestBody @Valid TrainListRequest request, HttpServletResponse response) throws Exception { - trainInfoService.trainExportFile(request,response); + trainInfoService.trainExportFile(request, response); } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java index cc44586..eff1f98 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java @@ -17,65 +17,125 @@ @Data public class EquipmentInfoImportDTO { - @ExcelProperty(value = "设备名称") + /** + * 设备名称 + */ + @ExcelProperty(index = 0) private String equipmentName; - @ExcelProperty(value = "开箱记录id") + /** + * 开箱记录表编号 + */ + @ExcelProperty(index = 1) + private String unpackRecordNo; + + /** + * 开箱记录id + */ + @ExcelIgnore private Long unpackRecordId; - @ExcelProperty(value = "开箱记录名字") + /** + * 开箱记录名称 + */ + @ExcelProperty private String unpackRecordName; - @ExcelProperty(value = "购进日期") + /** + * 购进日期 + */ + @ExcelProperty(index = 2) private String purchaseDate; - @ExcelProperty(value = "生产国家") + /** + * 生产国家 + */ + @ExcelProperty(index = 3) private String productCountry; - @ExcelProperty(value = "生产厂家") + /** + * 生产厂家 + */ + @ExcelProperty(index = 4) private String manufacturer; - @ExcelProperty(value = "出厂编号") + /** + * 出场编号 + */ + @ExcelProperty(index = 5) private String manufactureNo; - @ExcelProperty(value = "生产日期") + /** + * 生产日期 + */ + @ExcelProperty(index = 6) private String produceDate; - @ExcelProperty(value = "单价(万元)") + /** + * 单价(万元) + */ + @ExcelProperty(index = 7) private BigDecimal unitPrice; - @ExcelProperty(value = "型号规格") + /** + * 使用年限 + */ + @ExcelProperty(index = 8) + private Integer usedYears; + + /** + * 型号规格 + */ + @ExcelProperty(index = 9) private String model; - @ExcelProperty(value = "质量状况") + /** + * 质量状况 + */ + @ExcelProperty(index = 10) private String qualityStatus; /** * 使用状态(字典code) */ - @ExcelProperty(value = "使用状态") + @ExcelProperty(index = 11) private String usageStatus; - @ExcelProperty(value = "重要等级") + /** + * 重要等级 + */ + @ExcelProperty(index = 12) private String level; /** * 设备类型(字典code) */ - @ExcelProperty(value = "设备类型") + @ExcelProperty(index = 13) private String type; /** * 标准类型(字典code) */ - @ExcelProperty(value = "标准类型") + @ExcelProperty(index = 14) private String standardType; - @ExcelProperty(value = "部门编号") - private Long deptId; +// @ExcelProperty(value = "部门编号") +// private Long deptId; - @ExcelIgnore - private String deptName; + /** + * 实验室 + */ + @ExcelProperty(index = 15) + private String labCode; + + /** + * 部门 + */ + @ExcelProperty(index = 16) + private String groupCode; + +// @ExcelIgnore +// private String deptName; @ExcelIgnore private Long directorId; @@ -83,49 +143,75 @@ @ExcelIgnore private String directorName; - @ExcelProperty(value = "负责人编号") + /** + * 负责人编号 + */ + @ExcelProperty(index = 17) private String directorNo; /** * 设备分类(字典code) */ - @ExcelProperty(value = "设备分类") - private String category; +// @ExcelProperty(value = "设备分类") +// private String category; - @ExcelProperty(value = "检定周期") + /** + * 检定周期 + */ + @ExcelProperty(index = 18) private String measureCycle; - @ExcelProperty(value = "位置信息") + /** + * 设备供方id + */ + @ExcelIgnore + private Long supplierId; + /** + * 设备供方名称 + */ + @ExcelIgnore + private String supplierName; + + /** + * 设备供方 + */ + @ExcelProperty(index = 19) + private String supplierNo; + + /** + * 位置信息 + */ + @ExcelProperty(index = 20) private String location; /** * 备注 */ - @ExcelProperty(value = "备注") + @ExcelProperty(index = 21) private String remark; /** * 溯源单位 */ - @ExcelProperty(value = "溯源单位") + @ExcelProperty(index = 22) private String traceCompany; /** * 溯源日期 */ - @ExcelProperty(value = "溯源日期") + @ExcelProperty(index = 23) private String traceDate; /** * 检定有效期 */ - @ExcelProperty(value = "检定有效期") + @ExcelProperty(index = 24) private String measureValidDate; /** * 计量标识(字典code),即溯源结果确认结论 */ - @ExcelProperty(value = "计量标识") + @ExcelProperty(index = 25) private String meterIdentify; } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java b/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java index 64c15ca..e377fb5 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java @@ -41,7 +41,7 @@ lowFrequencySignal.setFrequency(StringUtils.isNotBlank(lowFrequencySignal.getFrequency()) ? lowFrequencySignal.getFrequency() + lowFrequencySignal.getFrequencyUnit() : ""); lowFrequencySignal.setLowerIndex(StringUtils.isNotBlank(lowFrequencySignal.getLowerIndex()) ? lowFrequencySignal.getLowerIndex() + lowFrequencySignal.getUnit() : ""); lowFrequencySignal.setUpperIndex(StringUtils.isNotBlank(lowFrequencySignal.getUpperIndex()) ? lowFrequencySignal.getUpperIndex() + lowFrequencySignal.getUnit() : ""); - lowFrequencySignal.setMeasureValue(StringUtils.isNotBlank(lowFrequencySignal.getMeasureValue()) ? lowFrequencySignal.getMeasureValue() + lowFrequencySignal.getMeasureValueUnit() : ""); + lowFrequencySignal.setMeasureValue(StringUtils.isNotBlank(lowFrequencySignal.getMeasureValue()) ? lowFrequencySignal.getMeasureValue() + lowFrequencySignal.getVoltageUnit() : ""); if (lowFrequencySignal.getExceedMark() == 1) { lowFrequencySignal.setFlatness(StringUtils.isNotBlank(lowFrequencySignal.getFlatness()) ? lowFrequencySignal.getFlatness() + "*" : lowFrequencySignal.getFlatness()); } diff --git a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java index 1eb2907..11b8040 100644 --- a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java +++ b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java @@ -73,14 +73,14 @@ @ApiOperation("人员登记导出") @PostMapping("/listExport") - public void exportList(@RequestBody StaffListRequest request,HttpServletResponse response) throws Exception { + public void exportList(@RequestBody StaffListRequest request, HttpServletResponse response) throws Exception { List list; if (!CollectionUtils.isEmpty(request.getIds())) { list = staffInfoService.listByIds(request.getIds()); } else { list = staffInfoService.list(request); } - staffInfoService.listExport(list,response); + staffInfoService.listExport(list, response); } @ApiOperation("人员登记详情基础信息") @@ -268,7 +268,6 @@ @ApiOperation("授权信息批量新增") @PostMapping("/authorize/batchAdd") public ReturnDTO authorizeBatchAdd(@RequestBody @Valid List staffAuthorizeList) { - return staffInfoService.authorizeBatchAdd(staffAuthorizeList); } @@ -298,8 +297,8 @@ @ApiOperation("人员授权信息情况统计表导出word、pdf、打印") @PostMapping("/authorize/exportFile") - public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response){ - staffInfoService.exportAuthorizeFile(exportDTO,response); + public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffInfoService.exportAuthorizeFile(exportDTO, response); } @ApiOperation("经验履历列表(分页)") @@ -435,20 +434,20 @@ }); return staffInfoService.verifierBatchDelete(idsDTO.getIds()); } + @ApiOperation("持证参数导出word/pdf/打印") @PostMapping("/verifier/exportFile") - public void verifierExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) { - staffVerifierService.exportFile(exportDTO,response); + public void verifierExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffVerifierService.exportFile(exportDTO, response); } @ApiOperation("人员持证导出word/pdf/打印") @PostMapping("/staff/exportFile") - public void staffExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) throws Exception { - staffInfoService.exportStaffFile(exportDTO,response); + public void staffExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) throws Exception { + staffInfoService.exportStaffFile(exportDTO, response); } - @ApiOperation("训练登记表&详情基础信息(分页)") @PostMapping("/train/listPage") public ReturnDTO> trainListPage(@RequestBody @Valid TrainListRequest request) throws Exception { @@ -535,7 +534,7 @@ @ApiOperation("导出word/pdf/打印") @PostMapping("/train/exportFile") public void trainExportFile(@RequestBody @Valid TrainListRequest request, HttpServletResponse response) throws Exception { - trainInfoService.trainExportFile(request,response); + trainInfoService.trainExportFile(request, response); } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java index cc44586..eff1f98 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java @@ -17,65 +17,125 @@ @Data public class EquipmentInfoImportDTO { - @ExcelProperty(value = "设备名称") + /** + * 设备名称 + */ + @ExcelProperty(index = 0) private String equipmentName; - @ExcelProperty(value = "开箱记录id") + /** + * 开箱记录表编号 + */ + @ExcelProperty(index = 1) + private String unpackRecordNo; + + /** + * 开箱记录id + */ + @ExcelIgnore private Long unpackRecordId; - @ExcelProperty(value = "开箱记录名字") + /** + * 开箱记录名称 + */ + @ExcelProperty private String unpackRecordName; - @ExcelProperty(value = "购进日期") + /** + * 购进日期 + */ + @ExcelProperty(index = 2) private String purchaseDate; - @ExcelProperty(value = "生产国家") + /** + * 生产国家 + */ + @ExcelProperty(index = 3) private String productCountry; - @ExcelProperty(value = "生产厂家") + /** + * 生产厂家 + */ + @ExcelProperty(index = 4) private String manufacturer; - @ExcelProperty(value = "出厂编号") + /** + * 出场编号 + */ + @ExcelProperty(index = 5) private String manufactureNo; - @ExcelProperty(value = "生产日期") + /** + * 生产日期 + */ + @ExcelProperty(index = 6) private String produceDate; - @ExcelProperty(value = "单价(万元)") + /** + * 单价(万元) + */ + @ExcelProperty(index = 7) private BigDecimal unitPrice; - @ExcelProperty(value = "型号规格") + /** + * 使用年限 + */ + @ExcelProperty(index = 8) + private Integer usedYears; + + /** + * 型号规格 + */ + @ExcelProperty(index = 9) private String model; - @ExcelProperty(value = "质量状况") + /** + * 质量状况 + */ + @ExcelProperty(index = 10) private String qualityStatus; /** * 使用状态(字典code) */ - @ExcelProperty(value = "使用状态") + @ExcelProperty(index = 11) private String usageStatus; - @ExcelProperty(value = "重要等级") + /** + * 重要等级 + */ + @ExcelProperty(index = 12) private String level; /** * 设备类型(字典code) */ - @ExcelProperty(value = "设备类型") + @ExcelProperty(index = 13) private String type; /** * 标准类型(字典code) */ - @ExcelProperty(value = "标准类型") + @ExcelProperty(index = 14) private String standardType; - @ExcelProperty(value = "部门编号") - private Long deptId; +// @ExcelProperty(value = "部门编号") +// private Long deptId; - @ExcelIgnore - private String deptName; + /** + * 实验室 + */ + @ExcelProperty(index = 15) + private String labCode; + + /** + * 部门 + */ + @ExcelProperty(index = 16) + private String groupCode; + +// @ExcelIgnore +// private String deptName; @ExcelIgnore private Long directorId; @@ -83,49 +143,75 @@ @ExcelIgnore private String directorName; - @ExcelProperty(value = "负责人编号") + /** + * 负责人编号 + */ + @ExcelProperty(index = 17) private String directorNo; /** * 设备分类(字典code) */ - @ExcelProperty(value = "设备分类") - private String category; +// @ExcelProperty(value = "设备分类") +// private String category; - @ExcelProperty(value = "检定周期") + /** + * 检定周期 + */ + @ExcelProperty(index = 18) private String measureCycle; - @ExcelProperty(value = "位置信息") + /** + * 设备供方id + */ + @ExcelIgnore + private Long supplierId; + /** + * 设备供方名称 + */ + @ExcelIgnore + private String supplierName; + + /** + * 设备供方 + */ + @ExcelProperty(index = 19) + private String supplierNo; + + /** + * 位置信息 + */ + @ExcelProperty(index = 20) private String location; /** * 备注 */ - @ExcelProperty(value = "备注") + @ExcelProperty(index = 21) private String remark; /** * 溯源单位 */ - @ExcelProperty(value = "溯源单位") + @ExcelProperty(index = 22) private String traceCompany; /** * 溯源日期 */ - @ExcelProperty(value = "溯源日期") + @ExcelProperty(index = 23) private String traceDate; /** * 检定有效期 */ - @ExcelProperty(value = "检定有效期") + @ExcelProperty(index = 24) private String measureValidDate; /** * 计量标识(字典code),即溯源结果确认结论 */ - @ExcelProperty(value = "计量标识") + @ExcelProperty(index = 25) private String meterIdentify; } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java b/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java index 64c15ca..e377fb5 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java @@ -41,7 +41,7 @@ lowFrequencySignal.setFrequency(StringUtils.isNotBlank(lowFrequencySignal.getFrequency()) ? lowFrequencySignal.getFrequency() + lowFrequencySignal.getFrequencyUnit() : ""); lowFrequencySignal.setLowerIndex(StringUtils.isNotBlank(lowFrequencySignal.getLowerIndex()) ? lowFrequencySignal.getLowerIndex() + lowFrequencySignal.getUnit() : ""); lowFrequencySignal.setUpperIndex(StringUtils.isNotBlank(lowFrequencySignal.getUpperIndex()) ? lowFrequencySignal.getUpperIndex() + lowFrequencySignal.getUnit() : ""); - lowFrequencySignal.setMeasureValue(StringUtils.isNotBlank(lowFrequencySignal.getMeasureValue()) ? lowFrequencySignal.getMeasureValue() + lowFrequencySignal.getMeasureValueUnit() : ""); + lowFrequencySignal.setMeasureValue(StringUtils.isNotBlank(lowFrequencySignal.getMeasureValue()) ? lowFrequencySignal.getMeasureValue() + lowFrequencySignal.getVoltageUnit() : ""); if (lowFrequencySignal.getExceedMark() == 1) { lowFrequencySignal.setFlatness(StringUtils.isNotBlank(lowFrequencySignal.getFlatness()) ? lowFrequencySignal.getFlatness() + "*" : lowFrequencySignal.getFlatness()); } diff --git a/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java b/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java index 68957d3..1d5b668 100644 --- a/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java +++ b/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java @@ -109,7 +109,8 @@ s.setTestValueNine(StringUtils.isNotBlank(s.getTestValueNine()) ? s.getTestValueNine() + s.getAmplitudeUnit() : ""); s.setTestValueTen(StringUtils.isNotBlank(s.getTestValueTen()) ? s.getTestValueTen() + s.getAmplitudeUnit() : ""); s.setAmplitude(StringUtils.isNotBlank(s.getAmplitude()) ? s.getAmplitude() + s.getAmplitudeUnit() : ""); - s.setAverageValue(StringUtils.isNotBlank(s.getAverageValue()) ? s.getAverageValue() + s.getAmplitudeUnit() : ""); +// s.setAverageValue(StringUtils.isNotBlank(s.getAverageValue()) ? s.getAverageValue() + s.getAmplitudeUnit() : ""); + s.setLessThanValue(s.getLessThan() == 1 ? "合格" : "不合格"); } if (params[2].equals(s.getParams())) { s.setTestValueOne(StringUtils.isNotBlank(s.getTestValueOne()) ? s.getTestValueOne() + s.getPhaseUnit() : ""); @@ -124,6 +125,7 @@ s.setTestValueTen(StringUtils.isNotBlank(s.getTestValueTen()) ? s.getTestValueTen() + s.getPhaseUnit() : ""); s.setPhase(StringUtils.isNotBlank(s.getPhase()) ? s.getPhase() + s.getPhaseUnit() : ""); s.setAverageValue(StringUtils.isNotBlank(s.getAverageValue()) ? s.getAverageValue() + s.getPhaseUnit() : ""); + s.setLessThanValue(s.getLessThan() == 1 ? "合格" : "不合格"); } }).collect(Collectors.toList()); map.put(REPEAT_PREFIX + (i + 1), repList); diff --git a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java index 1eb2907..11b8040 100644 --- a/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java +++ b/casic-metering-api/src/main/java/com/casic/missiles/controller/resource/ResourceStaffInfoController.java @@ -73,14 +73,14 @@ @ApiOperation("人员登记导出") @PostMapping("/listExport") - public void exportList(@RequestBody StaffListRequest request,HttpServletResponse response) throws Exception { + public void exportList(@RequestBody StaffListRequest request, HttpServletResponse response) throws Exception { List list; if (!CollectionUtils.isEmpty(request.getIds())) { list = staffInfoService.listByIds(request.getIds()); } else { list = staffInfoService.list(request); } - staffInfoService.listExport(list,response); + staffInfoService.listExport(list, response); } @ApiOperation("人员登记详情基础信息") @@ -268,7 +268,6 @@ @ApiOperation("授权信息批量新增") @PostMapping("/authorize/batchAdd") public ReturnDTO authorizeBatchAdd(@RequestBody @Valid List staffAuthorizeList) { - return staffInfoService.authorizeBatchAdd(staffAuthorizeList); } @@ -298,8 +297,8 @@ @ApiOperation("人员授权信息情况统计表导出word、pdf、打印") @PostMapping("/authorize/exportFile") - public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response){ - staffInfoService.exportAuthorizeFile(exportDTO,response); + public void exportAuthorizeFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffInfoService.exportAuthorizeFile(exportDTO, response); } @ApiOperation("经验履历列表(分页)") @@ -435,20 +434,20 @@ }); return staffInfoService.verifierBatchDelete(idsDTO.getIds()); } + @ApiOperation("持证参数导出word/pdf/打印") @PostMapping("/verifier/exportFile") - public void verifierExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) { - staffVerifierService.exportFile(exportDTO,response); + public void verifierExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) { + staffVerifierService.exportFile(exportDTO, response); } @ApiOperation("人员持证导出word/pdf/打印") @PostMapping("/staff/exportFile") - public void staffExportFile(@RequestBody ExportDTO exportDTO,HttpServletResponse response) throws Exception { - staffInfoService.exportStaffFile(exportDTO,response); + public void staffExportFile(@RequestBody ExportDTO exportDTO, HttpServletResponse response) throws Exception { + staffInfoService.exportStaffFile(exportDTO, response); } - @ApiOperation("训练登记表&详情基础信息(分页)") @PostMapping("/train/listPage") public ReturnDTO> trainListPage(@RequestBody @Valid TrainListRequest request) throws Exception { @@ -535,7 +534,7 @@ @ApiOperation("导出word/pdf/打印") @PostMapping("/train/exportFile") public void trainExportFile(@RequestBody @Valid TrainListRequest request, HttpServletResponse response) throws Exception { - trainInfoService.trainExportFile(request,response); + trainInfoService.trainExportFile(request, response); } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java index cc44586..eff1f98 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/dto/equipment/EquipmentInfoImportDTO.java @@ -17,65 +17,125 @@ @Data public class EquipmentInfoImportDTO { - @ExcelProperty(value = "设备名称") + /** + * 设备名称 + */ + @ExcelProperty(index = 0) private String equipmentName; - @ExcelProperty(value = "开箱记录id") + /** + * 开箱记录表编号 + */ + @ExcelProperty(index = 1) + private String unpackRecordNo; + + /** + * 开箱记录id + */ + @ExcelIgnore private Long unpackRecordId; - @ExcelProperty(value = "开箱记录名字") + /** + * 开箱记录名称 + */ + @ExcelProperty private String unpackRecordName; - @ExcelProperty(value = "购进日期") + /** + * 购进日期 + */ + @ExcelProperty(index = 2) private String purchaseDate; - @ExcelProperty(value = "生产国家") + /** + * 生产国家 + */ + @ExcelProperty(index = 3) private String productCountry; - @ExcelProperty(value = "生产厂家") + /** + * 生产厂家 + */ + @ExcelProperty(index = 4) private String manufacturer; - @ExcelProperty(value = "出厂编号") + /** + * 出场编号 + */ + @ExcelProperty(index = 5) private String manufactureNo; - @ExcelProperty(value = "生产日期") + /** + * 生产日期 + */ + @ExcelProperty(index = 6) private String produceDate; - @ExcelProperty(value = "单价(万元)") + /** + * 单价(万元) + */ + @ExcelProperty(index = 7) private BigDecimal unitPrice; - @ExcelProperty(value = "型号规格") + /** + * 使用年限 + */ + @ExcelProperty(index = 8) + private Integer usedYears; + + /** + * 型号规格 + */ + @ExcelProperty(index = 9) private String model; - @ExcelProperty(value = "质量状况") + /** + * 质量状况 + */ + @ExcelProperty(index = 10) private String qualityStatus; /** * 使用状态(字典code) */ - @ExcelProperty(value = "使用状态") + @ExcelProperty(index = 11) private String usageStatus; - @ExcelProperty(value = "重要等级") + /** + * 重要等级 + */ + @ExcelProperty(index = 12) private String level; /** * 设备类型(字典code) */ - @ExcelProperty(value = "设备类型") + @ExcelProperty(index = 13) private String type; /** * 标准类型(字典code) */ - @ExcelProperty(value = "标准类型") + @ExcelProperty(index = 14) private String standardType; - @ExcelProperty(value = "部门编号") - private Long deptId; +// @ExcelProperty(value = "部门编号") +// private Long deptId; - @ExcelIgnore - private String deptName; + /** + * 实验室 + */ + @ExcelProperty(index = 15) + private String labCode; + + /** + * 部门 + */ + @ExcelProperty(index = 16) + private String groupCode; + +// @ExcelIgnore +// private String deptName; @ExcelIgnore private Long directorId; @@ -83,49 +143,75 @@ @ExcelIgnore private String directorName; - @ExcelProperty(value = "负责人编号") + /** + * 负责人编号 + */ + @ExcelProperty(index = 17) private String directorNo; /** * 设备分类(字典code) */ - @ExcelProperty(value = "设备分类") - private String category; +// @ExcelProperty(value = "设备分类") +// private String category; - @ExcelProperty(value = "检定周期") + /** + * 检定周期 + */ + @ExcelProperty(index = 18) private String measureCycle; - @ExcelProperty(value = "位置信息") + /** + * 设备供方id + */ + @ExcelIgnore + private Long supplierId; + /** + * 设备供方名称 + */ + @ExcelIgnore + private String supplierName; + + /** + * 设备供方 + */ + @ExcelProperty(index = 19) + private String supplierNo; + + /** + * 位置信息 + */ + @ExcelProperty(index = 20) private String location; /** * 备注 */ - @ExcelProperty(value = "备注") + @ExcelProperty(index = 21) private String remark; /** * 溯源单位 */ - @ExcelProperty(value = "溯源单位") + @ExcelProperty(index = 22) private String traceCompany; /** * 溯源日期 */ - @ExcelProperty(value = "溯源日期") + @ExcelProperty(index = 23) private String traceDate; /** * 检定有效期 */ - @ExcelProperty(value = "检定有效期") + @ExcelProperty(index = 24) private String measureValidDate; /** * 计量标识(字典code),即溯源结果确认结论 */ - @ExcelProperty(value = "计量标识") + @ExcelProperty(index = 25) private String meterIdentify; } diff --git a/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java b/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java index 64c15ca..e377fb5 100644 --- a/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java +++ b/casic-metering-model/src/main/java/com/casic/missiles/strategy/impl/LowFrequencySignalStrategyType.java @@ -41,7 +41,7 @@ lowFrequencySignal.setFrequency(StringUtils.isNotBlank(lowFrequencySignal.getFrequency()) ? lowFrequencySignal.getFrequency() + lowFrequencySignal.getFrequencyUnit() : ""); lowFrequencySignal.setLowerIndex(StringUtils.isNotBlank(lowFrequencySignal.getLowerIndex()) ? lowFrequencySignal.getLowerIndex() + lowFrequencySignal.getUnit() : ""); lowFrequencySignal.setUpperIndex(StringUtils.isNotBlank(lowFrequencySignal.getUpperIndex()) ? lowFrequencySignal.getUpperIndex() + lowFrequencySignal.getUnit() : ""); - lowFrequencySignal.setMeasureValue(StringUtils.isNotBlank(lowFrequencySignal.getMeasureValue()) ? lowFrequencySignal.getMeasureValue() + lowFrequencySignal.getMeasureValueUnit() : ""); + lowFrequencySignal.setMeasureValue(StringUtils.isNotBlank(lowFrequencySignal.getMeasureValue()) ? lowFrequencySignal.getMeasureValue() + lowFrequencySignal.getVoltageUnit() : ""); if (lowFrequencySignal.getExceedMark() == 1) { lowFrequencySignal.setFlatness(StringUtils.isNotBlank(lowFrequencySignal.getFlatness()) ? lowFrequencySignal.getFlatness() + "*" : lowFrequencySignal.getFlatness()); } diff --git a/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java b/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java index 68957d3..1d5b668 100644 --- a/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java +++ b/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/eqpt/standard/impl/SParameterHandler.java @@ -109,7 +109,8 @@ s.setTestValueNine(StringUtils.isNotBlank(s.getTestValueNine()) ? s.getTestValueNine() + s.getAmplitudeUnit() : ""); s.setTestValueTen(StringUtils.isNotBlank(s.getTestValueTen()) ? s.getTestValueTen() + s.getAmplitudeUnit() : ""); s.setAmplitude(StringUtils.isNotBlank(s.getAmplitude()) ? s.getAmplitude() + s.getAmplitudeUnit() : ""); - s.setAverageValue(StringUtils.isNotBlank(s.getAverageValue()) ? s.getAverageValue() + s.getAmplitudeUnit() : ""); +// s.setAverageValue(StringUtils.isNotBlank(s.getAverageValue()) ? s.getAverageValue() + s.getAmplitudeUnit() : ""); + s.setLessThanValue(s.getLessThan() == 1 ? "合格" : "不合格"); } if (params[2].equals(s.getParams())) { s.setTestValueOne(StringUtils.isNotBlank(s.getTestValueOne()) ? s.getTestValueOne() + s.getPhaseUnit() : ""); @@ -124,6 +125,7 @@ s.setTestValueTen(StringUtils.isNotBlank(s.getTestValueTen()) ? s.getTestValueTen() + s.getPhaseUnit() : ""); s.setPhase(StringUtils.isNotBlank(s.getPhase()) ? s.getPhase() + s.getPhaseUnit() : ""); s.setAverageValue(StringUtils.isNotBlank(s.getAverageValue()) ? s.getAverageValue() + s.getPhaseUnit() : ""); + s.setLessThanValue(s.getLessThan() == 1 ? "合格" : "不合格"); } }).collect(Collectors.toList()); map.put(REPEAT_PREFIX + (i + 1), repList); diff --git a/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/equipment/BizEquipmentInfoServiceImpl.java b/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/equipment/BizEquipmentInfoServiceImpl.java index c946499..d6d66c5 100644 --- a/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/equipment/BizEquipmentInfoServiceImpl.java +++ b/casic-metering-service/src/main/java/com/casic/missiles/service/Impl/equipment/BizEquipmentInfoServiceImpl.java @@ -126,6 +126,10 @@ private BizEquipmentExceptionHandleMapper handleMapper; @Autowired private BizResourceTechniqueFileMapper techniqueFileMapper; + @Autowired + private BizEquipmentUnpackAcceptMapper unpackAcceptMapper; + @Autowired + private BizResourceSupplierInfoMapper supplierInfoMapper; @Override public Page approvalListPage(Page page, EquipmentApprovalListRequest request) throws Exception { @@ -805,14 +809,14 @@ */ @Override public ReturnDTO getMaintainByLogNo(String logNo) { - if (StringUtils.isBlank(logNo)){ + if (StringUtils.isBlank(logNo)) { return ReturnUtil.failed("文件编号不能为空"); } LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(BizEquipmentMaintain::getLogNo,logNo); + queryWrapper.eq(BizEquipmentMaintain::getLogNo, logNo); queryWrapper.last("limit 1"); BizEquipmentMaintain bizEquipmentMaintain = maintainMapper.selectOne(queryWrapper); - if (ObjectUtils.isEmpty(bizEquipmentMaintain)){ + if (ObjectUtils.isEmpty(bizEquipmentMaintain)) { return ReturnUtil.failed("未找到该记录"); } return ReturnUtil.success(bizEquipmentMaintain); @@ -825,36 +829,36 @@ */ @Override public ReturnDTO getEnvironmentByRecordNo(String recordNo, String type) { - if (StringUtils.isBlank(recordNo)){ + if (StringUtils.isBlank(recordNo)) { return ReturnUtil.failed("文件编号不能为空"); } - if (StringUtils.isBlank(type)){ + if (StringUtils.isBlank(type)) { return ReturnUtil.failed("文件来源类型不能为空"); } - if ("1".equals(type)){ + if ("1".equals(type)) { LambdaQueryWrapper upsRecordWrapper = new LambdaQueryWrapper<>(); upsRecordWrapper.eq(BizResourceEnvironmentUpsRecord::getRecordNo, recordNo); upsRecordWrapper.last("limit 1"); BizResourceEnvironmentUpsRecord upsRecord = upsRecordMapper.selectOne(upsRecordWrapper); - if (ObjectUtils.isEmpty(upsRecord)){ + if (ObjectUtils.isEmpty(upsRecord)) { return ReturnUtil.failed("未找到该记录"); } return ReturnUtil.success(upsRecord); - }else if ("2".equals(type)){ + } else if ("2".equals(type)) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(BizResourceEnvironmentVoltage::getRecordNo,recordNo); + queryWrapper.eq(BizResourceEnvironmentVoltage::getRecordNo, recordNo); queryWrapper.last("limit 1"); BizResourceEnvironmentVoltage voltage = voltageMapper.selectOne(queryWrapper); - if (ObjectUtils.isEmpty(voltage)){ + if (ObjectUtils.isEmpty(voltage)) { return ReturnUtil.failed("未找到该记录"); } return ReturnUtil.success(voltage); - }else if ("3".equals(type)){ + } else if ("3".equals(type)) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(BizResourceEnvironmentResistance::getRecordNo,recordNo); + queryWrapper.eq(BizResourceEnvironmentResistance::getRecordNo, recordNo); queryWrapper.last("limit 1"); BizResourceEnvironmentResistance resistance = resistanceMapper.selectOne(queryWrapper); - if (ObjectUtils.isEmpty(resistance)){ + if (ObjectUtils.isEmpty(resistance)) { return ReturnUtil.failed("未找到该记录"); } return ReturnUtil.success(resistance); @@ -1041,7 +1045,9 @@ String validMsg = "第%d行数据校验失败:%s"; //负责人列表、部门列表 List staffInfoList = staffInfoMapper.selectList(new QueryWrapper<>()); - List deptList = deptMapper.selectList(new QueryWrapper<>()); +// List deptList = deptMapper.selectList(new QueryWrapper<>()); + List unpackAcceptList = unpackAcceptMapper.selectList(null); + List supplierInfoList = supplierInfoMapper.selectList(null); for (int i = 0; i < list.size(); i++) { EquipmentInfoImportDTO importDTO = list.get(i); //非空校验 @@ -1069,12 +1075,16 @@ throw new BusinessException(1500, String.format(validMsg, i + 1, "设备类型不能为空")); if (StrUtil.isBlank(importDTO.getStandardType())) throw new BusinessException(1500, String.format(validMsg, i + 1, "标准类型不能为空")); - if (Objects.isNull(importDTO.getDeptId())) - throw new BusinessException(1500, String.format(validMsg, i + 1, "部门编号不能为空")); +// if (Objects.isNull(importDTO.getDeptId())) +// throw new BusinessException(1500, String.format(validMsg, i + 1, "部门编号不能为空")); + if (StrUtil.isBlank(importDTO.getLabCode())) + throw new BusinessException(1500, String.format(validMsg, i + 1, "实验室不能为空")); + if (StrUtil.isBlank(importDTO.getGroupCode())) + throw new BusinessException(1500, String.format(validMsg, i + 1, "部门不能为空")); if (StrUtil.isBlank(importDTO.getDirectorNo())) throw new BusinessException(1500, String.format(validMsg, i + 1, "负责人编号不能为空")); - if (StrUtil.isBlank(importDTO.getCategory())) - throw new BusinessException(1500, String.format(validMsg, i + 1, "设备分类不能为空")); +// if (StrUtil.isBlank(importDTO.getCategory())) +// throw new BusinessException(1500, String.format(validMsg, i + 1, "设备分类不能为空")); if (StrUtil.isBlank(importDTO.getMeasureCycle())) throw new BusinessException(1500, String.format(validMsg, i + 1, "检定周期不能为空")); if (StrUtil.isBlank(importDTO.getTraceCompany())) @@ -1121,18 +1131,30 @@ } importDTO.setDirectorId(staffInfo.getId()); importDTO.setDirectorName(staffInfo.getStaffName()); - //部门编号获取部门名字 - Dept deptInfo = deptList.stream().filter(dept -> dept.getId().equals(importDTO.getDeptId())).findFirst().orElse(null); - if (Objects.isNull(deptInfo)) { - throw new BusinessException(1500, String.format(validMsg, i + 1, "部门编号不存在")); +// //部门编号获取部门名字 +// Dept deptInfo = deptList.stream().filter(dept -> dept.getId().equals(importDTO.getDeptId())).findFirst().orElse(null); +// if (Objects.isNull(deptInfo)) { +// throw new BusinessException(1500, String.format(validMsg, i + 1, "部门编号不存在")); +// } +// importDTO.setDeptId(deptInfo.getId()); +// importDTO.setDeptName(deptInfo.getSimpleName()); + BizEquipmentUnpackAccept unpackAccept = unpackAcceptList.stream().filter(unpack -> unpack.getLogNo().equals(importDTO.getUnpackRecordNo())).findFirst().orElse(null); + if (Objects.nonNull(unpackAccept)) { + importDTO.setUnpackRecordId(unpackAccept.getId()); + importDTO.setUnpackRecordName(unpackAccept.getLogName()); + importDTO.setUnpackRecordNo(unpackAccept.getLogNo()); } - importDTO.setDeptId(deptInfo.getId()); - importDTO.setDeptName(deptInfo.getSimpleName()); + + BizResourceSupplierInfo supplierInfo = supplierInfoList.stream().filter(supplier -> supplier.getSupplierNo().equals(importDTO.getSupplierNo())).findFirst().orElse(null); + if (Objects.nonNull(supplierInfo)) { + importDTO.setSupplierId(supplierInfo.getId()); + importDTO.setSupplierName(supplierInfo.getSupplierName()); + importDTO.setSupplierNo(supplierInfo.getSupplierNo()); + } //导入表格中的设备判重 if (list.stream().filter(info -> info.getManufactureNo().equals(importDTO.getManufactureNo()) && info.getModel().equals(importDTO.getModel())).count() > 1) { throw new BusinessException(1500, String.format(validMsg, i + 1, "表格中设备重复")); } - } }