feat:阶段性代码提交
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
package com.zt.plat.module.qms;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 项目的启动类
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class QmsServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(QmsServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleDispatchPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleDispatchRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleDispatchSaveReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleDispatchDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessSampleDispatchDetailService;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessSubSampleService;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationService;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -46,7 +50,9 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
|
||||
|
||||
|
||||
@Resource private BusinessSampleDispatchService businessSampleDispatchService;
|
||||
@Resource private BusinessSampleDispatchDetailService businessSampleDispatchDetailService;
|
||||
@Resource private BusinessSubSampleService businessSubSampleService;
|
||||
@Resource private ConfigWarehouseLocationService configWarehouseLocationService;
|
||||
|
||||
@PostMapping("/createTempData")
|
||||
@Operation(summary = "创建临时数据")
|
||||
@@ -60,6 +66,7 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
|
||||
@Operation(summary = "更新样品调拨")
|
||||
public CommonResult<Boolean> updateBusinessSampleDispatch(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) {
|
||||
updateReqVO.setCancelStatus("0");
|
||||
updateReqVO.setFlowStatus(QmsCommonConstant.NOT_START);
|
||||
businessSampleDispatchService.updateBusinessSampleDispatch(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
@@ -67,7 +74,7 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
|
||||
@PostMapping("/addOrRemoveSample")
|
||||
@Operation(summary = "增加或移除样品")
|
||||
public CommonResult<Boolean> addOrRemoveSample(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) {
|
||||
businessSampleDispatchService.addOrRemoveSample(updateReqVO);
|
||||
businessSampleDispatchService.addOrRemoveSample(updateReqVO, true);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@@ -76,10 +83,26 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
|
||||
public CommonResult<Boolean> addBySampleReturnCode(@RequestBody JSONObject param) {
|
||||
String id = param.getString("id");
|
||||
String sampleReturnCode = param.getString("sampleReturnCode");
|
||||
String warehouseCode = param.getString("warehouseCode");
|
||||
if(ObjectUtils.isEmpty(warehouseCode)){
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "请选择仓库,再扫描样品!");
|
||||
}
|
||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleService.getBySampleReturnCode(sampleReturnCode);
|
||||
if(businessSubSampleDO == null)
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "未查询到此样品!");
|
||||
//判断样品状态
|
||||
//判断样品状态、库位
|
||||
// String sampleWarehouseCode = businessSubSampleDO.getWarehouseCode(); //todo 判断库位
|
||||
ConfigWarehouseLocationPageReqVO warehouseReqVO = new ConfigWarehouseLocationPageReqVO();
|
||||
warehouseReqVO.setId(businessSubSampleDO.getConfigWarehouseLocationInfomationId());
|
||||
PageResult<ConfigWarehouseLocationRespVO> warehousePage = configWarehouseLocationService.getConfigWarehouseLocationPage(warehouseReqVO);
|
||||
if(warehousePage.getTotal() == 0){
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "未查询到样品所在仓库,请检查样品码是否正确!");
|
||||
}
|
||||
ConfigWarehouseLocationRespVO warehouse = warehousePage.getList().get(0);
|
||||
if(!warehouseCode.equals(warehouse.getWarehouseCode())){
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "此样品所在仓库为:"+warehouse.getWarehouseName()+",请检查样品码是否正确!");
|
||||
}
|
||||
|
||||
String returnStatus = businessSubSampleDO.getReturnStatus();
|
||||
if(!QmsCommonConstant.COMPLETED.equals(returnStatus)){
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "样品状态为:"+returnStatus+",不能调拨!");
|
||||
@@ -88,14 +111,19 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
|
||||
if("1".equals(dispatchStatus)){
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "样品已被调拨:请归还后再调拨!");
|
||||
}
|
||||
//todo 重复校验
|
||||
|
||||
BusinessSampleDispatchDetailPageReqVO reqVO = new BusinessSampleDispatchDetailPageReqVO();
|
||||
reqVO.setParentId(Long.valueOf(id));
|
||||
reqVO.setSampleReturnCode(sampleReturnCode);
|
||||
PageResult<BusinessSampleDispatchDetailExtendRespVO> pageDetailList = businessSampleDispatchDetailService.getBusinessSampleDispatchDetailPage(reqVO);
|
||||
if(pageDetailList.getTotal() > 0){
|
||||
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "次样品已添加,请勿重复添加!");
|
||||
}
|
||||
List<Long> sampleIds = new ArrayList<>();
|
||||
sampleIds.add(businessSubSampleDO.getId());
|
||||
BusinessSampleDispatchSaveReqVO updateReqVO = new BusinessSampleDispatchSaveReqVO();
|
||||
updateReqVO.setId(Long.valueOf(id));
|
||||
updateReqVO.setAddSubSampleIds(sampleIds);
|
||||
businessSampleDispatchService.addOrRemoveSample(updateReqVO);
|
||||
businessSampleDispatchService.addOrRemoveSample(updateReqVO, false);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
@RestController
|
||||
@RequestMapping("/qms/business-sample-handover")
|
||||
@Validated
|
||||
public class BusinessSampleHandoverController implements BusinessControllerMarker {
|
||||
public class BusinessSampleHandoverController {
|
||||
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -92,6 +92,14 @@ public class BusinessSampleHandoverDetailController implements BusinessControlle
|
||||
return success(BeanUtils.toBean(pageResult, BusinessSampleHandoverDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/takeOffPageList")
|
||||
@Operation(summary = "获得样品交接明细分页")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:query')")
|
||||
public CommonResult<PageResult<BusinessSampleHandoverDetailRespVO>> takeOffPageList(@Valid BusinessSampleHandoverDetailPageReqVO pageReqVO) {
|
||||
PageResult<BusinessSampleHandoverDetailRespVO> pageResult = businessSampleHandoverDetailService.takeOffPageList(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出样品交接明细 Excel")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:export')")
|
||||
|
||||
@@ -90,6 +90,14 @@ public class BusinessSubSampleController implements BusinessControllerMarker {
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/getPrintSubSample")
|
||||
@Operation(summary = "获得打印子样业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<BusinessSubSampleExtendRespVO> getPrintSubSample(@RequestParam("id") Long id) {
|
||||
BusinessSubSampleExtendRespVO result = businessSubSampleService.getPrintSubSample(id);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得子样业务列表")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BusinessAssayParameterDataExtendRespVO extends BusinessAssayParameterDataRespVO {
|
||||
|
||||
private String parameterName;
|
||||
|
||||
private String parameterKey;
|
||||
|
||||
}
|
||||
@@ -65,4 +65,8 @@ public class BusinessAssayProjectDataReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//========================扩展字段==================================
|
||||
|
||||
@Schema(description = "检测任务ID列表", example = "16505")
|
||||
private List<Long> businessAssayTaskDataIdList;
|
||||
}
|
||||
@@ -17,6 +17,9 @@ public class BusinessAssayTaskDataExtendRespVO extends BusinessAssayTaskDataResp
|
||||
/** 分析方法名称 **/
|
||||
@Schema(description = "分析方法名称")
|
||||
private String configAssayMethodName;
|
||||
|
||||
@Schema(description = "子样配置id")
|
||||
private Long configSubSampleId;
|
||||
|
||||
@Schema(description = "样品名称")
|
||||
private String sampleName;
|
||||
|
||||
@@ -49,6 +49,9 @@ public class BusinessAssayTaskDataPageReqVO extends PageParam {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "27835")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
@@ -62,6 +65,9 @@ public class BusinessAssayTaskDataPageReqVO extends PageParam {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "15920")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@@ -49,6 +49,9 @@ public class BusinessAssayTaskDataReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "27835")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
@@ -62,6 +65,9 @@ public class BusinessAssayTaskDataReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "15920")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@@ -63,6 +63,10 @@ public class BusinessAssayTaskDataRespVO {
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "27835")
|
||||
@ExcelProperty("分析人ID")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@ExcelProperty("分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
@@ -79,6 +83,10 @@ public class BusinessAssayTaskDataRespVO {
|
||||
@ExcelProperty("上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "15920")
|
||||
@ExcelProperty("上报人ID")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@@ -2,9 +2,7 @@ package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 子样检测任务业务新增/修改 Request VO")
|
||||
@@ -59,6 +57,9 @@ public class BusinessAssayTaskDataSaveReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "27835")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
|
||||
@@ -71,6 +72,9 @@ public class BusinessAssayTaskDataSaveReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "15920")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
|
||||
@Schema(description = "任务单分配人")
|
||||
private String taskAssignOperator;
|
||||
|
||||
@Schema(description = "任务单分配人ID", example = "14545")
|
||||
private Long taskAssignOperatorId;
|
||||
|
||||
@Schema(description = "任务单分配时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskAssignTime;
|
||||
@@ -54,6 +57,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人", example = "17685")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分析时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assayTime;
|
||||
@@ -75,6 +81,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
|
||||
@Schema(description = "上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "上报人ID", example = "7393")
|
||||
private Long reportOperatorId;
|
||||
|
||||
@Schema(description = "任务单完成时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskFinishTime;
|
||||
|
||||
@@ -33,6 +33,9 @@ public class BusinessAssayTaskReqVO {
|
||||
@Schema(description = "任务单分配人")
|
||||
private String taskAssignOperator;
|
||||
|
||||
@Schema(description = "任务单分配人ID", example = "14545")
|
||||
private Long taskAssignOperatorId;
|
||||
|
||||
@Schema(description = "任务单分配时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskAssignTime;
|
||||
@@ -53,6 +56,9 @@ public class BusinessAssayTaskReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人", example = "17685")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分析时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assayTime;
|
||||
@@ -74,6 +80,9 @@ public class BusinessAssayTaskReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "上报人ID", example = "7393")
|
||||
private Long reportOperatorId;
|
||||
|
||||
@Schema(description = "任务单完成时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskFinishTime;
|
||||
|
||||
@@ -42,6 +42,10 @@ public class BusinessAssayTaskRespVO {
|
||||
@ExcelProperty("任务单分配人")
|
||||
private String taskAssignOperator;
|
||||
|
||||
@Schema(description = "任务单分配人ID", example = "14545")
|
||||
@ExcelProperty("任务单分配人ID")
|
||||
private Long taskAssignOperatorId;
|
||||
|
||||
@Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("任务单分配时间")
|
||||
private LocalDateTime taskAssignTime;
|
||||
@@ -64,6 +68,10 @@ public class BusinessAssayTaskRespVO {
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人", example = "17685")
|
||||
@ExcelProperty("分析人")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分析时间")
|
||||
@ExcelProperty("分析时间")
|
||||
private LocalDateTime assayTime;
|
||||
@@ -84,6 +92,10 @@ public class BusinessAssayTaskRespVO {
|
||||
@ExcelProperty("上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "上报人ID", example = "7393")
|
||||
@ExcelProperty("上报人ID")
|
||||
private Long reportOperatorId;
|
||||
|
||||
@Schema(description = "任务单完成时间")
|
||||
@ExcelProperty("任务单完成时间")
|
||||
private LocalDateTime taskFinishTime;
|
||||
|
||||
@@ -40,9 +40,11 @@ public class BusinessAssayTaskSaveReqVO {
|
||||
private String taskSourceType;
|
||||
|
||||
@Schema(description = "任务单分配人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "任务单分配人不能为空")
|
||||
private String taskAssignOperator;
|
||||
|
||||
@Schema(description = "任务单分配人ID", example = "14545")
|
||||
private Long taskAssignOperatorId;
|
||||
|
||||
@Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "任务单分配时间不能为空")
|
||||
private LocalDateTime taskAssignTime;
|
||||
@@ -64,6 +66,9 @@ public class BusinessAssayTaskSaveReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人", example = "17685")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分析时间")
|
||||
private LocalDateTime assayTime;
|
||||
|
||||
@@ -79,6 +84,9 @@ public class BusinessAssayTaskSaveReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "上报人ID", example = "7393")
|
||||
private Long reportOperatorId;
|
||||
|
||||
@Schema(description = "任务单完成时间")
|
||||
private LocalDateTime taskFinishTime;
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ public class BusinessQCCoefficientDataPageReqVO extends PageParam {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "10644")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
@@ -59,6 +62,9 @@ public class BusinessQCCoefficientDataPageReqVO extends PageParam {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "2683")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@@ -46,6 +46,9 @@ public class BusinessQCCoefficientDataReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "10644")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
@@ -59,6 +62,9 @@ public class BusinessQCCoefficientDataReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "2683")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@@ -60,6 +60,9 @@ public class BusinessQCCoefficientDataRespVO {
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "10644")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@ExcelProperty("分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
@@ -76,6 +79,9 @@ public class BusinessQCCoefficientDataRespVO {
|
||||
@ExcelProperty("上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "2683")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@@ -50,6 +50,9 @@ public class BusinessQCCoefficientDataSaveReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "10644")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
|
||||
@@ -59,6 +62,9 @@ public class BusinessQCCoefficientDataSaveReqVO {
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人ID", example = "2683")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ public class BusinessQCManagementDataPageReqVO extends PageParam {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "6498")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
@@ -59,6 +62,9 @@ public class BusinessQCManagementDataPageReqVO extends PageParam {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "17517")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@@ -46,6 +46,9 @@ public class BusinessQCManagementDataReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "6498")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] assignTaskTime;
|
||||
@@ -59,6 +62,9 @@ public class BusinessQCManagementDataReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "17517")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@@ -60,6 +60,9 @@ public class BusinessQCManagementDataRespVO {
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "6498")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
@ExcelProperty("分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
@@ -76,6 +79,9 @@ public class BusinessQCManagementDataRespVO {
|
||||
@ExcelProperty("上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "17517")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@@ -51,6 +51,9 @@ public class BusinessQCManagementDataSaveReqVO {
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "分析人ID", example = "6498")
|
||||
private Long assayOperatorId;
|
||||
|
||||
@Schema(description = "分配任务时间")
|
||||
private LocalDateTime assignTaskTime;
|
||||
|
||||
@@ -63,6 +66,9 @@ public class BusinessQCManagementDataSaveReqVO {
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报人ID", example = "17517")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@@ -65,6 +66,7 @@ public class BusinessSampleDispatchRespVO {
|
||||
|
||||
@Schema(description = "流程审批状态", example = "1")
|
||||
@ExcelProperty("流程审批状态")
|
||||
@Dict(dicCode = "flow_status")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "完成状态", example = "1")
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -16,6 +26,12 @@ public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntru
|
||||
/** 打印标签 **/
|
||||
private String printTemplate;
|
||||
|
||||
@JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化(响应)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "任务结束时间(yyyy-MM-dd HH:mm:ss)")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private List<BusinessSampleEntrustProjectExtendRespVO> sampleEntrustDetailProjectList;
|
||||
|
||||
}
|
||||
|
||||
@@ -61,4 +61,19 @@ public class BusinessSampleHandoverDetailRespVO {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
//==================================扩展字段==================================
|
||||
@Schema(description = "原样品编号")
|
||||
@ExcelProperty("原样品编号")
|
||||
private String originalSampleCode;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
@ExcelProperty("归库时间")
|
||||
private String warehouseLocationCode;
|
||||
|
||||
@Schema(description = "归库时间")
|
||||
@ExcelProperty("归库时间")
|
||||
private LocalDateTime returnTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,15 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -63,6 +69,21 @@ public class BusinessSubSampleExtendRespVO extends BusinessSubSampleRespVO {
|
||||
|
||||
@Schema(description = "样品标签打印模版")
|
||||
private String printTemplate;
|
||||
|
||||
@Schema(description = "样品标签打印份数")
|
||||
private Integer codePrintQuantity;
|
||||
|
||||
@Schema(description = "收样人")
|
||||
private String sampleReceiver;
|
||||
|
||||
@Schema(description = "分析项目")
|
||||
private String assayProject;
|
||||
|
||||
@JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化(响应)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "收样时间")
|
||||
private LocalDateTime sampleReceiveTime;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
private String warehouseLocationCode;
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -133,6 +134,8 @@ public class BusinessSubSamplePageReqVO extends PageParam {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//=======================================扩展字段=======================================
|
||||
|
||||
@Schema(description = "分析部门id")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@@ -141,8 +144,10 @@ public class BusinessSubSamplePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "分析部门状态")
|
||||
private String assayDepartmentStatus;
|
||||
|
||||
//=======================================扩展字段=======================================
|
||||
|
||||
@Schema(description = "样品流程节点KEY列表")
|
||||
private List<String> sampleFlowNodeKeyList;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
private String warehouseLocationCode;
|
||||
|
||||
|
||||
@@ -134,6 +134,29 @@ public class BusinessSubSampleReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//=======================================扩展字段=======================================
|
||||
|
||||
@Schema(description = "分析部门id")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@Schema(description = "分析部门名称")
|
||||
private String assayDepartmentName;
|
||||
|
||||
@Schema(description = "分析部门状态")
|
||||
private String assayDepartmentStatus;
|
||||
|
||||
@Schema(description = "样品流程节点KEY列表")
|
||||
private List<String> sampleFlowNodeKeyList;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
private String warehouseLocationCode;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
//是否过滤已申请调拨的数据: 1-是, 其他值:否
|
||||
@Schema(description = "是否过滤已申请调拨的数据")
|
||||
private String hideDispatchData;
|
||||
|
||||
|
||||
}
|
||||
@@ -24,7 +24,6 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
public class BusinessAssayTaskDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@@ -66,6 +65,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
||||
@TableField("TSK_ASN_OPTR")
|
||||
private String taskAssignOperator;
|
||||
/**
|
||||
* 任务单分配人ID
|
||||
*/
|
||||
@TableField("TSK_ASN_OPTR_ID")
|
||||
private Long taskAssignOperatorId;
|
||||
/**
|
||||
* 任务单分配时间
|
||||
*/
|
||||
@TableField("TSK_ASN_TM")
|
||||
@@ -76,8 +80,8 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
||||
@TableField("TSK_ASN_STS")
|
||||
private String taskAssignStatus;
|
||||
/**
|
||||
* 任务单分配提交时间
|
||||
*/
|
||||
* 任务单分配提交时间
|
||||
*/
|
||||
@TableField("TSK_ASN_SBM_TM")
|
||||
private LocalDateTime taskAssignSubmitTime;
|
||||
/**
|
||||
@@ -96,6 +100,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
||||
@TableField("ASY_OPTR")
|
||||
private String assayOperator;
|
||||
/**
|
||||
* 分析人
|
||||
*/
|
||||
@TableField("ASY_OPTR_ID")
|
||||
private Long assayOperatorId;
|
||||
/**
|
||||
* 分析时间
|
||||
*/
|
||||
@TableField("ASY_TM")
|
||||
@@ -121,6 +130,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
||||
@TableField("RPT_OPTR")
|
||||
private String reportOperator;
|
||||
/**
|
||||
* 上报人ID
|
||||
*/
|
||||
@TableField("RPT_OPTR_ID")
|
||||
private Long reportOperatorId;
|
||||
/**
|
||||
* 任务单完成时间
|
||||
*/
|
||||
@TableField("TSK_FIN_TM")
|
||||
|
||||
@@ -46,11 +46,6 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
|
||||
@TableField("BSN_SB_SMP_ID")
|
||||
private Long businessSubSampleId;
|
||||
/**
|
||||
* 分样子样判定ID
|
||||
*/
|
||||
@TableField("BSN_SB_SMP_ASMT_ID")
|
||||
private Long businessSubSampleAssessmentId;
|
||||
/**
|
||||
* 检测方法配置ID
|
||||
*/
|
||||
@TableField("CFG_ASY_MTHD_ID")
|
||||
@@ -61,6 +56,11 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
|
||||
@TableField(value = "BSN_ASY_TSK_ID", updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Long businessAssayTaskId;
|
||||
/**
|
||||
* 子样判定ID
|
||||
*/
|
||||
@TableField("BSN_SB_SMP_ASMT_ID")
|
||||
private Long businessSubSampleAssessmentId;
|
||||
/**
|
||||
* 任务类型,【字典】【jy_sample_task_type】常规、抽查...
|
||||
*/
|
||||
@TableField("TSK_TP")
|
||||
@@ -91,6 +91,11 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
|
||||
@TableField(value = "ASY_OPTR", updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String assayOperator;
|
||||
/**
|
||||
* 分析人ID
|
||||
*/
|
||||
@TableField(value = "ASY_OPTR_ID", updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Long assayOperatorId;
|
||||
/**
|
||||
* 分配任务时间
|
||||
*/
|
||||
@TableField(value = "ASN_TSK_TM", updateStrategy = FieldStrategy.ALWAYS)
|
||||
@@ -111,6 +116,11 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
|
||||
@TableField("RPTR")
|
||||
private String reporter;
|
||||
/**
|
||||
* 上报人ID
|
||||
*/
|
||||
@TableField("RPTR_ID")
|
||||
private Long reporterId;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
@TableField("RPT_TM")
|
||||
@@ -131,7 +141,7 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
|
||||
@TableField("SMP_FLW_NDE_TM")
|
||||
private LocalDateTime sampleFlowNodeTime;
|
||||
/**
|
||||
* 分析次数,复检的累加次数
|
||||
* 分析次数,值为0为分析,大于0为第几次复检
|
||||
*/
|
||||
@TableField("ANL_CNT")
|
||||
private Integer analysisCount;
|
||||
|
||||
@@ -89,6 +89,11 @@ public class BusinessQCCoefficientDataDO extends BusinessBaseDO {
|
||||
@TableField("ASY_OPTR")
|
||||
private String assayOperator;
|
||||
/**
|
||||
* 分析人ID
|
||||
*/
|
||||
@TableField("ASY_OPTR_ID")
|
||||
private Long assayOperatorId;
|
||||
/**
|
||||
* 分配任务时间
|
||||
*/
|
||||
@TableField("ASN_TSK_TM")
|
||||
@@ -109,6 +114,11 @@ public class BusinessQCCoefficientDataDO extends BusinessBaseDO {
|
||||
@TableField("RPTR")
|
||||
private String reporter;
|
||||
/**
|
||||
* 上报人ID
|
||||
*/
|
||||
@TableField("RPTR_ID")
|
||||
private Long reporterId;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
@TableField("RPT_TM")
|
||||
@@ -129,4 +139,5 @@ public class BusinessQCCoefficientDataDO extends BusinessBaseDO {
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -89,6 +89,11 @@ public class BusinessQCManagementDataDO extends BusinessBaseDO {
|
||||
@TableField("ASY_OPTR")
|
||||
private String assayOperator;
|
||||
/**
|
||||
* 分析人ID
|
||||
*/
|
||||
@TableField("ASY_OPTR_ID")
|
||||
private Long assayOperatorId;
|
||||
/**
|
||||
* 分配任务时间
|
||||
*/
|
||||
@TableField("ASN_TSK_TM")
|
||||
@@ -109,6 +114,11 @@ public class BusinessQCManagementDataDO extends BusinessBaseDO {
|
||||
@TableField("RPTR")
|
||||
private String reporter;
|
||||
/**
|
||||
* 上报人ID
|
||||
*/
|
||||
@TableField("RPTR_ID")
|
||||
private Long reporterId;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
@TableField("RPT_TM")
|
||||
@@ -128,5 +138,4 @@ public class BusinessQCManagementDataDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -83,5 +83,14 @@ public interface BusinessAssayParameterDataMapper extends BaseMapperX<BusinessAs
|
||||
return selectList(new LambdaQueryWrapperX<BusinessAssayParameterDataDO>()
|
||||
.in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIds));
|
||||
}
|
||||
|
||||
default List<BusinessAssayParameterDataExtendRespVO> selectExtendByBusinessAssayProjectDataIds(List<Long> businessAssayProjectDataIds) {
|
||||
return selectJoinList(BusinessAssayParameterDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayParameterDataDO>()
|
||||
.leftJoin(DictionaryParameterDO.class, DictionaryParameterDO::getId, BusinessAssayParameterDataDO::getDictionaryParameterId)
|
||||
.selectAll(BusinessAssayParameterDataDO.class)
|
||||
.selectAs(DictionaryParameterDO::getName, BusinessAssayParameterDataExtendRespVO::getParameterName)
|
||||
.selectAs(DictionaryParameterDO::getKey, BusinessAssayParameterDataExtendRespVO::getParameterKey)
|
||||
.in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,6 +49,7 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
||||
.selectAs(ConfigAssayMethodProjectDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)
|
||||
.selectAs(DictionaryBusinessDO::getName, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessName)
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||
.inIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataIdList())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())
|
||||
|
||||
@@ -47,22 +47,25 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId)
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getReporterId, reqVO.getReporterId())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
|
||||
@@ -84,6 +87,7 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId)
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
@@ -96,10 +100,12 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getReporterId, reqVO.getReporterId())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
|
||||
@@ -211,6 +217,20 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
|
||||
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据子样及分析部门查询分析任务
|
||||
* @param businessSubSampleId 子样id
|
||||
* @param assayDepartmentId 分析部门id
|
||||
* @return
|
||||
*/
|
||||
default List<BusinessAssayTaskDataDO> selectByBusinessSubSampleIdAndAssayDepartmentId(Long businessSubSampleId, Long assayDepartmentId) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
|
||||
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId)
|
||||
.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, assayDepartmentId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据子样查询分析任务
|
||||
|
||||
@@ -9,8 +9,6 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetai
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import java.util.List;
|
||||
@@ -38,18 +36,21 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
||||
.eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperatorId, reqVO.getTaskAssignOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus())
|
||||
.inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getReportOperatorId, reqVO.getReportOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId())
|
||||
@@ -79,18 +80,21 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
|
||||
.eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperatorId, reqVO.getTaskAssignOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus())
|
||||
.inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getReportOperatorId, reqVO.getReportOperatorId())
|
||||
.betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId())
|
||||
.eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId())
|
||||
|
||||
@@ -30,10 +30,12 @@ public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCC
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
|
||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
@@ -55,10 +57,12 @@ public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCC
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
|
||||
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
|
||||
@@ -30,10 +30,12 @@ public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCMa
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
|
||||
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
@@ -55,10 +57,12 @@ public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCMa
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
|
||||
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
|
||||
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleHandoverDetailPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
|
||||
@@ -9,6 +10,8 @@ import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
@@ -40,4 +43,28 @@ public interface BusinessSampleHandoverDetailMapper extends BaseMapperX<Business
|
||||
.eq(BusinessSampleHandoverDetailDO::getBusinessSampleHandoverId, businessSampleHandoverId));
|
||||
}
|
||||
|
||||
/*
|
||||
* 归库明细分页查询*/
|
||||
default PageResult<BusinessSampleHandoverDetailRespVO> takeOffPageList(BusinessSampleHandoverDetailPageReqVO reqVO) {
|
||||
return selectJoinPage(reqVO, BusinessSampleHandoverDetailRespVO.class, new MPJLambdaWrapperX<BusinessSampleHandoverDetailDO>()
|
||||
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessSampleHandoverDetailDO::getBusinessSubSampleId)
|
||||
.leftJoin(ConfigWarehouseLocationDO.class, ConfigWarehouseLocationDO::getId, BusinessSubSampleDO::getConfigWarehouseLocationInfomationId)
|
||||
.selectAll(BusinessSampleHandoverDetailDO.class)
|
||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessSampleHandoverDetailRespVO::getOriginalSampleCode)
|
||||
.selectAs(BusinessSubSampleDO::getReturnTime, BusinessSampleHandoverDetailRespVO::getReturnTime)
|
||||
.selectAs(ConfigWarehouseLocationDO::getCode, BusinessSampleHandoverDetailRespVO::getWarehouseLocationCode)
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getBusinessSampleHandoverId, reqVO.getBusinessSampleHandoverId())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.likeIfPresent(BusinessSampleHandoverDetailDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getSampleWeight, reqVO.getSampleWeight())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getBalanceCode, reqVO.getBalanceCode())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.likeIfPresent(BusinessSampleHandoverDetailDO::getDictionaryBusinessName, reqVO.getDictionaryBusinessName())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessSampleHandoverDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessSampleHandoverDetailDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSampleHandoverDetailDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -61,5 +61,11 @@ public interface BusinessSubSampleAnalysisGroupMapper extends BaseMapperX<Busine
|
||||
.in(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleIds)
|
||||
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
|
||||
}
|
||||
|
||||
default BusinessSubSampleAnalysisGroupDO selectByBusinessSubSampleIdAndAssayDepartmentId(Long businessSubSampleId, Long assayDepartmentId) {
|
||||
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAnalysisGroupDO>()
|
||||
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleId)
|
||||
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -63,6 +63,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
||||
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
|
||||
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
|
||||
@@ -118,6 +119,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
||||
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
|
||||
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
|
||||
@@ -171,6 +173,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
||||
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
|
||||
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
|
||||
@@ -203,6 +206,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
||||
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
|
||||
.selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint)
|
||||
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
|
||||
.selectAs(ConfigSubSampleDO::getCodePrintQuantity, BusinessSubSampleExtendRespVO::getCodePrintQuantity)
|
||||
.eq(BusinessSubSampleDO::getId, id)
|
||||
.eq(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
|
||||
.eq(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
|
||||
@@ -233,6 +237,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
||||
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
|
||||
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
|
||||
.orderByDesc(BusinessSubSampleDO::getId));
|
||||
|
||||
@@ -580,11 +580,22 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
|
||||
//根据任务数判断是平行还是
|
||||
String assayType = configSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||
|
||||
//分样判定数据
|
||||
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = new BusinessSubParentSampleAssessmentDO();
|
||||
businessSubParentSampleAssessmentDO.setId(IdWorker.getId());
|
||||
businessSubParentSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
|
||||
businessSubParentSampleAssessmentDO.setConfigAssayMethodId(configAssayMethodZhy.getId());
|
||||
businessSubParentSampleAssessmentDO.setAssayType(assayType);
|
||||
businessSubParentSampleAssessmentDO.setTaskType("常规");
|
||||
businessSubParentSampleAssessmentDOList.add(businessSubParentSampleAssessmentDO);
|
||||
|
||||
//子样判定数据
|
||||
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
|
||||
businessSubSampleAssessmentDO.setId(IdWorker.getId());
|
||||
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
|
||||
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
|
||||
businessSubSampleAssessmentDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
|
||||
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||
businessSubSampleAssessmentDO.setConfigAssayMethodId(configAssayMethodZhy.getId());
|
||||
businessSubSampleAssessmentDO.setAssayType(assayType);
|
||||
@@ -669,43 +680,33 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
businessSampleAssayResultMapper.updateBatch(sampleAssayResultList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessBaseSampleDOList)) {
|
||||
log.info("插入 businessBaseSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessBaseSampleMapper.insertBatch(businessBaseSampleDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubParentSampleDOList)) {
|
||||
log.info("插入 businessSubParentSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessSubParentSampleMapper.insertBatch(businessSubParentSampleDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubParentSampleAssessmentDOList)) {
|
||||
log.info("插入 businessSubParentSampleAssessmentDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessSubParentSampleAssessmentMapper.insertBatch(businessSubParentSampleAssessmentDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubSampleDOList)) {
|
||||
log.info("插入 businessSubSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessSubSampleMapper.insertBatch(businessSubSampleDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupDOList)) {
|
||||
log.info("插入 businessSubSampleAnalysisGroupDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessSubSampleAnalysisGroupMapper.insertBatch(businessSubSampleAnalysisGroupDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubSampleAssessmentDOList)) {
|
||||
log.info("插入 businessSubSampleAssessmentDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessSubSampleAssessmentMapper.insertBatch(businessSubSampleAssessmentDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
|
||||
log.info("插入 businessAssayTaskDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
|
||||
log.info("插入 businessAssayProjectDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayParameterDataDOList)) {
|
||||
log.info("插入 businessAssayParameterDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessAssayParameterDataMapper.insertBatch(businessAssayParameterDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayReportDataDOList)) {
|
||||
log.info("插入 businessAssayReportDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
|
||||
businessAssayReportDataMapper.insertBatch(businessAssayReportDataDOList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.stream.Collectors;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||
@@ -53,6 +54,7 @@ public class SampleTaskAssignManualCmp extends NodeComponent {
|
||||
public void process() throws Exception {
|
||||
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
|
||||
String loginRealname = sampleTaskAssignContext.getLoginRealname();
|
||||
LoginUser loginUser = sampleTaskAssignContext.getLoginUser();
|
||||
LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime();
|
||||
AssignAssayUser assignAssayUser = sampleTaskAssignContext.getAssignAssayUser();
|
||||
List<Long> assayTaskDataIdList = sampleTaskAssignContext.getAssayTaskDataIdList();
|
||||
@@ -91,12 +93,14 @@ public class SampleTaskAssignManualCmp extends NodeComponent {
|
||||
businessAssayTaskDO.setTaskNo(taskNo);
|
||||
businessAssayTaskDO.setTaskName(configAssayMethod.getName());
|
||||
businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName());
|
||||
businessAssayTaskDO.setAssayOperatorId(assignAssayUser.getUserId());
|
||||
businessAssayTaskDO.setConfigAssayMethodId(key);
|
||||
businessAssayTaskDO.setTaskSourceType(QmsCommonConstant.TASK_ASSIGN);
|
||||
businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId());
|
||||
businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey());
|
||||
|
||||
businessAssayTaskDO.setTaskAssignOperator(loginRealname);
|
||||
businessAssayTaskDO.setTaskAssignOperatorId(loginUser.getId());
|
||||
businessAssayTaskDO.setTaskAssignTime(currentDateTime);
|
||||
businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS);
|
||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START);
|
||||
@@ -116,6 +120,7 @@ public class SampleTaskAssignManualCmp extends NodeComponent {
|
||||
val.setIsAssignTasked(QmsCommonConstant.YES);
|
||||
val.setAssignTaskTime(currentDateTime);
|
||||
val.setAssayOperator(assignAssayUser.getRealName());
|
||||
val.setAssayOperatorId(assignAssayUser.getUserId());
|
||||
val.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||
|
||||
BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(val.getBusinessSubSampleId());
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||
@@ -54,6 +55,7 @@ public class SampleTaskAssignMethodCmp extends NodeComponent {
|
||||
public void process() throws Exception {
|
||||
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
|
||||
String loginRealname = sampleTaskAssignContext.getLoginRealname();
|
||||
LoginUser loginUser = sampleTaskAssignContext.getLoginUser();
|
||||
LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime();
|
||||
Long assignConfigAssayMethodId = sampleTaskAssignContext.getAssignConfigAssayMethodId();
|
||||
List<AssignAssayUser> assignAssayUserList = sampleTaskAssignContext.getAssignAssayUserList();
|
||||
@@ -100,8 +102,10 @@ public class SampleTaskAssignMethodCmp extends NodeComponent {
|
||||
businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId());
|
||||
businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey());
|
||||
businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName());
|
||||
businessAssayTaskDO.setAssayOperatorId(assignAssayUser.getUserId());
|
||||
|
||||
businessAssayTaskDO.setTaskAssignOperator(loginRealname);
|
||||
businessAssayTaskDO.setTaskAssignOperatorId(loginUser.getId());
|
||||
businessAssayTaskDO.setTaskAssignTime(currentDateTime);
|
||||
businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS);
|
||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START);
|
||||
@@ -120,6 +124,7 @@ public class SampleTaskAssignMethodCmp extends NodeComponent {
|
||||
businessAssayTaskDataDO.setIsAssignTasked(QmsCommonConstant.YES);
|
||||
businessAssayTaskDataDO.setAssignTaskTime(currentDateTime);
|
||||
businessAssayTaskDataDO.setAssayOperator(assignAssayUser.getRealName());
|
||||
businessAssayTaskDataDO.setAssayOperatorId(assignAssayUser.getUserId());
|
||||
businessAssayTaskDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||
|
||||
BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(businessAssayTaskDataDO.getBusinessSubSampleId());
|
||||
|
||||
@@ -118,6 +118,7 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
|
||||
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);
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||
@@ -53,6 +54,7 @@ public class SampleTaskAssignSampleCmp extends NodeComponent {
|
||||
public void process() throws Exception {
|
||||
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
|
||||
String loginRealname = sampleTaskAssignContext.getLoginRealname();
|
||||
LoginUser loginUser = sampleTaskAssignContext.getLoginUser();
|
||||
LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime();
|
||||
AssignAssayUser assignAssayUser = sampleTaskAssignContext.getAssignAssayUser();
|
||||
List<Long> assignSampleIdList = sampleTaskAssignContext.getAssignSampleIdList();
|
||||
@@ -91,12 +93,14 @@ public class SampleTaskAssignSampleCmp extends NodeComponent {
|
||||
businessAssayTaskDO.setTaskNo(taskNo);
|
||||
businessAssayTaskDO.setTaskName(configAssayMethod.getName());
|
||||
businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName());
|
||||
businessAssayTaskDO.setAssayOperatorId(assignAssayUser.getUserId());
|
||||
businessAssayTaskDO.setConfigAssayMethodId(key);
|
||||
businessAssayTaskDO.setTaskSourceType(QmsCommonConstant.TASK_ASSIGN);
|
||||
businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId());
|
||||
businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey());
|
||||
|
||||
businessAssayTaskDO.setTaskAssignOperator(loginRealname);
|
||||
businessAssayTaskDO.setTaskAssignOperatorId(loginUser.getId());
|
||||
businessAssayTaskDO.setTaskAssignTime(currentDateTime);
|
||||
businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS);
|
||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START);
|
||||
@@ -116,6 +120,7 @@ public class SampleTaskAssignSampleCmp extends NodeComponent {
|
||||
val.setIsAssignTasked(QmsCommonConstant.YES);
|
||||
val.setAssignTaskTime(currentDateTime);
|
||||
val.setAssayOperator(assignAssayUser.getRealName());
|
||||
val.setAssayOperatorId(assignAssayUser.getUserId());
|
||||
val.setBusinessAssayTaskId(businessAssayTaskDO.getId());
|
||||
|
||||
BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(val.getBusinessSubSampleId());
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
||||
public interface BusinessSampleDispatchService {
|
||||
|
||||
//增加样品
|
||||
void addOrRemoveSample(@Valid BusinessSampleDispatchSaveReqVO paramVo);
|
||||
void addOrRemoveSample(@Valid BusinessSampleDispatchSaveReqVO paramVo, boolean updateCancelFlag);
|
||||
|
||||
//发起流程
|
||||
CommonResult<BusinessSampleDispatchRespVO> createProcessInstance(BusinessSampleDispatchSaveReqVO paramVo);
|
||||
|
||||
@@ -22,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -59,11 +60,11 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addOrRemoveSample(BusinessSampleDispatchSaveReqVO paramVo) {
|
||||
public void addOrRemoveSample(BusinessSampleDispatchSaveReqVO paramVo, boolean updateCancelFlag) {
|
||||
Long id = paramVo.getId();
|
||||
List<Long> addSubSampleIds = paramVo.getAddSubSampleIds();
|
||||
List<Long> removeDetailIds = paramVo.getRemoveDetailIds();
|
||||
|
||||
BusinessSampleDispatchDO entity = getBusinessSampleDispatch(id);
|
||||
//处理移除
|
||||
if(removeDetailIds != null && !removeDetailIds.isEmpty()){
|
||||
businessSampleDispatchDetailService.deleteBusinessSampleDispatchDetailListByIds(removeDetailIds);
|
||||
@@ -81,8 +82,14 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
|
||||
detail.setParentId(id);
|
||||
insertList.add(detail);
|
||||
}
|
||||
if(!insertList.isEmpty())
|
||||
if(!insertList.isEmpty()){
|
||||
businessSampleDispatchDetailService.insertBatch(insertList);
|
||||
if(updateCancelFlag && "-1".equals(entity.getCancelStatus())){
|
||||
//如果有新增,修改临时数据状态
|
||||
entity.setCancelStatus("0");
|
||||
businessSampleDispatchMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +144,11 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<String> execDispatch(BusinessSampleDispatchSaveReqVO paramVo) {
|
||||
Long id = paramVo.getId();
|
||||
String warehouseUser = paramVo.getWarehouseUser(); //库管员
|
||||
Long warehouseUserId = paramVo.getWarehouseUserId();
|
||||
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
String nickName = SecurityFrameworkUtils.getLoginUserNickname();
|
||||
String warehouseUser = nickName; //库管员
|
||||
Long warehouseUserId = loginUser.getId();
|
||||
BusinessSampleDispatchDO entity = getBusinessSampleDispatch( id);
|
||||
BusinessSampleDispatchDetailPageReqVO pageReqVO = new BusinessSampleDispatchDetailPageReqVO();
|
||||
pageReqVO.setParentId(id);
|
||||
@@ -150,8 +160,10 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
|
||||
List<BusinessHandoverRecordSubDO> handoverRecordList = new ArrayList<>();
|
||||
for (BusinessSampleDispatchDetailExtendRespVO detail : detailList) {
|
||||
BusinessSampleDispatchDetailDO u = new BusinessSampleDispatchDetailDO();
|
||||
u.setId(detail.getId());
|
||||
u.setUseStatus("1");
|
||||
u.setBorrowStatus("1");
|
||||
u.setGivebackStatus("0");
|
||||
u.setBorrowUser(entity.getApplyUser());
|
||||
u.setBorrowUserId(entity.getApplyUserId());
|
||||
u.setBorrowTime(borrowTime);
|
||||
@@ -222,6 +234,7 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
|
||||
handoverRecord.setOperatorId(givebackUserId);
|
||||
handoverRecord.setSendSampleOperator(givebackUser); //送样人
|
||||
handoverRecord.setReceiveSampleOperator(warehouseUser); //收样人
|
||||
handoverRecord.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
|
||||
handoverRecordList.add(handoverRecord);
|
||||
}
|
||||
businessSampleDispatchDetailService.updateBatch(detailUpdateList);
|
||||
|
||||
@@ -61,5 +61,7 @@ public interface BusinessSampleHandoverDetailService {
|
||||
*/
|
||||
PageResult<BusinessSampleHandoverDetailDO> getBusinessSampleHandoverDetailPage(BusinessSampleHandoverDetailPageReqVO pageReqVO);
|
||||
|
||||
PageResult<BusinessSampleHandoverDetailRespVO> takeOffPageList(BusinessSampleHandoverDetailPageReqVO pageReqVO);
|
||||
|
||||
void insertBatch(List<BusinessSampleHandoverDetailDO> list);
|
||||
}
|
||||
@@ -91,6 +91,11 @@ public class BusinessSampleHandoverDetailServiceImpl implements BusinessSampleHa
|
||||
return businessSampleHandoverDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessSampleHandoverDetailRespVO> takeOffPageList(BusinessSampleHandoverDetailPageReqVO pageReqVO) {
|
||||
return businessSampleHandoverDetailMapper.takeOffPageList(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertBatch(List<BusinessSampleHandoverDetailDO> list) {
|
||||
|
||||
@@ -57,6 +57,13 @@ public interface BusinessSubSampleService {
|
||||
*/
|
||||
BusinessSubSampleExtendRespVO getBusinessSubSample(Long id);
|
||||
|
||||
/**
|
||||
* 获取打印子样业务数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
BusinessSubSampleExtendRespVO getPrintSubSample(Long id);
|
||||
|
||||
BusinessSubSampleDO getBySampleCode(String sampleCode);
|
||||
BusinessSubSampleDO getBySampleReturnCode(String sampleReturnCode);
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
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.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
|
||||
@@ -15,6 +16,8 @@ import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigSubSampleService;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationService;
|
||||
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||
import com.zt.plat.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper;
|
||||
import com.zt.plat.module.qms.common.dic.service.DictionaryBusinessService;
|
||||
import com.zt.plat.module.qms.core.code.SequenceUtil;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
@@ -35,6 +38,7 @@ import com.zt.plat.framework.common.exception.ServiceException;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
@@ -43,6 +47,7 @@ import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.e
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||
import static com.zt.plat.module.qms.enums.QmsCommonConstant.SAMPLE_STORAGE_OPERATION_TYPE_TAKEN_OFF;
|
||||
|
||||
/**
|
||||
* 子样业务 Service 实现类
|
||||
@@ -58,6 +63,9 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||
|
||||
@Resource private ConfigWarehouseLocationService configWarehouseLocationService;
|
||||
@Resource private BusinessSampleHandoverService businessSampleHandoverService;
|
||||
@@ -66,6 +74,8 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
@Resource private DictionaryBusinessService dictionaryBusinessService;
|
||||
@Resource private ConfigSubSampleService configSubSampleService;
|
||||
@Resource private SequenceUtil sequenceUtil;
|
||||
@Resource
|
||||
private DictionaryBusinessMapper dictionaryBusinessMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -130,6 +140,33 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
return businessSubSampleMapper.selectExtendById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessSubSampleExtendRespVO getPrintSubSample(Long id) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
BusinessSubSampleExtendRespVO businessSubSample = businessSubSampleMapper.selectExtendById(id);
|
||||
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleIdAndAssayDepartmentId(id, loginUser.getVisitDeptId());
|
||||
businessSubSample.setAssayDepartmentId(businessSubSampleAnalysisGroupDO.getAssayDepartmentId());
|
||||
businessSubSample.setAssayDepartmentName(businessSubSampleAnalysisGroupDO.getAssayDepartmentName());
|
||||
businessSubSample.setSampleReceiver(businessSubSampleAnalysisGroupDO.getSampleReceiver());
|
||||
businessSubSample.setSampleReceiveTime(businessSubSampleAnalysisGroupDO.getSampleReceiveTime());
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubSampleIdAndAssayDepartmentId(id, loginUser.getVisitDeptId());
|
||||
Map<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMap = businessAssayTaskDataDOList.stream().collect(Collectors.groupingBy(BusinessAssayTaskDataDO::getConfigAssayMethodId));
|
||||
List<String> assayProjectList = new ArrayList<>();
|
||||
for (Map.Entry<Long, List<BusinessAssayTaskDataDO>> entry : businessAssayTaskDataDOMap.entrySet()) {
|
||||
List<BusinessAssayTaskDataDO> val = entry.getValue();
|
||||
BusinessAssayTaskDataDO businessAssayTaskDataDO = val.get(0);
|
||||
String assayProject = businessAssayTaskDataDO.getAssayProject();
|
||||
String[] split = assayProject.split(",");
|
||||
for (String s : split) {
|
||||
if (!assayProjectList.contains(s)) {
|
||||
assayProjectList.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
businessSubSample.setAssayProject(CollUtil.join(assayProjectList, ","));
|
||||
return businessSubSample;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessSubSampleDO getBySampleCode(String sampleCode) {
|
||||
LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -292,7 +329,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer execTakeOff(JSONObject reqVo) {
|
||||
String actionWay = reqVo.getString("actionWay");
|
||||
String warehouseLocationCode = reqVo.getString("warehouseLocationCode");
|
||||
String warehouseLocationCode = reqVo.getString("locationCode");
|
||||
String sampleReturnCode = reqVo.getString("sampleReturnCodes");
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
String loginUserName = SecurityFrameworkUtils.getLoginUserNickname();
|
||||
@@ -314,7 +351,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(warehouseLocationCode, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
|
||||
if(locationDO == null)
|
||||
throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS);
|
||||
queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, warehouseLocationCode);
|
||||
queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, locationDO.getId());
|
||||
}else{
|
||||
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "actionWay参数错误!");
|
||||
}
|
||||
@@ -325,35 +362,34 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
|
||||
//创建交接抬头
|
||||
BusinessSampleHandoverSaveReqVO handoverVO = new BusinessSampleHandoverSaveReqVO();
|
||||
String codeTemplate = dictionaryBusinessService.getValueByDataKey("sample_take_off_serial");
|
||||
if(ObjectUtils.isEmpty(codeTemplate))
|
||||
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少“样品下架记录编号规则”的配置,请在业务参数字典增加此配置!");
|
||||
String code = sequenceUtil.genCode(codeTemplate);
|
||||
String code = sequenceUtil.genCode("QMS_SAMPLE_TAKE_OFF_SERIAL");
|
||||
handoverVO.setCode(code);
|
||||
handoverVO.setName("样品下架记录");
|
||||
handoverVO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
|
||||
handoverVO.setOperationTime(LocalDateTime.now());
|
||||
handoverVO.setOperator(loginUserName);
|
||||
handoverVO.setOperatorId(loginUser.getId());
|
||||
handoverVO.setOperationType(SAMPLE_STORAGE_OPERATION_TYPE_TAKEN_OFF);
|
||||
BusinessSampleHandoverRespVO handoverRespVO = businessSampleHandoverService.createBusinessSampleHandover(handoverVO);
|
||||
|
||||
List<Long> dictionaryBusinessIdList = waitingList.stream().map(m -> m.getDictionaryBusinessId()).distinct().collect(Collectors.toList());
|
||||
List<DictionaryBusinessDO> dictionaryBusinessList = dictionaryBusinessMapper.selectByIds(dictionaryBusinessIdList);
|
||||
//更新下架状态
|
||||
List<BusinessHandoverRecordSubDO> recordList = new ArrayList<>();
|
||||
List<BusinessSampleHandoverDetailDO> detailList = new ArrayList<>(); //通过样品交接明细记录下架记录
|
||||
for(BusinessSubSampleDO businessSubSampleDO : waitingList){
|
||||
businessSubSampleDO.setReturnStatus(QmsCommonConstant.TAKEN_OFF);
|
||||
//创建流转记录
|
||||
BusinessHandoverRecordSubDO reecordDO = new BusinessHandoverRecordSubDO();
|
||||
reecordDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||
reecordDO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
|
||||
reecordDO.setSampleCode(businessSubSampleDO.getSampleReturnCode());
|
||||
reecordDO.setOperationTime(LocalDateTime.now());
|
||||
reecordDO.setOperator(loginUserName);
|
||||
reecordDO.setOperatorId(loginUser.getId());
|
||||
reecordDO.setSendSampleOperator("");
|
||||
reecordDO.setReceiveSampleOperator("");
|
||||
reecordDO.setConfigSampleFlowId(0L);
|
||||
recordList.add(reecordDO);
|
||||
BusinessHandoverRecordSubDO record = new BusinessHandoverRecordSubDO();
|
||||
record.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||
record.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
|
||||
record.setSampleCode(businessSubSampleDO.getSampleReturnCode());
|
||||
record.setOperationTime(LocalDateTime.now());
|
||||
record.setOperator(loginUserName);
|
||||
record.setOperatorId(loginUser.getId());
|
||||
record.setSendSampleOperator("");
|
||||
record.setReceiveSampleOperator("");
|
||||
record.setConfigSampleFlowId(0L);
|
||||
recordList.add(record);
|
||||
|
||||
|
||||
BusinessSampleHandoverDetailDO detailDO = new BusinessSampleHandoverDetailDO();
|
||||
@@ -361,6 +397,11 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
detailDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||
detailDO.setSampleName(businessSubSampleDO.getSampleName());
|
||||
detailDO.setSampleCode(businessSubSampleDO.getSampleReturnCode());
|
||||
detailDO.setDictionaryBusinessId(businessSubSampleDO.getDictionaryBusinessId());
|
||||
DictionaryBusinessDO dictionaryBusiness = dictionaryBusinessList.stream().filter(f -> f.getId().equals(businessSubSampleDO.getDictionaryBusinessId())).findFirst().orElse(null);
|
||||
detailDO.setDictionaryBusinessName("");
|
||||
if(dictionaryBusiness != null)
|
||||
detailDO.setDictionaryBusinessName(dictionaryBusiness.getName());
|
||||
detailList.add(detailDO);
|
||||
}
|
||||
businessHandoverRecordSubService.insertBatch(recordList);
|
||||
@@ -377,8 +418,10 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
String warehouseLocationCode = reqVo.getString("warehouseLocationCode");
|
||||
String sampleReturnCode = reqVo.getString("sampleReturnCode");
|
||||
if(ObjectUtils.isEmpty(targetLocation))
|
||||
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少目标库位参数!");
|
||||
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少“变更后库位”参数!");
|
||||
ConfigWarehouseLocationDO targetLocationDO = configWarehouseLocationService.getLocationByCode(targetLocation, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
|
||||
if(targetLocationDO == null)
|
||||
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "“变更后库位”不存在,请检查编码是否正确!");
|
||||
//查询要操作的样品
|
||||
LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BusinessSubSampleDO::getSampleFlowNodeKey, QmsCommonConstant.FLOW_SAMPLE_STORAGE);
|
||||
|
||||
@@ -294,15 +294,18 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
if (businessAssayTaskDO == null) {
|
||||
throw new ServiceException(1_032_100_000, "未找到任务分配单");
|
||||
}
|
||||
String formValue = businessAssayTaskDO.getFormValue();
|
||||
JSONObject formValueJsonObject = JSON.parseObject(formValue);
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
|
||||
String jsonString = JSON.toJSONString(businessAssayTaskDO, context);
|
||||
JSONObject businessAssayTaskJson = JSON.parseObject(jsonString);
|
||||
formValueJsonObject.forEach((key, value) -> {
|
||||
businessAssayTaskJson.put(key, value);
|
||||
});
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
|
||||
String formValue = businessAssayTaskDO.getFormValue();
|
||||
if (StringUtils.isNotBlank(formValue)) {
|
||||
JSONObject formValueJsonObject = JSON.parseObject(formValue);
|
||||
formValueJsonObject.forEach((key, value) -> {
|
||||
businessAssayTaskJson.put(key, value);
|
||||
});
|
||||
}
|
||||
jsonArray.add(businessAssayTaskJson);
|
||||
resultJsonObject.put("businessAssayTask", jsonArray);
|
||||
|
||||
@@ -437,6 +440,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.APPROVED);
|
||||
businessAssayTaskDO.setReportTime(LocalDateTime.now());
|
||||
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
|
||||
businessAssayTaskDO.setReportOperatorId(SecurityFrameworkUtils.getLoginUserId());
|
||||
|
||||
//查询分析任务明细
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
|
||||
|
||||
@@ -4,7 +4,9 @@ import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -21,8 +23,10 @@ import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BatchSampleAnalysisColumnRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectAndParameterRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskAnalysisSampleAndQcProjectRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskAnalysisSampleProjectRespVO;
|
||||
@@ -41,6 +45,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.BusinessQCManagementParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
@@ -51,36 +56,31 @@ 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.BusinessQCManagementParameterDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.BusinessAssayTaskAnalysisDataRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectCoefficientRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectRangeRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectRangeDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectCoefficientMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectRangeMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMapper;
|
||||
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.service.DataCollectionService;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
/**
|
||||
* <b>SampleAnalysisServiceImpl</b>
|
||||
* <p>
|
||||
* 更新历史:
|
||||
* <pre> 版本 更新时间 更新者 更新内容<hr/>
|
||||
* V1.0 2025年9月22日 wxr Add</pre>
|
||||
* <b>Copyright (C) 云南志者竟成科技有限公司</b>
|
||||
* </p>
|
||||
* @author 王兴荣<wxr@wangxingrong.com>
|
||||
* @version V1.0
|
||||
* @since 2025年9月22日
|
||||
*/
|
||||
@Service
|
||||
public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
|
||||
@@ -93,6 +93,12 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectCoefficientMapper configAssayMethodProjectCoefficientMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleMapper businessSubSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskMapper businessAssayTaskMapper;
|
||||
|
||||
@@ -161,12 +167,20 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskId));
|
||||
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
|
||||
BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
|
||||
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
//BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
|
||||
|
||||
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
|
||||
projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
|
||||
// projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
|
||||
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
|
||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
|
||||
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
|
||||
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> projectAndParameterMap = projectAndParameterList.stream().sorted(Comparator.comparing(BusinessAssayProjectAndParameterRespVO::getParamNo)).collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId,
|
||||
LinkedHashMap::new, // 保持组首次出现的顺序(可选)
|
||||
Collectors.toList() // ArrayList 保持组内顺序
|
||||
));
|
||||
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : projectAndParameterMap.entrySet()) {
|
||||
BusinessAssayProjectAndParameterRespVO ep = entry.getValue().get(0);
|
||||
String fieldIndex = "e" + ep.getDicId();
|
||||
String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
@@ -183,7 +197,26 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
// String fieldIndex = "e" + ep.getDicId();
|
||||
// String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
// boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", ep.getDataType(), ep.getDecimalPosition(), null, ep.getFormula(), ep.getParamNo(), isEdit, ep.getUnit(), "project", ep.getFillingWay(), ep.getGroupDictionaryBusinessId(), ep.getGroupDictionaryBusinessKey(), ep.getGroupDictionaryBusinessName()));
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||
// BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
||||
// parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
||||
// List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||
// for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||
// fieldIndex = "p" + p.getDicId();
|
||||
// title = p.getShowName() + (StringUtils.isBlank(p.getUnit()) ? "" : "(" + p.getUnit() + ")");
|
||||
// isEdit = StringUtils.isBlank(p.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
businessAssayTaskAnalysisSampleProjectRespVO.setColumns(cloumns);
|
||||
|
||||
|
||||
@@ -419,12 +452,19 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
|
||||
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<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
// BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
|
||||
|
||||
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
|
||||
projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
|
||||
// projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
|
||||
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
|
||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
|
||||
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> projectAndParameterMap = projectAndParameterList.stream().sorted(Comparator.comparing(BusinessAssayProjectAndParameterRespVO::getParamNo)).collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId,
|
||||
LinkedHashMap::new, // 保持组首次出现的顺序(可选)
|
||||
Collectors.toList() // ArrayList 保持组内顺序
|
||||
));
|
||||
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : projectAndParameterMap.entrySet()) {
|
||||
BusinessAssayProjectAndParameterRespVO ep = entry.getValue().get(0);
|
||||
String fieldIndex = "e" + ep.getDicId();
|
||||
String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
@@ -441,7 +481,25 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
// String fieldIndex = "e" + ep.getDicId();
|
||||
// String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
// boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", ep.getDataType(), ep.getDecimalPosition(), null, ep.getFormula(), ep.getParamNo(), isEdit, ep.getUnit(), "project", ep.getFillingWay(), ep.getGroupDictionaryBusinessId(), ep.getGroupDictionaryBusinessKey(), ep.getGroupDictionaryBusinessName()));
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||
// BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
||||
// parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
||||
// List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||
// for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||
// fieldIndex = "p" + p.getDicId();
|
||||
// title = p.getShowName() + (StringUtils.isBlank(p.getUnit()) ? "" : "(" + p.getUnit() + ")");
|
||||
// isEdit = StringUtils.isBlank(p.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
businessAssayTaskAnalysisDataRespVO.setColumns(cloumns);
|
||||
|
||||
|
||||
@@ -931,7 +989,49 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void issuedIngredients(Long businessAssayTaskId) {
|
||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||
businessAssayTaskDO.setIngredientsStatus("in_progress");
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
|
||||
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
//获取子样id列表
|
||||
List<Long> businessSubSampleIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
||||
//获取子样
|
||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
||||
//子样配置id列表
|
||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||
//子样配置方法
|
||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||
|
||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
//查询检测项目参数
|
||||
List<BusinessAssayParameterDataExtendRespVO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectExtendByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||
|
||||
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataDOList) {
|
||||
//获取子样
|
||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||
|
||||
//子样配置信息
|
||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||
if (StringUtils.isNotBlank(configInfomation)) {
|
||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||
//获取下发配置
|
||||
List<ConfigSubSampleMethodConfItem> downIngredients = configSubSampleMethodConfInfo.getDownIngredients();
|
||||
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : downIngredients) {
|
||||
if (configSubSampleMethodConfItem.getRequired()) {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
String project = source.getProject();
|
||||
String parameter = source.getParameter();
|
||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId()) && f.getSimpleName().equals(project)).findFirst().orElse(null);
|
||||
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && f.getParameterKey().equals(parameter)).findFirst().orElse(null);
|
||||
if (StringUtils.isBlank(currentBusinessAssayParameterData.getValue())) {
|
||||
throw new ServiceException(1_032_050_000, "当前分析任务,存在下发配料必填为空情况。请检查后再下发!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
businessAssayTaskDO.setIngredientsStatus(QmsCommonConstant.IN_PROGRESS);
|
||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +133,14 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
|
||||
//查询结果报送未上报的样品
|
||||
List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(configAssayMethodId);
|
||||
|
||||
if (CollUtil.isEmpty(noReportSubParentSampleAssessmentRespList)) {//没有查询到未上报的数据
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("columns", columnList);
|
||||
json.put("datas", dataList);
|
||||
return json;
|
||||
}
|
||||
|
||||
//分样id列表
|
||||
List<Long> businessSubParentSampleIds = noReportSubParentSampleAssessmentRespList.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList());
|
||||
//报送的检测项目数据
|
||||
|
||||
@@ -519,6 +519,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
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);
|
||||
@@ -562,6 +563,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
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);
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.admin;
|
||||
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationSaveReqVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigPermissionDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigPermissionService;
|
||||
import com.zt.plat.module.qms.enums.QmsPermissionConstant;
|
||||
import com.zt.plat.module.qms.enums.QmsWarehouseLocationConstant;
|
||||
import com.zt.plat.module.system.api.permission.PermissionApi;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -40,8 +48,16 @@ import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationSer
|
||||
public class ConfigWarehouseLocationController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigWarehouseLocationService configWarehouseLocationService;
|
||||
@Resource private ConfigWarehouseLocationService configWarehouseLocationService;
|
||||
@Resource private ConfigPermissionService configPermissionService;
|
||||
@Resource private PermissionApi permissionApi;
|
||||
|
||||
@PostMapping("/save")
|
||||
@Operation(summary = "创建存放位置")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:create')")
|
||||
public CommonResult<ConfigWarehouseLocationRespVO> save(@Valid @RequestBody ConfigWarehouseLocationSaveReqVO createReqVO) {
|
||||
return success(configWarehouseLocationService.save(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建存放位置")
|
||||
@@ -82,15 +98,35 @@ public class ConfigWarehouseLocationController implements BusinessControllerMark
|
||||
// @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:query')")
|
||||
public CommonResult<ConfigWarehouseLocationRespVO> getConfigWarehouseLocation(@RequestParam("id") Long id) {
|
||||
ConfigWarehouseLocationDO configWarehouseLocation = configWarehouseLocationService.getConfigWarehouseLocation(id);
|
||||
return success(BeanUtils.toBean(configWarehouseLocation, ConfigWarehouseLocationRespVO.class));
|
||||
List<ConfigPermissionDO> permissionList = configPermissionService.getPermissionList(id, QmsPermissionConstant.SAMPLE_WAREHOUSE_ADMIN, "");
|
||||
List<ConfigPermissionRespVO> permissionRespVOList= BeanUtils.toBean(permissionList, ConfigPermissionRespVO.class);
|
||||
ConfigWarehouseLocationRespVO vo = BeanUtils.toBean(configWarehouseLocation, ConfigWarehouseLocationRespVO.class);
|
||||
vo.setPermissionList(permissionRespVOList);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得存放位置分页")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:query')")
|
||||
public CommonResult<PageResult<ConfigWarehouseLocationRespVO>> getConfigWarehouseLocationPage(@Valid ConfigWarehouseLocationPageReqVO pageReqVO) {
|
||||
PageResult<ConfigWarehouseLocationDO> pageResult = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigWarehouseLocationRespVO.class));
|
||||
PageResult<ConfigWarehouseLocationRespVO> pageResult = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/selectListWithPermission")
|
||||
@Operation(summary = "安权限查询报告类型")
|
||||
public CommonResult<List<ConfigWarehouseLocationRespVO>> selectListWithPermission(@Valid ConfigWarehouseLocationPageReqVO pageReqVO) {
|
||||
pageReqVO.setPermissionFilterFlag("1");
|
||||
pageReqVO.setSrcPermissionType(QmsPermissionConstant.SAMPLE_WAREHOUSE_ADMIN);
|
||||
pageReqVO.setDataType(QmsWarehouseLocationConstant.DATA_TYPE_WAREHOUSE);
|
||||
//查询权限
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
Long userId = loginUser.getId();
|
||||
CommonResult<Set<Long>> roleRet = permissionApi.getUserRoleIdListByUserId(userId);
|
||||
Set<Long> roleIds = roleRet.getData();
|
||||
pageReqVO.setRoleIds(roleIds);
|
||||
List<ConfigWarehouseLocationDO> list = configWarehouseLocationService.selectListWithPermission(pageReqVO);
|
||||
return success(BeanUtils.toBean(list, ConfigWarehouseLocationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@@ -100,10 +136,9 @@ public class ConfigWarehouseLocationController implements BusinessControllerMark
|
||||
public void exportConfigWarehouseLocationExcel(@Valid ConfigWarehouseLocationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigWarehouseLocationDO> list = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO).getList();
|
||||
List<ConfigWarehouseLocationRespVO> list = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "存放位置.xls", "数据", ConfigWarehouseLocationRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigWarehouseLocationRespVO.class));
|
||||
ExcelUtils.write(response, "存放位置.xls", "数据", ConfigWarehouseLocationRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -70,6 +70,10 @@ public class MaterialAssayStandardController implements BusinessControllerMarker
|
||||
@Operation(summary = "更新检测标准")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:material-assay-standard:update')")
|
||||
public CommonResult<Boolean> updateMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO updateReqVO) {
|
||||
Long id = updateReqVO.getId();
|
||||
MaterialAssayStandardDO entity = materialAssayStandardService.getMaterialAssayStandard(id);
|
||||
if("tempDataKey".equals(entity.getRemark()))
|
||||
updateReqVO.setRemark("");
|
||||
materialAssayStandardService.updateMaterialAssayStandard(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@@ -74,6 +74,14 @@ public class MaterialAssayStandardDetailController implements BusinessController
|
||||
return success(jsonArray);
|
||||
}
|
||||
|
||||
@GetMapping("/getByStandardId")
|
||||
@Operation(summary = "获得物料检测标准检测项目分页")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:query')")
|
||||
public CommonResult<List<MaterialAssayStandardDetailRespVO>> getByStandardId(@Valid MaterialAssayStandardDetailPageReqVO pageReqVO) {
|
||||
List<MaterialAssayStandardDetailRespVO> list = materialAssayStandardDetailService.getByStandardId(pageReqVO.getMaterialAssayStandardId());
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料检测标准检测项目")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:create')")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConfigSubSampleMethodConfInfo {
|
||||
|
||||
/** 分析方法参数取值配置 **/
|
||||
private List<ConfigSubSampleMethodConfItem> getParam;
|
||||
|
||||
/** 分析方法下发配料配置 **/
|
||||
private List<ConfigSubSampleMethodConfItem> downIngredients;
|
||||
|
||||
/** 分析方法配料上传配置 **/
|
||||
private List<ConfigSubSampleMethodConfItem> upIngredients;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConfigSubSampleMethodConfItem {
|
||||
|
||||
/** 来源 **/
|
||||
private ConfigSubSampleMethodConfPoint source;
|
||||
|
||||
/** 目标 **/
|
||||
private ConfigSubSampleMethodConfPoint target;
|
||||
|
||||
/** 是否必须 **/
|
||||
private Boolean required;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConfigSubSampleMethodConfPoint {
|
||||
|
||||
/** 分析方法id **/
|
||||
private Long methodId;
|
||||
|
||||
/** 检测项目 **/
|
||||
private String project;
|
||||
|
||||
/** 参数 **/
|
||||
private String parameter;
|
||||
|
||||
/** 字段 **/
|
||||
private String field;
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ 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 java.util.Set;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -13,6 +14,9 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@Data
|
||||
public class ConfigWarehouseLocationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "ID", example = "31498")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父ID", example = "31498")
|
||||
private Long parentId;
|
||||
|
||||
@@ -50,4 +54,16 @@ public class ConfigWarehouseLocationPageReqVO extends PageParam {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "标签打印模板key")
|
||||
private String printTemplate;
|
||||
|
||||
//===================扩展属性=====================
|
||||
@Schema(description = "查询时进行权限过滤")
|
||||
private String permissionFilterFlag;
|
||||
|
||||
@Schema(description = "查询用-权限角色")
|
||||
private Set<Long> roleIds;
|
||||
|
||||
@Schema(description = "查询用-源权限类型")
|
||||
private String srcPermissionType;
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 存放位置 Response VO")
|
||||
@@ -15,6 +18,7 @@ public class ConfigWarehouseLocationRespVO {
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
// @Dict(dictTable="t_cfg_wrh_loc",dicCode="id",dicText="name")
|
||||
@Schema(description = "父ID", example = "31498")
|
||||
@ExcelProperty("父ID")
|
||||
private Long parentId;
|
||||
@@ -63,4 +67,17 @@ public class ConfigWarehouseLocationRespVO {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "标签打印模板key")
|
||||
@ExcelProperty("标签打印模板key")
|
||||
private String printTemplate;
|
||||
|
||||
//===========扩展字段=======================
|
||||
@Schema(description = "权限列表")
|
||||
List<ConfigPermissionRespVO> permissionList;
|
||||
|
||||
@Schema(description = "仓库名称")
|
||||
String warehouseName;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
String warehouseCode;
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 存放位置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigWarehouseLocationSaveReqVO {
|
||||
@@ -48,4 +50,10 @@ public class ConfigWarehouseLocationSaveReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "标签打印模板key")
|
||||
private String printTemplate;
|
||||
|
||||
//===========扩展字段=======================
|
||||
@Schema(description = "权限列表")
|
||||
List<ConfigPermissionSaveReqVO> permissionList;
|
||||
}
|
||||
@@ -85,4 +85,8 @@ public class ConfigWarehouseLocationDO extends BusinessBaseDO {
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
//标签打印模板key
|
||||
@TableField("PRNT_TMPL")
|
||||
private String printTemplate;
|
||||
|
||||
}
|
||||
@@ -53,5 +53,11 @@ public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSample
|
||||
.eq(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleId)
|
||||
.eq(ConfigSubSampleMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
||||
}
|
||||
|
||||
default List<ConfigSubSampleMethodDO> selectByConfigSubSampleIdsAndConfigAssayMethodId(List<Long> configSubSampleIds, Long configAssayMethodId) {
|
||||
return selectList(new LambdaQueryWrapper<ConfigSubSampleMethodDO>()
|
||||
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds)
|
||||
.eq(ConfigSubSampleMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,9 +3,16 @@ package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleDispatchDetailDO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationParDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存放位置 Mapper
|
||||
@@ -15,9 +22,16 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface ConfigWarehouseLocationMapper extends BaseMapperX<ConfigWarehouseLocationDO> {
|
||||
|
||||
default PageResult<ConfigWarehouseLocationDO> selectPage(ConfigWarehouseLocationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigWarehouseLocationDO>()
|
||||
default PageResult<ConfigWarehouseLocationRespVO> selectPage(ConfigWarehouseLocationPageReqVO reqVO) {
|
||||
|
||||
MPJLambdaWrapperX<ConfigWarehouseLocationDO> wrapper = new MPJLambdaWrapperX<>();
|
||||
//仓库
|
||||
wrapper.leftJoin(ConfigWarehouseLocationParDO.class, ConfigWarehouseLocationParDO::getId, ConfigWarehouseLocationDO::getParentId);
|
||||
wrapper.selectAll(ConfigWarehouseLocationDO.class)
|
||||
.selectAs(ConfigWarehouseLocationParDO::getName, ConfigWarehouseLocationRespVO::getWarehouseName)
|
||||
.selectAs(ConfigWarehouseLocationParDO::getCode, ConfigWarehouseLocationRespVO::getWarehouseCode)
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getWarehouseType, reqVO.getWarehouseType())
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getId, reqVO.getId())
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getParentId, reqVO.getParentId())
|
||||
.likeIfPresent(ConfigWarehouseLocationDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getCode, reqVO.getCode())
|
||||
@@ -29,7 +43,10 @@ public interface ConfigWarehouseLocationMapper extends BaseMapperX<ConfigWarehou
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigWarehouseLocationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigWarehouseLocationDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigWarehouseLocationDO::getSortNo));
|
||||
.orderByDesc(ConfigWarehouseLocationDO::getSortNo);
|
||||
|
||||
return selectJoinPage(reqVO, ConfigWarehouseLocationRespVO.class, wrapper);
|
||||
}
|
||||
|
||||
List<ConfigWarehouseLocationDO> selectListWithPermission(@Param("param") ConfigWarehouseLocationPageReqVO param);
|
||||
}
|
||||
@@ -18,6 +18,9 @@ public interface ConfigWarehouseLocationService {
|
||||
|
||||
ConfigWarehouseLocationDO getLocationByCode(String code, String warehouseType);
|
||||
|
||||
//保存数据
|
||||
ConfigWarehouseLocationRespVO save(@Valid ConfigWarehouseLocationSaveReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 创建存放位置
|
||||
*
|
||||
@@ -61,6 +64,7 @@ public interface ConfigWarehouseLocationService {
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 存放位置分页
|
||||
*/
|
||||
PageResult<ConfigWarehouseLocationDO> getConfigWarehouseLocationPage(ConfigWarehouseLocationPageReqVO pageReqVO);
|
||||
PageResult<ConfigWarehouseLocationRespVO> getConfigWarehouseLocationPage(ConfigWarehouseLocationPageReqVO pageReqVO);
|
||||
|
||||
List<ConfigWarehouseLocationDO> selectListWithPermission(ConfigWarehouseLocationPageReqVO pageReqVO);
|
||||
}
|
||||
@@ -2,9 +2,11 @@ package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionSaveReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationSaveReqVO;
|
||||
import com.zt.plat.module.qms.enums.QmsPermissionConstant;
|
||||
import com.zt.plat.module.qms.enums.QmsWarehouseLocationConstant;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -19,7 +21,6 @@ import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigWarehouseLocationMapper;
|
||||
|
||||
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.module.qms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
@@ -31,11 +32,30 @@ import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||
@Validated
|
||||
public class ConfigWarehouseLocationServiceImpl implements ConfigWarehouseLocationService {
|
||||
|
||||
|
||||
@Resource private ConfigPermissionService configPermissionService;
|
||||
|
||||
@Resource
|
||||
private ConfigWarehouseLocationMapper configWarehouseLocationMapper;
|
||||
|
||||
@Override
|
||||
public ConfigWarehouseLocationRespVO save(ConfigWarehouseLocationSaveReqVO reqVo) {
|
||||
Long id = reqVo.getId();
|
||||
//处理权限
|
||||
List<ConfigPermissionSaveReqVO> primissionList = reqVo.getPermissionList();
|
||||
if(id == null){
|
||||
ConfigWarehouseLocationDO entity = BeanUtils.toBean(reqVo, ConfigWarehouseLocationDO.class);
|
||||
configWarehouseLocationMapper.insert(entity);
|
||||
id = entity.getId();
|
||||
reqVo.setId( id);
|
||||
}
|
||||
for(ConfigPermissionSaveReqVO permission : primissionList){
|
||||
permission.setSourceId( id);
|
||||
permission.setSourceType(QmsPermissionConstant.SAMPLE_WAREHOUSE_ADMIN);
|
||||
}
|
||||
configPermissionService.savePermissionListWithAutoDelete(primissionList, id, QmsPermissionConstant.SAMPLE_WAREHOUSE_ADMIN, null);
|
||||
return BeanUtils.toBean(reqVo, ConfigWarehouseLocationRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigWarehouseLocationDO getLocationByCode(String code, String warehouseType) {
|
||||
LambdaQueryWrapper<ConfigWarehouseLocationDO> query = new LambdaQueryWrapper<>();
|
||||
@@ -104,8 +124,12 @@ public class ConfigWarehouseLocationServiceImpl implements ConfigWarehouseLocati
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigWarehouseLocationDO> getConfigWarehouseLocationPage(ConfigWarehouseLocationPageReqVO pageReqVO) {
|
||||
public PageResult<ConfigWarehouseLocationRespVO> getConfigWarehouseLocationPage(ConfigWarehouseLocationPageReqVO pageReqVO) {
|
||||
return configWarehouseLocationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ConfigWarehouseLocationDO> selectListWithPermission(ConfigWarehouseLocationPageReqVO pageReqVO) {
|
||||
return configWarehouseLocationMapper.selectListWithPermission(pageReqVO);
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,7 @@ public class ReportDocumentMainRespVO {
|
||||
|
||||
@Schema(description = "审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束")
|
||||
@Dict(dicCode = "flow_status")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
|
||||
@@ -21,8 +21,6 @@ import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@@ -113,12 +111,14 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
return new ArrayList<>();
|
||||
JSONObject jsonObject = JSONObject.parseObject(customConfig);
|
||||
Integer dynamicColCount = 3;
|
||||
Integer fixedColCount = 3;
|
||||
Integer fixedColCount = 0;
|
||||
Integer maxRowCount = 3;
|
||||
String dynamicColCountStr = jsonObject.getString("dynamicColCount"); //动态列(检测项)数量
|
||||
String fixedColCountStr = jsonObject.getString("fixedColCount"); //固定列(样品名称、样品编号等)数量
|
||||
// String fixedColCountStr = jsonObject.getString("fixedColCount"); //固定列(样品名称、样品编号等)数量
|
||||
JSONArray fixedCol = jsonObject.getJSONArray("fixedCol"); //固定列,举例:["sampleName", "sampleCode"]
|
||||
JSONArray fixedColShow = jsonObject.getJSONArray("fixedColShow"); //固定列,举例:["产品名称", "编 号"]
|
||||
String maxRowCountStr = jsonObject.getString("maxRowCount"); //最大行数
|
||||
String nameCodeType = jsonObject.getString("nameCodeType"); //名称、编号处理方式:merge-合并, name-只显示名称, code-只显示编号, split-2列分开显示
|
||||
// String nameCodeType = jsonObject.getString("nameCodeType"); //名称、编号处理方式:merge-合并, name-只显示名称, code-只显示编号, split-2列分开显示
|
||||
String hasRemark = jsonObject.getString("hasRemark"); //是否有备注
|
||||
String hasRange = jsonObject.getString("hasRange"); //是否有检出限
|
||||
String verticalFlag = jsonObject.getString("verticalFlag"); //vertical-纵表, 否则为横表
|
||||
@@ -130,7 +130,7 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
return assembleFixedFieldsData(fieldList, dataList, customConfig);
|
||||
}
|
||||
if(!ObjectUtils.isEmpty(dynamicColCountStr)) dynamicColCount = Integer.parseInt(dynamicColCountStr);
|
||||
if(!ObjectUtils.isEmpty(fixedColCountStr)) fixedColCount = Integer.parseInt(fixedColCountStr);
|
||||
if(fixedCol != null) fixedColCount = fixedCol.size();
|
||||
|
||||
if(!ObjectUtils.isEmpty(maxRowCountStr)) maxRowCount = Integer.parseInt(maxRowCountStr);
|
||||
Integer eleCount = 0; //元素数量,即元素列总数
|
||||
@@ -144,14 +144,14 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
Integer colCountOneSample = fixedColCount + dynamicColCount; //每个样品要占的列数
|
||||
Integer dataLength = dataList.size();
|
||||
Integer emptyRowCount = dataLength < maxRowCount ? 1 : 0; //空行数
|
||||
Integer allRowCount = 1 + dataLength + emptyRowCount + 1; //标题 + 样品数 + 空行
|
||||
// Integer allRowCount = 1 + dataLength + emptyRowCount + 1; //标题 + 样品数 + 空行
|
||||
|
||||
if("1".equals(hasRange))
|
||||
emptyRowCount ++;
|
||||
|
||||
if(rowCountOneSample > 1){
|
||||
allRowCount = (1 + dataLength + emptyRowCount + 9) * rowCountOneSample + emptyRowCount; //(标题 + 样品数 + 空行) * 但样品行数 + 末尾行
|
||||
}
|
||||
// if(rowCountOneSample > 1){
|
||||
// allRowCount = (1 + dataLength + emptyRowCount + 9) * rowCountOneSample + emptyRowCount; //(标题 + 样品数 + 空行) * 但样品行数 + 末尾行
|
||||
// }
|
||||
List<JSONObject> rowList = new ArrayList<>();
|
||||
for(int i = 0; i < maxRowCount; i++){
|
||||
JSONObject row = new JSONObject();
|
||||
@@ -193,7 +193,7 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
r.put(colPrefix + "01", "方法检出限");
|
||||
lastObjFlag = true;
|
||||
if(colIndex % colCountOneSample == 0){
|
||||
addTitleToRowList(nameCodeType, rowAssist, t, dataLength, emptyRowCount, rowList, fieldList);
|
||||
addTitleToRowList(fixedCol, rowAssist, t, dataLength, emptyRowCount, rowList, fieldList);
|
||||
if("1".equals(hasRange))
|
||||
addRangeToRowList(rowAssist, r, dataLength, emptyRowCount, rowList);
|
||||
t = new JSONObject();
|
||||
@@ -211,7 +211,7 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
colIndex++;
|
||||
}
|
||||
if(lastObjFlag){
|
||||
addTitleToRowList(nameCodeType, rowAssist, t, dataLength, emptyRowCount, rowList, fieldList);
|
||||
addTitleToRowList(fixedCol, rowAssist, t, dataLength, emptyRowCount, rowList, fieldList);
|
||||
if("1".equals(hasRange))
|
||||
addRangeToRowList(rowAssist, r, dataLength, emptyRowCount, rowList);
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
t.put(colPrefix + colKey, fieldValue);
|
||||
lastObjFlag = true;
|
||||
if(colIndex % colCountOneSample == 0){
|
||||
addDataToRowList(nameCodeType, dataDO, rowAssist, t, dataLength, emptyRowCount, dataIndex, rowList, fieldList);
|
||||
addFixedDataToRowList(fixedCol, dataDO, rowAssist, t, dataLength, emptyRowCount, dataIndex, rowList, fieldList);
|
||||
t = new JSONObject();
|
||||
if("1".equals(hasRemark)){
|
||||
t.put(colPrefix + parseNumToString(colCountOneSample + 1, 2), remark);
|
||||
@@ -265,7 +265,7 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
colIndex++;
|
||||
}
|
||||
if(lastObjFlag){
|
||||
addDataToRowList(nameCodeType, dataDO, rowAssist, t, dataLength, emptyRowCount, dataIndex, rowList, fieldList);
|
||||
addFixedDataToRowList(fixedCol, dataDO, rowAssist, t, dataLength, emptyRowCount, dataIndex, rowList, fieldList);
|
||||
}
|
||||
dataIndex ++;
|
||||
}
|
||||
@@ -290,38 +290,43 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nameCodeType: merge-合并, name-只显示名称, code-只显示编号, split-2列分开显示
|
||||
* @param
|
||||
*
|
||||
* */
|
||||
private void addTitleToRowList(String nameCodeType, Integer rowAssist, JSONObject t, Integer dataLength, Integer emptyRowCount,
|
||||
List<JSONObject> rowList, List<ConfigReportFieldDO> fieldList){
|
||||
private void addTitleToRowList(JSONArray fixedCol, Integer rowAssist, JSONObject t, Integer dataLength, Integer emptyRowCount, List<JSONObject> rowList, List<ConfigReportFieldDO> fieldList){
|
||||
int rowIndex = (1 + dataLength + emptyRowCount) * (rowAssist - 1) + 1; //(标题 + 数据行 + 空行)
|
||||
//处理固定列
|
||||
int index = 1;
|
||||
String colKey = parseNumToString(index, 2);
|
||||
if(name_code_merge.equals(nameCodeType)){
|
||||
t.put(colPrefix + colKey, "样品名称及编号");
|
||||
rowList.set(rowIndex, t.clone());
|
||||
return;
|
||||
}
|
||||
if(name_code_name.equals(nameCodeType)){
|
||||
t.put(colPrefix + colKey, "样品名称");
|
||||
rowList.set(rowIndex, t.clone());
|
||||
return;
|
||||
}
|
||||
if(name_code_code.equals(nameCodeType)){
|
||||
t.put(colPrefix + colKey, "样品编号");
|
||||
rowList.set(rowIndex, t.clone());
|
||||
return;
|
||||
}
|
||||
for(ConfigReportFieldDO fieldDO : fieldList){
|
||||
String fieldName = fieldDO.getFieldName();
|
||||
String fieldType = fieldDO.getFieldType();
|
||||
if(FIELD_DYNAMIC.equals(fieldType))
|
||||
continue;
|
||||
colKey = parseNumToString(index, 2);
|
||||
t.put(colPrefix + colKey, fieldName);
|
||||
index++;
|
||||
String colKey = "";
|
||||
for(int i=0;i<fixedCol.size();i++) {
|
||||
String col = fixedCol.getString(i);
|
||||
for(ConfigReportFieldDO fieldDO : fieldList) {
|
||||
String fieldName = fieldDO.getFieldName();
|
||||
String fieldType = fieldDO.getFieldType();
|
||||
String field = fieldDO.getField();
|
||||
if (FIELD_DYNAMIC.equals(fieldType))
|
||||
continue;
|
||||
if("sampleNameCode".equals( col) && "SMP_NAME_CD".equals(field)){
|
||||
// String sampleNameCode = "样品名称及编号";
|
||||
// String sampleNameCode = fieldName;
|
||||
colKey = parseNumToString(index, 2);
|
||||
t.put(colPrefix + colKey, fieldName);
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
if("sampleName".equals( col) && "SMP_NAME".equals(field)){
|
||||
colKey = parseNumToString(index, 2);
|
||||
t.put(colPrefix + colKey, fieldName);
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
if("sampleCode".equals( col) && "SMP_CD".equals(field)){
|
||||
colKey = parseNumToString(index, 2);
|
||||
t.put(colPrefix + colKey, fieldName);
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
rowList.set(rowIndex, t.clone());
|
||||
}
|
||||
@@ -336,44 +341,63 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
|
||||
}
|
||||
|
||||
|
||||
private void addDataToRowList(String nameCodeType, ReportDocumentDataDO dataDO, Integer rowAssist, JSONObject t, Integer dataLength, Integer emptyRowCount, Integer dataIndex, List<JSONObject> rowList, List<ConfigReportFieldDO> fieldList){
|
||||
/**
|
||||
* 添加固定列的数据
|
||||
* */
|
||||
private void addFixedDataToRowList(JSONArray fixedCol, ReportDocumentDataDO dataDO, Integer rowAssist, JSONObject t, Integer dataLength, Integer emptyRowCount, Integer dataIndex, List<JSONObject> rowList, List<ConfigReportFieldDO> fieldList){
|
||||
int rowIndex = (1 + dataLength + emptyRowCount) * (rowAssist - 1) + dataIndex + 1; //(标题 + 数据行 + 空行)
|
||||
t.put("id", dataDO.getId());
|
||||
//处理固定列
|
||||
int index = 1;
|
||||
//处理固定列
|
||||
String colKey = parseNumToString(index, 2);
|
||||
if(name_code_merge.equals(nameCodeType)){
|
||||
String merge = dataDO.getSampleName() + " " + dataDO.getSampleCode();
|
||||
t.put(colPrefix + colKey, merge);
|
||||
rowList.set(rowIndex, t.clone());
|
||||
return;
|
||||
}
|
||||
if(name_code_name.equals(nameCodeType)){
|
||||
t.put(colPrefix + colKey, dataDO.getSampleName());
|
||||
rowList.set(rowIndex, t.clone());
|
||||
return;
|
||||
}
|
||||
if(name_code_code.equals(nameCodeType)){
|
||||
t.put(colPrefix + colKey, dataDO.getSampleCode());
|
||||
rowList.set(rowIndex, t.clone());
|
||||
return;
|
||||
}
|
||||
for(ConfigReportFieldDO fieldDO : fieldList){
|
||||
String fieldName = fieldDO.getFieldName();
|
||||
String fieldType = fieldDO.getFieldType();
|
||||
String field = fieldDO.getField();
|
||||
if(FIELD_FIXED.equals(fieldType)){
|
||||
String colKey = "";
|
||||
if(fixedCol != null && !fixedCol.isEmpty()){
|
||||
for(int i=0;i<fixedCol.size();i++){
|
||||
String col = fixedCol.getString(i);
|
||||
colKey = parseNumToString(index, 2);
|
||||
String val = "";
|
||||
if(sampleNameKey.equals( field))
|
||||
val = dataDO.getSampleName();
|
||||
else if(sampleCodeKey.equals( field))
|
||||
val = dataDO.getSampleCode();
|
||||
t.put(colPrefix + colKey, val);
|
||||
index++;
|
||||
if("sampleName".equals(col)){
|
||||
t.put(colPrefix + colKey, dataDO.getSampleName());
|
||||
}
|
||||
else if("sampleCode".equals(col)){
|
||||
t.put(colPrefix + colKey, dataDO.getSampleCode());
|
||||
}
|
||||
else if("sampleNameCode".equals( col)){
|
||||
t.put(colPrefix + colKey, dataDO.getSampleName() + " " + dataDO.getSampleCode());
|
||||
}
|
||||
index ++;
|
||||
}
|
||||
}
|
||||
// if(name_code_merge.equals(nameCodeType)){
|
||||
// String merge = dataDO.getSampleName() + " " + dataDO.getSampleCode();
|
||||
// t.put(colPrefix + colKey, merge);
|
||||
// rowList.set(rowIndex, t.clone());
|
||||
// return;
|
||||
// }
|
||||
// if(name_code_name.equals(nameCodeType)){
|
||||
// t.put(colPrefix + colKey, dataDO.getSampleName());
|
||||
// rowList.set(rowIndex, t.clone());
|
||||
// return;
|
||||
// }
|
||||
// if(name_code_code.equals(nameCodeType)){
|
||||
// t.put(colPrefix + colKey, dataDO.getSampleCode());
|
||||
// rowList.set(rowIndex, t.clone());
|
||||
// return;
|
||||
// }
|
||||
// for(ConfigReportFieldDO fieldDO : fieldList){
|
||||
// String fieldName = fieldDO.getFieldName();
|
||||
// String fieldType = fieldDO.getFieldType();
|
||||
// String field = fieldDO.getField();
|
||||
// if(FIELD_FIXED.equals(fieldType)){
|
||||
// colKey = parseNumToString(index, 2);
|
||||
// String val = "";
|
||||
// if(sampleNameKey.equals( field))
|
||||
// val = dataDO.getSampleName();
|
||||
// else if(sampleCodeKey.equals( field))
|
||||
// val = dataDO.getSampleCode();
|
||||
// t.put(colPrefix + colKey, val);
|
||||
// index++;
|
||||
// }
|
||||
// }
|
||||
rowList.set(rowIndex, t.clone());
|
||||
}
|
||||
private String parseNumToString(int num, int len){
|
||||
|
||||
@@ -137,7 +137,7 @@ public class DictAspect {
|
||||
String dictCode = code;
|
||||
if (!StringUtils.isEmpty(table)) {
|
||||
//指定table
|
||||
dictCode = String.format("%s,%s,%s,%s", table, text, code, keyOrId);
|
||||
dictCode = String.format("%s,%s,%s", table, text, code);
|
||||
}else{
|
||||
dictCode = String.format("%s"+DICT_ANNOTATION_SPLIT+"%s", code, keyOrId);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//package com.zt.plat.module.qms.iot.mapper;
|
||||
package com.zt.plat.module.qms.iot.mapper;//package com.zt.plat.module.qms.iot.mapper;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.yncic.modules.iot.entity.IotHelloEntity;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//package com.zt.plat.module.qms.iot.service;
|
||||
package com.zt.plat.module.qms.iot.service;//package com.zt.plat.module.qms.iot.service;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//import com.yncic.modules.iot.entity.IotHelloEntity;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//package com.zt.plat.module.qms.iot.service.impl;
|
||||
package com.zt.plat.module.qms.iot.service.impl;//package com.zt.plat.module.qms.iot.service.impl;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import com.yncic.modules.iot.entity.IotHelloEntity;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class AutoIngredientsController {
|
||||
@PostMapping("/submit-assay-result")
|
||||
@Operation(summary = "检测结果同步")
|
||||
public CommonResult<?> submitAssayResult(@RequestBody AutoIngredientsTaskAssayResultReqVO body) {
|
||||
System.out.println(com.alibaba.fastjson2.JSON.toJSONString(body));
|
||||
// System.out.println(com.alibaba.fastjson2.JSON.toJSONString(body));
|
||||
autoIngredientsService.submitAssayResult(body);
|
||||
return CommonResult.success("成功");
|
||||
}
|
||||
|
||||
@@ -6,27 +6,58 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.zt.plat.framework.common.exception.ServiceException;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||
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.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDetailMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
import com.zt.plat.module.qms.thirdpartyapi.controller.vo.AutoIngredientsTaskAssayResultReqVO;
|
||||
import com.zt.plat.module.qms.thirdpartyapi.controller.vo.AutoIngredientsTaskDetailAssayResultReqVO;
|
||||
import com.zt.plat.module.qms.thirdpartyapi.controller.vo.AutoIngredientsTaskDetailRespVO;
|
||||
import com.zt.plat.module.qms.thirdpartyapi.controller.vo.AutoIngredientsTaskQueryReqVO;
|
||||
import com.zt.plat.module.qms.thirdpartyapi.controller.vo.AutoIngredientsTaskRespVO;
|
||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleMapper businessSubSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskMapper businessAssayTaskMapper;
|
||||
|
||||
@@ -36,6 +67,9 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
||||
@Resource
|
||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
|
||||
|
||||
@@ -52,28 +86,187 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
||||
search.setTaskAssignSubmitTime(taskAssignSubmiTimes);
|
||||
}
|
||||
List<BusinessAssayTaskExtendRespVO> list = businessAssayTaskMapper.selectList(search);
|
||||
List<AutoIngredientsTaskRespVO> resultList = list.stream().map(m -> new AutoIngredientsTaskRespVO(m.getId(), m.getTaskNo(), m.getTaskAssignSubmitTime(), m.getAssayOperator(), m.getAssayOperator())).collect(Collectors.toList());
|
||||
List<Long> assayOperatorIdList = list.stream().filter(f -> f.getAssayOperatorId() != null).map(m -> m.getAssayOperatorId()).distinct().collect(Collectors.toList());
|
||||
CommonResult<List<AdminUserRespDTO>> userListResult = adminUserApi.getUserList(assayOperatorIdList);
|
||||
if (userListResult.isError()) {
|
||||
throw new ServiceException(userListResult.getCode(), userListResult.getMsg());
|
||||
}
|
||||
List<AdminUserRespDTO> userList = userListResult.getData();
|
||||
List<AutoIngredientsTaskRespVO> resultList = list.stream().map(m -> {
|
||||
AdminUserRespDTO user = userList.stream().filter(f -> f.getId().equals(m.getAssayOperatorId())).findFirst().orElse(null);
|
||||
return new AutoIngredientsTaskRespVO(m.getId(), m.getTaskNo(), m.getTaskAssignSubmitTime(), user.getUsername(), m.getAssayOperator());
|
||||
}).collect(Collectors.toList());
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AutoIngredientsTaskDetailRespVO> taskDetailList(Long taskId) {
|
||||
// List<BusinessAssayTaskDetailDO> list = businessAssayTaskDetailMapper.selectByBusinessAssayTaskId(taskId);
|
||||
// businessAssayTaskDataMapper.selectByBusinessAssayTaskId(taskId)
|
||||
List<AutoIngredientsTaskDetailRespVO> resultList = new ArrayList<>();
|
||||
// for (BusinessAssayTaskDetailDO businessAssayTaskDetailDO : list) {
|
||||
// AutoIngredientsTaskDetailRespVO autoIngredientsTaskDetailRespVO = new AutoIngredientsTaskDetailRespVO();
|
||||
// autoIngredientsTaskDetailRespVO.setAssayOperator(null)
|
||||
// resultList.add(autoIngredientsTaskDetailRespVO);
|
||||
//
|
||||
// }
|
||||
//查询任务分配信息
|
||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(taskId);
|
||||
//查询子样检测任务
|
||||
BusinessAssayTaskDataReqVO search = new BusinessAssayTaskDataReqVO();
|
||||
search.setBusinessAssayTaskId(taskId);
|
||||
List<BusinessAssayTaskDataExtendRespVO> list = businessAssayTaskDataMapper.selectList(search);
|
||||
|
||||
//分析人员id列表
|
||||
List<Long> assayOperatorIdList = list.stream().filter(f -> f.getAssayOperatorId() != null).map(m -> m.getAssayOperatorId()).distinct().collect(Collectors.toList());
|
||||
|
||||
//子样配置id列表
|
||||
List<Long> configSubSampleIdList = list.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||
|
||||
//子样配置方法
|
||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||
|
||||
//分析任务id列表
|
||||
List<Long> businessAssayTaskDataIdList = list.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
|
||||
//查询检测项目
|
||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
//查询检测项目参数
|
||||
List<BusinessAssayParameterDataExtendRespVO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectExtendByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||
|
||||
CommonResult<List<AdminUserRespDTO>> userListResult = adminUserApi.getUserList(assayOperatorIdList);
|
||||
if (userListResult.isError()) {
|
||||
throw new ServiceException(userListResult.getCode(), userListResult.getMsg());
|
||||
}
|
||||
List<AdminUserRespDTO> userList = userListResult.getData();
|
||||
List<AutoIngredientsTaskDetailRespVO> resultList = list.stream().map(m -> {
|
||||
//分析人员信息
|
||||
AdminUserRespDTO user = userList.stream().filter(f -> f.getId().equals(m.getAssayOperatorId())).findFirst().orElse(null);
|
||||
//子样配置信息
|
||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(m.getConfigSubSampleId())).findFirst().orElse(null);
|
||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||
//当前检测项目列表
|
||||
List<BusinessAssayProjectDataExtendRespVO> currentBusinessAssayProjectDataList = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(m.getId())).collect(Collectors.toList());
|
||||
|
||||
AutoIngredientsTaskDetailRespVO autoIngredientsTaskDetailRespVO = new AutoIngredientsTaskDetailRespVO();
|
||||
autoIngredientsTaskDetailRespVO.setId(m.getId());
|
||||
autoIngredientsTaskDetailRespVO.setTaskId(m.getBusinessAssayTaskId());
|
||||
autoIngredientsTaskDetailRespVO.setSampleCode(m.getSampleAssayCode());
|
||||
autoIngredientsTaskDetailRespVO.setSampleName(m.getSampleName());
|
||||
|
||||
if (StringUtils.isNotBlank(configInfomation)) {
|
||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||
//获取下发配置
|
||||
List<ConfigSubSampleMethodConfItem> downIngredients = configSubSampleMethodConfInfo.getDownIngredients();
|
||||
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : downIngredients) {
|
||||
if (configSubSampleMethodConfItem.getRequired()) {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
String project = source.getProject();
|
||||
String parameter = source.getParameter();
|
||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = currentBusinessAssayProjectDataList.stream().filter(f -> f.getSimpleName().equals(project)).findFirst().orElse(null);
|
||||
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && f.getParameterKey().equals(parameter)).findFirst().orElse(null);
|
||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||
String field = target.getField();
|
||||
BeanUtil.setFieldValue(autoIngredientsTaskDetailRespVO, field, currentBusinessAssayParameterData.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
autoIngredientsTaskDetailRespVO.setAssayProject(m.getAssayProject());
|
||||
autoIngredientsTaskDetailRespVO.setAssayOperator(user.getUsername());
|
||||
autoIngredientsTaskDetailRespVO.setAssayOperatorName(m.getAssayOperator());
|
||||
autoIngredientsTaskDetailRespVO.setRemark(m.getRemark());
|
||||
|
||||
return autoIngredientsTaskDetailRespVO;
|
||||
}).collect(Collectors.toList());
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void submitAssayResult(AutoIngredientsTaskAssayResultReqVO body) {
|
||||
|
||||
List<BusinessAssayTaskDataDO> updateBusinessAssayTaskDataDOList = new ArrayList<>();
|
||||
List<BusinessAssayProjectDataDO> updateBusinessAssayProjectDataDOList = new ArrayList<>();
|
||||
List<BusinessAssayParameterDataDO> updateBusinessAssayParameterDataDOList = new ArrayList<>();
|
||||
|
||||
//任务id
|
||||
Long taskId = body.getTaskId();
|
||||
//查询任务分配信息
|
||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(taskId);
|
||||
List<AutoIngredientsTaskDetailAssayResultReqVO> sampleList = body.getSampleList();
|
||||
//获取检测任务id
|
||||
List<Long> businessAssayTaskDataIdList = sampleList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByIds(businessAssayTaskDataIdList);
|
||||
//获取子样id列表
|
||||
List<Long> businessSubSampleIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
||||
//获取子样
|
||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
||||
//子样配置id列表
|
||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||
//子样配置方法
|
||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||
|
||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
//查询检测项目参数
|
||||
List<BusinessAssayParameterDataExtendRespVO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectExtendByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||
|
||||
for (AutoIngredientsTaskDetailAssayResultReqVO autoIngredientsTaskDetailAssayResultReqVO : sampleList) {
|
||||
//获取子样检测任务
|
||||
BusinessAssayTaskDataDO businessAssayTaskDataDO = businessAssayTaskDataDOList.stream().filter(f -> f.getId().equals(autoIngredientsTaskDetailAssayResultReqVO.getId())).findFirst().orElse(null);
|
||||
//获取子样
|
||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||
|
||||
//子样配置信息
|
||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||
if (StringUtils.isNotBlank(configInfomation)) {
|
||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||
//获取上传配置
|
||||
List<ConfigSubSampleMethodConfItem> upIngredients = configSubSampleMethodConfInfo.getUpIngredients();
|
||||
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : upIngredients) {
|
||||
if (configSubSampleMethodConfItem.getRequired()) {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
String field = source.getField();
|
||||
// System.out.println("field:" + field);
|
||||
// Field field2 = ReflectUtil.getField(autoIngredientsTaskDetailAssayResultReqVO.getClass(), field);
|
||||
// Map<String, Field> fieldMap = ReflectUtil.getFieldMap(autoIngredientsTaskDetailAssayResultReqVO.getClass());
|
||||
// Object fieldValue2 = ReflectUtil.getFieldValue(autoIngredientsTaskDetailAssayResultReqVO, fieldMap.get(field));
|
||||
Object fieldValue = BeanUtil.getFieldValue(autoIngredientsTaskDetailAssayResultReqVO, field);
|
||||
if (fieldValue == null) {
|
||||
fieldValue = "";
|
||||
}
|
||||
// System.out.println("fieldValue:" + fieldValue);
|
||||
|
||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||
String project = target.getProject();
|
||||
|
||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(autoIngredientsTaskDetailAssayResultReqVO.getId()) && f.getSimpleName().equals(project)).findFirst().orElse(null);
|
||||
String parameter = target.getParameter();
|
||||
if (StringUtils.isBlank(parameter)) {
|
||||
currentBusinessAssayProjectData.setValue(fieldValue.toString());
|
||||
updateBusinessAssayProjectDataDOList.add(BeanUtils.toBean(currentBusinessAssayProjectData, BusinessAssayProjectDataDO.class));
|
||||
} else {
|
||||
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && f.getParameterKey().equals(parameter)).findFirst().orElse(null);
|
||||
currentBusinessAssayParameterData.setValue(fieldValue.toString());
|
||||
updateBusinessAssayParameterDataDOList.add(BeanUtils.toBean(currentBusinessAssayParameterData, BusinessAssayParameterDataDO.class));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
String remark = CollUtil.join(Arrays.asList(autoIngredientsTaskDetailAssayResultReqVO.getRemark()), "、");
|
||||
|
||||
businessAssayTaskDataDO.setRemark(remark);
|
||||
updateBusinessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||
}
|
||||
|
||||
businessAssayTaskDO.setIngredientsStatus(QmsCommonConstant.ALLOW_SUBMIT);
|
||||
|
||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||
|
||||
if (CollUtil.isNotEmpty(updateBusinessAssayTaskDataDOList)) {
|
||||
businessAssayTaskDataMapper.updateBatch(updateBusinessAssayTaskDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(updateBusinessAssayProjectDataDOList)) {
|
||||
businessAssayProjectDataMapper.updateBatch(updateBusinessAssayProjectDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(updateBusinessAssayParameterDataDOList)) {
|
||||
businessAssayParameterDataMapper.updateBatch(updateBusinessAssayParameterDataDOList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
t.CFG_ASY_MTHD_ID = tcam.ID
|
||||
AND t.TENANT_ID = tcam.TENANT_ID
|
||||
WHERE t.RPOD_STS in ('pending_report', 'pending_assessment', 're_inspected')
|
||||
GROUP BY
|
||||
t.CFG_ASY_MTHD_ID,
|
||||
t.ASY_TP,
|
||||
|
||||
@@ -11,29 +11,49 @@
|
||||
|
||||
<select id="selectUnReportMethodGroupList" resultType="com.zt.plat.module.qms.business.bus.controller.vo.BusinessSubParentSampleAssessmentGroupRespVO" >
|
||||
SELECT
|
||||
tbspsa.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
||||
tcam.NAME AS configAssayMethodName,
|
||||
tcam.ASY_DEPT_ID AS assayDepartmentId,
|
||||
tcam.ASY_DEPT_NAME AS assayDepartmentName,
|
||||
COUNT(DISTINCT tbspsa.BSN_SB_PRN_SMP_ID) AS sampleCount
|
||||
t.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
||||
t.NAME AS configAssayMethodName,
|
||||
t.ASY_DEPT_ID AS assayDepartmentId,
|
||||
t.ASY_DEPT_NAME AS assayDepartmentName,
|
||||
COUNT(DISTINCT t.BSN_SB_PRN_SMP_ASMT_ID) AS sampleCount
|
||||
FROM
|
||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbspsa.CFG_ASY_MTHD_ID = tcam.ID
|
||||
WHERE
|
||||
tbspsa.DELETED = 0
|
||||
AND tbspsa.IS_RPOD = 0
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.assayDepartmentId} || '%'
|
||||
</if>
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tcam.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
(
|
||||
SELECT
|
||||
tbspsa.TENANT_ID ,
|
||||
tbssa.BSN_SB_PRN_SMP_ASMT_ID ,
|
||||
tbssa.CFG_ASY_MTHD_ID,
|
||||
tcam.NAME,
|
||||
tcam.ASY_DEPT_ID ,
|
||||
tcam.ASY_DEPT_NAME
|
||||
FROM
|
||||
T_BSN_SB_SMP_ASMT tbssa
|
||||
LEFT JOIN T_BSN_SB_PRN_SMP_ASMT tbspsa ON
|
||||
tbssa.BSN_SB_PRN_SMP_ASMT_ID = tbspsa.ID
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||
WHERE
|
||||
tbssa.DELETED = 0
|
||||
AND tbssa.RPOD_STS = 'reported'
|
||||
AND tbspsa.IS_RPOD = 0
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.assayDepartmentId} || '%'
|
||||
</if>
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tcam.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
GROUP BY
|
||||
tbspsa.TENANT_ID ,
|
||||
tbssa.BSN_SB_PRN_SMP_ASMT_ID ,
|
||||
tbssa.CFG_ASY_MTHD_ID ,
|
||||
tcam.NAME,
|
||||
tcam.ASY_DEPT_ID ,
|
||||
tcam.ASY_DEPT_NAME
|
||||
) t
|
||||
GROUP BY
|
||||
tbspsa.CFG_ASY_MTHD_ID,
|
||||
tcam.NAME,
|
||||
tcam.ASY_DEPT_ID ,
|
||||
tcam.ASY_DEPT_NAME
|
||||
t.CFG_ASY_MTHD_ID,
|
||||
t.NAME,
|
||||
t.ASY_DEPT_ID,
|
||||
t.ASY_DEPT_NAME
|
||||
</select>
|
||||
|
||||
<select id="selectNoReportSubParentSampleAssessment" resultType="com.zt.plat.module.qms.business.bus.controller.vo.NoReportSubParentSampleAssessmentRespVO" >
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<if test="param.warehouseCode != null and param.warehouseCode != ''">
|
||||
and wrh.CD = #{param.warehouseCode}
|
||||
</if>
|
||||
<if test="param.hideDispatchData != null and param.hideDispatchData == '1'">
|
||||
<if test="param.hideDispatchData != null and param.hideDispatchData == '1'.toString()">
|
||||
and not exists(
|
||||
select 1 from T_BSN_SMP_DST_DTL d left join T_BSN_SMP_DST m on d.PRN_ID = m.ID
|
||||
where d.BSN_SB_SMP_ID = smp.ID
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?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.ConfigWarehouseLocationInfomationMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -9,4 +9,58 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectListWithPermission" resultType="com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO">
|
||||
select
|
||||
t.id as id,
|
||||
t.PRN_ID as parentId,
|
||||
t.NAME as name,
|
||||
t.CD as code,
|
||||
t.SRT_NO as sortNo,
|
||||
t.CPY as capacity,
|
||||
t.MAIN_DEPT_ID as mainDepartmentId,
|
||||
t.MAIN_DEPT_NAME as mainDepartmentName,
|
||||
t.DAT_TP as dataType,
|
||||
t.WRH_TP as warehouseType,
|
||||
t.SYS_DEPT_CD as systemDepartmentCode,
|
||||
t.RMK as remark,
|
||||
t.PRNT_TMPL as printTemplate
|
||||
from T_CFG_WRH_LOC t
|
||||
<where>
|
||||
<if test="param.dataType != null and param.dataType != ''">
|
||||
and t.DAT_TP = #{param.dataType}
|
||||
</if>
|
||||
<if test="param.warehouseType != null and param.warehouseType != ''">
|
||||
and t.WRH_TP = #{param.warehouseType}
|
||||
</if>
|
||||
<if test="param.permissionFilterFlag != null and param.permissionFilterFlag != ''">
|
||||
and (
|
||||
<if test="param.roleIds != null and param.roleIds.size > 0">
|
||||
exists(
|
||||
select 1
|
||||
from T_CFG_PERM p
|
||||
where t.ID = p.SRC_ID
|
||||
and p.SRC_TP = #{param.srcPermissionType}
|
||||
and p.TGT_ID in (
|
||||
<foreach item="item" collection="param.roleIds" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
and p.TGT_TP = 'role'
|
||||
and p.DELETED = 0
|
||||
)
|
||||
or
|
||||
</if>
|
||||
not exists(
|
||||
select 1 from T_CFG_PERM p where t.ID = p.SRC_ID
|
||||
and p.SRC_TP = #{param.srcPermissionType}
|
||||
and p.DELETED = 0
|
||||
)
|
||||
)
|
||||
</if>
|
||||
and t.DELETED = 0
|
||||
|
||||
</where>
|
||||
order by t.SRT_NO asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user