From 9a480d6154fa31b7ceacf84f48fbf22892e18663 Mon Sep 17 00:00:00 2001 From: FCL Date: Thu, 9 Apr 2026 16:35:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AE=BE=E5=A4=87=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/ReportDocumentFileController.java | 9 ++++++--- .../ReportDocumentFileServiceImpl.java | 3 ++- .../controller/vo/DeviceApplyPageReqVO.java | 4 ++++ .../controller/vo/DeviceApplyRespVO.java | 4 ++++ .../controller/vo/DeviceApplySaveReqVO.java | 3 +++ .../vo/DeviceConfigBusinessItemRespVO.java | 2 +- .../vo/DeviceMaintainItemPageReqVO.java | 3 +++ .../vo/DeviceMaintainItemRespVO.java | 6 ++++++ .../vo/DeviceMaintainItemSaveReqVO.java | 3 +++ .../device/dal/dataobject/DeviceApplyDO.java | 6 ++++++ .../dal/dataobject/DeviceMaintainItemDO.java | 5 +++++ .../device/dal/mapper/DeviceApplyMapper.java | 1 + .../service/DeviceApplyServiceImpl.java | 1 + .../DeviceMaintainItemServiceImpl.java | 1 + .../service/DeviceProductServiceImpl.java | 4 ++++ .../dal/mapper/DeviceCalibrationMapper.xml | 9 +++++++++ .../dal/mapper/DevicePeriodCheckMapper.xml | 20 +++++++++++++++++++ 17 files changed, 79 insertions(+), 5 deletions(-) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java index 1f0f02b7..0943415a 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java @@ -110,10 +110,13 @@ public class ReportDocumentFileController extends AbstractFileUploadController i public CommonResult getPdfFileObjByMainId(ReportDocumentFileSaveReqVO vo) { Long mainId = vo.getMainId(); Integer version = vo.getVersion(); - if(version == null){ - ReportDocumentMainDO mainDO = reportDocumentMainService.getReportDocumentMain(mainId); +// String lastVersionFlag = vo.getLastVersionFlag(); +// if("1".equals(lastVersionFlag)) +// vo.setType(""); +// if(version == null){ +// ReportDocumentMainDO mainDO = reportDocumentMainService.getReportDocumentMain(mainId); // version = mainDO.getDocumentVersion(); - } +// } // if(type != null) // entity if(ObjectUtils.isEmpty(vo.getType())) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentFileServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentFileServiceImpl.java index 43291040..2b64f382 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentFileServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentFileServiceImpl.java @@ -7,6 +7,7 @@ import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFil import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentFileSaveReqVO; import org.springframework.stereotype.Service; import jakarta.annotation.Resource; +import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; import java.util.*; @@ -39,7 +40,7 @@ public class ReportDocumentFileServiceImpl implements ReportDocumentFileService LambdaQueryWrapper query = new LambdaQueryWrapper<>(); if(vo.getMainId() != null) query.eq(ReportDocumentFileDO::getMainId, vo.getMainId()); - if(vo.getType() != null) + if(!ObjectUtils.isEmpty(vo.getType())) query.eq(ReportDocumentFileDO::getType, vo.getType()); if(vo.getVersion() != null) query.eq(ReportDocumentFileDO::getVersion, vo.getVersion()); diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyPageReqVO.java index eebc630f..4d062526 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyPageReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyPageReqVO.java @@ -27,6 +27,10 @@ public class DeviceApplyPageReqVO extends PageParam { @Schema(description = "申请人ID") private String applyUser; + @Schema(description = "申请时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] applyTime; + @Schema(description = "申请标题") private String title; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyRespVO.java index 5e60f278..113eb4a9 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplyRespVO.java @@ -32,6 +32,10 @@ public class DeviceApplyRespVO { @ExcelProperty("申请人") private String applyUserName; + @Schema(description = "申请时间") + @ExcelProperty("申请时间") + private LocalDateTime applyTime; + @Schema(description = "申请标题") @ExcelProperty("申请标题") private String title; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplySaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplySaveReqVO.java index 3c837da4..6216bb36 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplySaveReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceApplySaveReqVO.java @@ -28,6 +28,9 @@ public class DeviceApplySaveReqVO { @Schema(description = "申请人ID") private String applyUser; + @Schema(description = "申请时间") + private LocalDateTime applyTime; + @Schema(description = "申请标题") private String title; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceConfigBusinessItemRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceConfigBusinessItemRespVO.java index 58c16d1f..d3c887e8 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceConfigBusinessItemRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceConfigBusinessItemRespVO.java @@ -53,7 +53,7 @@ public class DeviceConfigBusinessItemRespVO { @ExcelProperty("责任人") private String dutyRemark; - @Dict(dicCode = "write_way") + @Dict(dicCode = "maintenance_item_input_way") @Schema(description = "填写方式") @ExcelProperty("填写方式") private String writeWay; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemPageReqVO.java index 5289d2f0..a877a399 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemPageReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemPageReqVO.java @@ -67,6 +67,9 @@ public class DeviceMaintainItemPageReqVO extends PageParam { @Schema(description = "责任人") private String dutyRemark; + @Schema(description = "填写方式") + private String writeWay; + @Schema(description = "排序号") private Integer sortNo; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemRespVO.java index 5c0d03d5..7387cc02 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemRespVO.java @@ -1,5 +1,6 @@ package com.zt.plat.module.qms.resource.device.controller.vo; +import com.zt.plat.module.qms.core.aspect.annotation.Dict; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; @@ -87,6 +88,11 @@ public class DeviceMaintainItemRespVO { @ExcelProperty("责任人") private String dutyRemark; + @Schema(description = "填写方式") + @ExcelProperty("填写方式") + @Dict(dicCode = "maintenance_item_input_way") + private String writeWay; + @Schema(description = "排序号") @ExcelProperty("排序号") private Integer sortNo; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemSaveReqVO.java index 87f6f4e6..64b67849 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemSaveReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/controller/vo/DeviceMaintainItemSaveReqVO.java @@ -66,6 +66,9 @@ public class DeviceMaintainItemSaveReqVO { @Schema(description = "责任人") private String dutyRemark; + @Schema(description = "填写方式") + private String writeWay; + @Schema(description = "排序号") private Integer sortNo; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceApplyDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceApplyDO.java index 61364b99..79ecbc67 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceApplyDO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceApplyDO.java @@ -57,6 +57,12 @@ public class DeviceApplyDO extends BusinessBaseDO { @TableField("APL_USER") private Long applyUser; + /** + * 申请时间 + */ + @TableField("APL_TM") + private LocalDateTime applyTime; + @TableField("TTL") private String title; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceMaintainItemDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceMaintainItemDO.java index d4e00bc1..03a914b8 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceMaintainItemDO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/dataobject/DeviceMaintainItemDO.java @@ -121,6 +121,11 @@ public class DeviceMaintainItemDO extends BusinessBaseDO { */ @TableField("DUTY_RMK") private String dutyRemark; + /** + * 填写方式 + */ + @TableField("WR_WY") + private String writeWay; /** * 排序号 */ diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceApplyMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceApplyMapper.java index 865abaf9..ee6a8be3 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceApplyMapper.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceApplyMapper.java @@ -47,6 +47,7 @@ public interface DeviceApplyMapper extends BaseMapperX { .eqIfPresent(DeviceApplyDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) .eqIfPresent(DeviceApplyDO::getRemark, reqVO.getRemark()) .betweenIfPresent(DeviceApplyDO::getCreateTime, reqVO.getCreateTime()) + .betweenIfPresent(DeviceApplyDO::getApplyTime, reqVO.getApplyTime()) .orderByDesc(DeviceApplyDO::getId); return selectPage(reqVO, wrapper); } diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceApplyServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceApplyServiceImpl.java index cb1f2d69..c5334c5c 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceApplyServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceApplyServiceImpl.java @@ -253,6 +253,7 @@ public class DeviceApplyServiceImpl implements DeviceApplyService, BMPCallbackIn String wfInsId = result.getData(); entity.setFlowInstanceId(wfInsId); entity.setBusinessStatus(QmsCommonConstant.IN_PROGRESS); + entity.setApplyTime(LocalDateTime.now()); deviceApplyMapper.updateById(entity); DeviceApplyRespVO respVO = BeanUtils.toBean(entity, DeviceApplyRespVO.class); diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceMaintainItemServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceMaintainItemServiceImpl.java index cbea1a85..791c8425 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceMaintainItemServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceMaintainItemServiceImpl.java @@ -72,6 +72,7 @@ public class DeviceMaintainItemServiceImpl implements DeviceMaintainItemService item.setItemMethod(library.getItemMethod()); item.setFrequencyRemark(library.getFrequencyRemark()); item.setSortNo(library.getOrderNo()); + item.setWriteWay(library.getWriteWay()); insertList.add(item); } if(!insertList.isEmpty()) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceProductServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceProductServiceImpl.java index b68f3ff6..d10b999c 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceProductServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/resource/device/service/DeviceProductServiceImpl.java @@ -24,6 +24,7 @@ import org.springframework.validation.annotation.Validated; import java.util.List; import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0; import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; /** @@ -174,6 +175,9 @@ public class DeviceProductServiceImpl implements DeviceProductService { @Override public void deleteDeviceProduct(Long id) { + List children = this.listByParId(id, ""); + if(!children.isEmpty()) + throw exception0(DEVICE_PRODUCT_NOT_EXISTS.getCode(), "分类下还包含子分类或设备大类,请先删除子节点!"); // 校验存在 validateDeviceProductExists(id); // 删除 diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceCalibrationMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceCalibrationMapper.xml index 796b12e6..6bdf70b3 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceCalibrationMapper.xml +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DeviceCalibrationMapper.xml @@ -131,6 +131,15 @@ and c.EFCT_FLG = #{param.effectiveFlag} + + and c.FLW_STS = #{param.flowStatus} + + + and c.FLW_STS in + + #{item} + + and d.DEPT_ID = #{param.deptId} diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DevicePeriodCheckMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DevicePeriodCheckMapper.xml index 9a46dd55..fd507ec0 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DevicePeriodCheckMapper.xml +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/resource/device/dal/mapper/DevicePeriodCheckMapper.xml @@ -121,6 +121,15 @@ and c.CHK_TGT = #{param.checkTarget} + + and c.FLW_STS = #{param.flowStatus} + + + and c.FLW_STS in + + #{item} + + and d.DEPT_ID = #{param.deptId} @@ -136,6 +145,8 @@ and d.DEV_NAME like concat(concat('%', #{param.deviceName}), '%') + + order by c.CREATE_TIME desc @@ -175,6 +186,15 @@ and c.CHK_TGT = #{param.checkTarget} + + and c.FLW_STS = #{param.flowStatus} + + + and c.FLW_STS in + + #{item} + + and d.MNGR_DEPT_ID = #{param.deptId}