Compare commits
36 Commits
71206f43a3
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6f4034685 | ||
| e29c43032c | |||
| 83fe91812d | |||
|
|
50cfdea28d | ||
| 7d8a5c1e88 | |||
|
|
9014e8bcc8 | ||
|
|
fa43a6579a | ||
|
|
d5b40bfba0 | ||
| 33b5ec7be5 | |||
| 5a82d9abd8 | |||
|
|
a96fa0ed9b | ||
|
|
8121c7a97f | ||
| a8330ade63 | |||
| e9259122b7 | |||
| fbd13f50d4 | |||
|
|
58ab9961c4 | ||
| 3302a2ee7c | |||
|
|
1bbfa9a950 | ||
|
|
57bf9b0cd5 | ||
|
|
5bf435b08e | ||
|
|
3bf8ee09b7 | ||
|
|
4444d9e3c0 | ||
| 9348c33f1b | |||
| 969fb2edf7 | |||
| e6d08d975f | |||
| 3cd25f68ef | |||
|
|
5a03ed1cab | ||
|
|
1c5588a05a | ||
|
|
2111c8b3ad | ||
|
|
675e1fe850 | ||
|
|
c7d4399e53 | ||
|
|
2fae2ccac2 | ||
|
|
533b96fb6a | ||
|
|
525d588c20 | ||
| be2f28cef5 | |||
| ce9aff5583 |
@@ -173,16 +173,20 @@ public interface ErrorCodeConstants {
|
|||||||
// -------------物料试剂-------------
|
// -------------物料试剂-------------
|
||||||
ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_160_000, "试剂耗材不存在");
|
ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_160_000, "试剂耗材不存在");
|
||||||
ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料分类/大类不存在");
|
ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料分类/大类不存在");
|
||||||
|
ErrorCode MATERIAL_PRODUCT_PARENT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料分类/大类的父类不存在");
|
||||||
ErrorCode MATERIAL_PRODUCT_CODE_EXISTED = new ErrorCode(1_032_160_000, "物料大类编码重复");
|
ErrorCode MATERIAL_PRODUCT_CODE_EXISTED = new ErrorCode(1_032_160_000, "物料大类编码重复");
|
||||||
ErrorCode MATERIAL_CATEGORY_EXISTS_CHILDREN = new ErrorCode(1_032_160_000, "分类下含有子分类或物料大类,不可删除");
|
ErrorCode MATERIAL_CATEGORY_EXISTS_CHILDREN = new ErrorCode(1_032_160_000, "分类下含有子分类或物料大类,不可删除");
|
||||||
|
ErrorCode MATERIAL_PRODUCT_EXISTS_BATCH = new ErrorCode(1_032_160_000, "物料大类下存在物料批次,不可删除");
|
||||||
|
ErrorCode MATERIAL_PRODUCTS_EXISTS_CATEGORY = new ErrorCode(1_032_160_000, "物料大类列表中存在分类数据");
|
||||||
ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程明细不存在");
|
ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程明细不存在");
|
||||||
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程不存在");
|
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程不存在");
|
||||||
|
|
||||||
ErrorCode MATERIAL_BATCH_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次不存在");
|
ErrorCode MATERIAL_BATCH_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次不存在");
|
||||||
|
ErrorCode MATERIAL_BATCH_GONG_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次工段不存在");
|
||||||
ErrorCode MATERIAL_BATCH_ASSIGN_END = new ErrorCode(1_032_160_000, "物料批次已拆分,不可操作");
|
ErrorCode MATERIAL_BATCH_ASSIGN_END = new ErrorCode(1_032_160_000, "物料批次已拆分,不可操作");
|
||||||
ErrorCode GONGDUAN_BELONG_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段所属的物料批次不一致");
|
ErrorCode GONGDUAN_BELONG_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段所属的物料批次不一致");
|
||||||
ErrorCode GONGDUAN_QUANTITY_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段累加数量和批次数量不一致");
|
ErrorCode GONGDUAN_QUANTITY_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段累加数量和批次数量不一致");
|
||||||
|
ErrorCode MATERIAL_BATCH_NOT_ASSIGN_FOR_SUBMIT = new ErrorCode(1_032_160_000, "物料批次未拆分,不可提交");
|
||||||
ErrorCode MATERIAL_BATCH_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次分发不存在");
|
ErrorCode MATERIAL_BATCH_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次分发不存在");
|
||||||
ErrorCode MATERIAL_INVENTORY_INBOUND_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库,出库不存在");
|
ErrorCode MATERIAL_INVENTORY_INBOUND_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库,出库不存在");
|
||||||
ErrorCode MATERIAL_INVENTORY_INBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库明细,出库明细等不存在");
|
ErrorCode MATERIAL_INVENTORY_INBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库明细,出库明细等不存在");
|
||||||
|
|||||||
@@ -76,7 +76,10 @@ public interface QmsCommonConstant {
|
|||||||
|
|
||||||
/** 已驳回 **/
|
/** 已驳回 **/
|
||||||
String REJECTED = "rejected";
|
String REJECTED = "rejected";
|
||||||
|
|
||||||
|
/** 已拒绝 **/
|
||||||
|
String REFUSED = "refused";
|
||||||
|
|
||||||
/** 作废 **/
|
/** 作废 **/
|
||||||
String VOID = "void";
|
String VOID = "void";
|
||||||
|
|
||||||
|
|||||||
@@ -57,13 +57,21 @@ public class SampleAnalysisController implements BusinessControllerMarker {
|
|||||||
return success("成功");
|
return success("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
//下发配料
|
//下发配料(自动火试金配料)
|
||||||
@PostMapping("/issuedIngredients")
|
@PostMapping("/issuedIngredients")
|
||||||
public CommonResult<?> issuedIngredients(Long businessAssayTaskId) {
|
public CommonResult<?> issuedIngredients(Long businessAssayTaskId) {
|
||||||
sampleAnalysisService.issuedIngredients(businessAssayTaskId);
|
sampleAnalysisService.issuedIngredients(businessAssayTaskId);
|
||||||
return success("成功");
|
return success("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//人工配料
|
||||||
|
@PostMapping("/manualIngredients")
|
||||||
|
public CommonResult<?> manualIngredients(Long businessAssayTaskId) {
|
||||||
|
sampleAnalysisService.manualIngredients(businessAssayTaskId);
|
||||||
|
return success("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
//提交分析
|
||||||
@PostMapping("/submitSampleAnalysisByTaskId")
|
@PostMapping("/submitSampleAnalysisByTaskId")
|
||||||
public CommonResult<?> submitSampleAnalysisByTaskId(Long businessAssayTaskId) {
|
public CommonResult<?> submitSampleAnalysisByTaskId(Long businessAssayTaskId) {
|
||||||
sampleAnalysisService.submitSampleAnalysisByTaskId(businessAssayTaskId);
|
sampleAnalysisService.submitSampleAnalysisByTaskId(businessAssayTaskId);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignSample
|
|||||||
import com.zt.plat.module.qms.business.bus.service.SampleTaskAssignService;
|
import com.zt.plat.module.qms.business.bus.service.SampleTaskAssignService;
|
||||||
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ public class AssayMethodProjectRespVO {
|
|||||||
|
|
||||||
private String dictionaryProjectShowName;
|
private String dictionaryProjectShowName;
|
||||||
|
|
||||||
|
private String assayType;
|
||||||
|
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
private String configAssayMethodName;
|
private String configAssayMethodName;
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ public class BusinessAssayProjectDataExtendRespVO extends BusinessAssayProjectDa
|
|||||||
|
|
||||||
@Schema(description = "样品主样ID", example = "23293")
|
@Schema(description = "样品主样ID", example = "23293")
|
||||||
private Long businessBaseSampleId;
|
private Long businessBaseSampleId;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "样品分样ID", example = "15024")
|
@Schema(description = "样品分样ID", example = "15024")
|
||||||
private Long businessSubParentSampleId;
|
private Long businessSubParentSampleId;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.util.*;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import com.zt.plat.framework.common.pojo.PageParam;
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
@@ -31,6 +33,15 @@ public class BusinessAssayProjectDataPageReqVO extends PageParam {
|
|||||||
@Schema(description = "值")
|
@Schema(description = "值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数ID", example = "1008")
|
||||||
|
private Long configAssayMethodProjectCoefficientId;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数")
|
||||||
|
private BigDecimal coefficient;
|
||||||
|
|
||||||
|
@Schema(description = "补正后的值")
|
||||||
|
private String valueAfter;
|
||||||
|
|
||||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "2")
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "2")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.util.*;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import com.zt.plat.framework.common.pojo.PageParam;
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
@@ -37,6 +39,15 @@ public class BusinessAssayProjectDataReqVO {
|
|||||||
@Schema(description = "值")
|
@Schema(description = "值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数ID", example = "1008")
|
||||||
|
private Long configAssayMethodProjectCoefficientId;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数")
|
||||||
|
private BigDecimal coefficient;
|
||||||
|
|
||||||
|
@Schema(description = "补正后的值")
|
||||||
|
private String valueAfter;
|
||||||
|
|
||||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "1")
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "1")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.alibaba.excel.annotation.*;
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
@@ -38,6 +40,15 @@ public class BusinessAssayProjectDataRespVO {
|
|||||||
@ExcelProperty("值")
|
@ExcelProperty("值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数ID", example = "1008")
|
||||||
|
private Long configAssayMethodProjectCoefficientId;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数")
|
||||||
|
private BigDecimal coefficient;
|
||||||
|
|
||||||
|
@Schema(description = "补正后的值")
|
||||||
|
private String valueAfter;
|
||||||
|
|
||||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
@ExcelProperty("数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间")
|
@ExcelProperty("数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.zt.plat.module.qms.business.bus.controller.vo;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
@@ -27,6 +29,15 @@ public class BusinessAssayProjectDataSaveReqVO {
|
|||||||
@Schema(description = "值")
|
@Schema(description = "值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数ID", example = "1008")
|
||||||
|
private Long configAssayMethodProjectCoefficientId;
|
||||||
|
|
||||||
|
@Schema(description = "补正系数")
|
||||||
|
private BigDecimal coefficient;
|
||||||
|
|
||||||
|
@Schema(description = "补正后的值")
|
||||||
|
private String valueAfter;
|
||||||
|
|
||||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
@NotEmpty(message = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间不能为空")
|
@NotEmpty(message = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间不能为空")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ public class BusinessAssayTaskAnalysisSampleAndQcProjectRespVO {
|
|||||||
@Schema(description = "是否配料,1-是,0-否")
|
@Schema(description = "是否配料,1-是,0-否")
|
||||||
private Integer isIngredients;
|
private Integer isIngredients;
|
||||||
|
|
||||||
|
@Schema(description = "配料方式,初始状态-initial、自动配料-automatic、人工配料-manual")
|
||||||
|
private String ingredientsWay;
|
||||||
|
|
||||||
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
||||||
private String ingredientsStatus;
|
private String ingredientsStatus;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ public class BusinessAssayTaskDataExtendRespVO extends BusinessAssayTaskDataResp
|
|||||||
@Schema(description = "检测方法配置名称及类别")
|
@Schema(description = "检测方法配置名称及类别")
|
||||||
private String configAssayMethodNameAndCategory;
|
private String configAssayMethodNameAndCategory;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置id")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "子样配置id")
|
@Schema(description = "子样配置id")
|
||||||
private Long configSubSampleId;
|
private Long configSubSampleId;
|
||||||
|
|
||||||
@@ -41,4 +44,7 @@ public class BusinessAssayTaskDataExtendRespVO extends BusinessAssayTaskDataResp
|
|||||||
private Integer asmtIsRecheck;
|
private Integer asmtIsRecheck;
|
||||||
|
|
||||||
private String asmtReportedStatus;
|
private String asmtReportedStatus;
|
||||||
|
|
||||||
|
@Schema(description = "配料信息")
|
||||||
|
private String ingredientInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "是否配料,1-是,0-否")
|
@Schema(description = "是否配料,1-是,0-否")
|
||||||
private Integer isIngredients;
|
private Integer isIngredients;
|
||||||
|
|
||||||
|
@Schema(description = "配料方式,初始状态-initial、自动配料-automatic、人工配料-manual")
|
||||||
|
private String ingredientsWay;
|
||||||
|
|
||||||
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
||||||
private String ingredientsStatus;
|
private String ingredientsStatus;
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusinessAssayTaskParameterDataExtendRespVO extends BusinessAssayTaskParameterDataRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29823")
|
||||||
|
@ExcelProperty("检测方法ID")
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||||
|
@ExcelProperty("参数名称")
|
||||||
|
private String parameterName;
|
||||||
|
|
||||||
|
@Schema(description = "参数简称", example = "张三")
|
||||||
|
@ExcelProperty("参数简称")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
@Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("参数序号")
|
||||||
|
private Integer no;
|
||||||
|
|
||||||
|
@Schema(description = "键值")
|
||||||
|
@ExcelProperty("键值")
|
||||||
|
private String key;
|
||||||
|
}
|
||||||
@@ -49,6 +49,9 @@ public class BusinessAssayTaskReqVO {
|
|||||||
|
|
||||||
@Schema(description = "是否配料,1-是,0-否")
|
@Schema(description = "是否配料,1-是,0-否")
|
||||||
private Integer isIngredients;
|
private Integer isIngredients;
|
||||||
|
|
||||||
|
@Schema(description = "配料方式,初始状态-initial、自动配料-automatic、人工配料-manual")
|
||||||
|
private String ingredientsWay;
|
||||||
|
|
||||||
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
||||||
private String ingredientsStatus;
|
private String ingredientsStatus;
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ public class BusinessAssayTaskRespVO {
|
|||||||
|
|
||||||
@Schema(description = "是否配料,1-是,0-否")
|
@Schema(description = "是否配料,1-是,0-否")
|
||||||
private Integer isIngredients;
|
private Integer isIngredients;
|
||||||
|
|
||||||
|
@Schema(description = "配料方式,初始状态-initial、自动配料-automatic、人工配料-manual")
|
||||||
|
private String ingredientsWay;
|
||||||
|
|
||||||
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
||||||
private String ingredientsStatus;
|
private String ingredientsStatus;
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ public class BusinessAssayTaskSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "是否配料,1-是,0-否")
|
@Schema(description = "是否配料,1-是,0-否")
|
||||||
private Integer isIngredients;
|
private Integer isIngredients;
|
||||||
|
|
||||||
|
@Schema(description = "配料方式,初始状态-initial、自动配料-automatic、人工配料-manual")
|
||||||
|
private String ingredientsWay;
|
||||||
|
|
||||||
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
@Schema(description = "配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit", example = "2")
|
||||||
private String ingredientsStatus;
|
private String ingredientsStatus;
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ public class BusinessXRFDataPageReqVO extends PageParam {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] sampleTime;
|
private LocalDateTime[] sampleTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品开始时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] sampleStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品结束时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] sampleEndTime;
|
||||||
|
|
||||||
@Schema(description = "分析人")
|
@Schema(description = "分析人")
|
||||||
private String assayOperator;
|
private String assayOperator;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ public class BusinessXRFDataReqVO {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] sampleTime;
|
private LocalDateTime[] sampleTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品开始时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] sampleStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品结束时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] sampleEndTime;
|
||||||
|
|
||||||
@Schema(description = "分析人")
|
@Schema(description = "分析人")
|
||||||
private String assayOperator;
|
private String assayOperator;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ public class BusinessXRFDataRespVO {
|
|||||||
@ExcelProperty("样品时间")
|
@ExcelProperty("样品时间")
|
||||||
private LocalDateTime sampleTime;
|
private LocalDateTime sampleTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品开始时间")
|
||||||
|
@ExcelProperty("样品开始时间")
|
||||||
|
private LocalDateTime sampleStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品结束时间")
|
||||||
|
@ExcelProperty("样品结束时间")
|
||||||
|
private LocalDateTime sampleEndTime;
|
||||||
|
|
||||||
@Schema(description = "分析人")
|
@Schema(description = "分析人")
|
||||||
@ExcelProperty("分析人")
|
@ExcelProperty("分析人")
|
||||||
private String assayOperator;
|
private String assayOperator;
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ public class BusinessXRFDataSaveReqVO {
|
|||||||
@Schema(description = "样品时间")
|
@Schema(description = "样品时间")
|
||||||
private LocalDateTime sampleTime;
|
private LocalDateTime sampleTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品开始时间")
|
||||||
|
private LocalDateTime sampleStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "样品结束时间")
|
||||||
|
private LocalDateTime sampleEndTime;
|
||||||
|
|
||||||
@Schema(description = "分析人")
|
@Schema(description = "分析人")
|
||||||
private String assayOperator;
|
private String assayOperator;
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
|||||||
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
/**
|
/**
|
||||||
@@ -62,6 +62,21 @@ public class BusinessAssayProjectDataDO extends BusinessBaseDO {
|
|||||||
@TableField(value = "VAL", updateStrategy = FieldStrategy.ALWAYS)
|
@TableField(value = "VAL", updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String value;
|
private String value;
|
||||||
/**
|
/**
|
||||||
|
* 补正系数ID
|
||||||
|
*/
|
||||||
|
@TableField(value = "CFG_ASY_MTHD_PRJ_COEF_ID", updateStrategy = FieldStrategy.ALWAYS)
|
||||||
|
private Long configAssayMethodProjectCoefficientId;
|
||||||
|
/**
|
||||||
|
* 补正系数
|
||||||
|
*/
|
||||||
|
@TableField(value = "COEF", updateStrategy = FieldStrategy.ALWAYS)
|
||||||
|
private BigDecimal coefficient;
|
||||||
|
/**
|
||||||
|
* 补正后的值
|
||||||
|
*/
|
||||||
|
@TableField(value = "VAL_AFT", updateStrategy = FieldStrategy.ALWAYS)
|
||||||
|
private String valueAfter;
|
||||||
|
/**
|
||||||
* 数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间
|
* 数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间
|
||||||
*/
|
*/
|
||||||
@TableField("DAT_TP")
|
@TableField("DAT_TP")
|
||||||
|
|||||||
@@ -90,6 +90,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
|||||||
@TableField("IS_IGDT")
|
@TableField("IS_IGDT")
|
||||||
private Integer isIngredients;
|
private Integer isIngredients;
|
||||||
/**
|
/**
|
||||||
|
* 配料方式,初始状态-initial、自动配料-automatic、人工配料-manual
|
||||||
|
*/
|
||||||
|
@TableField("IGDT_WY")
|
||||||
|
private String ingredientsWay;
|
||||||
|
/**
|
||||||
* 配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit
|
* 配料状态,初始状态-initial、等待配料-in_progress、可提交-allow_submit
|
||||||
*/
|
*/
|
||||||
@TableField("IGDT_STS")
|
@TableField("IGDT_STS")
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
|||||||
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
/**
|
/**
|
||||||
@@ -64,6 +61,16 @@ public class BusinessXRFDataDO extends BusinessBaseDO {
|
|||||||
@TableField("SMP_TM")
|
@TableField("SMP_TM")
|
||||||
private LocalDateTime sampleTime;
|
private LocalDateTime sampleTime;
|
||||||
/**
|
/**
|
||||||
|
* 样品开始时间
|
||||||
|
*/
|
||||||
|
@TableField("SMP_STRT_TM")
|
||||||
|
private LocalDateTime sampleStartTime;
|
||||||
|
/**
|
||||||
|
* 样品结束时间
|
||||||
|
*/
|
||||||
|
@TableField("SMP_END_TM")
|
||||||
|
private LocalDateTime sampleEndTime;
|
||||||
|
/**
|
||||||
* 分析人
|
* 分析人
|
||||||
*/
|
*/
|
||||||
@TableField("ASY_OPTR")
|
@TableField("ASY_OPTR")
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
|||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||||
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
||||||
@@ -56,6 +57,9 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getSymbol, reqVO.getSymbol())
|
.eqIfPresent(BusinessAssayProjectDataDO::getSymbol, reqVO.getSymbol())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectCoefficientId, reqVO.getConfigAssayMethodProjectCoefficientId())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getCoefficient, reqVO.getCoefficient())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getValueAfter, reqVO.getValueAfter())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getIsNotAssessment, reqVO.getIsNotAssessment())
|
.eqIfPresent(BusinessAssayProjectDataDO::getIsNotAssessment, reqVO.getIsNotAssessment())
|
||||||
@@ -75,6 +79,9 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getSymbol, reqVO.getSymbol())
|
.eqIfPresent(BusinessAssayProjectDataDO::getSymbol, reqVO.getSymbol())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectCoefficientId, reqVO.getConfigAssayMethodProjectCoefficientId())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getCoefficient, reqVO.getCoefficient())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getValueAfter, reqVO.getValueAfter())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getIsNotAssessment, reqVO.getIsNotAssessment())
|
.eqIfPresent(BusinessAssayProjectDataDO::getIsNotAssessment, reqVO.getIsNotAssessment())
|
||||||
@@ -111,6 +118,7 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataIds(List<Long> businessAssayTaskDataIds) {
|
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataIds(List<Long> businessAssayTaskDataIds) {
|
||||||
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
||||||
.leftJoin(BusinessAssayTaskDataDO.class, BusinessAssayTaskDataDO::getId, BusinessAssayProjectDataDO::getBusinessAssayTaskDataId)
|
.leftJoin(BusinessAssayTaskDataDO.class, BusinessAssayTaskDataDO::getId, BusinessAssayProjectDataDO::getBusinessAssayTaskDataId)
|
||||||
|
.leftJoin(BusinessBaseSampleDO.class, BusinessBaseSampleDO::getId, BusinessAssayTaskDataDO::getBusinessBaseSampleId)
|
||||||
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
||||||
.selectAll(BusinessAssayProjectDataDO.class)
|
.selectAll(BusinessAssayProjectDataDO.class)
|
||||||
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectDataExtendRespVO::getDictionaryProjectKey)
|
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectDataExtendRespVO::getDictionaryProjectKey)
|
||||||
@@ -122,6 +130,7 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.selectAs(BusinessAssayTaskDataDO::getBusinessBaseSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessBaseSampleId)
|
.selectAs(BusinessAssayTaskDataDO::getBusinessBaseSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessBaseSampleId)
|
||||||
.selectAs(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessSubParentSampleId)
|
.selectAs(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessSubParentSampleId)
|
||||||
.selectAs(BusinessAssayTaskDataDO::getBusinessSubSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessSubSampleId)
|
.selectAs(BusinessAssayTaskDataDO::getBusinessSubSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessSubSampleId)
|
||||||
|
.selectAs(BusinessBaseSampleDO::getConfigBaseSampleId, BusinessAssayProjectDataExtendRespVO::getConfigBaseSampleId)
|
||||||
.in(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIds));
|
.in(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataGr
|
|||||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataPageReqVO;
|
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataPageReqVO;
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataReqVO;
|
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataReqVO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
@@ -289,6 +290,7 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
|||||||
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||||
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||||
|
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId)
|
||||||
.in(BusinessSubSampleDO::getSampleAssayCode, sampleAssayCodes)
|
.in(BusinessSubSampleDO::getSampleAssayCode, sampleAssayCodes)
|
||||||
.eq(ConfigAssayMethodDO::getDictionaryBusinessKey, configAssayMethodDictionaryBusinessKey)
|
.eq(ConfigAssayMethodDO::getDictionaryBusinessKey, configAssayMethodDictionaryBusinessKey)
|
||||||
.eq(BusinessAssayTaskDataDO::getIsReported, QmsCommonConstant.NO));
|
.eq(BusinessAssayTaskDataDO::getIsReported, QmsCommonConstant.NO));
|
||||||
@@ -365,6 +367,21 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
|||||||
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
|
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
|
||||||
.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId));
|
.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据任务分配单id查询分析任务
|
||||||
|
* @param businessAssayTaskId 任务分配单id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
default List<BusinessAssayTaskDataExtendRespVO> selectExtendByBusinessAssayTaskId(Long businessAssayTaskId) {
|
||||||
|
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
|
||||||
|
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||||
|
.leftJoin(BusinessBaseSampleDO.class, BusinessBaseSampleDO::getId, BusinessAssayTaskDataDO::getBusinessBaseSampleId)
|
||||||
|
.selectAll(BusinessAssayTaskDataDO.class)
|
||||||
|
.selectAs(BusinessBaseSampleDO::getConfigBaseSampleId, BusinessAssayTaskDataExtendRespVO::getConfigBaseSampleId)
|
||||||
|
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId)
|
||||||
|
.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据子样查询分析任务
|
* 根据子样查询分析任务
|
||||||
@@ -376,6 +393,18 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
|||||||
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId));
|
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据子样及分析方法Key查询分析任务
|
||||||
|
* @param businessSubSampleId 子样id
|
||||||
|
* @param methodKey 分析方法key
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
default List<BusinessAssayTaskDataDO> selectByBusinessSubSampleIdAndMethodKey(Long businessSubSampleId, String methodKey) {
|
||||||
|
String inSql = "SELECT tcam.ID FROM T_CFG_ASY_MTHD tcam WHERE tcam.DELETED = 0 AND tcam.DIC_BSN_KY = '" + methodKey + "'";
|
||||||
|
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
|
||||||
|
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId)
|
||||||
|
.inSql(BusinessAssayTaskDataDO::getConfigAssayMethodId, inSql));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据子样及分析部门查询分析任务
|
* 根据子样及分析部门查询分析任务
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
|||||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
|
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
|
||||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
|
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
|
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
|
||||||
|
.eqIfPresent(BusinessAssayTaskDO::getIngredientsWay, reqVO.getIngredientsWay())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
|
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
|
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||||
@@ -89,6 +90,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
|||||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
|
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
|
||||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
|
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
|
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
|
||||||
|
.eqIfPresent(BusinessAssayTaskDO::getIngredientsWay, reqVO.getIngredientsWay())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
|
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
|
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
|
||||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||||
|
|||||||
@@ -61,4 +61,18 @@ public interface BusinessAssayTaskParameterDataMapper extends BaseMapperX<Busine
|
|||||||
.orderByAsc(ConfigAssayMethodParameterDO::getSortNo));
|
.orderByAsc(ConfigAssayMethodParameterDO::getSortNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<BusinessAssayTaskParameterDataExtendRespVO> selectExtendByBusinessAssayTaskDataIds(List<Long> businessAssayTaskDataIdList) {
|
||||||
|
return selectJoinList(BusinessAssayTaskParameterDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskParameterDataDO>()
|
||||||
|
.leftJoin(ConfigAssayMethodParameterDO.class, ConfigAssayMethodParameterDO::getId, BusinessAssayTaskParameterDataDO::getConfigAssayMethodParameterId)
|
||||||
|
.selectAll(BusinessAssayTaskParameterDataDO.class)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getConfigAssayMethodId, BusinessAssayTaskParameterDataExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getParameterName, BusinessAssayTaskParameterDataExtendRespVO::getParameterName)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getShortName, BusinessAssayTaskParameterDataExtendRespVO::getShortName)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getKey, BusinessAssayTaskParameterDataExtendRespVO::getKey)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getNo, BusinessAssayTaskParameterDataExtendRespVO::getNo)
|
||||||
|
.in(BusinessAssayTaskParameterDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIdList)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -115,6 +115,8 @@ public class SampleEntrustCreateDataCmp extends NodeComponent {
|
|||||||
} else if ("xsqywtzcwt".equals(configEntrustSource.getKey())) {//仲裁委托
|
} else if ("xsqywtzcwt".equals(configEntrustSource.getKey())) {//仲裁委托
|
||||||
String sampleCode = "ZW" + year + number + "-" + StringUtils.leftPad(businessSampleEntrustDetail.getSort().toString(), 2, "0");
|
String sampleCode = "ZW" + year + number + "-" + StringUtils.leftPad(businessSampleEntrustDetail.getSort().toString(), 2, "0");
|
||||||
businessSampleEntrustDetail.setSampleCode(sampleCode);
|
businessSampleEntrustDetail.setSampleCode(sampleCode);
|
||||||
|
} else if ("ztgmwt".equals(configEntrustSource.getKey())) {//中铜国贸商检委托,来样编号与样品编号一致
|
||||||
|
businessSampleEntrustDetail.setSampleCode(businessSampleEntrustDetail.getEntrustSampleCode());//样品编号与来样编号一致
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -643,6 +643,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
if (StringUtils.isNotBlank(configAssayMethodProjectParameterDO.getDefaultValue())) {
|
||||||
|
businessAssayParameterDataDO.setValue(configAssayMethodProjectParameterDO.getDefaultValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
@@ -661,6 +664,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
if (StringUtils.isNotBlank(configAssayMethodProjectParameterDO.getDefaultValue())) {
|
||||||
|
businessAssayParameterDataDO.setValue(configAssayMethodProjectParameterDO.getDefaultValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
@@ -904,6 +910,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
if (StringUtils.isNotBlank(configAssayMethodProjectParameterDO.getDefaultValue())) {
|
||||||
|
businessAssayParameterDataDO.setValue(configAssayMethodProjectParameterDO.getDefaultValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
@@ -922,6 +931,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
if (StringUtils.isNotBlank(configAssayMethodProjectParameterDO.getDefaultValue())) {
|
||||||
|
businessAssayParameterDataDO.setValue(configAssayMethodProjectParameterDO.getDefaultValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
|
|||||||
@@ -115,6 +115,8 @@ public class SampleEntrustUpdateDataCmp extends NodeComponent {
|
|||||||
} else if ("xsqywtzcwt".equals(configEntrustSource.getKey())) {//仲裁委托
|
} else if ("xsqywtzcwt".equals(configEntrustSource.getKey())) {//仲裁委托
|
||||||
String sampleCode = "ZW" + year + number + "-" + StringUtils.leftPad(businessSampleEntrustDetail.getSort().toString(), 2, "0");
|
String sampleCode = "ZW" + year + number + "-" + StringUtils.leftPad(businessSampleEntrustDetail.getSort().toString(), 2, "0");
|
||||||
businessSampleEntrustDetail.setSampleCode(sampleCode);
|
businessSampleEntrustDetail.setSampleCode(sampleCode);
|
||||||
|
} else if ("ztgmwt".equals(configEntrustSource.getKey())) {//中铜国贸商检委托,来样编号与样品编号一致
|
||||||
|
businessSampleEntrustDetail.setSampleCode(businessSampleEntrustDetail.getEntrustSampleCode());//样品编号与来样编号一致
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,30 @@
|
|||||||
package com.zt.plat.module.qms.business.bus.service;
|
package com.zt.plat.module.qms.business.bus.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.zt.plat.framework.common.pojo.PageParam;
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.security.core.LoginUser;
|
import com.zt.plat.framework.security.core.LoginUser;
|
||||||
@@ -34,6 +47,15 @@ public class BusinessAssayTaskDataServiceImpl implements BusinessAssayTaskDataSe
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayParameterDataMapper businessAssayParameterDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BusinessAssayTaskDataRespVO createBusinessAssayTaskData(BusinessAssayTaskDataSaveReqVO createReqVO) {
|
public BusinessAssayTaskDataRespVO createBusinessAssayTaskData(BusinessAssayTaskDataSaveReqVO createReqVO) {
|
||||||
@@ -100,12 +122,92 @@ public class BusinessAssayTaskDataServiceImpl implements BusinessAssayTaskDataSe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BusinessAssayTaskDataExtendRespVO> getBusinessAssayTaskDataList(BusinessAssayTaskDataReqVO reqVO) {
|
public List<BusinessAssayTaskDataExtendRespVO> getBusinessAssayTaskDataList(BusinessAssayTaskDataReqVO reqVO) {
|
||||||
return businessAssayTaskDataMapper.selectList(reqVO);
|
List<BusinessAssayTaskDataExtendRespVO> list = businessAssayTaskDataMapper.selectList(reqVO);
|
||||||
|
List<Long> configSubSampleIdList = list.stream().map(m -> m.getConfigSubSampleId()).collect(Collectors.toList());
|
||||||
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, reqVO.getConfigAssayMethodId());
|
||||||
|
List<Long> businessAssayTaskDataIdList = list.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测项目
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测项目参数
|
||||||
|
List<BusinessAssayParameterDataExtendRespVO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectExtendByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||||
|
|
||||||
|
for (BusinessAssayTaskDataExtendRespVO businessAssayTaskData : list) {
|
||||||
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessAssayTaskData.getConfigSubSampleId()) && f.getConfigAssayMethodId().equals(businessAssayTaskData.getConfigAssayMethodId())).findFirst().orElse(null);
|
||||||
|
String configInfomation = configSubSampleMethod.getConfigInfomation();
|
||||||
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
|
List<ConfigSubSampleMethodConfItem> getParamList = configSubSampleMethodConfInfo.getGetParam();
|
||||||
|
StringBuilder ingredientInfoBuilder = new StringBuilder();
|
||||||
|
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : getParamList) {
|
||||||
|
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||||
|
List<String> projectList = Arrays.asList(target.getProject().split(","));//来源可以有多个
|
||||||
|
for (String project : projectList) {
|
||||||
|
String parameter = target.getParameter();
|
||||||
|
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskData.getId()) && project.equals(f.getSimpleName())).findFirst().orElse(null);
|
||||||
|
if (currentBusinessAssayProjectData == null) {//如果检测项目为空,则跳出当前循环
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && parameter.equals(f.getParameterKey())).findFirst().orElse(null);
|
||||||
|
if (currentBusinessAssayParameterData != null && StringUtils.isNotBlank(currentBusinessAssayParameterData.getValue())) {
|
||||||
|
ingredientInfoBuilder.append(currentBusinessAssayParameterData.getParameterName()).append(":").append(currentBusinessAssayParameterData.getValue()).append("、");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ingredientInfoBuilder.length() > 0) {
|
||||||
|
ingredientInfoBuilder.delete(ingredientInfoBuilder.length() - 1, ingredientInfoBuilder.length());
|
||||||
|
}
|
||||||
|
businessAssayTaskData.setIngredientInfo(ingredientInfoBuilder.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<BusinessAssayTaskDataExtendRespVO> getBusinessAssayTaskDataPage(BusinessAssayTaskDataPageReqVO pageReqVO) {
|
public PageResult<BusinessAssayTaskDataExtendRespVO> getBusinessAssayTaskDataPage(BusinessAssayTaskDataPageReqVO pageReqVO) {
|
||||||
return businessAssayTaskDataMapper.selectPage(pageReqVO);
|
PageResult<BusinessAssayTaskDataExtendRespVO> page = businessAssayTaskDataMapper.selectPage(pageReqVO);
|
||||||
|
List<BusinessAssayTaskDataExtendRespVO> list = page.getList();
|
||||||
|
List<Long> configSubSampleIdList = list.stream().map(m -> m.getConfigSubSampleId()).collect(Collectors.toList());
|
||||||
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, pageReqVO.getConfigAssayMethodId());
|
||||||
|
List<Long> businessAssayTaskDataIdList = list.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测项目
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测项目参数
|
||||||
|
List<BusinessAssayParameterDataExtendRespVO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectExtendByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||||
|
|
||||||
|
for (BusinessAssayTaskDataExtendRespVO businessAssayTaskData : list) {
|
||||||
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessAssayTaskData.getConfigSubSampleId()) && f.getConfigAssayMethodId().equals(businessAssayTaskData.getConfigAssayMethodId())).findFirst().orElse(null);
|
||||||
|
String configInfomation = configSubSampleMethod.getConfigInfomation();
|
||||||
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
|
List<ConfigSubSampleMethodConfItem> getParamList = configSubSampleMethodConfInfo.getGetParam();
|
||||||
|
StringBuilder ingredientInfoBuilder = new StringBuilder();
|
||||||
|
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : getParamList) {
|
||||||
|
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||||
|
List<String> projectList = Arrays.asList(target.getProject().split(","));//来源可以有多个
|
||||||
|
for (String project : projectList) {
|
||||||
|
String parameter = target.getParameter();
|
||||||
|
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskData.getId()) && project.equals(f.getSimpleName())).findFirst().orElse(null);
|
||||||
|
if (currentBusinessAssayProjectData == null) {//如果检测项目为空,则跳出当前循环
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && parameter.equals(f.getParameterKey())).findFirst().orElse(null);
|
||||||
|
if (currentBusinessAssayParameterData != null && StringUtils.isNotBlank(currentBusinessAssayParameterData.getValue())) {
|
||||||
|
ingredientInfoBuilder.append(currentBusinessAssayParameterData.getParameterName()).append(":").append(currentBusinessAssayParameterData.getValue()).append("、");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ingredientInfoBuilder.length() > 0) {
|
||||||
|
ingredientInfoBuilder.delete(ingredientInfoBuilder.length() - 1, ingredientInfoBuilder.length());
|
||||||
|
}
|
||||||
|
businessAssayTaskData.setIngredientInfo(ingredientInfoBuilder.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -68,10 +68,12 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmen
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectAssessmentDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectAssessmentDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigRuleDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigRuleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleParentMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleParentMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectAssessmentMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectAssessmentMapper;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectCoefficientMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigProjectMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigReportFieldMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigReportFieldMapper;
|
||||||
@@ -153,6 +155,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigAssayMethodProjectCoefficientMapper configAssayMethodProjectCoefficientMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||||
|
|
||||||
@@ -218,7 +223,15 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
|
|
||||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataId(businessAssayTaskDataExtendRespVO.getId());
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataId(businessAssayTaskDataExtendRespVO.getId());
|
||||||
for (BusinessAssayProjectDataExtendRespVO businessAssayProjectData : businessAssayProjectDataList) {
|
for (BusinessAssayProjectDataExtendRespVO businessAssayProjectData : businessAssayProjectDataList) {
|
||||||
businessAssayTaskDataMap.put(businessAssayProjectData.getSimpleName(), businessAssayProjectData.getValue());
|
// String value = businessAssayProjectData.getValueAfter();
|
||||||
|
// if (businessAssayProjectData.getCoefficient() != null) {
|
||||||
|
// value = value + "(" + businessAssayProjectData.getValue() + "x" + businessAssayProjectData.getCoefficient().setScale(3, RoundingMode.HALF_EVEN).toPlainString()+ ")";
|
||||||
|
// }
|
||||||
|
// businessAssayTaskDataMap.put(businessAssayProjectData.getSimpleName(), value);
|
||||||
|
businessAssayTaskDataMap.put(businessAssayProjectData.getSimpleName(), businessAssayProjectData.getValueAfter());
|
||||||
|
// businessAssayTaskDataMap.put(businessAssayProjectData.getSimpleName(), businessAssayProjectData.getValue());
|
||||||
|
// businessAssayTaskDataMap.put(businessAssayProjectData.getSimpleName() + "_coefficient", businessAssayProjectData.getCoefficient());
|
||||||
|
// businessAssayTaskDataMap.put(businessAssayProjectData.getSimpleName() + "_after", businessAssayProjectData.getValueAfter());
|
||||||
businessAssayTaskDataMap.put("isNotAssessment_" + businessAssayProjectData.getSimpleName(), businessAssayProjectData.getIsNotAssessment());
|
businessAssayTaskDataMap.put("isNotAssessment_" + businessAssayProjectData.getSimpleName(), businessAssayProjectData.getIsNotAssessment());
|
||||||
//添加判定状态
|
//添加判定状态
|
||||||
businessAssayTaskDataMap.put("assessmentStatus", assessmentMap.get("assessmentStatus"));
|
businessAssayTaskDataMap.put("assessmentStatus", assessmentMap.get("assessmentStatus"));
|
||||||
@@ -272,6 +285,11 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
Map<String, Object> businessSubSampleAssessmentMap = BeanUtil.beanToMap(businessSubSampleAssessment);
|
Map<String, Object> businessSubSampleAssessmentMap = BeanUtil.beanToMap(businessSubSampleAssessment);
|
||||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataSingleList = businessAssayProjectDataList.stream().filter(f -> f.getDictionaryProjectId().equals(businessSubSampleAssessment.getDictionaryProjectId())).collect(Collectors.toList());
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataSingleList = businessAssayProjectDataList.stream().filter(f -> f.getDictionaryProjectId().equals(businessSubSampleAssessment.getDictionaryProjectId())).collect(Collectors.toList());
|
||||||
for (BusinessAssayProjectDataExtendRespVO businessAssayProjectDataExtendRespVO : businessAssayProjectDataSingleList) {
|
for (BusinessAssayProjectDataExtendRespVO businessAssayProjectDataExtendRespVO : businessAssayProjectDataSingleList) {
|
||||||
|
// String value = businessAssayProjectDataExtendRespVO.getValueAfter();
|
||||||
|
// if (businessAssayProjectDataExtendRespVO.getCoefficient() != null) {
|
||||||
|
// value = value + "(" + businessAssayProjectDataExtendRespVO.getValue() + "x" + businessAssayProjectDataExtendRespVO.getCoefficient().setScale(3, RoundingMode.HALF_EVEN).toPlainString()+ ")";
|
||||||
|
// }
|
||||||
|
// businessSubSampleAssessmentMap.put(businessAssayProjectDataExtendRespVO.getBusinessAssayTaskDataId() + ";" + businessAssayProjectDataExtendRespVO.getBusinessSubSampleId() + ";" + businessAssayProjectDataExtendRespVO.getRecheckCount(), value);
|
||||||
businessSubSampleAssessmentMap.put(businessAssayProjectDataExtendRespVO.getBusinessAssayTaskDataId() + ";" + businessAssayProjectDataExtendRespVO.getBusinessSubSampleId() + ";" + businessAssayProjectDataExtendRespVO.getRecheckCount(), businessAssayProjectDataExtendRespVO.getValue());
|
businessSubSampleAssessmentMap.put(businessAssayProjectDataExtendRespVO.getBusinessAssayTaskDataId() + ";" + businessAssayProjectDataExtendRespVO.getBusinessSubSampleId() + ";" + businessAssayProjectDataExtendRespVO.getRecheckCount(), businessAssayProjectDataExtendRespVO.getValue());
|
||||||
}
|
}
|
||||||
dataList.add(businessSubSampleAssessmentMap);
|
dataList.add(businessSubSampleAssessmentMap);
|
||||||
@@ -647,11 +665,6 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
//查询分析任务明细
|
//查询分析任务明细
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
|
||||||
|
|
||||||
|
|
||||||
// Integer recheckCount = businessAssayTaskDataDOList.get(0).getRetestCount();
|
|
||||||
// List<Long> businessSubSampleIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
|
||||||
// List<BusinessSubSampleAssessmentDO> businessSubSampleAssessmentDOList = businessSubSampleAssessmentMapper.selectByBusinessSubSampleIdsAndConfigAssayMethodIdAndRetestCount(businessSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId(), recheckCount);
|
|
||||||
|
|
||||||
//获取任务明细对应的判定id
|
//获取任务明细对应的判定id
|
||||||
List<Long> businessSubSampleAssessmentIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleAssessmentId()).distinct().collect(Collectors.toList());
|
List<Long> businessSubSampleAssessmentIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleAssessmentId()).distinct().collect(Collectors.toList());
|
||||||
//获取子样判定数据
|
//获取子样判定数据
|
||||||
@@ -734,7 +747,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
// 排序并处理 null
|
// 排序并处理 null
|
||||||
List<BigDecimal> sortedValues = val1.stream()
|
List<BigDecimal> sortedValues = val1.stream()
|
||||||
.map(v -> {
|
.map(v -> {
|
||||||
String val = v.getValue();
|
String val = v.getValueAfter();//补正后的值
|
||||||
return val == null || val.trim().isEmpty() ? BigDecimal.ZERO : new BigDecimal(val.trim());
|
return val == null || val.trim().isEmpty() ? BigDecimal.ZERO : new BigDecimal(val.trim());
|
||||||
})
|
})
|
||||||
.sorted()
|
.sorted()
|
||||||
@@ -825,7 +838,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
businessSubSampleAssessmentProjectDO.setMinimumLimitValue(businessAssayProjectDataDO.getMinimumLimitValue());
|
businessSubSampleAssessmentProjectDO.setMinimumLimitValue(businessAssayProjectDataDO.getMinimumLimitValue());
|
||||||
businessSubSampleAssessmentProjectDO.setSymbol(businessAssayProjectDataDO.getSymbol());
|
businessSubSampleAssessmentProjectDO.setSymbol(businessAssayProjectDataDO.getSymbol());
|
||||||
businessSubSampleAssessmentProjectDO.setAssessmentStatus(QmsCommonConstant.NORMAL);
|
businessSubSampleAssessmentProjectDO.setAssessmentStatus(QmsCommonConstant.NORMAL);
|
||||||
businessSubSampleAssessmentProjectDO.setAssessmentValue(businessAssayProjectDataDO.getValue());
|
businessSubSampleAssessmentProjectDO.setAssessmentValue(businessAssayProjectDataDO.getValueAfter());//修改为赋值补正后的值
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -854,7 +867,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.RETURNED);
|
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.RETURNED);
|
||||||
}
|
}
|
||||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||||
|
|
||||||
if (updateBusinessSubSampleAssessmentDOList.size() > 0) {
|
if (updateBusinessSubSampleAssessmentDOList.size() > 0) {
|
||||||
businessSubSampleAssessmentMapper.updateBatch(updateBusinessSubSampleAssessmentDOList);
|
businessSubSampleAssessmentMapper.updateBatch(updateBusinessSubSampleAssessmentDOList);
|
||||||
}
|
}
|
||||||
@@ -1186,7 +1199,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
List<BigDecimal> sortedValues = businessAssayProjectDataDOList.stream()
|
List<BigDecimal> sortedValues = businessAssayProjectDataDOList.stream()
|
||||||
.filter(f -> f.getIsNotAssessment().equals(QmsCommonConstant.NO))
|
.filter(f -> f.getIsNotAssessment().equals(QmsCommonConstant.NO))
|
||||||
.map(v -> {
|
.map(v -> {
|
||||||
String val = v.getValue();
|
String val = v.getValueAfter();//设置为补正后的
|
||||||
return val == null || val.trim().isEmpty() ? BigDecimal.ZERO : new BigDecimal(val.trim());
|
return val == null || val.trim().isEmpty() ? BigDecimal.ZERO : new BigDecimal(val.trim());
|
||||||
})
|
})
|
||||||
.sorted()
|
.sorted()
|
||||||
|
|||||||
@@ -30,11 +30,17 @@ public interface SampleAnalysisService {
|
|||||||
BusinessAssayTaskAnalysisSampleAndQcProjectRespVO batchSampleAndQcAnalysisByTaskId(Long businessAssayTaskId);
|
BusinessAssayTaskAnalysisSampleAndQcProjectRespVO batchSampleAndQcAnalysisByTaskId(Long businessAssayTaskId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下发配料
|
* 下发配料(自动火试金配料)
|
||||||
* @param businessAssayTaskId
|
* @param businessAssayTaskId
|
||||||
*/
|
*/
|
||||||
void issuedIngredients(Long businessAssayTaskId);
|
void issuedIngredients(Long businessAssayTaskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人工配料
|
||||||
|
* @param businessAssayTaskId
|
||||||
|
*/
|
||||||
|
void manualIngredients(Long businessAssayTaskId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据任务单id提交分析数据
|
* 根据任务单id提交分析数据
|
||||||
* @param businessAssayTaskId 任务单id
|
* @param businessAssayTaskId 任务单id
|
||||||
@@ -57,4 +63,5 @@ public interface SampleAnalysisService {
|
|||||||
void rollbackAnalysisSample(BusinessAssayTaskBackSampleReqVO req);
|
void rollbackAnalysisSample(BusinessAssayTaskBackSampleReqVO req);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import com.alibaba.fastjson2.JSON;
|
|||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.zt.plat.framework.common.exception.ServiceException;
|
import com.zt.plat.framework.common.exception.ServiceException;
|
||||||
import com.zt.plat.framework.common.util.date.DateUtils;
|
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.security.core.LoginUser;
|
import com.zt.plat.framework.security.core.LoginUser;
|
||||||
@@ -85,7 +84,6 @@ import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
|||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectRangeDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectRangeDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.BaseSampleMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.BaseSampleMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectCoefficientMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectCoefficientMapper;
|
||||||
@@ -98,9 +96,7 @@ import com.zt.plat.module.qms.common.dic.controller.vo.DictionaryBusinessExtendR
|
|||||||
import com.zt.plat.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper;
|
import com.zt.plat.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper;
|
||||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
@@ -529,6 +525,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setDataCollectionId(businessAssayTaskDO.getFormDataCollectionId());
|
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setDataCollectionId(businessAssayTaskDO.getFormDataCollectionId());
|
||||||
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setFormValue(businessAssayTaskDO.getFormValue());
|
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setFormValue(businessAssayTaskDO.getFormValue());
|
||||||
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setIsIngredients(businessAssayTaskDO.getIsIngredients());
|
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setIsIngredients(businessAssayTaskDO.getIsIngredients());
|
||||||
|
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setIngredientsWay(businessAssayTaskDO.getIngredientsWay());
|
||||||
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setIngredientsStatus(businessAssayTaskDO.getIngredientsStatus());
|
businessAssayTaskAnalysisSampleAndQcProjectRespVO.setIngredientsStatus(businessAssayTaskDO.getIngredientsStatus());
|
||||||
|
|
||||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(businessAssayTaskDO.getConfigAssayMethodId());
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
@@ -661,85 +658,87 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
Long configMethodId = source.getMethodId();
|
Long configMethodId = source.getMethodId();
|
||||||
String sourceProject = source.getProject();
|
String sourceProject = source.getProject();
|
||||||
//String sourceParameter = source.getParameter();
|
//String sourceParameter = source.getParameter();
|
||||||
|
|
||||||
|
|
||||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();//目标
|
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();//目标
|
||||||
String targetProject = target.getProject();
|
|
||||||
String targetParameter = target.getParameter();
|
List<String> projectList = Arrays.asList(target.getProject().split(","));//目标可以有多个
|
||||||
|
for (String targetProject : projectList) {
|
||||||
BusinessAssayParameterDataDO businessAssayParameterDataDO = businessAssayParameterDataMapper.selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(businessAssayTaskDataDO.getId(), targetProject, targetParameter);
|
String targetParameter = target.getParameter();
|
||||||
if (businessAssayParameterDataDO == null) {
|
|
||||||
throw new ServiceException(1_032_100_000, "子样检测方法映射配置错误");
|
BusinessAssayParameterDataDO businessAssayParameterDataDO = businessAssayParameterDataMapper.selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(businessAssayTaskDataDO.getId(), targetProject, targetParameter);
|
||||||
}
|
// if (businessAssayParameterDataDO == null) {
|
||||||
|
// throw new ServiceException(1_032_100_000, "子样检测方法映射配置错误");
|
||||||
if (StringUtils.isBlank(businessAssayParameterDataDO.getValue())) {
|
// }
|
||||||
//1 查询委托明细
|
|
||||||
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectByBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
|
if (businessAssayParameterDataDO != null && StringUtils.isBlank(businessAssayParameterDataDO.getValue())) {
|
||||||
//2 查询样品大类
|
//1 查询委托明细
|
||||||
BaseSampleDO baseSampleDO = baseSampleMapper.selectById(businessSampleEntrustDetailDO.getBaseSampleId());
|
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectByBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
|
||||||
//3 判断样品大类类型
|
//2 查询样品大类
|
||||||
if (QmsCommonConstant.ENTRUST_INSPECTION_ANALYSIS_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是商检分析样
|
BaseSampleDO baseSampleDO = baseSampleMapper.selectById(businessSampleEntrustDetailDO.getBaseSampleId());
|
||||||
//查询当前批次的第一个商检分析样
|
//3 判断样品大类类型
|
||||||
BusinessSampleEntrustDetailDO currBatchFirstBusinessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectCurrBatchFirstByBusinessBaseSampleIdAndBaseSampleDictionaryBusinessKey(businessAssayTaskDataDO.getBusinessBaseSampleId(), QmsCommonConstant.ENTRUST_INSPECTION_ANALYSIS_SAMPLE);
|
if (QmsCommonConstant.ENTRUST_INSPECTION_ANALYSIS_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是商检分析样
|
||||||
List<BusinessSubParentSampleDO> currBusinessSubParentSampleDOList = businessSubParentSampleMapper.selectByBusinessBaseSampleId(currBatchFirstBusinessSampleEntrustDetailDO.getBusinessBaseSampleId());
|
//查询当前批次的第一个商检分析样
|
||||||
List<Long> currBusinessSubParentSampleIdList = currBusinessSubParentSampleDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
BusinessSampleEntrustDetailDO currBatchFirstBusinessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectCurrBatchFirstByBusinessBaseSampleIdAndBaseSampleDictionaryBusinessKey(businessAssayTaskDataDO.getBusinessBaseSampleId(), QmsCommonConstant.ENTRUST_INSPECTION_ANALYSIS_SAMPLE);
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(currBusinessSubParentSampleIdList, configMethodId);
|
List<BusinessSubParentSampleDO> currBusinessSubParentSampleDOList = businessSubParentSampleMapper.selectByBusinessBaseSampleId(currBatchFirstBusinessSampleEntrustDetailDO.getBusinessBaseSampleId());
|
||||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
List<Long> currBusinessSubParentSampleIdList = currBusinessSubParentSampleDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(currBusinessSubParentSampleIdList, configMethodId);
|
||||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||||
}
|
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||||
} else if (QmsCommonConstant.ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是商检综合样
|
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||||
//查询当前样品的其他分析方法的结果
|
|
||||||
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
|
||||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
|
||||||
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
|
||||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
|
||||||
}
|
|
||||||
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是委检样
|
|
||||||
//查询来样品位
|
|
||||||
Boolean isForecastS = false;
|
|
||||||
String forecastValue = null;
|
|
||||||
String forecastResult = businessSampleEntrustDetailDO.getForecastResult();
|
|
||||||
if (StringUtils.isNotBlank(forecastResult)) {
|
|
||||||
JSONArray array = JSON.parseArray(forecastResult);
|
|
||||||
for (int i = 0; i < array.size(); i++) {
|
|
||||||
JSONObject item = array.getJSONObject(i);
|
|
||||||
if ("S".equals(item.getString("simpleName"))) {
|
|
||||||
isForecastS = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (int i = 0; i < array.size(); i++) {
|
} else if (QmsCommonConstant.ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是商检综合样
|
||||||
JSONObject item = array.getJSONObject(i);
|
//查询当前样品的其他分析方法的结果
|
||||||
if (sourceProject.equals(item.getString("simpleName"))) {
|
|
||||||
forecastValue = item.getString("value");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isForecastS) {//来样品位存在S值, 则取预报的值
|
|
||||||
businessAssayParameterDataDO.setValue(forecastValue);
|
|
||||||
} else {
|
|
||||||
//查询当前样品的其他方法的结果
|
|
||||||
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
||||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||||
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||||
}
|
}
|
||||||
|
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是委检样
|
||||||
|
//查询来样品位
|
||||||
|
Boolean isForecastS = false;
|
||||||
|
String forecastValue = null;
|
||||||
|
String forecastResult = businessSampleEntrustDetailDO.getForecastResult();
|
||||||
|
if (StringUtils.isNotBlank(forecastResult)) {
|
||||||
|
JSONArray array = JSON.parseArray(forecastResult);
|
||||||
|
for (int i = 0; i < array.size(); i++) {
|
||||||
|
JSONObject item = array.getJSONObject(i);
|
||||||
|
if ("S".equals(item.getString("simpleName"))) {
|
||||||
|
isForecastS = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < array.size(); i++) {
|
||||||
|
JSONObject item = array.getJSONObject(i);
|
||||||
|
if (sourceProject.equals(item.getString("simpleName"))) {
|
||||||
|
forecastValue = item.getString("value");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isForecastS) {//来样品位存在S值, 则取预报的值
|
||||||
|
businessAssayParameterDataDO.setValue(forecastValue);
|
||||||
|
} else {
|
||||||
|
//查询当前样品的其他方法的结果
|
||||||
|
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||||
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
||||||
|
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||||
|
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||||
|
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
//处理已查询的数据
|
||||||
|
BusinessAssayProjectAndParameterRespVO businessAssayProjectAndParameterRespVO = businessAssayParameterDataList.stream().filter(f -> f.getBizId().equals(businessAssayParameterDataDO.getBusinessAssayProjectDataId()) && f.getDicId().equals(businessAssayParameterDataDO.getConfigAssayMethodProjectParameterId()) ).findFirst().orElse(null);
|
||||||
//处理已查询的数据
|
if (businessAssayProjectAndParameterRespVO != null) {
|
||||||
BusinessAssayProjectAndParameterRespVO businessAssayProjectAndParameterRespVO = businessAssayParameterDataList.stream().filter(f -> f.getBizId().equals(businessAssayParameterDataDO.getBusinessAssayProjectDataId()) && f.getDicId().equals(businessAssayParameterDataDO.getConfigAssayMethodProjectParameterId()) ).findFirst().orElse(null);
|
businessAssayProjectAndParameterRespVO.setValue(businessAssayParameterDataDO.getValue());
|
||||||
if (businessAssayProjectAndParameterRespVO != null) {
|
}
|
||||||
businessAssayProjectAndParameterRespVO.setValue(businessAssayParameterDataDO.getValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
//更新
|
//更新
|
||||||
businessAssayParameterDataMapper.updateById(businessAssayParameterDataDO);
|
businessAssayParameterDataMapper.updateById(businessAssayParameterDataDO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1267,12 +1266,104 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void submitSampleAnalysisByTaskId(Long businessAssayTaskId) {
|
public void submitSampleAnalysisByTaskId(Long businessAssayTaskId) {
|
||||||
String loginUserNickname = SecurityFrameworkUtils.getLoginUserNickname();
|
// String loginUserNickname = SecurityFrameworkUtils.getLoginUserNickname();
|
||||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SUBMITTED);
|
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SUBMITTED);
|
||||||
businessAssayTaskDO.setAssaySubmitTime(LocalDateTime.now());
|
businessAssayTaskDO.setAssaySubmitTime(LocalDateTime.now());
|
||||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.IN_PROGRESS);
|
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.IN_PROGRESS);
|
||||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.IN_PROGRESS);
|
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.IN_PROGRESS);
|
||||||
|
|
||||||
|
//设置参数值
|
||||||
|
List<BusinessAssayParameterDataDO> updateBusinessAssayParameterDataList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<BusinessAssayTaskDataExtendRespVO> businessAssayTaskDataExtendList = businessAssayTaskDataMapper.selectExtendByBusinessAssayTaskId(businessAssayTaskId);
|
||||||
|
|
||||||
|
//查询检测项目
|
||||||
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataExtendList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataExtendList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
|
||||||
|
//子样配置id列表
|
||||||
|
List<Long> configSubSampleIdList = businessAssayTaskDataExtendList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
//子样方法配置列表
|
||||||
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodDOList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
|
//循环任务,赋值
|
||||||
|
for (BusinessAssayTaskDataExtendRespVO businessAssayTaskData : businessAssayTaskDataExtendList) {
|
||||||
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodDOList.stream().filter(f -> f.getConfigSubSampleId().equals(businessAssayTaskData.getConfigSubSampleId()) && f.getConfigAssayMethodId().equals(businessAssayTaskData.getConfigAssayMethodId())).findFirst().orElse(null);
|
||||||
|
String configInfomation = configSubSampleMethod.getConfigInfomation();
|
||||||
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
|
List<ConfigSubSampleMethodConfItem> setParamList = configSubSampleMethodConfInfo.getSetParam();
|
||||||
|
if (CollUtil.isEmpty(setParamList)) {
|
||||||
|
continue;//跳出循环
|
||||||
|
}
|
||||||
|
|
||||||
|
String methodKey = setParamList.stream().map(m -> m.getTarget().getMethodKey()).distinct().findFirst().orElse(null);
|
||||||
|
List<BusinessAssayTaskDataDO> targetBusinessAssayTaskDataList = businessAssayTaskDataMapper.selectByBusinessSubSampleIdAndMethodKey(businessAssayTaskData.getBusinessSubSampleId(), methodKey);
|
||||||
|
List<Long> targetBusinessAssayTaskDataIdList = targetBusinessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> targetBusinessAssayProjectDataExtendList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(targetBusinessAssayTaskDataIdList);
|
||||||
|
|
||||||
|
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : setParamList) {
|
||||||
|
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||||
|
String project = source.getProject();
|
||||||
|
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataExtendList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskData.getId()) && f.getSimpleName().equals(project)).findFirst().orElse(null);
|
||||||
|
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||||
|
for (BusinessAssayTaskDataDO targetBusinessAssayTaskData : targetBusinessAssayTaskDataList) {
|
||||||
|
List<String> targetProjectList = Arrays.asList(target.getProject().split(","));
|
||||||
|
String targetParameter = target.getParameter();
|
||||||
|
for (String targetProject : targetProjectList) {
|
||||||
|
BusinessAssayProjectDataExtendRespVO targetBusinessAssayProjectData = targetBusinessAssayProjectDataExtendList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(targetBusinessAssayTaskData.getId()) && f.getSimpleName().equals(targetProject)).findFirst().orElse(null);
|
||||||
|
BusinessAssayParameterDataDO businessAssayParameterDataDO = businessAssayParameterDataMapper.selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(targetBusinessAssayProjectData.getId(), targetProject, targetParameter);
|
||||||
|
if (businessAssayParameterDataDO != null) {
|
||||||
|
businessAssayParameterDataDO.setValue(currentBusinessAssayProjectData.getValue());
|
||||||
|
updateBusinessAssayParameterDataList.add(businessAssayParameterDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//补正系数列表
|
||||||
|
List<ConfigAssayMethodProjectCoefficientDO> configAssayMethodProjectCoefficientList = new ArrayList<>();
|
||||||
|
if (businessAssayTaskDO.getIsIngredients().equals(QmsCommonConstant.YES) && QmsCommonConstant.MANUAL.equals(businessAssayTaskDO.getIngredientsWay())) {//如果是需要配料,并且是人工配料的
|
||||||
|
List<Long> configBaseSampleIdList = businessAssayTaskDataExtendList.stream().map(m -> m.getConfigBaseSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
configAssayMethodProjectCoefficientList = configAssayMethodProjectCoefficientMapper.selectByConfigBaseSampleIds(configBaseSampleIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (BusinessAssayProjectDataExtendRespVO businessAssayProjectDataExtend : businessAssayProjectDataExtendList) {
|
||||||
|
if (businessAssayTaskDO.getIsIngredients().equals(QmsCommonConstant.YES) && QmsCommonConstant.MANUAL.equals(businessAssayTaskDO.getIngredientsWay())) {
|
||||||
|
ConfigAssayMethodProjectCoefficientDO configAssayMethodProjectCoefficientDO = configAssayMethodProjectCoefficientList.stream().filter(f ->
|
||||||
|
businessAssayProjectDataExtend.getConfigBaseSampleId().equals(f.getConfigBaseSampleId())
|
||||||
|
&& businessAssayTaskDO.getConfigAssayMethodId().equals(f.getConfigAssayMethodId())
|
||||||
|
&& businessAssayProjectDataExtend.getConfigAssayMethodProjectId().equals(f.getConfigAssayMethodProjectId())
|
||||||
|
&& new BigDecimal(businessAssayProjectDataExtend.getValue()).compareTo(new BigDecimal(f.getMinimumValue())) > 0
|
||||||
|
&& new BigDecimal(businessAssayProjectDataExtend.getValue()).compareTo(new BigDecimal(f.getMaximumValue())) <= 0
|
||||||
|
).findFirst().orElse(null);
|
||||||
|
if (configAssayMethodProjectCoefficientDO != null) {
|
||||||
|
businessAssayProjectDataExtend.setConfigAssayMethodProjectCoefficientId(configAssayMethodProjectCoefficientDO.getId());//补正系数的id
|
||||||
|
businessAssayProjectDataExtend.setCoefficient(configAssayMethodProjectCoefficientDO.getCoefficient());//补正系数
|
||||||
|
String valueAfter = new BigDecimal(businessAssayProjectDataExtend.getValue()).multiply(configAssayMethodProjectCoefficientDO.getCoefficient()).setScale(businessAssayProjectDataExtend.getDecimalPosition(), RoundingMode.HALF_EVEN).toPlainString();
|
||||||
|
businessAssayProjectDataExtend.setValueAfter(valueAfter);//补正后的值
|
||||||
|
} else { //未找到补正系数,默认为1
|
||||||
|
businessAssayProjectDataExtend.setCoefficient(new BigDecimal("1"));
|
||||||
|
businessAssayProjectDataExtend.setValueAfter(businessAssayProjectDataExtend.getValue());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
businessAssayProjectDataExtend.setValueAfter(businessAssayProjectDataExtend.getValue());//不需要配料,补正后的值与补正前一致
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (businessAssayProjectDataExtendList.size() > 0) {
|
||||||
|
List<BusinessAssayProjectDataDO> businessAssayProjectDataList = BeanUtils.toBean(businessAssayProjectDataExtendList, BusinessAssayProjectDataDO.class);
|
||||||
|
businessAssayProjectDataMapper.updateBatch(businessAssayProjectDataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessAssayParameterDataList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.updateBatch(updateBusinessAssayParameterDataList);
|
||||||
|
}
|
||||||
|
|
||||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1421,20 +1512,33 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : downIngredients) {
|
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : downIngredients) {
|
||||||
if (configSubSampleMethodConfItem.getRequired()) {
|
if (configSubSampleMethodConfItem.getRequired()) {
|
||||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||||
String project = source.getProject();
|
|
||||||
String parameter = source.getParameter();
|
List<String> projectList = Arrays.asList(source.getProject().split(","));//来源可以有多个
|
||||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId()) && f.getSimpleName().equals(project)).findFirst().orElse(null);
|
for (String project : projectList) {
|
||||||
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && f.getParameterKey().equals(parameter)).findFirst().orElse(null);
|
String parameter = source.getParameter();
|
||||||
if (StringUtils.isBlank(currentBusinessAssayParameterData.getValue())) {
|
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId()) && f.getSimpleName().equals(project)).findFirst().orElse(null);
|
||||||
throw new ServiceException(1_032_050_000, "当前分析任务,存在下发配料必填为空情况。请检查后再下发!");
|
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && f.getParameterKey().equals(parameter)).findFirst().orElse(null);
|
||||||
|
if (StringUtils.isBlank(currentBusinessAssayParameterData.getValue())) {
|
||||||
|
throw new ServiceException(1_032_050_000, "当前分析任务,存在下发配料必填为空情况。请检查后再下发!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
businessAssayTaskDO.setIngredientsWay(QmsCommonConstant.AUTOMATIC);//自动火试金配料
|
||||||
businessAssayTaskDO.setIngredientsStatus(QmsCommonConstant.IN_PROGRESS);
|
businessAssayTaskDO.setIngredientsStatus(QmsCommonConstant.IN_PROGRESS);
|
||||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void manualIngredients(Long businessAssayTaskId) {
|
||||||
|
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||||
|
businessAssayTaskDO.setIngredientsWay(QmsCommonConstant.MANUAL);//人工配料
|
||||||
|
businessAssayTaskDO.setIngredientsStatus(QmsCommonConstant.ALLOW_SUBMIT);//表示为允许提交
|
||||||
|
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
businessAssayTaskDataDO.setAssayType(assayType);
|
businessAssayTaskDataDO.setAssayType(assayType);
|
||||||
businessAssayTaskDataDO.setTaskType("复测");
|
businessAssayTaskDataDO.setTaskType("复测");
|
||||||
businessAssayTaskDataDO.setConfigSampleFlowId(businessSubSampleDO.getConfigSampleFlowId());
|
businessAssayTaskDataDO.setConfigSampleFlowId(businessSubSampleDO.getConfigSampleFlowId());
|
||||||
businessAssayTaskDataDO.setSampleFlowNodeKey(businessSubSampleDO.getSampleFlowNodeKey());
|
businessAssayTaskDataDO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_NODE_ANALYSIS);
|
||||||
businessAssayTaskDataDO.setSampleFlowNodeTime(LocalDateTime.now());
|
businessAssayTaskDataDO.setSampleFlowNodeTime(LocalDateTime.now());
|
||||||
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||||
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package com.zt.plat.module.qms.business.bus.service;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -237,6 +240,9 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
//查询子样分析方法及检测项目
|
//查询子样分析方法及检测项目
|
||||||
// List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigSubSampleIdsAndAssayDepartmentId(configSubSampleIdList, visitDeptId);
|
// List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigSubSampleIdsAndAssayDepartmentId(configSubSampleIdList, visitDeptId);
|
||||||
|
|
||||||
|
//根据样品大类,查询所有子样方法
|
||||||
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByBaseSampleId(baseSampleId);
|
||||||
|
|
||||||
//查询分析方法检测项目
|
//查询分析方法检测项目
|
||||||
List<AssayMethodProjectRespVO> list = businessAssayProjectDataMapper.selectAssayMethodProjectByBusinessSubSampleIdListAndConfigAssayMethodId(businessSubSampleIdList, configAssayMethodId);
|
List<AssayMethodProjectRespVO> list = businessAssayProjectDataMapper.selectAssayMethodProjectByBusinessSubSampleIdListAndConfigAssayMethodId(businessSubSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
@@ -246,9 +252,15 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
|
|
||||||
for (AssayMethodProjectRespVO assayMethodProject : list) {
|
for (AssayMethodProjectRespVO assayMethodProject : list) {
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> methodList = materialAssayStandardMethodList.stream().filter(f -> assayMethodProject.getDictionaryProjectId().equals(f.getDictionaryProjectId())).map(m -> {
|
List<ConfigAssayMethodProjectExtendRespVO> methodList = materialAssayStandardMethodList.stream().filter(f -> assayMethodProject.getDictionaryProjectId().equals(f.getDictionaryProjectId())).map(m -> {
|
||||||
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodExtend = configSubSampleMethodList.stream().filter(f -> m.getConfigAssayMethodId().equals(f.getConfigAssayMethodId())).findFirst().orElse(null);
|
||||||
|
String assayType = configSubSampleMethodExtend.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||||
|
if (m.getIsDualCup().equals(1)) {
|
||||||
|
assayType = QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP;
|
||||||
|
}
|
||||||
ConfigAssayMethodProjectExtendRespVO configAssayMethod = new ConfigAssayMethodProjectExtendRespVO();
|
ConfigAssayMethodProjectExtendRespVO configAssayMethod = new ConfigAssayMethodProjectExtendRespVO();
|
||||||
configAssayMethod.setConfigAssayMethodId(m.getConfigAssayMethodId());
|
configAssayMethod.setConfigAssayMethodId(m.getConfigAssayMethodId());
|
||||||
configAssayMethod.setConfigAssayMethodName(m.getConfigAssayMethodName());
|
configAssayMethod.setConfigAssayMethodName(m.getConfigAssayMethodName());
|
||||||
|
configAssayMethod.setAssayType(assayType);
|
||||||
configAssayMethod.setConfigAssayMethodNameAndCategory(m.getConfigAssayMethodNameAndCategory());
|
configAssayMethod.setConfigAssayMethodNameAndCategory(m.getConfigAssayMethodNameAndCategory());
|
||||||
return configAssayMethod;
|
return configAssayMethod;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
@@ -258,6 +270,499 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void changeMethod(ChangeAssayMethodReqVO req) {
|
||||||
|
List<Long> businessSubSampleIdList = req.getBusinessSubSampleIdList();
|
||||||
|
Long configAssayMethodId = req.getConfigAssayMethodId();
|
||||||
|
List<AssayMethodProjectRespVO> changeConfigAssayMethodProjectList = req.getChangeConfigAssayMethodProjectList();
|
||||||
|
|
||||||
|
// 先按 configAssayMethodId 分组
|
||||||
|
Map<Long, List<AssayMethodProjectRespVO>> groupedByConfigId = changeConfigAssayMethodProjectList.stream()
|
||||||
|
.collect(Collectors.groupingBy(AssayMethodProjectRespVO::getConfigAssayMethodId));
|
||||||
|
|
||||||
|
// 遍历每个分组,检查 assayType 是否唯一
|
||||||
|
for (Map.Entry<Long, List<AssayMethodProjectRespVO>> entry : groupedByConfigId.entrySet()) {
|
||||||
|
List<AssayMethodProjectRespVO> group = entry.getValue();
|
||||||
|
|
||||||
|
// 获取该组所有非空的 assayType(去重)
|
||||||
|
Set<String> assayTypes = group.stream()
|
||||||
|
.map(AssayMethodProjectRespVO::getAssayType)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
if (assayTypes.size() > 1) {
|
||||||
|
// 取第一个元素的 configAssayMethodNameAndCategory 作为代表(假设同 configId 下名称一致)
|
||||||
|
String methodName = group.get(0).getConfigAssayMethodNameAndCategory();
|
||||||
|
if (methodName == null || methodName.trim().isEmpty()) {
|
||||||
|
methodName = "(未命名)";
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new ServiceException(1_032_050_000,
|
||||||
|
String.format("检测方法“%s”存在多种分析类型:%s,请确保同一检测方法仅对应一种分析类型。",
|
||||||
|
methodName,
|
||||||
|
assayTypes.stream().sorted().collect(Collectors.joining(", "))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> changeConfigAssayMethodIdList = changeConfigAssayMethodProjectList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
LocalDateTime currentDateTime = LocalDateTime.now();
|
||||||
|
|
||||||
|
//需要更新的报表数据
|
||||||
|
List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要更新的分析任务
|
||||||
|
List<BusinessAssayTaskDataDO> updateBusinessAssayTaskDataDOList = new ArrayList<>();
|
||||||
|
//需要更新的分析任务检测项目
|
||||||
|
List<BusinessAssayProjectDataDO> updateBusinessAssayProjectDataDOList = new ArrayList<>();
|
||||||
|
//需要更新的分析任务检测项目参数
|
||||||
|
List<BusinessAssayParameterDataDO> updateBusinessAssayParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要更新的子样判定
|
||||||
|
List<BusinessSubSampleAssessmentDO> updateBusinessSubSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要更新的分样判定
|
||||||
|
List<BusinessSubParentSampleAssessmentDO> updateBusinessSubParentSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要新建的分析任务
|
||||||
|
List<BusinessAssayTaskDataDO> saveBusinessAssayTaskDataDOList = new ArrayList<>();
|
||||||
|
//需要新建的分析任务检测项目
|
||||||
|
List<BusinessAssayProjectDataDO> saveBusinessAssayProjectDataDOList = new ArrayList<>();
|
||||||
|
//需要新建的分析任务检测项目参数
|
||||||
|
List<BusinessAssayParameterDataDO> saveBusinessAssayParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要新建的子样判定
|
||||||
|
List<BusinessSubSampleAssessmentDO> saveBusinessSubSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要新建的分样判定
|
||||||
|
List<BusinessSubParentSampleAssessmentDO> saveBusinessSubParentSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要删除的分析任务
|
||||||
|
List<Long> removeAssayTaskDataIdList = new ArrayList<>();
|
||||||
|
//需要删除的分析任务检测项目
|
||||||
|
List<Long> removeAssayProjectIdList = new ArrayList<>();
|
||||||
|
//需要删除的分析任务检测项目参数
|
||||||
|
List<Long> removeAssayParameterIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要删除的子样判定
|
||||||
|
List<Long> removeSubSampleAssessmentIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要删除的分样判定
|
||||||
|
List<Long> removeSubParentSampleAssessmentIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
//查询子样
|
||||||
|
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
||||||
|
List<Long> businessBaseSampleIdList = businessSubSampleDOList.stream().map(m -> m.getBusinessBaseSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
List<Long> businessSubParentSampleIdList = businessSubSampleDOList.stream().map(m -> m.getBusinessSubParentSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
//查询检测任务 (通过分样id,可以查询双杯样的)
|
||||||
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
|
boolean disabled = businessAssayTaskDataDOList.stream().anyMatch(m -> m.getIsAssignTasked().equals(QmsCommonConstant.YES));
|
||||||
|
if (disabled) {
|
||||||
|
throw new ServiceException(1_032_001_000, "当前样品存在已分配任务,不允许修改分析方法");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测任务的检测项目
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测任务的检测项目的参数
|
||||||
|
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList = businessAssayParameterDataMapper.selectByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||||
|
|
||||||
|
//查询子样判定 (通过分样id,可以查询双杯样的)
|
||||||
|
List<BusinessSubSampleAssessmentDO> businessSubSampleAssessmentDOList = businessSubSampleAssessmentMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
|
//查询分样判定
|
||||||
|
List<BusinessSubParentSampleAssessmentExtendRespVO> businessSubParentSampleAssessmentList = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
|
//查询要变更的分析方法配置
|
||||||
|
List<ConfigAssayMethodDO> configAssayMethodDOList = configAssayMethodMapper.selectByIds(changeConfigAssayMethodIdList);
|
||||||
|
//分析方法检测项目配置
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodIds(changeConfigAssayMethodIdList);
|
||||||
|
//分析方法检测项目参数配置
|
||||||
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodIds(changeConfigAssayMethodIdList);
|
||||||
|
//查询要变更的子样及分析方法配置
|
||||||
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodIds(configSubSampleIdList, changeConfigAssayMethodIdList);
|
||||||
|
|
||||||
|
//循环分样判定
|
||||||
|
for (BusinessSubParentSampleAssessmentExtendRespVO businessSubParentSampleAssessment : businessSubParentSampleAssessmentList) {
|
||||||
|
|
||||||
|
//循环变更的分析方法
|
||||||
|
for (Long changeConfigAssayMethodId : changeConfigAssayMethodIdList) {
|
||||||
|
//如果当前分析方法不等于要变更的方法
|
||||||
|
if (!businessSubParentSampleAssessment.getConfigAssayMethodId().equals(changeConfigAssayMethodId)) {
|
||||||
|
//查询是否已有要变更的方法的分样判定
|
||||||
|
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodIdAndRetestCount(businessSubParentSampleAssessment.getBusinessSubParentSampleId(), changeConfigAssayMethodId, businessSubParentSampleAssessment.getRetestCount());
|
||||||
|
if (businessSubParentSampleAssessmentDO == null) {//不存在
|
||||||
|
//根据变更方法过滤出检测项目
|
||||||
|
List<Long> projectIdList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
|
||||||
|
//分析类型
|
||||||
|
String changeAssayType = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getAssayType()).distinct().findFirst().orElse(null);
|
||||||
|
|
||||||
|
|
||||||
|
//查询分析方法
|
||||||
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodDOList.stream().filter(f -> f.getId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
//查询子样分析方法
|
||||||
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleParentId().equals(businessSubParentSampleAssessment.getConfigSubSampleParentId()) && f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
switch (changeAssayType) {//根据前端传入的分析类型,修改子样分析方法中的分析任务数
|
||||||
|
case QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL: {
|
||||||
|
configSubSampleMethod.setTaskCount(2);//平行
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
configSubSampleMethod.setTaskCount(1);//单杯
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//根据任务数判断是平行还是
|
||||||
|
String assayType = configSubSampleMethod.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||||
|
|
||||||
|
businessSubParentSampleAssessmentDO = new BusinessSubParentSampleAssessmentDO();
|
||||||
|
businessSubParentSampleAssessmentDO.setId(IdWorker.getId());
|
||||||
|
businessSubParentSampleAssessmentDO.setBusinessSubParentSampleId(businessSubParentSampleAssessment.getBusinessSubParentSampleId());
|
||||||
|
businessSubParentSampleAssessmentDO.setConfigAssayMethodId(changeConfigAssayMethodId);
|
||||||
|
businessSubParentSampleAssessmentDO.setAssayType(assayType);
|
||||||
|
businessSubParentSampleAssessmentDO.setTaskType("常规");
|
||||||
|
saveBusinessSubParentSampleAssessmentDOList.add(businessSubParentSampleAssessmentDO);
|
||||||
|
|
||||||
|
BusinessSubSampleDO businessSubSampleDO = null;
|
||||||
|
if (!QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP.equals(businessSubParentSampleAssessment.getAssayType())) {//如果不为双杯样
|
||||||
|
businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).findFirst().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
//子样判定数据
|
||||||
|
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
|
||||||
|
businessSubSampleAssessmentDO.setId(IdWorker.getId());
|
||||||
|
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubParentSampleAssessment.getBusinessBaseSampleId());
|
||||||
|
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubParentSampleAssessment.getBusinessSubParentSampleId());
|
||||||
|
businessSubSampleAssessmentDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
|
||||||
|
if (businessSubSampleDO != null) {
|
||||||
|
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||||
|
}
|
||||||
|
businessSubSampleAssessmentDO.setConfigAssayMethodId(changeConfigAssayMethodId);
|
||||||
|
businessSubSampleAssessmentDO.setAssayType(assayType);
|
||||||
|
businessSubSampleAssessmentDO.setTaskType("常规");
|
||||||
|
|
||||||
|
saveBusinessSubSampleAssessmentDOList.add(businessSubSampleAssessmentDO);
|
||||||
|
|
||||||
|
//查询旧的检测项目
|
||||||
|
List<Long> oldBusinessAssayProjectDataIdList = businessAssayProjectDataList.stream().filter(f -> projectIdList.contains(f.getDictionaryProjectId()) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayProjectIdList.addAll(oldBusinessAssayProjectDataIdList);
|
||||||
|
List<Long> oldBusinessAssayParameterDataIdList = businessAssayParameterDataDOList.stream().filter(f -> oldBusinessAssayProjectDataIdList.contains(f.getBusinessAssayProjectDataId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
removeAssayParameterIdList.addAll(oldBusinessAssayParameterDataIdList);
|
||||||
|
if (projectIdList.size() == changeConfigAssayMethodProjectList.size()) {
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<Long> oldBusinessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayTaskDataIdList.addAll(oldBusinessAssayTaskDataIdList);
|
||||||
|
//查询旧的子样判定
|
||||||
|
List<Long> oldBusinessSubSampleAssesmentIdList = businessSubSampleAssessmentDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubSampleAssessmentIdList.addAll(oldBusinessSubSampleAssesmentIdList);
|
||||||
|
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubParentSampleAssessmentIdList.add(businessSubParentSampleAssessment.getId());
|
||||||
|
} else {
|
||||||
|
List<String> projectShowNameList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).map(m -> m.getDictionaryProjectShowName()).distinct().collect(Collectors.toList());
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<BusinessAssayTaskDataDO> oldBusinessAssayTaskDataList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||||
|
for (BusinessAssayTaskDataDO oldBusinessAssayTaskData : oldBusinessAssayTaskDataList) {
|
||||||
|
boolean isAdd = updateBusinessAssayTaskDataDOList.stream().anyMatch(m -> m.getId().equals(oldBusinessAssayTaskData.getId()));
|
||||||
|
if (!isAdd) {//如果未添加过更新,则修改检测项目并添加更新
|
||||||
|
oldBusinessAssayTaskData.setAssayProject(CollUtil.join(projectShowNameList, ","));
|
||||||
|
updateBusinessAssayTaskDataDOList.add(oldBusinessAssayTaskData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessAssayTaskDataDO oldBusinessAssayTaskDataDO = businessAssayTaskDataDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).findFirst().orElse(null);
|
||||||
|
|
||||||
|
//根据检测方法循环
|
||||||
|
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
|
||||||
|
//根据任务数循环
|
||||||
|
for (int i = 0; i < configSubSampleMethod.getTaskCount(); i++) {
|
||||||
|
//子样检测任务
|
||||||
|
businessAssayTaskDataDO = new BusinessAssayTaskDataDO();
|
||||||
|
businessAssayTaskDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayTaskDataDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
|
||||||
|
businessAssayTaskDataDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
|
||||||
|
businessAssayTaskDataDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||||
|
businessAssayTaskDataDO.setBusinessSubSampleAssessmentId(businessSubSampleAssessmentDO.getId());//子样判定id
|
||||||
|
businessAssayTaskDataDO.setConfigAssayMethodId(changeConfigAssayMethodId);
|
||||||
|
businessAssayTaskDataDO.setAssayType(assayType);
|
||||||
|
businessAssayTaskDataDO.setTaskType("常规");
|
||||||
|
businessAssayTaskDataDO.setConfigSampleFlowId(oldBusinessAssayTaskDataDO.getConfigSampleFlowId());
|
||||||
|
businessAssayTaskDataDO.setSampleFlowNodeKey(oldBusinessAssayTaskDataDO.getSampleFlowNodeKey());
|
||||||
|
businessAssayTaskDataDO.setSampleFlowNodeTime(currentDateTime);
|
||||||
|
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||||
|
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
StringBuilder assayProjectBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
|
||||||
|
|
||||||
|
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
|
||||||
|
if (!projectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
assayProjectBuilder.append(configAssayMethodProjectDO.getShowName()).append(",");
|
||||||
|
|
||||||
|
|
||||||
|
//检测项目
|
||||||
|
BusinessAssayProjectDataDO businessAssayProjectDataDO = new BusinessAssayProjectDataDO();
|
||||||
|
businessAssayProjectDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayProjectDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
|
businessAssayProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectDO.getId());
|
||||||
|
businessAssayProjectDataDO.setDictionaryProjectId(configAssayMethodProjectDO.getDictionaryProjectId());
|
||||||
|
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
|
||||||
|
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
|
||||||
|
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_REPORT);
|
||||||
|
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
|
||||||
|
businessAssayProjectDataDO.setIsEnabled(QmsCommonConstant.YES);
|
||||||
|
businessAssayProjectDataDO.setIsNotAssessment(QmsCommonConstant.NO);
|
||||||
|
|
||||||
|
saveBusinessAssayProjectDataDOList.add(businessAssayProjectDataDO);
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDOList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectDO.getId())).collect(Collectors.toList());
|
||||||
|
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDOList) {
|
||||||
|
BusinessAssayParameterDataDO businessAssayParameterDataDO = new BusinessAssayParameterDataDO();
|
||||||
|
businessAssayParameterDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
|
||||||
|
businessAssayParameterDataDO.setBusinessAssayProjectDataId(businessAssayProjectDataDO.getId());
|
||||||
|
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
|
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
|
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
saveBusinessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (assayProjectBuilder.length() > 1) {
|
||||||
|
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||||
|
}
|
||||||
|
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
|
||||||
|
saveBusinessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {//已存在
|
||||||
|
//分析类型
|
||||||
|
String changeAssayType = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getAssayType()).distinct().findFirst().orElse(null);
|
||||||
|
if (!businessSubParentSampleAssessmentDO.getAssayType().equals(changeAssayType)) {
|
||||||
|
String configAssayMethodNameAndCategory = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getConfigAssayMethodNameAndCategory()).distinct().findFirst().orElse(null);
|
||||||
|
throw new ServiceException(1_032_001_000, "检测方法“"+configAssayMethodNameAndCategory+"”,存在与当前分析类型不同的分析任务!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据变更方法过滤出检测项目
|
||||||
|
List<Long> projectIdList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
//查询分析方法
|
||||||
|
//ConfigAssayMethodDO configAssayMethodDO = configAssayMethodDOList.stream().filter(f -> f.getId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
//查询子样分析方法
|
||||||
|
//ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleParentId().equals(businessSubParentSampleAssessment.getConfigSubSampleParentId()) && f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
|
||||||
|
//根据任务数判断是平行还是
|
||||||
|
//String assayType = configSubSampleMethod.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||||
|
|
||||||
|
//查询子样判定
|
||||||
|
//BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = businessSubSampleAssessmentMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleAssessmentDO.getBusinessSubParentSampleId(), changeConfigAssayMethodId);
|
||||||
|
|
||||||
|
//查询旧的检测项目
|
||||||
|
List<Long> oldBusinessAssayProjectDataIdList = businessAssayProjectDataList.stream().filter(f -> projectIdList.contains(f.getDictionaryProjectId()) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayProjectIdList.addAll(oldBusinessAssayProjectDataIdList);
|
||||||
|
List<Long> oldBusinessAssayParameterDataIdList = businessAssayParameterDataDOList.stream().filter(f -> oldBusinessAssayProjectDataIdList.contains(f.getBusinessAssayProjectDataId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
removeAssayParameterIdList.addAll(oldBusinessAssayParameterDataIdList);
|
||||||
|
if (projectIdList.size() == changeConfigAssayMethodProjectList.size()) {
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<Long> oldBusinessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayTaskDataIdList.addAll(oldBusinessAssayTaskDataIdList);
|
||||||
|
//查询旧的子样判定
|
||||||
|
List<Long> oldBusinessSubSampleAssesmentIdList = businessSubSampleAssessmentDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubSampleAssessmentIdList.addAll(oldBusinessSubSampleAssesmentIdList);
|
||||||
|
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubParentSampleAssessmentIdList.add(businessSubParentSampleAssessment.getId());
|
||||||
|
} else {
|
||||||
|
List<String> projectShowNameList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).map(m -> m.getDictionaryProjectShowName()).distinct().collect(Collectors.toList());
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<BusinessAssayTaskDataDO> oldBusinessAssayTaskDataList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||||
|
for (BusinessAssayTaskDataDO oldBusinessAssayTaskData : oldBusinessAssayTaskDataList) {
|
||||||
|
boolean isAdd = updateBusinessAssayTaskDataDOList.stream().anyMatch(m -> m.getId().equals(oldBusinessAssayTaskData.getId()));
|
||||||
|
if (!isAdd) {//如果未添加过更新,则修改检测项目并添加更新
|
||||||
|
oldBusinessAssayTaskData.setAssayProject(CollUtil.join(projectShowNameList, ","));
|
||||||
|
updateBusinessAssayTaskDataDOList.add(oldBusinessAssayTaskData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询当前存在的分析任务
|
||||||
|
List<BusinessAssayTaskDataDO> currBusinessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleAssessmentDO.getBusinessSubParentSampleId(), changeConfigAssayMethodId);
|
||||||
|
|
||||||
|
//当前存在的分析任务循环
|
||||||
|
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : currBusinessAssayTaskDataDOList) {
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
StringBuilder assayProjectBuilder = new StringBuilder(businessAssayTaskDataDO.getAssayProject());
|
||||||
|
assayProjectBuilder.append(",");
|
||||||
|
|
||||||
|
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
|
||||||
|
|
||||||
|
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
|
||||||
|
if (!projectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
assayProjectBuilder.append(configAssayMethodProjectDO.getShowName()).append(",");
|
||||||
|
|
||||||
|
|
||||||
|
//检测项目
|
||||||
|
BusinessAssayProjectDataDO businessAssayProjectDataDO = new BusinessAssayProjectDataDO();
|
||||||
|
businessAssayProjectDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayProjectDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
|
businessAssayProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectDO.getId());
|
||||||
|
businessAssayProjectDataDO.setDictionaryProjectId(configAssayMethodProjectDO.getDictionaryProjectId());
|
||||||
|
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
|
||||||
|
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
|
||||||
|
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_REPORT);
|
||||||
|
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
|
||||||
|
businessAssayProjectDataDO.setIsEnabled(QmsCommonConstant.YES);
|
||||||
|
businessAssayProjectDataDO.setIsNotAssessment(QmsCommonConstant.NO);
|
||||||
|
|
||||||
|
saveBusinessAssayProjectDataDOList.add(businessAssayProjectDataDO);
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDOList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectDO.getId())).collect(Collectors.toList());
|
||||||
|
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDOList) {
|
||||||
|
BusinessAssayParameterDataDO businessAssayParameterDataDO = new BusinessAssayParameterDataDO();
|
||||||
|
businessAssayParameterDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
|
||||||
|
businessAssayParameterDataDO.setBusinessAssayProjectDataId(businessAssayProjectDataDO.getId());
|
||||||
|
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
|
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
|
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
saveBusinessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (assayProjectBuilder.length() > 1) {
|
||||||
|
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||||
|
}
|
||||||
|
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
|
||||||
|
updateBusinessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询报表数据
|
||||||
|
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = businessAssayReportDataMapper.selectBytBusinessBaseSampleIds(businessBaseSampleIdList);
|
||||||
|
for (BusinessAssayReportDataDO businessAssayReportDataDO : businessAssayReportDataDOList) {
|
||||||
|
String dataSource = businessAssayReportDataDO.getDataSource();
|
||||||
|
if (dataSource.contains(req.getConfigAssayMethodId().toString())) {//判定是否存在
|
||||||
|
List<Long> dataSourceList = new ArrayList<>();
|
||||||
|
String[] dataSourceSplit = dataSource.split(",");
|
||||||
|
for (int i = 0; i < dataSourceSplit.length; i++) {
|
||||||
|
dataSourceList.add(Long.parseLong(dataSourceSplit[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
//移除当前的
|
||||||
|
dataSourceList.remove(req.getConfigAssayMethodId());
|
||||||
|
//添加新的
|
||||||
|
dataSourceList.addAll(changeConfigAssayMethodIdList);
|
||||||
|
|
||||||
|
//重新赋值
|
||||||
|
businessAssayReportDataDO.setDataSource(CollUtil.join(dataSourceList, ","));
|
||||||
|
|
||||||
|
//添加到更新列表
|
||||||
|
updateBusinessAssayReportDataDOList.add(businessAssayReportDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//======================== 删除 =====================================================================
|
||||||
|
|
||||||
|
if (removeAssayTaskDataIdList.size() > 0) {
|
||||||
|
businessAssayTaskDataMapper.deleteByIds(removeAssayTaskDataIdList);
|
||||||
|
}
|
||||||
|
if (removeAssayProjectIdList.size() > 0) {
|
||||||
|
businessAssayProjectDataMapper.deleteByIds(removeAssayProjectIdList);
|
||||||
|
}
|
||||||
|
if (removeAssayParameterIdList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.deleteByIds(removeAssayParameterIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removeSubSampleAssessmentIdList.size() > 0) {
|
||||||
|
businessSubSampleAssessmentMapper.deleteByIds(removeSubSampleAssessmentIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removeSubParentSampleAssessmentIdList.size() > 0) {
|
||||||
|
businessSubParentSampleAssessmentMapper.deleteByIds(removeSubParentSampleAssessmentIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
//======================== 修改 =====================================================================
|
||||||
|
|
||||||
|
if (updateBusinessAssayReportDataDOList.size() > 0) {
|
||||||
|
businessAssayReportDataMapper.updateBatch(updateBusinessAssayReportDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessAssayTaskDataDOList.size() > 0) {
|
||||||
|
businessAssayTaskDataMapper.updateBatch(updateBusinessAssayTaskDataDOList);
|
||||||
|
}
|
||||||
|
if (updateBusinessAssayProjectDataDOList.size() > 0) {
|
||||||
|
businessAssayProjectDataMapper.updateBatch(updateBusinessAssayProjectDataDOList);
|
||||||
|
}
|
||||||
|
if (updateBusinessAssayParameterDataDOList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.updateBatch(updateBusinessAssayParameterDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessSubSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubSampleAssessmentMapper.updateBatch(updateBusinessSubSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessSubParentSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubParentSampleAssessmentMapper.updateBatch(updateBusinessSubParentSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
//======================== 新建 =====================================================================
|
||||||
|
|
||||||
|
if (saveBusinessAssayTaskDataDOList.size() > 0) {
|
||||||
|
businessAssayTaskDataMapper.insertBatch(saveBusinessAssayTaskDataDOList);
|
||||||
|
}
|
||||||
|
if (saveBusinessAssayProjectDataDOList.size() > 0) {
|
||||||
|
businessAssayProjectDataMapper.insertBatch(saveBusinessAssayProjectDataDOList);
|
||||||
|
}
|
||||||
|
if (saveBusinessAssayParameterDataDOList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.insertBatch(saveBusinessAssayParameterDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (saveBusinessSubSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubSampleAssessmentMapper.insertBatch(saveBusinessSubSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (saveBusinessSubParentSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubParentSampleAssessmentMapper.insertBatch(saveBusinessSubParentSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void changeMethod(ChangeAssayMethodReqVO req) {
|
public void changeMethod(ChangeAssayMethodReqVO req) {
|
||||||
@@ -699,7 +1204,8 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public LiteflowResponse methodAssign(SampleTaskAssignMethodParam param) {
|
public LiteflowResponse methodAssign(SampleTaskAssignMethodParam param) {
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class ConfigAssayMethodProjectCoefficientPageReqVO extends PageParam {
|
public class ConfigAssayMethodProjectCoefficientPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "30107")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", example = "10243")
|
@Schema(description = "检测方法配置ID", example = "10243")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ public class ConfigAssayMethodProjectCoefficientRespVO {
|
|||||||
@ExcelProperty("ID")
|
@ExcelProperty("ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "30107")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243")
|
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243")
|
||||||
@ExcelProperty("检测方法配置ID")
|
@ExcelProperty("检测方法配置ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ public class ConfigAssayMethodProjectCoefficientSaveReqVO {
|
|||||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26850")
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26850")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "30107")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243")
|
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243")
|
||||||
@NotNull(message = "检测方法配置ID不能为空")
|
@NotNull(message = "检测方法配置ID不能为空")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|||||||
@@ -20,4 +20,7 @@ public class ConfigAssayMethodProjectExtendRespVO extends ConfigAssayMethodProje
|
|||||||
|
|
||||||
@Schema(description = "显示名称")
|
@Schema(description = "显示名称")
|
||||||
private String showName;
|
private String showName;
|
||||||
|
|
||||||
|
@Schema(description = "分析类型 单杯-single_cup、双杯-double_cup、平行-single_parallel")
|
||||||
|
private String assayType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class ConfigAssayMethodProjectRangePageReqVO extends PageParam {
|
public class ConfigAssayMethodProjectRangePageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "30107")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", example = "6862")
|
@Schema(description = "检测方法配置ID", example = "6862")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ public class ConfigAssayMethodProjectRangeRespVO {
|
|||||||
@ExcelProperty("ID")
|
@ExcelProperty("ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "30107")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6862")
|
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6862")
|
||||||
@ExcelProperty("检测方法配置ID")
|
@ExcelProperty("检测方法配置ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ public class ConfigAssayMethodProjectRangeSaveReqVO {
|
|||||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25632")
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25632")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "30107")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6862")
|
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6862")
|
||||||
@NotNull(message = "检测方法配置ID不能为空")
|
@NotNull(message = "检测方法配置ID不能为空")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ public class ConfigSubSampleMethodConfInfo {
|
|||||||
/** 添加分析任务 **/
|
/** 添加分析任务 **/
|
||||||
private ConfigSubSampleMethodConfAdd addAssayTask;
|
private ConfigSubSampleMethodConfAdd addAssayTask;
|
||||||
|
|
||||||
|
/** 分析方法参数设置值配置 **/
|
||||||
|
private List<ConfigSubSampleMethodConfItem> setParam;
|
||||||
|
|
||||||
/** 分析方法参数取值配置 **/
|
/** 分析方法参数取值配置 **/
|
||||||
private List<ConfigSubSampleMethodConfItem> getParam;
|
private List<ConfigSubSampleMethodConfItem> getParam;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ public class ConfigSubSampleMethodConfPoint {
|
|||||||
/** 分析方法id **/
|
/** 分析方法id **/
|
||||||
private Long methodId;
|
private Long methodId;
|
||||||
|
|
||||||
/** 检测项目 **/
|
/** 分析方法Key **/
|
||||||
|
private String methodKey;
|
||||||
|
|
||||||
|
/** 检测项目,多个以“,”号分割 **/
|
||||||
private String project;
|
private String project;
|
||||||
|
|
||||||
/** 参数 **/
|
/** 参数 **/
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ public class ConfigAssayMethodProjectCoefficientDO extends BusinessBaseDO {
|
|||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
|
* 主样配置ID
|
||||||
|
*/
|
||||||
|
@TableField("CFG_BSE_SMP_ID")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
/**
|
||||||
* 检测方法配置ID
|
* 检测方法配置ID
|
||||||
*/
|
*/
|
||||||
@TableField("CFG_ASY_MTHD_ID")
|
@TableField("CFG_ASY_MTHD_ID")
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ public class ConfigAssayMethodProjectRangeDO extends BusinessBaseDO {
|
|||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
|
* 主样配置ID
|
||||||
|
*/
|
||||||
|
@TableField("CFG_BSE_SMP_ID")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
/**
|
||||||
* 检测方法配置ID
|
* 检测方法配置ID
|
||||||
*/
|
*/
|
||||||
@TableField("CFG_ASY_MTHD_ID")
|
@TableField("CFG_ASY_MTHD_ID")
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public interface ConfigAssayMethodProjectCoefficientMapper extends BaseMapperX<C
|
|||||||
|
|
||||||
default PageResult<ConfigAssayMethodProjectCoefficientDO> selectPage(ConfigAssayMethodProjectCoefficientPageReqVO reqVO) {
|
default PageResult<ConfigAssayMethodProjectCoefficientDO> selectPage(ConfigAssayMethodProjectCoefficientPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodProjectCoefficientDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodProjectCoefficientDO>()
|
||||||
|
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId())
|
||||||
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||||
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
.eqIfPresent(ConfigAssayMethodProjectCoefficientDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||||
@@ -34,4 +35,9 @@ public interface ConfigAssayMethodProjectCoefficientMapper extends BaseMapperX<C
|
|||||||
.orderByDesc(ConfigAssayMethodProjectCoefficientDO::getId));
|
.orderByDesc(ConfigAssayMethodProjectCoefficientDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<ConfigAssayMethodProjectCoefficientDO> selectByConfigBaseSampleIds(List<Long> configBaseSampleIdList){
|
||||||
|
return selectList(new LambdaQueryWrapperX<ConfigAssayMethodProjectCoefficientDO>()
|
||||||
|
.in(ConfigAssayMethodProjectCoefficientDO::getConfigBaseSampleId, configBaseSampleIdList));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,7 @@ public interface ConfigAssayMethodProjectRangeMapper extends BaseMapperX<ConfigA
|
|||||||
|
|
||||||
default PageResult<ConfigAssayMethodProjectRangeDO> selectPage(ConfigAssayMethodProjectRangePageReqVO reqVO) {
|
default PageResult<ConfigAssayMethodProjectRangeDO> selectPage(ConfigAssayMethodProjectRangePageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodProjectRangeDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodProjectRangeDO>()
|
||||||
|
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId())
|
||||||
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||||
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
.eqIfPresent(ConfigAssayMethodProjectRangeDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||||
|
|||||||
@@ -97,5 +97,18 @@ public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSample
|
|||||||
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds));
|
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<ConfigSubSampleMethodExtendRespVO> selectByBaseSampleId(Long baseSampleId) {
|
||||||
|
return selectJoinList(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
||||||
|
.leftJoin(ConfigSubSampleParentMethodDO.class, ConfigSubSampleParentMethodDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId)
|
||||||
|
.leftJoin(ConfigSubSampleDO.class, ConfigSubSampleDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleId)
|
||||||
|
.selectAll(ConfigSubSampleMethodDO.class)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
|
.selectAs(ConfigSubSampleDO::getConfigSubSampleParentId, ConfigSubSampleMethodExtendRespVO::getConfigSubSampleParentId)
|
||||||
|
.selectAs(ConfigSubSampleDO::getConfigBaseSampleId, ConfigSubSampleMethodExtendRespVO::getConfigBaseSampleId)
|
||||||
|
.selectAs(ConfigSubSampleDO::getBaseSampleId, ConfigSubSampleMethodExtendRespVO::getBaseSampleId)
|
||||||
|
.eq(ConfigSubSampleDO::getBaseSampleId, baseSampleId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -202,6 +202,13 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
|||||||
if(!ObjectUtils.isEmpty(maxRowCountStr)) maxRowCount = Integer.parseInt(maxRowCountStr);
|
if(!ObjectUtils.isEmpty(maxRowCountStr)) maxRowCount = Integer.parseInt(maxRowCountStr);
|
||||||
int rowLength = rowList.size();
|
int rowLength = rowList.size();
|
||||||
if(rowLength <= maxRowCount){
|
if(rowLength <= maxRowCount){
|
||||||
|
//以下为空白
|
||||||
|
if(rowList.size() < maxRowCount){
|
||||||
|
JSONObject t = new JSONObject();
|
||||||
|
t.put(colPrefix + "01", emptyText);
|
||||||
|
putEmptyData(t, 2,10);
|
||||||
|
rowList.add(t.clone());
|
||||||
|
}
|
||||||
pageRowList.add(rowList);
|
pageRowList.add(rowList);
|
||||||
return assemblePageResult(mainData, pageRowList, maxRowCount);
|
return assemblePageResult(mainData, pageRowList, maxRowCount);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,9 +214,17 @@ public class ReportDocumentMainServiceImpl implements ReportDocumentMainService,
|
|||||||
|
|
||||||
//委托单号
|
//委托单号
|
||||||
String entrustCode = "";
|
String entrustCode = "";
|
||||||
|
|
||||||
if(!ObjectUtils.isEmpty(entrustList)){
|
if(!ObjectUtils.isEmpty(entrustList)){
|
||||||
for(BusinessSampleEntrustRegistrationDO entrust : entrustList){
|
for(BusinessSampleEntrustRegistrationDO entrust : entrustList){
|
||||||
entrustCode += entrust.getEntrustNumber() + ",";
|
entrustCode += entrust.getEntrustNumber() + ",";
|
||||||
|
String externalInfomation = entrust.getExternalInfomation();
|
||||||
|
if(!ObjectUtils.isEmpty(externalInfomation)){
|
||||||
|
JSONObject externalInfomationJson = JSONObject.parseObject(externalInfomation);
|
||||||
|
String sampleCategory = externalInfomationJson.getString("sampleCategory");
|
||||||
|
if(!ObjectUtils.isEmpty(sampleCategory))
|
||||||
|
formDataJson.put("sampleCategory", sampleCategory);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import com.alibaba.qlexpress4.Express4Runner;
|
import com.alibaba.qlexpress4.Express4Runner;
|
||||||
import com.alibaba.qlexpress4.QLOptions;
|
import com.alibaba.qlexpress4.QLOptions;
|
||||||
|
import com.alibaba.qlexpress4.QLResult;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -87,8 +88,8 @@ public class AllowanceCalculatorComponent {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Object result = expressRunner.execute(formula, context, null, true, false);
|
// Object result = expressRunner.execute(formula, context, null, true, false);
|
||||||
Object result = express4Runner.execute(formula, context, QLOptions.builder().precise(true).build());
|
QLResult execute = express4Runner.execute(formula, context, QLOptions.builder().precise(true).build());
|
||||||
|
Object result = execute.getResult();
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
throw new RuntimeException("Express 公式返回结果为 null");
|
throw new RuntimeException("Express 公式返回结果为 null");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,14 +58,14 @@ public class SupplierController extends AbstractFileUploadController implements
|
|||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建供应商")
|
@Operation(summary = "创建供应商")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:supplier:create')")
|
// @PreAuthorize("@ss.hasPermission('qms:supplier:create')")
|
||||||
public CommonResult<SupplierRespVO> createSupplier(@Valid @RequestBody SupplierSaveReqVO createReqVO) {
|
public CommonResult<SupplierRespVO> createSupplier(@Valid @RequestBody SupplierSaveReqVO createReqVO) {
|
||||||
return success(supplierService.createSupplier(createReqVO));
|
return success(supplierService.createSupplier(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新供应商")
|
@Operation(summary = "更新供应商")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:supplier:update')")
|
// @PreAuthorize("@ss.hasPermission('qms:supplier:update')")
|
||||||
public CommonResult<Boolean> updateSupplier(@Valid @RequestBody SupplierSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateSupplier(@Valid @RequestBody SupplierSaveReqVO updateReqVO) {
|
||||||
supplierService.updateSupplier(updateReqVO);
|
supplierService.updateSupplier(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -74,7 +74,7 @@ public class SupplierController extends AbstractFileUploadController implements
|
|||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除供应商")
|
@Operation(summary = "删除供应商")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('qms:supplier:delete')")
|
// @PreAuthorize("@ss.hasPermission('qms:supplier:delete')")
|
||||||
public CommonResult<Boolean> deleteSupplier(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteSupplier(@RequestParam("id") Long id) {
|
||||||
supplierService.deleteSupplier(id);
|
supplierService.deleteSupplier(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -92,7 +92,7 @@ public class SupplierController extends AbstractFileUploadController implements
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得供应商")
|
@Operation(summary = "获得供应商")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:supplier:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:supplier:query')")
|
||||||
public CommonResult<SupplierExtendRespVO> getSupplier(@RequestParam("id") Long id) {
|
public CommonResult<SupplierExtendRespVO> getSupplier(@RequestParam("id") Long id) {
|
||||||
SupplierExtendRespVO supplier = supplierService.getSupplier(id);
|
SupplierExtendRespVO supplier = supplierService.getSupplier(id);
|
||||||
return success(supplier);
|
return success(supplier);
|
||||||
@@ -100,7 +100,7 @@ public class SupplierController extends AbstractFileUploadController implements
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得供应商分页")
|
@Operation(summary = "获得供应商分页")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:supplier:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:supplier:query')")
|
||||||
public CommonResult<PageResult<SupplierRespVO>> getSupplierPage(@Valid SupplierPageReqVO pageReqVO) {
|
public CommonResult<PageResult<SupplierRespVO>> getSupplierPage(@Valid SupplierPageReqVO pageReqVO) {
|
||||||
PageResult<SupplierDO> pageResult = supplierService.getSupplierPage(pageReqVO);
|
PageResult<SupplierDO> pageResult = supplierService.getSupplierPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, SupplierRespVO.class));
|
return success(BeanUtils.toBean(pageResult, SupplierRespVO.class));
|
||||||
|
|||||||
@@ -40,12 +40,21 @@ public interface SupplierMapper extends BaseMapperX<SupplierDO> {
|
|||||||
|
|
||||||
default SupplierExtendRespVO selectOneWithCertifications(Long id) {
|
default SupplierExtendRespVO selectOneWithCertifications(Long id) {
|
||||||
return selectJoinOne(SupplierExtendRespVO.class,
|
return selectJoinOne(SupplierExtendRespVO.class,
|
||||||
|
// new MPJLambdaWrapperX<SupplierDO>()
|
||||||
|
// .selectAll(SupplierDO.class)
|
||||||
|
// .selectCollection(SupplierPropertiesDO.class, SupplierExtendRespVO::getSupplierPropertiesList)
|
||||||
|
// .leftJoin(SupplierPropertiesDO.class, SupplierPropertiesDO::getSupplierId, SupplierDO::getId)
|
||||||
|
// .eq(SupplierDO::getId, id)
|
||||||
|
//// .eq(SupplierPropertiesDO::getBusinessType, QmsSupplierConstant.CERTIFICATION_KEY)
|
||||||
new MPJLambdaWrapperX<SupplierDO>()
|
new MPJLambdaWrapperX<SupplierDO>()
|
||||||
.selectAll(SupplierDO.class)
|
.selectAll(SupplierDO.class)
|
||||||
.selectCollection(SupplierPropertiesDO.class, SupplierExtendRespVO::getSupplierPropertiesList)
|
.selectCollection(SupplierPropertiesDO.class, SupplierExtendRespVO::getSupplierPropertiesList)
|
||||||
.leftJoin(SupplierPropertiesDO.class, SupplierPropertiesDO::getSupplierId, SupplierDO::getId)
|
// 将关联条件写在一个 on() 方法内
|
||||||
|
.leftJoin(SupplierPropertiesDO.class, on -> on
|
||||||
|
.eq(SupplierPropertiesDO::getSupplierId, SupplierDO::getId)
|
||||||
|
.eq(SupplierPropertiesDO::getBusinessType, QmsSupplierConstant.CERTIFICATION_KEY)
|
||||||
|
) // 注意这里移除了之前的 .eq 条件
|
||||||
.eq(SupplierDO::getId, id)
|
.eq(SupplierDO::getId, id)
|
||||||
.eq(SupplierPropertiesDO::getBusinessType, QmsSupplierConstant.CERTIFICATION_KEY)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.device.controller.admin;
|
package com.zt.plat.module.qms.resource.device.controller.admin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
||||||
@@ -52,15 +53,31 @@ public class DeviceApplyController extends AbstractFileUploadController implemen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource private DeviceApplyService deviceApplyService;
|
||||||
private DeviceApplyService deviceApplyService;
|
|
||||||
|
|
||||||
//todo 通过设备通用流程配置创建
|
@RequestMapping("/createTempData")
|
||||||
@PostMapping("/createTempData")
|
@Operation(summary = "创建临时数据")
|
||||||
@Operation(summary = "创建创建临时数据")
|
public CommonResult<DeviceApplyRespVO> createTempData(@RequestBody DeviceApplySaveReqVO createReqVO) {
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply:create')")
|
return deviceApplyService.createTempData(createReqVO);
|
||||||
public CommonResult<DeviceApplyRespVO> createTempData(@Valid @RequestBody DeviceApplySaveReqVO createReqVO) {
|
}
|
||||||
return success(deviceApplyService.createTempData(createReqVO));
|
|
||||||
|
@RequestMapping("/saveDeviceApply")
|
||||||
|
@Operation(summary = "保存申请数据")
|
||||||
|
public CommonResult<Boolean> saveDeviceApply(@Valid @RequestBody DeviceApplySaveReqVO createReqVO) {
|
||||||
|
return deviceApplyService.saveDeviceApply(createReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/addDetail")
|
||||||
|
@Operation(summary = "增加明细")
|
||||||
|
public CommonResult<Boolean> addDetail(@RequestBody JSONObject param) {
|
||||||
|
return deviceApplyService.addDetail(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/removeDetail")
|
||||||
|
@Operation(summary = "删除明细")
|
||||||
|
public CommonResult<Boolean> removeDetail(@RequestBody JSONObject param) {
|
||||||
|
return deviceApplyService.removeDetail(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.resource.device.controller.admin;
|
package com.zt.plat.module.qms.resource.device.controller.admin;
|
||||||
|
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailPageReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailRespVO;
|
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceApplyDO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailSaveReqVO;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -55,6 +54,13 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
|||||||
@Resource
|
@Resource
|
||||||
private DeviceApplyDetailService deviceApplyDetailService;
|
private DeviceApplyDetailService deviceApplyDetailService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@Operation(summary = "获得设备通用流程分页")
|
||||||
|
public CommonResult<List<DeviceApplyDetailRespVO>> list(DeviceApplyDetailPageReqVO reqVO) {
|
||||||
|
List<DeviceApplyDetailDO> list = deviceApplyDetailService.selectList(reqVO);
|
||||||
|
return success(BeanUtils.toBean(list, DeviceApplyDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建设备通用流程明细")
|
@Operation(summary = "创建设备通用流程明细")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:create')")
|
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:create')")
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
|||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建设备-检查项目配置")
|
@Operation(summary = "创建设备-检查项目配置")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:create')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:create')")
|
||||||
public CommonResult<DeviceConfigBusinessItemRespVO> createDeviceConfigBusinessItem(@Valid @RequestBody DeviceConfigBusinessItemSaveReqVO createReqVO) {
|
public CommonResult<DeviceConfigBusinessItemRespVO> createDeviceConfigBusinessItem(@Valid @RequestBody DeviceConfigBusinessItemSaveReqVO createReqVO) {
|
||||||
return success(deviceConfigBusinessItemService.createDeviceConfigBusinessItem(createReqVO));
|
return success(deviceConfigBusinessItemService.createDeviceConfigBusinessItem(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新设备-检查项目配置")
|
@Operation(summary = "更新设备-检查项目配置")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:update')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:update')")
|
||||||
public CommonResult<Boolean> updateDeviceConfigBusinessItem(@Valid @RequestBody DeviceConfigBusinessItemSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateDeviceConfigBusinessItem(@Valid @RequestBody DeviceConfigBusinessItemSaveReqVO updateReqVO) {
|
||||||
deviceConfigBusinessItemService.updateDeviceConfigBusinessItem(updateReqVO);
|
deviceConfigBusinessItemService.updateDeviceConfigBusinessItem(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -73,7 +73,7 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
|||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除设备-检查项目配置")
|
@Operation(summary = "删除设备-检查项目配置")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:delete')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:delete')")
|
||||||
public CommonResult<Boolean> deleteDeviceConfigBusinessItem(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteDeviceConfigBusinessItem(@RequestParam("id") Long id) {
|
||||||
deviceConfigBusinessItemService.deleteDeviceConfigBusinessItem(id);
|
deviceConfigBusinessItemService.deleteDeviceConfigBusinessItem(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -82,7 +82,7 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
|||||||
@DeleteMapping("/delete-list")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除设备-检查项目配置")
|
@Operation(summary = "批量删除设备-检查项目配置")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:delete')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:delete')")
|
||||||
public CommonResult<Boolean> deleteDeviceConfigBusinessItemList(@RequestBody BatchDeleteReqVO req) {
|
public CommonResult<Boolean> deleteDeviceConfigBusinessItemList(@RequestBody BatchDeleteReqVO req) {
|
||||||
deviceConfigBusinessItemService.deleteDeviceConfigBusinessItemListByIds(req.getIds());
|
deviceConfigBusinessItemService.deleteDeviceConfigBusinessItemListByIds(req.getIds());
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -91,7 +91,7 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得设备-检查项目配置")
|
@Operation(summary = "获得设备-检查项目配置")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:query')")
|
||||||
public CommonResult<DeviceConfigBusinessItemRespVO> getDeviceConfigBusinessItem(@RequestParam("id") Long id) {
|
public CommonResult<DeviceConfigBusinessItemRespVO> getDeviceConfigBusinessItem(@RequestParam("id") Long id) {
|
||||||
DeviceConfigBusinessItemDO deviceConfigBusinessItem = deviceConfigBusinessItemService.getDeviceConfigBusinessItem(id);
|
DeviceConfigBusinessItemDO deviceConfigBusinessItem = deviceConfigBusinessItemService.getDeviceConfigBusinessItem(id);
|
||||||
return success(BeanUtils.toBean(deviceConfigBusinessItem, DeviceConfigBusinessItemRespVO.class));
|
return success(BeanUtils.toBean(deviceConfigBusinessItem, DeviceConfigBusinessItemRespVO.class));
|
||||||
@@ -99,7 +99,7 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得设备-检查项目配置分页")
|
@Operation(summary = "获得设备-检查项目配置分页")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:query')")
|
||||||
public CommonResult<PageResult<DeviceConfigBusinessItemRespVO>> getDeviceConfigBusinessItemPage(@Valid DeviceConfigBusinessItemPageReqVO pageReqVO) {
|
public CommonResult<PageResult<DeviceConfigBusinessItemRespVO>> getDeviceConfigBusinessItemPage(@Valid DeviceConfigBusinessItemPageReqVO pageReqVO) {
|
||||||
PageResult<DeviceConfigBusinessItemDO> pageResult = deviceConfigBusinessItemService.getDeviceConfigBusinessItemPage(pageReqVO);
|
PageResult<DeviceConfigBusinessItemDO> pageResult = deviceConfigBusinessItemService.getDeviceConfigBusinessItemPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, DeviceConfigBusinessItemRespVO.class));
|
return success(BeanUtils.toBean(pageResult, DeviceConfigBusinessItemRespVO.class));
|
||||||
@@ -107,7 +107,7 @@ public class DeviceConfigBusinessItemController extends AbstractFileUploadContro
|
|||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出设备-检查项目配置 Excel")
|
@Operation(summary = "导出设备-检查项目配置 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-business-item:export')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-business-item:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportDeviceConfigBusinessItemExcel(@Valid DeviceConfigBusinessItemPageReqVO pageReqVO,
|
public void exportDeviceConfigBusinessItemExcel(@Valid DeviceConfigBusinessItemPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ public class DeviceConfigFlowController implements BusinessControllerMarker {
|
|||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建设备通用流程配置")
|
@Operation(summary = "创建设备通用流程配置")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-flow:create')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-flow:create')")
|
||||||
public CommonResult<DeviceConfigFlowRespVO> createDeviceConfigFlow(@Valid @RequestBody DeviceConfigFlowSaveReqVO createReqVO) {
|
public CommonResult<DeviceConfigFlowRespVO> createDeviceConfigFlow(@Valid @RequestBody DeviceConfigFlowSaveReqVO createReqVO) {
|
||||||
return success(deviceConfigFlowService.createDeviceConfigFlow(createReqVO));
|
return success(deviceConfigFlowService.createDeviceConfigFlow(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新设备通用流程配置")
|
@Operation(summary = "更新设备通用流程配置")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-flow:update')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-flow:update')")
|
||||||
public CommonResult<Boolean> updateDeviceConfigFlow(@Valid @RequestBody DeviceConfigFlowSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateDeviceConfigFlow(@Valid @RequestBody DeviceConfigFlowSaveReqVO updateReqVO) {
|
||||||
deviceConfigFlowService.updateDeviceConfigFlow(updateReqVO);
|
deviceConfigFlowService.updateDeviceConfigFlow(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -71,7 +71,7 @@ public class DeviceConfigFlowController implements BusinessControllerMarker {
|
|||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除设备通用流程配置")
|
@Operation(summary = "删除设备通用流程配置")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-flow:delete')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-flow:delete')")
|
||||||
public CommonResult<Boolean> deleteDeviceConfigFlow(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteDeviceConfigFlow(@RequestParam("id") Long id) {
|
||||||
deviceConfigFlowService.deleteDeviceConfigFlow(id);
|
deviceConfigFlowService.deleteDeviceConfigFlow(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -80,7 +80,7 @@ public class DeviceConfigFlowController implements BusinessControllerMarker {
|
|||||||
@DeleteMapping("/delete-list")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除设备通用流程配置")
|
@Operation(summary = "批量删除设备通用流程配置")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-flow:delete')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-flow:delete')")
|
||||||
public CommonResult<Boolean> deleteDeviceConfigFlowList(@RequestBody BatchDeleteReqVO req) {
|
public CommonResult<Boolean> deleteDeviceConfigFlowList(@RequestBody BatchDeleteReqVO req) {
|
||||||
deviceConfigFlowService.deleteDeviceConfigFlowListByIds(req.getIds());
|
deviceConfigFlowService.deleteDeviceConfigFlowListByIds(req.getIds());
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -89,7 +89,7 @@ public class DeviceConfigFlowController implements BusinessControllerMarker {
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得设备通用流程配置")
|
@Operation(summary = "获得设备通用流程配置")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-flow:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-flow:query')")
|
||||||
public CommonResult<DeviceConfigFlowRespVO> getDeviceConfigFlow(@RequestParam("id") Long id) {
|
public CommonResult<DeviceConfigFlowRespVO> getDeviceConfigFlow(@RequestParam("id") Long id) {
|
||||||
DeviceConfigFlowDO deviceConfigFlow = deviceConfigFlowService.getDeviceConfigFlow(id);
|
DeviceConfigFlowDO deviceConfigFlow = deviceConfigFlowService.getDeviceConfigFlow(id);
|
||||||
return success(BeanUtils.toBean(deviceConfigFlow, DeviceConfigFlowRespVO.class));
|
return success(BeanUtils.toBean(deviceConfigFlow, DeviceConfigFlowRespVO.class));
|
||||||
@@ -104,7 +104,7 @@ public class DeviceConfigFlowController implements BusinessControllerMarker {
|
|||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出设备通用流程配置 Excel")
|
@Operation(summary = "导出设备通用流程配置 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:device-config-flow:export')")
|
// @PreAuthorize("@ss.hasPermission('qms:device-config-flow:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportDeviceConfigFlowExcel(@Valid DeviceConfigFlowPageReqVO pageReqVO,
|
public void exportDeviceConfigFlowExcel(@Valid DeviceConfigFlowPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
|||||||
@@ -35,4 +35,7 @@ public class DeviceApplyDetailPageReqVO extends PageParam {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
//扩展字段
|
||||||
|
@Schema(description = "设备id列表")
|
||||||
|
private List<Long> deviceInfoIdList;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.device.controller.vo;
|
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@ public class DeviceApplyRespVO {
|
|||||||
|
|
||||||
@Schema(description = "业务状态", example = "1")
|
@Schema(description = "业务状态", example = "1")
|
||||||
@ExcelProperty("业务状态")
|
@ExcelProperty("业务状态")
|
||||||
|
@Dict(dicCode = "flow_status")
|
||||||
private String businessStatus;
|
private String businessStatus;
|
||||||
|
|
||||||
@Schema(description = "借用人")
|
@Schema(description = "借用人")
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class DeviceApplyDO extends BusinessBaseDO {
|
|||||||
* 申请部门ID
|
* 申请部门ID
|
||||||
*/
|
*/
|
||||||
@TableField("APL_DEPT")
|
@TableField("APL_DEPT")
|
||||||
private String applyDepartment;
|
private Long applyDepartment;
|
||||||
/**
|
/**
|
||||||
* 申请人
|
* 申请人
|
||||||
*/
|
*/
|
||||||
@@ -55,7 +55,7 @@ public class DeviceApplyDO extends BusinessBaseDO {
|
|||||||
* 申请人ID
|
* 申请人ID
|
||||||
*/
|
*/
|
||||||
@TableField("APL_USER")
|
@TableField("APL_USER")
|
||||||
private String applyUser;
|
private Long applyUser;
|
||||||
/**
|
/**
|
||||||
* 业务编码
|
* 业务编码
|
||||||
*/
|
*/
|
||||||
@@ -115,7 +115,7 @@ public class DeviceApplyDO extends BusinessBaseDO {
|
|||||||
* 表单模板ID
|
* 表单模板ID
|
||||||
*/
|
*/
|
||||||
@TableField("TMPL_ID")
|
@TableField("TMPL_ID")
|
||||||
private String templateId;
|
private Long templateId;
|
||||||
/**
|
/**
|
||||||
* 表单组件
|
* 表单组件
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceApplyDetailDO
|
|||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailPageReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailPageReqVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备通用流程明细 Mapper
|
* 设备通用流程明细 Mapper
|
||||||
*
|
*
|
||||||
@@ -27,4 +29,18 @@ public interface DeviceApplyDetailMapper extends BaseMapperX<DeviceApplyDetailDO
|
|||||||
.orderByDesc(DeviceApplyDetailDO::getId));
|
.orderByDesc(DeviceApplyDetailDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<DeviceApplyDetailDO> selectList(DeviceApplyDetailPageReqVO reqVO) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<DeviceApplyDetailDO>()
|
||||||
|
.eqIfPresent(DeviceApplyDetailDO::getApplyId, reqVO.getApplyId())
|
||||||
|
.eqIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfomationId())
|
||||||
|
.inIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfoIdList())
|
||||||
|
.eqIfPresent(DeviceApplyDetailDO::getDeviceBorrowDetailId, reqVO.getDeviceBorrowDetailId())
|
||||||
|
.eqIfPresent(DeviceApplyDetailDO::getFormData, reqVO.getFormData())
|
||||||
|
.eqIfPresent(DeviceApplyDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.eqIfPresent(DeviceApplyDetailDO::getRemark, reqVO.getRemark())
|
||||||
|
.betweenIfPresent(DeviceApplyDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(DeviceApplyDetailDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,10 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
|||||||
*/
|
*/
|
||||||
public interface DeviceApplyDetailService {
|
public interface DeviceApplyDetailService {
|
||||||
|
|
||||||
|
List<DeviceApplyDetailDO> selectList(DeviceApplyDetailPageReqVO reqVO);
|
||||||
|
|
||||||
|
void insertBatch(List<DeviceApplyDetailDO> list);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建设备通用流程明细
|
* 创建设备通用流程明细
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailRes
|
|||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailSaveReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailSaveReqVO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -32,6 +33,17 @@ public class DeviceApplyDetailServiceImpl implements DeviceApplyDetailService {
|
|||||||
@Resource
|
@Resource
|
||||||
private DeviceApplyDetailMapper deviceApplyDetailMapper;
|
private DeviceApplyDetailMapper deviceApplyDetailMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeviceApplyDetailDO> selectList(DeviceApplyDetailPageReqVO reqVO) {
|
||||||
|
return deviceApplyDetailMapper.selectList(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void insertBatch(List<DeviceApplyDetailDO> list) {
|
||||||
|
deviceApplyDetailMapper.insertBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceApplyDetailRespVO createDeviceApplyDetail(DeviceApplyDetailSaveReqVO createReqVO) {
|
public DeviceApplyDetailRespVO createDeviceApplyDetail(DeviceApplyDetailSaveReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.zt.plat.module.qms.resource.device.service;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
||||||
@@ -25,7 +27,15 @@ public interface DeviceApplyService {
|
|||||||
DeviceApplyRespVO createDeviceApply(@Valid DeviceApplySaveReqVO createReqVO);
|
DeviceApplyRespVO createDeviceApply(@Valid DeviceApplySaveReqVO createReqVO);
|
||||||
|
|
||||||
//创建临时数据
|
//创建临时数据
|
||||||
DeviceApplyRespVO createTempData(@Valid DeviceApplySaveReqVO createReqVO);
|
CommonResult<DeviceApplyRespVO> createTempData(@Valid DeviceApplySaveReqVO createReqVO);
|
||||||
|
|
||||||
|
//增加明细
|
||||||
|
CommonResult<Boolean> addDetail(JSONObject param);
|
||||||
|
|
||||||
|
//删除明细
|
||||||
|
CommonResult<Boolean> removeDetail(JSONObject param);
|
||||||
|
|
||||||
|
CommonResult<Boolean> saveDeviceApply(@Valid DeviceApplySaveReqVO updateReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新设备通用流程,验收、降级、停用、报废、还原、启用
|
* 更新设备通用流程,验收、降级、停用、报废、还原、启用
|
||||||
@@ -34,6 +44,7 @@ public interface DeviceApplyService {
|
|||||||
*/
|
*/
|
||||||
void updateDeviceApply(@Valid DeviceApplySaveReqVO updateReqVO);
|
void updateDeviceApply(@Valid DeviceApplySaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除设备通用流程,验收、降级、停用、报废、还原、启用
|
* 删除设备通用流程,验收、降级、停用、报废、还原、启用
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,15 +1,36 @@
|
|||||||
package com.zt.plat.module.qms.resource.device.service;
|
package com.zt.plat.module.qms.resource.device.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.parser.Feature;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.security.core.LoginUser;
|
||||||
|
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import com.zt.plat.module.qms.common.data.dal.dataobject.DataCollectionDO;
|
||||||
|
import com.zt.plat.module.qms.common.data.dal.dataobject.DataTemplateDO;
|
||||||
|
import com.zt.plat.module.qms.common.data.service.DataCollectionService;
|
||||||
|
import com.zt.plat.module.qms.common.data.service.DataTemplateService;
|
||||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceApplyDetailDO;
|
||||||
|
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceConfigFlowDO;
|
||||||
|
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfomationDO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.beanutils.PropertyUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceApplyDO;
|
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceApplyDO;
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
@@ -28,10 +49,15 @@ import static com.zt.plat.module.qms.enums.ErrorCodeConstants.DEVICE_APPLY_NOT_E
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
|
@Slf4j
|
||||||
public class DeviceApplyServiceImpl implements DeviceApplyService {
|
public class DeviceApplyServiceImpl implements DeviceApplyService {
|
||||||
|
|
||||||
@Resource
|
@Resource private DeviceApplyMapper deviceApplyMapper;
|
||||||
private DeviceApplyMapper deviceApplyMapper;
|
@Resource private DeviceConfigFlowService deviceConfigFlowService;
|
||||||
|
@Resource private DeviceInfomationService deviceInfomationService;
|
||||||
|
@Resource private DeviceApplyDetailService deviceApplyDetailService;
|
||||||
|
@Resource private DataCollectionService dataCollectionService;
|
||||||
|
@Resource private DataTemplateService dataTemplateService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceApplyRespVO createDeviceApply(DeviceApplySaveReqVO createReqVO) {
|
public DeviceApplyRespVO createDeviceApply(DeviceApplySaveReqVO createReqVO) {
|
||||||
@@ -43,14 +69,120 @@ public class DeviceApplyServiceImpl implements DeviceApplyService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceApplyRespVO createTempData(DeviceApplySaveReqVO createReqVO) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public CommonResult<DeviceApplyRespVO> createTempData(DeviceApplySaveReqVO createReqVO) {
|
||||||
|
String businessType = createReqVO.getBusinessCode();
|
||||||
|
if(ObjectUtils.isEmpty(businessType))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "请选择业务类型");
|
||||||
|
DeviceConfigFlowDO config = deviceConfigFlowService.getByBusinessType(businessType);
|
||||||
|
if(ObjectUtils.isEmpty(config))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "业务类型配置不存在("+businessType+"),请联系管理员处理");
|
||||||
DeviceApplyDO deviceApply = BeanUtils.toBean(createReqVO, DeviceApplyDO.class);
|
DeviceApplyDO deviceApply = BeanUtils.toBean(createReqVO, DeviceApplyDO.class);
|
||||||
|
if(!ObjectUtils.isEmpty(config.getTemplateKey())){
|
||||||
|
DataTemplateDO dataTemplate = dataTemplateService.getLatestDataByKey(config.getTemplateKey());
|
||||||
|
if(ObjectUtils.isEmpty(dataTemplate))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "表单编辑器模板不存在("+config.getTemplateKey()+"),请联系管理员处理");
|
||||||
|
deviceApply.setTemplateId(dataTemplate.getId());
|
||||||
|
}
|
||||||
|
DataCollectionDO dataCollection = dataCollectionService.getLatestDataCollectionByKey(config.getDataCollectionKey());
|
||||||
|
if(ObjectUtils.isEmpty(dataCollection))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "数据集不存在("+config.getDataCollectionKey()+"),请联系管理员处理");
|
||||||
|
deviceApply.setBusinessName(config.getBusinessName());
|
||||||
|
deviceApply.setDataCollectionId(dataCollection.getId());
|
||||||
|
//取当前用户
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
String nickName = SecurityFrameworkUtils.getLoginUserNickname();
|
||||||
|
deviceApply.setApplyUser(loginUser.getId());
|
||||||
|
deviceApply.setApplyUserName(nickName);
|
||||||
|
deviceApply.setApplyDepartment(loginUser.getVisitDeptId());
|
||||||
|
deviceApply.setApplyDepartmentName(loginUser.getVisitDeptName());
|
||||||
deviceApply.setBusinessStatus(QmsCommonConstant.TEMP_DATA_CODE);
|
deviceApply.setBusinessStatus(QmsCommonConstant.TEMP_DATA_CODE);
|
||||||
deviceApplyMapper.insert(deviceApply);
|
deviceApplyMapper.insert(deviceApply);
|
||||||
// 返回
|
// 返回
|
||||||
return BeanUtils.toBean(deviceApply, DeviceApplyRespVO.class);
|
return CommonResult.success(BeanUtils.toBean(deviceApply, DeviceApplyRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//增加明细
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public CommonResult<Boolean> addDetail(JSONObject param) {
|
||||||
|
String deviceIds = param.getString("deviceIds");
|
||||||
|
String applyId = param.getString("applyId");
|
||||||
|
if(ObjectUtils.isEmpty(deviceIds))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "请选择设备");
|
||||||
|
if(ObjectUtils.isEmpty(applyId))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "缺少申请id参数,请刷新后重试!");
|
||||||
|
List<DeviceInfomationDO> deviceList = deviceInfomationService.getListByIds(deviceIds);
|
||||||
|
if(deviceList.isEmpty())
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "设备不存在");
|
||||||
|
List<Long> deviceInfoIdList = new ArrayList<>();
|
||||||
|
for (DeviceInfomationDO device : deviceList) {
|
||||||
|
deviceInfoIdList.add(device.getId());
|
||||||
|
}
|
||||||
|
//查询已有明细,避免重复添加
|
||||||
|
DeviceApplyDetailPageReqVO detailPageReqVO = new DeviceApplyDetailPageReqVO();
|
||||||
|
detailPageReqVO.setApplyId(Long.valueOf(applyId));
|
||||||
|
detailPageReqVO.setDeviceInfoIdList(deviceInfoIdList);
|
||||||
|
List<DeviceApplyDetailDO> detailList = deviceApplyDetailService.selectList(detailPageReqVO);
|
||||||
|
//过滤已添加设备
|
||||||
|
List<DeviceInfomationDO> addDeviceList = deviceList.stream().filter(device ->
|
||||||
|
detailList.stream().noneMatch(detail -> detail.getDeviceInfomationId().equals(device.getId()))).toList();
|
||||||
|
List<DeviceApplyDetailDO> detailDOList = new ArrayList<>();
|
||||||
|
for (DeviceInfomationDO device : addDeviceList) {
|
||||||
|
DeviceApplyDetailDO detail = new DeviceApplyDetailDO();
|
||||||
|
detail.setApplyId(Long.valueOf(applyId));
|
||||||
|
detail.setDeviceInfomationId(device.getId());
|
||||||
|
detailDOList.add(detail);
|
||||||
|
}
|
||||||
|
deviceApplyDetailService.insertBatch(detailDOList);
|
||||||
|
|
||||||
|
return CommonResult.success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonResult<Boolean> removeDetail(JSONObject param) {
|
||||||
|
|
||||||
|
String detailIds = param.getString("detailIds");
|
||||||
|
if(ObjectUtils.isEmpty(detailIds))
|
||||||
|
return CommonResult.error(DEVICE_APPLY_NOT_EXISTS.getCode(), "请选择需要删除的明细数据");
|
||||||
|
List<Long> detailIdList = Arrays.stream(detailIds.split(",")).map(Long::valueOf).toList();
|
||||||
|
deviceApplyDetailService.deleteDeviceApplyDetailListByIds(detailIdList);
|
||||||
|
return CommonResult.success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public CommonResult<Boolean> saveDeviceApply(DeviceApplySaveReqVO updateReqVO) {
|
||||||
|
|
||||||
|
// 校验存在
|
||||||
|
DeviceApplyDO backData = getDeviceApply(updateReqVO.getId());
|
||||||
|
if(backData == null)
|
||||||
|
throw exception(DEVICE_APPLY_NOT_EXISTS);
|
||||||
|
if(QmsCommonConstant.TEMP_DATA_CODE.equals(backData.getBusinessStatus())){
|
||||||
|
updateReqVO.setBusinessStatus(QmsCommonConstant.NOT_START);
|
||||||
|
}
|
||||||
|
//处理动态表单字段
|
||||||
|
String formData = updateReqVO.getFormData();
|
||||||
|
if(!ObjectUtils.isEmpty(formData)) {
|
||||||
|
assembleFormData(formData, updateReqVO);
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
DeviceApplyDO updateObj = BeanUtils.toBean(updateReqVO, DeviceApplyDO.class);
|
||||||
|
deviceApplyMapper.updateById(updateObj);
|
||||||
|
return CommonResult.success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assembleFormData(String formData, DeviceApplySaveReqVO updateReqVO){
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(formData);
|
||||||
|
DeviceApplySaveReqVO jsonVo = jsonObject.toJavaObject(DeviceApplySaveReqVO.class);
|
||||||
|
CopyOptions copyOptions = CopyOptions.create();
|
||||||
|
copyOptions.setIgnoreNullValue(true);
|
||||||
|
BeanUtil.copyProperties(jsonVo, updateReqVO, copyOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateDeviceApply(DeviceApplySaveReqVO updateReqVO) {
|
public void updateDeviceApply(DeviceApplySaveReqVO updateReqVO) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ public interface DeviceConfigFlowService {
|
|||||||
|
|
||||||
List<DeviceConfigFlowDO> getEnableList(DeviceConfigFlowPageReqVO pageReqVO);
|
List<DeviceConfigFlowDO> getEnableList(DeviceConfigFlowPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
DeviceConfigFlowDO getByBusinessType(String code);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建设备通用流程配置
|
* 创建设备通用流程配置
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.resource.device.service;
|
package com.zt.plat.module.qms.resource.device.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowPageReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowRespVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowRespVO;
|
||||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowSaveReqVO;
|
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowSaveReqVO;
|
||||||
@@ -37,6 +38,15 @@ public class DeviceConfigFlowServiceImpl implements DeviceConfigFlowService {
|
|||||||
return deviceConfigFlowMapper.selectList(pageReqVO);
|
return deviceConfigFlowMapper.selectList(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeviceConfigFlowDO getByBusinessType(String code) {
|
||||||
|
LambdaQueryWrapper<DeviceConfigFlowDO> query = new LambdaQueryWrapper<>();
|
||||||
|
query.eq(DeviceConfigFlowDO::getBusinessType, code);
|
||||||
|
query.orderByDesc(DeviceConfigFlowDO::getUpdateTime);
|
||||||
|
query.last("limit 1");
|
||||||
|
return deviceConfigFlowMapper.selectOne(query);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceConfigFlowRespVO createDeviceConfigFlow(DeviceConfigFlowSaveReqVO createReqVO) {
|
public DeviceConfigFlowRespVO createDeviceConfigFlow(DeviceConfigFlowSaveReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public interface DeviceInfomationService {
|
|||||||
DeviceInfomationDO getByCode(String code);
|
DeviceInfomationDO getByCode(String code);
|
||||||
|
|
||||||
List<DeviceInfomationDO> getListByProductIdList(List<Long> productIds);
|
List<DeviceInfomationDO> getListByProductIdList(List<Long> productIds);
|
||||||
|
List<DeviceInfomationDO> getListByIds(String ids);
|
||||||
|
|
||||||
List<Long> getIdListByProductIdList(List<Long> productIds);
|
List<Long> getIdListByProductIdList(List<Long> productIds);
|
||||||
|
|
||||||
@@ -47,11 +48,7 @@ public interface DeviceInfomationService {
|
|||||||
// CommonResult<Boolean> updateDeviceAcceptFlag(Long deviceId, String acceptFlag);
|
// CommonResult<Boolean> updateDeviceAcceptFlag(Long deviceId, String acceptFlag);
|
||||||
// CommonResult<Boolean> updateDeviceLendFlag(Long deviceId, Integer lendFlag);
|
// CommonResult<Boolean> updateDeviceLendFlag(Long deviceId, Integer lendFlag);
|
||||||
|
|
||||||
|
void updateBatch(List<DeviceInfomationDO> updateList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建设备-设备信息
|
* 创建设备-设备信息
|
||||||
|
|||||||
@@ -25,9 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
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.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||||
@@ -201,6 +199,11 @@ public class DeviceInfomationServiceImpl implements DeviceInfomationService {
|
|||||||
deviceInfomationMapper.update(updateWrapper);
|
deviceInfomationMapper.update(updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateBatch(List<DeviceInfomationDO> updateList) {
|
||||||
|
deviceInfomationMapper.updateBatch(updateList);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceInfomationDO getByCode(String code) {
|
public DeviceInfomationDO getByCode(String code) {
|
||||||
LambdaQueryWrapper<DeviceInfomationDO> query = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<DeviceInfomationDO> query = new LambdaQueryWrapper<>();
|
||||||
@@ -215,6 +218,14 @@ public class DeviceInfomationServiceImpl implements DeviceInfomationService {
|
|||||||
return deviceInfomationMapper.selectList(query);
|
return deviceInfomationMapper.selectList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeviceInfomationDO> getListByIds(String ids) {
|
||||||
|
if(ObjectUtils.isEmpty(ids))
|
||||||
|
return Collections.emptyList();
|
||||||
|
List< Long> idsList = Arrays.asList(ids.split(",")).stream().map(Long::parseLong).toList();
|
||||||
|
return deviceInfomationMapper.selectByIds(idsList);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> getIdListByProductIdList(List<Long> productIds) {
|
public List<Long> getIdListByProductIdList(List<Long> productIds) {
|
||||||
List<DeviceInfomationDO> list = getListByProductIdList(productIds);
|
List<DeviceInfomationDO> list = getListByProductIdList(productIds);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.admin;
|
package com.zt.plat.module.qms.resource.material.controller.admin;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchPageReqVO;
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchRespVO;
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchRespVO;
|
||||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchSaveReqVO;
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialBatchSaveReqVO;
|
||||||
@@ -39,6 +40,7 @@ import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/qms/resource/material-batch")
|
@RequestMapping("/qms/resource/material-batch")
|
||||||
@Validated
|
@Validated
|
||||||
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
public class MaterialBatchController implements BusinessControllerMarker {
|
public class MaterialBatchController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
|
|||||||
@DeleteMapping("/delete-list")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除物料批次")
|
@Operation(summary = "批量删除物料批次")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:material-batch:delete')")
|
@PreAuthorize("@ss.hasPermission('qms:material-batch:delete')")
|
||||||
public CommonResult<Boolean> deleteMaterialBatchList(@RequestBody BatchDeleteReqVO req) {
|
public CommonResult<Boolean> deleteMaterialBatchList(@RequestBody BatchDeleteReqVO req) {
|
||||||
materialBatchService.deleteMaterialBatchListByIds(req.getIds());
|
materialBatchService.deleteMaterialBatchListByIds(req.getIds());
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -91,8 +93,13 @@ public class MaterialBatchController implements BusinessControllerMarker {
|
|||||||
@Operation(summary = "获得物料批次分页")
|
@Operation(summary = "获得物料批次分页")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
|
||||||
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
|
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
|
||||||
PageResult<MaterialBatchDO> pageResult = materialBatchService.getMaterialBatchPage(pageReqVO);
|
PageResult<MaterialBatchRespVO> pageResult;
|
||||||
return success(BeanUtils.toBean(pageResult, MaterialBatchRespVO.class));
|
if (!pageReqVO.getOnlyGong()) {
|
||||||
|
pageResult = materialBatchService.getMaterialBatchPageWithPdtInfo(pageReqVO);
|
||||||
|
} else {
|
||||||
|
pageResult = materialBatchService.getMaterialBatchGongPageWithPdtInfo(pageReqVO);
|
||||||
|
}
|
||||||
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@@ -115,4 +122,20 @@ public class MaterialBatchController implements BusinessControllerMarker {
|
|||||||
return success(materialBatchService.assignMaterialBatchGongduan(createReqVOs));
|
return success(materialBatchService.assignMaterialBatchGongduan(createReqVOs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/submit")
|
||||||
|
@Operation(summary = "提交物料批次")
|
||||||
|
@Parameter(name = "id", required = true)
|
||||||
|
public CommonResult<Boolean> submitMaterialBatch(@RequestParam("id") Long id) {
|
||||||
|
|
||||||
|
return success(materialBatchService.submitMaterialBatch(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("gongduan-page")
|
||||||
|
@Operation(summary = "获取工段列表")
|
||||||
|
@Parameter(name = "id", description = "物料批次 id", required = true, example = "1054")
|
||||||
|
public CommonResult<List<MaterialBatchRespVO>> getMaterialBatchGongduanList(@RequestParam("id") Long id) {
|
||||||
|
List<MaterialBatchDO> list = materialBatchService.getMaterialBatchGongduanList(id);
|
||||||
|
return success(BeanUtils.toBean(list, MaterialBatchRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.admin;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialProductPageReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialProductRespVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialProductService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 物料库存")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/resource/material-inventory")
|
||||||
|
@Validated
|
||||||
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
|
public class MaterialInventoryController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MaterialProductService materialProductService;
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得物料大类分页")
|
||||||
|
public CommonResult<PageResult<MaterialProductRespVO>> getMaterialInventoryPage(@Valid MaterialProductPageReqVO pageReqVO) {
|
||||||
|
// 需要库存数量和预警信息
|
||||||
|
PageResult<MaterialProductRespVO> pageResult = materialProductService.getMaterialInventoryPage(pageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.admin;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||||
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundPageReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundRespVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundSaveReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryInboundDO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialInventoryInboundService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 物料入库")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/resource/material-inventory-inbound")
|
||||||
|
@Validated
|
||||||
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
|
public class MaterialInventoryInboundController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialInventoryInboundService materialInventoryInboundService;
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@Operation(summary = "物料入库")
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound:create')")
|
||||||
|
public CommonResult<MaterialInventoryInboundRespVO> createMaterialInventoryInbound(@Valid @RequestBody MaterialInventoryInboundSaveReqVO createReqVO) {
|
||||||
|
return success(materialInventoryInboundService.createMaterialInventoryInbound(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除入库")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialInventoryInbound(@RequestParam("id") Long id) {
|
||||||
|
materialInventoryInboundService.deleteMaterialInventoryInbound(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除入库")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialInventoryInboundList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
materialInventoryInboundService.deleteMaterialInventoryInboundListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得入库")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound:query')")
|
||||||
|
public CommonResult<MaterialInventoryInboundRespVO> getMaterialInventoryInbound(@RequestParam("id") Long id) {
|
||||||
|
MaterialInventoryInboundDO materialInventoryInbound = materialInventoryInboundService.getMaterialInventoryInbound(id);
|
||||||
|
return success(BeanUtils.toBean(materialInventoryInbound, MaterialInventoryInboundRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得入库分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound:query')")
|
||||||
|
public CommonResult<PageResult<MaterialInventoryInboundRespVO>> getMaterialInventoryInboundPage(@Valid MaterialInventoryInboundPageReqVO pageReqVO) {
|
||||||
|
PageResult<MaterialInventoryInboundDO> pageResult = materialInventoryInboundService.getMaterialInventoryInboundPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, MaterialInventoryInboundRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出入库 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportMaterialInventoryInboundExcel(@Valid MaterialInventoryInboundPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<MaterialInventoryInboundDO> list = materialInventoryInboundService.getMaterialInventoryInboundPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "入库.xls", "数据", MaterialInventoryInboundRespVO.class,
|
||||||
|
BeanUtils.toBean(list, MaterialInventoryInboundRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.admin;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundDetailPageReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundDetailRespVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryInboundDetailSaveReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryInboundDetailDO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialInventoryInboundDetailService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 入库明细,验收入库、盘盈入库等")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/resource/material-inventory-inbound-detail")
|
||||||
|
@Validated
|
||||||
|
public class MaterialInventoryInboundDetailController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialInventoryInboundDetailService materialInventoryInboundDetailService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建入库明细,验收入库、盘盈入库等")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:create')")
|
||||||
|
public CommonResult<MaterialInventoryInboundDetailRespVO> createMaterialInventoryInboundDetail(@Valid @RequestBody MaterialInventoryInboundDetailSaveReqVO createReqVO) {
|
||||||
|
return success(materialInventoryInboundDetailService.createMaterialInventoryInboundDetail(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新入库明细,验收入库、盘盈入库等")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialInventoryInboundDetail(@Valid @RequestBody MaterialInventoryInboundDetailSaveReqVO updateReqVO) {
|
||||||
|
materialInventoryInboundDetailService.updateMaterialInventoryInboundDetail(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除入库明细,验收入库、盘盈入库等")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialInventoryInboundDetail(@RequestParam("id") Long id) {
|
||||||
|
materialInventoryInboundDetailService.deleteMaterialInventoryInboundDetail(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除入库明细,验收入库、盘盈入库等")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialInventoryInboundDetailList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
materialInventoryInboundDetailService.deleteMaterialInventoryInboundDetailListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得入库明细,验收入库、盘盈入库等")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:query')")
|
||||||
|
public CommonResult<MaterialInventoryInboundDetailRespVO> getMaterialInventoryInboundDetail(@RequestParam("id") Long id) {
|
||||||
|
MaterialInventoryInboundDetailDO materialInventoryInboundDetail = materialInventoryInboundDetailService.getMaterialInventoryInboundDetail(id);
|
||||||
|
return success(BeanUtils.toBean(materialInventoryInboundDetail, MaterialInventoryInboundDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得入库明细,验收入库、盘盈入库等分页")
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:query')")
|
||||||
|
public CommonResult<PageResult<MaterialInventoryInboundDetailRespVO>> getMaterialInventoryInboundDetailPage(@Valid MaterialInventoryInboundDetailPageReqVO pageReqVO) {
|
||||||
|
PageResult<MaterialInventoryInboundDetailDO> pageResult = materialInventoryInboundDetailService.getMaterialInventoryInboundDetailPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, MaterialInventoryInboundDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出入库明细,验收入库、盘盈入库等 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportMaterialInventoryInboundDetailExcel(@Valid MaterialInventoryInboundDetailPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<MaterialInventoryInboundDetailDO> list = materialInventoryInboundDetailService.getMaterialInventoryInboundDetailPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "入库明细,验收入库、盘盈入库等.xls", "数据", MaterialInventoryInboundDetailRespVO.class,
|
||||||
|
BeanUtils.toBean(list, MaterialInventoryInboundDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.admin;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||||
|
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||||
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialLifecycleDO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialBatchService;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialLifecycleService;
|
||||||
|
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
|
||||||
|
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 物料通用流程,物料验收、退换货")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/resource/material-lifecycle")
|
||||||
|
@Validated
|
||||||
|
@FileUploadController(source = "resource.materiallifecycle")
|
||||||
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
|
public class MaterialLifecycleController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||||
|
|
||||||
|
static {
|
||||||
|
FileUploadController annotation = MaterialLifecycleController.class.getAnnotation(FileUploadController.class);
|
||||||
|
if (annotation != null) {
|
||||||
|
setFileUploadInfo(annotation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialLifecycleService materialLifecycleService;
|
||||||
|
|
||||||
|
// QMS_RESOURCE_MATERIAL_COMMON
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "新建物料流程")
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:create')")
|
||||||
|
public CommonResult<MaterialLifecycleRespVO> createMaterialLifecycle(@Validated(AddGroup.class) @RequestBody MaterialLifecycleSaveReqVO createReqVO) {
|
||||||
|
return success(materialLifecycleService.createMaterialLifecycle(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新物料流程")
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialLifecycle(@Validated(UpdateGroup.class) @RequestBody MaterialLifecycleSaveReqVO updateReqVO) {
|
||||||
|
materialLifecycleService.updateMaterialLifecycle(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除物料流程")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialLifecycle(@RequestParam("id") Long id) {
|
||||||
|
materialLifecycleService.deleteMaterialLifecycle(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除物料流程")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialLifecycleList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
materialLifecycleService.deleteMaterialLifecycleListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得物料流程")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:query')")
|
||||||
|
public CommonResult<MaterialLifecycleRespVO> getMaterialLifecycle(@RequestParam("id") Long id) {
|
||||||
|
MaterialLifecycleRespVO lifecycleRespVO = materialLifecycleService.getMaterialLifecycle(id);
|
||||||
|
return success(lifecycleRespVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得物料流程分页")
|
||||||
|
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:query')")
|
||||||
|
public CommonResult<PageResult<MaterialLifecycleRespVO>> getMaterialLifecyclePage(@Valid MaterialLifecyclePageReqVO pageReqVO) {
|
||||||
|
PageResult<MaterialLifecycleDO> pageResult = materialLifecycleService.getMaterialLifecyclePage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, MaterialLifecycleRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/submit")
|
||||||
|
@Operation(summary = "提交(验收等流程)")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
public CommonResult<Boolean> submitLifecycle(@RequestParam("id") Long id) {
|
||||||
|
|
||||||
|
return success(materialLifecycleService.submitLifecycle(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出物料通用流程,物料验收、退换货 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:material-lifecycle:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportMaterialLifecycleExcel(@Valid MaterialLifecyclePageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<MaterialLifecycleDO> list = materialLifecycleService.getMaterialLifecyclePage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "物料通用流程,物料验收、退换货.xls", "数据", MaterialLifecycleRespVO.class,
|
||||||
|
BeanUtils.toBean(list, MaterialLifecycleRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.admin;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialLifecycleDetailPageReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialLifecycleDetailRespVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialLifecycleDetailSaveReqVO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialLifecycleDetailDO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialLifecycleDetailService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 物料通用流程明细")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/t/material-lifecycle-detail")
|
||||||
|
@Validated
|
||||||
|
public class MaterialLifecycleDetailController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialLifecycleDetailService materialLifecycleDetailService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建物料通用流程明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:create')")
|
||||||
|
public CommonResult<MaterialLifecycleDetailRespVO> createMaterialLifecycleDetail(@Valid @RequestBody MaterialLifecycleDetailSaveReqVO createReqVO) {
|
||||||
|
return success(materialLifecycleDetailService.createMaterialLifecycleDetail(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新物料通用流程明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialLifecycleDetail(@Valid @RequestBody MaterialLifecycleDetailSaveReqVO updateReqVO) {
|
||||||
|
materialLifecycleDetailService.updateMaterialLifecycleDetail(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除物料通用流程明细")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialLifecycleDetail(@RequestParam("id") Long id) {
|
||||||
|
materialLifecycleDetailService.deleteMaterialLifecycleDetail(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除物料通用流程明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialLifecycleDetailList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
materialLifecycleDetailService.deleteMaterialLifecycleDetailListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得物料通用流程明细")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:query')")
|
||||||
|
public CommonResult<MaterialLifecycleDetailRespVO> getMaterialLifecycleDetail(@RequestParam("id") Long id) {
|
||||||
|
MaterialLifecycleDetailDO materialLifecycleDetail = materialLifecycleDetailService.getMaterialLifecycleDetail(id);
|
||||||
|
return success(BeanUtils.toBean(materialLifecycleDetail, MaterialLifecycleDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得物料通用流程明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:query')")
|
||||||
|
public CommonResult<PageResult<MaterialLifecycleDetailRespVO>> getMaterialLifecycleDetailPage(@Valid MaterialLifecycleDetailPageReqVO pageReqVO) {
|
||||||
|
PageResult<MaterialLifecycleDetailDO> pageResult = materialLifecycleDetailService.getMaterialLifecycleDetailPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, MaterialLifecycleDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出物料通用流程明细 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('t:material-lifecycle-detail:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportMaterialLifecycleDetailExcel(@Valid MaterialLifecycleDetailPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<MaterialLifecycleDetailDO> list = materialLifecycleDetailService.getMaterialLifecycleDetailPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "物料通用流程明细.xls", "数据", MaterialLifecycleDetailRespVO.class,
|
||||||
|
BeanUtils.toBean(list, MaterialLifecycleDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
|
|||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialProductPageReqVO;
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialProductPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialProductRespVO;
|
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialProductRespVO;
|
||||||
@@ -36,6 +37,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
|||||||
@RequestMapping("/qms/resource/material-product")
|
@RequestMapping("/qms/resource/material-product")
|
||||||
@Validated
|
@Validated
|
||||||
@FileUploadController(source = "resource.materialproduct")
|
@FileUploadController(source = "resource.materialproduct")
|
||||||
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
public class MaterialProductController extends AbstractFileUploadController implements BusinessControllerMarker{
|
public class MaterialProductController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -62,11 +64,12 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
|||||||
return success(materialProductService.getMaterialCategoryTree());
|
return success(materialProductService.getMaterialCategoryTree());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO 后边再对接
|
||||||
@GetMapping("/orig-material/{code}")
|
@GetMapping("/orig-material/{code}")
|
||||||
@Operation(summary = "根据物料编码获取外部系统原始物料")
|
@Operation(summary = "根据物料编码获取外部系统原始物料")
|
||||||
public CommonResult<Object> getOriginalMaterial(@PathVariable String code) {
|
public CommonResult<MaterialProductRespVO> getOriginalMaterial(@PathVariable String code) {
|
||||||
return null;
|
|
||||||
|
return success(new MaterialProductRespVO().setCode(code).setName("测试物料"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/save-material")
|
@PostMapping("/save-material")
|
||||||
@@ -84,6 +87,13 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
|||||||
return success(BeanUtils.toBean(pageResult, MaterialProductRespVO.class));
|
return success(BeanUtils.toBean(pageResult, MaterialProductRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("category-data")
|
||||||
|
@Operation(summary = "获得物料分类和大类")
|
||||||
|
@Parameter(name = "type", description = "category-分类,data-全部")
|
||||||
|
public CommonResult<List<MaterialProductRespVO>> getCategoryAndData(@RequestParam("type") String type) {
|
||||||
|
return success(materialProductService.getCategoryAndData(type));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// @PutMapping("/update")
|
// @PutMapping("/update")
|
||||||
// @Operation(summary = "更新物料")
|
// @Operation(summary = "更新物料")
|
||||||
@@ -104,7 +114,7 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
|||||||
|
|
||||||
@DeleteMapping("/delete-list")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除物料")
|
@Operation(summary = "批量删除物料大类")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:material-product:delete')")
|
@PreAuthorize("@ss.hasPermission('qms:material-product:delete')")
|
||||||
public CommonResult<Boolean> deleteMaterialProductList(@RequestBody BatchDeleteReqVO req) {
|
public CommonResult<Boolean> deleteMaterialProductList(@RequestBody BatchDeleteReqVO req) {
|
||||||
materialProductService.deleteMaterialProductListByIds(req.getIds());
|
materialProductService.deleteMaterialProductListByIds(req.getIds());
|
||||||
@@ -114,9 +124,9 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得物料")
|
@Operation(summary = "获得物料")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:material-product:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:material-product:query')")
|
||||||
public CommonResult<MaterialProductRespVO> getMaterialProduct(@RequestParam("id") Long id) {
|
public CommonResult<MaterialProductRespVO> getMaterialProduct(@RequestParam("id") Long id) {
|
||||||
MaterialProductDO materialProduct = materialProductService.getMaterialProduct(id);
|
MaterialProductDO materialProduct = materialProductService.getMaterialProductInfo(id);
|
||||||
return success(BeanUtils.toBean(materialProduct, MaterialProductRespVO.class));
|
return success(BeanUtils.toBean(materialProduct, MaterialProductRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,15 @@ public class MaterialBatchPageReqVO extends PageParam {
|
|||||||
@Schema(description = "物料大类id", example = "9381")
|
@Schema(description = "物料大类id", example = "9381")
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
|
@Schema(description = "是否需要组装 children")
|
||||||
|
private Boolean children = false;
|
||||||
|
|
||||||
|
@Schema(description = "是否只需要工段")
|
||||||
|
private Boolean onlyGong = false;
|
||||||
|
|
||||||
|
@Schema(description = "true-已处理,false-未处理")
|
||||||
|
private Boolean treatment = false;
|
||||||
|
|
||||||
@Schema(description = "批次编号")
|
@Schema(description = "批次编号")
|
||||||
private String batchNo;
|
private String batchNo;
|
||||||
|
|
||||||
@@ -51,7 +60,7 @@ public class MaterialBatchPageReqVO extends PageParam {
|
|||||||
@Schema(description = "是否检化验,1-是,0-否")
|
@Schema(description = "是否检化验,1-是,0-否")
|
||||||
private Integer assayFlag;
|
private Integer assayFlag;
|
||||||
|
|
||||||
@Schema(description = "检化验状态,NOT_STARTED-未开始,IN_PROGRESS-进行中,PASSED-通过,NOT_PASSED-未通过", example = "2")
|
@Schema(description = "检化验状态,未开始,进行中,通过,未通过", example = "2")
|
||||||
private String assayStatus;
|
private String assayStatus;
|
||||||
|
|
||||||
// @Schema(description = "检化验结果")
|
// @Schema(description = "检化验结果")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@@ -7,6 +8,8 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.*;
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 物料批次 Response VO")
|
@Schema(description = "管理后台 - 物料批次 Response VO")
|
||||||
@@ -26,6 +29,18 @@ public class MaterialBatchRespVO {
|
|||||||
@ExcelProperty("物料大类id")
|
@ExcelProperty("物料大类id")
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类名称")
|
||||||
|
@ExcelProperty("物料大类名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类编码")
|
||||||
|
@ExcelProperty("物料大类编码")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类型号")
|
||||||
|
@ExcelProperty("物料大类型号")
|
||||||
|
private String productModelNo;
|
||||||
|
|
||||||
@Schema(description = "批次编号")
|
@Schema(description = "批次编号")
|
||||||
@ExcelProperty("批次编号")
|
@ExcelProperty("批次编号")
|
||||||
private String batchNo;
|
private String batchNo;
|
||||||
@@ -34,6 +49,10 @@ public class MaterialBatchRespVO {
|
|||||||
@ExcelProperty("总数量")
|
@ExcelProperty("总数量")
|
||||||
private BigDecimal inboundQuantity;
|
private BigDecimal inboundQuantity;
|
||||||
|
|
||||||
|
@Schema(description = "已入库数量")
|
||||||
|
@ExcelProperty("已入库数量")
|
||||||
|
private BigDecimal inboundEndQuantity;
|
||||||
|
|
||||||
@Schema(description = "存放位置描述")
|
@Schema(description = "存放位置描述")
|
||||||
@ExcelProperty("存放位置描述")
|
@ExcelProperty("存放位置描述")
|
||||||
private String location;
|
private String location;
|
||||||
@@ -44,11 +63,11 @@ public class MaterialBatchRespVO {
|
|||||||
|
|
||||||
@Schema(description = "生产日期")
|
@Schema(description = "生产日期")
|
||||||
@ExcelProperty("生产日期")
|
@ExcelProperty("生产日期")
|
||||||
private LocalDate manufacturerDate;
|
private LocalDateTime manufacturerDate;
|
||||||
|
|
||||||
@Schema(description = "到期日期")
|
@Schema(description = "到期日期")
|
||||||
@ExcelProperty("到期日期")
|
@ExcelProperty("到期日期")
|
||||||
private LocalDate dueDate;
|
private LocalDateTime dueDate;
|
||||||
|
|
||||||
@Schema(description = "分配部门id")
|
@Schema(description = "分配部门id")
|
||||||
@ExcelProperty("分配部门id")
|
@ExcelProperty("分配部门id")
|
||||||
@@ -58,6 +77,10 @@ public class MaterialBatchRespVO {
|
|||||||
@ExcelProperty("分配部门名称")
|
@ExcelProperty("分配部门名称")
|
||||||
private String assignDepartmentName;
|
private String assignDepartmentName;
|
||||||
|
|
||||||
|
@Schema(description = "提交状态,0-未提交,1-已提交", example = "1")
|
||||||
|
@ExcelProperty("提交状态,0-未提交,1-已提交")
|
||||||
|
private Integer submitStatus;
|
||||||
|
|
||||||
@Schema(description = "验收状态", example = "1")
|
@Schema(description = "验收状态", example = "1")
|
||||||
@ExcelProperty("验收状态")
|
@ExcelProperty("验收状态")
|
||||||
private String acceptanceStatus;
|
private String acceptanceStatus;
|
||||||
@@ -86,4 +109,7 @@ public class MaterialBatchRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "子批次-工段")
|
||||||
|
private List<MaterialBatchRespVO> children;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
|
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
|
||||||
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
|
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -10,13 +11,14 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 物料批次新增/修改 Request VO")
|
@Schema(description = "管理后台 - 物料批次新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class MaterialBatchSaveReqVO {
|
public class MaterialBatchSaveReqVO {
|
||||||
|
|
||||||
@Null(groups = AddGroup.class, message = "新增数据 ID 必须为空")
|
@Null(groups = AddGroup.class, message = "新增操作 id必须为空")
|
||||||
@NotNull(groups = UpdateGroup.class, message = "修改数据 ID 不能为空")
|
@NotNull(groups = UpdateGroup.class, message = "修改操作 id不能为空")
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9716")
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9716")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -43,10 +45,10 @@ public class MaterialBatchSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "生产日期")
|
@Schema(description = "生产日期")
|
||||||
@NotNull(groups = AddGroup.class, message = "生产日期不能为空")
|
@NotNull(groups = AddGroup.class, message = "生产日期不能为空")
|
||||||
private LocalDate manufacturerDate;
|
private LocalDateTime manufacturerDate;
|
||||||
|
|
||||||
@Schema(description = "到期日期")
|
@Schema(description = "到期日期")
|
||||||
private LocalDate dueDate;
|
private LocalDateTime dueDate;
|
||||||
|
|
||||||
@Schema(description = "分配部门id")
|
@Schema(description = "分配部门id")
|
||||||
private Long assignDepartmentId;
|
private Long assignDepartmentId;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import com.zt.plat.framework.common.pojo.PageParam;
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
@@ -26,6 +27,9 @@ public class MaterialInfomationPageReqVO extends PageParam {
|
|||||||
@Schema(description = "编码")
|
@Schema(description = "编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "技术参数")
|
@Schema(description = "技术参数")
|
||||||
private String parameter;
|
private String parameter;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@@ -33,6 +34,10 @@ public class MaterialInfomationRespVO {
|
|||||||
@ExcelProperty("编码")
|
@ExcelProperty("编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "名称")
|
||||||
|
@ExcelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "技术参数")
|
@Schema(description = "技术参数")
|
||||||
@ExcelProperty("技术参数")
|
@ExcelProperty("技术参数")
|
||||||
private String parameter;
|
private String parameter;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.Data;
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -27,6 +25,9 @@ public class MaterialInfomationSaveReqVO {
|
|||||||
@Schema(description = "编码")
|
@Schema(description = "编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "技术参数")
|
@Schema(description = "技术参数")
|
||||||
private String parameter;
|
private String parameter;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 入库明细,验收入库、盘盈入库等分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialInventoryInboundDetailPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "入库单ID", example = "30205")
|
||||||
|
private Long inboundId;
|
||||||
|
|
||||||
|
@Schema(description = "批次id", example = "16666")
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id", example = "1454")
|
||||||
|
private Long batchGongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "物料实例ID", example = "17457")
|
||||||
|
private Long materialInfomationId;
|
||||||
|
|
||||||
|
@Schema(description = "入库人", example = "赵六")
|
||||||
|
private String inboundUserName;
|
||||||
|
|
||||||
|
@Schema(description = "入库人id", example = "6313")
|
||||||
|
private Long inboundUserId;
|
||||||
|
|
||||||
|
@Schema(description = "入库人部门", example = "张三")
|
||||||
|
private String inboundDepartmentName;
|
||||||
|
|
||||||
|
@Schema(description = "入库人部门id", example = "10963")
|
||||||
|
private Long inboundDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "入库时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] inboundTime;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 入库明细,验收入库、盘盈入库等 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MaterialInventoryInboundDetailRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31154")
|
||||||
|
@ExcelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "入库单ID", example = "30205")
|
||||||
|
@ExcelProperty("入库单ID")
|
||||||
|
private Long inboundId;
|
||||||
|
|
||||||
|
@Schema(description = "批次id", example = "16666")
|
||||||
|
@ExcelProperty("批次id")
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
// 物料名称
|
||||||
|
|
||||||
|
// 批次编号
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id", example = "1454")
|
||||||
|
@ExcelProperty("批次工段id")
|
||||||
|
private Long batchGongduanId;
|
||||||
|
|
||||||
|
// 工段名
|
||||||
|
|
||||||
|
@Schema(description = "物料实例ID", example = "17457")
|
||||||
|
@ExcelProperty("物料实例ID")
|
||||||
|
private Long materialInfomationId;
|
||||||
|
|
||||||
|
@Schema(description = "入库人", example = "赵六")
|
||||||
|
@ExcelProperty("入库人")
|
||||||
|
private String inboundUserName;
|
||||||
|
|
||||||
|
@Schema(description = "入库人id", example = "6313")
|
||||||
|
@ExcelProperty("入库人id")
|
||||||
|
private Long inboundUserId;
|
||||||
|
|
||||||
|
@Schema(description = "入库人部门", example = "张三")
|
||||||
|
@ExcelProperty("入库人部门")
|
||||||
|
private String inboundDepartmentName;
|
||||||
|
|
||||||
|
@Schema(description = "入库人部门id", example = "10963")
|
||||||
|
@ExcelProperty("入库人部门id")
|
||||||
|
private Long inboundDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "入库时间")
|
||||||
|
@ExcelProperty("入库时间")
|
||||||
|
private LocalDateTime inboundTime;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 入库明细,验收入库、盘盈入库等新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialInventoryInboundDetailSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31154")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "入库单ID", example = "30205")
|
||||||
|
private Long inboundId;
|
||||||
|
|
||||||
|
@Schema(description = "批次id", example = "16666")
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id", example = "1454")
|
||||||
|
private Long batchGongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "物料实例ID", example = "17457")
|
||||||
|
private Long materialInfomationId;
|
||||||
|
|
||||||
|
@Schema(description = "入库人", example = "赵六")
|
||||||
|
private String inboundUserName;
|
||||||
|
|
||||||
|
@Schema(description = "入库人id", example = "6313")
|
||||||
|
private Long inboundUserId;
|
||||||
|
|
||||||
|
@Schema(description = "入库人部门", example = "张三")
|
||||||
|
private String inboundDepartmentName;
|
||||||
|
|
||||||
|
@Schema(description = "入库人部门id", example = "10963")
|
||||||
|
private Long inboundDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "入库时间")
|
||||||
|
private LocalDateTime inboundTime;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 入库分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialInventoryInboundPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型,【字典】【jy_material_in_bsn_type】验收入库、盘盈入库等", example = "2")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型编码")
|
||||||
|
private String businessTypeCode;
|
||||||
|
|
||||||
|
@Schema(description = "申请人")
|
||||||
|
private String applyUser;
|
||||||
|
|
||||||
|
@Schema(description = "申请人id", example = "18778")
|
||||||
|
private Long applyUserId;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门id", example = "29535")
|
||||||
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "申请时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] applyTime;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例id", example = "16660")
|
||||||
|
private String flowInstanceId;
|
||||||
|
|
||||||
|
@Schema(description = "流程审批状态", example = "1")
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
@Schema(description = "意见json")
|
||||||
|
private String commentJson;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 入库 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MaterialInventoryInboundRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3584")
|
||||||
|
@ExcelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "标题")
|
||||||
|
@ExcelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型,【字典】【jy_material_in_bsn_type】验收入库、盘盈入库等", example = "2")
|
||||||
|
@ExcelProperty("业务类型,【字典】【jy_material_in_bsn_type】验收入库、盘盈入库等")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型编码")
|
||||||
|
@ExcelProperty("业务类型编码")
|
||||||
|
private String businessTypeCode;
|
||||||
|
|
||||||
|
@Schema(description = "申请人")
|
||||||
|
@ExcelProperty("申请人")
|
||||||
|
private String applyUser;
|
||||||
|
|
||||||
|
@Schema(description = "申请人id", example = "18778")
|
||||||
|
@ExcelProperty("申请人id")
|
||||||
|
private Long applyUserId;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门")
|
||||||
|
@ExcelProperty("申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门id", example = "29535")
|
||||||
|
@ExcelProperty("申请部门id")
|
||||||
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "申请时间")
|
||||||
|
@ExcelProperty("申请时间")
|
||||||
|
private LocalDateTime applyTime;
|
||||||
|
|
||||||
|
@Schema(description = "监督人,危化品才有")
|
||||||
|
@ExcelProperty("监督人,危化品才有")
|
||||||
|
private String superviseUser;
|
||||||
|
|
||||||
|
@Schema(description = "监督人id,危化品才有")
|
||||||
|
@ExcelProperty("监督人id,危化品才有")
|
||||||
|
private Long superviseUserId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id")
|
||||||
|
@ExcelProperty("批次工段id")
|
||||||
|
private Long gongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "入库数量")
|
||||||
|
@ExcelProperty("入库数量")
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
@Schema(description = "库位id")
|
||||||
|
@ExcelProperty("库位id")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例id", example = "16660")
|
||||||
|
@ExcelProperty("流程实例id")
|
||||||
|
private String flowInstanceId;
|
||||||
|
|
||||||
|
@Schema(description = "流程审批状态", example = "1")
|
||||||
|
@ExcelProperty("流程审批状态")
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
@Schema(description = "意见json")
|
||||||
|
@ExcelProperty("意见json")
|
||||||
|
private String commentJson;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 入库新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialInventoryInboundSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3584")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型,【字典】【jy_material_in_bsn_type】验收入库、盘盈入库等", example = "2")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型编码")
|
||||||
|
private String businessTypeCode;
|
||||||
|
|
||||||
|
@Schema(description = "申请人")
|
||||||
|
private String applyUser;
|
||||||
|
|
||||||
|
@Schema(description = "申请人id", example = "18778")
|
||||||
|
private Long applyUserId;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门id", example = "29535")
|
||||||
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "申请时间")
|
||||||
|
private LocalDateTime applyTime;
|
||||||
|
|
||||||
|
@Schema(description = "监督人,危化品才有")
|
||||||
|
private String superviseUser;
|
||||||
|
|
||||||
|
@Schema(description = "监督人id,危化品才有")
|
||||||
|
private Long superviseUserId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id")
|
||||||
|
private Long gongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "入库数量")
|
||||||
|
@Min(value = 0, message = "入库数量不能小于0")
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
@Schema(description = "库位id")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例id", example = "16660")
|
||||||
|
private String flowInstanceId;
|
||||||
|
|
||||||
|
@Schema(description = "流程审批状态", example = "1")
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
@Schema(description = "意见json")
|
||||||
|
private String commentJson;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料通用流程明细分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialLifecycleDetailPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "父id", example = "6294")
|
||||||
|
private Long materialLifecycleId;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类id", example = "31283")
|
||||||
|
private String categoryProductId;
|
||||||
|
|
||||||
|
@Schema(description = "物料批次id", example = "12948")
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id", example = "21334")
|
||||||
|
private Long batchGongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "物料实例id", example = "968")
|
||||||
|
private Long infomationId;
|
||||||
|
|
||||||
|
@Schema(description = "影响数量", example = "15772")
|
||||||
|
private String influenceCount;
|
||||||
|
|
||||||
|
@Schema(description = "明细操作类型,【字典】【jy_material_lifecycle_detail_bsn_type】", example = "1")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "处理状态,0未处理,1已处理", example = "2")
|
||||||
|
private Integer treatmentStatus;
|
||||||
|
|
||||||
|
@Schema(description = "表单数据,表单数据")
|
||||||
|
private String formData;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料通用流程明细 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MaterialLifecycleDetailRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6130")
|
||||||
|
@ExcelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "父id", example = "6294")
|
||||||
|
@ExcelProperty("父id")
|
||||||
|
private Long lifecycleId;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "物料大类id", example = "31283")
|
||||||
|
@ExcelProperty("物料大类id")
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类名称")
|
||||||
|
@ExcelProperty("物料大类名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类编码")
|
||||||
|
@ExcelProperty("物料大类编码")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类型号")
|
||||||
|
@ExcelProperty("物料大类型号")
|
||||||
|
private String productModelNo;
|
||||||
|
|
||||||
|
@Schema(description = "物料批次id", example = "12948")
|
||||||
|
@ExcelProperty("物料批次id")
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
@Schema(description = "物料批次号")
|
||||||
|
@ExcelProperty("物料批次号")
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id", example = "21334")
|
||||||
|
@ExcelProperty("批次工段id")
|
||||||
|
private Long batchGongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段-部门名称")
|
||||||
|
@ExcelProperty("批次工段-部门名称")
|
||||||
|
private String assignDepartmentName;
|
||||||
|
|
||||||
|
@Schema(description = "是否检化验,1-是,0-否")
|
||||||
|
@ExcelProperty("是否检化验,1-是,0-否")
|
||||||
|
private Integer assayFlag;
|
||||||
|
|
||||||
|
@Schema(description = "物料实例id", example = "968")
|
||||||
|
@ExcelProperty("物料实例id")
|
||||||
|
private Long infomationId;
|
||||||
|
|
||||||
|
@Schema(description = "影响数量", example = "15772")
|
||||||
|
@ExcelProperty("影响数量")
|
||||||
|
private String influenceCount;
|
||||||
|
|
||||||
|
@Schema(description = "明细操作类型,【字典】【jy_material_lifecycle_detail_bsn_type】", example = "1")
|
||||||
|
@ExcelProperty("明细操作类型,【字典】【jy_material_lifecycle_detail_bsn_type】")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "处理状态,0未处理,1已处理", example = "2")
|
||||||
|
@ExcelProperty("处理状态,0未处理,1已处理")
|
||||||
|
private Integer treatmentStatus;
|
||||||
|
|
||||||
|
@Schema(description = "表单数据,表单数据")
|
||||||
|
@ExcelProperty("表单数据,表单数据")
|
||||||
|
private String formData;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料通用流程明细新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialLifecycleDetailSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6130")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "父id", example = "6294")
|
||||||
|
private Long lifecycleId;
|
||||||
|
|
||||||
|
@Schema(description = "物料大类id", example = "31283")
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
@Schema(description = "物料批次id", example = "12948")
|
||||||
|
private Long batchId;
|
||||||
|
|
||||||
|
@Schema(description = "批次工段id", example = "21334")
|
||||||
|
private Long batchGongduanId;
|
||||||
|
|
||||||
|
@Schema(description = "是否检化验,1-是,0-否")
|
||||||
|
private Integer assayFlag;
|
||||||
|
|
||||||
|
@Schema(description = "物料实例id", example = "968")
|
||||||
|
private Long infomationId;
|
||||||
|
|
||||||
|
@Schema(description = "影响数量", example = "15772")
|
||||||
|
private String influenceCount;
|
||||||
|
|
||||||
|
@Schema(description = "明细操作类型,【字典】【jy_material_lifecycle_detail_bsn_type】", example = "1")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "处理状态,0未处理,1已处理", example = "2")
|
||||||
|
private Integer treatmentStatus;
|
||||||
|
|
||||||
|
@Schema(description = "表单数据,表单数据")
|
||||||
|
private String formData;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料通用流程,物料验收、退换货分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialLifecyclePageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型,【字典】【jy_material_lifecycle_bsn_type】验收、退换货、配置申请", example = "2")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型编码")
|
||||||
|
private String businessTypeCode;
|
||||||
|
|
||||||
|
@Schema(description = "申请人")
|
||||||
|
private String applyUser;
|
||||||
|
|
||||||
|
@Schema(description = "申请人id", example = "4976")
|
||||||
|
private Long applyUserId;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门id", example = "19765")
|
||||||
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "申请时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] applyTime;
|
||||||
|
|
||||||
|
@Schema(description = "表单数据,表单数据")
|
||||||
|
private String formData;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例id", example = "12151")
|
||||||
|
private String flowInstanceId;
|
||||||
|
|
||||||
|
@Schema(description = "提交状态,0-未提交,1-已提交", example = "1")
|
||||||
|
private Integer submitStatus;
|
||||||
|
|
||||||
|
@Schema(description = "流程审批状态", example = "1")
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料通用流程,物料验收、退换货 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MaterialLifecycleRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7663")
|
||||||
|
@ExcelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "标题")
|
||||||
|
@ExcelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型,【字典】【jy_material_lifecycle_bsn_type】验收、退换货、配置申请", example = "2")
|
||||||
|
@ExcelProperty("业务类型,【字典】【jy_material_lifecycle_bsn_type】验收、退换货、配置申请")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型编码")
|
||||||
|
@ExcelProperty("业务类型编码")
|
||||||
|
private String businessTypeCode;
|
||||||
|
|
||||||
|
@Schema(description = "申请人")
|
||||||
|
@ExcelProperty("申请人")
|
||||||
|
private String applyUser;
|
||||||
|
|
||||||
|
@Schema(description = "申请人id", example = "4976")
|
||||||
|
@ExcelProperty("申请人id")
|
||||||
|
private Long applyUserId;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门")
|
||||||
|
@ExcelProperty("申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门id", example = "19765")
|
||||||
|
@ExcelProperty("申请部门id")
|
||||||
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "申请时间")
|
||||||
|
@ExcelProperty("申请时间")
|
||||||
|
private LocalDateTime applyTime;
|
||||||
|
|
||||||
|
@Schema(description = "表单数据,表单数据")
|
||||||
|
@ExcelProperty("表单数据,表单数据")
|
||||||
|
private String formData;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例id", example = "12151")
|
||||||
|
@ExcelProperty("流程实例id")
|
||||||
|
private String flowInstanceId;
|
||||||
|
|
||||||
|
@Schema(description = "提交状态,提交状态,0-未提交,1-已提交", example = "1")
|
||||||
|
@ExcelProperty("提交状态,提交状态,0-未提交,1-已提交")
|
||||||
|
private Integer submitStatus;
|
||||||
|
|
||||||
|
@Schema(description = "流程审批状态", example = "1")
|
||||||
|
@ExcelProperty("流程审批状态")
|
||||||
|
@Dict(dicCode = "flow_status")
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "流程明细")
|
||||||
|
@ExcelProperty("流程明细")
|
||||||
|
private List<MaterialLifecycleDetailRespVO> detailList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
|
||||||
|
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Null;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料通用流程,物料验收、退换货新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialLifecycleSaveReqVO {
|
||||||
|
|
||||||
|
@Null(groups = AddGroup.class, message = "新增操作 id必须为空")
|
||||||
|
@NotNull(groups = UpdateGroup.class, message = "修改操作 id不能为空")
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7663")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型,【字典】【jy_material_lifecycle_bsn_type】验收、退换货、配置申请", example = "2")
|
||||||
|
@NotNull(groups = AddGroup.class, message = "业务类型不能为空")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型编码")
|
||||||
|
private String businessTypeCode;
|
||||||
|
|
||||||
|
@Schema(description = "申请人")
|
||||||
|
private String applyUser;
|
||||||
|
|
||||||
|
@Schema(description = "申请人id", example = "4976")
|
||||||
|
private Long applyUserId;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
|
|
||||||
|
@Schema(description = "申请部门id", example = "19765")
|
||||||
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "申请时间")
|
||||||
|
private LocalDateTime applyTime;
|
||||||
|
|
||||||
|
@Schema(description = "表单数据,表单数据")
|
||||||
|
private String formData;
|
||||||
|
|
||||||
|
// @Schema(description = "流程实例id", example = "12151")
|
||||||
|
// private String flowInstanceId;
|
||||||
|
|
||||||
|
// @Schema(description = "提交状态,提交状态,0-未提交,1-已提交", example = "1")
|
||||||
|
// private Integer submitStatus;
|
||||||
|
|
||||||
|
// @Schema(description = "流程审批状态", example = "1")
|
||||||
|
// private String flowStatus;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "工段列表")
|
||||||
|
private List<MaterialLifecycleDetailSaveReqVO> detailList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,9 +2,12 @@ package com.zt.plat.module.qms.resource.material.controller.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -21,6 +24,10 @@ public class MaterialProductRespVO {
|
|||||||
@ExcelProperty("父id")
|
@ExcelProperty("父id")
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
|
@Schema(description = "分类名称")
|
||||||
|
@ExcelProperty("分类名称")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
@Schema(description = "id路径")
|
@Schema(description = "id路径")
|
||||||
@ExcelProperty("id路径")
|
@ExcelProperty("id路径")
|
||||||
private String idPath;
|
private String idPath;
|
||||||
@@ -77,6 +84,10 @@ public class MaterialProductRespVO {
|
|||||||
@ExcelProperty("单位")
|
@ExcelProperty("单位")
|
||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
|
@Schema(description = "库存数量")
|
||||||
|
@ExcelProperty("库存数量")
|
||||||
|
private BigDecimal inventoryQuantity;
|
||||||
|
|
||||||
@Schema(description = "允许按量领取,1-领用时输入量,按量领取;0-领用时不能输入量,整个领走")
|
@Schema(description = "允许按量领取,1-领用时输入量,按量领取;0-领用时不能输入量,整个领走")
|
||||||
@ExcelProperty("允许按量领取,1-领用时输入量,按量领取;0-领用时不能输入量,整个领走")
|
@ExcelProperty("允许按量领取,1-领用时输入量,按量领取;0-领用时不能输入量,整个领走")
|
||||||
private Integer enablePartial;
|
private Integer enablePartial;
|
||||||
@@ -87,6 +98,7 @@ public class MaterialProductRespVO {
|
|||||||
|
|
||||||
@Schema(description = "开封后保质期是否变化,1-是,0-否")
|
@Schema(description = "开封后保质期是否变化,1-是,0-否")
|
||||||
@ExcelProperty("开封后保质期是否变化,1-是,0-否")
|
@ExcelProperty("开封后保质期是否变化,1-是,0-否")
|
||||||
|
@Dict(dicCode = "yes_or_no")
|
||||||
private Integer openDueFlag;
|
private Integer openDueFlag;
|
||||||
|
|
||||||
@Schema(description = "开封后保质期(天)")
|
@Schema(description = "开封后保质期(天)")
|
||||||
@@ -123,6 +135,7 @@ public class MaterialProductRespVO {
|
|||||||
|
|
||||||
@Schema(description = "是否进行库存预警,1-是,0-否")
|
@Schema(description = "是否进行库存预警,1-是,0-否")
|
||||||
@ExcelProperty("是否进行库存预警,1-是,0-否")
|
@ExcelProperty("是否进行库存预警,1-是,0-否")
|
||||||
|
@Dict(dicCode = "yes_or_no")
|
||||||
private Integer InventoryAlarmFlag;
|
private Integer InventoryAlarmFlag;
|
||||||
|
|
||||||
@Schema(description = "库存预警区间,json格式配置")
|
@Schema(description = "库存预警区间,json格式配置")
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ public class MaterialProductSaveReqVO {
|
|||||||
@Schema(description = "标签(预留的扩展字段)")
|
@Schema(description = "标签(预留的扩展字段)")
|
||||||
private String tag;
|
private String tag;
|
||||||
|
|
||||||
|
@Schema(description = "标签模板")
|
||||||
|
private String labelTemplateKey;
|
||||||
|
|
||||||
@Schema(description = "型号")
|
@Schema(description = "型号")
|
||||||
private String modelNo;
|
private String modelNo;
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
|
|||||||
@TableField("INB_QTY")
|
@TableField("INB_QTY")
|
||||||
private BigDecimal inboundQuantity;
|
private BigDecimal inboundQuantity;
|
||||||
/**
|
/**
|
||||||
|
* 已入库数量
|
||||||
|
*/
|
||||||
|
@TableField("INB_END_QTY")
|
||||||
|
private BigDecimal inboundEndQuantity;
|
||||||
|
/**
|
||||||
* 存放位置描述
|
* 存放位置描述
|
||||||
*/
|
*/
|
||||||
@TableField("LOC")
|
@TableField("LOC")
|
||||||
@@ -82,6 +87,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("ASN_DEPT_NAME")
|
@TableField("ASN_DEPT_NAME")
|
||||||
private String assignDepartmentName;
|
private String assignDepartmentName;
|
||||||
|
/**
|
||||||
|
* 提交状态,0-未提交,1-已提交
|
||||||
|
*/
|
||||||
|
@TableField("SBM_STS")
|
||||||
|
private Integer submitStatus;
|
||||||
/**
|
/**
|
||||||
* 验收状态
|
* 验收状态
|
||||||
*/
|
*/
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user