委托单号根据配置来源于字段或生成规则生成
This commit is contained in:
@@ -136,4 +136,13 @@ public interface QmsCommonConstant {
|
|||||||
|
|
||||||
/** 平行 **/
|
/** 平行 **/
|
||||||
String ASSAY_TYPE_SINGLE_PARALLEL = "single_parallel";
|
String ASSAY_TYPE_SINGLE_PARALLEL = "single_parallel";
|
||||||
|
|
||||||
|
/** 配料 **/
|
||||||
|
String ASSAY_PROJECT_USAGE_INGREDIENT = "ingredient";
|
||||||
|
|
||||||
|
/** 报出 **/
|
||||||
|
String ASSAY_PROJECT_USAGE_REPORT = "report";
|
||||||
|
|
||||||
|
/** 配料和报出 **/
|
||||||
|
String ASSAY_PROJECT_USAGE_INGREDIENT_REPORT = "ingredient_report";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ public class BusinessAssayProjectDataPageReqVO extends PageParam {
|
|||||||
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", example = "19038")
|
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", example = "19038")
|
||||||
private Long dictionaryProjectId;
|
private Long dictionaryProjectId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "值")
|
@Schema(description = "值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ public class BusinessAssayProjectDataReqVO {
|
|||||||
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", example = "5352")
|
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", example = "5352")
|
||||||
private Long dictionaryProjectId;
|
private Long dictionaryProjectId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "值")
|
@Schema(description = "值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ public class BusinessAssayProjectDataRespVO {
|
|||||||
@ExcelProperty("检测项目字典ID,字典表【T_DIC_PRJ】")
|
@ExcelProperty("检测项目字典ID,字典表【T_DIC_PRJ】")
|
||||||
private Long dictionaryProjectId;
|
private Long dictionaryProjectId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "值")
|
@Schema(description = "值")
|
||||||
@ExcelProperty("值")
|
@ExcelProperty("值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ public class BusinessSubParentSampleAssessmentPageReqVO extends PageParam {
|
|||||||
@Schema(description = "检测方法配置ID", example = "16271")
|
@Schema(description = "检测方法配置ID", example = "16271")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||||
private String taskType;
|
private String taskType;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ public class BusinessSubParentSampleAssessmentRespVO {
|
|||||||
@ExcelProperty("检测方法配置ID")
|
@ExcelProperty("检测方法配置ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||||
private String taskType;
|
private String taskType;
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ public class BusinessSubParentSampleAssessmentSaveReqVO {
|
|||||||
@NotNull(message = "检测方法配置ID不能为空")
|
@NotNull(message = "检测方法配置ID不能为空")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||||
private String taskType;
|
private String taskType;
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ public class BusinessSubSampleAssessmentPageReqVO extends PageParam {
|
|||||||
@Schema(description = "检测方法配置ID", example = "8091")
|
@Schema(description = "检测方法配置ID", example = "8091")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||||
private String taskType;
|
private String taskType;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ public class BusinessSubSampleAssessmentRespVO {
|
|||||||
@ExcelProperty("检测方法配置ID")
|
@ExcelProperty("检测方法配置ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
@ExcelProperty("任务类型,【字典】【jy_sample_task_type】常规、抽查...")
|
@ExcelProperty("任务类型,【字典】【jy_sample_task_type】常规、抽查...")
|
||||||
private String taskType;
|
private String taskType;
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ public class BusinessSubSampleAssessmentSaveReqVO {
|
|||||||
@NotNull(message = "检测方法配置ID不能为空")
|
@NotNull(message = "检测方法配置ID不能为空")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
@NotEmpty(message = "任务类型,【字典】【jy_sample_task_type】常规、抽查...不能为空")
|
@NotEmpty(message = "任务类型,【字典】【jy_sample_task_type】常规、抽查...不能为空")
|
||||||
private String taskType;
|
private String taskType;
|
||||||
|
|||||||
@@ -27,5 +27,8 @@ public class ReportFieldValueData implements Serializable {
|
|||||||
|
|
||||||
@Schema(description = "符号")
|
@Schema(description = "符号")
|
||||||
private String mathSymbol;
|
private String mathSymbol;
|
||||||
|
|
||||||
|
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||||
|
private String usage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,16 @@ public class BusinessAssayProjectDataDO extends BusinessBaseDO {
|
|||||||
@TableField("DIC_PRJ_ID")
|
@TableField("DIC_PRJ_ID")
|
||||||
private Long dictionaryProjectId;
|
private Long dictionaryProjectId;
|
||||||
/**
|
/**
|
||||||
|
* 用途,ingredient-配料、report-报出、ingredient_report-配料及报出
|
||||||
|
*/
|
||||||
|
@TableField("USG")
|
||||||
|
private String usage;
|
||||||
|
/**
|
||||||
|
* 符号,=、>、<、等
|
||||||
|
*/
|
||||||
|
@TableField("SMB")
|
||||||
|
private String symbol;
|
||||||
|
/**
|
||||||
* 值
|
* 值
|
||||||
*/
|
*/
|
||||||
@TableField("VAL")
|
@TableField("VAL")
|
||||||
|
|||||||
@@ -53,6 +53,16 @@ public class BusinessSubParentSampleAssessmentDO extends BusinessBaseDO {
|
|||||||
@TableField("CFG_ASY_MTHD_ID")
|
@TableField("CFG_ASY_MTHD_ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
/**
|
/**
|
||||||
|
* 用途,ingredient-配料、report-报出、ingredient_report-配料及报出
|
||||||
|
*/
|
||||||
|
@TableField("USG")
|
||||||
|
private String usage;
|
||||||
|
/**
|
||||||
|
* 符号,=、>、<、等
|
||||||
|
*/
|
||||||
|
@TableField("SMB")
|
||||||
|
private String symbol;
|
||||||
|
/**
|
||||||
* 任务类型,【字典】【jy_sample_task_type】常规、抽查...
|
* 任务类型,【字典】【jy_sample_task_type】常规、抽查...
|
||||||
*/
|
*/
|
||||||
@TableField("TSK_TP")
|
@TableField("TSK_TP")
|
||||||
|
|||||||
@@ -58,6 +58,16 @@ public class BusinessSubSampleAssessmentDO extends BusinessBaseDO {
|
|||||||
@TableField("CFG_ASY_MTHD_ID")
|
@TableField("CFG_ASY_MTHD_ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
/**
|
/**
|
||||||
|
* 用途,ingredient-配料、report-报出、ingredient_report-配料及报出
|
||||||
|
*/
|
||||||
|
@TableField("USG")
|
||||||
|
private String usage;
|
||||||
|
/**
|
||||||
|
* 符号,=、>、<、等
|
||||||
|
*/
|
||||||
|
@TableField("SMB")
|
||||||
|
private String symbol;
|
||||||
|
/**
|
||||||
* 任务类型,【字典】【jy_sample_task_type】常规、抽查...
|
* 任务类型,【字典】【jy_sample_task_type】常规、抽查...
|
||||||
*/
|
*/
|
||||||
@TableField("TSK_TP")
|
@TableField("TSK_TP")
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getSymbol, reqVO.getSymbol())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
@@ -63,6 +65,8 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
||||||
|
.eqIfPresent(BusinessAssayProjectDataDO::getSymbol, reqVO.getSymbol())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
||||||
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<Bus
|
|||||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getUsage, reqVO.getUsage())
|
||||||
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getSymbol, reqVO.getSymbol())
|
||||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getTaskType, reqVO.getTaskType())
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getTaskType, reqVO.getTaskType())
|
||||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getAssayType, reqVO.getAssayType())
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getAssayType, reqVO.getAssayType())
|
||||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getDataType, reqVO.getDataType())
|
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getDataType, reqVO.getDataType())
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
|||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
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.BusinessSubParentSampleAssessmentDO;
|
||||||
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.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.ConfigAssayMethodProjectDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||||
@@ -31,6 +32,8 @@ public interface BusinessSubSampleAssessmentMapper extends BaseMapperX<BusinessS
|
|||||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getUsage, reqVO.getUsage())
|
||||||
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getSymbol, reqVO.getSymbol())
|
||||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getTaskType, reqVO.getTaskType())
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getTaskType, reqVO.getTaskType())
|
||||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getAssayType, reqVO.getAssayType())
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getAssayType, reqVO.getAssayType())
|
||||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getDataType, reqVO.getDataType())
|
.eqIfPresent(BusinessSubSampleAssessmentDO::getDataType, reqVO.getDataType())
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
@@ -56,13 +58,23 @@ public class SampleEntrustCreateDataCmp extends NodeComponent {
|
|||||||
|
|
||||||
//获取委托来源配置
|
//获取委托来源配置
|
||||||
ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId());
|
ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId());
|
||||||
String codeRule = configEntrustSource.getCodeRule();
|
|
||||||
ConfigReportTemplateDO configReportTemplate = configReportTemplateMapper.selectLatestConfigReportTemplateByKey(configEntrustSource.getConfigReportTemplateKey());
|
ConfigReportTemplateDO configReportTemplate = configReportTemplateMapper.selectLatestConfigReportTemplateByKey(configEntrustSource.getConfigReportTemplateKey());
|
||||||
|
|
||||||
|
String entrustNumber = null;
|
||||||
|
if (StringUtils.isNotBlank(configEntrustSource.getCodeField())) {
|
||||||
|
String externalInfomation = sampleEntrustRegistration.getExternalInfomation();
|
||||||
|
JSONObject extJsonObject = JSON.parseObject(externalInfomation);
|
||||||
|
entrustNumber = extJsonObject.getString(configEntrustSource.getCodeField());
|
||||||
|
} else {
|
||||||
|
String codeRule = configEntrustSource.getCodeRule();
|
||||||
|
entrustNumber = sequenceUtil.genCode(codeRule);
|
||||||
|
}
|
||||||
|
|
||||||
//赋值id
|
//赋值id
|
||||||
sampleEntrustRegistration.setId(IdWorker.getId());
|
sampleEntrustRegistration.setId(IdWorker.getId());
|
||||||
//设置委托单号
|
//设置委托单号
|
||||||
sampleEntrustRegistration.setEntrustNumber(sequenceUtil.genCode(codeRule));
|
sampleEntrustRegistration.setEntrustNumber(entrustNumber);
|
||||||
|
|
||||||
sampleEntrustRegistration.setRegistrationStatus("in_progress");
|
sampleEntrustRegistration.setRegistrationStatus("in_progress");
|
||||||
sampleEntrustRegistration.setConfigReportTemplateId(configReportTemplate.getId());
|
sampleEntrustRegistration.setConfigReportTemplateId(configReportTemplate.getId());
|
||||||
sampleEntrustRegistration.setConfigReportTemplateKey(configReportTemplate.getKey());
|
sampleEntrustRegistration.setConfigReportTemplateKey(configReportTemplate.getKey());
|
||||||
@@ -92,12 +104,12 @@ public class SampleEntrustCreateDataCmp extends NodeComponent {
|
|||||||
//保存样品委托登记
|
//保存样品委托登记
|
||||||
businessSampleEntrustRegistrationMapper.insert(sampleEntrustRegistration);
|
businessSampleEntrustRegistrationMapper.insert(sampleEntrustRegistration);
|
||||||
|
|
||||||
//保存样品明细
|
//保存委托样品明细
|
||||||
if (CollUtil.isNotEmpty(sampleEntrustDetailList)) {
|
if (CollUtil.isNotEmpty(sampleEntrustDetailList)) {
|
||||||
businessSampleEntrustDetailMapper.insertBatch(sampleEntrustDetailList);
|
businessSampleEntrustDetailMapper.insertBatch(sampleEntrustDetailList);
|
||||||
}
|
}
|
||||||
|
|
||||||
//保存检测项目
|
//保存检测检测项目
|
||||||
if (CollUtil.isNotEmpty(sampleEntrustProjectList)) {
|
if (CollUtil.isNotEmpty(sampleEntrustProjectList)) {
|
||||||
businessSampleEntrustProjectMapper.insertBatch(sampleEntrustProjectList);
|
businessSampleEntrustProjectMapper.insertBatch(sampleEntrustProjectList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailListSort = sampleEntrustDetailList.stream().sorted(Comparator.comparingInt(BusinessSampleEntrustDetailDO::getSort)).collect(Collectors.toList());
|
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailListSort = sampleEntrustDetailList.stream().sorted(Comparator.comparingInt(BusinessSampleEntrustDetailDO::getSort)).collect(Collectors.toList());
|
||||||
//主样
|
//主样
|
||||||
BusinessBaseSampleDO businessBaseSampleDO = null;
|
BusinessBaseSampleDO businessBaseSampleDO = null;
|
||||||
|
int sort = 0;//委托明细顺序
|
||||||
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailListSort) {//委托样品明细
|
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailListSort) {//委托样品明细
|
||||||
|
|
||||||
//样品大类
|
//样品大类
|
||||||
@@ -455,8 +456,8 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
sort++;
|
||||||
}
|
}
|
||||||
|
|
||||||
sampleEntrustRegistration.setRegistrationStatus(QmsCommonConstant.SUBMITTED);
|
sampleEntrustRegistration.setRegistrationStatus(QmsCommonConstant.SUBMITTED);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
|
|
||||||
@@ -20,6 +22,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetai
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
@@ -44,6 +47,15 @@ public class SampleEntrustUpdateDataCmp extends NodeComponent {
|
|||||||
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
||||||
//样品委托
|
//样品委托
|
||||||
BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration();
|
BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration();
|
||||||
|
|
||||||
|
//获取委托来源配置
|
||||||
|
ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId());
|
||||||
|
if (StringUtils.isNotBlank(configEntrustSource.getCodeField())) {//如果委托单号来源于字段,则重新获取更新下
|
||||||
|
String externalInfomation = sampleEntrustRegistration.getExternalInfomation();
|
||||||
|
JSONObject extJsonObject = JSON.parseObject(externalInfomation);
|
||||||
|
String entrustNumber = extJsonObject.getString(configEntrustSource.getCodeField());
|
||||||
|
sampleEntrustRegistration.setEntrustNumber(entrustNumber);
|
||||||
|
}
|
||||||
|
|
||||||
//先删除旧的
|
//先删除旧的
|
||||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailOldList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, sampleEntrustRegistration.getId()));
|
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailOldList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, sampleEntrustRegistration.getId()));
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ public class ConfigEntrustSourcePageReqVO extends PageParam {
|
|||||||
@Schema(description = "委托单号规则")
|
@Schema(description = "委托单号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|
||||||
|
@Schema(description = "委托单号引用字段")
|
||||||
|
private String codeField;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
private String systemDepartmentCode;
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ public class ConfigEntrustSourceReqVO {
|
|||||||
@Schema(description = "委托单号规则")
|
@Schema(description = "委托单号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|
||||||
|
@Schema(description = "委托单号引用字段")
|
||||||
|
private String codeField;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
private String systemDepartmentCode;
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public class ConfigEntrustSourceRespVO {
|
|||||||
@ExcelProperty("委托单号规则")
|
@ExcelProperty("委托单号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|
||||||
|
@Schema(description = "委托单号引用字段")
|
||||||
|
private String codeField;
|
||||||
|
|
||||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("所属部门")
|
@ExcelProperty("所属部门")
|
||||||
private String systemDepartmentCode;
|
private String systemDepartmentCode;
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ public class ConfigEntrustSourceSaveReqVO {
|
|||||||
@Schema(description = "委托单号规则")
|
@Schema(description = "委托单号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|
||||||
|
@Schema(description = "委托单号引用字段")
|
||||||
|
private String codeField;
|
||||||
|
|
||||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private String systemDepartmentCode;
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ public class ConfigEntrustSourceDO extends BusinessBaseDO {
|
|||||||
@TableField("CD_RUL")
|
@TableField("CD_RUL")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
/**
|
/**
|
||||||
|
* 委托单号引用字段
|
||||||
|
*/
|
||||||
|
@TableField("CD_FLD")
|
||||||
|
private String codeField;
|
||||||
|
/**
|
||||||
* 所属部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
@TableField("SYS_DEPT_CD")
|
@TableField("SYS_DEPT_CD")
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public interface ConfigEntrustSourceMapper extends BaseMapperX<ConfigEntrustSour
|
|||||||
.eqIfPresent(ConfigEntrustSourceDO::getDataCollectionKey, reqVO.getDataCollectionKey())
|
.eqIfPresent(ConfigEntrustSourceDO::getDataCollectionKey, reqVO.getDataCollectionKey())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
.eqIfPresent(ConfigEntrustSourceDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule())
|
.eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule())
|
||||||
|
.eqIfPresent(ConfigEntrustSourceDO::getCodeField, reqVO.getCodeField())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
.betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark())
|
||||||
@@ -40,6 +41,7 @@ public interface ConfigEntrustSourceMapper extends BaseMapperX<ConfigEntrustSour
|
|||||||
.eqIfPresent(ConfigEntrustSourceDO::getDataCollectionKey, reqVO.getDataCollectionKey())
|
.eqIfPresent(ConfigEntrustSourceDO::getDataCollectionKey, reqVO.getDataCollectionKey())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
.eqIfPresent(ConfigEntrustSourceDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule())
|
.eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule())
|
||||||
|
.eqIfPresent(ConfigEntrustSourceDO::getCodeField, reqVO.getCodeField())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
.betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark())
|
||||||
|
|||||||
Reference in New Issue
Block a user