Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -80,9 +80,9 @@ public class BusinessAssayTaskController implements BusinessControllerMarker {
|
||||
@Operation(summary = "获得检测任务分配业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:business-assay-task:query')")
|
||||
public CommonResult<BusinessAssayTaskRespVO> getBusinessAssayTask(@RequestParam("id") Long id) {
|
||||
BusinessAssayTaskDO businessAssayTask = businessAssayTaskService.getBusinessAssayTask(id);
|
||||
return success(BeanUtils.toBean(businessAssayTask, BusinessAssayTaskRespVO.class));
|
||||
public CommonResult<BusinessAssayTaskExtendRespVO> getBusinessAssayTask(@RequestParam("id") Long id) {
|
||||
BusinessAssayTaskExtendRespVO businessAssayTask = businessAssayTaskService.getBusinessAssayTask(id);
|
||||
return success(businessAssayTask);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
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.BusinessQCDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessQCDataService;
|
||||
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-qc-data")
|
||||
@Validated
|
||||
public class BusinessQCDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessQCDataService businessQCDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建质控样业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-data:create')")
|
||||
public CommonResult<BusinessQCDataRespVO> createBusinessQCData(@Valid @RequestBody BusinessQCDataSaveReqVO createReqVO) {
|
||||
return success(businessQCDataService.createBusinessQCData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新质控样业务")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:business-QC-data:update')")
|
||||
public CommonResult<Boolean> updateBusinessQCData(@Valid @RequestBody BusinessQCDataSaveReqVO updateReqVO) {
|
||||
businessQCDataService.updateBusinessQCData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除质控样业务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessQCData(@RequestParam("id") Long id) {
|
||||
businessQCDataService.deleteBusinessQCData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除质控样业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessQCDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessQCDataService.deleteBusinessQCDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得质控样业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-data:query')")
|
||||
public CommonResult<BusinessQCDataRespVO> getBusinessQCData(@RequestParam("id") Long id) {
|
||||
BusinessQCDataDO businessQCData = businessQCDataService.getBusinessQCData(id);
|
||||
return success(BeanUtils.toBean(businessQCData, BusinessQCDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得质控样业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-data:query')")
|
||||
public CommonResult<PageResult<BusinessQCDataExtendRespVO>> getBusinessQCDataPage(@Valid BusinessQCDataPageReqVO pageReqVO) {
|
||||
PageResult<BusinessQCDataExtendRespVO> pageResult = businessQCDataService.getBusinessQCDataPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得质控样业务列表")
|
||||
public CommonResult<List<BusinessQCDataExtendRespVO>> getBusinessQCDataList(BusinessQCDataReqVO reqVO) {
|
||||
List<BusinessQCDataExtendRespVO> list = businessQCDataService.getBusinessQCDataList(reqVO);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出质控样业务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessQCDataExcel(@Valid BusinessQCDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessQCDataExtendRespVO> list = businessQCDataService.getBusinessQCDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质控样业务.xls", "数据", BusinessQCDataRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessQCDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessQCParameterDataService;
|
||||
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-qc-parameter-data")
|
||||
@Validated
|
||||
public class BusinessQCParameterDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessQCParameterDataService businessQCParameterDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建质控样检测参数数据业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:create')")
|
||||
public CommonResult<BusinessQCParameterDataRespVO> createBusinessQCParameterData(@Valid @RequestBody BusinessQCParameterDataSaveReqVO createReqVO) {
|
||||
return success(businessQCParameterDataService.createBusinessQCParameterData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新质控样检测参数数据业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:update')")
|
||||
public CommonResult<Boolean> updateBusinessQCParameterData(@Valid @RequestBody BusinessQCParameterDataSaveReqVO updateReqVO) {
|
||||
businessQCParameterDataService.updateBusinessQCParameterData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除质控样检测参数数据业务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessQCParameterData(@RequestParam("id") Long id) {
|
||||
businessQCParameterDataService.deleteBusinessQCParameterData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除质控样检测参数数据业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessQCParameterDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessQCParameterDataService.deleteBusinessQCParameterDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得质控样检测参数数据业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:query')")
|
||||
public CommonResult<BusinessQCParameterDataRespVO> getBusinessQCParameterData(@RequestParam("id") Long id) {
|
||||
BusinessQCParameterDataDO businessQCParameterData = businessQCParameterDataService.getBusinessQCParameterData(id);
|
||||
return success(BeanUtils.toBean(businessQCParameterData, BusinessQCParameterDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得质控样检测参数数据业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:query')")
|
||||
public CommonResult<PageResult<BusinessQCParameterDataRespVO>> getBusinessQCParameterDataPage(@Valid BusinessQCParameterDataPageReqVO pageReqVO) {
|
||||
PageResult<BusinessQCParameterDataDO> pageResult = businessQCParameterDataService.getBusinessQCParameterDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessQCParameterDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出质控样检测参数数据业务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-parameter-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessQCParameterDataExcel(@Valid BusinessQCParameterDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessQCParameterDataDO> list = businessQCParameterDataService.getBusinessQCParameterDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质控样检测参数数据业务.xls", "数据", BusinessQCParameterDataRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessQCParameterDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessQCProjectDataService;
|
||||
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-qc-project-data")
|
||||
@Validated
|
||||
public class BusinessQCProjectDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessQCProjectDataService businessQCProjectDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建质控样检测项目数据业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:create')")
|
||||
public CommonResult<BusinessQCProjectDataRespVO> createBusinessQCProjectData(@Valid @RequestBody BusinessQCProjectDataSaveReqVO createReqVO) {
|
||||
return success(businessQCProjectDataService.createBusinessQCProjectData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新质控样检测项目数据业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:update')")
|
||||
public CommonResult<Boolean> updateBusinessQCProjectData(@Valid @RequestBody BusinessQCProjectDataSaveReqVO updateReqVO) {
|
||||
businessQCProjectDataService.updateBusinessQCProjectData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除质控样检测项目数据业务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessQCProjectData(@RequestParam("id") Long id) {
|
||||
businessQCProjectDataService.deleteBusinessQCProjectData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除质控样检测项目数据业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessQCProjectDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessQCProjectDataService.deleteBusinessQCProjectDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得质控样检测项目数据业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:query')")
|
||||
public CommonResult<BusinessQCProjectDataRespVO> getBusinessQCProjectData(@RequestParam("id") Long id) {
|
||||
BusinessQCProjectDataDO businessQCProjectData = businessQCProjectDataService.getBusinessQCProjectData(id);
|
||||
return success(BeanUtils.toBean(businessQCProjectData, BusinessQCProjectDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得质控样检测项目数据业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:query')")
|
||||
public CommonResult<PageResult<BusinessQCProjectDataRespVO>> getBusinessQCProjectDataPage(@Valid BusinessQCProjectDataPageReqVO pageReqVO) {
|
||||
PageResult<BusinessQCProjectDataDO> pageResult = businessQCProjectDataService.getBusinessQCProjectDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessQCProjectDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出质控样检测项目数据业务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-project-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessQCProjectDataExcel(@Valid BusinessQCProjectDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessQCProjectDataDO> list = businessQCProjectDataService.getBusinessQCProjectDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质控样检测项目数据业务.xls", "数据", BusinessQCProjectDataRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessQCProjectDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class SampleTaskAssignController {
|
||||
public CommonResult<?> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
||||
List<Object> list = sampleTaskAssignService.getAssayMethodList(businessSubSampleId, configAssayMethodId);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/changeMethod")
|
||||
public CommonResult<?> changeMethod(@RequestBody ChangeAssayMethodReqVO req) {
|
||||
@@ -80,6 +80,12 @@ public class SampleTaskAssignController {
|
||||
sampleTaskAssignService.removeAssignTaskDetail(req);
|
||||
return success("成功");
|
||||
}
|
||||
|
||||
@PostMapping("/createQcSample")
|
||||
public CommonResult<?> createQcSample(@RequestBody CreateQcSampleReqVO req) {
|
||||
sampleTaskAssignService.createQcSample(req);
|
||||
return success("成功");
|
||||
}
|
||||
|
||||
@PostMapping("/submitAssign")
|
||||
public CommonResult<?> submitAssign(Long id) {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -20,6 +24,12 @@ public class BusinessAssayTaskExtendRespVO extends BusinessAssayTaskRespVO {
|
||||
/** 分析方法名称 **/
|
||||
private String configAssayMethodName;
|
||||
|
||||
/** 分析方法对应的分析项目 **/
|
||||
private String configAssayMethodProjectShowNames;
|
||||
|
||||
/** 分析任务数 **/
|
||||
private Long assayTaskCount;
|
||||
|
||||
/** 质量控制分析方法 **/
|
||||
private List<ConfigQCSampleMethodExtendRespVO> configQCSampleMethodList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BusinessQCDataExtendRespVO extends BusinessQCDataRespVO {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
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 BusinessQCDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", example = "赵六")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "检测方法配置ID", example = "8003")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "29117")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "定值样业务ID", example = "24895")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", example = "9549")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "检测项目")
|
||||
private String assayProject;
|
||||
|
||||
@Schema(description = "分析部门ID", example = "29365")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@Schema(description = "分析部门名称", example = "李四")
|
||||
private String assayDepartmentName;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
|
||||
@Schema(description = "是否已分配任务")
|
||||
private Integer isAssignTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", example = "24118")
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
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 BusinessQCDataReqVO {
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", example = "赵六")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "检测方法配置ID", example = "8003")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "29117")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "定值样业务ID", example = "24895")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", example = "9549")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "检测项目")
|
||||
private String assayProject;
|
||||
|
||||
@Schema(description = "分析部门ID", example = "29365")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@Schema(description = "分析部门名称", example = "李四")
|
||||
private String assayDepartmentName;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
|
||||
@Schema(description = "是否已分配任务")
|
||||
private Integer isAssignTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", example = "24118")
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
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 BusinessQCDataRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8465")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("样品名称")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8003")
|
||||
@ExcelProperty("检测方法配置ID")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "29117")
|
||||
@ExcelProperty("指派单ID")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "定值样业务ID", example = "24895")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", example = "9549")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "检测项目", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("检测项目")
|
||||
private String assayProject;
|
||||
|
||||
@Schema(description = "分析部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29365")
|
||||
@ExcelProperty("分析部门ID")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@Schema(description = "分析部门名称", example = "李四")
|
||||
@ExcelProperty("分析部门名称")
|
||||
private String assayDepartmentName;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@ExcelProperty("分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
|
||||
@Schema(description = "是否已分配任务")
|
||||
@ExcelProperty("是否已分配任务")
|
||||
private Integer isAssignTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
@ExcelProperty("是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
@ExcelProperty("上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "24118")
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
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.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 质控样业务新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessQCDataSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8465")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "样品编号不能为空")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotNull(message = "样品名称不能为空")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8003")
|
||||
@NotNull(message = "检测方法配置ID不能为空")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "29117")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "定值样业务ID", example = "24895")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", example = "9549")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "检测项目", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "检测项目不能为空")
|
||||
private String assayProject;
|
||||
|
||||
@Schema(description = "分析部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29365")
|
||||
@NotNull(message = "分析部门ID不能为空")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@Schema(description = "分析部门名称", example = "李四")
|
||||
private String assayDepartmentName;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
|
||||
@Schema(description = "是否已分配任务")
|
||||
private Integer isAssignTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "24118")
|
||||
@NotNull(message = "乐观锁不能为空")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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 BusinessQCParameterDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "检测项目业务ID", example = "28949")
|
||||
private Long businessQCProjectDataId;
|
||||
|
||||
@Schema(description = "检测方法分析项目参数配置表ID", example = "21530")
|
||||
private Long configAssayMethodProjectParameterId;
|
||||
|
||||
@Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "5071")
|
||||
private Long dictionaryParameterId;
|
||||
|
||||
@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 = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "乐观锁", example = "24150")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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 BusinessQCParameterDataRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6511")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检测项目业务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28949")
|
||||
@ExcelProperty("检测项目业务ID")
|
||||
private Long businessQCProjectDataId;
|
||||
|
||||
@Schema(description = "检测方法分析项目参数配置表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21530")
|
||||
@ExcelProperty("检测方法分析项目参数配置表ID")
|
||||
private Long configAssayMethodProjectParameterId;
|
||||
|
||||
@Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "5071")
|
||||
@ExcelProperty("参数ID,字典表【T_DIC_PRM】")
|
||||
private Long dictionaryParameterId;
|
||||
|
||||
@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 = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "24150")
|
||||
@ExcelProperty("乐观锁")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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 BusinessQCParameterDataSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6511")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检测项目业务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28949")
|
||||
@NotNull(message = "检测项目业务ID不能为空")
|
||||
private Long businessQCProjectDataId;
|
||||
|
||||
@Schema(description = "检测方法分析项目参数配置表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21530")
|
||||
@NotNull(message = "检测方法分析项目参数配置表ID不能为空")
|
||||
private Long configAssayMethodProjectParameterId;
|
||||
|
||||
@Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "5071")
|
||||
@NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空")
|
||||
private Long dictionaryParameterId;
|
||||
|
||||
@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 = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "24150")
|
||||
@NotNull(message = "乐观锁不能为空")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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 BusinessQCProjectDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "检测任务ID", example = "19978")
|
||||
private Long businessQCDataId;
|
||||
|
||||
@Schema(description = "检测方法分析项目配置ID", example = "4744")
|
||||
private Long configAssayMethodProjectId;
|
||||
|
||||
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", example = "1375")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||
private String usage;
|
||||
|
||||
@Schema(description = "符号,=、>、<、等")
|
||||
private String symbol;
|
||||
|
||||
@Schema(description = "值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "2")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "是否不参与超差判定")
|
||||
private Integer isNotAssessment;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private Integer isEnabled;
|
||||
|
||||
@Schema(description = "乐观锁", example = "25139")
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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 BusinessQCProjectDataRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30726")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19978")
|
||||
@ExcelProperty("检测任务ID")
|
||||
private Long businessQCDataId;
|
||||
|
||||
@Schema(description = "检测方法分析项目配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4744")
|
||||
@ExcelProperty("检测方法分析项目配置ID")
|
||||
private Long configAssayMethodProjectId;
|
||||
|
||||
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "1375")
|
||||
@ExcelProperty("检测项目字典ID,字典表【T_DIC_PRJ】")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||
@ExcelProperty("用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||
private String usage;
|
||||
|
||||
@Schema(description = "符号,=、>、<、等")
|
||||
@ExcelProperty("符号,=、>、<、等")
|
||||
private String symbol;
|
||||
|
||||
@Schema(description = "值")
|
||||
@ExcelProperty("值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
@ExcelProperty("小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "是否不参与超差判定", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否不参与超差判定")
|
||||
private Integer isNotAssessment;
|
||||
|
||||
@Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否启用")
|
||||
private Integer isEnabled;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "25139")
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
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 BusinessQCProjectDataSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30726")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19978")
|
||||
@NotNull(message = "检测任务ID不能为空")
|
||||
private Long businessQCDataId;
|
||||
|
||||
@Schema(description = "检测方法分析项目配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4744")
|
||||
@NotNull(message = "检测方法分析项目配置ID不能为空")
|
||||
private Long configAssayMethodProjectId;
|
||||
|
||||
@Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "1375")
|
||||
@NotNull(message = "检测项目字典ID,字典表【T_DIC_PRJ】不能为空")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "用途,ingredient-配料、report-报出、ingredient_report-配料及报出")
|
||||
private String usage;
|
||||
|
||||
@Schema(description = "符号,=、>、<、等")
|
||||
private String symbol;
|
||||
|
||||
@Schema(description = "值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间不能为空")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "是否不参与超差判定", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否不参与超差判定不能为空")
|
||||
private Integer isNotAssessment;
|
||||
|
||||
@Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否启用不能为空")
|
||||
private Integer isEnabled;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "25139")
|
||||
@NotNull(message = "乐观锁不能为空")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CreateQcSampleReqVO {
|
||||
|
||||
@Schema(description = "样品名称", example = "张三")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "指派单ID", example = "29117")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "定值样业务ID", example = "24895")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "质控样分析方法id")
|
||||
private Long configQCAssayMethodId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", example = "9549")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 质控样业务 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_bsn_qc_dat")
|
||||
@KeySequence("t_bsn_qc_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class BusinessQCDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 样品编号
|
||||
*/
|
||||
@TableField("SMP_CD")
|
||||
private String sampleCode;
|
||||
/**
|
||||
* 样品名称
|
||||
*/
|
||||
@TableField("SMP_NAME")
|
||||
private String sampleName;
|
||||
/**
|
||||
* 检测方法配置ID
|
||||
*/
|
||||
@TableField("CFG_ASY_MTHD_ID")
|
||||
private Long configAssayMethodId;
|
||||
/**
|
||||
* 指派单ID
|
||||
*/
|
||||
@TableField("BSN_ASY_TSK_ID")
|
||||
private Long businessAssayTaskId;
|
||||
/**
|
||||
* 定值样业务ID
|
||||
*/
|
||||
@TableField("BSN_STD_SMP_ID")
|
||||
private Long businessStandardSampleId;
|
||||
/**
|
||||
* 质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样
|
||||
*/
|
||||
@TableField("DIC_BSN_ID")
|
||||
private Long dictionaryBusinessId;
|
||||
/**
|
||||
* 质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样
|
||||
*/
|
||||
@TableField("DIC_BSN_KY")
|
||||
private String dictionaryBusinessKey;
|
||||
/**
|
||||
* 检测项目
|
||||
*/
|
||||
@TableField("ASY_PRJ")
|
||||
private String assayProject;
|
||||
/**
|
||||
* 分析部门ID
|
||||
*/
|
||||
@TableField("ASY_DEPT_ID")
|
||||
private Long assayDepartmentId;
|
||||
/**
|
||||
* 分析部门名称
|
||||
*/
|
||||
@TableField("ASY_DEPT_NAME")
|
||||
private String assayDepartmentName;
|
||||
/**
|
||||
* 分析人
|
||||
*/
|
||||
@TableField("ASY_OPTR")
|
||||
private String assayOperator;
|
||||
/**
|
||||
* 分配任务时间
|
||||
*/
|
||||
@TableField("ASN_TSK_TM")
|
||||
private LocalDateTime assignTaskTime;
|
||||
/**
|
||||
* 是否已分配任务
|
||||
*/
|
||||
@TableField("IS_ASN_TSKD")
|
||||
private Integer isAssignTasked;
|
||||
/**
|
||||
* 是否已上报
|
||||
*/
|
||||
@TableField("IS_RPOD")
|
||||
private Integer isReported;
|
||||
/**
|
||||
* 上报人
|
||||
*/
|
||||
@TableField("RPTR")
|
||||
private String reporter;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
@TableField("RPT_TM")
|
||||
private LocalDateTime reportTime;
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
@TableField("UPD_CNT")
|
||||
private Integer updateCount;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
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 后台管理
|
||||
*/
|
||||
@TableName("t_bsn_qc_prm_dat")
|
||||
@KeySequence("t_bsn_qc_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 BusinessQCParameterDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 检测项目业务ID
|
||||
*/
|
||||
@TableField("BSN_QC_PRJ_DAT_ID")
|
||||
private Long businessQCProjectDataId;
|
||||
/**
|
||||
* 检测方法分析项目参数配置表ID
|
||||
*/
|
||||
@TableField("CFG_ASY_MTHD_PRJ_PRM_ID")
|
||||
private Long configAssayMethodProjectParameterId;
|
||||
/**
|
||||
* 参数ID,字典表【T_DIC_PRM】
|
||||
*/
|
||||
@TableField("DIC_PRM_ID")
|
||||
private Long dictionaryParameterId;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@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("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
@TableField("UPD_CNT")
|
||||
private Integer updateCount;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
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 后台管理
|
||||
*/
|
||||
@TableName("t_bsn_qc_prj_dat")
|
||||
@KeySequence("t_bsn_qc_prj_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class BusinessQCProjectDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 检测任务ID
|
||||
*/
|
||||
@TableField("BSN_QC_DAT_ID")
|
||||
private Long businessQCDataId;
|
||||
/**
|
||||
* 检测方法分析项目配置ID
|
||||
*/
|
||||
@TableField("CFG_ASY_MTHD_PRJ_ID")
|
||||
private Long configAssayMethodProjectId;
|
||||
/**
|
||||
* 检测项目字典ID,字典表【T_DIC_PRJ】
|
||||
*/
|
||||
@TableField("DIC_PRJ_ID")
|
||||
private Long dictionaryProjectId;
|
||||
/**
|
||||
* 用途,ingredient-配料、report-报出、ingredient_report-配料及报出、quality_control-品质控制
|
||||
*/
|
||||
@TableField("USG")
|
||||
private String usage;
|
||||
/**
|
||||
* 符号,=、>、<、等
|
||||
*/
|
||||
@TableField("SMB")
|
||||
private String symbol;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@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("IS_NT_ASMT")
|
||||
private Integer isNotAssessment;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENBD")
|
||||
private Integer isEnabled;
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
@TableField("UPD_CNT")
|
||||
private Integer updateCount;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -60,6 +60,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
||||
.orderByDesc(BusinessAssayTaskDO::getId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据分析方法、 分析人和分配人 查询进行中的任务分配单。
|
||||
* @param configAssayMethodId 分析方法
|
||||
@@ -75,4 +76,17 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
||||
.eq(BusinessAssayTaskDO::getTaskAssignStatus, QmsCommonConstant.IN_PROGRESS));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询分配任务单
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
default BusinessAssayTaskExtendRespVO selectBusinessAssayTaskById(Long id) {
|
||||
return selectJoinOne(BusinessAssayTaskExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDO>()
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDO::getConfigAssayMethodId)
|
||||
.selectAll(BusinessAssayTaskDO.class)
|
||||
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskExtendRespVO::getConfigAssayMethodName)
|
||||
.eq(BusinessAssayTaskDO::getId, id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
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.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.BusinessQCDataDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 质控样业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessQCDataMapper extends BaseMapperX<BusinessQCDataDO> {
|
||||
|
||||
default PageResult<BusinessQCDataExtendRespVO> selectPage(BusinessQCDataPageReqVO reqVO) {
|
||||
return selectJoinPage(reqVO, BusinessQCDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessQCDataDO>()
|
||||
.eqIfPresent(BusinessQCDataDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessQCDataDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessQCDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessQCDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
.eqIfPresent(BusinessQCDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.eqIfPresent(BusinessQCDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||
.eqIfPresent(BusinessQCDataDO::getAssayProject, reqVO.getAssayProject())
|
||||
.eqIfPresent(BusinessQCDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessQCDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessQCDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.betweenIfPresent(BusinessQCDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessQCDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessQCDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessQCDataDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessQCDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessQCDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessQCDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessQCDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessQCDataDO::getId));
|
||||
}
|
||||
|
||||
default List<BusinessQCDataExtendRespVO> selectList(BusinessQCDataReqVO reqVO) {
|
||||
return selectJoinList(BusinessQCDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessQCDataDO>()
|
||||
.eqIfPresent(BusinessQCDataDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessQCDataDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessQCDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessQCDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
.eqIfPresent(BusinessQCDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.eqIfPresent(BusinessQCDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||
.eqIfPresent(BusinessQCDataDO::getAssayProject, reqVO.getAssayProject())
|
||||
.eqIfPresent(BusinessQCDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessQCDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessQCDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.betweenIfPresent(BusinessQCDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessQCDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessQCDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessQCDataDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessQCDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessQCDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessQCDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessQCDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessQCDataDO::getId));
|
||||
}
|
||||
|
||||
default List<BusinessQCDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessQCDataDO>()
|
||||
.eq(BusinessQCDataDO::getBusinessAssayTaskId, businessAssayTaskId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 质控样检测参数数据业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessQCParameterDataMapper extends BaseMapperX<BusinessQCParameterDataDO> {
|
||||
|
||||
default PageResult<BusinessQCParameterDataDO> selectPage(BusinessQCParameterDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCParameterDataDO>()
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getBusinessQCProjectDataId, reqVO.getBusinessQCProjectDataId())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getConfigAssayMethodProjectParameterId, reqVO.getConfigAssayMethodProjectParameterId())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getDictionaryParameterId, reqVO.getDictionaryParameterId())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getValue, reqVO.getValue())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessQCParameterDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCParameterDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessQCParameterDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
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.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 质控样检测项目数据业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessQCProjectDataMapper extends BaseMapperX<BusinessQCProjectDataDO> {
|
||||
|
||||
default PageResult<BusinessQCProjectDataDO> selectPage(BusinessQCProjectDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCProjectDataDO>()
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getBusinessQCDataId, reqVO.getBusinessQCDataId())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getUsage, reqVO.getUsage())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getSymbol, reqVO.getSymbol())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getValue, reqVO.getValue())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getIsNotAssessment, reqVO.getIsNotAssessment())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getIsEnabled, reqVO.getIsEnabled())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessQCProjectDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessQCProjectDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessQCProjectDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,15 @@ import cn.hutool.core.collection.CollUtil;
|
||||
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.BusinessAssayTaskDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDetailMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCParameterDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCProjectDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleTaskAssignContext;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@@ -26,6 +32,15 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCDataMapper businessQCDataMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCProjectDataMapper businessQCProjectDataMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCParameterDataMapper businessQCParameterDataMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
@@ -39,6 +54,12 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
||||
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = sampleTaskAssignContext.getBusinessAssayTaskDataList();
|
||||
|
||||
List<BusinessQCDataDO> businessQCDataList = sampleTaskAssignContext.getBusinessQCDataList();
|
||||
|
||||
List<BusinessQCProjectDataDO> businessQCProjectDataList = sampleTaskAssignContext.getBusinessQCProjectDataList();
|
||||
|
||||
List<BusinessQCParameterDataDO> businessQCParameterDataList = sampleTaskAssignContext.getBusinessQCParameterDataList();
|
||||
|
||||
if (CollUtil.isNotEmpty(savebusinessAssayTaskList)) {
|
||||
this.businessAssayTaskMapper.insertBatch(savebusinessAssayTaskList);
|
||||
}
|
||||
@@ -54,6 +75,18 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
||||
if (CollUtil.isNotEmpty(businessAssayTaskDataList)) {
|
||||
this.businessAssayTaskDataMapper.updateBatch(businessAssayTaskDataList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(businessQCDataList)) {
|
||||
this.businessQCDataMapper.insertBatch(businessQCDataList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(businessQCProjectDataList)) {
|
||||
this.businessQCProjectDataMapper.insertBatch(businessQCProjectDataList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(businessQCParameterDataList)) {
|
||||
this.businessQCParameterDataMapper.insertBatch(businessQCParameterDataList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.zt.plat.module.qms.business.bus.liteflow.sample.taskassign;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
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.dal.dataobject.BusinessAssayTaskDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleTaskAssignContext;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectExtendRespVO;
|
||||
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.ConfigAssayMethodProjectParameterDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMapper;
|
||||
import com.zt.plat.module.qms.core.code.SequenceUtil;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@LiteflowComponent(id = "sampleTaskAssignQCSampleCmp", name = "任务分配质量控制样品")
|
||||
public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private SequenceUtil sequenceUtil;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodMapper configAssayMethodMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigQCSampleMethodMapper configQCSampleMethodMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCDataMapper businessQCDataMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
|
||||
|
||||
List<BusinessQCDataDO> businessQCDataDOList = new ArrayList<>();
|
||||
List<BusinessQCProjectDataDO> businessQCProjectDataDOList = new ArrayList<>();
|
||||
List<BusinessQCParameterDataDO> businessQCParameterDataDOList = new ArrayList<>();
|
||||
|
||||
//分配任务
|
||||
List<BusinessAssayTaskDO> businessAssayTaskList = new ArrayList<>();
|
||||
//获取需要保存的分配任务
|
||||
List<BusinessAssayTaskDO> saveBusinessAssayTaskList = sampleTaskAssignContext.getSaveBusinessAssayTaskList();
|
||||
//获取需要修改的分配任务
|
||||
List<BusinessAssayTaskDO> updateBusinessAssayTaskList = sampleTaskAssignContext.getUpdateBusinessAssayTaskList();
|
||||
businessAssayTaskList.addAll(saveBusinessAssayTaskList);
|
||||
businessAssayTaskList.addAll(updateBusinessAssayTaskList);
|
||||
|
||||
//获取分配任务的分析方法id列表
|
||||
List<Long> configAssayMethodIdList = businessAssayTaskList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||
|
||||
//获取分析方法对应的质控分析配置
|
||||
List<ConfigQCSampleMethodExtendRespVO> configQCSampleMethodList = configQCSampleMethodMapper.selectByConfigAssayMethodIds(configAssayMethodIdList);
|
||||
if (configQCSampleMethodList == null) {//如果未配置质控样品方法,则直接返回
|
||||
return;
|
||||
}
|
||||
//获取质控分析方法id列表
|
||||
List<Long> configQCAssayMethodIdList = configQCSampleMethodList.stream().map(m -> m.getConfigQCAssayMethodId()).distinct().collect(Collectors.toList());
|
||||
//获取质控分析方法
|
||||
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectByIds(configQCAssayMethodIdList);
|
||||
//获取质控分析方法检测项目
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodIds(configQCAssayMethodIdList);
|
||||
//获取质控分析方法检测项目参数
|
||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodIds(configQCAssayMethodIdList);
|
||||
|
||||
//循环分配任务
|
||||
for (BusinessAssayTaskDO businessAssayTaskDO : businessAssayTaskList) {
|
||||
ConfigQCSampleMethodExtendRespVO configQCSampleMethodExtendRespVO = configQCSampleMethodList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDO.getConfigAssayMethodId()) && "kby".equals(f.getDictionaryBusinessKey())).findFirst().orElse(null);
|
||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodList.stream().filter(f -> f.getId().equals(configQCSampleMethodExtendRespVO.getConfigQCAssayMethodId())).findFirst().orElse(null);
|
||||
String assayProject = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodDO.getId())).map(m -> m.getShowName()).collect(Collectors.joining(","));
|
||||
|
||||
//查询下质控数据,如果存在则跳出循环
|
||||
List<BusinessQCDataDO> businessQCDataList = businessQCDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||
//如果存在则跳出循环
|
||||
if (CollUtil.isNotEmpty(businessQCDataList)) {
|
||||
break;
|
||||
}
|
||||
|
||||
//根据默认配置的个数生成空白样
|
||||
for (int i = 0; i < configQCSampleMethodExtendRespVO.getDefaultCount(); i++) {
|
||||
|
||||
BusinessQCDataDO businessQCDataDO = new BusinessQCDataDO();
|
||||
businessQCDataDO.setId(IdWorker.getId());
|
||||
businessQCDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||
businessQCDataDO.setConfigAssayMethodId(configQCSampleMethodExtendRespVO.getConfigQCAssayMethodId());
|
||||
businessQCDataDO.setSampleName(configQCSampleMethodExtendRespVO.getDictionaryBusinessName());
|
||||
if (StringUtils.isNotBlank(configQCSampleMethodExtendRespVO.getCodeRule())) {
|
||||
String codeSample = sequenceUtil.genCode(configQCSampleMethodExtendRespVO.getCodeRule());
|
||||
businessQCDataDO.setSampleCode(codeSample);
|
||||
}
|
||||
businessQCDataDO.setDictionaryBusinessId(configQCSampleMethodExtendRespVO.getDictionaryBusinessId());
|
||||
businessQCDataDO.setDictionaryBusinessKey(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey());
|
||||
businessQCDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||
businessQCDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||
businessQCDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
|
||||
businessQCDataDO.setAssayProject(assayProject);
|
||||
businessQCDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
|
||||
businessQCDataDO.setIsAssignTasked(QmsCommonConstant.YES);
|
||||
businessQCDataDO.setIsReported(QmsCommonConstant.NO);
|
||||
|
||||
businessQCDataDOList.add(businessQCDataDO);
|
||||
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodDO.getId())).collect(Collectors.toList());
|
||||
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
|
||||
BusinessQCProjectDataDO businessQCProjectDataDO = new BusinessQCProjectDataDO();
|
||||
businessQCProjectDataDO.setId(IdWorker.getId());
|
||||
businessQCProjectDataDO.setBusinessQCDataId(businessQCDataDO.getId());
|
||||
businessQCProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectExtendRespVO.getId());
|
||||
businessQCProjectDataDO.setDictionaryProjectId(configAssayMethodProjectExtendRespVO.getDictionaryProjectId());
|
||||
businessQCProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_QUALITY_CONTROL);
|
||||
businessQCProjectDataDO.setSymbol("=");
|
||||
businessQCProjectDataDO.setDataType(configAssayMethodProjectExtendRespVO.getDataType());
|
||||
businessQCProjectDataDO.setDecimalPosition(configAssayMethodProjectExtendRespVO.getDecimalPosition());
|
||||
businessQCProjectDataDO.setIsEnabled(configAssayMethodProjectExtendRespVO.getIsDefaultEnabled());
|
||||
|
||||
businessQCProjectDataDOList.add(businessQCProjectDataDO);
|
||||
|
||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDoList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectExtendRespVO.getId())).collect(Collectors.toList());
|
||||
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDoList) {
|
||||
BusinessQCParameterDataDO businessQCParameterDataDO = new BusinessQCParameterDataDO();
|
||||
businessQCParameterDataDO.setBusinessQCProjectDataId(businessQCProjectDataDO.getId());
|
||||
businessQCParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
|
||||
businessQCParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||
businessQCParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||
businessQCParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||
|
||||
businessQCParameterDataDOList.add(businessQCParameterDataDO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
sampleTaskAssignContext.setBusinessQCDataList(businessQCDataDOList);
|
||||
sampleTaskAssignContext.setBusinessQCProjectDataList(businessQCProjectDataDOList);
|
||||
sampleTaskAssignContext.setBusinessQCParameterDataList(businessQCParameterDataDOList);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,9 @@ import com.zt.plat.framework.security.core.LoginUser;
|
||||
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.BusinessAssayTaskDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.param.AssignAssayUser;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
@@ -81,5 +84,14 @@ public class SampleTaskAssignContext {
|
||||
|
||||
/** 任务指派的明细列表 **/
|
||||
private List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList;
|
||||
|
||||
/** 质控样品数据 **/
|
||||
private List<BusinessQCDataDO> businessQCDataList;
|
||||
|
||||
/** 质控样检测项目数据 **/
|
||||
private List<BusinessQCProjectDataDO> businessQCProjectDataList;
|
||||
|
||||
/** 质控样检测项目参数数据 **/
|
||||
private List<BusinessQCParameterDataDO> businessQCParameterDataList;
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public interface BusinessAssayTaskService {
|
||||
* @param id 编号
|
||||
* @return 检测任务分配业务
|
||||
*/
|
||||
BusinessAssayTaskDO getBusinessAssayTask(Long id);
|
||||
BusinessAssayTaskExtendRespVO getBusinessAssayTask(Long id);
|
||||
|
||||
/**
|
||||
* 获得检测任务分配业务分页
|
||||
|
||||
@@ -10,16 +10,18 @@ import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
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.BusinessAssayTaskDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskMapper;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMapper;
|
||||
|
||||
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.*;
|
||||
|
||||
/**
|
||||
@@ -33,6 +35,12 @@ public class BusinessAssayTaskServiceImpl implements BusinessAssayTaskService {
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskMapper businessAssayTaskMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigQCSampleMethodMapper configQCSampleMethodMapper;
|
||||
|
||||
@Override
|
||||
public BusinessAssayTaskRespVO createBusinessAssayTask(BusinessAssayTaskSaveReqVO createReqVO) {
|
||||
@@ -61,12 +69,12 @@ public class BusinessAssayTaskServiceImpl implements BusinessAssayTaskService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessAssayTaskListByIds(List<Long> ids) {
|
||||
public void deleteBusinessAssayTaskListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessAssayTaskExists(ids);
|
||||
// 删除
|
||||
businessAssayTaskMapper.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessAssayTaskExists(List<Long> ids) {
|
||||
List<BusinessAssayTaskDO> list = businessAssayTaskMapper.selectByIds(ids);
|
||||
@@ -82,8 +90,14 @@ public class BusinessAssayTaskServiceImpl implements BusinessAssayTaskService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessAssayTaskDO getBusinessAssayTask(Long id) {
|
||||
return businessAssayTaskMapper.selectById(id);
|
||||
public BusinessAssayTaskExtendRespVO getBusinessAssayTask(Long id) {
|
||||
BusinessAssayTaskExtendRespVO businessAssayTaskExtendRespVO = businessAssayTaskMapper.selectBusinessAssayTaskById(id);
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskExtendRespVO.getConfigAssayMethodId());
|
||||
String assayProject = configAssayMethodProjectList.stream().map(m -> m.getShowName()).collect(Collectors.joining(","));
|
||||
businessAssayTaskExtendRespVO.setConfigAssayMethodProjectShowNames(assayProject);
|
||||
List<ConfigQCSampleMethodExtendRespVO> configQCSampleMethodList = configQCSampleMethodMapper.selectByConfigAssayMethodId(businessAssayTaskExtendRespVO.getConfigAssayMethodId());
|
||||
businessAssayTaskExtendRespVO.setConfigQCSampleMethodList(configQCSampleMethodList);
|
||||
return businessAssayTaskExtendRespVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
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.BusinessQCDataDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 质控样业务 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessQCDataService {
|
||||
|
||||
/**
|
||||
* 创建质控样业务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessQCDataRespVO createBusinessQCData(@Valid BusinessQCDataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新质控样业务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessQCData(@Valid BusinessQCDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除质控样业务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessQCData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除质控样业务
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessQCDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得质控样业务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 质控样业务
|
||||
*/
|
||||
BusinessQCDataDO getBusinessQCData(Long id);
|
||||
|
||||
/**
|
||||
* 获得质控样业务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 质控样业务分页
|
||||
*/
|
||||
PageResult<BusinessQCDataExtendRespVO> getBusinessQCDataPage(BusinessQCDataPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获取质控样业务列表
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<BusinessQCDataExtendRespVO> getBusinessQCDataList(BusinessQCDataReqVO reqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
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.BusinessQCDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCDataMapper;
|
||||
|
||||
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 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessQCDataServiceImpl implements BusinessQCDataService {
|
||||
|
||||
@Resource
|
||||
private BusinessQCDataMapper businessQCDataMapper;
|
||||
|
||||
@Override
|
||||
public BusinessQCDataRespVO createBusinessQCData(BusinessQCDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessQCDataDO businessQCData = BeanUtils.toBean(createReqVO, BusinessQCDataDO.class);
|
||||
businessQCDataMapper.insert(businessQCData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessQCData, BusinessQCDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessQCData(BusinessQCDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessQCDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessQCDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessQCDataDO.class);
|
||||
businessQCDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessQCData(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessQCDataExists(id);
|
||||
// 删除
|
||||
businessQCDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessQCDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessQCDataExists(ids);
|
||||
// 删除
|
||||
businessQCDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessQCDataExists(List<Long> ids) {
|
||||
List<BusinessQCDataDO> list = businessQCDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_QC_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessQCDataExists(Long id) {
|
||||
if (businessQCDataMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_QC_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessQCDataDO getBusinessQCData(Long id) {
|
||||
return businessQCDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessQCDataExtendRespVO> getBusinessQCDataPage(BusinessQCDataPageReqVO pageReqVO) {
|
||||
return businessQCDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessQCDataExtendRespVO> getBusinessQCDataList(BusinessQCDataReqVO reqVO) {
|
||||
return businessQCDataMapper.selectList(reqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 质控样检测参数数据业务 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessQCParameterDataService {
|
||||
|
||||
/**
|
||||
* 创建质控样检测参数数据业务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessQCParameterDataRespVO createBusinessQCParameterData(@Valid BusinessQCParameterDataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新质控样检测参数数据业务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessQCParameterData(@Valid BusinessQCParameterDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除质控样检测参数数据业务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessQCParameterData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除质控样检测参数数据业务
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessQCParameterDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得质控样检测参数数据业务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 质控样检测参数数据业务
|
||||
*/
|
||||
BusinessQCParameterDataDO getBusinessQCParameterData(Long id);
|
||||
|
||||
/**
|
||||
* 获得质控样检测参数数据业务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 质控样检测参数数据业务分页
|
||||
*/
|
||||
PageResult<BusinessQCParameterDataDO> getBusinessQCParameterDataPage(BusinessQCParameterDataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -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.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCParameterDataMapper;
|
||||
|
||||
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 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessQCParameterDataServiceImpl implements BusinessQCParameterDataService {
|
||||
|
||||
@Resource
|
||||
private BusinessQCParameterDataMapper businessQCParameterDataMapper;
|
||||
|
||||
@Override
|
||||
public BusinessQCParameterDataRespVO createBusinessQCParameterData(BusinessQCParameterDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessQCParameterDataDO businessQCParameterData = BeanUtils.toBean(createReqVO, BusinessQCParameterDataDO.class);
|
||||
businessQCParameterDataMapper.insert(businessQCParameterData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessQCParameterData, BusinessQCParameterDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessQCParameterData(BusinessQCParameterDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessQCParameterDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessQCParameterDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessQCParameterDataDO.class);
|
||||
businessQCParameterDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessQCParameterData(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessQCParameterDataExists(id);
|
||||
// 删除
|
||||
businessQCParameterDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessQCParameterDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessQCParameterDataExists(ids);
|
||||
// 删除
|
||||
businessQCParameterDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessQCParameterDataExists(List<Long> ids) {
|
||||
List<BusinessQCParameterDataDO> list = businessQCParameterDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_QC_PARAMETER_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessQCParameterDataExists(Long id) {
|
||||
if (businessQCParameterDataMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_QC_PARAMETER_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessQCParameterDataDO getBusinessQCParameterData(Long id) {
|
||||
return businessQCParameterDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessQCParameterDataDO> getBusinessQCParameterDataPage(BusinessQCParameterDataPageReqVO pageReqVO) {
|
||||
return businessQCParameterDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 质控样检测项目数据业务 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessQCProjectDataService {
|
||||
|
||||
/**
|
||||
* 创建质控样检测项目数据业务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessQCProjectDataRespVO createBusinessQCProjectData(@Valid BusinessQCProjectDataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新质控样检测项目数据业务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessQCProjectData(@Valid BusinessQCProjectDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除质控样检测项目数据业务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessQCProjectData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除质控样检测项目数据业务
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessQCProjectDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得质控样检测项目数据业务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 质控样检测项目数据业务
|
||||
*/
|
||||
BusinessQCProjectDataDO getBusinessQCProjectData(Long id);
|
||||
|
||||
/**
|
||||
* 获得质控样检测项目数据业务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 质控样检测项目数据业务分页
|
||||
*/
|
||||
PageResult<BusinessQCProjectDataDO> getBusinessQCProjectDataPage(BusinessQCProjectDataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -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.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCProjectDataMapper;
|
||||
|
||||
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 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessQCProjectDataServiceImpl implements BusinessQCProjectDataService {
|
||||
|
||||
@Resource
|
||||
private BusinessQCProjectDataMapper businessQCProjectDataMapper;
|
||||
|
||||
@Override
|
||||
public BusinessQCProjectDataRespVO createBusinessQCProjectData(BusinessQCProjectDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessQCProjectDataDO businessQCProjectData = BeanUtils.toBean(createReqVO, BusinessQCProjectDataDO.class);
|
||||
businessQCProjectDataMapper.insert(businessQCProjectData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessQCProjectData, BusinessQCProjectDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessQCProjectData(BusinessQCProjectDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessQCProjectDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessQCProjectDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessQCProjectDataDO.class);
|
||||
businessQCProjectDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessQCProjectData(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessQCProjectDataExists(id);
|
||||
// 删除
|
||||
businessQCProjectDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessQCProjectDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessQCProjectDataExists(ids);
|
||||
// 删除
|
||||
businessQCProjectDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessQCProjectDataExists(List<Long> ids) {
|
||||
List<BusinessQCProjectDataDO> list = businessQCProjectDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_QC_PROJECT_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessQCProjectDataExists(Long id) {
|
||||
if (businessQCProjectDataMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_QC_PROJECT_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessQCProjectDataDO getBusinessQCProjectData(Long id) {
|
||||
return businessQCProjectDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessQCProjectDataDO> getBusinessQCProjectDataPage(BusinessQCProjectDataPageReqVO pageReqVO) {
|
||||
return businessQCProjectDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -406,12 +406,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
businessSubSampleAssessmentDO.setAssessmentStatus(QmsCommonConstant.NORMAL);
|
||||
businessSubSampleAssessmentDO.setAssessmentValue(businessAssayProjectDataDO.getValue());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataDOList) {
|
||||
|
||||
@@ -75,5 +75,11 @@ public interface SampleTaskAssignService {
|
||||
*/
|
||||
void removeAssignTaskDetail(BatchDeleteReqVO req);
|
||||
|
||||
/**
|
||||
* 创建质控样
|
||||
* @param req
|
||||
*/
|
||||
void createQcSample(CreateQcSampleReqVO req);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -30,6 +31,9 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDat
|
||||
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.BusinessAssayTaskDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||
@@ -37,6 +41,9 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayReportDataMap
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDetailMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCParameterDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCProjectDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignManualParam;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignMethodParam;
|
||||
@@ -44,12 +51,15 @@ import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignSample
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleTaskAssignContext;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||
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.ConfigAssayMethodProjectParameterDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||
import com.zt.plat.module.qms.business.dic.dal.mapper.DictionaryProjectMapper;
|
||||
import com.zt.plat.module.qms.core.code.SequenceUtil;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||
import com.zt.plat.module.system.api.dept.dto.DeptRespDTO;
|
||||
@@ -70,7 +80,10 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
|
||||
@Resource
|
||||
private DeptApi deptApi;
|
||||
|
||||
|
||||
@Resource
|
||||
private SequenceUtil sequenceUtil;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskMapper businessAssayTaskMapper;
|
||||
|
||||
@@ -95,6 +108,9 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
@Resource
|
||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodMapper configAssayMethodMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||
|
||||
@@ -103,6 +119,15 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
|
||||
@Resource
|
||||
private DictionaryProjectMapper dictionaryProjectMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCDataMapper businessQCDataMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCProjectDataMapper businessQCProjectDataMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessQCParameterDataMapper businessQCParameterDataMapper;
|
||||
|
||||
@Override
|
||||
public List<AdminUserRespDTO> getAssignUserList() {
|
||||
@@ -426,4 +451,78 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
//删除任务单明细数据
|
||||
businessAssayTaskDetailMapper.physicalDeleteByIds(req.getIds());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void createQcSample(CreateQcSampleReqVO req) {
|
||||
List<BusinessQCProjectDataDO> businessQCProjectDataDOList = new ArrayList<>();
|
||||
List<BusinessQCParameterDataDO> businessQCParameterDataDOList = new ArrayList<>();
|
||||
|
||||
//分配任务
|
||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(req.getBusinessAssayTaskId());
|
||||
//分析方法
|
||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(req.getConfigQCAssayMethodId());
|
||||
//分析项目
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(req.getConfigQCAssayMethodId());
|
||||
//分析项目参数
|
||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectId(req.getConfigQCAssayMethodId());
|
||||
//分析项目
|
||||
String assayProject = configAssayMethodProjectExtendRespList.stream().map(m -> m.getShowName()).collect(Collectors.joining(","));
|
||||
|
||||
BusinessQCDataDO businessQCDataDO = new BusinessQCDataDO();
|
||||
businessQCDataDO.setId(IdWorker.getId());
|
||||
businessQCDataDO.setBusinessAssayTaskId(req.getBusinessAssayTaskId());
|
||||
businessQCDataDO.setConfigAssayMethodId(req.getConfigQCAssayMethodId());
|
||||
businessQCDataDO.setSampleName(req.getSampleName());
|
||||
// if (StringUtils.isNotBlank(configQCSampleMethodExtendRespVO.getCodeRule())) {
|
||||
// String codeSample = sequenceUtil.genCode(configQCSampleMethodExtendRespVO.getCodeRule());
|
||||
// businessQCDataDO.setSampleCode(codeSample);
|
||||
// }
|
||||
businessQCDataDO.setBusinessStandardSampleId(req.getBusinessStandardSampleId());
|
||||
businessQCDataDO.setDictionaryBusinessId(req.getDictionaryBusinessId());
|
||||
businessQCDataDO.setDictionaryBusinessKey(req.getDictionaryBusinessKey());
|
||||
businessQCDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||
businessQCDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||
businessQCDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
|
||||
businessQCDataDO.setAssayProject(assayProject);
|
||||
businessQCDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
|
||||
businessQCDataDO.setIsAssignTasked(QmsCommonConstant.YES);
|
||||
businessQCDataDO.setIsReported(QmsCommonConstant.NO);
|
||||
|
||||
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
|
||||
BusinessQCProjectDataDO businessQCProjectDataDO = new BusinessQCProjectDataDO();
|
||||
businessQCProjectDataDO.setId(IdWorker.getId());
|
||||
businessQCProjectDataDO.setBusinessQCDataId(businessQCDataDO.getId());
|
||||
businessQCProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectExtendRespVO.getId());
|
||||
businessQCProjectDataDO.setDictionaryProjectId(configAssayMethodProjectExtendRespVO.getDictionaryProjectId());
|
||||
businessQCProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_QUALITY_CONTROL);
|
||||
businessQCProjectDataDO.setSymbol("=");
|
||||
businessQCProjectDataDO.setDataType(configAssayMethodProjectExtendRespVO.getDataType());
|
||||
businessQCProjectDataDO.setDecimalPosition(configAssayMethodProjectExtendRespVO.getDecimalPosition());
|
||||
businessQCProjectDataDO.setIsEnabled(configAssayMethodProjectExtendRespVO.getIsDefaultEnabled());
|
||||
|
||||
businessQCProjectDataDOList.add(businessQCProjectDataDO);
|
||||
|
||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDoList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectExtendRespVO.getId())).collect(Collectors.toList());
|
||||
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDoList) {
|
||||
BusinessQCParameterDataDO businessQCParameterDataDO = new BusinessQCParameterDataDO();
|
||||
businessQCParameterDataDO.setBusinessQCProjectDataId(businessQCProjectDataDO.getId());
|
||||
businessQCParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
|
||||
businessQCParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||
businessQCParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||
businessQCParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||
|
||||
businessQCParameterDataDOList.add(businessQCParameterDataDO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
businessQCDataMapper.insert(businessQCDataDO);
|
||||
if (CollUtil.isNotEmpty(businessQCProjectDataDOList)) {
|
||||
businessQCProjectDataMapper.insertBatch(businessQCProjectDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessQCParameterDataDOList)) {
|
||||
businessQCParameterDataMapper.insertBatch(businessQCParameterDataDOList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.ConfigQCSampleMethodDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigQCSampleMethodService;
|
||||
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-qc-sample-method")
|
||||
@Validated
|
||||
public class ConfigQCSampleMethodController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigQCSampleMethodService configQCSampleMethodService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建质控样与检测方法配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:create')")
|
||||
public CommonResult<ConfigQCSampleMethodRespVO> createConfigQCSampleMethod(@Valid @RequestBody ConfigQCSampleMethodSaveReqVO createReqVO) {
|
||||
return success(configQCSampleMethodService.createConfigQCSampleMethod(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新质控样与检测方法配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:update')")
|
||||
public CommonResult<Boolean> updateConfigQCSampleMethod(@Valid @RequestBody ConfigQCSampleMethodSaveReqVO updateReqVO) {
|
||||
configQCSampleMethodService.updateConfigQCSampleMethod(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除质控样与检测方法配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:delete')")
|
||||
public CommonResult<Boolean> deleteConfigQCSampleMethod(@RequestParam("id") Long id) {
|
||||
configQCSampleMethodService.deleteConfigQCSampleMethod(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除质控样与检测方法配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:delete')")
|
||||
public CommonResult<Boolean> deleteConfigQCSampleMethodList(@RequestBody BatchDeleteReqVO req) {
|
||||
configQCSampleMethodService.deleteConfigQCSampleMethodListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得质控样与检测方法配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:query')")
|
||||
public CommonResult<ConfigQCSampleMethodRespVO> getConfigQCSampleMethod(@RequestParam("id") Long id) {
|
||||
ConfigQCSampleMethodDO configQCSampleMethod = configQCSampleMethodService.getConfigQCSampleMethod(id);
|
||||
return success(BeanUtils.toBean(configQCSampleMethod, ConfigQCSampleMethodRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得质控样与检测方法配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:query')")
|
||||
public CommonResult<PageResult<ConfigQCSampleMethodRespVO>> getConfigQCSampleMethodPage(@Valid ConfigQCSampleMethodPageReqVO pageReqVO) {
|
||||
PageResult<ConfigQCSampleMethodDO> pageResult = configQCSampleMethodService.getConfigQCSampleMethodPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigQCSampleMethodRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出质控样与检测方法配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigQCSampleMethodExcel(@Valid ConfigQCSampleMethodPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigQCSampleMethodDO> list = configQCSampleMethodService.getConfigQCSampleMethodPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质控样与检测方法配置.xls", "数据", ConfigQCSampleMethodRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigQCSampleMethodRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.ConfigQCStandardSampleDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigQCStandardSampleService;
|
||||
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-qc-standard-sample")
|
||||
@Validated
|
||||
public class ConfigQCStandardSampleController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigQCStandardSampleService configQCStandardSampleService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建质控与定值样关系")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:create')")
|
||||
public CommonResult<ConfigQCStandardSampleRespVO> createConfigQCStandardSample(@Valid @RequestBody ConfigQCStandardSampleSaveReqVO createReqVO) {
|
||||
return success(configQCStandardSampleService.createConfigQCStandardSample(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新质控与定值样关系")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:update')")
|
||||
public CommonResult<Boolean> updateConfigQCStandardSample(@Valid @RequestBody ConfigQCStandardSampleSaveReqVO updateReqVO) {
|
||||
configQCStandardSampleService.updateConfigQCStandardSample(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除质控与定值样关系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:delete')")
|
||||
public CommonResult<Boolean> deleteConfigQCStandardSample(@RequestParam("id") Long id) {
|
||||
configQCStandardSampleService.deleteConfigQCStandardSample(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除质控与定值样关系")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:delete')")
|
||||
public CommonResult<Boolean> deleteConfigQCStandardSampleList(@RequestBody BatchDeleteReqVO req) {
|
||||
configQCStandardSampleService.deleteConfigQCStandardSampleListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得质控与定值样关系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:query')")
|
||||
public CommonResult<ConfigQCStandardSampleRespVO> getConfigQCStandardSample(@RequestParam("id") Long id) {
|
||||
ConfigQCStandardSampleDO configQCStandardSample = configQCStandardSampleService.getConfigQCStandardSample(id);
|
||||
return success(BeanUtils.toBean(configQCStandardSample, ConfigQCStandardSampleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得质控与定值样关系分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:query')")
|
||||
public CommonResult<PageResult<ConfigQCStandardSampleRespVO>> getConfigQCStandardSamplePage(@Valid ConfigQCStandardSamplePageReqVO pageReqVO) {
|
||||
PageResult<ConfigQCStandardSampleDO> pageResult = configQCStandardSampleService.getConfigQCStandardSamplePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigQCStandardSampleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出质控与定值样关系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-QC-standard-sample:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigQCStandardSampleExcel(@Valid ConfigQCStandardSamplePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigQCStandardSampleDO> list = configQCStandardSampleService.getConfigQCStandardSamplePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质控与定值样关系.xls", "数据", ConfigQCStandardSampleRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigQCStandardSampleRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConfigQCSampleMethodExtendRespVO extends ConfigQCSampleMethodRespVO {
|
||||
|
||||
private String dictionaryBusinessName;
|
||||
|
||||
private String configAssayMethodName;
|
||||
|
||||
private String configQCAssayMethodName;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
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 ConfigQCSampleMethodPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "检测方法配置ID", example = "21368")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", example = "9549")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "质控样检测方法配置ID", example = "17090")
|
||||
private Long configQCAssayMethodId;
|
||||
|
||||
@Schema(description = "编码规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "默认个数,1-是,0-否", example = "484")
|
||||
private Integer defaultCount;
|
||||
|
||||
@Schema(description = "分配提交最小个数", example = "28377")
|
||||
private Integer taskMinimumCount;
|
||||
|
||||
@Schema(description = "分析提交最小个数", example = "31499")
|
||||
private Integer assayMinimumCount;
|
||||
|
||||
@Schema(description = "是否关联定值样,1-是,0-否")
|
||||
private Integer isCorrelation;
|
||||
|
||||
@Schema(description = "映射检测信息配置,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||
private String configInfomation;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
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 ConfigQCSampleMethodRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11823")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21368")
|
||||
@ExcelProperty("检测方法配置ID")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", requiredMode = Schema.RequiredMode.REQUIRED, example = "9549")
|
||||
@ExcelProperty("质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
@ExcelProperty("质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "质控样检测方法配置ID", example = "17090")
|
||||
@ExcelProperty("质控样检测方法配置ID")
|
||||
private Long configQCAssayMethodId;
|
||||
|
||||
@Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("编码规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "默认个数,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED, example = "484")
|
||||
@ExcelProperty("默认个数,1-是,0-否")
|
||||
private Integer defaultCount;
|
||||
|
||||
@Schema(description = "分配提交最小个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "28377")
|
||||
@ExcelProperty("分配提交最小个数")
|
||||
private Integer taskMinimumCount;
|
||||
|
||||
@Schema(description = "分析提交最小个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "31499")
|
||||
@ExcelProperty("分析提交最小个数")
|
||||
private Integer assayMinimumCount;
|
||||
|
||||
@Schema(description = "是否关联定值样,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否关联定值样,1-是,0-否")
|
||||
private Integer isCorrelation;
|
||||
|
||||
@Schema(description = "映射检测信息配置,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||
@ExcelProperty("映射检测信息配置,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||
private String configInfomation;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
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 ConfigQCSampleMethodSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11823")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21368")
|
||||
@NotNull(message = "检测方法配置ID不能为空")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样", requiredMode = Schema.RequiredMode.REQUIRED, example = "9549")
|
||||
@NotNull(message = "质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样不能为空")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||
private String dictionaryBusinessKey;
|
||||
|
||||
@Schema(description = "质控样检测方法配置ID", example = "17090")
|
||||
private Long configQCAssayMethodId;
|
||||
|
||||
@Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "编码规则不能为空")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "默认个数,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED, example = "484")
|
||||
@NotNull(message = "默认个数,1-是,0-否不能为空")
|
||||
private Integer defaultCount;
|
||||
|
||||
@Schema(description = "分配提交最小个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "28377")
|
||||
@NotNull(message = "分配提交最小个数不能为空")
|
||||
private Integer taskMinimumCount;
|
||||
|
||||
@Schema(description = "分析提交最小个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "31499")
|
||||
@NotNull(message = "分析提交最小个数不能为空")
|
||||
private Integer assayMinimumCount;
|
||||
|
||||
@Schema(description = "是否关联定值样,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否关联定值样,1-是,0-否不能为空")
|
||||
private Integer isCorrelation;
|
||||
|
||||
@Schema(description = "映射检测信息配置,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||
private String configInfomation;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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 ConfigQCStandardSamplePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "质控样与检测方法配置ID", example = "16254")
|
||||
private Long configQCSampleMethodId;
|
||||
|
||||
@Schema(description = "定值样业务ID", example = "24895")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
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 ConfigQCStandardSampleRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28136")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "质控样与检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16254")
|
||||
@ExcelProperty("质控样与检测方法配置ID")
|
||||
private Long configQCSampleMethodId;
|
||||
|
||||
@Schema(description = "定值样业务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24895")
|
||||
@ExcelProperty("定值样业务ID")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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 ConfigQCStandardSampleSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28136")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "质控样与检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16254")
|
||||
@NotNull(message = "质控样与检测方法配置ID不能为空")
|
||||
private Long configQCSampleMethodId;
|
||||
|
||||
@Schema(description = "定值样业务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24895")
|
||||
@NotNull(message = "定值样业务ID")
|
||||
private Long businessStandardSampleId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
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 后台管理
|
||||
*/
|
||||
@TableName("t_cfg_qc_smp_mthd")
|
||||
@KeySequence("t_cfg_qc_smp_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ConfigQCSampleMethodDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 检测方法配置ID
|
||||
*/
|
||||
@TableField("CFG_ASY_MTHD_ID")
|
||||
private Long configAssayMethodId;
|
||||
/**
|
||||
* 质控类型_ID,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样
|
||||
*/
|
||||
@TableField("DIC_BSN_ID")
|
||||
private Long dictionaryBusinessId;
|
||||
/**
|
||||
* 质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样
|
||||
*/
|
||||
@TableField("DIC_BSN_KY")
|
||||
private String dictionaryBusinessKey;
|
||||
/**
|
||||
* 质控样检测方法配置ID
|
||||
*/
|
||||
@TableField("CFG_QC_ASY_MTHD_ID")
|
||||
private Long configQCAssayMethodId;
|
||||
/**
|
||||
* 编码规则
|
||||
*/
|
||||
@TableField("CD_RUL")
|
||||
private String codeRule;
|
||||
/**
|
||||
* 默认个数,1-是,0-否
|
||||
*/
|
||||
@TableField("DFT_CNT")
|
||||
private Integer defaultCount;
|
||||
/**
|
||||
* 分配提交最小个数
|
||||
*/
|
||||
@TableField("TSK_MIN_CNT")
|
||||
private Integer taskMinimumCount;
|
||||
/**
|
||||
* 分析提交最小个数
|
||||
*/
|
||||
@TableField("ASY_MIN_CNT")
|
||||
private Integer assayMinimumCount;
|
||||
/**
|
||||
* 是否关联定值样,1-是,0-否
|
||||
*/
|
||||
@TableField("IS_CORR")
|
||||
private Integer isCorrelation;
|
||||
/**
|
||||
* 映射检测信息配置,automatic-自动报出(不超差),manual-手动报出,modify-允许修改
|
||||
*/
|
||||
@TableField("CFG_INF")
|
||||
private String configInfomation;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
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 后台管理
|
||||
*/
|
||||
@TableName("t_cfg_qc_std_smp")
|
||||
@KeySequence("t_cfg_qc_std_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ConfigQCStandardSampleDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 质控样与检测方法配置ID
|
||||
*/
|
||||
@TableField("CFG_QC_SMP_MTHD_ID")
|
||||
private Long configQCSampleMethodId;
|
||||
/**
|
||||
* 定值样业务ID
|
||||
*/
|
||||
@TableField("BSN_STD_SMP_ID")
|
||||
private Long businessStandardSampleId;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -53,4 +53,14 @@ public interface ConfigAssayMethodProjectMapper extends BaseMapperX<ConfigAssayM
|
||||
.eq(ConfigAssayMethodProjectDO::getConfigAssayMethodId, configAssayMethodId));
|
||||
}
|
||||
|
||||
default List<ConfigAssayMethodProjectExtendRespVO> selectByConfigAssayMethodIds(List<Long> configAssayMethodIds) {
|
||||
return selectJoinList(ConfigAssayMethodProjectExtendRespVO.class, new MPJLambdaWrapperX<ConfigAssayMethodProjectDO>()
|
||||
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, ConfigAssayMethodProjectDO::getDictionaryProjectId)
|
||||
.selectAll(ConfigAssayMethodProjectDO.class)
|
||||
.selectAs(DictionaryProjectDO::getKey, ConfigAssayMethodProjectExtendRespVO::getDictionaryProjectKey)
|
||||
.selectAs(DictionaryProjectDO::getSimpleName, ConfigAssayMethodProjectExtendRespVO::getSimpleName)
|
||||
.selectAs(DictionaryProjectDO::getShowName, ConfigAssayMethodProjectExtendRespVO::getShowName)
|
||||
.in(ConfigAssayMethodProjectDO::getConfigAssayMethodId, configAssayMethodIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,8 +2,10 @@ package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
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.controller.vo.ConfigAssayMethodProjectParameterPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
@@ -41,5 +43,17 @@ public interface ConfigAssayMethodProjectParameterMapper extends BaseMapperX<Con
|
||||
return selectList(new LambdaQueryWrapperX<ConfigAssayMethodProjectParameterDO>()
|
||||
.eq(ConfigAssayMethodProjectParameterDO::getConfigAssayMethodProjectId, configAssayMethodProjectId));
|
||||
}
|
||||
|
||||
default List<ConfigAssayMethodProjectParameterDO> selectByConfigAssayMethodProjectIds(Long configAssayMethodProjectIds) {
|
||||
return selectList(new LambdaQueryWrapperX<ConfigAssayMethodProjectParameterDO>()
|
||||
.in(ConfigAssayMethodProjectParameterDO::getConfigAssayMethodProjectId, configAssayMethodProjectIds));
|
||||
}
|
||||
|
||||
default List<ConfigAssayMethodProjectParameterDO> selectByConfigAssayMethodIds(List<Long> configAssayMethodIds) {
|
||||
return selectJoinList(ConfigAssayMethodProjectParameterDO.class, new MPJLambdaWrapperX<ConfigAssayMethodProjectParameterDO>()
|
||||
.leftJoin(ConfigAssayMethodProjectDO.class, ConfigAssayMethodProjectDO::getId, ConfigAssayMethodProjectParameterDO::getConfigAssayMethodProjectId)
|
||||
.selectAll(ConfigAssayMethodProjectParameterDO.class)
|
||||
.in(ConfigAssayMethodProjectDO::getConfigAssayMethodId, configAssayMethodIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
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.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;
|
||||
|
||||
/**
|
||||
* 质控样与检测方法配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigQCSampleMethodMapper extends BaseMapperX<ConfigQCSampleMethodDO> {
|
||||
|
||||
default PageResult<ConfigQCSampleMethodDO> selectPage(ConfigQCSampleMethodPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigQCSampleMethodDO>()
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getConfigQCAssayMethodId, reqVO.getConfigQCAssayMethodId())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getCodeRule, reqVO.getCodeRule())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getDefaultCount, reqVO.getDefaultCount())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getTaskMinimumCount, reqVO.getTaskMinimumCount())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getAssayMinimumCount, reqVO.getAssayMinimumCount())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getIsCorrelation, reqVO.getIsCorrelation())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getConfigInfomation, reqVO.getConfigInfomation())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigQCSampleMethodDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigQCSampleMethodDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigQCSampleMethodDO::getId));
|
||||
}
|
||||
|
||||
|
||||
default List<ConfigQCSampleMethodExtendRespVO> selectByConfigAssayMethodId(Long configAssayMethodId) {
|
||||
return selectJoinList(ConfigQCSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigQCSampleMethodDO>()
|
||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigQCSampleMethodDO::getDictionaryBusinessId)
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, ConfigQCSampleMethodDO::getConfigQCAssayMethodId)
|
||||
.selectAll(ConfigQCSampleMethodDO.class)
|
||||
.selectAs(DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName)
|
||||
.selectAs(ConfigAssayMethodDO::getName, ConfigQCSampleMethodExtendRespVO::getConfigQCAssayMethodName)
|
||||
.eq(ConfigQCSampleMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
||||
}
|
||||
|
||||
|
||||
default List<ConfigQCSampleMethodExtendRespVO> selectByConfigAssayMethodIds(List<Long> configAssayMethodIds) {
|
||||
return selectJoinList(ConfigQCSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigQCSampleMethodDO>()
|
||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigQCSampleMethodDO::getDictionaryBusinessId)
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, ConfigQCSampleMethodDO::getConfigQCAssayMethodId)
|
||||
.selectAll(ConfigQCSampleMethodDO.class)
|
||||
.selectAs(DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName)
|
||||
.selectAs(ConfigAssayMethodDO::getName, ConfigQCSampleMethodExtendRespVO::getConfigQCAssayMethodName)
|
||||
.in(ConfigQCSampleMethodDO::getConfigAssayMethodId, configAssayMethodIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
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.ConfigQCStandardSampleDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 质控与定值样关系 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigQCStandardSampleMapper extends BaseMapperX<ConfigQCStandardSampleDO> {
|
||||
|
||||
default PageResult<ConfigQCStandardSampleDO> selectPage(ConfigQCStandardSamplePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigQCStandardSampleDO>()
|
||||
.eqIfPresent(ConfigQCStandardSampleDO::getConfigQCSampleMethodId, reqVO.getConfigQCSampleMethodId())
|
||||
.eqIfPresent(ConfigQCStandardSampleDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
||||
.eqIfPresent(ConfigQCStandardSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigQCStandardSampleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigQCStandardSampleDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigQCStandardSampleDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.ConfigQCSampleMethodDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 质控样与检测方法配置 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigQCSampleMethodService {
|
||||
|
||||
/**
|
||||
* 创建质控样与检测方法配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigQCSampleMethodRespVO createConfigQCSampleMethod(@Valid ConfigQCSampleMethodSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新质控样与检测方法配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigQCSampleMethod(@Valid ConfigQCSampleMethodSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除质控样与检测方法配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigQCSampleMethod(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除质控样与检测方法配置
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigQCSampleMethodListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得质控样与检测方法配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 质控样与检测方法配置
|
||||
*/
|
||||
ConfigQCSampleMethodDO getConfigQCSampleMethod(Long id);
|
||||
|
||||
/**
|
||||
* 获得质控样与检测方法配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 质控样与检测方法配置分页
|
||||
*/
|
||||
PageResult<ConfigQCSampleMethodDO> getConfigQCSampleMethodPage(ConfigQCSampleMethodPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -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.ConfigQCSampleMethodDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMapper;
|
||||
|
||||
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 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ConfigQCSampleMethodServiceImpl implements ConfigQCSampleMethodService {
|
||||
|
||||
@Resource
|
||||
private ConfigQCSampleMethodMapper configQCSampleMethodMapper;
|
||||
|
||||
@Override
|
||||
public ConfigQCSampleMethodRespVO createConfigQCSampleMethod(ConfigQCSampleMethodSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigQCSampleMethodDO configQCSampleMethod = BeanUtils.toBean(createReqVO, ConfigQCSampleMethodDO.class);
|
||||
configQCSampleMethodMapper.insert(configQCSampleMethod);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configQCSampleMethod, ConfigQCSampleMethodRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigQCSampleMethod(ConfigQCSampleMethodSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigQCSampleMethodExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigQCSampleMethodDO updateObj = BeanUtils.toBean(updateReqVO, ConfigQCSampleMethodDO.class);
|
||||
configQCSampleMethodMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigQCSampleMethod(Long id) {
|
||||
// 校验存在
|
||||
validateConfigQCSampleMethodExists(id);
|
||||
// 删除
|
||||
configQCSampleMethodMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigQCSampleMethodListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigQCSampleMethodExists(ids);
|
||||
// 删除
|
||||
configQCSampleMethodMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigQCSampleMethodExists(List<Long> ids) {
|
||||
List<ConfigQCSampleMethodDO> list = configQCSampleMethodMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_QC_SAMPLE_METHOD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigQCSampleMethodExists(Long id) {
|
||||
if (configQCSampleMethodMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_QC_SAMPLE_METHOD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigQCSampleMethodDO getConfigQCSampleMethod(Long id) {
|
||||
return configQCSampleMethodMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigQCSampleMethodDO> getConfigQCSampleMethodPage(ConfigQCSampleMethodPageReqVO pageReqVO) {
|
||||
return configQCSampleMethodMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.ConfigQCStandardSampleDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 质控与定值样关系 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigQCStandardSampleService {
|
||||
|
||||
/**
|
||||
* 创建质控与定值样关系
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigQCStandardSampleRespVO createConfigQCStandardSample(@Valid ConfigQCStandardSampleSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新质控与定值样关系
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigQCStandardSample(@Valid ConfigQCStandardSampleSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除质控与定值样关系
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigQCStandardSample(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除质控与定值样关系
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigQCStandardSampleListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得质控与定值样关系
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 质控与定值样关系
|
||||
*/
|
||||
ConfigQCStandardSampleDO getConfigQCStandardSample(Long id);
|
||||
|
||||
/**
|
||||
* 获得质控与定值样关系分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 质控与定值样关系分页
|
||||
*/
|
||||
PageResult<ConfigQCStandardSampleDO> getConfigQCStandardSamplePage(ConfigQCStandardSamplePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -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.ConfigQCStandardSampleDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCStandardSampleMapper;
|
||||
|
||||
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 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ConfigQCStandardSampleServiceImpl implements ConfigQCStandardSampleService {
|
||||
|
||||
@Resource
|
||||
private ConfigQCStandardSampleMapper configQCStandardSampleMapper;
|
||||
|
||||
@Override
|
||||
public ConfigQCStandardSampleRespVO createConfigQCStandardSample(ConfigQCStandardSampleSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigQCStandardSampleDO configQCStandardSample = BeanUtils.toBean(createReqVO, ConfigQCStandardSampleDO.class);
|
||||
configQCStandardSampleMapper.insert(configQCStandardSample);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configQCStandardSample, ConfigQCStandardSampleRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigQCStandardSample(ConfigQCStandardSampleSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigQCStandardSampleExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigQCStandardSampleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigQCStandardSampleDO.class);
|
||||
configQCStandardSampleMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigQCStandardSample(Long id) {
|
||||
// 校验存在
|
||||
validateConfigQCStandardSampleExists(id);
|
||||
// 删除
|
||||
configQCStandardSampleMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigQCStandardSampleListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigQCStandardSampleExists(ids);
|
||||
// 删除
|
||||
configQCStandardSampleMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigQCStandardSampleExists(List<Long> ids) {
|
||||
List<ConfigQCStandardSampleDO> list = configQCStandardSampleMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigQCStandardSampleExists(Long id) {
|
||||
if (configQCStandardSampleMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigQCStandardSampleDO getConfigQCStandardSample(Long id) {
|
||||
return configQCStandardSampleMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigQCStandardSampleDO> getConfigQCStandardSamplePage(ConfigQCStandardSamplePageReqVO pageReqVO) {
|
||||
return configQCStandardSampleMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.BusinessQCDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -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.BusinessQCParameterDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -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.BusinessQCProjectDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -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.ConfigQCSampleMethodMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -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.ConfigQCStandardSampleMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user