Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
shusir
2026-01-30 14:17:21 +08:00
17 changed files with 116 additions and 7 deletions

View File

@@ -57,13 +57,20 @@ 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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -51,6 +51,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;

View File

@@ -50,6 +50,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;

View File

@@ -62,6 +62,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;

View File

@@ -60,6 +60,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;

View File

@@ -2,7 +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.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")

View File

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

View File

@@ -56,6 +56,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 +78,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())

View File

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

View File

@@ -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);
} }

View File

@@ -1433,8 +1433,18 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
} }
} }
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.IN_PROGRESS);//表示为允许提交
businessAssayTaskMapper.updateById(businessAssayTaskDO);
}
} }

View File

@@ -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());

View File

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