fix:样品库接口调整

This commit is contained in:
FCL
2025-11-26 10:38:57 +08:00
parent 2c377a76ec
commit c7fe2db73c
3 changed files with 13 additions and 2 deletions

View File

@@ -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")

View File

@@ -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<Long> addSubSampleIds = paramVo.getAddSubSampleIds();
List<Long> 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

View File

@@ -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-作废")