任务分配-任务管理调整

This commit is contained in:
2025-12-19 09:10:07 +08:00
parent e75ebd9a2c
commit 6607abd6c5
40 changed files with 1491 additions and 134 deletions

View File

@@ -37,6 +37,7 @@ public interface ErrorCodeConstants {
/*==============================config 配置模块 1_032_050_000 ~ 1_032_099_999 ===============================*/
ErrorCode CONFIG_REPORT_TEMPLATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表模版配置不存在");
ErrorCode CONFIG_ASSAY_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法配置不存在");
ErrorCode CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法参数配置不存在");
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目配置不存在");
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_RANGE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目区间不存在");
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目判定不存在");
@@ -101,6 +102,7 @@ public interface ErrorCodeConstants {
ErrorCode BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样交接记录业务不存在");
ErrorCode BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记来样品位不存在");
ErrorCode BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务业务不存在");
ErrorCode BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务参数业务不存在");
ErrorCode BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测项目数据业务不存在");
ErrorCode BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测参数数据业务不存在");
ErrorCode BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样判定业务不存在");

View File

@@ -0,0 +1,106 @@
package com.zt.plat.module.qms.business.bus.controller.admin;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.constraints.*;
import jakarta.validation.*;
import jakarta.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
import com.zt.plat.module.qms.business.bus.service.BusinessAssayTaskParameterDataService;
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 子样检测任务参数业务")
@RestController
@RequestMapping("/qms/business-assay-task-parameter-data")
@Validated
public class BusinessAssayTaskParameterDataController implements BusinessControllerMarker {
@Resource
private BusinessAssayTaskParameterDataService businessAssayTaskParameterDataService;
@PostMapping("/create")
@Operation(summary = "创建子样检测任务参数业务")
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:create')")
public CommonResult<BusinessAssayTaskParameterDataRespVO> createBusinessAssayTaskParameterData(@Valid @RequestBody BusinessAssayTaskParameterDataSaveReqVO createReqVO) {
return success(businessAssayTaskParameterDataService.createBusinessAssayTaskParameterData(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新子样检测任务参数业务")
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:update')")
public CommonResult<Boolean> updateBusinessAssayTaskParameterData(@Valid @RequestBody BusinessAssayTaskParameterDataSaveReqVO updateReqVO) {
businessAssayTaskParameterDataService.updateBusinessAssayTaskParameterData(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除子样检测任务参数业务")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:delete')")
public CommonResult<Boolean> deleteBusinessAssayTaskParameterData(@RequestParam("id") Long id) {
businessAssayTaskParameterDataService.deleteBusinessAssayTaskParameterData(id);
return success(true);
}
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除子样检测任务参数业务")
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:delete')")
public CommonResult<Boolean> deleteBusinessAssayTaskParameterDataList(@RequestBody BatchDeleteReqVO req) {
businessAssayTaskParameterDataService.deleteBusinessAssayTaskParameterDataListByIds(req.getIds());
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得子样检测任务参数业务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:query')")
public CommonResult<BusinessAssayTaskParameterDataRespVO> getBusinessAssayTaskParameterData(@RequestParam("id") Long id) {
BusinessAssayTaskParameterDataDO businessAssayTaskParameterData = businessAssayTaskParameterDataService.getBusinessAssayTaskParameterData(id);
return success(BeanUtils.toBean(businessAssayTaskParameterData, BusinessAssayTaskParameterDataRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得子样检测任务参数业务分页")
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:query')")
public CommonResult<PageResult<BusinessAssayTaskParameterDataRespVO>> getBusinessAssayTaskParameterDataPage(@Valid BusinessAssayTaskParameterDataPageReqVO pageReqVO) {
PageResult<BusinessAssayTaskParameterDataDO> pageResult = businessAssayTaskParameterDataService.getBusinessAssayTaskParameterDataPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BusinessAssayTaskParameterDataRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出子样检测任务参数业务 Excel")
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportBusinessAssayTaskParameterDataExcel(@Valid BusinessAssayTaskParameterDataPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<BusinessAssayTaskParameterDataDO> list = businessAssayTaskParameterDataService.getBusinessAssayTaskParameterDataPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "子样检测任务参数业务.xls", "数据", BusinessAssayTaskParameterDataRespVO.class,
BeanUtils.toBean(list, BusinessAssayTaskParameterDataRespVO.class));
}
}

View File

@@ -84,18 +84,18 @@ public class BusinessQCCoefficientDataController implements BusinessControllerMa
@GetMapping("/page")
@Operation(summary = "获得质控样检测系数任务数据,空白样、标样分页")
@PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
public CommonResult<PageResult<BusinessQCCoefficientDataRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO) {
PageResult<BusinessQCCoefficientDataDO> pageResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BusinessQCCoefficientDataRespVO.class));
// @PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
public CommonResult<PageResult<BusinessQCCoefficientDataExtendRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO) {
PageResult<BusinessQCCoefficientDataExtendRespVO> pageResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO);
return success(pageResult);
}
@GetMapping("/list")
@Operation(summary = "获得质控样检测系数任务数据,空白样、标样分页")
// @PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
public CommonResult<List<BusinessQCCoefficientDataRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataReqVO reqVO) {
List<BusinessQCCoefficientDataDO> pageResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataList(reqVO);
return success(BeanUtils.toBean(pageResult, BusinessQCCoefficientDataRespVO.class));
public CommonResult<List<BusinessQCCoefficientDataExtendRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataReqVO reqVO) {
List<BusinessQCCoefficientDataExtendRespVO> listResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataList(reqVO);
return success(listResult);
}
@GetMapping("/export-excel")
@@ -105,7 +105,7 @@ public class BusinessQCCoefficientDataController implements BusinessControllerMa
public void exportBusinessQCCoefficientDataExcel(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<BusinessQCCoefficientDataDO> list = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO).getList();
List<BusinessQCCoefficientDataExtendRespVO> list = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "质控样检测系数任务数据,空白样、标样.xls", "数据", BusinessQCCoefficientDataRespVO.class,
BeanUtils.toBean(list, BusinessQCCoefficientDataRespVO.class));

View File

@@ -85,17 +85,17 @@ public class BusinessQCManagementDataController implements BusinessControllerMar
@GetMapping("/page")
@Operation(summary = "获得质控管理样检测任务数据,管理样、标准样分页")
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-data:query')")
public CommonResult<PageResult<BusinessQCManagementDataRespVO>> getBusinessQCManagementDataPage(@Valid BusinessQCManagementDataPageReqVO pageReqVO) {
PageResult<BusinessQCManagementDataDO> pageResult = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BusinessQCManagementDataRespVO.class));
public CommonResult<PageResult<BusinessQCManagementDataExtendRespVO>> getBusinessQCManagementDataPage(@Valid BusinessQCManagementDataPageReqVO pageReqVO) {
PageResult<BusinessQCManagementDataExtendRespVO> pageResult = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO);
return success(pageResult);
}
@GetMapping("/list")
@Operation(summary = "获得质控管理样检测任务数据,管理样、标准样列表")
// @PreAuthorize("@ss.hasPermission('qms:business-QC-management-data:query')")
public CommonResult<List<BusinessQCManagementDataRespVO>> getBusinessQCManagementDataList(@Valid BusinessQCManagementDataReqVO reqVO) {
List<BusinessQCManagementDataDO> pageResult = businessQCManagementDataService.getBusinessQCManagementDataList(reqVO);
return success(BeanUtils.toBean(pageResult, BusinessQCManagementDataRespVO.class));
public CommonResult<List<BusinessQCManagementDataExtendRespVO>> getBusinessQCManagementDataList(@Valid BusinessQCManagementDataReqVO reqVO) {
List<BusinessQCManagementDataExtendRespVO> listResult = businessQCManagementDataService.getBusinessQCManagementDataList(reqVO);
return success(listResult);
}
@GetMapping("/export-excel")
@@ -105,7 +105,7 @@ public class BusinessQCManagementDataController implements BusinessControllerMar
public void exportBusinessQCManagementDataExcel(@Valid BusinessQCManagementDataPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<BusinessQCManagementDataDO> list = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO).getList();
List<BusinessQCManagementDataExtendRespVO> list = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "质控管理样检测任务数据,管理样、标准样.xls", "数据", BusinessQCManagementDataRespVO.class,
BeanUtils.toBean(list, BusinessQCManagementDataRespVO.class));

View File

@@ -0,0 +1,44 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam;
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 BusinessAssayTaskParameterDataPageReqVO extends PageParam {
@Schema(description = "检测任务ID", example = "11383")
private Long businessAssayTaskDataId;
@Schema(description = "检测方法参数配置ID", example = "9000")
private Long configAssayMethodParameterId;
@Schema(description = "")
private String value;
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串int-整数decimal-小数,date-日期datetime-时间", example = "1")
private String dataType;
@Schema(description = "小数位")
private Integer decimalPosition;
@Schema(description = "乐观锁", example = "3750")
private Integer updateCount;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "备注")
private String remark;
}

View File

@@ -0,0 +1,55 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 子样检测任务参数业务 Response VO")
@Data
@ExcelIgnoreUnannotated
public class BusinessAssayTaskParameterDataRespVO {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2727")
@ExcelProperty("ID")
private Long id;
@Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11383")
@ExcelProperty("检测任务ID")
private Long businessAssayTaskDataId;
@Schema(description = "检测方法参数配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
@ExcelProperty("检测方法参数配置ID")
private Long configAssayMethodParameterId;
@Schema(description = "")
@ExcelProperty("")
private String value;
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串int-整数decimal-小数,date-日期datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("数据类型,字典表【T_DIC_BSN】string-字符串int-整数decimal-小数,date-日期datetime-时间")
private String dataType;
@Schema(description = "小数位")
@ExcelProperty("小数位")
private Integer decimalPosition;
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "3750")
@ExcelProperty("乐观锁")
private Integer updateCount;
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String systemDepartmentCode;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
}

View File

@@ -0,0 +1,43 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
@Schema(description = "管理后台 - 子样检测任务参数业务新增/修改 Request VO")
@Data
public class BusinessAssayTaskParameterDataSaveReqVO {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2727")
private Long id;
@Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11383")
@NotNull(message = "检测任务ID不能为空")
private Long businessAssayTaskDataId;
@Schema(description = "检测方法参数配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
@NotNull(message = "检测方法参数配置ID不能为空")
private Long configAssayMethodParameterId;
@Schema(description = "")
private String value;
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串int-整数decimal-小数,date-日期datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "数据类型,字典表【T_DIC_BSN】string-字符串int-整数decimal-小数,date-日期datetime-时间不能为空")
private String dataType;
@Schema(description = "小数位")
private Integer decimalPosition;
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "3750")
@NotNull(message = "乐观锁不能为空")
private Integer updateCount;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
}

View File

@@ -0,0 +1,16 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import lombok.Data;
@Data
public class BusinessQCCoefficientDataExtendRespVO extends BusinessQCCoefficientDataRespVO {
private String dictionaryBusinessName;
private String parentDictionaryBusinessId;
private String parentDictionaryBusinessName;
private String parentDictionaryBusinesskey;
}

View File

@@ -0,0 +1,16 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import lombok.Data;
@Data
public class BusinessQCManagementDataExtendRespVO extends BusinessQCManagementDataRespVO {
private String dictionaryBusinessName;
private String parentDictionaryBusinessId;
private String parentDictionaryBusinessName;
private String parentDictionaryBusinesskey;
}

View File

@@ -26,4 +26,7 @@ public class CreateQcSampleReqVO {
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型空白样、管理样、标准样、标样")
private String dictionaryBusinessKey;
@Schema(description = "质控类型_父类_Key,字典表【T_DIC_BSN】质控类型带检测项-withProject 不带检测项目-withoutProject")
private String parentDictionaryBusinesskey;
}

View File

@@ -13,6 +13,9 @@ public class DeleteQcSampleReqVO {
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型空白样、管理样、标准样、标样")
private String dictionaryBusinessKey;
@Schema(description = "质控类型_父类_Key,字典表【T_DIC_BSN】质控类型带检测项-withProject 不带检测项目-withoutProject")
private String parentDictionaryBusinesskey;
@Schema(description = "质控样id")
private List<Long> qcSampleIdList;

View File

@@ -0,0 +1,75 @@
package com.zt.plat.module.qms.business.bus.dal.dataobject;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
/**
* 子样检测任务参数业务 DO
*
* @author 后台管理-1
*/
@TableName("t_bsn_asy_tsk_prm_dat")
@KeySequence("t_bsn_asy_tsk_prm_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
/**
* 支持业务基类继承isBusiness=true 时继承 BusinessBaseDO否则继承 BaseDO
*/
public class BusinessAssayTaskParameterDataDO extends BusinessBaseDO {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 检测任务ID
*/
@TableField("BSN_ASY_TSK_DAT_ID")
private Long businessAssayTaskDataId;
/**
* 检测方法参数配置ID
*/
@TableField("CFG_ASY_MTHD_PRM_ID")
private Long configAssayMethodParameterId;
/**
* 值
*/
@TableField("VAL")
private String value;
/**
* 数据类型,字典表【T_DIC_BSN】string-字符串int-整数decimal-小数,date-日期datetime-时间
*/
@TableField("DAT_TP")
private String dataType;
/**
* 小数位
*/
@TableField("DEC_POS")
private Integer decimalPosition;
/**
* 乐观锁
*/
@TableField("UPD_CNT")
private Integer updateCount;
/**
* 所属部门
*/
@TableField("SYS_DEPT_CD")
private String systemDepartmentCode;
/**
* 备注
*/
@TableField("RMK")
private String remark;
}

View File

@@ -12,6 +12,7 @@ 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.dic.dal.dataobject.DictionaryProjectDO;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -83,6 +84,18 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
.orderByDesc(BusinessAssayProjectDataDO::getId));
}
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
.leftJoin(BusinessAssayTaskDataDO.class, BusinessAssayTaskDataDO::getId, BusinessAssayProjectDataDO::getBusinessAssayTaskDataId)
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
.selectAll(BusinessAssayProjectDataDO.class)
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectDataExtendRespVO::getDictionaryProjectKey)
.selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectDataExtendRespVO::getSimpleName)
.selectAs(DictionaryProjectDO::getShowName, BusinessAssayProjectDataExtendRespVO::getShowName)
.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId)
.eq(BusinessAssayProjectDataDO::getIsEnabled, QmsCommonConstant.YES));
}
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataId(Long businessAssayTaskDataId) {
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)

View File

@@ -0,0 +1,34 @@
package com.zt.plat.module.qms.business.bus.dal.mapper;
import java.util.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
/**
* 子样检测任务参数业务 Mapper
*
* @author 后台管理-1
*/
@Mapper
public interface BusinessAssayTaskParameterDataMapper extends BaseMapperX<BusinessAssayTaskParameterDataDO> {
default PageResult<BusinessAssayTaskParameterDataDO> selectPage(BusinessAssayTaskParameterDataPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessAssayTaskParameterDataDO>()
.eqIfPresent(BusinessAssayTaskParameterDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getConfigAssayMethodParameterId, reqVO.getConfigAssayMethodParameterId())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getValue, reqVO.getValue())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getDataType, reqVO.getDataType())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getDecimalPosition, reqVO.getDecimalPosition())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessAssayTaskParameterDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessAssayTaskParameterDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessAssayTaskParameterDataDO::getId));
}
}

View File

@@ -6,7 +6,10 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
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.dal.dataobject.BusinessQCCoefficientDataDO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCSampleMethodDO;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
@@ -19,58 +22,75 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCCoefficientDataDO> {
default PageResult<BusinessQCCoefficientDataDO> selectPage(BusinessQCCoefficientDataPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCCoefficientDataDO>()
.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCCoefficientDataDO::getId));
default PageResult<BusinessQCCoefficientDataExtendRespVO> selectPage(BusinessQCCoefficientDataPageReqVO reqVO) {
MPJLambdaWrapperX<BusinessQCCoefficientDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<BusinessQCCoefficientDataDO>();
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCCoefficientDataDO::getDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCCoefficientDataDO.class);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
queryLambdaWrapperX.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCCoefficientDataDO::getId);
return selectJoinPage(reqVO, BusinessQCCoefficientDataExtendRespVO.class, queryLambdaWrapperX);
}
default List<BusinessQCCoefficientDataDO> selectList(BusinessQCCoefficientDataReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<BusinessQCCoefficientDataDO>()
.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCCoefficientDataDO::getId));
default List<BusinessQCCoefficientDataExtendRespVO> selectList(BusinessQCCoefficientDataReqVO reqVO) {
MPJLambdaWrapperX<BusinessQCCoefficientDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<BusinessQCCoefficientDataDO>();
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCCoefficientDataDO::getDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCCoefficientDataDO.class);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
queryLambdaWrapperX.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCCoefficientDataDO::getId);
return selectJoinList(BusinessQCCoefficientDataExtendRespVO.class, queryLambdaWrapperX);
}
default List<BusinessQCCoefficientDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {

View File

@@ -7,7 +7,9 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
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.dal.dataobject.BusinessQCManagementDataDO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
@@ -20,58 +22,75 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCManagementDataDO> {
default PageResult<BusinessQCManagementDataDO> selectPage(BusinessQCManagementDataPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCManagementDataDO>()
.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCManagementDataDO::getId));
default PageResult<BusinessQCManagementDataExtendRespVO> selectPage(BusinessQCManagementDataPageReqVO reqVO) {
MPJLambdaWrapperX<BusinessQCManagementDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<>();
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCManagementDataDO::getDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCManagementDataDO.class);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
queryLambdaWrapperX.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCManagementDataDO::getId);
return selectJoinPage(reqVO, BusinessQCManagementDataExtendRespVO.class, queryLambdaWrapperX);
}
default List<BusinessQCManagementDataDO> selectList(BusinessQCManagementDataReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<BusinessQCManagementDataDO>()
.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCManagementDataDO::getId));
default List<BusinessQCManagementDataExtendRespVO> selectList(BusinessQCManagementDataReqVO reqVO) {
MPJLambdaWrapperX<BusinessQCManagementDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<>();
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCManagementDataDO::getDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCManagementDataDO.class);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
queryLambdaWrapperX.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessQCManagementDataDO::getId);
return selectJoinList(BusinessQCManagementDataExtendRespVO.class, queryLambdaWrapperX);
}
default List<BusinessQCManagementDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {

View File

@@ -8,12 +8,15 @@ import org.apache.commons.lang3.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataExtendRespVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
@@ -56,6 +59,9 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
@Resource
private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper;
@Resource
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
@Resource
private BusinessQCCoefficientDataMapper businessQCCoefficientDataMapper;
@@ -93,6 +99,9 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
businessAssayTaskList.addAll(saveBusinessAssayTaskList);
businessAssayTaskList.addAll(updateBusinessAssayTaskList);
//检测任务
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = sampleTaskAssignContext.getBusinessAssayTaskDataList();
//获取分配任务的分析方法id列表
List<Long> configAssayMethodIdList = businessAssayTaskList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
@@ -170,10 +179,28 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
if (CollUtil.isNotEmpty(businessQCManagementDataList)) {
continue;
}
//分析项目
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().map(m -> m.getId()).collect(Collectors.toList());
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().filter(f -> f.getBusinessAssayTaskId().equals(businessAssayTaskDO.getId())).map(m -> m.getId()).collect(Collectors.toList());
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
//检测项目id
List<Long> dictionaryProjectIdList = new ArrayList<>();
//必须要检测的项目
String mustProject = configQCSampleMethodExtendRespVO.getMustProject();
if (StringUtils.isNotBlank(mustProject)) {
String[] mustProjects = mustProject.split(",");
for (String dicProjectId : mustProjects) {
dictionaryProjectIdList.add(Long.parseLong(dicProjectId));
}
}
//获取当前任务的检测项目id列表
List<Long> busTaskDictionaryProjectIdList = businessAssayProjectDataList.stream().map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
dictionaryProjectIdList.addAll(busTaskDictionaryProjectIdList);
//获取需要创建的检测项目id
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().filter(f -> dictionaryProjectIdList.contains(f.getDictionaryProjectId())).map(m -> m.getId()).collect(Collectors.toList());
//分析项目参数
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectIds(configAssayMethodProjectIds);
//分析项目
@@ -205,6 +232,9 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
businessQCManagementDataDOList.add(businessQCManagementDataDO);
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
if (!dictionaryProjectIdList.contains(configAssayMethodProjectExtendRespVO.getDictionaryProjectId())) {//不存在则跳过
continue;
}
BusinessQCManagementProjectDataDO businessQCManagementProjectDataDO = new BusinessQCManagementProjectDataDO();
businessQCManagementProjectDataDO.setId(IdWorker.getId());
businessQCManagementProjectDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());

View File

@@ -0,0 +1,61 @@
package com.zt.plat.module.qms.business.bus.service;
import java.util.*;
import jakarta.validation.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
/**
* 子样检测任务参数业务 Service 接口
*
* @author 后台管理-1
*/
public interface BusinessAssayTaskParameterDataService {
/**
* 创建子样检测任务参数业务
*
* @param createReqVO 创建信息
* @return 编号
*/
BusinessAssayTaskParameterDataRespVO createBusinessAssayTaskParameterData(@Valid BusinessAssayTaskParameterDataSaveReqVO createReqVO);
/**
* 更新子样检测任务参数业务
*
* @param updateReqVO 更新信息
*/
void updateBusinessAssayTaskParameterData(@Valid BusinessAssayTaskParameterDataSaveReqVO updateReqVO);
/**
* 删除子样检测任务参数业务
*
* @param id 编号
*/
void deleteBusinessAssayTaskParameterData(Long id);
/**
* 批量删除子样检测任务参数业务
*
* @param ids 编号
*/
void deleteBusinessAssayTaskParameterDataListByIds(List<Long> ids);
/**
* 获得子样检测任务参数业务
*
* @param id 编号
* @return 子样检测任务参数业务
*/
BusinessAssayTaskParameterDataDO getBusinessAssayTaskParameterData(Long id);
/**
* 获得子样检测任务参数业务分页
*
* @param pageReqVO 分页查询
* @return 子样检测任务参数业务分页
*/
PageResult<BusinessAssayTaskParameterDataDO> getBusinessAssayTaskParameterDataPage(BusinessAssayTaskParameterDataPageReqVO pageReqVO);
}

View File

@@ -0,0 +1,91 @@
package com.zt.plat.module.qms.business.bus.service;
import cn.hutool.core.collection.CollUtil;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
/**
* 子样检测任务参数业务 Service 实现类
*
* @author 后台管理-1
*/
@Service
@Validated
public class BusinessAssayTaskParameterDataServiceImpl implements BusinessAssayTaskParameterDataService {
@Resource
private BusinessAssayTaskParameterDataMapper businessAssayTaskParameterDataMapper;
@Override
public BusinessAssayTaskParameterDataRespVO createBusinessAssayTaskParameterData(BusinessAssayTaskParameterDataSaveReqVO createReqVO) {
// 插入
BusinessAssayTaskParameterDataDO businessAssayTaskParameterData = BeanUtils.toBean(createReqVO, BusinessAssayTaskParameterDataDO.class);
businessAssayTaskParameterDataMapper.insert(businessAssayTaskParameterData);
// 返回
return BeanUtils.toBean(businessAssayTaskParameterData, BusinessAssayTaskParameterDataRespVO.class);
}
@Override
public void updateBusinessAssayTaskParameterData(BusinessAssayTaskParameterDataSaveReqVO updateReqVO) {
// 校验存在
validateBusinessAssayTaskParameterDataExists(updateReqVO.getId());
// 更新
BusinessAssayTaskParameterDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessAssayTaskParameterDataDO.class);
businessAssayTaskParameterDataMapper.updateById(updateObj);
}
@Override
public void deleteBusinessAssayTaskParameterData(Long id) {
// 校验存在
validateBusinessAssayTaskParameterDataExists(id);
// 删除
businessAssayTaskParameterDataMapper.deleteById(id);
}
@Override
public void deleteBusinessAssayTaskParameterDataListByIds(List<Long> ids) {
// 校验存在
validateBusinessAssayTaskParameterDataExists(ids);
// 删除
businessAssayTaskParameterDataMapper.deleteByIds(ids);
}
private void validateBusinessAssayTaskParameterDataExists(List<Long> ids) {
List<BusinessAssayTaskParameterDataDO> list = businessAssayTaskParameterDataMapper.selectByIds(ids);
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
throw exception(BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS);
}
}
private void validateBusinessAssayTaskParameterDataExists(Long id) {
if (businessAssayTaskParameterDataMapper.selectById(id) == null) {
throw exception(BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS);
}
}
@Override
public BusinessAssayTaskParameterDataDO getBusinessAssayTaskParameterData(Long id) {
return businessAssayTaskParameterDataMapper.selectById(id);
}
@Override
public PageResult<BusinessAssayTaskParameterDataDO> getBusinessAssayTaskParameterDataPage(BusinessAssayTaskParameterDataPageReqVO pageReqVO) {
return businessAssayTaskParameterDataMapper.selectPage(pageReqVO);
}
}

View File

@@ -57,8 +57,8 @@ public interface BusinessQCCoefficientDataService {
* @param pageReqVO 分页查询
* @return 质控样检测系数任务数据,空白样、标样分页
*/
PageResult<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO);
PageResult<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO);
List<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO);
List<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO);
}

View File

@@ -84,12 +84,12 @@ public class BusinessQCCoefficientDataServiceImpl implements BusinessQCCoefficie
}
@Override
public PageResult<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO) {
public PageResult<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO) {
return businessQCCoefficientDataMapper.selectPage(pageReqVO);
}
@Override
public List<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO) {
public List<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO) {
return businessQCCoefficientDataMapper.selectList(reqVO);
}

View File

@@ -57,8 +57,8 @@ public interface BusinessQCManagementDataService {
* @param pageReqVO 分页查询
* @return 质控管理样检测任务数据,管理样、标准样分页
*/
PageResult<BusinessQCManagementDataDO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO);
PageResult<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO);
List<BusinessQCManagementDataDO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO);
List<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO);
}

View File

@@ -84,12 +84,12 @@ public class BusinessQCManagementDataServiceImpl implements BusinessQCManagement
}
@Override
public PageResult<BusinessQCManagementDataDO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO) {
public PageResult<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO) {
return businessQCManagementDataMapper.selectPage(pageReqVO);
}
@Override
public List<BusinessQCManagementDataDO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO) {
public List<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO) {
return businessQCManagementDataMapper.selectList(reqVO);
}

View File

@@ -769,7 +769,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
ConfigQCSampleMethodExtendRespVO configQCSampleMethod = configQCSampleMethodMapper.selectByConfigAssayMethodIdAndDictionaryBusinessKey(businessAssayTaskDO.getConfigAssayMethodId(), req.getDictionaryBusinessKey());
if ("kby".equals(req.getDictionaryBusinessKey()) || "by".equals(req.getDictionaryBusinessKey())) {//空白样和标样
if ("withoutProject".equals(req.getParentDictionaryBusinesskey())) {//不带检测项目的:如 空白样和标样
BusinessQCCoefficientDataDO businessQCCoefficientDataDO = new BusinessQCCoefficientDataDO();
businessQCCoefficientDataDO.setId(IdWorker.getId());
@@ -813,10 +813,26 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
businessQCCoefficientParameterDataDOList.add(businessQCCoefficientParameterDataDO);
}
} else {//管理样标准样
} else {//带检测项目的 如: 管理样标准样、质控空白样、监控样
//分析项目
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().map(m -> m.getId()).collect(Collectors.toList());
//检测项目id
List<Long> dictionaryProjectIdList = new ArrayList<>();
//必须要检测的项目
String mustProject = configQCSampleMethod.getMustProject();
if (StringUtils.isNotBlank(mustProject)) {
String[] mustProjects = mustProject.split(",");
for (String dicProjectId : mustProjects) {
dictionaryProjectIdList.add(Long.parseLong(dicProjectId));
}
}
//当前任务的检测项目列表
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskId(req.getBusinessAssayTaskId());
//获取当前任务的检测项目id列表
List<Long> busTaskDictionaryProjectIdList = businessAssayProjectDataList.stream().map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
dictionaryProjectIdList.addAll(busTaskDictionaryProjectIdList);
//获取需要创建的检测项目id
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().filter(f -> dictionaryProjectIdList.contains(f.getDictionaryProjectId())).map(m -> m.getId()).collect(Collectors.toList());
//分析项目参数
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectIds(configAssayMethodProjectIds);
//分析项目
@@ -845,6 +861,10 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
businessQCManagementDataDOList.add(businessQCManagementDataDO);
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
if (!dictionaryProjectIdList.contains(configAssayMethodProjectExtendRespVO.getDictionaryProjectId())) {//不存在则跳过
continue;
}
BusinessQCManagementProjectDataDO businessQCManagementProjectDataDO = new BusinessQCManagementProjectDataDO();
businessQCManagementProjectDataDO.setId(IdWorker.getId());
businessQCManagementProjectDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
@@ -894,10 +914,10 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteQcSample(DeleteQcSampleReqVO req) {
if ("kby".equals(req.getDictionaryBusinessKey()) || "by".equals(req.getDictionaryBusinessKey())) {//空白样和标样
if ("withoutProject".equals(req.getParentDictionaryBusinesskey())) {//不带检测项目的 空白样和标样
businessQCCoefficientDataMapper.deleteByIds(req.getQcSampleIdList());
businessQCCoefficientParameterDataMapper.delete(new LambdaQueryWrapperX<BusinessQCCoefficientParameterDataDO>().in(BusinessQCCoefficientParameterDataDO::getBusinessQCCoefficientDataId, req.getQcSampleIdList()));
} else { //管理样和标准样
} else { //带检测项目的 管理样和标准样
businessQCManagementDataMapper.deleteByIds(req.getQcSampleIdList());
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataList = businessQCManagementProjectDataMapper.selectByBusinessQCManagementDataIds(req.getQcSampleIdList());
List<Long> businessQCManagementProjectDataIdList = businessQCManagementProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());

View File

@@ -0,0 +1,106 @@
package com.zt.plat.module.qms.business.config.controller.admin;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.constraints.*;
import jakarta.validation.*;
import jakarta.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
import com.zt.plat.module.qms.business.config.service.ConfigAssayMethodParameterService;
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 检测方法参数配置")
@RestController
@RequestMapping("/qms/config-assay-method-parameter")
@Validated
public class ConfigAssayMethodParameterController implements BusinessControllerMarker {
@Resource
private ConfigAssayMethodParameterService configAssayMethodParameterService;
@PostMapping("/create")
@Operation(summary = "创建检测方法参数配置")
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:create')")
public CommonResult<ConfigAssayMethodParameterRespVO> createConfigAssayMethodParameter(@Valid @RequestBody ConfigAssayMethodParameterSaveReqVO createReqVO) {
return success(configAssayMethodParameterService.createConfigAssayMethodParameter(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新检测方法参数配置")
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:update')")
public CommonResult<Boolean> updateConfigAssayMethodParameter(@Valid @RequestBody ConfigAssayMethodParameterSaveReqVO updateReqVO) {
configAssayMethodParameterService.updateConfigAssayMethodParameter(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除检测方法参数配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:delete')")
public CommonResult<Boolean> deleteConfigAssayMethodParameter(@RequestParam("id") Long id) {
configAssayMethodParameterService.deleteConfigAssayMethodParameter(id);
return success(true);
}
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除检测方法参数配置")
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:delete')")
public CommonResult<Boolean> deleteConfigAssayMethodParameterList(@RequestBody BatchDeleteReqVO req) {
configAssayMethodParameterService.deleteConfigAssayMethodParameterListByIds(req.getIds());
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得检测方法参数配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:query')")
public CommonResult<ConfigAssayMethodParameterRespVO> getConfigAssayMethodParameter(@RequestParam("id") Long id) {
ConfigAssayMethodParameterDO configAssayMethodParameter = configAssayMethodParameterService.getConfigAssayMethodParameter(id);
return success(BeanUtils.toBean(configAssayMethodParameter, ConfigAssayMethodParameterRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得检测方法参数配置分页")
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:query')")
public CommonResult<PageResult<ConfigAssayMethodParameterRespVO>> getConfigAssayMethodParameterPage(@Valid ConfigAssayMethodParameterPageReqVO pageReqVO) {
PageResult<ConfigAssayMethodParameterDO> pageResult = configAssayMethodParameterService.getConfigAssayMethodParameterPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ConfigAssayMethodParameterRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出检测方法参数配置 Excel")
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportConfigAssayMethodParameterExcel(@Valid ConfigAssayMethodParameterPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ConfigAssayMethodParameterDO> list = configAssayMethodParameterService.getConfigAssayMethodParameterPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "检测方法参数配置.xls", "数据", ConfigAssayMethodParameterRespVO.class,
BeanUtils.toBean(list, ConfigAssayMethodParameterRespVO.class));
}
}

View File

@@ -0,0 +1,71 @@
package com.zt.plat.module.qms.business.config.controller.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam;
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 ConfigAssayMethodParameterPageReqVO extends PageParam {
@Schema(description = "检测方法ID", example = "29823")
private Long configAssayMethodId;
@Schema(description = "参数名称", example = "张三")
private String parameterName;
@Schema(description = "参数简称", example = "张三")
private String shortName;
@Schema(description = "参数序号")
private Integer no;
@Schema(description = "键值")
private String key;
@Schema(description = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算")
private String fillingWay;
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", example = "1")
private String dataType;
@Schema(description = "小数位")
private Integer decimalPosition;
@Schema(description = "默认值")
private String defaultValue;
@Schema(description = "是否允许为空")
private Integer isNull;
@Schema(description = "pc界面是否显示")
private Integer isShow;
@Schema(description = "排序号")
private Integer sortNo;
@Schema(description = "参数分组_ID,字典表【T_DIC_BSN】参数分组", example = "14680")
private Long dictionaryBusinessId;
@Schema(description = "参数分组_Key,字典表【T_DIC_BSN】参数分组")
private String dictionaryBusinessKey;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "备注")
private String remark;
@Schema(description = "版本")
private Integer version;
}

View File

@@ -0,0 +1,91 @@
package com.zt.plat.module.qms.business.config.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 检测方法参数配置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ConfigAssayMethodParameterRespVO {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12031")
@ExcelProperty("ID")
private Long id;
@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;
@Schema(description = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算")
private String fillingWay;
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间")
private String dataType;
@Schema(description = "小数位")
@ExcelProperty("小数位")
private Integer decimalPosition;
@Schema(description = "默认值")
@ExcelProperty("默认值")
private String defaultValue;
@Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否允许为空")
private Integer isNull;
@Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("pc界面是否显示")
private Integer isShow;
@Schema(description = "排序号")
@ExcelProperty("排序号")
private Integer sortNo;
@Schema(description = "参数分组_ID,字典表【T_DIC_BSN】参数分组", example = "14680")
@ExcelProperty("参数分组_ID,字典表【T_DIC_BSN】参数分组")
private Long dictionaryBusinessId;
@Schema(description = "参数分组_Key,字典表【T_DIC_BSN】参数分组")
@ExcelProperty("参数分组_Key,字典表【T_DIC_BSN】参数分组")
private String dictionaryBusinessKey;
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String systemDepartmentCode;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("版本")
private Integer version;
}

View File

@@ -0,0 +1,74 @@
package com.zt.plat.module.qms.business.config.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
@Schema(description = "管理后台 - 检测方法参数配置新增/修改 Request VO")
@Data
public class ConfigAssayMethodParameterSaveReqVO {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12031")
private Long id;
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29823")
@NotNull(message = "检测方法ID不能为空")
private Long configAssayMethodId;
@Schema(description = "参数名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@NotEmpty(message = "参数名称不能为空")
private String parameterName;
@Schema(description = "参数简称", example = "张三")
private String shortName;
@Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "参数序号不能为空")
private Integer no;
@Schema(description = "键值")
private String key;
@Schema(description = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算不能为空")
private String fillingWay;
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间不能为空")
private String dataType;
@Schema(description = "小数位")
private Integer decimalPosition;
@Schema(description = "默认值")
private String defaultValue;
@Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否允许为空不能为空")
private Integer isNull;
@Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "pc界面是否显示不能为空")
private Integer isShow;
@Schema(description = "排序号")
private Integer sortNo;
@Schema(description = "参数分组_ID,字典表【T_DIC_BSN】参数分组", example = "14680")
private Long dictionaryBusinessId;
@Schema(description = "参数分组_Key,字典表【T_DIC_BSN】参数分组")
private String dictionaryBusinessKey;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "版本不能为空")
private Integer version;
}

View File

@@ -6,6 +6,12 @@ import lombok.Data;
public class ConfigQCSampleMethodExtendRespVO extends ConfigQCSampleMethodRespVO {
private String dictionaryBusinessName;
private String parentDictionaryBusinessId;
private String parentDictionaryBusinessName;
private String parentDictionaryBusinesskey;
private String configAssayMethodName;
}

View File

@@ -40,6 +40,9 @@ public class ConfigQCSampleMethodPageReqVO extends PageParam {
@Schema(description = "映射检测信息配置")
private String configInfomation;
@Schema(description = "必要检测项目")
private String mustProject;
@Schema(description = "排序号")
private Integer sortNo;

View File

@@ -52,6 +52,10 @@ public class ConfigQCSampleMethodRespVO {
@ExcelProperty("映射检测信息配置")
private String configInfomation;
@Schema(description = "必要检测项目")
@ExcelProperty("必要检测项目")
private String mustProject;
@Schema(description = "排序号")
private Integer sortNo;

View File

@@ -46,6 +46,9 @@ public class ConfigQCSampleMethodSaveReqVO {
@Schema(description = "映射检测信息配置")
private String configInfomation;
@Schema(description = "必要检测项目")
private String mustProject;
@Schema(description = "排序号")
private Integer sortNo;

View File

@@ -0,0 +1,120 @@
package com.zt.plat.module.qms.business.config.dal.dataobject;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
/**
* 检测方法参数配置 DO
*
* @author 后台管理-1
*/
@TableName("t_cfg_asy_mthd_prm")
@KeySequence("t_cfg_asy_mthd_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
/**
* 支持业务基类继承isBusiness=true 时继承 BusinessBaseDO否则继承 BaseDO
*/
public class ConfigAssayMethodParameterDO extends BusinessBaseDO {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 检测方法ID
*/
@TableField("CFG_ASY_MTHD_ID")
private Long configAssayMethodId;
/**
* 参数名称
*/
@TableField("PRM_NAME")
private String parameterName;
/**
* 参数简称
*/
@TableField("SHRT_NAME")
private String shortName;
/**
* 参数序号
*/
@TableField("NO")
private Integer no;
/**
* 键值
*/
@TableField("KY")
private String key;
/**
* 填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算
*/
@TableField("FIL_WY")
private String fillingWay;
/**
* 数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间
*/
@TableField("DAT_TP")
private String dataType;
/**
* 小数位
*/
@TableField("DEC_POS")
private Integer decimalPosition;
/**
* 默认值
*/
@TableField("DFT_VAL")
private String defaultValue;
/**
* 是否允许为空
*/
@TableField("IS_NLL")
private Integer isNull;
/**
* pc界面是否显示
*/
@TableField("IS_SHW")
private Integer isShow;
/**
* 排序号
*/
@TableField("SRT_NO")
private Integer sortNo;
/**
* 参数分组_ID,字典表【T_DIC_BSN】参数分组
*/
@TableField("DIC_BSN_ID")
private Long dictionaryBusinessId;
/**
* 参数分组_Key,字典表【T_DIC_BSN】参数分组
*/
@TableField("DIC_BSN_KY")
private String dictionaryBusinessKey;
/**
* 所属部门
*/
@TableField("SYS_DEPT_CD")
private String systemDepartmentCode;
/**
* 备注
*/
@TableField("RMK")
private String remark;
/**
* 版本
*/
@TableField("VER")
private Integer version;
}

View File

@@ -77,6 +77,11 @@ public class ConfigQCSampleMethodDO extends BusinessBaseDO {
@TableField("CFG_INF")
private String configInfomation;
/**
* 必要检测项目
*/
@TableField("MUST_PRJ")
private String mustProject;
/**
* 排序号
*/
@TableField("SRT_NO")

View File

@@ -0,0 +1,43 @@
package com.zt.plat.module.qms.business.config.dal.mapper;
import java.util.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
/**
* 检测方法参数配置 Mapper
*
* @author 后台管理-1
*/
@Mapper
public interface ConfigAssayMethodParameterMapper extends BaseMapperX<ConfigAssayMethodParameterDO> {
default PageResult<ConfigAssayMethodParameterDO> selectPage(ConfigAssayMethodParameterPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodParameterDO>()
.eqIfPresent(ConfigAssayMethodParameterDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.likeIfPresent(ConfigAssayMethodParameterDO::getParameterName, reqVO.getParameterName())
.likeIfPresent(ConfigAssayMethodParameterDO::getShortName, reqVO.getShortName())
.eqIfPresent(ConfigAssayMethodParameterDO::getNo, reqVO.getNo())
.eqIfPresent(ConfigAssayMethodParameterDO::getKey, reqVO.getKey())
.eqIfPresent(ConfigAssayMethodParameterDO::getFillingWay, reqVO.getFillingWay())
.eqIfPresent(ConfigAssayMethodParameterDO::getDataType, reqVO.getDataType())
.eqIfPresent(ConfigAssayMethodParameterDO::getDecimalPosition, reqVO.getDecimalPosition())
.eqIfPresent(ConfigAssayMethodParameterDO::getDefaultValue, reqVO.getDefaultValue())
.eqIfPresent(ConfigAssayMethodParameterDO::getIsNull, reqVO.getIsNull())
.eqIfPresent(ConfigAssayMethodParameterDO::getIsShow, reqVO.getIsShow())
.eqIfPresent(ConfigAssayMethodParameterDO::getSortNo, reqVO.getSortNo())
.eqIfPresent(ConfigAssayMethodParameterDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.eqIfPresent(ConfigAssayMethodParameterDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
.eqIfPresent(ConfigAssayMethodParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(ConfigAssayMethodParameterDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ConfigAssayMethodParameterDO::getRemark, reqVO.getRemark())
.eqIfPresent(ConfigAssayMethodParameterDO::getVersion, reqVO.getVersion())
.orderByDesc(ConfigAssayMethodParameterDO::getId));
}
}

View File

@@ -6,9 +6,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.MPJLambdaWrapperX;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCSampleMethodDO;
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
@@ -32,6 +30,7 @@ public interface ConfigQCSampleMethodMapper extends BaseMapperX<ConfigQCSampleMe
.eqIfPresent(ConfigQCSampleMethodDO::getAssayMinimumCount, reqVO.getAssayMinimumCount())
.eqIfPresent(ConfigQCSampleMethodDO::getIsCorrelation, reqVO.getIsCorrelation())
.eqIfPresent(ConfigQCSampleMethodDO::getConfigInfomation, reqVO.getConfigInfomation())
.eqIfPresent(ConfigQCSampleMethodDO::getMustProject, reqVO.getMustProject())
.eqIfPresent(ConfigQCSampleMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(ConfigQCSampleMethodDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ConfigQCSampleMethodDO::getRemark, reqVO.getRemark())
@@ -41,9 +40,13 @@ public interface ConfigQCSampleMethodMapper extends BaseMapperX<ConfigQCSampleMe
default List<ConfigQCSampleMethodExtendRespVO> selectByConfigAssayMethodId(Long configAssayMethodId) {
return selectJoinList(ConfigQCSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigQCSampleMethodDO>()
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigQCSampleMethodDO::getDictionaryBusinessId)
.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, ConfigQCSampleMethodDO::getDictionaryBusinessId)
.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId)
.selectAll(ConfigQCSampleMethodDO.class)
.selectAs(DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName)
.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName)
.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId)
.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey)
.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName)
.eq(ConfigQCSampleMethodDO::getConfigAssayMethodId, configAssayMethodId)
.orderByAsc(ConfigQCSampleMethodDO::getSortNo));
}

View File

@@ -0,0 +1,62 @@
package com.zt.plat.module.qms.business.config.service;
import java.util.*;
import jakarta.validation.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
import com.zt.plat.framework.common.pojo.PageParam;
/**
* 检测方法参数配置 Service 接口
*
* @author 后台管理-1
*/
public interface ConfigAssayMethodParameterService {
/**
* 创建检测方法参数配置
*
* @param createReqVO 创建信息
* @return 编号
*/
ConfigAssayMethodParameterRespVO createConfigAssayMethodParameter(@Valid ConfigAssayMethodParameterSaveReqVO createReqVO);
/**
* 更新检测方法参数配置
*
* @param updateReqVO 更新信息
*/
void updateConfigAssayMethodParameter(@Valid ConfigAssayMethodParameterSaveReqVO updateReqVO);
/**
* 删除检测方法参数配置
*
* @param id 编号
*/
void deleteConfigAssayMethodParameter(Long id);
/**
* 批量删除检测方法参数配置
*
* @param ids 编号
*/
void deleteConfigAssayMethodParameterListByIds(List<Long> ids);
/**
* 获得检测方法参数配置
*
* @param id 编号
* @return 检测方法参数配置
*/
ConfigAssayMethodParameterDO getConfigAssayMethodParameter(Long id);
/**
* 获得检测方法参数配置分页
*
* @param pageReqVO 分页查询
* @return 检测方法参数配置分页
*/
PageResult<ConfigAssayMethodParameterDO> getConfigAssayMethodParameterPage(ConfigAssayMethodParameterPageReqVO pageReqVO);
}

View File

@@ -0,0 +1,91 @@
package com.zt.plat.module.qms.business.config.service;
import cn.hutool.core.collection.CollUtil;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
/**
* 检测方法参数配置 Service 实现类
*
* @author 后台管理-1
*/
@Service
@Validated
public class ConfigAssayMethodParameterServiceImpl implements ConfigAssayMethodParameterService {
@Resource
private ConfigAssayMethodParameterMapper configAssayMethodParameterMapper;
@Override
public ConfigAssayMethodParameterRespVO createConfigAssayMethodParameter(ConfigAssayMethodParameterSaveReqVO createReqVO) {
// 插入
ConfigAssayMethodParameterDO configAssayMethodParameter = BeanUtils.toBean(createReqVO, ConfigAssayMethodParameterDO.class);
configAssayMethodParameterMapper.insert(configAssayMethodParameter);
// 返回
return BeanUtils.toBean(configAssayMethodParameter, ConfigAssayMethodParameterRespVO.class);
}
@Override
public void updateConfigAssayMethodParameter(ConfigAssayMethodParameterSaveReqVO updateReqVO) {
// 校验存在
validateConfigAssayMethodParameterExists(updateReqVO.getId());
// 更新
ConfigAssayMethodParameterDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodParameterDO.class);
configAssayMethodParameterMapper.updateById(updateObj);
}
@Override
public void deleteConfigAssayMethodParameter(Long id) {
// 校验存在
validateConfigAssayMethodParameterExists(id);
// 删除
configAssayMethodParameterMapper.deleteById(id);
}
@Override
public void deleteConfigAssayMethodParameterListByIds(List<Long> ids) {
// 校验存在
validateConfigAssayMethodParameterExists(ids);
// 删除
configAssayMethodParameterMapper.deleteByIds(ids);
}
private void validateConfigAssayMethodParameterExists(List<Long> ids) {
List<ConfigAssayMethodParameterDO> list = configAssayMethodParameterMapper.selectByIds(ids);
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
throw exception(CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS);
}
}
private void validateConfigAssayMethodParameterExists(Long id) {
if (configAssayMethodParameterMapper.selectById(id) == null) {
throw exception(CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS);
}
}
@Override
public ConfigAssayMethodParameterDO getConfigAssayMethodParameter(Long id) {
return configAssayMethodParameterMapper.selectById(id);
}
@Override
public PageResult<ConfigAssayMethodParameterDO> getConfigAssayMethodParameterPage(ConfigAssayMethodParameterPageReqVO pageReqVO) {
return configAssayMethodParameterMapper.selectPage(pageReqVO);
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>