From c7fe2db73ceca7bf4103fc85f893987652f7f39d Mon Sep 17 00:00:00 2001 From: FCL Date: Wed, 26 Nov 2025 10:38:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=A0=B7=E5=93=81=E5=BA=93=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/vo/BusinessSampleDispatchRespVO.java | 2 ++ .../service/BusinessSampleDispatchServiceImpl.java | 12 ++++++++++-- .../controller/vo/ReportDocumentMainRespVO.java | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleDispatchRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleDispatchRespVO.java index d7f3a31..fe31c3b 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleDispatchRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleDispatchRespVO.java @@ -1,5 +1,6 @@ package com.zt.plat.module.qms.business.bus.controller.vo; +import com.zt.plat.module.qms.core.aspect.annotation.Dict; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; @@ -65,6 +66,7 @@ public class BusinessSampleDispatchRespVO { @Schema(description = "流程审批状态", example = "1") @ExcelProperty("流程审批状态") + @Dict(dicCode = "flow_status") private String flowStatus; @Schema(description = "完成状态", example = "1") diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleDispatchServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleDispatchServiceImpl.java index d69109b..6fcd0e7 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleDispatchServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleDispatchServiceImpl.java @@ -22,6 +22,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import jakarta.annotation.Resource; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; import java.text.SimpleDateFormat; @@ -63,7 +64,7 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch Long id = paramVo.getId(); List addSubSampleIds = paramVo.getAddSubSampleIds(); List removeDetailIds = paramVo.getRemoveDetailIds(); - + BusinessSampleDispatchDO entity = getBusinessSampleDispatch(id); //处理移除 if(removeDetailIds != null && !removeDetailIds.isEmpty()){ businessSampleDispatchDetailService.deleteBusinessSampleDispatchDetailListByIds(removeDetailIds); @@ -81,9 +82,16 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch detail.setParentId(id); insertList.add(detail); } - if(!insertList.isEmpty()) + if(!insertList.isEmpty()){ businessSampleDispatchDetailService.insertBatch(insertList); + if("-1".equals(entity.getCancelStatus())){ + //如果有新增,修改临时数据状态 + entity.setCancelStatus("0"); + businessSampleDispatchMapper.updateById(entity); + } + } } + } @Override diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/vo/ReportDocumentMainRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/vo/ReportDocumentMainRespVO.java index ee8dc5d..6e681df 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/vo/ReportDocumentMainRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/vo/ReportDocumentMainRespVO.java @@ -72,6 +72,7 @@ public class ReportDocumentMainRespVO { @Schema(description = "审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @ExcelProperty("审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束") + @Dict(dicCode = "flow_status") private String flowStatus; @Schema(description = "作废标识:0-有效;1-作废")