Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -37,6 +37,7 @@ public interface ErrorCodeConstants {
|
|||||||
/*==============================config 配置模块 1_032_050_000 ~ 1_032_099_999 ===============================*/
|
/*==============================config 配置模块 1_032_050_000 ~ 1_032_099_999 ===============================*/
|
||||||
ErrorCode CONFIG_REPORT_TEMPLATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表模版配置不存在");
|
ErrorCode CONFIG_REPORT_TEMPLATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表模版配置不存在");
|
||||||
ErrorCode CONFIG_ASSAY_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法配置不存在");
|
ErrorCode CONFIG_ASSAY_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法配置不存在");
|
||||||
|
ErrorCode CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法参数配置不存在");
|
||||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目配置不存在");
|
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目配置不存在");
|
||||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_RANGE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目区间不存在");
|
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_RANGE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目区间不存在");
|
||||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目判定不存在");
|
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目判定不存在");
|
||||||
@@ -101,6 +102,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样交接记录业务不存在");
|
ErrorCode BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样交接记录业务不存在");
|
||||||
ErrorCode BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记来样品位不存在");
|
ErrorCode BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记来样品位不存在");
|
||||||
ErrorCode BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务业务不存在");
|
ErrorCode BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务业务不存在");
|
||||||
|
ErrorCode BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务参数业务不存在");
|
||||||
ErrorCode BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测项目数据业务不存在");
|
ErrorCode BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测项目数据业务不存在");
|
||||||
ErrorCode BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测参数数据业务不存在");
|
ErrorCode BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测参数数据业务不存在");
|
||||||
ErrorCode BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样判定业务不存在");
|
ErrorCode BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样判定业务不存在");
|
||||||
@@ -129,6 +131,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode BUSINESS_QC_MANAGEMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控管理样检测任务数据,管理样、标准样不存在");
|
ErrorCode BUSINESS_QC_MANAGEMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控管理样检测任务数据,管理样、标准样不存在");
|
||||||
ErrorCode BUSINESS_QC_MANAGEMENT_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测项目数据业务不存在");
|
ErrorCode BUSINESS_QC_MANAGEMENT_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测项目数据业务不存在");
|
||||||
ErrorCode BUSINESS_QC_MANAGEMENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测参数数据业务不存在");
|
ErrorCode BUSINESS_QC_MANAGEMENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测参数数据业务不存在");
|
||||||
|
ErrorCode BUSINESS_QC_MANAGEMENT_SAMPLE_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数不存在");
|
||||||
ErrorCode BUSINESS_QC_COEFFICIENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数任务数据,空白样、标样不存在");
|
ErrorCode BUSINESS_QC_COEFFICIENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数任务数据,空白样、标样不存在");
|
||||||
ErrorCode BUSINESS_QC_COEFFICIENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数参数业务不存在");
|
ErrorCode BUSINESS_QC_COEFFICIENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数参数业务不存在");
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import jakarta.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.service.BusinessAssayTaskParameterDataService;
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 子样检测任务参数业务")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/business-assay-task-parameter-data")
|
||||||
|
@Validated
|
||||||
|
public class BusinessAssayTaskParameterDataController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayTaskParameterDataService businessAssayTaskParameterDataService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建子样检测任务参数业务")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:create')")
|
||||||
|
public CommonResult<BusinessAssayTaskParameterDataRespVO> createBusinessAssayTaskParameterData(@Valid @RequestBody BusinessAssayTaskParameterDataSaveReqVO createReqVO) {
|
||||||
|
return success(businessAssayTaskParameterDataService.createBusinessAssayTaskParameterData(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新子样检测任务参数业务")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:update')")
|
||||||
|
public CommonResult<Boolean> updateBusinessAssayTaskParameterData(@Valid @RequestBody BusinessAssayTaskParameterDataSaveReqVO updateReqVO) {
|
||||||
|
businessAssayTaskParameterDataService.updateBusinessAssayTaskParameterData(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除子样检测任务参数业务")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:delete')")
|
||||||
|
public CommonResult<Boolean> deleteBusinessAssayTaskParameterData(@RequestParam("id") Long id) {
|
||||||
|
businessAssayTaskParameterDataService.deleteBusinessAssayTaskParameterData(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除子样检测任务参数业务")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:delete')")
|
||||||
|
public CommonResult<Boolean> deleteBusinessAssayTaskParameterDataList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
businessAssayTaskParameterDataService.deleteBusinessAssayTaskParameterDataListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得子样检测任务参数业务")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:query')")
|
||||||
|
public CommonResult<BusinessAssayTaskParameterDataRespVO> getBusinessAssayTaskParameterData(@RequestParam("id") Long id) {
|
||||||
|
BusinessAssayTaskParameterDataDO businessAssayTaskParameterData = businessAssayTaskParameterDataService.getBusinessAssayTaskParameterData(id);
|
||||||
|
return success(BeanUtils.toBean(businessAssayTaskParameterData, BusinessAssayTaskParameterDataRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得子样检测任务参数业务分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:query')")
|
||||||
|
public CommonResult<PageResult<BusinessAssayTaskParameterDataRespVO>> getBusinessAssayTaskParameterDataPage(@Valid BusinessAssayTaskParameterDataPageReqVO pageReqVO) {
|
||||||
|
PageResult<BusinessAssayTaskParameterDataDO> pageResult = businessAssayTaskParameterDataService.getBusinessAssayTaskParameterDataPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, BusinessAssayTaskParameterDataRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出子样检测任务参数业务 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-assay-task-parameter-data:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportBusinessAssayTaskParameterDataExcel(@Valid BusinessAssayTaskParameterDataPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<BusinessAssayTaskParameterDataDO> list = businessAssayTaskParameterDataService.getBusinessAssayTaskParameterDataPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "子样检测任务参数业务.xls", "数据", BusinessAssayTaskParameterDataRespVO.class,
|
||||||
|
BeanUtils.toBean(list, BusinessAssayTaskParameterDataRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -84,18 +84,18 @@ public class BusinessQCCoefficientDataController implements BusinessControllerMa
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得质控样检测系数任务数据,空白样、标样分页")
|
@Operation(summary = "获得质控样检测系数任务数据,空白样、标样分页")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
|
||||||
public CommonResult<PageResult<BusinessQCCoefficientDataRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO) {
|
public CommonResult<PageResult<BusinessQCCoefficientDataExtendRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO) {
|
||||||
PageResult<BusinessQCCoefficientDataDO> pageResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO);
|
PageResult<BusinessQCCoefficientDataExtendRespVO> pageResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, BusinessQCCoefficientDataRespVO.class));
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获得质控样检测系数任务数据,空白样、标样分页")
|
@Operation(summary = "获得质控样检测系数任务数据,空白样、标样分页")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:business-QC-coefficient-data:query')")
|
||||||
public CommonResult<List<BusinessQCCoefficientDataRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataReqVO reqVO) {
|
public CommonResult<List<BusinessQCCoefficientDataExtendRespVO>> getBusinessQCCoefficientDataPage(@Valid BusinessQCCoefficientDataReqVO reqVO) {
|
||||||
List<BusinessQCCoefficientDataDO> pageResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataList(reqVO);
|
List<BusinessQCCoefficientDataExtendRespVO> listResult = businessQCCoefficientDataService.getBusinessQCCoefficientDataList(reqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, BusinessQCCoefficientDataRespVO.class));
|
return success(listResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@@ -105,7 +105,7 @@ public class BusinessQCCoefficientDataController implements BusinessControllerMa
|
|||||||
public void exportBusinessQCCoefficientDataExcel(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO,
|
public void exportBusinessQCCoefficientDataExcel(@Valid BusinessQCCoefficientDataPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<BusinessQCCoefficientDataDO> list = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO).getList();
|
List<BusinessQCCoefficientDataExtendRespVO> list = businessQCCoefficientDataService.getBusinessQCCoefficientDataPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "质控样检测系数任务数据,空白样、标样.xls", "数据", BusinessQCCoefficientDataRespVO.class,
|
ExcelUtils.write(response, "质控样检测系数任务数据,空白样、标样.xls", "数据", BusinessQCCoefficientDataRespVO.class,
|
||||||
BeanUtils.toBean(list, BusinessQCCoefficientDataRespVO.class));
|
BeanUtils.toBean(list, BusinessQCCoefficientDataRespVO.class));
|
||||||
|
|||||||
@@ -85,17 +85,17 @@ public class BusinessQCManagementDataController implements BusinessControllerMar
|
|||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得质控管理样检测任务数据,管理样、标准样分页")
|
@Operation(summary = "获得质控管理样检测任务数据,管理样、标准样分页")
|
||||||
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-data:query')")
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-data:query')")
|
||||||
public CommonResult<PageResult<BusinessQCManagementDataRespVO>> getBusinessQCManagementDataPage(@Valid BusinessQCManagementDataPageReqVO pageReqVO) {
|
public CommonResult<PageResult<BusinessQCManagementDataExtendRespVO>> getBusinessQCManagementDataPage(@Valid BusinessQCManagementDataPageReqVO pageReqVO) {
|
||||||
PageResult<BusinessQCManagementDataDO> pageResult = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO);
|
PageResult<BusinessQCManagementDataExtendRespVO> pageResult = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, BusinessQCManagementDataRespVO.class));
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获得质控管理样检测任务数据,管理样、标准样列表")
|
@Operation(summary = "获得质控管理样检测任务数据,管理样、标准样列表")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:business-QC-management-data:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:business-QC-management-data:query')")
|
||||||
public CommonResult<List<BusinessQCManagementDataRespVO>> getBusinessQCManagementDataList(@Valid BusinessQCManagementDataReqVO reqVO) {
|
public CommonResult<List<BusinessQCManagementDataExtendRespVO>> getBusinessQCManagementDataList(@Valid BusinessQCManagementDataReqVO reqVO) {
|
||||||
List<BusinessQCManagementDataDO> pageResult = businessQCManagementDataService.getBusinessQCManagementDataList(reqVO);
|
List<BusinessQCManagementDataExtendRespVO> listResult = businessQCManagementDataService.getBusinessQCManagementDataList(reqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, BusinessQCManagementDataRespVO.class));
|
return success(listResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@@ -105,7 +105,7 @@ public class BusinessQCManagementDataController implements BusinessControllerMar
|
|||||||
public void exportBusinessQCManagementDataExcel(@Valid BusinessQCManagementDataPageReqVO pageReqVO,
|
public void exportBusinessQCManagementDataExcel(@Valid BusinessQCManagementDataPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<BusinessQCManagementDataDO> list = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO).getList();
|
List<BusinessQCManagementDataExtendRespVO> list = businessQCManagementDataService.getBusinessQCManagementDataPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "质控管理样检测任务数据,管理样、标准样.xls", "数据", BusinessQCManagementDataRespVO.class,
|
ExcelUtils.write(response, "质控管理样检测任务数据,管理样、标准样.xls", "数据", BusinessQCManagementDataRespVO.class,
|
||||||
BeanUtils.toBean(list, BusinessQCManagementDataRespVO.class));
|
BeanUtils.toBean(list, BusinessQCManagementDataRespVO.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.BusinessQCManagementSampleParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.service.BusinessQCManagementSampleParameterDataService;
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/business-QC-management-sample-parameter-data")
|
||||||
|
@Validated
|
||||||
|
public class BusinessQCManagementSampleParameterDataController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementSampleParameterDataService businessQCManagementSampleParameterDataService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:create')")
|
||||||
|
public CommonResult<BusinessQCManagementSampleParameterDataRespVO> createBusinessQCManagementSampleParameterData(@Valid @RequestBody BusinessQCManagementSampleParameterDataSaveReqVO createReqVO) {
|
||||||
|
return success(businessQCManagementSampleParameterDataService.createBusinessQCManagementSampleParameterData(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:update')")
|
||||||
|
public CommonResult<Boolean> updateBusinessQCManagementSampleParameterData(@Valid @RequestBody BusinessQCManagementSampleParameterDataSaveReqVO updateReqVO) {
|
||||||
|
businessQCManagementSampleParameterDataService.updateBusinessQCManagementSampleParameterData(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:delete')")
|
||||||
|
public CommonResult<Boolean> deleteBusinessQCManagementSampleParameterData(@RequestParam("id") Long id) {
|
||||||
|
businessQCManagementSampleParameterDataService.deleteBusinessQCManagementSampleParameterData(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:delete')")
|
||||||
|
public CommonResult<Boolean> deleteBusinessQCManagementSampleParameterDataList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
businessQCManagementSampleParameterDataService.deleteBusinessQCManagementSampleParameterDataListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:query')")
|
||||||
|
public CommonResult<BusinessQCManagementSampleParameterDataRespVO> getBusinessQCManagementSampleParameterData(@RequestParam("id") Long id) {
|
||||||
|
BusinessQCManagementSampleParameterDataDO businessQCManagementSampleParameterData = businessQCManagementSampleParameterDataService.getBusinessQCManagementSampleParameterData(id);
|
||||||
|
return success(BeanUtils.toBean(businessQCManagementSampleParameterData, BusinessQCManagementSampleParameterDataRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:query')")
|
||||||
|
public CommonResult<PageResult<BusinessQCManagementSampleParameterDataRespVO>> getBusinessQCManagementSampleParameterDataPage(@Valid BusinessQCManagementSampleParameterDataPageReqVO pageReqVO) {
|
||||||
|
PageResult<BusinessQCManagementSampleParameterDataDO> pageResult = businessQCManagementSampleParameterDataService.getBusinessQCManagementSampleParameterDataPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, BusinessQCManagementSampleParameterDataRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:business-QC-management-sample-parameter-data:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportBusinessQCManagementSampleParameterDataExcel(@Valid BusinessQCManagementSampleParameterDataPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<BusinessQCManagementSampleParameterDataDO> list = businessQCManagementSampleParameterDataService.getBusinessQCManagementSampleParameterDataPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数.xls", "数据", BusinessQCManagementSampleParameterDataRespVO.class,
|
||||||
|
BeanUtils.toBean(list, BusinessQCManagementSampleParameterDataRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,12 +29,14 @@ public class SampleAnalysisController implements BusinessControllerMarker {
|
|||||||
@Resource
|
@Resource
|
||||||
private SampleAnalysisService sampleAnalysisService ;
|
private SampleAnalysisService sampleAnalysisService ;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
@GetMapping("/batchSampleAnalysisByTaskId")
|
@GetMapping("/batchSampleAnalysisByTaskId")
|
||||||
public CommonResult<?> batchSampleAnalysisByTaskId(Long businessAssayTaskId) {
|
public CommonResult<?> batchSampleAnalysisByTaskId(Long businessAssayTaskId) {
|
||||||
BusinessAssayTaskAnalysisSampleProjectRespVO businessAssayTaskAnalysisSampleProject = sampleAnalysisService.batchSampleAnalysisByTaskId(businessAssayTaskId);
|
BusinessAssayTaskAnalysisSampleProjectRespVO businessAssayTaskAnalysisSampleProject = sampleAnalysisService.batchSampleAnalysisByTaskId(businessAssayTaskId);
|
||||||
return success(businessAssayTaskAnalysisSampleProject);
|
return success(businessAssayTaskAnalysisSampleProject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
@PostMapping("/saveBatchSampleAnalysis")
|
@PostMapping("/saveBatchSampleAnalysis")
|
||||||
public CommonResult<?> saveBatchSampleAnalysis(@RequestBody BusinessAssayTaskAnalysisSampleProjectRespVO vo) {
|
public CommonResult<?> saveBatchSampleAnalysis(@RequestBody BusinessAssayTaskAnalysisSampleProjectRespVO vo) {
|
||||||
sampleAnalysisService.saveBatchSampleAnalysis(vo);
|
sampleAnalysisService.saveBatchSampleAnalysis(vo);
|
||||||
|
|||||||
@@ -56,14 +56,6 @@ public class SampleTaskAssignController implements BusinessControllerMarker {
|
|||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@GetMapping("/getAssayMethodList")
|
|
||||||
public CommonResult<?> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
|
||||||
List<Object> list = sampleTaskAssignService.getAssayMethodList(businessSubSampleId, configAssayMethodId);
|
|
||||||
return success(list);
|
|
||||||
}
|
|
||||||
**/
|
|
||||||
|
|
||||||
@GetMapping("/getAssayMethodProjectList")
|
@GetMapping("/getAssayMethodProjectList")
|
||||||
public CommonResult<?> getAssayMethodProjectList(String businessSubSampleIds, Long configAssayMethodId) {
|
public CommonResult<?> getAssayMethodProjectList(String businessSubSampleIds, Long configAssayMethodId) {
|
||||||
List<Long> businessSubSampleIdList = Arrays.asList(businessSubSampleIds.split(",")).stream().map(Long::parseLong).toList();
|
List<Long> businessSubSampleIdList = Arrays.asList(businessSubSampleIds.split(",")).stream().map(Long::parseLong).toList();
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ public class BusinessAssayProjectAndParameterRespVO implements Serializable {
|
|||||||
/** 结果值 **/
|
/** 结果值 **/
|
||||||
@Schema(description = "结果值")
|
@Schema(description = "结果值")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
/** 符号,=、>、<、等 **/
|
||||||
|
@Schema(description = "符号,=、>、<、等")
|
||||||
|
private String symbol;
|
||||||
|
|
||||||
@Schema(description = "是否允许为空")
|
@Schema(description = "是否允许为空")
|
||||||
private Integer isNull;
|
private Integer isNull;
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ import lombok.Data;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BusinessAssayTaskExtendRespVO extends BusinessAssayTaskRespVO {
|
public class BusinessAssayTaskExtendRespVO extends BusinessAssayTaskRespVO {
|
||||||
|
|
||||||
|
/** 任务单数据类型,横向:horizontal,纵向:vertical **/
|
||||||
|
private String reportDataType;
|
||||||
|
|
||||||
/** 分析方法名称 **/
|
/** 分析方法名称 **/
|
||||||
private String configAssayMethodName;
|
private String configAssayMethodName;
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 子样检测任务参数业务分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BusinessAssayTaskParameterDataPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", example = "11383")
|
||||||
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法参数配置ID", example = "9000")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "1")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "乐观锁", example = "3750")
|
||||||
|
private Integer updateCount;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 子样检测任务参数业务 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class BusinessAssayTaskParameterDataRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2727")
|
||||||
|
@ExcelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11383")
|
||||||
|
@ExcelProperty("检测任务ID")
|
||||||
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法参数配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
|
||||||
|
@ExcelProperty("检测方法参数配置ID")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "值")
|
||||||
|
@ExcelProperty("值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty("数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
@ExcelProperty("小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "3750")
|
||||||
|
@ExcelProperty("乐观锁")
|
||||||
|
private Integer updateCount;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 子样检测任务参数业务新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BusinessAssayTaskParameterDataSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2727")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11383")
|
||||||
|
@NotNull(message = "检测任务ID不能为空")
|
||||||
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法参数配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
|
||||||
|
@NotNull(message = "检测方法参数配置ID不能为空")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotEmpty(message = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间不能为空")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "3750")
|
||||||
|
@NotNull(message = "乐观锁不能为空")
|
||||||
|
private Integer updateCount;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusinessQCCoefficientDataExtendRespVO extends BusinessQCCoefficientDataRespVO {
|
||||||
|
|
||||||
|
private String dictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessId;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinesskey;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusinessQCManagementDataExtendRespVO extends BusinessQCManagementDataRespVO {
|
||||||
|
|
||||||
|
private String dictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessId;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinesskey;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BusinessQCManagementSampleParameterDataPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "质控管理样检测任务ID", example = "100")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法参数配置ID", example = "10419")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
|
||||||
|
@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 = "乐观锁", example = "2766")
|
||||||
|
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,55 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class BusinessQCManagementSampleParameterDataRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1205")
|
||||||
|
@ExcelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "质控管理样检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||||
|
@ExcelProperty("质控管理样检测任务ID")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法参数配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10419")
|
||||||
|
@ExcelProperty("检测方法参数配置ID")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "值")
|
||||||
|
@ExcelProperty("值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "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, example = "2766")
|
||||||
|
@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,43 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BusinessQCManagementSampleParameterDataSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1205")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "质控管理样检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||||
|
@NotNull(message = "质控管理样检测任务ID不能为空")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法参数配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10419")
|
||||||
|
@NotNull(message = "检测方法参数配置ID不能为空")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "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, example = "2766")
|
||||||
|
@NotNull(message = "乐观锁不能为空")
|
||||||
|
private Integer updateCount;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -26,4 +26,7 @@ public class CreateQcSampleReqVO {
|
|||||||
|
|
||||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||||
private String dictionaryBusinessKey;
|
private String dictionaryBusinessKey;
|
||||||
|
|
||||||
|
@Schema(description = "质控类型_父类_Key,字典表【T_DIC_BSN】质控类型:带检测项-withProject 不带检测项目-withoutProject")
|
||||||
|
private String parentDictionaryBusinesskey;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ public class DeleteQcSampleReqVO {
|
|||||||
|
|
||||||
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
@Schema(description = "质控类型_Key,字典表【T_DIC_BSN】质控类型:空白样、管理样、标准样、标样")
|
||||||
private String dictionaryBusinessKey;
|
private String dictionaryBusinessKey;
|
||||||
|
|
||||||
|
@Schema(description = "质控类型_父类_Key,字典表【T_DIC_BSN】质控类型:带检测项-withProject 不带检测项目-withoutProject")
|
||||||
|
private String parentDictionaryBusinesskey;
|
||||||
|
|
||||||
@Schema(description = "质控样id")
|
@Schema(description = "质控样id")
|
||||||
private List<Long> qcSampleIdList;
|
private List<Long> qcSampleIdList;
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ public class BusinessAssayParameterDataDO extends BusinessBaseDO {
|
|||||||
@TableField("DIC_PRM_ID")
|
@TableField("DIC_PRM_ID")
|
||||||
private Long dictionaryParameterId;
|
private Long dictionaryParameterId;
|
||||||
/**
|
/**
|
||||||
|
* 符号,=、>、<、等
|
||||||
|
*/
|
||||||
|
@TableField("SMB")
|
||||||
|
private String symbol;
|
||||||
|
/**
|
||||||
* 值
|
* 值
|
||||||
*/
|
*/
|
||||||
@TableField("VAL")
|
@TableField("VAL")
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
|
/**
|
||||||
|
* 子样检测任务参数业务 DO
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@TableName("t_bsn_asy_tsk_prm_dat")
|
||||||
|
@KeySequence("t_bsn_asy_tsk_prm_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class BusinessAssayTaskParameterDataDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 检测任务ID
|
||||||
|
*/
|
||||||
|
@TableField("BSN_ASY_TSK_DAT_ID")
|
||||||
|
private Long businessAssayTaskDataId;
|
||||||
|
/**
|
||||||
|
* 检测方法参数配置ID
|
||||||
|
*/
|
||||||
|
@TableField("CFG_ASY_MTHD_PRM_ID")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
@TableField("VAL")
|
||||||
|
private String value;
|
||||||
|
/**
|
||||||
|
* 数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间
|
||||||
|
*/
|
||||||
|
@TableField("DAT_TP")
|
||||||
|
private String dataType;
|
||||||
|
/**
|
||||||
|
* 小数位
|
||||||
|
*/
|
||||||
|
@TableField("DEC_POS")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
/**
|
||||||
|
* 乐观锁
|
||||||
|
*/
|
||||||
|
@TableField("UPD_CNT")
|
||||||
|
private Integer updateCount;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@TableField("SYS_DEPT_CD")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField("RMK")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -47,6 +47,11 @@ public class BusinessQCCoefficientParameterDataDO extends BusinessBaseDO {
|
|||||||
@TableField("DIC_PRM_ID")
|
@TableField("DIC_PRM_ID")
|
||||||
private Long dictionaryParameterId;
|
private Long dictionaryParameterId;
|
||||||
/**
|
/**
|
||||||
|
* 符号,=、>、<、等
|
||||||
|
*/
|
||||||
|
@TableField("SMB")
|
||||||
|
private String symbol;
|
||||||
|
/**
|
||||||
* 值
|
* 值
|
||||||
*/
|
*/
|
||||||
@TableField("VAL")
|
@TableField("VAL")
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ public class BusinessQCManagementParameterDataDO extends BusinessBaseDO {
|
|||||||
@TableField("DIC_PRM_ID")
|
@TableField("DIC_PRM_ID")
|
||||||
private Long dictionaryParameterId;
|
private Long dictionaryParameterId;
|
||||||
/**
|
/**
|
||||||
|
* 符号,=、>、<、等
|
||||||
|
*/
|
||||||
|
@TableField("SMB")
|
||||||
|
private String symbol;
|
||||||
|
/**
|
||||||
* 值
|
* 值
|
||||||
*/
|
*/
|
||||||
@TableField("VAL")
|
@TableField("VAL")
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
|
/**
|
||||||
|
* 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数 DO
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@TableName("t_bsn_qc_mngt_smp_prm_dat")
|
||||||
|
@KeySequence("t_bsn_qc_mngt_smp_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 BusinessQCManagementSampleParameterDataDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 质控管理样检测任务ID
|
||||||
|
*/
|
||||||
|
@TableField("BSN_QC_MNGT_DAT_ID")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
/**
|
||||||
|
* 检测方法参数配置ID
|
||||||
|
*/
|
||||||
|
@TableField("CFG_ASY_MTHD_PRM_ID")
|
||||||
|
private Long configAssayMethodParameterId;
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
@TableField("VAL")
|
||||||
|
private String value;
|
||||||
|
/**
|
||||||
|
* 数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间
|
||||||
|
*/
|
||||||
|
@TableField("DAT_TP")
|
||||||
|
private String dataType;
|
||||||
|
/**
|
||||||
|
* 小数位
|
||||||
|
*/
|
||||||
|
@TableField("DEC_POS")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
/**
|
||||||
|
* 乐观锁
|
||||||
|
*/
|
||||||
|
@TableField("UPD_CNT")
|
||||||
|
private Integer updateCount;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@TableField("SYS_DEPT_CD")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField("RMK")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -39,6 +39,7 @@ public interface BusinessAssayParameterDataMapper extends BaseMapperX<BusinessAs
|
|||||||
.selectAs(BusinessAssayParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
.selectAs(BusinessAssayParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
.selectAs(BusinessAssayParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
.selectAs(BusinessAssayParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
.selectAs(BusinessAssayParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
.selectAs(BusinessAssayParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
.selectAs(BusinessAssayParameterDataDO::getSymbol, BusinessAssayProjectAndParameterRespVO::getSymbol)
|
||||||
.selectAs(ConfigAssayMethodProjectParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
.selectAs(ConfigAssayMethodProjectParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
.selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
.selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
.selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
.selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
|||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||||
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
||||||
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||||
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -38,6 +39,7 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.selectAs(BusinessAssayProjectDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
.selectAs(BusinessAssayProjectDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
.selectAs(BusinessAssayProjectDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
.selectAs(BusinessAssayProjectDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
.selectAs(BusinessAssayProjectDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
.selectAs(BusinessAssayProjectDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
.selectAs(BusinessAssayProjectDataDO::getSymbol, BusinessAssayProjectAndParameterRespVO::getSymbol)
|
||||||
.selectAs(ConfigAssayMethodProjectDO::getDictionaryProjectUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
.selectAs(ConfigAssayMethodProjectDO::getDictionaryProjectUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
.selectAs(ConfigAssayMethodProjectDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
.selectAs(ConfigAssayMethodProjectDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
.selectAs(ConfigAssayMethodProjectDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
.selectAs(ConfigAssayMethodProjectDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
@@ -83,6 +85,18 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.orderByDesc(BusinessAssayProjectDataDO::getId));
|
.orderByDesc(BusinessAssayProjectDataDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
||||||
|
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
||||||
|
.leftJoin(BusinessAssayTaskDataDO.class, BusinessAssayTaskDataDO::getId, BusinessAssayProjectDataDO::getBusinessAssayTaskDataId)
|
||||||
|
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
||||||
|
.selectAll(BusinessAssayProjectDataDO.class)
|
||||||
|
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectDataExtendRespVO::getDictionaryProjectKey)
|
||||||
|
.selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectDataExtendRespVO::getSimpleName)
|
||||||
|
.selectAs(DictionaryProjectDO::getShowName, BusinessAssayProjectDataExtendRespVO::getShowName)
|
||||||
|
.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId)
|
||||||
|
.eq(BusinessAssayProjectDataDO::getIsEnabled, QmsCommonConstant.YES));
|
||||||
|
}
|
||||||
|
|
||||||
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataId(Long businessAssayTaskDataId) {
|
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataId(Long businessAssayTaskDataId) {
|
||||||
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
||||||
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
|||||||
.selectAll(BusinessAssayTaskDO.class)
|
.selectAll(BusinessAssayTaskDO.class)
|
||||||
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskExtendRespVO::getConfigAssayMethodName)
|
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskExtendRespVO::getConfigAssayMethodName)
|
||||||
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskExtendRespVO::getConfigAssayMethodNameAndCategory)
|
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskExtendRespVO::getConfigAssayMethodNameAndCategory)
|
||||||
|
.selectAs(ConfigAssayMethodDO::getReportDataType, BusinessAssayTaskExtendRespVO::getReportDataType)
|
||||||
.eq(BusinessAssayTaskDO::getId, id));
|
.eq(BusinessAssayTaskDO::getId, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
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.BusinessAssayTaskParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
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 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BusinessAssayTaskParameterDataMapper extends BaseMapperX<BusinessAssayTaskParameterDataDO> {
|
||||||
|
|
||||||
|
default PageResult<BusinessAssayTaskParameterDataDO> selectPage(BusinessAssayTaskParameterDataPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessAssayTaskParameterDataDO>()
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getConfigAssayMethodParameterId, reqVO.getConfigAssayMethodParameterId())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getValue, reqVO.getValue())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getDataType, reqVO.getDataType())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(BusinessAssayTaskParameterDataDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(BusinessAssayTaskParameterDataDO::getRemark, reqVO.getRemark())
|
||||||
|
.orderByDesc(BusinessAssayTaskParameterDataDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<BusinessAssayProjectAndParameterRespVO> selectByBusinessAssayTaskDataIds(List<Long> businessAssayTaskDataIdList) {
|
||||||
|
return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskParameterDataDO>()
|
||||||
|
.leftJoin(ConfigAssayMethodParameterDO.class, ConfigAssayMethodParameterDO::getId, BusinessAssayTaskParameterDataDO::getConfigAssayMethodParameterId)
|
||||||
|
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodParameterDO::getDictionaryBusinessId)
|
||||||
|
.selectAs(BusinessAssayTaskParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
|
||||||
|
.selectAs(BusinessAssayTaskParameterDataDO::getConfigAssayMethodParameterId, BusinessAssayProjectAndParameterRespVO::getDicId)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getName)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getShowName)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay)
|
||||||
|
.selectAs(BusinessAssayTaskParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
|
.selectAs(BusinessAssayTaskParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
|
.selectAs(BusinessAssayTaskParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
//.selectAs(ConfigAssayMethodParameterDO::getDictionaryProjectUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
|
//.selectAs(ConfigAssayMethodParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getSortNo, BusinessAssayProjectAndParameterRespVO::getParamNo)
|
||||||
|
.selectAs("'attribute'", BusinessAssayProjectAndParameterRespVO::getType)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)
|
||||||
|
.selectAs(DictionaryBusinessDO::getName, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessName)
|
||||||
|
.in(BusinessAssayTaskParameterDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIdList)
|
||||||
|
.orderByAsc(ConfigAssayMethodParameterDO::getSortNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,7 +6,10 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCSampleMethodDO;
|
||||||
|
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@@ -19,58 +22,75 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCCoefficientDataDO> {
|
public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCCoefficientDataDO> {
|
||||||
|
|
||||||
default PageResult<BusinessQCCoefficientDataDO> selectPage(BusinessQCCoefficientDataPageReqVO reqVO) {
|
default PageResult<BusinessQCCoefficientDataExtendRespVO> selectPage(BusinessQCCoefficientDataPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCCoefficientDataDO>()
|
MPJLambdaWrapperX<BusinessQCCoefficientDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<BusinessQCCoefficientDataDO>();
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCCoefficientDataDO::getDictionaryBusinessId);
|
||||||
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCCoefficientDataDO.class);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
|
queryLambdaWrapperX.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
|
||||||
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
||||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
|
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
|
||||||
.orderByDesc(BusinessQCCoefficientDataDO::getId));
|
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
|
||||||
|
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
|
||||||
|
.orderByDesc(BusinessQCCoefficientDataDO::getId);
|
||||||
|
|
||||||
|
return selectJoinPage(reqVO, BusinessQCCoefficientDataExtendRespVO.class, queryLambdaWrapperX);
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<BusinessQCCoefficientDataDO> selectList(BusinessQCCoefficientDataReqVO reqVO) {
|
default List<BusinessQCCoefficientDataExtendRespVO> selectList(BusinessQCCoefficientDataReqVO reqVO) {
|
||||||
return selectList(new LambdaQueryWrapperX<BusinessQCCoefficientDataDO>()
|
MPJLambdaWrapperX<BusinessQCCoefficientDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<BusinessQCCoefficientDataDO>();
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCCoefficientDataDO::getDictionaryBusinessId);
|
||||||
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCCoefficientDataDO.class);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCCoefficientDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
|
queryLambdaWrapperX.eqIfPresent(BusinessQCCoefficientDataDO::getSampleCode, reqVO.getSampleCode())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
.likeIfPresent(BusinessQCCoefficientDataDO::getSampleName, reqVO.getSampleName())
|
||||||
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
||||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayProject, reqVO.getAssayProject())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
|
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||||
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
|
||||||
.orderByDesc(BusinessQCCoefficientDataDO::getId));
|
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
|
||||||
|
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(BusinessQCCoefficientDataDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(BusinessQCCoefficientDataDO::getRemark, reqVO.getRemark())
|
||||||
|
.orderByDesc(BusinessQCCoefficientDataDO::getId);
|
||||||
|
return selectJoinList(BusinessQCCoefficientDataExtendRespVO.class, queryLambdaWrapperX);
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<BusinessQCCoefficientDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
default List<BusinessQCCoefficientDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public interface BusinessQCCoefficientParameterDataMapper extends BaseMapperX<Bu
|
|||||||
.selectAs(BusinessQCCoefficientParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
.selectAs(BusinessQCCoefficientParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
.selectAs(BusinessQCCoefficientParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
.selectAs(BusinessQCCoefficientParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
.selectAs(BusinessQCCoefficientParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
.selectAs(BusinessQCCoefficientParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
.selectAs(BusinessQCCoefficientParameterDataDO::getSymbol, BusinessAssayProjectAndParameterRespVO::getSymbol)
|
||||||
.selectAs(ConfigQCSampleMethodParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
.selectAs(ConfigQCSampleMethodParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
.selectAs(ConfigQCSampleMethodParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
.selectAs(ConfigQCSampleMethodParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
.selectAs(ConfigQCSampleMethodParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
.selectAs(ConfigQCSampleMethodParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
|
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@@ -20,58 +22,75 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCManagementDataDO> {
|
public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCManagementDataDO> {
|
||||||
|
|
||||||
default PageResult<BusinessQCManagementDataDO> selectPage(BusinessQCManagementDataPageReqVO reqVO) {
|
default PageResult<BusinessQCManagementDataExtendRespVO> selectPage(BusinessQCManagementDataPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCManagementDataDO>()
|
MPJLambdaWrapperX<BusinessQCManagementDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<>();
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCManagementDataDO::getDictionaryBusinessId);
|
||||||
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCManagementDataDO.class);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
|
queryLambdaWrapperX.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
|
||||||
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
|
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
||||||
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
|
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||||
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||||
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
|
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
|
||||||
.orderByDesc(BusinessQCManagementDataDO::getId));
|
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
|
||||||
|
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
|
||||||
|
.orderByDesc(BusinessQCManagementDataDO::getId);
|
||||||
|
|
||||||
|
return selectJoinPage(reqVO, BusinessQCManagementDataExtendRespVO.class, queryLambdaWrapperX);
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<BusinessQCManagementDataDO> selectList(BusinessQCManagementDataReqVO reqVO) {
|
default List<BusinessQCManagementDataExtendRespVO> selectList(BusinessQCManagementDataReqVO reqVO) {
|
||||||
return selectList(new LambdaQueryWrapperX<BusinessQCManagementDataDO>()
|
MPJLambdaWrapperX<BusinessQCManagementDataDO> queryLambdaWrapperX = new MPJLambdaWrapperX<>();
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, BusinessQCManagementDataDO::getDictionaryBusinessId);
|
||||||
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
queryLambdaWrapperX = queryLambdaWrapperX.selectAll(BusinessQCManagementDataDO.class);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
queryLambdaWrapperX = (MPJLambdaWrapperX<BusinessQCManagementDataDO>) queryLambdaWrapperX.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName);
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
|
queryLambdaWrapperX.eqIfPresent(BusinessQCManagementDataDO::getSampleCode, reqVO.getSampleCode())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
.likeIfPresent(BusinessQCManagementDataDO::getSampleName, reqVO.getSampleName())
|
||||||
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
.eqIfPresent(BusinessQCManagementDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
|
.eqIfPresent(BusinessQCManagementDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
.eqIfPresent(BusinessQCManagementDataDO::getBusinessStandardSampleId, reqVO.getBusinessStandardSampleId())
|
||||||
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
.eqIfPresent(BusinessQCManagementDataDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayProject, reqVO.getAssayProject())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
|
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||||
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
|
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||||
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
|
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||||
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
|
||||||
.orderByDesc(BusinessQCManagementDataDO::getId));
|
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
|
||||||
|
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(BusinessQCManagementDataDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(BusinessQCManagementDataDO::getRemark, reqVO.getRemark())
|
||||||
|
.orderByDesc(BusinessQCManagementDataDO::getId);
|
||||||
|
return selectJoinList(BusinessQCManagementDataExtendRespVO.class, queryLambdaWrapperX);
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<BusinessQCManagementDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
default List<BusinessQCManagementDataDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public interface BusinessQCManagementParameterDataMapper extends BaseMapperX<Bus
|
|||||||
.selectAs(BusinessQCManagementParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
.selectAs(BusinessQCManagementParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
.selectAs(BusinessQCManagementParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
.selectAs(BusinessQCManagementParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
.selectAs(BusinessQCManagementParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
.selectAs(BusinessQCManagementParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
.selectAs(BusinessQCManagementParameterDataDO::getSymbol, BusinessAssayProjectAndParameterRespVO::getSymbol)
|
||||||
.selectAs(ConfigAssayMethodProjectParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
.selectAs(ConfigAssayMethodProjectParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
.selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
.selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
.selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
.selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public interface BusinessQCManagementProjectDataMapper extends BaseMapperX<Busin
|
|||||||
.selectAs(BusinessQCManagementProjectDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
.selectAs(BusinessQCManagementProjectDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
.selectAs(BusinessQCManagementProjectDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
.selectAs(BusinessQCManagementProjectDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
.selectAs(BusinessQCManagementProjectDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
.selectAs(BusinessQCManagementProjectDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
.selectAs(BusinessQCManagementProjectDataDO::getSymbol, BusinessAssayProjectAndParameterRespVO::getSymbol)
|
||||||
.selectAs(ConfigAssayMethodProjectDO::getDictionaryProjectUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
.selectAs(ConfigAssayMethodProjectDO::getDictionaryProjectUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
.selectAs(ConfigAssayMethodProjectDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
.selectAs(ConfigAssayMethodProjectDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
.selectAs(ConfigAssayMethodProjectDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
.selectAs(ConfigAssayMethodProjectDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
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.BusinessQCManagementSampleParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BusinessQCManagementSampleParameterDataMapper extends BaseMapperX<BusinessQCManagementSampleParameterDataDO> {
|
||||||
|
|
||||||
|
default PageResult<BusinessQCManagementSampleParameterDataDO> selectPage(BusinessQCManagementSampleParameterDataPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCManagementSampleParameterDataDO>()
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getBusinessQCManagementDataId, reqVO.getBusinessQCManagementDataId())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getConfigAssayMethodParameterId, reqVO.getConfigAssayMethodParameterId())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getValue, reqVO.getValue())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getDataType, reqVO.getDataType())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(BusinessQCManagementSampleParameterDataDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(BusinessQCManagementSampleParameterDataDO::getRemark, reqVO.getRemark())
|
||||||
|
.orderByDesc(BusinessQCManagementSampleParameterDataDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<BusinessAssayProjectAndParameterRespVO> selectByBusinessQCManagementDataIds(List<Long> businessQCManagementDataIdList) {
|
||||||
|
return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessQCManagementSampleParameterDataDO>()
|
||||||
|
.leftJoin(ConfigAssayMethodParameterDO.class, ConfigAssayMethodParameterDO::getId, BusinessQCManagementSampleParameterDataDO::getConfigAssayMethodParameterId)
|
||||||
|
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodParameterDO::getDictionaryBusinessId)
|
||||||
|
.selectAs(BusinessQCManagementSampleParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
|
||||||
|
.selectAs(BusinessQCManagementSampleParameterDataDO::getConfigAssayMethodParameterId, BusinessAssayProjectAndParameterRespVO::getDicId)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getName)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getShowName)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay)
|
||||||
|
.selectAs(BusinessQCManagementSampleParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
|
||||||
|
.selectAs(BusinessQCManagementSampleParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
|
||||||
|
.selectAs(BusinessQCManagementSampleParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
|
||||||
|
//.selectAs(ConfigAssayMethodParameterDO::getDictionaryProjectUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
|
||||||
|
//.selectAs(ConfigAssayMethodParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getSortNo, BusinessAssayProjectAndParameterRespVO::getParamNo)
|
||||||
|
.selectAs("'attribute'", BusinessAssayProjectAndParameterRespVO::getType)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId)
|
||||||
|
.selectAs(ConfigAssayMethodParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)
|
||||||
|
.selectAs(DictionaryBusinessDO::getName, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessName)
|
||||||
|
.in(BusinessQCManagementSampleParameterDataDO::getBusinessQCManagementDataId, businessQCManagementDataIdList)
|
||||||
|
.orderByAsc(ConfigAssayMethodParameterDO::getSortNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameter
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
||||||
@@ -36,6 +37,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterData
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayReportDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayReportDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
||||||
@@ -54,16 +56,17 @@ import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMetho
|
|||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleReportDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleReportDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.BaseSampleMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.BaseSampleMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigBaseSampleMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigBaseSampleMapper;
|
||||||
@@ -141,9 +144,15 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
@Resource
|
@Resource
|
||||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;//子样分析方法关联配置
|
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;//子样分析方法关联配置
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigAssayMethodParameterMapper configAssayMethodParameterMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayTaskParameterDataMapper businessAssayTaskParameterDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||||
|
|
||||||
@@ -210,6 +219,8 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
List<Long> configAssayMethodIdList = configSubSampleMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
List<Long> configAssayMethodIdList = configSubSampleMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||||
//分析方法配置
|
//分析方法配置
|
||||||
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectByIds(configAssayMethodIdList);
|
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectByIds(configAssayMethodIdList);
|
||||||
|
//分析方法参数配置
|
||||||
|
List<ConfigAssayMethodParameterDO> configAssayMethodParameterList = configAssayMethodParameterMapper.selectByConfigAssayMethodIds(configAssayMethodIdList);
|
||||||
//分析方法检测项目配置
|
//分析方法检测项目配置
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodIds(configAssayMethodIdList);
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodIds(configAssayMethodIdList);
|
||||||
//分析方法检测项目参数配置
|
//分析方法检测项目参数配置
|
||||||
@@ -242,6 +253,8 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
List<BusinessSubSampleAssessmentDO> businessSubSampleAssessmentDOList = new ArrayList<>();
|
List<BusinessSubSampleAssessmentDO> businessSubSampleAssessmentDOList = new ArrayList<>();
|
||||||
//子样检测任务
|
//子样检测任务
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = new ArrayList<>();
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = new ArrayList<>();
|
||||||
|
//子样检测任务参数
|
||||||
|
List<BusinessAssayTaskParameterDataDO> businessAssayTaskParameterDataDOList = new ArrayList<>();
|
||||||
//检测任务的分析项目
|
//检测任务的分析项目
|
||||||
List<BusinessAssayProjectDataDO> businessAssayProjectDataDOList = new ArrayList<>();
|
List<BusinessAssayProjectDataDO> businessAssayProjectDataDOList = new ArrayList<>();
|
||||||
//分析项目对应的分析参数
|
//分析项目对应的分析参数
|
||||||
@@ -273,9 +286,6 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
//获取当前样品的检测项目
|
//获取当前样品的检测项目
|
||||||
List<BusinessSampleEntrustProjectDO> sampleEntrustProjectDOList = sampleEntrustProjectList.stream().filter(f -> businessSampleEntrustDetailDO.getId().equals(f.getBusinessSampleEntrustDetailId())).collect(Collectors.toList());
|
List<BusinessSampleEntrustProjectDO> sampleEntrustProjectDOList = sampleEntrustProjectList.stream().filter(f -> businessSampleEntrustDetailDO.getId().equals(f.getBusinessSampleEntrustDetailId())).collect(Collectors.toList());
|
||||||
|
|
||||||
//当前样品检测项目字典id列表
|
|
||||||
List<Long> dictionaryProjectIdList = sampleEntrustProjectDOList.stream().map(m -> m.getDictionaryProjectId()).collect(Collectors.toList());
|
|
||||||
|
|
||||||
//获取物料检测标准检测项目id列表
|
//获取物料检测标准检测项目id列表
|
||||||
List<Long> materialAssayStandardDetailIdList = sampleEntrustProjectDOList.stream().map(m -> m.getMaterialAssayStandardDetailId()).collect(Collectors.toList());
|
List<Long> materialAssayStandardDetailIdList = sampleEntrustProjectDOList.stream().map(m -> m.getMaterialAssayStandardDetailId()).collect(Collectors.toList());
|
||||||
|
|
||||||
@@ -410,6 +420,12 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = null;
|
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = null;
|
||||||
|
|
||||||
for (Long configAssayMethodId : materialAssayStandardConfigAssayMethodIdList) {
|
for (Long configAssayMethodId : materialAssayStandardConfigAssayMethodIdList) {
|
||||||
|
//获取分析方法对应的分析标准
|
||||||
|
List<MaterialAssayStandardMethodDO> currentMaterialAssayStandardMethodList = materialAssayStandardMethodList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).collect(Collectors.toList());
|
||||||
|
//获取分析标准的明细id
|
||||||
|
List<Long> currentMaterialAssayStandardDetailIdList = currentMaterialAssayStandardMethodList.stream().map(m -> m.getMaterialAssayStandardDetailId()).collect(Collectors.toList());
|
||||||
|
//获取当前分析方法对应的检测项目
|
||||||
|
List<Long> dictionaryProjectIdList = sampleEntrustProjectDOList.stream().filter(f -> currentMaterialAssayStandardDetailIdList.contains(f.getMaterialAssayStandardDetailId())).map(m -> m.getDictionaryProjectId()).collect(Collectors.toList());
|
||||||
//查询分析方法
|
//查询分析方法
|
||||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodList.stream().filter(f -> f.getId().equals(configAssayMethodId)).findFirst().orElse(null);
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodList.stream().filter(f -> f.getId().equals(configAssayMethodId)).findFirst().orElse(null);
|
||||||
|
|
||||||
@@ -450,7 +466,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
|
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
|
||||||
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
|
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
|
||||||
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
|
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
|
||||||
projectIdList);
|
projectIdList, configAssayMethodParameterList, businessAssayTaskParameterDataDOList);
|
||||||
} else if (QmsCommonConstant.ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList) {//如果是商检综合样,并且包含需检查的项目
|
} else if (QmsCommonConstant.ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList) {//如果是商检综合样,并且包含需检查的项目
|
||||||
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
|
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
|
||||||
configAssayMethodProjectParameterList, dictionaryProjectList,
|
configAssayMethodProjectParameterList, dictionaryProjectList,
|
||||||
@@ -458,7 +474,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
|
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
|
||||||
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
|
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
|
||||||
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
|
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
|
||||||
projectIdList);
|
projectIdList, configAssayMethodParameterList, businessAssayTaskParameterDataDOList);
|
||||||
|
|
||||||
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList && !isForecastS ) {//如果是委检样,包含检测项目,未预报S值
|
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList && !isForecastS ) {//如果是委检样,包含检测项目,未预报S值
|
||||||
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
|
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
|
||||||
@@ -467,7 +483,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
|
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
|
||||||
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
|
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
|
||||||
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
|
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
|
||||||
projectIdList);
|
projectIdList, configAssayMethodParameterList, businessAssayTaskParameterDataDOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -533,7 +549,21 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||||
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||||
|
|
||||||
|
//子样检测任务参数
|
||||||
|
List<ConfigAssayMethodParameterDO> configAssayMethodParameterDOList = configAssayMethodParameterList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).collect(Collectors.toList());
|
||||||
|
BusinessAssayTaskParameterDataDO businessAssayTaskParameterDataDO = null;
|
||||||
|
for (ConfigAssayMethodParameterDO configAssayMethodParameterDO : configAssayMethodParameterDOList) {
|
||||||
|
businessAssayTaskParameterDataDO = new BusinessAssayTaskParameterDataDO();
|
||||||
|
businessAssayTaskParameterDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayTaskParameterDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
|
businessAssayTaskParameterDataDO.setConfigAssayMethodParameterId(configAssayMethodParameterDO.getId());
|
||||||
|
businessAssayTaskParameterDataDO.setDataType(configAssayMethodParameterDO.getDataType());
|
||||||
|
businessAssayTaskParameterDataDO.setDecimalPosition(configAssayMethodParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
businessAssayTaskParameterDataDOList.add(businessAssayTaskParameterDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
//子样检测任务检测项目
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).collect(Collectors.toList());
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).collect(Collectors.toList());
|
||||||
|
|
||||||
StringBuilder assayProjectBuilder = new StringBuilder();
|
StringBuilder assayProjectBuilder = new StringBuilder();
|
||||||
@@ -627,7 +657,10 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
|
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
|
||||||
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
|
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
|
||||||
}
|
}
|
||||||
|
if (CollUtil.isNotEmpty(businessAssayTaskParameterDataDOList)) {
|
||||||
|
businessAssayTaskParameterDataMapper.insertBatch(businessAssayTaskParameterDataDOList);
|
||||||
|
}
|
||||||
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
|
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
|
||||||
businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList);
|
businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList);
|
||||||
}
|
}
|
||||||
@@ -650,7 +683,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
List<BusinessAssayProjectDataDO> businessAssayProjectDataDOList,
|
List<BusinessAssayProjectDataDO> businessAssayProjectDataDOList,
|
||||||
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList, ConfigSubSampleDO configSubSample,
|
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList, ConfigSubSampleDO configSubSample,
|
||||||
ConfigSampleFlowDO configSampleFlowSub, SampleFlowNode sampleFlowNodeSub,
|
ConfigSampleFlowDO configSampleFlowSub, SampleFlowNode sampleFlowNodeSub,
|
||||||
BusinessSubSampleDO businessSubSampleDO, Long methodId, List<Long> projectIdList) {
|
BusinessSubSampleDO businessSubSampleDO, Long methodId, List<Long> projectIdList,
|
||||||
|
List<ConfigAssayMethodParameterDO> configAssayMethodParameterList,
|
||||||
|
List<BusinessAssayTaskParameterDataDO> businessAssayTaskParameterDataDOList) {
|
||||||
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO;
|
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO;
|
||||||
ConfigAssayMethodDO addAssayTaskConfigAssayMethod = configAssayMethodMapper.selectById(methodId);
|
ConfigAssayMethodDO addAssayTaskConfigAssayMethod = configAssayMethodMapper.selectById(methodId);
|
||||||
Long addAssayTaskAssayDepartmentId = addAssayTaskConfigAssayMethod.getAssayDepartmentId();
|
Long addAssayTaskAssayDepartmentId = addAssayTaskConfigAssayMethod.getAssayDepartmentId();
|
||||||
@@ -717,6 +752,22 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
businessAssayTaskDataDO.setAssayDepartmentId(addAssayTaskConfigAssayMethod.getAssayDepartmentId());
|
businessAssayTaskDataDO.setAssayDepartmentId(addAssayTaskConfigAssayMethod.getAssayDepartmentId());
|
||||||
businessAssayTaskDataDO.setAssayDepartmentName(addAssayTaskConfigAssayMethod.getAssayDepartmentName());
|
businessAssayTaskDataDO.setAssayDepartmentName(addAssayTaskConfigAssayMethod.getAssayDepartmentName());
|
||||||
|
|
||||||
|
|
||||||
|
//子样检测任务参数
|
||||||
|
List<ConfigAssayMethodParameterDO> configAssayMethodParameterDOList = configAssayMethodParameterList.stream().filter(f -> f.getConfigAssayMethodId().equals(methodId)).collect(Collectors.toList());
|
||||||
|
BusinessAssayTaskParameterDataDO businessAssayTaskParameterDataDO = null;
|
||||||
|
for (ConfigAssayMethodParameterDO configAssayMethodParameterDO : configAssayMethodParameterDOList) {
|
||||||
|
businessAssayTaskParameterDataDO = new BusinessAssayTaskParameterDataDO();
|
||||||
|
businessAssayTaskParameterDataDO.setId(IdWorker.getId());
|
||||||
|
businessAssayTaskParameterDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
|
businessAssayTaskParameterDataDO.setConfigAssayMethodParameterId(configAssayMethodParameterDO.getId());
|
||||||
|
businessAssayTaskParameterDataDO.setDataType(configAssayMethodParameterDO.getDataType());
|
||||||
|
businessAssayTaskParameterDataDO.setDecimalPosition(configAssayMethodParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
businessAssayTaskParameterDataDOList.add(businessAssayTaskParameterDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
//子样检测任务检测项目
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(methodId)).collect(Collectors.toList());
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(methodId)).collect(Collectors.toList());
|
||||||
|
|
||||||
StringBuilder assayProjectBuilder = new StringBuilder();
|
StringBuilder assayProjectBuilder = new StringBuilder();
|
||||||
|
|||||||
@@ -11,11 +11,17 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataD
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
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.BusinessAssayTaskDetailMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleTaskAssignContext;
|
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleTaskAssignContext;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
@@ -36,6 +42,15 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessQCCoefficientParameterDataMapper businessQCCoefficientParameterDataMapper;
|
private BusinessQCCoefficientParameterDataMapper businessQCCoefficientParameterDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementParameterDataMapper businessQCManagementParameterDataMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process() throws Exception {
|
public void process() throws Exception {
|
||||||
@@ -53,6 +68,12 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
|||||||
|
|
||||||
List<BusinessQCCoefficientParameterDataDO> businessQCCoefficientParameterDataList = sampleTaskAssignContext.getBusinessQCCoefficientParameterDataList();
|
List<BusinessQCCoefficientParameterDataDO> businessQCCoefficientParameterDataList = sampleTaskAssignContext.getBusinessQCCoefficientParameterDataList();
|
||||||
|
|
||||||
|
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = sampleTaskAssignContext.getBusinessQCManagementDataDOList();
|
||||||
|
|
||||||
|
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataDOList = sampleTaskAssignContext.getBusinessQCManagementProjectDataDOList();
|
||||||
|
|
||||||
|
List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList = sampleTaskAssignContext.getBusinessQCManagementParameterDataDOList();
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(savebusinessAssayTaskList)) {
|
if (CollUtil.isNotEmpty(savebusinessAssayTaskList)) {
|
||||||
this.businessAssayTaskMapper.insertBatch(savebusinessAssayTaskList);
|
this.businessAssayTaskMapper.insertBatch(savebusinessAssayTaskList);
|
||||||
}
|
}
|
||||||
@@ -76,6 +97,18 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
|||||||
if (CollUtil.isNotEmpty(businessQCCoefficientParameterDataList)) {
|
if (CollUtil.isNotEmpty(businessQCCoefficientParameterDataList)) {
|
||||||
this.businessQCCoefficientParameterDataMapper.insertBatch(businessQCCoefficientParameterDataList);
|
this.businessQCCoefficientParameterDataMapper.insertBatch(businessQCCoefficientParameterDataList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(businessQCManagementDataDOList)) {
|
||||||
|
this.businessQCManagementDataMapper.insertBatch(businessQCManagementDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(businessQCManagementProjectDataDOList)) {
|
||||||
|
this.businessQCManagementProjectDataMapper.insertBatch(businessQCManagementProjectDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(businessQCManagementParameterDataDOList)) {
|
||||||
|
this.businessQCManagementParameterDataMapper.insertBatch(businessQCManagementParameterDataDOList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,30 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
|
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementSampleParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleTaskAssignContext;
|
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.controller.vo.ConfigQCSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodParameterExtendRespVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodParameterExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
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.ConfigAssayMethodMapper;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
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.business.config.dal.mapper.ConfigQCSampleMethodMapper;
|
||||||
@@ -37,6 +51,9 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
|||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodMapper configAssayMethodMapper;
|
private ConfigAssayMethodMapper configAssayMethodMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigAssayMethodParameterMapper configAssayMethodParameterMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigQCSampleMethodMapper configQCSampleMethodMapper;
|
private ConfigQCSampleMethodMapper configQCSampleMethodMapper;
|
||||||
|
|
||||||
@@ -48,6 +65,9 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper;
|
private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessQCCoefficientDataMapper businessQCCoefficientDataMapper;
|
private BusinessQCCoefficientDataMapper businessQCCoefficientDataMapper;
|
||||||
@@ -55,6 +75,15 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessQCCoefficientParameterDataMapper businessQCCoefficientParameterDataMapper;
|
private BusinessQCCoefficientParameterDataMapper businessQCCoefficientParameterDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementParameterDataMapper businessQCManagementParameterDataMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process() throws Exception {
|
public void process() throws Exception {
|
||||||
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
|
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
|
||||||
@@ -62,6 +91,11 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
|||||||
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = new ArrayList<>();
|
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = new ArrayList<>();
|
||||||
List<BusinessQCCoefficientParameterDataDO> businessQCCoefficientParameterDataDOList = new ArrayList<>();
|
List<BusinessQCCoefficientParameterDataDO> businessQCCoefficientParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = new ArrayList<>();
|
||||||
|
List<BusinessQCManagementSampleParameterDataDO> businessQCManagementSampleParameterDataDOList = new ArrayList<>();
|
||||||
|
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataDOList = new ArrayList<>();
|
||||||
|
List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
//分配任务
|
//分配任务
|
||||||
List<BusinessAssayTaskDO> businessAssayTaskList = new ArrayList<>();
|
List<BusinessAssayTaskDO> businessAssayTaskList = new ArrayList<>();
|
||||||
//获取需要保存的分配任务
|
//获取需要保存的分配任务
|
||||||
@@ -71,6 +105,9 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
|||||||
businessAssayTaskList.addAll(saveBusinessAssayTaskList);
|
businessAssayTaskList.addAll(saveBusinessAssayTaskList);
|
||||||
businessAssayTaskList.addAll(updateBusinessAssayTaskList);
|
businessAssayTaskList.addAll(updateBusinessAssayTaskList);
|
||||||
|
|
||||||
|
//检测任务
|
||||||
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = sampleTaskAssignContext.getBusinessAssayTaskDataList();
|
||||||
|
|
||||||
//获取分配任务的分析方法id列表
|
//获取分配任务的分析方法id列表
|
||||||
List<Long> configAssayMethodIdList = businessAssayTaskList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
List<Long> configAssayMethodIdList = businessAssayTaskList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
@@ -86,63 +123,177 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
|||||||
|
|
||||||
//循环分配任务
|
//循环分配任务
|
||||||
for (BusinessAssayTaskDO businessAssayTaskDO : businessAssayTaskList) {
|
for (BusinessAssayTaskDO businessAssayTaskDO : businessAssayTaskList) {
|
||||||
ConfigQCSampleMethodExtendRespVO configQCSampleMethodExtendRespVO = configQCSampleMethodList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDO.getConfigAssayMethodId()) && "kby".equals(f.getDictionaryBusinessKey())).findFirst().orElse(null);
|
ConfigQCSampleMethodExtendRespVO configQCSampleMethodExtendRespVO = configQCSampleMethodList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDO.getConfigAssayMethodId()) && ("kby".equals(f.getDictionaryBusinessKey()) || "zkkby".equals(f.getDictionaryBusinessKey()))).findFirst().orElse(null);
|
||||||
//不存在空白样,直接跳出
|
//不存在空白样,直接跳出
|
||||||
if (configQCSampleMethodExtendRespVO == null) {
|
if (configQCSampleMethodExtendRespVO == null) {
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(businessAssayTaskDO.getConfigAssayMethodId());
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
//查询下质控数据,如果存在则跳出循环
|
if ("kby".equals(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey())) { //普通空白样
|
||||||
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
|
||||||
//如果存在则跳出循环
|
//查询下质控数据,如果存在则跳出循环
|
||||||
if (CollUtil.isNotEmpty(businessQCCoefficientDataList)) {
|
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
break;
|
//如果存在则跳出循环
|
||||||
|
if (CollUtil.isNotEmpty(businessQCCoefficientDataList)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据默认配置的个数生成空白样
|
||||||
|
for (int i = 0; i < configQCSampleMethodExtendRespVO.getDefaultCount(); i++) {
|
||||||
|
|
||||||
|
BusinessQCCoefficientDataDO businessQCCoefficientDataDO = new BusinessQCCoefficientDataDO();
|
||||||
|
businessQCCoefficientDataDO.setId(IdWorker.getId());
|
||||||
|
businessQCCoefficientDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
businessQCCoefficientDataDO.setConfigAssayMethodId(configQCSampleMethodExtendRespVO.getConfigAssayMethodId());
|
||||||
|
businessQCCoefficientDataDO.setSampleName(configQCSampleMethodExtendRespVO.getDictionaryBusinessName());
|
||||||
|
if (StringUtils.isNotBlank(configQCSampleMethodExtendRespVO.getCodeRule())) {
|
||||||
|
String codeSample = sequenceUtil.genCode(configQCSampleMethodExtendRespVO.getCodeRule());
|
||||||
|
businessQCCoefficientDataDO.setSampleCode(codeSample);
|
||||||
|
}
|
||||||
|
businessQCCoefficientDataDO.setDictionaryBusinessId(configQCSampleMethodExtendRespVO.getDictionaryBusinessId());
|
||||||
|
businessQCCoefficientDataDO.setDictionaryBusinessKey(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey());
|
||||||
|
businessQCCoefficientDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||||
|
businessQCCoefficientDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||||
|
businessQCCoefficientDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
|
||||||
|
businessQCCoefficientDataDO.setAssayOperatorId(businessAssayTaskDO.getAssayOperatorId());
|
||||||
|
businessQCCoefficientDataDO.setAssayProject("");
|
||||||
|
businessQCCoefficientDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
|
||||||
|
businessQCCoefficientDataDO.setIsAssignTasked(QmsCommonConstant.YES);
|
||||||
|
businessQCCoefficientDataDO.setIsReported(QmsCommonConstant.NO);
|
||||||
|
|
||||||
|
businessQCCoefficientDataDOList.add(businessQCCoefficientDataDO);
|
||||||
|
|
||||||
|
List<ConfigQCSampleMethodParameterExtendRespVO> configQCSampleMethodParameterExtendRespVOs = configQcSampleMethodParameterList.stream().filter(f -> f.getConfigQCSampleMethodId().equals(configQCSampleMethodExtendRespVO.getId())).collect(Collectors.toList());
|
||||||
|
for (ConfigQCSampleMethodParameterExtendRespVO configQCSampleMethodParameterExtendRespVO : configQCSampleMethodParameterExtendRespVOs) {
|
||||||
|
BusinessQCCoefficientParameterDataDO businessQCCoefficientParameterDataDO = new BusinessQCCoefficientParameterDataDO();
|
||||||
|
businessQCCoefficientParameterDataDO.setBusinessQCCoefficientDataId(businessQCCoefficientDataDO.getId());
|
||||||
|
businessQCCoefficientParameterDataDO.setConfigQCSampleMethodParameterId(configQCSampleMethodParameterExtendRespVO.getId());
|
||||||
|
businessQCCoefficientParameterDataDO.setDictionaryParameterId(configQCSampleMethodParameterExtendRespVO.getDictionaryParameterId());
|
||||||
|
businessQCCoefficientParameterDataDO.setDataType(configQCSampleMethodParameterExtendRespVO.getDataType());
|
||||||
|
businessQCCoefficientParameterDataDO.setDecimalPosition(configQCSampleMethodParameterExtendRespVO.getDecimalPosition());
|
||||||
|
businessQCCoefficientParameterDataDO.setValue(configQCSampleMethodParameterExtendRespVO.getDefaultValue());
|
||||||
|
|
||||||
|
businessQCCoefficientParameterDataDOList.add(businessQCCoefficientParameterDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ("zkkby".equals(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey())) {//质控空白样
|
||||||
|
//查询质控数据,如果存在则跳出循环
|
||||||
|
List<BusinessQCManagementDataDO> businessQCManagementDataList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
if (CollUtil.isNotEmpty(businessQCManagementDataList)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//分析项目
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().filter(f -> f.getBusinessAssayTaskId().equals(businessAssayTaskDO.getId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
//检测项目id
|
||||||
|
List<Long> dictionaryProjectIdList = new ArrayList<>();
|
||||||
|
//必须要检测的项目
|
||||||
|
String mustProject = configQCSampleMethodExtendRespVO.getMustProject();
|
||||||
|
if (StringUtils.isNotBlank(mustProject)) {
|
||||||
|
String[] mustProjects = mustProject.split(",");
|
||||||
|
for (String dicProjectId : mustProjects) {
|
||||||
|
dictionaryProjectIdList.add(Long.parseLong(dicProjectId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取当前任务的检测项目id列表
|
||||||
|
List<Long> busTaskDictionaryProjectIdList = businessAssayProjectDataList.stream().map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
|
||||||
|
dictionaryProjectIdList.addAll(busTaskDictionaryProjectIdList);
|
||||||
|
//获取需要创建的检测项目id
|
||||||
|
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().filter(f -> dictionaryProjectIdList.contains(f.getDictionaryProjectId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//分析项目参数
|
||||||
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectIds(configAssayMethodProjectIds);
|
||||||
|
//分析项目
|
||||||
|
String assayProject = configAssayMethodProjectExtendRespList.stream().map(m -> m.getShowName()).collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
|
||||||
|
//分析方法参数配置
|
||||||
|
List<ConfigAssayMethodParameterDO> configAssayMethodParameterDOList = configAssayMethodParameterMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
|
for (int i = 0; i < configQCSampleMethodExtendRespVO.getDefaultCount(); i++) {
|
||||||
|
|
||||||
|
BusinessQCManagementDataDO businessQCManagementDataDO = new BusinessQCManagementDataDO();
|
||||||
|
businessQCManagementDataDO.setId(IdWorker.getId());
|
||||||
|
businessQCManagementDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
businessQCManagementDataDO.setConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
businessQCManagementDataDO.setSampleName(configQCSampleMethodExtendRespVO.getDictionaryBusinessName());
|
||||||
|
if (StringUtils.isNotBlank(configQCSampleMethodExtendRespVO.getCodeRule())) {
|
||||||
|
String codeSample = sequenceUtil.genCode(configQCSampleMethodExtendRespVO.getCodeRule());
|
||||||
|
businessQCManagementDataDO.setSampleCode(codeSample);
|
||||||
|
}
|
||||||
|
businessQCManagementDataDO.setBusinessStandardSampleId(null);//特殊空白样无定值样
|
||||||
|
businessQCManagementDataDO.setDictionaryBusinessId(configQCSampleMethodExtendRespVO.getDictionaryBusinessId());
|
||||||
|
businessQCManagementDataDO.setDictionaryBusinessKey(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey());
|
||||||
|
businessQCManagementDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||||
|
businessQCManagementDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||||
|
businessQCManagementDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
|
||||||
|
businessQCManagementDataDO.setAssayOperatorId(businessAssayTaskDO.getAssayOperatorId());
|
||||||
|
businessQCManagementDataDO.setAssayProject(assayProject);
|
||||||
|
businessQCManagementDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
|
||||||
|
businessQCManagementDataDO.setIsAssignTasked(QmsCommonConstant.YES);
|
||||||
|
businessQCManagementDataDO.setIsReported(QmsCommonConstant.NO);
|
||||||
|
|
||||||
|
businessQCManagementDataDOList.add(businessQCManagementDataDO);
|
||||||
|
|
||||||
|
BusinessQCManagementSampleParameterDataDO businessQCManagementSampleParameterDataDO = null;
|
||||||
|
for (ConfigAssayMethodParameterDO configAssayMethodParameterDO : configAssayMethodParameterDOList) {
|
||||||
|
businessQCManagementSampleParameterDataDO = new BusinessQCManagementSampleParameterDataDO();
|
||||||
|
businessQCManagementSampleParameterDataDO.setId(IdWorker.getId());
|
||||||
|
businessQCManagementSampleParameterDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
||||||
|
businessQCManagementSampleParameterDataDO.setConfigAssayMethodParameterId(configAssayMethodParameterDO.getId());
|
||||||
|
businessQCManagementSampleParameterDataDO.setDataType(configAssayMethodParameterDO.getDataType());
|
||||||
|
businessQCManagementSampleParameterDataDO.setDecimalPosition(configAssayMethodParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
businessQCManagementSampleParameterDataDOList.add(businessQCManagementSampleParameterDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
|
||||||
|
if (!dictionaryProjectIdList.contains(configAssayMethodProjectExtendRespVO.getDictionaryProjectId())) {//不存在则跳过
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BusinessQCManagementProjectDataDO businessQCManagementProjectDataDO = new BusinessQCManagementProjectDataDO();
|
||||||
|
businessQCManagementProjectDataDO.setId(IdWorker.getId());
|
||||||
|
businessQCManagementProjectDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
||||||
|
businessQCManagementProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectExtendRespVO.getId());
|
||||||
|
businessQCManagementProjectDataDO.setDictionaryProjectId(configAssayMethodProjectExtendRespVO.getDictionaryProjectId());
|
||||||
|
businessQCManagementProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_QUALITY_CONTROL);
|
||||||
|
businessQCManagementProjectDataDO.setSymbol("=");
|
||||||
|
businessQCManagementProjectDataDO.setDataType(configAssayMethodProjectExtendRespVO.getDataType());
|
||||||
|
businessQCManagementProjectDataDO.setDecimalPosition(configAssayMethodProjectExtendRespVO.getDecimalPosition());
|
||||||
|
businessQCManagementProjectDataDO.setIsEnabled(configAssayMethodProjectExtendRespVO.getIsDefaultEnabled());
|
||||||
|
|
||||||
|
businessQCManagementProjectDataDOList.add(businessQCManagementProjectDataDO);
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDoList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectExtendRespVO.getId())).collect(Collectors.toList());
|
||||||
|
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDoList) {
|
||||||
|
BusinessQCManagementParameterDataDO businessQCManagementParameterDataDO = new BusinessQCManagementParameterDataDO();
|
||||||
|
businessQCManagementParameterDataDO.setBusinessQCManagementProjectDataId(businessQCManagementProjectDataDO.getId());
|
||||||
|
businessQCManagementParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
|
||||||
|
businessQCManagementParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
||||||
|
businessQCManagementParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
||||||
|
businessQCManagementParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
businessQCManagementParameterDataDOList.add(businessQCManagementParameterDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//根据默认配置的个数生成空白样
|
|
||||||
for (int i = 0; i < configQCSampleMethodExtendRespVO.getDefaultCount(); i++) {
|
|
||||||
|
|
||||||
BusinessQCCoefficientDataDO businessQCCoefficientDataDO = new BusinessQCCoefficientDataDO();
|
|
||||||
businessQCCoefficientDataDO.setId(IdWorker.getId());
|
|
||||||
businessQCCoefficientDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
|
||||||
businessQCCoefficientDataDO.setConfigAssayMethodId(configQCSampleMethodExtendRespVO.getConfigAssayMethodId());
|
|
||||||
businessQCCoefficientDataDO.setSampleName(configQCSampleMethodExtendRespVO.getDictionaryBusinessName());
|
|
||||||
if (StringUtils.isNotBlank(configQCSampleMethodExtendRespVO.getCodeRule())) {
|
|
||||||
String codeSample = sequenceUtil.genCode(configQCSampleMethodExtendRespVO.getCodeRule());
|
|
||||||
businessQCCoefficientDataDO.setSampleCode(codeSample);
|
|
||||||
}
|
|
||||||
businessQCCoefficientDataDO.setDictionaryBusinessId(configQCSampleMethodExtendRespVO.getDictionaryBusinessId());
|
|
||||||
businessQCCoefficientDataDO.setDictionaryBusinessKey(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey());
|
|
||||||
businessQCCoefficientDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
|
||||||
businessQCCoefficientDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
|
||||||
businessQCCoefficientDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
|
|
||||||
businessQCCoefficientDataDO.setAssayOperatorId(businessAssayTaskDO.getAssayOperatorId());
|
|
||||||
businessQCCoefficientDataDO.setAssayProject("");
|
|
||||||
businessQCCoefficientDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
|
|
||||||
businessQCCoefficientDataDO.setIsAssignTasked(QmsCommonConstant.YES);
|
|
||||||
businessQCCoefficientDataDO.setIsReported(QmsCommonConstant.NO);
|
|
||||||
|
|
||||||
businessQCCoefficientDataDOList.add(businessQCCoefficientDataDO);
|
|
||||||
|
|
||||||
List<ConfigQCSampleMethodParameterExtendRespVO> configQCSampleMethodParameterExtendRespVOs = configQcSampleMethodParameterList.stream().filter(f -> f.getConfigQCSampleMethodId().equals(configQCSampleMethodExtendRespVO.getId())).collect(Collectors.toList());
|
|
||||||
for (ConfigQCSampleMethodParameterExtendRespVO configQCSampleMethodParameterExtendRespVO : configQCSampleMethodParameterExtendRespVOs) {
|
|
||||||
BusinessQCCoefficientParameterDataDO businessQCCoefficientParameterDataDO = new BusinessQCCoefficientParameterDataDO();
|
|
||||||
businessQCCoefficientParameterDataDO.setBusinessQCCoefficientDataId(businessQCCoefficientDataDO.getId());
|
|
||||||
businessQCCoefficientParameterDataDO.setConfigQCSampleMethodParameterId(configQCSampleMethodParameterExtendRespVO.getId());
|
|
||||||
businessQCCoefficientParameterDataDO.setDictionaryParameterId(configQCSampleMethodParameterExtendRespVO.getDictionaryParameterId());
|
|
||||||
businessQCCoefficientParameterDataDO.setDataType(configQCSampleMethodParameterExtendRespVO.getDataType());
|
|
||||||
businessQCCoefficientParameterDataDO.setDecimalPosition(configQCSampleMethodParameterExtendRespVO.getDecimalPosition());
|
|
||||||
businessQCCoefficientParameterDataDO.setValue(configQCSampleMethodParameterExtendRespVO.getDefaultValue());
|
|
||||||
|
|
||||||
businessQCCoefficientParameterDataDOList.add(businessQCCoefficientParameterDataDO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sampleTaskAssignContext.setBusinessQCCoefficientDataList(businessQCCoefficientDataDOList);
|
sampleTaskAssignContext.setBusinessQCCoefficientDataList(businessQCCoefficientDataDOList);
|
||||||
sampleTaskAssignContext.setBusinessQCCoefficientParameterDataList(businessQCCoefficientParameterDataDOList);
|
sampleTaskAssignContext.setBusinessQCCoefficientParameterDataList(businessQCCoefficientParameterDataDOList);
|
||||||
|
|
||||||
|
sampleTaskAssignContext.setBusinessQCManagementDataDOList(businessQCManagementDataDOList);
|
||||||
|
sampleTaskAssignContext.setBusinessQCManagementProjectDataDOList(businessQCManagementProjectDataDOList);
|
||||||
|
sampleTaskAssignContext.setBusinessQCManagementParameterDataDOList(businessQCManagementParameterDataDOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataD
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementSampleParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.param.AssignAssayUser;
|
import com.zt.plat.module.qms.business.bus.liteflow.param.AssignAssayUser;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
@@ -89,5 +93,17 @@ public class SampleTaskAssignContext {
|
|||||||
|
|
||||||
/** 质控样-(空白、标准)检测参数数据 **/
|
/** 质控样-(空白、标准)检测参数数据 **/
|
||||||
private List<BusinessQCCoefficientParameterDataDO> businessQCCoefficientParameterDataList;
|
private List<BusinessQCCoefficientParameterDataDO> businessQCCoefficientParameterDataList;
|
||||||
|
|
||||||
|
/** 质控样-(质控空白) **/
|
||||||
|
private List<BusinessQCManagementDataDO> businessQCManagementDataDOList;
|
||||||
|
|
||||||
|
/** 质控样-(质控空白)参数 **/
|
||||||
|
private List<BusinessQCManagementSampleParameterDataDO> businessQCManagementSampleParameterDataDOList;
|
||||||
|
|
||||||
|
/** 质控样-(质控空白)检测项目 **/
|
||||||
|
private List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataDOList;
|
||||||
|
|
||||||
|
/** 质控样-(质控空白)检测项目参数 **/
|
||||||
|
private List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子样检测任务参数业务 Service 接口
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
public interface BusinessAssayTaskParameterDataService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建子样检测任务参数业务
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
BusinessAssayTaskParameterDataRespVO createBusinessAssayTaskParameterData(@Valid BusinessAssayTaskParameterDataSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新子样检测任务参数业务
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateBusinessAssayTaskParameterData(@Valid BusinessAssayTaskParameterDataSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除子样检测任务参数业务
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteBusinessAssayTaskParameterData(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除子样检测任务参数业务
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteBusinessAssayTaskParameterDataListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得子样检测任务参数业务
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 子样检测任务参数业务
|
||||||
|
*/
|
||||||
|
BusinessAssayTaskParameterDataDO getBusinessAssayTaskParameterData(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得子样检测任务参数业务分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 子样检测任务参数业务分页
|
||||||
|
*/
|
||||||
|
PageResult<BusinessAssayTaskParameterDataDO> getBusinessAssayTaskParameterDataPage(BusinessAssayTaskParameterDataPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
|
||||||
|
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
|
||||||
|
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子样检测任务参数业务 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class BusinessAssayTaskParameterDataServiceImpl implements BusinessAssayTaskParameterDataService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayTaskParameterDataMapper businessAssayTaskParameterDataMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessAssayTaskParameterDataRespVO createBusinessAssayTaskParameterData(BusinessAssayTaskParameterDataSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
BusinessAssayTaskParameterDataDO businessAssayTaskParameterData = BeanUtils.toBean(createReqVO, BusinessAssayTaskParameterDataDO.class);
|
||||||
|
businessAssayTaskParameterDataMapper.insert(businessAssayTaskParameterData);
|
||||||
|
// 返回
|
||||||
|
return BeanUtils.toBean(businessAssayTaskParameterData, BusinessAssayTaskParameterDataRespVO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateBusinessAssayTaskParameterData(BusinessAssayTaskParameterDataSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateBusinessAssayTaskParameterDataExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
BusinessAssayTaskParameterDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessAssayTaskParameterDataDO.class);
|
||||||
|
businessAssayTaskParameterDataMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBusinessAssayTaskParameterData(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateBusinessAssayTaskParameterDataExists(id);
|
||||||
|
// 删除
|
||||||
|
businessAssayTaskParameterDataMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBusinessAssayTaskParameterDataListByIds(List<Long> ids) {
|
||||||
|
// 校验存在
|
||||||
|
validateBusinessAssayTaskParameterDataExists(ids);
|
||||||
|
// 删除
|
||||||
|
businessAssayTaskParameterDataMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateBusinessAssayTaskParameterDataExists(List<Long> ids) {
|
||||||
|
List<BusinessAssayTaskParameterDataDO> list = businessAssayTaskParameterDataMapper.selectByIds(ids);
|
||||||
|
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||||
|
throw exception(BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateBusinessAssayTaskParameterDataExists(Long id) {
|
||||||
|
if (businessAssayTaskParameterDataMapper.selectById(id) == null) {
|
||||||
|
throw exception(BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessAssayTaskParameterDataDO getBusinessAssayTaskParameterData(Long id) {
|
||||||
|
return businessAssayTaskParameterDataMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<BusinessAssayTaskParameterDataDO> getBusinessAssayTaskParameterDataPage(BusinessAssayTaskParameterDataPageReqVO pageReqVO) {
|
||||||
|
return businessAssayTaskParameterDataMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -57,8 +57,8 @@ public interface BusinessQCCoefficientDataService {
|
|||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 质控样检测系数任务数据,空白样、标样分页
|
* @return 质控样检测系数任务数据,空白样、标样分页
|
||||||
*/
|
*/
|
||||||
PageResult<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO);
|
PageResult<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO);
|
||||||
|
|
||||||
List<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO);
|
List<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -84,12 +84,12 @@ public class BusinessQCCoefficientDataServiceImpl implements BusinessQCCoefficie
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO) {
|
public PageResult<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataPage(BusinessQCCoefficientDataPageReqVO pageReqVO) {
|
||||||
return businessQCCoefficientDataMapper.selectPage(pageReqVO);
|
return businessQCCoefficientDataMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BusinessQCCoefficientDataDO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO) {
|
public List<BusinessQCCoefficientDataExtendRespVO> getBusinessQCCoefficientDataList(BusinessQCCoefficientDataReqVO reqVO) {
|
||||||
return businessQCCoefficientDataMapper.selectList(reqVO);
|
return businessQCCoefficientDataMapper.selectList(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ public interface BusinessQCManagementDataService {
|
|||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 质控管理样检测任务数据,管理样、标准样分页
|
* @return 质控管理样检测任务数据,管理样、标准样分页
|
||||||
*/
|
*/
|
||||||
PageResult<BusinessQCManagementDataDO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO);
|
PageResult<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO);
|
||||||
|
|
||||||
List<BusinessQCManagementDataDO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO);
|
List<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -84,12 +84,12 @@ public class BusinessQCManagementDataServiceImpl implements BusinessQCManagement
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<BusinessQCManagementDataDO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO) {
|
public PageResult<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataPage(BusinessQCManagementDataPageReqVO pageReqVO) {
|
||||||
return businessQCManagementDataMapper.selectPage(pageReqVO);
|
return businessQCManagementDataMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BusinessQCManagementDataDO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO) {
|
public List<BusinessQCManagementDataExtendRespVO> getBusinessQCManagementDataList(BusinessQCManagementDataReqVO reqVO) {
|
||||||
return businessQCManagementDataMapper.selectList(reqVO);
|
return businessQCManagementDataMapper.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.BusinessQCManagementSampleParameterDataDO;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数 Service 接口
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
public interface BusinessQCManagementSampleParameterDataService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
BusinessQCManagementSampleParameterDataRespVO createBusinessQCManagementSampleParameterData(@Valid BusinessQCManagementSampleParameterDataSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateBusinessQCManagementSampleParameterData(@Valid BusinessQCManagementSampleParameterDataSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteBusinessQCManagementSampleParameterData(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteBusinessQCManagementSampleParameterDataListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数
|
||||||
|
*/
|
||||||
|
BusinessQCManagementSampleParameterDataDO getBusinessQCManagementSampleParameterData(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数分页
|
||||||
|
*/
|
||||||
|
PageResult<BusinessQCManagementSampleParameterDataDO> getBusinessQCManagementSampleParameterDataPage(BusinessQCManagementSampleParameterDataPageReqVO 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.BusinessQCManagementSampleParameterDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementSampleParameterDataMapper;
|
||||||
|
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class BusinessQCManagementSampleParameterDataServiceImpl implements BusinessQCManagementSampleParameterDataService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementSampleParameterDataMapper businessQCManagementSampleParameterDataMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessQCManagementSampleParameterDataRespVO createBusinessQCManagementSampleParameterData(BusinessQCManagementSampleParameterDataSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
BusinessQCManagementSampleParameterDataDO businessQCManagementSampleParameterData = BeanUtils.toBean(createReqVO, BusinessQCManagementSampleParameterDataDO.class);
|
||||||
|
businessQCManagementSampleParameterDataMapper.insert(businessQCManagementSampleParameterData);
|
||||||
|
// 返回
|
||||||
|
return BeanUtils.toBean(businessQCManagementSampleParameterData, BusinessQCManagementSampleParameterDataRespVO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateBusinessQCManagementSampleParameterData(BusinessQCManagementSampleParameterDataSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateBusinessQCManagementSampleParameterDataExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
BusinessQCManagementSampleParameterDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessQCManagementSampleParameterDataDO.class);
|
||||||
|
businessQCManagementSampleParameterDataMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBusinessQCManagementSampleParameterData(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateBusinessQCManagementSampleParameterDataExists(id);
|
||||||
|
// 删除
|
||||||
|
businessQCManagementSampleParameterDataMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBusinessQCManagementSampleParameterDataListByIds(List<Long> ids) {
|
||||||
|
// 校验存在
|
||||||
|
validateBusinessQCManagementSampleParameterDataExists(ids);
|
||||||
|
// 删除
|
||||||
|
businessQCManagementSampleParameterDataMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateBusinessQCManagementSampleParameterDataExists(List<Long> ids) {
|
||||||
|
List<BusinessQCManagementSampleParameterDataDO> list = businessQCManagementSampleParameterDataMapper.selectByIds(ids);
|
||||||
|
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||||
|
throw exception(BUSINESS_QC_MANAGEMENT_SAMPLE_PARAMETER_DATA_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateBusinessQCManagementSampleParameterDataExists(Long id) {
|
||||||
|
if (businessQCManagementSampleParameterDataMapper.selectById(id) == null) {
|
||||||
|
throw exception(BUSINESS_QC_MANAGEMENT_SAMPLE_PARAMETER_DATA_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessQCManagementSampleParameterDataDO getBusinessQCManagementSampleParameterData(Long id) {
|
||||||
|
return businessQCManagementSampleParameterDataMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<BusinessQCManagementSampleParameterDataDO> getBusinessQCManagementSampleParameterDataPage(BusinessQCManagementSampleParameterDataPageReqVO pageReqVO) {
|
||||||
|
return businessQCManagementSampleParameterDataMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
|||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -11,6 +12,7 @@ import java.util.Objects;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.collections4.map.HashedMap;
|
import org.apache.commons.collections4.map.HashedMap;
|
||||||
|
import org.apache.commons.lang3.SerializationUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -26,6 +28,7 @@ import com.alibaba.qlexpress4.QLResult;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.zt.plat.framework.common.exception.ServiceException;
|
import com.zt.plat.framework.common.exception.ServiceException;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
@@ -34,6 +37,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDa
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
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.BusinessAssayTaskDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
@@ -49,12 +53,14 @@ 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.BusinessAssayTaskDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDetailMapper;
|
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.BusinessAssayTaskMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementSampleParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
||||||
@@ -107,6 +113,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayTaskMapper businessAssayTaskMapper;
|
private BusinessAssayTaskMapper businessAssayTaskMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayTaskParameterDataMapper businessAssayTaskParameterDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayTaskDetailMapper businessAssayTaskDetailMapper;
|
private BusinessAssayTaskDetailMapper businessAssayTaskDetailMapper;
|
||||||
|
|
||||||
@@ -125,6 +134,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementSampleParameterDataMapper businessQCManagementSampleParameterDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
||||||
|
|
||||||
@@ -288,10 +300,13 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
|
|
||||||
JSONObject resultJsonObject = new JSONObject();
|
JSONObject resultJsonObject = new JSONObject();
|
||||||
|
|
||||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
BusinessAssayTaskExtendRespVO businessAssayTaskDO = businessAssayTaskMapper.selectBusinessAssayTaskById(businessAssayTaskId);
|
||||||
if (businessAssayTaskDO == null) {
|
if (businessAssayTaskDO == null) {
|
||||||
throw new ServiceException(1_032_100_000, "未找到任务分配单");
|
throw new ServiceException(1_032_100_000, "未找到任务分配单");
|
||||||
}
|
}
|
||||||
|
//原始记录数据类型
|
||||||
|
String reportDataType = businessAssayTaskDO.getReportDataType();
|
||||||
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
|
||||||
String jsonString = JSON.toJSONString(businessAssayTaskDO, context);
|
String jsonString = JSON.toJSONString(businessAssayTaskDO, context);
|
||||||
@@ -307,116 +322,235 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
jsonArray.add(businessAssayTaskJson);
|
jsonArray.add(businessAssayTaskJson);
|
||||||
resultJsonObject.put("businessAssayTask", jsonArray);
|
resultJsonObject.put("businessAssayTask", jsonArray);
|
||||||
|
|
||||||
List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()));
|
//处理数据
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
|
|
||||||
// BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
|
|
||||||
//处理数据
|
|
||||||
List<Map<String, Object>> datas = new ArrayList<>();
|
List<Map<String, Object>> datas = new ArrayList<>();
|
||||||
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataList) {
|
//横向数据
|
||||||
BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getSampleId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
if ("horizontal".equals(reportDataType)) {
|
||||||
|
|
||||||
Map<String, Object> map = new HashedMap<>();
|
|
||||||
map.put("businessAssayTaskDataId", businessAssayTaskDataDO.getId());
|
|
||||||
map.put("businessAssayTaskId", businessAssayTaskDataDO.getBusinessAssayTaskId());
|
|
||||||
map.put("businessSubSampleId", businessAssayTaskDataDO.getBusinessSubSampleId());
|
|
||||||
map.put("businessSubParentSampleId", businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
|
||||||
map.put("configAssayMethodId", businessAssayTaskDataDO.getConfigAssayMethodId());
|
|
||||||
map.put("businessAssayTaskDetailId", businessAssayTaskDetailDO.getId());
|
|
||||||
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
|
|
||||||
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
|
|
||||||
map.put("analysisType", "analysis");
|
|
||||||
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
|
||||||
|
|
||||||
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
|
List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()));
|
||||||
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
|
||||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList2 = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch2);
|
|
||||||
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList2) {
|
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataList) {
|
||||||
// map.put("e" + ep.getDicId(), ep);
|
BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getSampleId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||||
map.put(ep.getName(), ep.getValue());
|
|
||||||
if (StringUtils.isNotEmpty(ep.getFormula())) {
|
Map<String, Object> map = new HashedMap<>();
|
||||||
BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
map.put("businessAssayTaskDataId", businessAssayTaskDataDO.getId());
|
||||||
parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
map.put("businessAssayTaskId", businessAssayTaskDataDO.getBusinessAssayTaskId());
|
||||||
List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
map.put("businessSubSampleId", businessAssayTaskDataDO.getBusinessSubSampleId());
|
||||||
for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
map.put("businessSubParentSampleId", businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||||
// map.put("p" + p.getDicId(), p);
|
map.put("configAssayMethodId", businessAssayTaskDataDO.getConfigAssayMethodId());
|
||||||
map.put(p.getName(), p.getValue());
|
map.put("businessAssayTaskDetailId", businessAssayTaskDetailDO.getId());
|
||||||
}
|
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
|
||||||
|
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
|
||||||
|
map.put("analysisType", "analysis");
|
||||||
|
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||||
|
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> businessAssayTaskParameterDataList = businessAssayTaskParameterDataMapper.selectByBusinessAssayTaskDataIds(Arrays.asList(businessAssayTaskDataDO.getId()));
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO businessAssayTaskParameterDataDO : businessAssayTaskParameterDataList) {
|
||||||
|
map.put(businessAssayTaskParameterDataDO.getName(), businessAssayTaskParameterDataDO.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
datas.add(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
|
||||||
|
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList2 = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch2);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList2) {
|
||||||
|
map.put(ep.getName(), ep.getValue());
|
||||||
|
if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||||
|
BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
||||||
|
parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||||
|
map.put(p.getName(), p.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
datas.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
|
||||||
|
|
||||||
|
for (BusinessQCManagementDataDO businessQCManagementData : businessQCManagementDataDOList) {
|
||||||
|
Map<String, Object> map = new HashedMap<>();
|
||||||
|
map.put("businessAssayTaskDataId", businessQCManagementData.getId());
|
||||||
|
map.put("businessAssayTaskId", businessQCManagementData.getBusinessAssayTaskId());
|
||||||
|
map.put("businessSubSampleId", "");
|
||||||
|
map.put("businessSubParentSampleId", "");
|
||||||
|
map.put("configAssayMethodId", businessQCManagementData.getConfigAssayMethodId());
|
||||||
|
map.put("businessAssayTaskDetailId", "");
|
||||||
|
map.put("sampleCode", businessQCManagementData.getSampleCode());
|
||||||
|
map.put("sampleName", businessQCManagementData.getSampleName());
|
||||||
|
map.put("analysisType", businessQCManagementData.getDictionaryBusinessKey());
|
||||||
|
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||||
|
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> businessQCManagementSampleParameterDataList = businessQCManagementSampleParameterDataMapper.selectByBusinessQCManagementDataIds(Arrays.asList(businessQCManagementData.getId()));
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO businessQCManagementSampleParameterData : businessQCManagementSampleParameterDataList) {
|
||||||
|
map.put(businessQCManagementSampleParameterData.getName(), businessQCManagementSampleParameterData.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
|
||||||
|
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList2 = businessQCManagementProjectDataMapper.selectProjectAndParameterBy(projectDataSearch2);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList2) {
|
||||||
|
map.put(ep.getName(), ep.getValue());
|
||||||
|
if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||||
|
BusinessQCManagementParameterDataReqVO parameterDataSearch = new BusinessQCManagementParameterDataReqVO();
|
||||||
|
parameterDataSearch.setBusinessQCManagementProjectDataId(ep.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> plist = businessQCManagementParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||||
|
map.put(p.getName(), p.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
datas.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
for (BusinessQCCoefficientDataDO businessQCCoefficientData: businessQCCoefficientDataDOList) {
|
||||||
|
Map<String, Object> map = new HashedMap<>();
|
||||||
|
map.put("businessAssayTaskDataId", businessQCCoefficientData.getId());
|
||||||
|
map.put("businessAssayTaskId", businessQCCoefficientData.getBusinessAssayTaskId());
|
||||||
|
map.put("businessSubSampleId", "");
|
||||||
|
map.put("businessSubParentSampleId", "");
|
||||||
|
map.put("configAssayMethodId", businessQCCoefficientData.getConfigAssayMethodId());
|
||||||
|
map.put("businessAssayTaskDetailId", "");
|
||||||
|
map.put("sampleCode", businessQCCoefficientData.getSampleCode());
|
||||||
|
map.put("sampleName", businessQCCoefficientData.getSampleName());
|
||||||
|
map.put("analysisType", businessQCCoefficientData.getDictionaryBusinessKey());
|
||||||
|
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||||
|
|
||||||
|
BusinessQCCoefficientParameterDataReqVO parameterDataSearch2 = new BusinessQCCoefficientParameterDataReqVO();
|
||||||
|
parameterDataSearch2.setBusinessQCCoefficientDataId(businessQCCoefficientData.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> plist2 = businessQCCoefficientParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch2);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO p : plist2) {
|
||||||
|
map.put(p.getName(), p.getValue());
|
||||||
|
}
|
||||||
|
datas.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ("vertical".equals(reportDataType)) {//纵向数据
|
||||||
|
List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()));
|
||||||
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
|
||||||
|
|
||||||
|
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataList) {
|
||||||
|
BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getSampleId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||||
|
|
||||||
|
HashedMap<String, Object> map = new HashedMap<>();
|
||||||
|
map.put("businessAssayTaskDataId", businessAssayTaskDataDO.getId());
|
||||||
|
map.put("businessAssayTaskId", businessAssayTaskDataDO.getBusinessAssayTaskId());
|
||||||
|
map.put("businessSubSampleId", businessAssayTaskDataDO.getBusinessSubSampleId());
|
||||||
|
map.put("businessSubParentSampleId", businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||||
|
map.put("configAssayMethodId", businessAssayTaskDataDO.getConfigAssayMethodId());
|
||||||
|
map.put("businessAssayTaskDetailId", businessAssayTaskDetailDO.getId());
|
||||||
|
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
|
||||||
|
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
|
||||||
|
map.put("analysisType", "analysis");
|
||||||
|
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||||
|
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> businessAssayTaskParameterDataList = businessAssayTaskParameterDataMapper.selectByBusinessAssayTaskDataIds(Arrays.asList(businessAssayTaskDataDO.getId()));
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO businessAssayTaskParameterDataDO : businessAssayTaskParameterDataList) {
|
||||||
|
map.put(businessAssayTaskParameterDataDO.getName(), businessAssayTaskParameterDataDO.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
|
||||||
|
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList2 = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch2);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList2) {
|
||||||
|
HashedMap<String, Object> newMap = SerializationUtils.clone(map);
|
||||||
|
// newMap.put(ep.getName(), ep.getValue());
|
||||||
|
newMap.put("projectName", ep.getName());
|
||||||
|
newMap.put("projectValue", ep.getValue());
|
||||||
|
if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||||
|
BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
||||||
|
parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||||
|
newMap.put(p.getName(), p.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
datas.add(newMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
|
||||||
|
|
||||||
|
for (BusinessQCManagementDataDO businessQCManagementData : businessQCManagementDataDOList) {
|
||||||
|
HashedMap<String, Object> map = new HashedMap<>();
|
||||||
|
map.put("businessAssayTaskDataId", businessQCManagementData.getId());
|
||||||
|
map.put("businessAssayTaskId", businessQCManagementData.getBusinessAssayTaskId());
|
||||||
|
map.put("businessSubSampleId", "");
|
||||||
|
map.put("businessSubParentSampleId", "");
|
||||||
|
map.put("configAssayMethodId", businessQCManagementData.getConfigAssayMethodId());
|
||||||
|
map.put("businessAssayTaskDetailId", "");
|
||||||
|
map.put("sampleCode", businessQCManagementData.getSampleCode());
|
||||||
|
map.put("sampleName", businessQCManagementData.getSampleName());
|
||||||
|
map.put("analysisType", businessQCManagementData.getDictionaryBusinessKey());
|
||||||
|
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||||
|
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> businessQCManagementSampleParameterDataList = businessQCManagementSampleParameterDataMapper.selectByBusinessQCManagementDataIds(Arrays.asList(businessQCManagementData.getId()));
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO businessQCManagementSampleParameterData : businessQCManagementSampleParameterDataList) {
|
||||||
|
map.put(businessQCManagementSampleParameterData.getName(), businessQCManagementSampleParameterData.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
|
||||||
|
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList2 = businessQCManagementProjectDataMapper.selectProjectAndParameterBy(projectDataSearch2);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList2) {
|
||||||
|
HashedMap<String, Object> newMap = SerializationUtils.clone(map);
|
||||||
|
// newMap.put(ep.getName(), ep.getValue());
|
||||||
|
newMap.put("projectName", ep.getName());
|
||||||
|
newMap.put("projectValue", ep.getValue());
|
||||||
|
if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||||
|
BusinessQCManagementParameterDataReqVO parameterDataSearch = new BusinessQCManagementParameterDataReqVO();
|
||||||
|
parameterDataSearch.setBusinessQCManagementProjectDataId(ep.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> plist = businessQCManagementParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||||
|
newMap.put(p.getName(), p.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
datas.add(newMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
for (BusinessQCCoefficientDataDO businessQCCoefficientData: businessQCCoefficientDataDOList) {
|
||||||
|
Map<String, Object> map = new HashedMap<>();
|
||||||
|
map.put("businessAssayTaskDataId", businessQCCoefficientData.getId());
|
||||||
|
map.put("businessAssayTaskId", businessQCCoefficientData.getBusinessAssayTaskId());
|
||||||
|
map.put("businessSubSampleId", "");
|
||||||
|
map.put("businessSubParentSampleId", "");
|
||||||
|
map.put("configAssayMethodId", businessQCCoefficientData.getConfigAssayMethodId());
|
||||||
|
map.put("businessAssayTaskDetailId", "");
|
||||||
|
map.put("sampleCode", businessQCCoefficientData.getSampleCode());
|
||||||
|
map.put("sampleName", businessQCCoefficientData.getSampleName());
|
||||||
|
map.put("analysisType", businessQCCoefficientData.getDictionaryBusinessKey());
|
||||||
|
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||||
|
|
||||||
|
BusinessQCCoefficientParameterDataReqVO parameterDataSearch2 = new BusinessQCCoefficientParameterDataReqVO();
|
||||||
|
parameterDataSearch2.setBusinessQCCoefficientDataId(businessQCCoefficientData.getId());
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> plist2 = businessQCCoefficientParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch2);
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO p : plist2) {
|
||||||
|
map.put(p.getName(), p.getValue());
|
||||||
|
}
|
||||||
|
datas.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (BusinessQCManagementDataDO businessQCManagementData : businessQCManagementDataDOList) {
|
|
||||||
Map<String, Object> map = new HashedMap<>();
|
|
||||||
map.put("businessAssayTaskDataId", businessQCManagementData.getId());
|
|
||||||
map.put("businessAssayTaskId", businessQCManagementData.getBusinessAssayTaskId());
|
|
||||||
map.put("businessSubSampleId", "");
|
|
||||||
map.put("businessSubParentSampleId", "");
|
|
||||||
map.put("configAssayMethodId", businessQCManagementData.getConfigAssayMethodId());
|
|
||||||
map.put("businessAssayTaskDetailId", "");
|
|
||||||
map.put("sampleCode", businessQCManagementData.getSampleCode());
|
|
||||||
map.put("sampleName", businessQCManagementData.getSampleName());
|
|
||||||
map.put("analysisType", businessQCManagementData.getDictionaryBusinessKey());
|
|
||||||
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
|
||||||
|
|
||||||
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
|
|
||||||
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
|
||||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList2 = businessQCManagementProjectDataMapper.selectProjectAndParameterBy(projectDataSearch2);
|
|
||||||
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList2) {
|
|
||||||
// map.put("e" + ep.getDicId(), ep);
|
|
||||||
map.put(ep.getName(), ep.getValue());
|
|
||||||
if (StringUtils.isNotEmpty(ep.getFormula())) {
|
|
||||||
BusinessQCManagementParameterDataReqVO parameterDataSearch = new BusinessQCManagementParameterDataReqVO();
|
|
||||||
parameterDataSearch.setBusinessQCManagementProjectDataId(ep.getId());
|
|
||||||
List<BusinessAssayProjectAndParameterRespVO> plist = businessQCManagementParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
|
||||||
for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
|
||||||
// map.put("p" + p.getDicId(), p);
|
|
||||||
map.put(p.getName(), p.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
datas.add(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
|
||||||
for (BusinessQCCoefficientDataDO businessQCCoefficientData: businessQCCoefficientDataDOList) {
|
|
||||||
Map<String, Object> map = new HashedMap<>();
|
|
||||||
map.put("businessAssayTaskDataId", businessQCCoefficientData.getId());
|
|
||||||
map.put("businessAssayTaskId", businessQCCoefficientData.getBusinessAssayTaskId());
|
|
||||||
map.put("businessSubSampleId", "");
|
|
||||||
map.put("businessSubParentSampleId", "");
|
|
||||||
map.put("configAssayMethodId", businessQCCoefficientData.getConfigAssayMethodId());
|
|
||||||
map.put("businessAssayTaskDetailId", "");
|
|
||||||
map.put("sampleCode", businessQCCoefficientData.getSampleCode());
|
|
||||||
map.put("sampleName", businessQCCoefficientData.getSampleName());
|
|
||||||
map.put("analysisType", businessQCCoefficientData.getDictionaryBusinessKey());
|
|
||||||
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
|
||||||
|
|
||||||
BusinessQCCoefficientParameterDataReqVO parameterDataSearch2 = new BusinessQCCoefficientParameterDataReqVO();
|
|
||||||
parameterDataSearch2.setBusinessQCCoefficientDataId(businessQCCoefficientData.getId());
|
|
||||||
List<BusinessAssayProjectAndParameterRespVO> plist2 = businessQCCoefficientParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch2);
|
|
||||||
for (BusinessAssayProjectAndParameterRespVO p : plist2) {
|
|
||||||
// map.put("p" + p.getDicId(), p);
|
|
||||||
map.put(p.getName(), p.getValue());
|
|
||||||
}
|
|
||||||
datas.add(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
// resultJsonObject.put("all", datas);
|
// resultJsonObject.put("all", datas);
|
||||||
// Map<String, List<Map<String, Object>>> map = datas.stream().collect(Collectors.groupingBy(g -> (String) g.get("analysisType")));
|
// Map<String, List<Map<String, Object>>> map = datas.stream().collect(Collectors.groupingBy(g -> (String) g.get("analysisType")));
|
||||||
// for (Map.Entry<String, List<Map<String, Object>>> entry : map.entrySet()) {
|
// for (Map.Entry<String, List<Map<String, Object>>> entry : map.entrySet()) {
|
||||||
// resultJsonObject.put(entry.getKey(), entry.getValue());
|
// resultJsonObject.put(entry.getKey(), entry.getValue());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
List<Map<String, Object>> fxList = datas.stream().filter(f -> "analysis".equals(f.get("analysisType")) || "zky".equals(f.get("analysisType")) || "kby".equals(f.get("analysisType")) ).collect(Collectors.toList());
|
List<Map<String, Object>> fxList = datas.stream().filter(f -> "analysis".equals(f.get("analysisType")) || "zky".equals(f.get("analysisType")) || "kby".equals(f.get("analysisType")) || "zkkby".equals(f.get("analysisType")) || "jky".equals(f.get("analysisType")) ).collect(Collectors.toList());
|
||||||
resultJsonObject.put("fx", fxList);
|
resultJsonObject.put("fx", fxList);
|
||||||
List<Map<String, Object>> byList = datas.stream().filter(f -> "by".equals(f.get("analysisType"))).collect(Collectors.toList());
|
List<Map<String, Object>> byList = datas.stream().filter(f -> "by".equals(f.get("analysisType"))).collect(Collectors.toList());
|
||||||
resultJsonObject.put("by", byList);
|
resultJsonObject.put("by", byList);
|
||||||
return resultJsonObject;
|
return resultJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,11 +43,13 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDa
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
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.BusinessAssayTaskDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementSampleParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
@@ -56,11 +58,13 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMa
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDetailMapper;
|
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.BusinessAssayTaskMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementSampleParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
||||||
@@ -86,6 +90,8 @@ import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMap
|
|||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||||
import com.zt.plat.module.qms.common.data.dal.dataobject.DataCollectionDO;
|
import com.zt.plat.module.qms.common.data.dal.dataobject.DataCollectionDO;
|
||||||
import com.zt.plat.module.qms.common.data.service.DataCollectionService;
|
import com.zt.plat.module.qms.common.data.service.DataCollectionService;
|
||||||
|
import com.zt.plat.module.qms.common.dic.controller.vo.DictionaryBusinessExtendRespVO;
|
||||||
|
import com.zt.plat.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper;
|
||||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
@@ -95,6 +101,9 @@ import jakarta.annotation.Resource;
|
|||||||
@Service
|
@Service
|
||||||
public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DictionaryBusinessMapper dictionaryBusinessMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodMapper configAssayMethodMapper;
|
private ConfigAssayMethodMapper configAssayMethodMapper;
|
||||||
|
|
||||||
@@ -119,6 +128,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessAssayTaskParameterDataMapper businessAssayTaskParameterDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
|
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
|
||||||
|
|
||||||
@@ -137,6 +149,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementSampleParameterDataMapper businessQCManagementSampleParameterDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
||||||
|
|
||||||
@@ -564,6 +579,20 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
|
|
||||||
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//任务参数查询
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> taskParameterList = businessAssayTaskParameterDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> taskParameterMap = taskParameterList.stream().sorted(Comparator.comparing(BusinessAssayProjectAndParameterRespVO::getParamNo)).collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId,
|
||||||
|
LinkedHashMap::new, // 保持组首次出现的顺序(可选)
|
||||||
|
Collectors.toList() // ArrayList 保持组内顺序
|
||||||
|
));
|
||||||
|
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : taskParameterMap.entrySet()) {
|
||||||
|
BusinessAssayProjectAndParameterRespVO taskParameter = entry.getValue().get(0);
|
||||||
|
String fieldIndex = "a" + taskParameter.getDicId();
|
||||||
|
String title = taskParameter.getShowName() + (StringUtils.isBlank(taskParameter.getUnit()) ? "" : "(" + taskParameter.getUnit() + ")");
|
||||||
|
boolean isEdit = StringUtils.isBlank(taskParameter.getFormula());
|
||||||
|
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", taskParameter.getDataType(), taskParameter.getDecimalPosition(), null, taskParameter.getFormula(), taskParameter.getParamNo(), isEdit, taskParameter.getUnit(), "attribute", taskParameter.getFillingWay(), taskParameter.getGroupDictionaryBusinessId(), taskParameter.getGroupDictionaryBusinessKey(), taskParameter.getGroupDictionaryBusinessName()));
|
||||||
|
}
|
||||||
|
|
||||||
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
|
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
|
||||||
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
|
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
|
||||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
|
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
|
||||||
@@ -618,6 +647,10 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
String targetParameter = target.getParameter();
|
String targetParameter = target.getParameter();
|
||||||
|
|
||||||
BusinessAssayParameterDataDO businessAssayParameterDataDO = businessAssayParameterDataMapper.selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(businessAssayTaskDataDO.getId(), targetProject, targetParameter);
|
BusinessAssayParameterDataDO businessAssayParameterDataDO = businessAssayParameterDataMapper.selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(businessAssayTaskDataDO.getId(), targetProject, targetParameter);
|
||||||
|
if (businessAssayParameterDataDO == null) {
|
||||||
|
throw new ServiceException(1_032_100_000, "子样检测方法映射配置错误");
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(businessAssayParameterDataDO.getValue())) {
|
if (StringUtils.isBlank(businessAssayParameterDataDO.getValue())) {
|
||||||
//1 查询委托明细
|
//1 查询委托明细
|
||||||
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectByBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
|
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectByBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
|
||||||
@@ -694,6 +727,12 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
|
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
|
||||||
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
|
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
|
||||||
map.put("rollbackStatus", businessAssayTaskDetailDO.getRollbackStatus());
|
map.put("rollbackStatus", businessAssayTaskDetailDO.getRollbackStatus());
|
||||||
|
|
||||||
|
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> taskParameterList2 = businessAssayTaskParameterDataMapper.selectByBusinessAssayTaskDataIds(Arrays.asList(businessAssayTaskDataDO.getId()));
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO taskParameter : taskParameterList2) {
|
||||||
|
map.put("a" + taskParameter.getDicId(), taskParameter);
|
||||||
|
}
|
||||||
|
|
||||||
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
|
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
|
||||||
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||||
@@ -738,7 +777,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
|
|
||||||
//处理数据
|
//处理数据
|
||||||
List<Map<String, Object>> datas = new ArrayList<>();
|
List<Map<String, Object>> datas = new ArrayList<>();
|
||||||
if ("kby".equals(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey()) || "by".equals(configQCSampleMethodExtendRespVO.getDictionaryBusinessKey())) {
|
if ("withoutProject".equals(configQCSampleMethodExtendRespVO.getParentDictionaryBusinesskey())) {//不带检测项目
|
||||||
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskIdAndDictionaryBusinessKey(businessAssayTaskDO.getId(), configQCSampleMethodExtendRespVO.getDictionaryBusinessKey());
|
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataDOList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskIdAndDictionaryBusinessKey(businessAssayTaskDO.getId(), configQCSampleMethodExtendRespVO.getDictionaryBusinessKey());
|
||||||
if (CollUtil.isEmpty(businessQCCoefficientDataDOList)) {
|
if (CollUtil.isEmpty(businessQCCoefficientDataDOList)) {
|
||||||
break;
|
break;
|
||||||
@@ -777,13 +816,29 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {//带检测项目
|
||||||
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
|
||||||
if (CollUtil.isEmpty(businessQCManagementDataDOList)) {
|
if (CollUtil.isEmpty(businessQCManagementDataDOList)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
BusinessQCManagementDataDO businessQCManagementDataDO = businessQCManagementDataDOList.get(0);
|
BusinessQCManagementDataDO businessQCManagementDataDO = businessQCManagementDataDOList.get(0);
|
||||||
|
|
||||||
|
|
||||||
|
//任务参数查询
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> taskParameterList = businessQCManagementSampleParameterDataMapper.selectByBusinessQCManagementDataIds(Arrays.asList(businessQCManagementDataDO.getId()));
|
||||||
|
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> taskParameterMap = taskParameterList.stream().sorted(Comparator.comparing(BusinessAssayProjectAndParameterRespVO::getParamNo)).collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId,
|
||||||
|
LinkedHashMap::new, // 保持组首次出现的顺序(可选)
|
||||||
|
Collectors.toList() // ArrayList 保持组内顺序
|
||||||
|
));
|
||||||
|
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : taskParameterMap.entrySet()) {
|
||||||
|
BusinessAssayProjectAndParameterRespVO taskParameter = entry.getValue().get(0);
|
||||||
|
String fieldIndex = "a" + taskParameter.getDicId();
|
||||||
|
String title = taskParameter.getShowName() + (StringUtils.isBlank(taskParameter.getUnit()) ? "" : "(" + taskParameter.getUnit() + ")");
|
||||||
|
boolean isEdit = StringUtils.isBlank(taskParameter.getFormula());
|
||||||
|
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", taskParameter.getDataType(), taskParameter.getDecimalPosition(), null, taskParameter.getFormula(), taskParameter.getParamNo(), isEdit, taskParameter.getUnit(), "attribute", taskParameter.getFillingWay(), taskParameter.getGroupDictionaryBusinessId(), taskParameter.getGroupDictionaryBusinessKey(), taskParameter.getGroupDictionaryBusinessName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BusinessQCManagementProjectDataReqVO projectDataSearch = new BusinessQCManagementProjectDataReqVO();
|
BusinessQCManagementProjectDataReqVO projectDataSearch = new BusinessQCManagementProjectDataReqVO();
|
||||||
projectDataSearch.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
projectDataSearch.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
||||||
@@ -817,6 +872,12 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
map.put("businessAssayTaskDetailId", "");
|
map.put("businessAssayTaskDetailId", "");
|
||||||
map.put("sampleCode", businessQCManagementData.getSampleCode());
|
map.put("sampleCode", businessQCManagementData.getSampleCode());
|
||||||
map.put("sampleName", businessQCManagementData.getSampleName());
|
map.put("sampleName", businessQCManagementData.getSampleName());
|
||||||
|
|
||||||
|
List<BusinessAssayProjectAndParameterRespVO> taskParameterList2 = businessQCManagementSampleParameterDataMapper.selectByBusinessQCManagementDataIds(Arrays.asList(businessQCManagementData.getId()));
|
||||||
|
for (BusinessAssayProjectAndParameterRespVO taskParameter : taskParameterList2) {
|
||||||
|
map.put("a" + taskParameter.getDicId(), taskParameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
|
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
|
||||||
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
||||||
@@ -861,18 +922,25 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BusinessAssayTaskAnalysisDataRespVO> assayTaskAnalysisDataList = vo.getAssayTaskAnalysisDataList();
|
List<BusinessAssayTaskAnalysisDataRespVO> assayTaskAnalysisDataList = vo.getAssayTaskAnalysisDataList();
|
||||||
|
|
||||||
|
List<DictionaryBusinessExtendRespVO> dictionaryBusinessItemList = dictionaryBusinessMapper.selectItemByCategoryKeys(Arrays.asList("withProject", "withoutProject"));
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(assayTaskAnalysisDataList)) {
|
if (CollUtil.isNotEmpty(assayTaskAnalysisDataList)) {
|
||||||
for (BusinessAssayTaskAnalysisDataRespVO businessAssayTaskAnalysisDataRespVO : assayTaskAnalysisDataList) {
|
for (BusinessAssayTaskAnalysisDataRespVO businessAssayTaskAnalysisDataRespVO : assayTaskAnalysisDataList) {
|
||||||
if ("analysis".equals(businessAssayTaskAnalysisDataRespVO.getAnalysisType())) {
|
DictionaryBusinessExtendRespVO dictionaryBusinessItem = dictionaryBusinessItemList.stream().filter(f -> f.getKey().equals(businessAssayTaskAnalysisDataRespVO.getAnalysisType())).findFirst().orElse(null);
|
||||||
|
if ("analysis".equals(businessAssayTaskAnalysisDataRespVO.getAnalysisType())) {//分析样
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, vo.getBusinessAssayTaskId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, vo.getBusinessAssayTaskId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
|
||||||
|
|
||||||
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<BusinessAssayTaskParameterDataDO> businessAssayTaskParameterDataList = businessAssayTaskParameterDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskParameterDataDO>().in(BusinessAssayTaskParameterDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIdList));
|
||||||
|
|
||||||
List<BusinessAssayProjectDataDO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayProjectDataDO>().in(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIdList));
|
List<BusinessAssayProjectDataDO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayProjectDataDO>().in(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIdList));
|
||||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
List<BusinessAssayParameterDataDO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayParameterDataDO>().in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIdList));
|
List<BusinessAssayParameterDataDO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayParameterDataDO>().in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIdList));
|
||||||
|
|
||||||
|
|
||||||
List<Map<String,Object>> datas = businessAssayTaskAnalysisDataRespVO.getDatas();
|
List<Map<String,Object>> datas = businessAssayTaskAnalysisDataRespVO.getDatas();
|
||||||
for (Map<String, Object> map : datas) {
|
for (Map<String, Object> map : datas) {
|
||||||
|
|
||||||
@@ -935,11 +1003,39 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
} else {
|
} else {
|
||||||
businessAssayParameterDataDO.setValue(null);
|
businessAssayParameterDataDO.setValue(null);
|
||||||
}
|
}
|
||||||
|
} else if ("attribute".equals(pap.getType())) {
|
||||||
|
BusinessAssayTaskParameterDataDO businessAssayTaskParameterDataDO = businessAssayTaskParameterDataList.stream().filter(f -> f.getId().equals(pap.getId())).findFirst().orElse(null);
|
||||||
|
if (StringUtils.isNotBlank(pap.getValue())) {
|
||||||
|
String dataType = pap.getDataType();//string-字符串,int-整数,decimal-小数,date-日期,datetime-时间
|
||||||
|
switch (dataType) {
|
||||||
|
case "int":
|
||||||
|
case "date":
|
||||||
|
case "datetime":
|
||||||
|
case "string":
|
||||||
|
businessAssayTaskParameterDataDO.setValue(pap.getValue());
|
||||||
|
businessAssayTaskParameterDataDO.setRemark(pap.getShowName() + ": " + pap.getValue());
|
||||||
|
break;
|
||||||
|
case "decimal":
|
||||||
|
BigDecimal value = new BigDecimal(pap.getValue());
|
||||||
|
value = value.setScale(pap.getDecimalPosition(), RoundingMode.HALF_EVEN);
|
||||||
|
businessAssayTaskParameterDataDO.setValue(value.toPlainString());
|
||||||
|
businessAssayTaskParameterDataDO.setRemark(pap.getShowName() + ": " + value.toPlainString());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("Unexpected value: " + dataType);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
businessAssayTaskParameterDataDO.setValue(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(businessAssayTaskParameterDataList)) {
|
||||||
|
businessAssayTaskParameterDataMapper.updateBatch(businessAssayTaskParameterDataList);
|
||||||
|
}
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(businessAssayProjectDataList)) {
|
if (CollUtil.isNotEmpty(businessAssayProjectDataList)) {
|
||||||
businessAssayProjectDataMapper.updateBatch(businessAssayProjectDataList);
|
businessAssayProjectDataMapper.updateBatch(businessAssayProjectDataList);
|
||||||
}
|
}
|
||||||
@@ -947,10 +1043,12 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
businessAssayParameterDataMapper.updateBatch(businessAssayParameterDataList);
|
businessAssayParameterDataMapper.updateBatch(businessAssayParameterDataList);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ("zky".equals(businessAssayTaskAnalysisDataRespVO.getAnalysisType())) {
|
} else if (dictionaryBusinessItem != null && "withProject".equals(dictionaryBusinessItem.getParentDictionaryBusinesskey())) {//带检测项目
|
||||||
List<BusinessQCManagementDataDO> BusinessQCManagementDataList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
List<BusinessQCManagementDataDO> BusinessQCManagementDataList = businessQCManagementDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
|
||||||
List<Long> businessQCManagementDataIdList = BusinessQCManagementDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessQCManagementDataIdList = BusinessQCManagementDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<BusinessQCManagementSampleParameterDataDO> businessQCManagementSampleParameterDataDOList = businessQCManagementSampleParameterDataMapper.selectList(new LambdaQueryWrapperX<BusinessQCManagementSampleParameterDataDO>().in(BusinessQCManagementSampleParameterDataDO::getBusinessQCManagementDataId, businessQCManagementDataIdList));
|
||||||
|
|
||||||
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataList = businessQCManagementProjectDataMapper.selectByBusinessQCManagementDataIds(businessQCManagementDataIdList);
|
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataList = businessQCManagementProjectDataMapper.selectByBusinessQCManagementDataIds(businessQCManagementDataIdList);
|
||||||
List<Long> businessQCManagementProjectDataIdList = businessQCManagementProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessQCManagementProjectDataIdList = businessQCManagementProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
@@ -1019,11 +1117,39 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
} else {
|
} else {
|
||||||
businessQCManagementParameterDataDO.setValue(null);
|
businessQCManagementParameterDataDO.setValue(null);
|
||||||
}
|
}
|
||||||
|
} else if ("attribute".equals(pap.getType())) {
|
||||||
|
BusinessQCManagementSampleParameterDataDO businessQCManagementSampleParameterDataDO = businessQCManagementSampleParameterDataDOList.stream().filter(f -> f.getId().equals(pap.getId())).findFirst().orElse(null);
|
||||||
|
if (StringUtils.isNotBlank(pap.getValue())) {
|
||||||
|
String dataType = pap.getDataType();//string-字符串,int-整数,decimal-小数,date-日期,datetime-时间
|
||||||
|
switch (dataType) {
|
||||||
|
case "int":
|
||||||
|
case "date":
|
||||||
|
case "datetime":
|
||||||
|
case "string":
|
||||||
|
businessQCManagementSampleParameterDataDO.setValue(pap.getValue());
|
||||||
|
businessQCManagementSampleParameterDataDO.setRemark(pap.getShowName() + ": " + pap.getValue());
|
||||||
|
break;
|
||||||
|
case "decimal":
|
||||||
|
BigDecimal value = new BigDecimal(pap.getValue());
|
||||||
|
value = value.setScale(pap.getDecimalPosition(), RoundingMode.HALF_EVEN);
|
||||||
|
businessQCManagementSampleParameterDataDO.setValue(value.toPlainString());
|
||||||
|
businessQCManagementSampleParameterDataDO.setRemark(pap.getShowName() + ": " + value.toPlainString());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("Unexpected value: " + dataType);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
businessQCManagementSampleParameterDataDO.setValue(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(businessQCManagementSampleParameterDataDOList)) {
|
||||||
|
businessQCManagementSampleParameterDataMapper.updateBatch(businessQCManagementSampleParameterDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(businessQCManagementProjectDataList)) {
|
if (CollUtil.isNotEmpty(businessQCManagementProjectDataList)) {
|
||||||
businessQCManagementProjectDataMapper.updateBatch(businessQCManagementProjectDataList);
|
businessQCManagementProjectDataMapper.updateBatch(businessQCManagementProjectDataList);
|
||||||
}
|
}
|
||||||
@@ -1031,7 +1157,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
if (CollUtil.isNotEmpty(businessQCManagementParameterDataList)) {
|
if (CollUtil.isNotEmpty(businessQCManagementParameterDataList)) {
|
||||||
businessQCManagementParameterDataMapper.updateBatch(businessQCManagementParameterDataList);
|
businessQCManagementParameterDataMapper.updateBatch(businessQCManagementParameterDataList);
|
||||||
}
|
}
|
||||||
} else {
|
} else { //不带检测项目的
|
||||||
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
List<BusinessQCCoefficientDataDO> businessQCCoefficientDataList = businessQCCoefficientDataMapper.selectByBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||||
|
|
||||||
List<Long> businessQCCoefficientDataIdList = businessQCCoefficientDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessQCCoefficientDataIdList = businessQCCoefficientDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -31,14 +31,6 @@ public interface SampleTaskAssignService {
|
|||||||
*/
|
*/
|
||||||
List<UnAssignTaskedSubSampleRespVO> getAssaySampleList(BusinessAssayTaskDataReqVO reqVO);
|
List<UnAssignTaskedSubSampleRespVO> getAssaySampleList(BusinessAssayTaskDataReqVO reqVO);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据子样id查询分析方法
|
|
||||||
* @param businessSubSampleId
|
|
||||||
* @param configAssayMethodId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
// List<Object> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据子样id列表,查询分析方法项目
|
* 根据子样id列表,查询分析方法项目
|
||||||
* @param businessSubSampleIdList 子样id列表
|
* @param businessSubSampleIdList 子样id列表
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientP
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementSampleParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
@@ -47,6 +48,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParam
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementSampleParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||||
@@ -59,8 +61,10 @@ import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethod
|
|||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodParameterExtendRespVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodParameterExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
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.ConfigAssayMethodDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
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.ConfigAssayMethodMapper;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
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.business.config.dal.mapper.ConfigQCSampleMethodMapper;
|
||||||
@@ -125,6 +129,9 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodMapper configAssayMethodMapper;
|
private ConfigAssayMethodMapper configAssayMethodMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigAssayMethodParameterMapper configAssayMethodParameterMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||||
|
|
||||||
@@ -149,6 +156,9 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
private BusinessQCManagementDataMapper businessQCManagementDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessQCManagementSampleParameterDataMapper businessQCManagementSampleParameterDataMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
private BusinessQCManagementProjectDataMapper businessQCManagementProjectDataMapper;
|
||||||
|
|
||||||
@@ -187,65 +197,6 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
List<UnAssignTaskedSubSampleRespVO> list = businessAssayTaskDataMapper.selectUnAssignTaskedSubSample(reqVO);
|
List<UnAssignTaskedSubSampleRespVO> list = businessAssayTaskDataMapper.selectUnAssignTaskedSubSample(reqVO);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@Override
|
|
||||||
public List<Object> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
|
||||||
List<Object> resutList = new ArrayList<>();
|
|
||||||
//当前登录用户
|
|
||||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
|
||||||
Long visitDeptId = loginUser.getVisitDeptId();
|
|
||||||
|
|
||||||
//子样
|
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(businessSubSampleId);
|
|
||||||
//原检测项目
|
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> oldConfigAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
|
||||||
//原检测项目字典id列表
|
|
||||||
List<Long> oldDictionaryProjectIdList = oldConfigAssayMethodProjectList.stream().map(m -> m.getDictionaryProjectId()).collect(Collectors.toList());
|
|
||||||
|
|
||||||
|
|
||||||
//子样对应的检测任务
|
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubSampleId(businessSubSampleId);
|
|
||||||
|
|
||||||
//查询子样配置的方法
|
|
||||||
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdAndAssayDepartmentId(businessSubSampleDO.getConfigSubSampleId(), visitDeptId);
|
|
||||||
|
|
||||||
JSONObject jsonObject = null;
|
|
||||||
for (ConfigSubSampleMethodExtendRespVO configSubSampleMethod : configSubSampleMethodList) {
|
|
||||||
jsonObject = new JSONObject();
|
|
||||||
jsonObject.put("configAssayMethodId", configSubSampleMethod.getConfigAssayMethodId());
|
|
||||||
jsonObject.put("configAssayMethodName", configSubSampleMethod.getConfigAssayMethodName());
|
|
||||||
jsonObject.put("configAssayMethodNameAndCategory", configSubSampleMethod.getConfigAssayMethodNameAndCategory());
|
|
||||||
jsonObject.put("configAssayMethodCode", configSubSampleMethod.getConfigAssayMethodCode());
|
|
||||||
|
|
||||||
StringBuilder assayProjectBuilder = new StringBuilder();
|
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configSubSampleMethod.getConfigAssayMethodId());
|
|
||||||
|
|
||||||
//判定是否存在原检测项目
|
|
||||||
boolean isExistProject = configAssayMethodProjectList.stream().anyMatch(m -> oldDictionaryProjectIdList.contains(m.getDictionaryProjectId()));
|
|
||||||
if (!isExistProject) {//如果不存在,则跳出循环
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProject : configAssayMethodProjectList) {
|
|
||||||
assayProjectBuilder.append(configAssayMethodProject.getShowName()).append(",");
|
|
||||||
}
|
|
||||||
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
|
||||||
|
|
||||||
jsonObject.put("assayProject", assayProjectBuilder.toString());
|
|
||||||
|
|
||||||
boolean checked = businessAssayTaskDataDOList.stream().anyMatch(m -> m.getConfigAssayMethodId().equals(configSubSampleMethod.getConfigAssayMethodId()));
|
|
||||||
boolean disabled = businessAssayTaskDataDOList.stream().anyMatch(m -> m.getConfigAssayMethodId().equals(configSubSampleMethod.getConfigAssayMethodId()) && m.getIsAssignTasked().equals(QmsCommonConstant.YES));
|
|
||||||
jsonObject.put("checked", checked);
|
|
||||||
jsonObject.put("disabled", disabled);
|
|
||||||
|
|
||||||
resutList.add(jsonObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return resutList;
|
|
||||||
}
|
|
||||||
**/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AssayMethodProjectRespVO> getAssayMethodProjectList(List<Long> businessSubSampleIdList, Long configAssayMethodId) {
|
public List<AssayMethodProjectRespVO> getAssayMethodProjectList(List<Long> businessSubSampleIdList, Long configAssayMethodId) {
|
||||||
@@ -709,147 +660,6 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void changeMethod(ChangeAssayMethodReqVO req) {
|
|
||||||
|
|
||||||
List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
|
|
||||||
List<BusinessAssayTaskDataDO> saveBusinessAssayTaskDataDOList = new ArrayList<>();
|
|
||||||
List<BusinessAssayProjectDataDO> saveBusinessAssayProjectDataDOList = new ArrayList<>();
|
|
||||||
List<BusinessAssayParameterDataDO> saveBusinessAssayParameterDataDOList = new ArrayList<>();
|
|
||||||
|
|
||||||
List<Long> removeProjectIdList = new ArrayList<>();
|
|
||||||
List<Long> removeParameterIdList = new ArrayList<>();
|
|
||||||
//子样
|
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(req.getBusinessSubSampleId());
|
|
||||||
|
|
||||||
//查询检测任务
|
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubSampleDO.getBusinessSubParentSampleId(), req.getConfigAssayMethodId());
|
|
||||||
|
|
||||||
boolean disabled = businessAssayTaskDataDOList.stream().anyMatch(m -> m.getIsAssignTasked().equals(QmsCommonConstant.YES));
|
|
||||||
if (disabled) {
|
|
||||||
throw new ServiceException(10010, "当前样品存在已分配任务,不允许修改分析方法");
|
|
||||||
}
|
|
||||||
//查询报表数据
|
|
||||||
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = businessAssayReportDataMapper.selectBytBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
|
|
||||||
for (BusinessAssayReportDataDO businessAssayReportDataDO : businessAssayReportDataDOList) {
|
|
||||||
String dataSource = businessAssayReportDataDO.getDataSource();
|
|
||||||
if (dataSource.contains(req.getConfigAssayMethodId().toString())) {//判定是否存在
|
|
||||||
List<Long> dataSourceList = new ArrayList<>();
|
|
||||||
String[] dataSourceSplit = dataSource.split(",");
|
|
||||||
for (int i = 0; i < dataSourceSplit.length; i++) {
|
|
||||||
dataSourceList.add(Long.parseLong(dataSourceSplit[i]));
|
|
||||||
}
|
|
||||||
//移除当前的
|
|
||||||
dataSourceList.remove(req.getConfigAssayMethodId());
|
|
||||||
//添加新的
|
|
||||||
dataSourceList.addAll(req.getChangeConfigAssayMethodIdList());
|
|
||||||
|
|
||||||
//重新赋值
|
|
||||||
businessAssayReportDataDO.setDataSource(CollUtil.join(dataSourceList, ","));
|
|
||||||
|
|
||||||
//添加到更新列表
|
|
||||||
updateBusinessAssayReportDataDOList.add(businessAssayReportDataDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataDOList) {
|
|
||||||
//查询旧的
|
|
||||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataExtendRespVOs = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
|
||||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataExtendRespVOs.stream().map(m -> m.getId()).collect(Collectors.toList());
|
|
||||||
removeProjectIdList.addAll(businessAssayProjectDataIdList);
|
|
||||||
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList = businessAssayParameterDataMapper.selectByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
|
||||||
List<Long> businessAssayParameterDataDOIdList = businessAssayParameterDataDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
|
||||||
removeParameterIdList.addAll(businessAssayParameterDataDOIdList);
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
for (Long configAssayMethodId : req.getChangeConfigAssayMethodIdList()) {
|
|
||||||
Long businessAssayTaskDataId = null;
|
|
||||||
if (i == 0) {
|
|
||||||
businessAssayTaskDataId = businessAssayTaskDataDO.getId();
|
|
||||||
businessAssayTaskDataDO.setConfigAssayMethodId(configAssayMethodId);
|
|
||||||
} else {
|
|
||||||
businessAssayTaskDataId = IdWorker.getId();
|
|
||||||
BusinessAssayTaskDataDO newBusinessAssayTaskDataDO = new BusinessAssayTaskDataDO();
|
|
||||||
newBusinessAssayTaskDataDO.setId(businessAssayTaskDataId);
|
|
||||||
newBusinessAssayTaskDataDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
|
|
||||||
newBusinessAssayTaskDataDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
|
|
||||||
newBusinessAssayTaskDataDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
|
||||||
newBusinessAssayTaskDataDO.setConfigAssayMethodId(configAssayMethodId);
|
|
||||||
newBusinessAssayTaskDataDO.setAssayType(businessAssayTaskDataDO.getAssayType());
|
|
||||||
newBusinessAssayTaskDataDO.setTaskType(businessAssayTaskDataDO.getTaskType());
|
|
||||||
newBusinessAssayTaskDataDO.setConfigSampleFlowId(businessAssayTaskDataDO.getConfigSampleFlowId());
|
|
||||||
newBusinessAssayTaskDataDO.setSampleFlowNodeKey(businessAssayTaskDataDO.getSampleFlowNodeKey());
|
|
||||||
newBusinessAssayTaskDataDO.setSampleFlowNodeTime(businessAssayTaskDataDO.getSampleFlowNodeTime());
|
|
||||||
newBusinessAssayTaskDataDO.setAssayDepartmentId(businessAssayTaskDataDO.getAssayDepartmentId());
|
|
||||||
newBusinessAssayTaskDataDO.setAssayDepartmentName(businessAssayTaskDataDO.getAssayDepartmentName());
|
|
||||||
|
|
||||||
saveBusinessAssayTaskDataDOList.add(newBusinessAssayTaskDataDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
//查询新的检测项目
|
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskDataDO.getConfigAssayMethodId());
|
|
||||||
|
|
||||||
StringBuilder assayProjectBuilder = new StringBuilder();
|
|
||||||
|
|
||||||
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
|
|
||||||
assayProjectBuilder.append(configAssayMethodProjectDO.getShowName()).append(",");
|
|
||||||
|
|
||||||
//检测项目
|
|
||||||
BusinessAssayProjectDataDO businessAssayProjectDataDO = new BusinessAssayProjectDataDO();
|
|
||||||
businessAssayProjectDataDO.setId(IdWorker.getId());
|
|
||||||
businessAssayProjectDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
|
||||||
businessAssayProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectDO.getId());
|
|
||||||
businessAssayProjectDataDO.setDictionaryProjectId(configAssayMethodProjectDO.getDictionaryProjectId());
|
|
||||||
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
|
|
||||||
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
|
|
||||||
businessAssayProjectDataDO.setIsEnabled(1);
|
|
||||||
businessAssayProjectDataDO.setIsNotAssessment(0);
|
|
||||||
|
|
||||||
saveBusinessAssayProjectDataDOList.add(businessAssayProjectDataDO);
|
|
||||||
|
|
||||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDOList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectId(configAssayMethodProjectDO.getId());
|
|
||||||
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDOList) {
|
|
||||||
BusinessAssayParameterDataDO businessAssayParameterDataDO = new BusinessAssayParameterDataDO();
|
|
||||||
businessAssayParameterDataDO.setId(IdWorker.getId());
|
|
||||||
businessAssayParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
|
|
||||||
businessAssayParameterDataDO.setBusinessAssayProjectDataId(businessAssayProjectDataDO.getId());
|
|
||||||
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
|
|
||||||
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
|
|
||||||
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
|
|
||||||
|
|
||||||
|
|
||||||
saveBusinessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
businessAssayTaskDataMapper.updateBatch(businessAssayTaskDataDOList);
|
|
||||||
businessAssayProjectDataMapper.deleteByIds(removeProjectIdList);
|
|
||||||
businessAssayParameterDataMapper.deleteByIds(removeParameterIdList);
|
|
||||||
//更新报表数据来源
|
|
||||||
if (updateBusinessAssayReportDataDOList.size() > 0) {
|
|
||||||
businessAssayReportDataMapper.updateBatch(updateBusinessAssayReportDataDOList);
|
|
||||||
}
|
|
||||||
if (saveBusinessAssayTaskDataDOList.size() > 0) {
|
|
||||||
businessAssayTaskDataMapper.insertBatch(saveBusinessAssayTaskDataDOList);
|
|
||||||
}
|
|
||||||
if (saveBusinessAssayProjectDataDOList.size() > 0) {
|
|
||||||
businessAssayProjectDataMapper.insertBatch(saveBusinessAssayProjectDataDOList);
|
|
||||||
}
|
|
||||||
if (saveBusinessAssayParameterDataDOList.size() > 0) {
|
|
||||||
businessAssayParameterDataMapper.insertBatch(saveBusinessAssayParameterDataDOList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
**/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public LiteflowResponse methodAssign(SampleTaskAssignMethodParam param) {
|
public LiteflowResponse methodAssign(SampleTaskAssignMethodParam param) {
|
||||||
@@ -955,6 +765,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void createQcSample(CreateQcSampleReqVO req) {
|
public void createQcSample(CreateQcSampleReqVO req) {
|
||||||
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = new ArrayList<>();
|
List<BusinessQCManagementDataDO> businessQCManagementDataDOList = new ArrayList<>();
|
||||||
|
List<BusinessQCManagementSampleParameterDataDO> businessQCManagementSampleParameterDataDOList = new ArrayList<>();
|
||||||
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataDOList = new ArrayList<>();
|
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataDOList = new ArrayList<>();
|
||||||
List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList = new ArrayList<>();
|
List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
@@ -969,7 +780,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
|
|
||||||
ConfigQCSampleMethodExtendRespVO configQCSampleMethod = configQCSampleMethodMapper.selectByConfigAssayMethodIdAndDictionaryBusinessKey(businessAssayTaskDO.getConfigAssayMethodId(), req.getDictionaryBusinessKey());
|
ConfigQCSampleMethodExtendRespVO configQCSampleMethod = configQCSampleMethodMapper.selectByConfigAssayMethodIdAndDictionaryBusinessKey(businessAssayTaskDO.getConfigAssayMethodId(), req.getDictionaryBusinessKey());
|
||||||
|
|
||||||
if ("kby".equals(req.getDictionaryBusinessKey()) || "by".equals(req.getDictionaryBusinessKey())) {//空白样和标样
|
if ("withoutProject".equals(req.getParentDictionaryBusinesskey())) {//不带检测项目的:如 空白样和标样
|
||||||
|
|
||||||
BusinessQCCoefficientDataDO businessQCCoefficientDataDO = new BusinessQCCoefficientDataDO();
|
BusinessQCCoefficientDataDO businessQCCoefficientDataDO = new BusinessQCCoefficientDataDO();
|
||||||
businessQCCoefficientDataDO.setId(IdWorker.getId());
|
businessQCCoefficientDataDO.setId(IdWorker.getId());
|
||||||
@@ -1013,10 +824,26 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
businessQCCoefficientParameterDataDOList.add(businessQCCoefficientParameterDataDO);
|
businessQCCoefficientParameterDataDOList.add(businessQCCoefficientParameterDataDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {//管理样与标准样
|
} else {//带检测项目的 如: 管理样、标准样、质控空白样、监控样
|
||||||
//分析项目
|
//分析项目
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectExtendRespList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
//检测项目id
|
||||||
|
List<Long> dictionaryProjectIdList = new ArrayList<>();
|
||||||
|
//必须要检测的项目
|
||||||
|
String mustProject = configQCSampleMethod.getMustProject();
|
||||||
|
if (StringUtils.isNotBlank(mustProject)) {
|
||||||
|
String[] mustProjects = mustProject.split(",");
|
||||||
|
for (String dicProjectId : mustProjects) {
|
||||||
|
dictionaryProjectIdList.add(Long.parseLong(dicProjectId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//当前任务的检测项目列表
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskId(req.getBusinessAssayTaskId());
|
||||||
|
//获取当前任务的检测项目id列表
|
||||||
|
List<Long> busTaskDictionaryProjectIdList = businessAssayProjectDataList.stream().map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
|
||||||
|
dictionaryProjectIdList.addAll(busTaskDictionaryProjectIdList);
|
||||||
|
//获取需要创建的检测项目id
|
||||||
|
List<Long> configAssayMethodProjectIds = configAssayMethodProjectExtendRespList.stream().filter(f -> dictionaryProjectIdList.contains(f.getDictionaryProjectId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
//分析项目参数
|
//分析项目参数
|
||||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectIds(configAssayMethodProjectIds);
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodProjectIds(configAssayMethodProjectIds);
|
||||||
//分析项目
|
//分析项目
|
||||||
@@ -1043,8 +870,27 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
businessQCManagementDataDO.setIsReported(QmsCommonConstant.NO);
|
businessQCManagementDataDO.setIsReported(QmsCommonConstant.NO);
|
||||||
|
|
||||||
businessQCManagementDataDOList.add(businessQCManagementDataDO);
|
businessQCManagementDataDOList.add(businessQCManagementDataDO);
|
||||||
|
|
||||||
|
|
||||||
|
//分析方法参数配置
|
||||||
|
List<ConfigAssayMethodParameterDO> configAssayMethodParameterDOList = configAssayMethodParameterMapper.selectByConfigAssayMethodId(businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
BusinessQCManagementSampleParameterDataDO businessQCManagementSampleParameterDataDO = null;
|
||||||
|
for (ConfigAssayMethodParameterDO configAssayMethodParameterDO : configAssayMethodParameterDOList) {
|
||||||
|
businessQCManagementSampleParameterDataDO = new BusinessQCManagementSampleParameterDataDO();
|
||||||
|
businessQCManagementSampleParameterDataDO.setId(IdWorker.getId());
|
||||||
|
businessQCManagementSampleParameterDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
||||||
|
businessQCManagementSampleParameterDataDO.setConfigAssayMethodParameterId(configAssayMethodParameterDO.getId());
|
||||||
|
businessQCManagementSampleParameterDataDO.setDataType(configAssayMethodParameterDO.getDataType());
|
||||||
|
businessQCManagementSampleParameterDataDO.setDecimalPosition(configAssayMethodParameterDO.getDecimalPosition());
|
||||||
|
|
||||||
|
businessQCManagementSampleParameterDataDOList.add(businessQCManagementSampleParameterDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
|
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectExtendRespVO : configAssayMethodProjectExtendRespList) {
|
||||||
|
if (!dictionaryProjectIdList.contains(configAssayMethodProjectExtendRespVO.getDictionaryProjectId())) {//不存在则跳过
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
BusinessQCManagementProjectDataDO businessQCManagementProjectDataDO = new BusinessQCManagementProjectDataDO();
|
BusinessQCManagementProjectDataDO businessQCManagementProjectDataDO = new BusinessQCManagementProjectDataDO();
|
||||||
businessQCManagementProjectDataDO.setId(IdWorker.getId());
|
businessQCManagementProjectDataDO.setId(IdWorker.getId());
|
||||||
businessQCManagementProjectDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
businessQCManagementProjectDataDO.setBusinessQCManagementDataId(businessQCManagementDataDO.getId());
|
||||||
@@ -1077,6 +923,9 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
if (CollUtil.isNotEmpty(businessQCManagementDataDOList)) {
|
if (CollUtil.isNotEmpty(businessQCManagementDataDOList)) {
|
||||||
businessQCManagementDataMapper.insertBatch(businessQCManagementDataDOList);
|
businessQCManagementDataMapper.insertBatch(businessQCManagementDataDOList);
|
||||||
}
|
}
|
||||||
|
if (CollUtil.isNotEmpty(businessQCManagementSampleParameterDataDOList)) {
|
||||||
|
businessQCManagementSampleParameterDataMapper.insertBatch(businessQCManagementSampleParameterDataDOList);
|
||||||
|
}
|
||||||
if (CollUtil.isNotEmpty(businessQCManagementProjectDataDOList)) {
|
if (CollUtil.isNotEmpty(businessQCManagementProjectDataDOList)) {
|
||||||
businessQCManagementProjectDataMapper.insertBatch(businessQCManagementProjectDataDOList);
|
businessQCManagementProjectDataMapper.insertBatch(businessQCManagementProjectDataDOList);
|
||||||
}
|
}
|
||||||
@@ -1094,10 +943,10 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteQcSample(DeleteQcSampleReqVO req) {
|
public void deleteQcSample(DeleteQcSampleReqVO req) {
|
||||||
if ("kby".equals(req.getDictionaryBusinessKey()) || "by".equals(req.getDictionaryBusinessKey())) {//空白样和标样
|
if ("withoutProject".equals(req.getParentDictionaryBusinesskey())) {//不带检测项目的 空白样和标样
|
||||||
businessQCCoefficientDataMapper.deleteByIds(req.getQcSampleIdList());
|
businessQCCoefficientDataMapper.deleteByIds(req.getQcSampleIdList());
|
||||||
businessQCCoefficientParameterDataMapper.delete(new LambdaQueryWrapperX<BusinessQCCoefficientParameterDataDO>().in(BusinessQCCoefficientParameterDataDO::getBusinessQCCoefficientDataId, req.getQcSampleIdList()));
|
businessQCCoefficientParameterDataMapper.delete(new LambdaQueryWrapperX<BusinessQCCoefficientParameterDataDO>().in(BusinessQCCoefficientParameterDataDO::getBusinessQCCoefficientDataId, req.getQcSampleIdList()));
|
||||||
} else { //管理样和标准样
|
} else { //带检测项目的 管理样和标准样
|
||||||
businessQCManagementDataMapper.deleteByIds(req.getQcSampleIdList());
|
businessQCManagementDataMapper.deleteByIds(req.getQcSampleIdList());
|
||||||
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataList = businessQCManagementProjectDataMapper.selectByBusinessQCManagementDataIds(req.getQcSampleIdList());
|
List<BusinessQCManagementProjectDataDO> businessQCManagementProjectDataList = businessQCManagementProjectDataMapper.selectByBusinessQCManagementDataIds(req.getQcSampleIdList());
|
||||||
List<Long> businessQCManagementProjectDataIdList = businessQCManagementProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessQCManagementProjectDataIdList = businessQCManagementProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.controller.admin;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import jakarta.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.service.ConfigAssayMethodParameterService;
|
||||||
|
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 检测方法参数配置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/config-assay-method-parameter")
|
||||||
|
@Validated
|
||||||
|
public class ConfigAssayMethodParameterController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigAssayMethodParameterService configAssayMethodParameterService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建检测方法参数配置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:create')")
|
||||||
|
public CommonResult<ConfigAssayMethodParameterRespVO> createConfigAssayMethodParameter(@Valid @RequestBody ConfigAssayMethodParameterSaveReqVO createReqVO) {
|
||||||
|
return success(configAssayMethodParameterService.createConfigAssayMethodParameter(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新检测方法参数配置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:update')")
|
||||||
|
public CommonResult<Boolean> updateConfigAssayMethodParameter(@Valid @RequestBody ConfigAssayMethodParameterSaveReqVO updateReqVO) {
|
||||||
|
configAssayMethodParameterService.updateConfigAssayMethodParameter(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除检测方法参数配置")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:delete')")
|
||||||
|
public CommonResult<Boolean> deleteConfigAssayMethodParameter(@RequestParam("id") Long id) {
|
||||||
|
configAssayMethodParameterService.deleteConfigAssayMethodParameter(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除检测方法参数配置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:delete')")
|
||||||
|
public CommonResult<Boolean> deleteConfigAssayMethodParameterList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
configAssayMethodParameterService.deleteConfigAssayMethodParameterListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得检测方法参数配置")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:query')")
|
||||||
|
public CommonResult<ConfigAssayMethodParameterRespVO> getConfigAssayMethodParameter(@RequestParam("id") Long id) {
|
||||||
|
ConfigAssayMethodParameterDO configAssayMethodParameter = configAssayMethodParameterService.getConfigAssayMethodParameter(id);
|
||||||
|
return success(BeanUtils.toBean(configAssayMethodParameter, ConfigAssayMethodParameterRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得检测方法参数配置分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:query')")
|
||||||
|
public CommonResult<PageResult<ConfigAssayMethodParameterRespVO>> getConfigAssayMethodParameterPage(@Valid ConfigAssayMethodParameterPageReqVO pageReqVO) {
|
||||||
|
PageResult<ConfigAssayMethodParameterDO> pageResult = configAssayMethodParameterService.getConfigAssayMethodParameterPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, ConfigAssayMethodParameterRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出检测方法参数配置 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-assay-method-parameter:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportConfigAssayMethodParameterExcel(@Valid ConfigAssayMethodParameterPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<ConfigAssayMethodParameterDO> list = configAssayMethodParameterService.getConfigAssayMethodParameterPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "检测方法参数配置.xls", "数据", ConfigAssayMethodParameterRespVO.class,
|
||||||
|
BeanUtils.toBean(list, ConfigAssayMethodParameterRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -46,6 +46,9 @@ public class ConfigAssayMethodPageReqVO extends PageParam {
|
|||||||
@Schema(description = "任务单模板key")
|
@Schema(description = "任务单模板key")
|
||||||
private String configReportTemplateKey;
|
private String configReportTemplateKey;
|
||||||
|
|
||||||
|
@Schema(description = "任务单数据类型,横向:horizontal,纵向:vertical", example = "2")
|
||||||
|
private String reportDataType;
|
||||||
|
|
||||||
@Schema(description = "任务单编号规则")
|
@Schema(description = "任务单编号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 检测方法参数配置分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class ConfigAssayMethodParameterPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "检测方法ID", example = "29823")
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数名称", example = "张三")
|
||||||
|
private String parameterName;
|
||||||
|
|
||||||
|
@Schema(description = "参数简称", example = "张三")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
@Schema(description = "参数序号")
|
||||||
|
private Integer no;
|
||||||
|
|
||||||
|
@Schema(description = "键值")
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@Schema(description = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算")
|
||||||
|
private String fillingWay;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许为空")
|
||||||
|
private Integer isNull;
|
||||||
|
|
||||||
|
@Schema(description = "pc界面是否显示")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
@Schema(description = "排序号")
|
||||||
|
private Integer sortNo;
|
||||||
|
|
||||||
|
@Schema(description = "参数分组_ID,字典表【T_DIC_BSN】参数分组", example = "14680")
|
||||||
|
private Long dictionaryBusinessId;
|
||||||
|
|
||||||
|
@Schema(description = "参数分组_Key,字典表【T_DIC_BSN】参数分组")
|
||||||
|
private String dictionaryBusinessKey;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 检测方法参数配置 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ConfigAssayMethodParameterRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12031")
|
||||||
|
@ExcelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29823")
|
||||||
|
@ExcelProperty("检测方法ID")
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||||
|
@ExcelProperty("参数名称")
|
||||||
|
private String parameterName;
|
||||||
|
|
||||||
|
@Schema(description = "参数简称", example = "张三")
|
||||||
|
@ExcelProperty("参数简称")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
@Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("参数序号")
|
||||||
|
private Integer no;
|
||||||
|
|
||||||
|
@Schema(description = "键值")
|
||||||
|
@ExcelProperty("键值")
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@Schema(description = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算")
|
||||||
|
private String fillingWay;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
@ExcelProperty("小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "默认值")
|
||||||
|
@ExcelProperty("默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("是否允许为空")
|
||||||
|
private Integer isNull;
|
||||||
|
|
||||||
|
@Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("pc界面是否显示")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
@Schema(description = "排序号")
|
||||||
|
@ExcelProperty("排序号")
|
||||||
|
private Integer sortNo;
|
||||||
|
|
||||||
|
@Schema(description = "参数分组_ID,字典表【T_DIC_BSN】参数分组", example = "14680")
|
||||||
|
@ExcelProperty("参数分组_ID,字典表【T_DIC_BSN】参数分组")
|
||||||
|
private Long dictionaryBusinessId;
|
||||||
|
|
||||||
|
@Schema(description = "参数分组_Key,字典表【T_DIC_BSN】参数分组")
|
||||||
|
@ExcelProperty("参数分组_Key,字典表【T_DIC_BSN】参数分组")
|
||||||
|
private String dictionaryBusinessKey;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 检测方法参数配置新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class ConfigAssayMethodParameterSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12031")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29823")
|
||||||
|
@NotNull(message = "检测方法ID不能为空")
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||||
|
@NotEmpty(message = "参数名称不能为空")
|
||||||
|
private String parameterName;
|
||||||
|
|
||||||
|
@Schema(description = "参数简称", example = "张三")
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
@Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "参数序号不能为空")
|
||||||
|
private Integer no;
|
||||||
|
|
||||||
|
@Schema(description = "键值")
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@Schema(description = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算不能为空")
|
||||||
|
private String fillingWay;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "是否允许为空不能为空")
|
||||||
|
private Integer isNull;
|
||||||
|
|
||||||
|
@Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "pc界面是否显示不能为空")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
@Schema(description = "排序号")
|
||||||
|
private Integer sortNo;
|
||||||
|
|
||||||
|
@Schema(description = "参数分组_ID,字典表【T_DIC_BSN】参数分组", example = "14680")
|
||||||
|
private Long dictionaryBusinessId;
|
||||||
|
|
||||||
|
@Schema(description = "参数分组_Key,字典表【T_DIC_BSN】参数分组")
|
||||||
|
private String dictionaryBusinessKey;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "版本不能为空")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -46,6 +46,9 @@ public class ConfigAssayMethodReqVO {
|
|||||||
@Schema(description = "任务单模板key")
|
@Schema(description = "任务单模板key")
|
||||||
private String configReportTemplateKey;
|
private String configReportTemplateKey;
|
||||||
|
|
||||||
|
@Schema(description = "任务单数据类型,横向:horizontal,纵向:vertical", example = "2")
|
||||||
|
private String reportDataType;
|
||||||
|
|
||||||
@Schema(description = "任务单编号规则")
|
@Schema(description = "任务单编号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ public class ConfigAssayMethodRespVO {
|
|||||||
@ExcelProperty("任务单模板key")
|
@ExcelProperty("任务单模板key")
|
||||||
private String configReportTemplateKey;
|
private String configReportTemplateKey;
|
||||||
|
|
||||||
|
@Schema(description = "任务单数据类型,横向:horizontal,纵向:vertical", example = "2")
|
||||||
|
@ExcelProperty("任务单数据类型,横向:horizontal,纵向:vertical")
|
||||||
|
private String reportDataType;
|
||||||
|
|
||||||
@Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("任务单编号规则")
|
@ExcelProperty("任务单编号规则")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ public class ConfigAssayMethodSaveReqVO {
|
|||||||
@Schema(description = "任务单模板key")
|
@Schema(description = "任务单模板key")
|
||||||
private String configReportTemplateKey;
|
private String configReportTemplateKey;
|
||||||
|
|
||||||
|
@Schema(description = "任务单数据类型,横向:horizontal,纵向:vertical")
|
||||||
|
private String reportDataType;
|
||||||
|
|
||||||
@Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "任务单编号规则不能为空")
|
@NotEmpty(message = "任务单编号规则不能为空")
|
||||||
private String codeRule;
|
private String codeRule;
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ import lombok.Data;
|
|||||||
public class ConfigQCSampleMethodExtendRespVO extends ConfigQCSampleMethodRespVO {
|
public class ConfigQCSampleMethodExtendRespVO extends ConfigQCSampleMethodRespVO {
|
||||||
|
|
||||||
private String dictionaryBusinessName;
|
private String dictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessId;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinesskey;
|
||||||
|
|
||||||
private String configAssayMethodName;
|
private String configAssayMethodName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public class ConfigQCSampleMethodPageReqVO extends PageParam {
|
|||||||
@Schema(description = "映射检测信息配置")
|
@Schema(description = "映射检测信息配置")
|
||||||
private String configInfomation;
|
private String configInfomation;
|
||||||
|
|
||||||
|
@Schema(description = "必要检测项目")
|
||||||
|
private String mustProject;
|
||||||
|
|
||||||
@Schema(description = "排序号")
|
@Schema(description = "排序号")
|
||||||
private Integer sortNo;
|
private Integer sortNo;
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ public class ConfigQCSampleMethodRespVO {
|
|||||||
@ExcelProperty("映射检测信息配置")
|
@ExcelProperty("映射检测信息配置")
|
||||||
private String configInfomation;
|
private String configInfomation;
|
||||||
|
|
||||||
|
@Schema(description = "必要检测项目")
|
||||||
|
@ExcelProperty("必要检测项目")
|
||||||
|
private String mustProject;
|
||||||
|
|
||||||
@Schema(description = "排序号")
|
@Schema(description = "排序号")
|
||||||
private Integer sortNo;
|
private Integer sortNo;
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ public class ConfigQCSampleMethodSaveReqVO {
|
|||||||
@Schema(description = "映射检测信息配置")
|
@Schema(description = "映射检测信息配置")
|
||||||
private String configInfomation;
|
private String configInfomation;
|
||||||
|
|
||||||
|
@Schema(description = "必要检测项目")
|
||||||
|
private String mustProject;
|
||||||
|
|
||||||
@Schema(description = "排序号")
|
@Schema(description = "排序号")
|
||||||
private Integer sortNo;
|
private Integer sortNo;
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,11 @@ public class ConfigAssayMethodDO extends BusinessBaseDO {
|
|||||||
@TableField("CFG_RPT_TMPL_KY")
|
@TableField("CFG_RPT_TMPL_KY")
|
||||||
private String configReportTemplateKey;
|
private String configReportTemplateKey;
|
||||||
/**
|
/**
|
||||||
|
* 任务单数据类型,横向:horizontal,纵向:vertical
|
||||||
|
*/
|
||||||
|
@TableField("RPT_DAT_TP")
|
||||||
|
private String reportDataType;
|
||||||
|
/**
|
||||||
* 任务单编号规则
|
* 任务单编号规则
|
||||||
*/
|
*/
|
||||||
@TableField("CD_RUL")
|
@TableField("CD_RUL")
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.dal.dataobject;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
|
/**
|
||||||
|
* 检测方法参数配置 DO
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@TableName("t_cfg_asy_mthd_prm")
|
||||||
|
@KeySequence("t_cfg_asy_mthd_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class ConfigAssayMethodParameterDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 检测方法ID
|
||||||
|
*/
|
||||||
|
@TableField("CFG_ASY_MTHD_ID")
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
/**
|
||||||
|
* 参数名称
|
||||||
|
*/
|
||||||
|
@TableField("PRM_NAME")
|
||||||
|
private String parameterName;
|
||||||
|
/**
|
||||||
|
* 参数简称
|
||||||
|
*/
|
||||||
|
@TableField("SHRT_NAME")
|
||||||
|
private String shortName;
|
||||||
|
/**
|
||||||
|
* 参数序号
|
||||||
|
*/
|
||||||
|
@TableField("NO")
|
||||||
|
private Integer no;
|
||||||
|
/**
|
||||||
|
* 键值
|
||||||
|
*/
|
||||||
|
@TableField("KY")
|
||||||
|
private String key;
|
||||||
|
/**
|
||||||
|
* 填写方式,字典表【T_DIC_BSN】人工录入,天平采集,计算
|
||||||
|
*/
|
||||||
|
@TableField("FIL_WY")
|
||||||
|
private String fillingWay;
|
||||||
|
/**
|
||||||
|
* 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间
|
||||||
|
*/
|
||||||
|
@TableField("DAT_TP")
|
||||||
|
private String dataType;
|
||||||
|
/**
|
||||||
|
* 小数位
|
||||||
|
*/
|
||||||
|
@TableField("DEC_POS")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
/**
|
||||||
|
* 默认值
|
||||||
|
*/
|
||||||
|
@TableField("DFT_VAL")
|
||||||
|
private String defaultValue;
|
||||||
|
/**
|
||||||
|
* 是否允许为空
|
||||||
|
*/
|
||||||
|
@TableField("IS_NLL")
|
||||||
|
private Integer isNull;
|
||||||
|
/**
|
||||||
|
* pc界面是否显示
|
||||||
|
*/
|
||||||
|
@TableField("IS_SHW")
|
||||||
|
private Integer isShow;
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
@TableField("SRT_NO")
|
||||||
|
private Integer sortNo;
|
||||||
|
/**
|
||||||
|
* 参数分组_ID,字典表【T_DIC_BSN】参数分组
|
||||||
|
*/
|
||||||
|
@TableField("DIC_BSN_ID")
|
||||||
|
private Long dictionaryBusinessId;
|
||||||
|
/**
|
||||||
|
* 参数分组_Key,字典表【T_DIC_BSN】参数分组
|
||||||
|
*/
|
||||||
|
@TableField("DIC_BSN_KY")
|
||||||
|
private String dictionaryBusinessKey;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@TableField("SYS_DEPT_CD")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField("RMK")
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 版本
|
||||||
|
*/
|
||||||
|
@TableField("VER")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -77,6 +77,11 @@ public class ConfigQCSampleMethodDO extends BusinessBaseDO {
|
|||||||
@TableField("CFG_INF")
|
@TableField("CFG_INF")
|
||||||
private String configInfomation;
|
private String configInfomation;
|
||||||
/**
|
/**
|
||||||
|
* 必要检测项目
|
||||||
|
*/
|
||||||
|
@TableField("MUST_PRJ")
|
||||||
|
private String mustProject;
|
||||||
|
/**
|
||||||
* 排序号
|
* 排序号
|
||||||
*/
|
*/
|
||||||
@TableField("SRT_NO")
|
@TableField("SRT_NO")
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
|||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
|
import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
||||||
@@ -48,10 +49,10 @@ public interface BaseSampleMapper extends BaseMapperX<BaseSampleDO> {
|
|||||||
.betweenIfPresent(BaseSampleDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(BaseSampleDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.eqIfPresent(BaseSampleDO::getRemark, reqVO.getRemark());
|
.eqIfPresent(BaseSampleDO::getRemark, reqVO.getRemark());
|
||||||
if (ObjectUtil.isNotEmpty(reqVO.getConfigEntrustSourceId())) {
|
if (ObjectUtil.isNotEmpty(reqVO.getConfigEntrustSourceId())) {
|
||||||
queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst WHERE tcesst.CFG_ENTT_SRC_ID = " + reqVO.getConfigEntrustSourceId());
|
queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst WHERE tcesst.DELETED = 0 AND tcesst.CFG_ENTT_SRC_ID = " + reqVO.getConfigEntrustSourceId());
|
||||||
}
|
}
|
||||||
if (QmsCommonConstant.ENTRUST_INSPECTION.equals(reqVO.getEntrustType())) {
|
if (QmsCommonConstant.ENTRUST_INSPECTION.equals(reqVO.getEntrustType())) {
|
||||||
queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst LEFT JOIN T_CFG_ENTT_SRC tces ON tcesst.CFG_ENTT_SRC_ID = tces.ID WHERE tces.ENTT_TP = '" + reqVO.getEntrustType() + "'");
|
queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst LEFT JOIN T_CFG_ENTT_SRC tces ON tcesst.CFG_ENTT_SRC_ID = tces.ID WHERE tcesst.DELETED = 0 AND tces.DELETED = 0 AND tces.ENTT_TP = '" + reqVO.getEntrustType() + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
queryWrapperX.orderByDesc(BaseSampleDO::getId);
|
queryWrapperX.orderByDesc(BaseSampleDO::getId);
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ import java.util.*;
|
|||||||
|
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodPageReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodPageReqVO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodReqVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测方法配置 Mapper
|
* 检测方法配置 Mapper
|
||||||
@@ -33,6 +31,7 @@ public interface ConfigAssayMethodMapper extends BaseMapperX<ConfigAssayMethodDO
|
|||||||
.eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled())
|
.eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getIsIngredients, reqVO.getIsIngredients())
|
.eqIfPresent(ConfigAssayMethodDO::getIsIngredients, reqVO.getIsIngredients())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
.eqIfPresent(ConfigAssayMethodDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
||||||
|
.eqIfPresent(ConfigAssayMethodDO::getReportDataType, reqVO.getReportDataType())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule())
|
.eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay())
|
.eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform())
|
.eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform())
|
||||||
@@ -59,6 +58,7 @@ public interface ConfigAssayMethodMapper extends BaseMapperX<ConfigAssayMethodDO
|
|||||||
.eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled())
|
.eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getIsIngredients, reqVO.getIsIngredients())
|
.eqIfPresent(ConfigAssayMethodDO::getIsIngredients, reqVO.getIsIngredients())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
.eqIfPresent(ConfigAssayMethodDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
||||||
|
.eqIfPresent(ConfigAssayMethodDO::getReportDataType, reqVO.getReportDataType())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule())
|
.eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay())
|
.eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay())
|
||||||
.eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform())
|
.eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform())
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测方法参数配置 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ConfigAssayMethodParameterMapper extends BaseMapperX<ConfigAssayMethodParameterDO> {
|
||||||
|
|
||||||
|
default PageResult<ConfigAssayMethodParameterDO> selectPage(ConfigAssayMethodParameterPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodParameterDO>()
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
|
.likeIfPresent(ConfigAssayMethodParameterDO::getParameterName, reqVO.getParameterName())
|
||||||
|
.likeIfPresent(ConfigAssayMethodParameterDO::getShortName, reqVO.getShortName())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getNo, reqVO.getNo())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getKey, reqVO.getKey())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getFillingWay, reqVO.getFillingWay())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getDataType, reqVO.getDataType())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getDefaultValue, reqVO.getDefaultValue())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getIsNull, reqVO.getIsNull())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getIsShow, reqVO.getIsShow())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getSortNo, reqVO.getSortNo())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(ConfigAssayMethodParameterDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getRemark, reqVO.getRemark())
|
||||||
|
.eqIfPresent(ConfigAssayMethodParameterDO::getVersion, reqVO.getVersion())
|
||||||
|
.orderByDesc(ConfigAssayMethodParameterDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<ConfigAssayMethodParameterDO> selectByConfigAssayMethodId(Long configAssayMethodId) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<ConfigAssayMethodParameterDO>()
|
||||||
|
.eq(ConfigAssayMethodParameterDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<ConfigAssayMethodParameterDO> selectByConfigAssayMethodIds(List<Long> configAssayMethodIdList) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<ConfigAssayMethodParameterDO>()
|
||||||
|
.in(ConfigAssayMethodParameterDO::getConfigAssayMethodId, configAssayMethodIdList));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
|
import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectPageReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectPageReqVO;
|
||||||
|
|||||||
@@ -6,9 +6,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
|||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
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.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.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@@ -32,6 +30,7 @@ public interface ConfigQCSampleMethodMapper extends BaseMapperX<ConfigQCSampleMe
|
|||||||
.eqIfPresent(ConfigQCSampleMethodDO::getAssayMinimumCount, reqVO.getAssayMinimumCount())
|
.eqIfPresent(ConfigQCSampleMethodDO::getAssayMinimumCount, reqVO.getAssayMinimumCount())
|
||||||
.eqIfPresent(ConfigQCSampleMethodDO::getIsCorrelation, reqVO.getIsCorrelation())
|
.eqIfPresent(ConfigQCSampleMethodDO::getIsCorrelation, reqVO.getIsCorrelation())
|
||||||
.eqIfPresent(ConfigQCSampleMethodDO::getConfigInfomation, reqVO.getConfigInfomation())
|
.eqIfPresent(ConfigQCSampleMethodDO::getConfigInfomation, reqVO.getConfigInfomation())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodDO::getMustProject, reqVO.getMustProject())
|
||||||
.eqIfPresent(ConfigQCSampleMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.eqIfPresent(ConfigQCSampleMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
.betweenIfPresent(ConfigQCSampleMethodDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(ConfigQCSampleMethodDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.eqIfPresent(ConfigQCSampleMethodDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(ConfigQCSampleMethodDO::getRemark, reqVO.getRemark())
|
||||||
@@ -41,9 +40,13 @@ public interface ConfigQCSampleMethodMapper extends BaseMapperX<ConfigQCSampleMe
|
|||||||
|
|
||||||
default List<ConfigQCSampleMethodExtendRespVO> selectByConfigAssayMethodId(Long configAssayMethodId) {
|
default List<ConfigQCSampleMethodExtendRespVO> selectByConfigAssayMethodId(Long configAssayMethodId) {
|
||||||
return selectJoinList(ConfigQCSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigQCSampleMethodDO>()
|
return selectJoinList(ConfigQCSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigQCSampleMethodDO>()
|
||||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigQCSampleMethodDO::getDictionaryBusinessId)
|
.leftJoin(DictionaryBusinessDO.class, "dbd1", DictionaryBusinessDO::getId, ConfigQCSampleMethodDO::getDictionaryBusinessId)
|
||||||
|
.leftJoin(DictionaryBusinessDO.class, "dbd2", DictionaryBusinessDO::getId, "dbd1", DictionaryBusinessDO::getParentId)
|
||||||
.selectAll(ConfigQCSampleMethodDO.class)
|
.selectAll(ConfigQCSampleMethodDO.class)
|
||||||
.selectAs(DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName)
|
.selectAs("dbd1", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getDictionaryBusinessName)
|
||||||
|
.selectAs("dbd1", DictionaryBusinessDO::getParentId, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessId)
|
||||||
|
.selectAs("dbd2", DictionaryBusinessDO::getKey, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinesskey)
|
||||||
|
.selectAs("dbd2", DictionaryBusinessDO::getName, ConfigQCSampleMethodExtendRespVO::getParentDictionaryBusinessName)
|
||||||
.eq(ConfigQCSampleMethodDO::getConfigAssayMethodId, configAssayMethodId)
|
.eq(ConfigQCSampleMethodDO::getConfigAssayMethodId, configAssayMethodId)
|
||||||
.orderByAsc(ConfigQCSampleMethodDO::getSortNo));
|
.orderByAsc(ConfigQCSampleMethodDO::getSortNo));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测方法参数配置 Service 接口
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
public interface ConfigAssayMethodParameterService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
ConfigAssayMethodParameterRespVO createConfigAssayMethodParameter(@Valid ConfigAssayMethodParameterSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateConfigAssayMethodParameter(@Valid ConfigAssayMethodParameterSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteConfigAssayMethodParameter(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteConfigAssayMethodParameterListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 检测方法参数配置
|
||||||
|
*/
|
||||||
|
ConfigAssayMethodParameterDO getConfigAssayMethodParameter(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得检测方法参数配置分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 检测方法参数配置分页
|
||||||
|
*/
|
||||||
|
PageResult<ConfigAssayMethodParameterDO> getConfigAssayMethodParameterPage(ConfigAssayMethodParameterPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodParameterDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
|
||||||
|
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
|
||||||
|
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测方法参数配置 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class ConfigAssayMethodParameterServiceImpl implements ConfigAssayMethodParameterService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigAssayMethodParameterMapper configAssayMethodParameterMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigAssayMethodParameterRespVO createConfigAssayMethodParameter(ConfigAssayMethodParameterSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
ConfigAssayMethodParameterDO configAssayMethodParameter = BeanUtils.toBean(createReqVO, ConfigAssayMethodParameterDO.class);
|
||||||
|
configAssayMethodParameterMapper.insert(configAssayMethodParameter);
|
||||||
|
// 返回
|
||||||
|
return BeanUtils.toBean(configAssayMethodParameter, ConfigAssayMethodParameterRespVO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateConfigAssayMethodParameter(ConfigAssayMethodParameterSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateConfigAssayMethodParameterExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
ConfigAssayMethodParameterDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodParameterDO.class);
|
||||||
|
configAssayMethodParameterMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteConfigAssayMethodParameter(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateConfigAssayMethodParameterExists(id);
|
||||||
|
// 删除
|
||||||
|
configAssayMethodParameterMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteConfigAssayMethodParameterListByIds(List<Long> ids) {
|
||||||
|
// 校验存在
|
||||||
|
validateConfigAssayMethodParameterExists(ids);
|
||||||
|
// 删除
|
||||||
|
configAssayMethodParameterMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateConfigAssayMethodParameterExists(List<Long> ids) {
|
||||||
|
List<ConfigAssayMethodParameterDO> list = configAssayMethodParameterMapper.selectByIds(ids);
|
||||||
|
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||||
|
throw exception(CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateConfigAssayMethodParameterExists(Long id) {
|
||||||
|
if (configAssayMethodParameterMapper.selectById(id) == null) {
|
||||||
|
throw exception(CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigAssayMethodParameterDO getConfigAssayMethodParameter(Long id) {
|
||||||
|
return configAssayMethodParameterMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ConfigAssayMethodParameterDO> getConfigAssayMethodParameterPage(ConfigAssayMethodParameterPageReqVO pageReqVO) {
|
||||||
|
return configAssayMethodParameterMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.zt.plat.module.qms.common.dic.controller.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DictionaryBusinessExtendRespVO extends DictionaryBusinessRespVO {
|
||||||
|
|
||||||
|
private String parentDictionaryBusinessName;
|
||||||
|
|
||||||
|
private String parentDictionaryBusinesskey;
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.qms.common.dic.dal.mapper;
|
|||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
import com.zt.plat.module.qms.common.dic.controller.vo.*;
|
import com.zt.plat.module.qms.common.dic.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.common.dic.controller.vo.DictionaryBusinessPageReqVO;
|
import com.zt.plat.module.qms.common.dic.controller.vo.DictionaryBusinessPageReqVO;
|
||||||
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||||
@@ -35,6 +36,16 @@ public interface DictionaryBusinessMapper extends BaseMapperX<DictionaryBusiness
|
|||||||
.eqIfPresent(DictionaryBusinessDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(DictionaryBusinessDO::getRemark, reqVO.getRemark())
|
||||||
.orderByAsc(DictionaryBusinessDO::getSortNo));
|
.orderByAsc(DictionaryBusinessDO::getSortNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<DictionaryBusinessExtendRespVO> selectItemByCategoryKeys(List<String> keys) {
|
||||||
|
return selectJoinList(DictionaryBusinessExtendRespVO.class, new MPJLambdaWrapperX<DictionaryBusinessDO>()
|
||||||
|
.leftJoin(DictionaryBusinessDO.class, "dbd", DictionaryBusinessDO::getId, DictionaryBusinessDO::getParentId)
|
||||||
|
.selectAll(DictionaryBusinessDO.class)
|
||||||
|
.selectAs("dbd", DictionaryBusinessDO::getKey, DictionaryBusinessExtendRespVO::getParentDictionaryBusinesskey)
|
||||||
|
.selectAs("dbd", DictionaryBusinessDO::getName, DictionaryBusinessExtendRespVO::getParentDictionaryBusinessName)
|
||||||
|
.in("dbd", DictionaryBusinessDO::getKey, keys)
|
||||||
|
.orderByAsc(DictionaryBusinessDO::getSortNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskParameterDataMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodParameterMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user