Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
QMS模块。
|
||||
</description>
|
||||
<properties>
|
||||
<zzjc.tio.version>3.9.1.v20251013-RELEASE</zzjc.tio.version>
|
||||
<zzjc.tio.version>3.9.1.v20251204-RELEASE</zzjc.tio.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- Spring Cloud 基础 -->
|
||||
|
||||
@@ -110,6 +110,9 @@ public class BusinessSampleEntrustRegistrationController implements BusinessCont
|
||||
@GetMapping("/queryWaitingDataForReport")
|
||||
@Operation(summary = "查询待编制数据")
|
||||
public CommonResult<PageResult<BusinessSampleEntrustRegistrationExtendRespVO>> queryWaitingDataForReport(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO) {
|
||||
Long configReportTypeId = pageReqVO.getConfigReportTypeId();
|
||||
if(configReportTypeId == null)
|
||||
return CommonResult.error(0, "缺少configReportTypeId参数,请刷新后重试!");
|
||||
PageResult<BusinessSampleEntrustRegistrationExtendRespVO> result = businessSampleEntrustRegistrationService.queryWaitingDataForReport(pageReqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class SampleAnalysisAuditController implements BusinessControllerMarker {
|
||||
}
|
||||
|
||||
@GetMapping("/getSampleResultAssessmentList")
|
||||
public CommonResult<JSONObject> getSampleResultAssessmentList(Long configAssayMethodId, String asmtReportedStatus) {
|
||||
JSONObject result = sampleAnalysisAuditService.getSampleResultAssessmentList(configAssayMethodId, asmtReportedStatus);
|
||||
public CommonResult<JSONObject> getSampleResultAssessmentList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
JSONObject result = sampleAnalysisAuditService.getSampleResultAssessmentList(reqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,24 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowParam;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import com.zt.plat.module.qms.business.bus.service.SampleFlowService;
|
||||
import com.zt.plat.module.qms.core.sampleflow.SampleFlowDefinition;
|
||||
import com.zt.plat.module.qms.core.sampleflow.SampleFlowNode;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.error;
|
||||
|
||||
@Tag(name = "管理后台 - 样品流转")
|
||||
@RestController
|
||||
@@ -45,138 +36,22 @@ public class SampleFlowController implements BusinessControllerMarker {
|
||||
public CommonResult<?> sampleFlow(@Validated @RequestBody SampleFlowParam sampleFlowParam) {
|
||||
LiteflowResponse response = sampleFlowService.sampleFlow(sampleFlowParam);
|
||||
return success(response.getContextBean(SampleFlowContext.class));
|
||||
}
|
||||
|
||||
@GetMapping("/test")
|
||||
public CommonResult<?> test() {
|
||||
|
||||
SampleFlowDefinition sampleFlowDefinition = new SampleFlowDefinition();
|
||||
sampleFlowDefinition.setFlowKey("flw_sub_sample_process");
|
||||
sampleFlowDefinition.setFlowName("子样样品流转流程");
|
||||
List<SampleFlowNode> flowNodeList = new ArrayList<>();
|
||||
|
||||
SampleFlowNode zxr = new SampleFlowNode();
|
||||
zxr.setNodeName("中心收样");
|
||||
zxr.setNodeKey("flw_center_receive");
|
||||
zxr.setSort(3100);
|
||||
|
||||
SampleFlowNode zxs = new SampleFlowNode();
|
||||
zxs.setNodeName("中心送样");
|
||||
zxs.setNodeKey("flw_center_send");
|
||||
zxs.setSort(3200);
|
||||
|
||||
SampleFlowNode bzr = new SampleFlowNode();
|
||||
bzr.setNodeName("班组收样");
|
||||
bzr.setNodeKey("flw_team_receive");
|
||||
bzr.setSort(3300);
|
||||
|
||||
SampleFlowNode ypbm = new SampleFlowNode();
|
||||
ypbm.setNodeName("样品编密");
|
||||
ypbm.setNodeKey("flw_sample_encrypt");
|
||||
ypbm.setSort(3400);
|
||||
|
||||
// SampleFlowNode fxr = new SampleFlowNode();
|
||||
// fxr.setNodeName("分析收样");
|
||||
// fxr.setNodeKey("flw_analysis_receive");
|
||||
// fxr.setSort(3500);
|
||||
//
|
||||
SampleFlowNode fx = new SampleFlowNode();
|
||||
fx.setNodeName("样品分析");
|
||||
fx.setNodeKey("flw_analysis");
|
||||
fx.setSort(3550);
|
||||
//
|
||||
// SampleFlowNode fxs = new SampleFlowNode();
|
||||
// fxs.setNodeName("分析送样");
|
||||
// fxs.setNodeKey("flw_analysis_send");
|
||||
// fxs.setSort(3600);
|
||||
|
||||
SampleFlowNode bzs = new SampleFlowNode();
|
||||
bzs.setNodeName("班组送样");
|
||||
bzs.setNodeKey("flw_team_send");
|
||||
bzs.setSort(3700);
|
||||
|
||||
SampleFlowNode ypgk = new SampleFlowNode();
|
||||
ypgk.setNodeName("样品归库");
|
||||
ypgk.setNodeKey("flw_sample_storage");
|
||||
ypgk.setSort(3800);
|
||||
ypgk.setNextFlowNodeList(null);
|
||||
flowNodeList.add(ypgk);
|
||||
|
||||
|
||||
zxr.setNextFlowNodeList(new ArrayList<SampleFlowNode>() {
|
||||
{
|
||||
add(BeanUtils.toBean(zxs,SampleFlowNode.class).setIsDefault(true));
|
||||
}
|
||||
});
|
||||
flowNodeList.add(zxr);
|
||||
|
||||
|
||||
zxs.setNextFlowNodeList(new ArrayList<>() {{
|
||||
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setIsDefault(true));
|
||||
}});
|
||||
flowNodeList.add(zxs);
|
||||
|
||||
bzr.setNextFlowNodeList(new ArrayList<>() {{
|
||||
add(BeanUtils.toBean(ypbm,SampleFlowNode.class).setCondition("subSampleEncrypt"));//样品需要编密并且没编密过
|
||||
add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("subSampleNotEncrypt"));//样品无需编密或样品已编密过
|
||||
}});
|
||||
flowNodeList.add(bzr);
|
||||
|
||||
|
||||
ypbm.setNextFlowNodeList(new ArrayList<>() {{
|
||||
add(BeanUtils.toBean(fx,SampleFlowNode.class).setIsDefault(true));
|
||||
}});
|
||||
flowNodeList.add(ypbm);
|
||||
|
||||
|
||||
// fxr.setNextFlowNodeList(new ArrayList<>() {{
|
||||
// add(BeanUtils.toBean(fxs,SampleFlowNode.class).setIsDefault(true));
|
||||
// }});
|
||||
// flowNodeList.add(fxr);
|
||||
//
|
||||
//
|
||||
// fxs.setNextFlowNodeList(new ArrayList<>() {{
|
||||
// add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
||||
// }});
|
||||
// flowNodeList.add(fxs);
|
||||
|
||||
fx.setNextFlowNodeList(new ArrayList<>() {{
|
||||
add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
||||
}});
|
||||
flowNodeList.add(fx);
|
||||
|
||||
bzs.setNextFlowNodeList(new ArrayList<>() {{
|
||||
// add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("样品当前分析班组结果超差,需要发起复检"));
|
||||
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setCondition("subSampleSelfReportedOthersPending"));//当前部门数据已全部判断上报
|
||||
add(BeanUtils.toBean(ypgk,SampleFlowNode.class).setCondition("subSampleAlldeptAnalyzed"));//当前样品所有分析任务已全部上报完
|
||||
}});
|
||||
flowNodeList.add(bzs);
|
||||
|
||||
sampleFlowDefinition.setFlowNodeList(flowNodeList);
|
||||
|
||||
String jsonSampleFlowDefinition = JSON.toJSONString(sampleFlowDefinition);
|
||||
|
||||
System.out.println(jsonSampleFlowDefinition);
|
||||
|
||||
Long tenantId = TenantContextHolder.getRequiredTenantId();
|
||||
|
||||
List<SampleFlowInfo> sampleFlowInfoList = new ArrayList<>();
|
||||
sampleFlowInfoList.add(new SampleFlowInfo().setId(1967550576457330690L).setIsWeighing(0));
|
||||
|
||||
SampleFlowParam sampleFlowParam = new SampleFlowParam();
|
||||
sampleFlowParam.setSampleSourceType(2);
|
||||
sampleFlowParam.setCurrentSampleFlowKey("P3000");
|
||||
sampleFlowParam.setSampleFlowInfoList(sampleFlowInfoList);
|
||||
|
||||
|
||||
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("sampleFlowChain" + tenantId, sampleFlowParam, SampleFlowContext.class);
|
||||
if (response.isSuccess()) {
|
||||
return success(response.getContextBean(SampleFlowContext.class));
|
||||
} else {
|
||||
return error(1_032_100_000, response.getMessage());
|
||||
}
|
||||
//return success(FlowBus.getNodeMap());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 中心收样并送样
|
||||
* @param sampleFlowParam
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/centerReceiveAndSend")
|
||||
public CommonResult<?> centerReceiveAndSend(@Validated @RequestBody SampleFlowParam sampleFlowParam) {
|
||||
//中心收样
|
||||
sampleFlowParam.setCurrentSampleFlowKey(QmsCommonConstant.FLOW_NODE_CENTER_RECEIVE);
|
||||
LiteflowResponse response = sampleFlowService.sampleFlow(sampleFlowParam);
|
||||
//中心送样
|
||||
sampleFlowParam.setCurrentSampleFlowKey(QmsCommonConstant.FLOW_NODE_CENTER_SEND);
|
||||
sampleFlowParam.setSendSampleOper(null);
|
||||
response = sampleFlowService.sampleFlow(sampleFlowParam);
|
||||
return success(response.getContextBean(SampleFlowContext.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ public class SampleResultReportingController implements BusinessControllerMarker
|
||||
|
||||
//获取方法对应的样品
|
||||
@GetMapping("/getSampleResultReportingList")
|
||||
public CommonResult<?> getSampleResultReportingList(Long configAssayMethodId) {
|
||||
JSONObject result = sampleResultReportingService.getSampleResultReportingList(configAssayMethodId);
|
||||
public CommonResult<?> getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO) {
|
||||
JSONObject result = sampleResultReportingService.getSampleResultReportingList(reqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,13 @@ public class SampleTaskAssignController implements BusinessControllerMarker {
|
||||
List<AdminUserRespDTO> list = sampleTaskAssignService.getAssignUserList();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@Operation(description = "根据用户id获取用户信息")
|
||||
@GetMapping("/getUserInfoById")
|
||||
public CommonResult<?> getUserInfoById(Long userId) {
|
||||
AdminUserRespDTO userRespDTO = sampleTaskAssignService.getUserInfoById(userId);
|
||||
return success(userRespDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/getAssaySampleList")
|
||||
public CommonResult<?> getAssaySampleList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.core.sampleflow.SampleFlowDefinition;
|
||||
import com.zt.plat.module.qms.core.sampleflow.SampleFlowNode;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/qms/bus/test")
|
||||
public class TestController {
|
||||
|
||||
|
||||
@GetMapping("/testSampleFlow")
|
||||
public CommonResult<?> testSampleFlow() {
|
||||
|
||||
SampleFlowDefinition sampleFlowDefinition = new SampleFlowDefinition();
|
||||
sampleFlowDefinition.setFlowKey("flw_sub_sample_process");
|
||||
sampleFlowDefinition.setFlowName("子样样品流转流程");
|
||||
List<SampleFlowNode> flowNodeList = new ArrayList<>();
|
||||
|
||||
SampleFlowNode zxr = new SampleFlowNode();
|
||||
zxr.setNodeName("中心收样");
|
||||
zxr.setNodeKey("flw_center_receive");
|
||||
zxr.setSort(3100);
|
||||
|
||||
SampleFlowNode zxs = new SampleFlowNode();
|
||||
zxs.setNodeName("中心送样");
|
||||
zxs.setNodeKey("flw_center_send");
|
||||
zxs.setSort(3200);
|
||||
|
||||
SampleFlowNode bzr = new SampleFlowNode();
|
||||
bzr.setNodeName("班组收样");
|
||||
bzr.setNodeKey("flw_team_receive");
|
||||
bzr.setSort(3300);
|
||||
|
||||
SampleFlowNode ypbm = new SampleFlowNode();
|
||||
ypbm.setNodeName("样品编密");
|
||||
ypbm.setNodeKey("flw_sample_encrypt");
|
||||
ypbm.setSort(3400);
|
||||
|
||||
// SampleFlowNode fxr = new SampleFlowNode();
|
||||
// fxr.setNodeName("分析收样");
|
||||
// fxr.setNodeKey("flw_analysis_receive");
|
||||
// fxr.setSort(3500);
|
||||
//
|
||||
SampleFlowNode fx = new SampleFlowNode();
|
||||
fx.setNodeName("样品分析");
|
||||
fx.setNodeKey("flw_analysis");
|
||||
fx.setSort(3550);
|
||||
//
|
||||
// SampleFlowNode fxs = new SampleFlowNode();
|
||||
// fxs.setNodeName("分析送样");
|
||||
// fxs.setNodeKey("flw_analysis_send");
|
||||
// fxs.setSort(3600);
|
||||
|
||||
SampleFlowNode bzs = new SampleFlowNode();
|
||||
bzs.setNodeName("班组送样");
|
||||
bzs.setNodeKey("flw_team_send");
|
||||
bzs.setSort(3700);
|
||||
|
||||
SampleFlowNode ypgk = new SampleFlowNode();
|
||||
ypgk.setNodeName("样品归库");
|
||||
ypgk.setNodeKey("flw_sample_storage");
|
||||
ypgk.setSort(3800);
|
||||
ypgk.setNextFlowNodeList(null);
|
||||
flowNodeList.add(ypgk);
|
||||
|
||||
|
||||
zxr.setNextFlowNodeList(new ArrayList<SampleFlowNode>() {
|
||||
private static final long serialVersionUID = 6146393613606839512L;
|
||||
|
||||
{
|
||||
add(BeanUtils.toBean(zxs,SampleFlowNode.class).setIsDefault(true));
|
||||
}
|
||||
});
|
||||
flowNodeList.add(zxr);
|
||||
|
||||
|
||||
zxs.setNextFlowNodeList(new ArrayList<>() {
|
||||
private static final long serialVersionUID = 5357543125760924047L;
|
||||
|
||||
{
|
||||
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setIsDefault(true));
|
||||
}});
|
||||
flowNodeList.add(zxs);
|
||||
|
||||
bzr.setNextFlowNodeList(new ArrayList<>() {
|
||||
private static final long serialVersionUID = 6376704859477839016L;
|
||||
|
||||
{
|
||||
add(BeanUtils.toBean(ypbm,SampleFlowNode.class).setCondition("subSampleEncrypt"));//样品需要编密并且没编密过
|
||||
add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("subSampleNotEncrypt"));//样品无需编密或样品已编密过
|
||||
}});
|
||||
flowNodeList.add(bzr);
|
||||
|
||||
|
||||
ypbm.setNextFlowNodeList(new ArrayList<>() {
|
||||
private static final long serialVersionUID = 1014984817516902869L;
|
||||
|
||||
{
|
||||
add(BeanUtils.toBean(fx,SampleFlowNode.class).setIsDefault(true));
|
||||
}});
|
||||
flowNodeList.add(ypbm);
|
||||
|
||||
|
||||
// fxr.setNextFlowNodeList(new ArrayList<>() {{
|
||||
// add(BeanUtils.toBean(fxs,SampleFlowNode.class).setIsDefault(true));
|
||||
// }});
|
||||
// flowNodeList.add(fxr);
|
||||
//
|
||||
//
|
||||
// fxs.setNextFlowNodeList(new ArrayList<>() {{
|
||||
// add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
||||
// }});
|
||||
// flowNodeList.add(fxs);
|
||||
|
||||
fx.setNextFlowNodeList(new ArrayList<>() {
|
||||
private static final long serialVersionUID = -610440034210287957L;
|
||||
|
||||
{
|
||||
add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
||||
}});
|
||||
flowNodeList.add(fx);
|
||||
|
||||
bzs.setNextFlowNodeList(new ArrayList<>() {
|
||||
private static final long serialVersionUID = -5057434004685743838L;
|
||||
|
||||
{
|
||||
// add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("样品当前分析班组结果超差,需要发起复检"));
|
||||
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setCondition("subSampleSelfReportedOthersPending"));//当前部门数据已全部判断上报
|
||||
add(BeanUtils.toBean(ypgk,SampleFlowNode.class).setCondition("subSampleAlldeptAnalyzed"));//当前样品所有分析任务已全部上报完
|
||||
}});
|
||||
flowNodeList.add(bzs);
|
||||
|
||||
sampleFlowDefinition.setFlowNodeList(flowNodeList);
|
||||
|
||||
String jsonSampleFlowDefinition = JSON.toJSONString(sampleFlowDefinition);
|
||||
|
||||
System.out.println(jsonSampleFlowDefinition);
|
||||
|
||||
return success(jsonSampleFlowDefinition);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -105,4 +105,19 @@ public class BusinessAssayTaskDataReqVO {
|
||||
@Schema(description = "样品状态")
|
||||
private String sampleStatus;
|
||||
|
||||
@Schema(description = "检测方法配置名称")
|
||||
private String configAssayMethodName;
|
||||
|
||||
@Schema(description = "收样时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] sampleReceiveTime;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "分析编号")
|
||||
private String sampleAssayCode;
|
||||
|
||||
@Schema(description = "归库编号")
|
||||
private String sampleReturnCode;
|
||||
}
|
||||
@@ -100,10 +100,10 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
|
||||
@Schema(description = "签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
|
||||
@@ -99,10 +99,10 @@ public class BusinessAssayTaskReqVO {
|
||||
@Schema(description = "签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
|
||||
@Schema(description = "管理后台 - 检测任务分配业务 Response VO")
|
||||
@Data
|
||||
@@ -116,12 +117,13 @@ public class BusinessAssayTaskRespVO {
|
||||
@ExcelProperty("签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
||||
@ExcelProperty("完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved")
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||
@ExcelProperty("完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
||||
@ExcelProperty("流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved")
|
||||
@Dict(dicCode = "flow_status")
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||
@ExcelProperty("流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
|
||||
@@ -102,10 +102,10 @@ public class BusinessAssayTaskSaveReqVO {
|
||||
@Schema(description = "签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
||||
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
||||
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
|
||||
@@ -64,5 +64,16 @@ public class BusinessHandoverRecordSubPageReqVO extends PageParam {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//==============扩展字段================
|
||||
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "分析编号")
|
||||
private String sampleAssayCode;
|
||||
|
||||
@Schema(description = "归库编号")
|
||||
private String sampleReturnCode;
|
||||
|
||||
@Schema(description = "样品名称")
|
||||
private String sampleName;
|
||||
}
|
||||
@@ -17,6 +17,11 @@ import lombok.Data;
|
||||
@Data
|
||||
public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntrustDetailRespVO {
|
||||
|
||||
/**
|
||||
* 样品类型key
|
||||
*/
|
||||
private String sampleTypeDictionaryBusinessKey;
|
||||
|
||||
/** 样品大类名称 **/
|
||||
private String baseSampleName;
|
||||
|
||||
|
||||
@@ -156,4 +156,7 @@ public class BusinessSampleEntrustRegistrationPageReqVO extends PageParam {
|
||||
//====================扩展字段======================
|
||||
@Schema(description = "委托来源名称")
|
||||
private String configEntrustSourceName;
|
||||
|
||||
@Schema(description = "报表配置id")
|
||||
private Long configReportTypeId;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
|
||||
@Schema(description = "管理后台 - 委检登记业务 Response VO")
|
||||
@Data
|
||||
@@ -144,10 +145,12 @@ public class BusinessSampleEntrustRegistrationRespVO {
|
||||
@ExcelProperty("数据校验状态,success-数据校验成功、fail-数据校验失败")
|
||||
private String dataCheckStatus;
|
||||
|
||||
@Dict(dicCode = "entrust_assay_status")
|
||||
@Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "2")
|
||||
@ExcelProperty("检验状态,unchecked-未检验;checked-已检验")
|
||||
private String assayStatus;
|
||||
|
||||
@Dict(dicCode = "entrust_data_status")
|
||||
@Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "1")
|
||||
@ExcelProperty("数据回报状态,unreturned-未回报;returned-已回报")
|
||||
private String dataStatus;
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -17,4 +23,8 @@ public class BusinessSubParentSampleAssessmentGroupReqVO {
|
||||
|
||||
@Schema(description = "分析部门名称")
|
||||
private String assayDepartmentName;
|
||||
|
||||
@Schema(description = "收样时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] sampleReceiveTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -22,4 +24,7 @@ public class NoReportSubParentSampleAssessmentRespVO {
|
||||
private String taskType;
|
||||
|
||||
private String assayType;
|
||||
|
||||
|
||||
private LocalDateTime sampleReceiveTime;
|
||||
}
|
||||
|
||||
@@ -160,12 +160,12 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
||||
@TableField("DOC_SIG")
|
||||
private String documentSignature;
|
||||
/**
|
||||
* 完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved
|
||||
* 完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed
|
||||
*/
|
||||
@TableField("FIN_STS")
|
||||
private String finishStatus;
|
||||
/**
|
||||
* 流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved
|
||||
* 流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed
|
||||
*/
|
||||
@TableField("FLW_STS")
|
||||
private String flowStatus;
|
||||
|
||||
@@ -136,7 +136,7 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
if (ObjectUtil.isNotEmpty(reqVO.getSampleStatus())) {
|
||||
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus());
|
||||
}
|
||||
mpjLambdaWrapper.orderByDesc(BusinessAssayTaskDataDO::getId);
|
||||
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getSampleFlowNodeTime);
|
||||
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
if (ObjectUtil.isNotEmpty(reqVO.getSampleStatus())) {
|
||||
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus());
|
||||
}
|
||||
mpjLambdaWrapper.orderByDesc(BusinessAssayTaskDataDO::getId);
|
||||
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getSampleFlowNodeTime);
|
||||
return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
|
||||
}
|
||||
|
||||
@@ -302,6 +302,9 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(reqVO.getSampleReceiveTime()) && reqVO.getSampleReceiveTime().length == 2) {
|
||||
mpjLambdaWrapper.between(BusinessSubSampleAnalysisGroupDO::getSampleReceiveTime, reqVO.getSampleReceiveTime()[0], reqVO.getSampleReceiveTime()[1]);
|
||||
}
|
||||
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, "已收样");//已收样
|
||||
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getBusinessSubSampleId).orderByAsc(BusinessAssayTaskDataDO::getReportTime);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface BusinessAssayTaskDetailMapper extends BaseMapperX<BusinessAssay
|
||||
.eqIfPresent(BusinessAssayTaskDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayTaskDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayTaskDetailDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessAssayTaskDetailDO::getId));
|
||||
.orderByAsc(BusinessAssayTaskDetailDO::getSampleCode));
|
||||
}
|
||||
|
||||
default List<BusinessAssayTaskDetailExtendRespVO> selectList(BusinessAssayTaskDetailReqVO reqVO) {
|
||||
@@ -80,7 +80,7 @@ public interface BusinessAssayTaskDetailMapper extends BaseMapperX<BusinessAssay
|
||||
.eqIfPresent(BusinessAssayTaskDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayTaskDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayTaskDetailDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessAssayTaskDetailDO::getId));
|
||||
.orderByAsc(BusinessAssayTaskDetailDO::getSampleCode));
|
||||
}
|
||||
|
||||
default List<BusinessAssayTaskDetailDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {
|
||||
|
||||
@@ -47,7 +47,10 @@ public interface BusinessHandoverRecordSubMapper extends BaseMapperX<BusinessHan
|
||||
.eqIfPresent(BusinessHandoverRecordSubDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessHandoverRecordSubDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessHandoverRecordSubDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(BusinessHandoverRecordSubDO::getDeptId, reqVO.getDeptId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleAssayCode, reqVO.getSampleAssayCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleReturnCode, reqVO.getSampleReturnCode())
|
||||
.likeIfPresent(BusinessSubSampleDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessHandoverRecordSubDO::getDeptId, reqVO.getDeptId())
|
||||
.orderByDesc(BusinessHandoverRecordSubDO::getCreateTime));
|
||||
}
|
||||
|
||||
|
||||
@@ -83,10 +83,26 @@ public interface BusinessSampleEntrustDetailMapper extends BaseMapperX<BusinessS
|
||||
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
|
||||
}
|
||||
|
||||
default List<BusinessSampleEntrustDetailExtendRespVO> selectExtendByBusinessSampleEntrustRegistrationId(Long businessSampleEntrustRegistrationId) {
|
||||
return selectJoinList(BusinessSampleEntrustDetailExtendRespVO.class, new MPJLambdaWrapperX<BusinessSampleEntrustDetailDO>()
|
||||
.leftJoin(BaseSampleDO.class, BaseSampleDO::getId, BusinessSampleEntrustDetailDO::getBaseSampleId)
|
||||
.selectAll(BusinessSampleEntrustDetailDO.class)
|
||||
.selectAs(BaseSampleDO::getDictionaryBusinessKey, BusinessSampleEntrustDetailExtendRespVO::getSampleTypeDictionaryBusinessKey)
|
||||
.eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
|
||||
}
|
||||
|
||||
default List<BusinessSampleEntrustDetailDO> selectByBusinessSampleEntrustRegistrationIds(List<Long> businessSampleEntrustRegistrationIds) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().in(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationIds));
|
||||
}
|
||||
|
||||
default BusinessSampleEntrustDetailDO selectByBusinessBaseSampleId(Long businessBaseSampleId) {
|
||||
return selectOne(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, businessBaseSampleId));
|
||||
}
|
||||
|
||||
default List<BusinessSampleEntrustDetailDO> selectByBusinessBaseSampleIds(List<Long> businessBaseSampleIds) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().in(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, businessBaseSampleIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前批次的第一条数据
|
||||
* @param businessBaseSampleId 任意一条的主样id
|
||||
|
||||
@@ -36,6 +36,12 @@ public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<Bus
|
||||
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSubParentSampleAssessmentDO::getId));
|
||||
}
|
||||
|
||||
default List<BusinessSubParentSampleAssessmentDO> selectByBusinessSubParentSampleIds(List<Long> businessSubParentSampleIds) {
|
||||
return selectJoinList(BusinessSubParentSampleAssessmentDO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentDO>()
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId)
|
||||
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds));
|
||||
}
|
||||
|
||||
default BusinessSubParentSampleAssessmentDO selectByBusinessSubParentSampleIdAndConfigAssayMethodId(Long businessSubParentSampleId, Long configAssayMethodId) {
|
||||
return selectOne(new LambdaQueryWrapperX<BusinessSubParentSampleAssessmentDO>()
|
||||
|
||||
@@ -69,7 +69,7 @@ public interface BusinessSubParentSampleAssessmentProjectMapper extends BaseMapp
|
||||
.eq(BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodId, configAssayMethodId));
|
||||
}
|
||||
|
||||
List<NoReportSubParentSampleAssessmentRespVO> selectNoReportSubParentSampleAssessment(@Param("configAssayMethodId") Long configAssayMethodId);
|
||||
List<NoReportSubParentSampleAssessmentRespVO> selectNoReportSubParentSampleAssessment(@Param("reqVO") BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
||||
|
||||
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(@Param("baseSampleId") Long baseSampleId, @Param("businessSubParentSampleId") Long businessSubParentSampleId, @Param("configAssayMethodId") Long configAssayMethodId);
|
||||
|
||||
|
||||
@@ -45,5 +45,10 @@ public interface BusinessSubParentSampleMapper extends BaseMapperX<BusinessSubPa
|
||||
return selectList(new LambdaQueryWrapperX<BusinessSubParentSampleDO>()
|
||||
.eq(BusinessSubParentSampleDO::getBusinessBaseSampleId, businessBaseSampleId));
|
||||
}
|
||||
|
||||
default List<BusinessSubParentSampleDO> selectByBusinessBaseSampleIds(List<Long> businessBaseSampleIds) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessSubParentSampleDO>()
|
||||
.in(BusinessSubParentSampleDO::getBusinessBaseSampleId, businessBaseSampleIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -144,8 +144,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
||||
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
|
||||
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
|
||||
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getAssayDepartmentStatus())
|
||||
.orderByAsc(BusinessSubSampleDO::getSampleCode)
|
||||
);
|
||||
.orderByDesc(BusinessSubSampleDO::getSampleFlowNodeTime).orderByAsc(BusinessSubSampleDO::getSampleCode));
|
||||
}
|
||||
|
||||
default List<BusinessSubSampleExtendRespVO> selectList(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
|
||||
@@ -407,7 +407,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
|
||||
//子样对应的分析班组
|
||||
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = null;
|
||||
|
||||
|
||||
for (Long configAssayMethodId : materialAssayStandardConfigAssayMethodIdList) {
|
||||
//查询分析方法
|
||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodList.stream().filter(f -> f.getId().equals(configAssayMethodId)).findFirst().orElse(null);
|
||||
@@ -578,8 +578,10 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||
|
||||
if (assayProjectBuilder.length() > 1) {
|
||||
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||
}
|
||||
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
|
||||
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||
}
|
||||
@@ -590,6 +592,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
sampleEntrustRegistration.setRegistrationStatus(QmsCommonConstant.SUBMITTED);
|
||||
sampleEntrustRegistration.setAssayStatus(QmsCommonConstant.UNCHECKED);
|
||||
sampleEntrustRegistration.setDataStatus(QmsCommonConstant.UNRETURNED);
|
||||
sampleEntrustRegistration.setTaskQuantity(businessAssayTaskDataDOList.size());
|
||||
|
||||
sampleEntrustContext.setSampleFlowInfoList(sampleFlowInfoList);
|
||||
|
||||
@@ -622,7 +625,6 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
businessSubSampleAssessmentMapper.insertBatch(businessSubSampleAssessmentDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
|
||||
sampleEntrustRegistration.setTaskQuantity(businessAssayTaskDataDOList.size());
|
||||
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
|
||||
@@ -758,8 +760,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||
}
|
||||
}
|
||||
|
||||
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||
if (assayProjectBuilder.length() > 1) {
|
||||
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||
}
|
||||
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
|
||||
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
|
||||
DefaultContext<String, Object> context = new DefaultContext<>();
|
||||
ConfigSubSampleDO configSubSample = sampleFlowContext.getConfigSubSampleById(businessSubSample.getConfigSubSampleId());
|
||||
Boolean hasSubSimpleCodeRule = configSubSample != null && StringUtils.isNotBlank(configSubSample.getSimpleCodeRule());
|
||||
Boolean hasSubSampleEncrypt = businessHandoverRecordSubDOList.stream().anyMatch(m -> QmsCommonConstant.FlOW_NODE_SAMPLE_ENCRYPT.equals(m.getSampleFlowNodeKey()));
|
||||
Boolean hasSubSampleEncrypt = businessHandoverRecordSubDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSample.getId())).anyMatch(m -> QmsCommonConstant.FlOW_NODE_SAMPLE_ENCRYPT.equals(m.getSampleFlowNodeKey()));
|
||||
|
||||
if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupDOList)) {
|
||||
List<BusinessSubSampleAnalysisGroupDO> curSubSampleAnalysisGroupDOList = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSample.getId())).collect(Collectors.toList());
|
||||
|
||||
@@ -242,6 +242,9 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
BusinessSubSampleExtendRespVO subSample = null;
|
||||
if (QmsCommonConstant.FLOW_NODE_TEAM_RECEIVE.equals(reqVO.getSampleFlowNodeKey())) {
|
||||
subSample = businessSubSampleMapper.getBySampleCode(reqVO);
|
||||
if (subSample == null) {
|
||||
return subSample;
|
||||
}
|
||||
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleId(subSample.getId());
|
||||
BusinessSubSampleAnalysisGroupDO receiveSample = businessSubSampleAnalysisGroupList.stream().filter(f -> "已收样".equals(f.getSampleStatus()) && !f.getAssayDepartmentId().equals(loginUser.getVisitDeptId())).findFirst().orElse(null);
|
||||
if (receiveSample != null) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.qms.business.bus.service;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataReqVO;
|
||||
|
||||
/**
|
||||
* <b>SampleAnalysisAuditService</b>
|
||||
@@ -13,7 +14,7 @@ public interface SampleAnalysisAuditService {
|
||||
|
||||
void crossAuditByByTaskId(Long businessAssayTaskId, String auditStatus);
|
||||
|
||||
JSONObject getSampleResultAssessmentList(Long configAssayMethodId, String asmtReportedStatus);
|
||||
JSONObject getSampleResultAssessmentList(BusinessAssayTaskDataReqVO reqVO);
|
||||
|
||||
JSONObject getParallelResultAssessment(Long businessSubSampleId, Long configAssayMethodId);
|
||||
|
||||
|
||||
@@ -152,7 +152,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||
|
||||
@Override
|
||||
public JSONObject getSampleResultAssessmentList(Long configAssayMethodId, String asmtReportedStatus) {
|
||||
public JSONObject getSampleResultAssessmentList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
Long configAssayMethodId = reqVO.getConfigAssayMethodId();
|
||||
String asmtReportedStatus = reqVO.getAsmtReportedStatus();
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
||||
List<Map<String, Object>> columnList = new ArrayList<>();
|
||||
|
||||
@@ -173,6 +175,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
BusinessAssayTaskDataReqVO search = new BusinessAssayTaskDataReqVO();
|
||||
search.setConfigAssayMethodId(configAssayMethodId);
|
||||
search.setAsmtReportedStatus(asmtReportedStatus);
|
||||
search.setSampleReceiveTime(reqVO.getSampleReceiveTime());
|
||||
List<BusinessAssayTaskDataExtendRespVO> resultAssessmentList = businessAssayTaskDataMapper.selectResultAssessmentList(search);
|
||||
|
||||
for (BusinessAssayTaskDataExtendRespVO businessAssayTaskDataExtendRespVO : resultAssessmentList) {
|
||||
@@ -327,6 +330,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
|
||||
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
|
||||
map.put("analysisType", "analysis");
|
||||
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||
|
||||
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
|
||||
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
|
||||
@@ -362,6 +366,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
map.put("sampleCode", businessQCManagementData.getSampleCode());
|
||||
map.put("sampleName", businessQCManagementData.getSampleName());
|
||||
map.put("analysisType", businessQCManagementData.getDictionaryBusinessKey());
|
||||
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||
|
||||
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
|
||||
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
||||
@@ -395,6 +400,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
map.put("sampleCode", businessQCCoefficientData.getSampleCode());
|
||||
map.put("sampleName", businessQCCoefficientData.getSampleName());
|
||||
map.put("analysisType", businessQCCoefficientData.getDictionaryBusinessKey());
|
||||
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
|
||||
|
||||
BusinessQCCoefficientParameterDataReqVO parameterDataSearch2 = new BusinessQCCoefficientParameterDataReqVO();
|
||||
parameterDataSearch2.setBusinessQCCoefficientDataId(businessQCCoefficientData.getId());
|
||||
@@ -436,8 +442,8 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
|
||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||
if (QmsCommonConstant.APPROVE.equals(auditStatus)) {
|
||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.APPROVED);
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.APPROVED);
|
||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.COMPLETED);
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.COMPLETED);
|
||||
businessAssayTaskDO.setReportTime(LocalDateTime.now());
|
||||
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
|
||||
businessAssayTaskDO.setReportOperatorId(SecurityFrameworkUtils.getLoginUserId());
|
||||
@@ -640,8 +646,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
|
||||
|
||||
} else {
|
||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SAVED);
|
||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.PENDING);
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.NOT_START);
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.RETURNED);
|
||||
}
|
||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||
if (businessSubParentSampleAssessmentProject == null || StringUtils.isBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||
}
|
||||
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是委检样
|
||||
@@ -670,7 +670,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||
if (businessSubParentSampleAssessmentProject == null || StringUtils.isBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||
}
|
||||
}
|
||||
@@ -1098,8 +1098,8 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SUBMITTED);
|
||||
businessAssayTaskDO.setAssaySubmitTime(LocalDateTime.now());
|
||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.NOT_START);
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.NOT_START);
|
||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.IN_PROGRESS);
|
||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.IN_PROGRESS);
|
||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -114,21 +115,22 @@ public class SampleEntrustServiceImpl implements SampleEntrustService {
|
||||
sampleEntrustRegistration.put(key, value);
|
||||
});
|
||||
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
jsonArray.add(sampleEntrustRegistration);
|
||||
|
||||
List<BusinessSampleEntrustDetailExtendRespVO> sampleEntrustDetailExtendRespVOList = new ArrayList<>();
|
||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectByBusinessSampleEntrustRegistrationId(id);
|
||||
BusinessSampleEntrustDetailExtendRespVO businessSampleEntrustDetailExtendRespVO = null;
|
||||
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailList) {
|
||||
businessSampleEntrustDetailExtendRespVO = BeanUtils.toBean(businessSampleEntrustDetailDO, BusinessSampleEntrustDetailExtendRespVO.class);
|
||||
|
||||
List<BusinessSampleEntrustProjectExtendRespVO> businessSampleEntrustProjectExtendRespVOList = businessSampleEntrustProjectMapper.selectByBusinessSampleEntrustDetailId(businessSampleEntrustDetailDO.getId());
|
||||
List<BusinessSampleEntrustDetailExtendRespVO> sampleEntrustDetailExtendRespVOList = businessSampleEntrustDetailMapper.selectExtendByBusinessSampleEntrustRegistrationId(id);
|
||||
for (BusinessSampleEntrustDetailExtendRespVO businessSampleEntrustDetailExtendRespVO : sampleEntrustDetailExtendRespVOList) {
|
||||
List<BusinessSampleEntrustProjectExtendRespVO> businessSampleEntrustProjectExtendRespVOList = businessSampleEntrustProjectMapper.selectByBusinessSampleEntrustDetailId(businessSampleEntrustDetailExtendRespVO.getId());
|
||||
|
||||
businessSampleEntrustDetailExtendRespVO.setSampleEntrustDetailProjectList(businessSampleEntrustProjectExtendRespVOList);
|
||||
|
||||
sampleEntrustDetailExtendRespVOList.add(businessSampleEntrustDetailExtendRespVO);
|
||||
}
|
||||
//样品类型分组统计
|
||||
Map<String, Long> groupMap = sampleEntrustDetailExtendRespVOList.stream().collect(Collectors.groupingBy(BusinessSampleEntrustDetailExtendRespVO::getSampleTypeDictionaryBusinessKey, Collectors.counting()));
|
||||
for (Map.Entry<String, Long> entry : groupMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Long val = entry.getValue();
|
||||
sampleEntrustRegistration.put(key + "Count", val);
|
||||
}
|
||||
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
jsonArray.add(sampleEntrustRegistration);
|
||||
|
||||
String sampleEntrustDetailJsonString = JSON.toJSONString(sampleEntrustDetailExtendRespVOList, context);
|
||||
result.put("sampleEntrustRegistration", jsonArray);
|
||||
@@ -250,6 +252,7 @@ public class SampleEntrustServiceImpl implements SampleEntrustService {
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("sampleEntrustSubmitChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class);
|
||||
if (!response.isSuccess()){
|
||||
log.error("提交委托登记失败", response.getCause());
|
||||
response.getCause().printStackTrace();
|
||||
throw new ServiceException(1_032_100_000, response.getCause().getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface SampleResultReportingService {
|
||||
|
||||
List<BusinessSubParentSampleAssessmentGroupRespVO> getUnReportMethodGroupList(BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
||||
|
||||
JSONObject getSampleResultReportingList(Long configAssayMethodId);
|
||||
JSONObject getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
||||
|
||||
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(Long baseSampleId, Long businessSubParentSampleId, Long configAssayMethodId);
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDa
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentProjectDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||
@@ -48,6 +50,8 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMa
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayReportDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
||||
@@ -111,8 +115,8 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getSampleResultReportingList(Long configAssayMethodId) {
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
||||
public JSONObject getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO) {
|
||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(reqVO.getConfigAssayMethodId());
|
||||
List<Map<String, Object>> columnList = new ArrayList<>();
|
||||
|
||||
//动态字段
|
||||
@@ -132,7 +136,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
|
||||
//查询结果报送未上报的样品
|
||||
List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(configAssayMethodId);
|
||||
List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(reqVO);
|
||||
|
||||
if (CollUtil.isEmpty(noReportSubParentSampleAssessmentRespList)) {//没有查询到未上报的数据
|
||||
JSONObject json = new JSONObject();
|
||||
@@ -144,18 +148,18 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
//分样id列表
|
||||
List<Long> businessSubParentSampleIds = noReportSubParentSampleAssessmentRespList.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList());
|
||||
//报送的检测项目数据
|
||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||
//获取分析任务数
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||
List<Long> businessSubSampleIds = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
||||
//获取子样数据
|
||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIds);
|
||||
|
||||
//获取结果判定数据
|
||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendRespVOList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendRespVOList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||
|
||||
//获取复测业务数据
|
||||
List<BusinessSubSampleParentRecheckDO> businessSubSampleParentRecheckDOList = businessSubSampleParentRecheckMapper.selectByRecheckBusinessSubParentSampleIdsAndRecheckConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
||||
List<BusinessSubSampleParentRecheckDO> businessSubSampleParentRecheckDOList = businessSubSampleParentRecheckMapper.selectByRecheckBusinessSubParentSampleIdsAndRecheckConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||
|
||||
//循环未上报的样品
|
||||
for (NoReportSubParentSampleAssessmentRespVO noReportSubParentSampleAssessmentRespVO : noReportSubParentSampleAssessmentRespList) {
|
||||
@@ -166,6 +170,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
Map<String, Object> subSampleAssessmentBeforeMap = BeanUtil.copyProperties(noReportSubParentSampleAssessmentMap, Map.class);
|
||||
Map<String, Object> subSampleAssessmentMap = BeanUtil.copyProperties(noReportSubParentSampleAssessmentMap, Map.class);
|
||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> curBusinessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(noReportSubParentSampleAssessmentRespVO.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||
noReportSubParentSampleAssessmentMap.put("sampleReceiveTime", noReportSubParentSampleAssessmentRespVO.getSampleReceiveTime());
|
||||
noReportSubParentSampleAssessmentMap.put("configAssayMethodName", "报出结果");
|
||||
StringBuilder businessSubParentSampleAssessmentIds = new StringBuilder();
|
||||
for (BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentDO : curBusinessSubParentSampleAssessmentDOList) {
|
||||
@@ -183,6 +188,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendBeforeList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubSampleParentRecheckDO.getBusinessSubParentSampleId(), businessSubSampleParentRecheckDO.getConfigAssayMethodId());
|
||||
StringBuilder businessSubSampleAssessmentIdsBefore = new StringBuilder();
|
||||
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessmentProjectExtendRespVO : businessSubSampleAssessmentExtendBeforeList) {
|
||||
subSampleAssessmentBeforeMap.put("sampleReceiveTime", noReportSubParentSampleAssessmentRespVO.getSampleReceiveTime());
|
||||
subSampleAssessmentBeforeMap.put("configAssayMethodName", businessSubSampleAssessmentProjectExtendRespVO.getConfigAssayMethodName());
|
||||
subSampleAssessmentBeforeMap.put(businessSubSampleAssessmentProjectExtendRespVO.getSimpleName(), businessSubSampleAssessmentProjectExtendRespVO.getAssessmentValue());
|
||||
businessSubSampleAssessmentIdsBefore.append(businessSubSampleAssessmentProjectExtendRespVO.getId()).append(",");
|
||||
@@ -198,6 +204,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentList = businessSubSampleAssessmentExtendRespVOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(noReportSubParentSampleAssessmentRespVO.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||
StringBuilder businessSubSampleAssessmentIds = new StringBuilder();
|
||||
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessmentProjectExtendRespVO : businessSubSampleAssessmentList) {
|
||||
subSampleAssessmentMap.put("sampleReceiveTime", noReportSubParentSampleAssessmentRespVO.getSampleReceiveTime());
|
||||
subSampleAssessmentMap.put("configAssayMethodName", businessSubSampleAssessmentProjectExtendRespVO.getConfigAssayMethodName());
|
||||
subSampleAssessmentMap.put(businessSubSampleAssessmentProjectExtendRespVO.getSimpleName(), businessSubSampleAssessmentProjectExtendRespVO.getAssessmentValue());
|
||||
businessSubSampleAssessmentIds.append(businessSubSampleAssessmentProjectExtendRespVO.getId()).append(",");
|
||||
@@ -422,6 +429,12 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
|
||||
@Resource
|
||||
private BusinessSubParentSampleAssessmentMapper businessSubParentSampleAssessmentMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper;
|
||||
|
||||
@Resource
|
||||
private SampleFlowService sampleFlowService;
|
||||
@@ -432,7 +445,8 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
|
||||
//当前登录用户昵称
|
||||
String nickName = SecurityFrameworkUtils.getLoginUserNickname();
|
||||
|
||||
|
||||
List<BusinessSampleEntrustRegistrationDO> updatebBusinessSampleEntrustRegistrationDOList = new ArrayList<>();
|
||||
List<BusinessSubSampleDO> updateBusinessSubSampleDOList = new ArrayList<>();
|
||||
List<BusinessSubSampleAnalysisGroupDO> updateBusinessSubSampleAnalysisGroupDOList = new ArrayList<>();
|
||||
|
||||
@@ -535,36 +549,6 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
//处理子样分析任务数据
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(reqVO.getBusinessSubParentSampleIds(), reqVO.getConfigAssayMethodId());
|
||||
List<Long> businessSubSampleIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
||||
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupDOList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubParentSampleIds(reqVO.getBusinessSubParentSampleIds());
|
||||
//根据子样id进行分组
|
||||
Map<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMap = businessAssayTaskDataDOList.stream().collect(Collectors.groupingBy(BusinessAssayTaskDataDO::getBusinessSubSampleId));
|
||||
for (Map.Entry<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOEntry : businessAssayTaskDataDOMap.entrySet()) {
|
||||
Long businessSubSampleId = businessAssayTaskDataDOEntry.getKey();
|
||||
//子样下的分析任务
|
||||
List<BusinessAssayTaskDataDO> valList = businessAssayTaskDataDOEntry.getValue();
|
||||
//查询子样
|
||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> businessSubSampleId.equals(f.getId())).findFirst().orElse(null);
|
||||
//查询子样下的分析班组
|
||||
List<BusinessSubSampleAnalysisGroupDO> subSampleAnalysisGroupList = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleId)).collect(Collectors.toList());
|
||||
for (BusinessSubSampleAnalysisGroupDO subSampleAnalysisGroupDO : subSampleAnalysisGroupList) {
|
||||
long count = valList.stream().filter(f -> f.getIsReported().equals(QmsCommonConstant.NO) && f.getAssayDepartmentId().equals(subSampleAnalysisGroupDO.getAssayDepartmentId())).count();
|
||||
if (count > 0) {//如果还存在未上报的数据,则继续
|
||||
continue;
|
||||
}
|
||||
subSampleAnalysisGroupDO.setSampleStatus("已完成");//当前班组分析已完成
|
||||
updateBusinessSubSampleAnalysisGroupDOList.add(subSampleAnalysisGroupDO);
|
||||
|
||||
updateBusinessSubSampleDOList.add(businessSubSampleDO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
**/
|
||||
//分析方法信息
|
||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(reqVO.getConfigAssayMethodId());
|
||||
//查询当前分析部门下的分样判定信息
|
||||
@@ -584,6 +568,28 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
updateBusinessSubSampleDOList.add(businessSubSampleDO);
|
||||
}
|
||||
|
||||
//处理委托登记信息
|
||||
List<Long> businessBaseSampleIdList = businessSubParentSampleDOList.stream().map(m -> m.getBusinessBaseSampleId()).distinct().collect(Collectors.toList());
|
||||
|
||||
List<BusinessSampleEntrustDetailDO> businessSampleEntrustDetailDOList = businessSampleEntrustDetailMapper.selectByBusinessBaseSampleIds(businessBaseSampleIdList);
|
||||
List<Long> businessSampleEntrustRegistrationIdList = businessSampleEntrustDetailDOList.stream().map(m -> m.getBusinessSampleEntrustRegistrationId()).distinct().collect(Collectors.toList());
|
||||
|
||||
List<BusinessSampleEntrustRegistrationDO> businessSampleEntrustRegistrationDOList = businessSampleEntrustRegistrationMapper.selectByIds(businessSampleEntrustRegistrationIdList);
|
||||
|
||||
List<BusinessSampleEntrustDetailDO> allBusinessSampleEntrustDetailDOList = businessSampleEntrustDetailMapper.selectByBusinessSampleEntrustRegistrationIds(businessSampleEntrustRegistrationIdList);
|
||||
|
||||
for (BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistrationDO : businessSampleEntrustRegistrationDOList) {
|
||||
List<Long> currentBusinessBaseSampleIdList = allBusinessSampleEntrustDetailDOList.stream().filter(f -> f.getBusinessSampleEntrustRegistrationId().equals(businessSampleEntrustRegistrationDO.getId())).map(m -> m.getBusinessBaseSampleId()).collect(Collectors.toList());
|
||||
List<BusinessSubParentSampleDO> currentBusinessSubParentSampleDOList = businessSubParentSampleMapper.selectByBusinessBaseSampleIds(currentBusinessBaseSampleIdList);
|
||||
List<Long> currentBusinessSubParentSampleIdList = currentBusinessSubParentSampleDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
List<BusinessSubParentSampleAssessmentDO> currentBusinessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIds(currentBusinessSubParentSampleIdList);
|
||||
long count = currentBusinessSubParentSampleAssessmentDOList.stream().filter(f -> !reqVO.getBusinessSubParentSampleIds().contains(f.getBusinessSubParentSampleId()) && !f.getConfigAssayMethodId().equals(reqVO.getConfigAssayMethodId()) && f.getIsReported().equals(QmsCommonConstant.NO)).count();
|
||||
if (count > 0) {//如果还存在未上报的数据,则继续
|
||||
continue;
|
||||
}
|
||||
businessSampleEntrustRegistrationDO.setAssayStatus(QmsCommonConstant.CHECKED);
|
||||
updatebBusinessSampleEntrustRegistrationDOList.add(businessSampleEntrustRegistrationDO);
|
||||
}
|
||||
|
||||
if (saveBusinessAssayReportDataDOList.size() > 0) {
|
||||
businessAssayReportDataMapper.insertBatch(saveBusinessAssayReportDataDOList);
|
||||
@@ -612,6 +618,9 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
||||
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleIds())
|
||||
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()));
|
||||
|
||||
if (updatebBusinessSampleEntrustRegistrationDOList.size() > 0) {
|
||||
businessSampleEntrustRegistrationMapper.updateBatch(updatebBusinessSampleEntrustRegistrationDOList);
|
||||
}
|
||||
|
||||
if (updateBusinessSubSampleDOList.size() > 0) {
|
||||
|
||||
|
||||
@@ -18,6 +18,13 @@ public interface SampleTaskAssignService {
|
||||
*/
|
||||
List<AdminUserRespDTO> getAssignUserList();
|
||||
|
||||
/**
|
||||
* 根据用户id获取用户信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
AdminUserRespDTO getUserInfoById(Long userId);
|
||||
|
||||
/**
|
||||
* 获取未指派任务子样信息
|
||||
* @return
|
||||
|
||||
@@ -176,6 +176,12 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
||||
return userListResult.getCheckedData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminUserRespDTO getUserInfoById(Long userId) {
|
||||
CommonResult<AdminUserRespDTO> useResult = adminUserApi.getUser(userId);
|
||||
return useResult.getCheckedData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UnAssignTaskedSubSampleRespVO> getAssaySampleList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
List<UnAssignTaskedSubSampleRespVO> list = businessAssayTaskDataMapper.selectUnAssignTaskedSubSample(reqVO);
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.*;
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierDO;
|
||||
import com.zt.plat.module.qms.office.supplier.service.SupplierService;
|
||||
|
||||
@Tag(name = "管理后台 - 供应商")
|
||||
@RestController
|
||||
@RequestMapping("/qms/supplier")
|
||||
@Validated
|
||||
@FileUploadController(source = "qms.supplier")
|
||||
public class SupplierController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = SupplierController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private SupplierService supplierService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建供应商")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:create')")
|
||||
public CommonResult<SupplierRespVO> createSupplier(@Valid @RequestBody SupplierSaveReqVO createReqVO) {
|
||||
return success(supplierService.createSupplier(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新供应商")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:update')")
|
||||
public CommonResult<Boolean> updateSupplier(@Valid @RequestBody SupplierSaveReqVO updateReqVO) {
|
||||
supplierService.updateSupplier(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除供应商")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:delete')")
|
||||
public CommonResult<Boolean> deleteSupplier(@RequestParam("id") Long id) {
|
||||
supplierService.deleteSupplier(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除供应商")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierList(@RequestBody BatchDeleteReqVO req) {
|
||||
supplierService.deleteSupplierListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得供应商")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:query')")
|
||||
public CommonResult<SupplierRespVO> getSupplier(@RequestParam("id") Long id) {
|
||||
SupplierDO supplier = supplierService.getSupplier(id);
|
||||
return success(BeanUtils.toBean(supplier, SupplierRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得供应商分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:query')")
|
||||
public CommonResult<PageResult<SupplierRespVO>> getSupplierPage(@Valid SupplierPageReqVO pageReqVO) {
|
||||
PageResult<SupplierDO> pageResult = supplierService.getSupplierPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SupplierRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出供应商 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSupplierExcel(@Valid SupplierPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SupplierDO> list = supplierService.getSupplierPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "供应商.xls", "数据", SupplierRespVO.class,
|
||||
BeanUtils.toBean(list, SupplierRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierEvaluationAtDO;
|
||||
import com.zt.plat.module.qms.office.supplier.service.SupplierEvaluationAtService;
|
||||
|
||||
@Tag(name = "管理后台 - 供应商评价关系")
|
||||
@RestController
|
||||
@RequestMapping("/qms/supplier-evaluation-at")
|
||||
@Validated
|
||||
@FileUploadController(source = "qms.supplierevaluationat")
|
||||
public class SupplierEvaluationAtController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = SupplierEvaluationAtController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private SupplierEvaluationAtService supplierEvaluationAtService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建供应商评价关系")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:create')")
|
||||
public CommonResult<SupplierEvaluationAtRespVO> createSupplierEvaluationAt(@Valid @RequestBody SupplierEvaluationAtSaveReqVO createReqVO) {
|
||||
return success(supplierEvaluationAtService.createSupplierEvaluationAt(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新供应商评价关系")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:update')")
|
||||
public CommonResult<Boolean> updateSupplierEvaluationAt(@Valid @RequestBody SupplierEvaluationAtSaveReqVO updateReqVO) {
|
||||
supplierEvaluationAtService.updateSupplierEvaluationAt(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除供应商评价关系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierEvaluationAt(@RequestParam("id") Long id) {
|
||||
supplierEvaluationAtService.deleteSupplierEvaluationAt(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除供应商评价关系")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierEvaluationAtList(@RequestBody BatchDeleteReqVO req) {
|
||||
supplierEvaluationAtService.deleteSupplierEvaluationAtListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得供应商评价关系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:query')")
|
||||
public CommonResult<SupplierEvaluationAtRespVO> getSupplierEvaluationAt(@RequestParam("id") Long id) {
|
||||
SupplierEvaluationAtDO supplierEvaluationAt = supplierEvaluationAtService.getSupplierEvaluationAt(id);
|
||||
return success(BeanUtils.toBean(supplierEvaluationAt, SupplierEvaluationAtRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得供应商评价关系分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:query')")
|
||||
public CommonResult<PageResult<SupplierEvaluationAtRespVO>> getSupplierEvaluationAtPage(@Valid SupplierEvaluationAtPageReqVO pageReqVO) {
|
||||
PageResult<SupplierEvaluationAtDO> pageResult = supplierEvaluationAtService.getSupplierEvaluationAtPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SupplierEvaluationAtRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出供应商评价关系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation-at:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSupplierEvaluationAtExcel(@Valid SupplierEvaluationAtPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SupplierEvaluationAtDO> list = supplierEvaluationAtService.getSupplierEvaluationAtPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "供应商评价关系.xls", "数据", SupplierEvaluationAtRespVO.class,
|
||||
BeanUtils.toBean(list, SupplierEvaluationAtRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierEvaluationDO;
|
||||
import com.zt.plat.module.qms.office.supplier.service.SupplierEvaluationService;
|
||||
|
||||
@Tag(name = "管理后台 - 供应商评价")
|
||||
@RestController
|
||||
@RequestMapping("/qms/supplier-evaluation")
|
||||
@Validated
|
||||
@FileUploadController(source = "qms.supplierevaluation")
|
||||
public class SupplierEvaluationController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = SupplierEvaluationController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private SupplierEvaluationService supplierEvaluationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建供应商评价")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:create')")
|
||||
public CommonResult<SupplierEvaluationRespVO> createSupplierEvaluation(@Valid @RequestBody SupplierEvaluationSaveReqVO createReqVO) {
|
||||
return success(supplierEvaluationService.createSupplierEvaluation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新供应商评价")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:update')")
|
||||
public CommonResult<Boolean> updateSupplierEvaluation(@Valid @RequestBody SupplierEvaluationSaveReqVO updateReqVO) {
|
||||
supplierEvaluationService.updateSupplierEvaluation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除供应商评价")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierEvaluation(@RequestParam("id") Long id) {
|
||||
supplierEvaluationService.deleteSupplierEvaluation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除供应商评价")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierEvaluationList(@RequestBody BatchDeleteReqVO req) {
|
||||
supplierEvaluationService.deleteSupplierEvaluationListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得供应商评价")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:query')")
|
||||
public CommonResult<SupplierEvaluationRespVO> getSupplierEvaluation(@RequestParam("id") Long id) {
|
||||
SupplierEvaluationDO supplierEvaluation = supplierEvaluationService.getSupplierEvaluation(id);
|
||||
return success(BeanUtils.toBean(supplierEvaluation, SupplierEvaluationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得供应商评价分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:query')")
|
||||
public CommonResult<PageResult<SupplierEvaluationRespVO>> getSupplierEvaluationPage(@Valid SupplierEvaluationPageReqVO pageReqVO) {
|
||||
PageResult<SupplierEvaluationDO> pageResult = supplierEvaluationService.getSupplierEvaluationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SupplierEvaluationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出供应商评价 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-evaluation:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSupplierEvaluationExcel(@Valid SupplierEvaluationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SupplierEvaluationDO> list = supplierEvaluationService.getSupplierEvaluationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "供应商评价.xls", "数据", SupplierEvaluationRespVO.class,
|
||||
BeanUtils.toBean(list, SupplierEvaluationRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierPropertiesDO;
|
||||
import com.zt.plat.module.qms.office.supplier.service.SupplierPropertiesService;
|
||||
|
||||
@Tag(name = "管理后台 - 供应商属性")
|
||||
@RestController
|
||||
@RequestMapping("/qms/supplier-properties")
|
||||
@Validated
|
||||
@FileUploadController(source = "qms.supplierproperties")
|
||||
public class SupplierPropertiesController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = SupplierPropertiesController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private SupplierPropertiesService supplierPropertiesService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建供应商属性")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:create')")
|
||||
public CommonResult<SupplierPropertiesRespVO> createSupplierProperties(@Valid @RequestBody SupplierPropertiesSaveReqVO createReqVO) {
|
||||
return success(supplierPropertiesService.createSupplierProperties(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新供应商属性")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:update')")
|
||||
public CommonResult<Boolean> updateSupplierProperties(@Valid @RequestBody SupplierPropertiesSaveReqVO updateReqVO) {
|
||||
supplierPropertiesService.updateSupplierProperties(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除供应商属性")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierProperties(@RequestParam("id") Long id) {
|
||||
supplierPropertiesService.deleteSupplierProperties(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除供应商属性")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:delete')")
|
||||
public CommonResult<Boolean> deleteSupplierPropertiesList(@RequestBody BatchDeleteReqVO req) {
|
||||
supplierPropertiesService.deleteSupplierPropertiesListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得供应商属性")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:query')")
|
||||
public CommonResult<SupplierPropertiesRespVO> getSupplierProperties(@RequestParam("id") Long id) {
|
||||
SupplierPropertiesDO supplierProperties = supplierPropertiesService.getSupplierProperties(id);
|
||||
return success(BeanUtils.toBean(supplierProperties, SupplierPropertiesRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得供应商属性分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:query')")
|
||||
public CommonResult<PageResult<SupplierPropertiesRespVO>> getSupplierPropertiesPage(@Valid SupplierPropertiesPageReqVO pageReqVO) {
|
||||
PageResult<SupplierPropertiesDO> pageResult = supplierPropertiesService.getSupplierPropertiesPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SupplierPropertiesRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出供应商属性 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:supplier-properties:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSupplierPropertiesExcel(@Valid SupplierPropertiesPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SupplierPropertiesDO> list = supplierPropertiesService.getSupplierPropertiesPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "供应商属性.xls", "数据", SupplierPropertiesRespVO.class,
|
||||
BeanUtils.toBean(list, SupplierPropertiesRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商评价关系分页 Request VO")
|
||||
@Data
|
||||
public class SupplierEvaluationAtPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "评价id", example = "6160")
|
||||
private Long supplierEvaluationId;
|
||||
|
||||
@Schema(description = "目标对象id", example = "24374")
|
||||
private Long targetId;
|
||||
|
||||
@Schema(description = "目标对象类型,业务类型:设备实例、物料试剂、检定校准记录等", example = "2")
|
||||
private String targetType;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商评价关系 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SupplierEvaluationAtRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2684")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "评价id", requiredMode = Schema.RequiredMode.REQUIRED, example = "6160")
|
||||
@ExcelProperty("评价id")
|
||||
private Long supplierEvaluationId;
|
||||
|
||||
@Schema(description = "目标对象id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24374")
|
||||
@ExcelProperty("目标对象id")
|
||||
private Long targetId;
|
||||
|
||||
@Schema(description = "目标对象类型,业务类型:设备实例、物料试剂、检定校准记录等", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("目标对象类型,业务类型:设备实例、物料试剂、检定校准记录等")
|
||||
private String targetType;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商评价关系新增/修改 Request VO")
|
||||
@Data
|
||||
public class SupplierEvaluationAtSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2684")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "评价id", requiredMode = Schema.RequiredMode.REQUIRED, example = "6160")
|
||||
@NotNull(message = "评价id不能为空")
|
||||
private Long supplierEvaluationId;
|
||||
|
||||
@Schema(description = "目标对象id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24374")
|
||||
@NotNull(message = "目标对象id不能为空")
|
||||
private Long targetId;
|
||||
|
||||
@Schema(description = "目标对象类型,业务类型:设备实例、物料试剂、检定校准记录等", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "目标对象类型,业务类型:设备实例、物料试剂、检定校准记录等不能为空")
|
||||
private String targetType;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商评价分页 Request VO")
|
||||
@Data
|
||||
public class SupplierEvaluationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "供应商ID", example = "3346")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "表单模板id", example = "32304")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "评价内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "评价结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "评价人")
|
||||
private String evaluator;
|
||||
|
||||
@Schema(description = "评价人id", example = "25943")
|
||||
private Long evaluatorId;
|
||||
|
||||
@Schema(description = "评价日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] evaluationDate;
|
||||
|
||||
@Schema(description = "流程审批状态", example = "2")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "流程实例id", example = "24931")
|
||||
private String flowInstanceId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商评价 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SupplierEvaluationRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31678")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商ID", example = "3346")
|
||||
@ExcelProperty("供应商ID")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "表单模板id", example = "32304")
|
||||
@ExcelProperty("表单模板id")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "评价内容")
|
||||
@ExcelProperty("评价内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "评价结论")
|
||||
@ExcelProperty("评价结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "评价人")
|
||||
@ExcelProperty("评价人")
|
||||
private String evaluator;
|
||||
|
||||
@Schema(description = "评价人id", example = "25943")
|
||||
@ExcelProperty("评价人id")
|
||||
private Long evaluatorId;
|
||||
|
||||
@Schema(description = "评价日期")
|
||||
@ExcelProperty("评价日期")
|
||||
private LocalDateTime evaluationDate;
|
||||
|
||||
@Schema(description = "流程审批状态", example = "2")
|
||||
@ExcelProperty("流程审批状态")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "流程实例id", example = "24931")
|
||||
@ExcelProperty("流程实例id")
|
||||
private String flowInstanceId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商评价新增/修改 Request VO")
|
||||
@Data
|
||||
public class SupplierEvaluationSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31678")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商ID", example = "3346")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "表单模板id", example = "32304")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "评价内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "评价结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "评价人")
|
||||
private String evaluator;
|
||||
|
||||
@Schema(description = "评价人id", example = "25943")
|
||||
private Long evaluatorId;
|
||||
|
||||
@Schema(description = "评价日期")
|
||||
private LocalDateTime evaluationDate;
|
||||
|
||||
@Schema(description = "流程审批状态", example = "2")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "流程实例id", example = "24931")
|
||||
private String flowInstanceId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商分页 Request VO")
|
||||
@Data
|
||||
public class SupplierPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "供应商名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
private String businessScope;
|
||||
|
||||
@Schema(description = "禁用标识")
|
||||
private String cancelFlag;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
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.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商属性分页 Request VO")
|
||||
@Data
|
||||
public class SupplierPropertiesPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "供应商ID", example = "31214")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "业务类型,【字典】【jy_supplier_bsn_type】供应商类型、资质、证照等", example = "1")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "业务编码")
|
||||
private String businessCode;
|
||||
|
||||
@Schema(description = "子业务编码")
|
||||
private String subitemCode;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "有效期开始")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startDate;
|
||||
|
||||
@Schema(description = "有效期截止")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endDate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商属性 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SupplierPropertiesRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22878")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商ID", example = "31214")
|
||||
@ExcelProperty("供应商ID")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "业务类型,【字典】【jy_supplier_bsn_type】供应商类型、资质、证照等", example = "1")
|
||||
@ExcelProperty("业务类型,【字典】【jy_supplier_bsn_type】供应商类型、资质、证照等")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "业务编码")
|
||||
@ExcelProperty("业务编码")
|
||||
private String businessCode;
|
||||
|
||||
@Schema(description = "子业务编码")
|
||||
@ExcelProperty("子业务编码")
|
||||
private String subitemCode;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
@ExcelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "有效期开始")
|
||||
@ExcelProperty("有效期开始")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Schema(description = "有效期截止")
|
||||
@ExcelProperty("有效期截止")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商属性新增/修改 Request VO")
|
||||
@Data
|
||||
public class SupplierPropertiesSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22878")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商ID", example = "31214")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "业务类型,【字典】【jy_supplier_bsn_type】供应商类型、资质、证照等", example = "1")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "业务编码")
|
||||
private String businessCode;
|
||||
|
||||
@Schema(description = "子业务编码")
|
||||
private String subitemCode;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "有效期开始")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Schema(description = "有效期截止")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SupplierRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15586")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商名称", example = "张三")
|
||||
@ExcelProperty("供应商名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "编号")
|
||||
@ExcelProperty("编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "地址")
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
@ExcelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "电话")
|
||||
@ExcelProperty("电话")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
@ExcelProperty("经营范围")
|
||||
private String businessScope;
|
||||
|
||||
@Schema(description = "禁用标识")
|
||||
@ExcelProperty("禁用标识")
|
||||
private String cancelFlag;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zt.plat.module.qms.office.supplier.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@Schema(description = "管理后台 - 供应商新增/修改 Request VO")
|
||||
@Data
|
||||
public class SupplierSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15586")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
private String businessScope;
|
||||
|
||||
@Schema(description = "禁用标识")
|
||||
private String cancelFlag;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.zt.plat.module.qms.office.supplier.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 供应商 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_splr")
|
||||
@KeySequence("t_splr_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class SupplierDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableField("CD")
|
||||
private String code;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField("ADR")
|
||||
private String address;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@TableField("CTCT")
|
||||
private String contact;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@TableField("MOB")
|
||||
private String mobile;
|
||||
/**
|
||||
* 经营范围
|
||||
*/
|
||||
@TableField("BSN_SCO")
|
||||
private String businessScope;
|
||||
|
||||
//禁用标识
|
||||
@TableField("CNL_FLG")
|
||||
private String cancelFlag;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.zt.plat.module.qms.office.supplier.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 供应商评价关系 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_splr_evl_at")
|
||||
@KeySequence("t_splr_evl_at_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class SupplierEvaluationAtDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 评价id
|
||||
*/
|
||||
@TableField("SPLR_EVL_ID")
|
||||
private Long supplierEvaluationId;
|
||||
/**
|
||||
* 目标对象id
|
||||
*/
|
||||
@TableField("TGT_ID")
|
||||
private Long targetId;
|
||||
/**
|
||||
* 目标对象类型,业务类型:设备实例、物料试剂、检定校准记录等
|
||||
*/
|
||||
@TableField("TGT_TP")
|
||||
private String targetType;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.zt.plat.module.qms.office.supplier.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 供应商评价 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_splr_evl")
|
||||
@KeySequence("t_splr_evl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class SupplierEvaluationDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
@TableField("SPLR_ID")
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 表单模板id
|
||||
*/
|
||||
@TableField("FORM_ID")
|
||||
private Long formId;
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
@TableField("CNTT")
|
||||
private String content;
|
||||
/**
|
||||
* 评价结论
|
||||
*/
|
||||
@TableField("CNCL")
|
||||
private String conclusion;
|
||||
/**
|
||||
* 评价人
|
||||
*/
|
||||
@TableField("EVLR")
|
||||
private String evaluator;
|
||||
/**
|
||||
* 评价人id
|
||||
*/
|
||||
@TableField("EVLR_ID")
|
||||
private Long evaluatorId;
|
||||
/**
|
||||
* 评价日期
|
||||
*/
|
||||
@TableField("EVL_DT")
|
||||
private LocalDateTime evaluationDate;
|
||||
/**
|
||||
* 流程审批状态
|
||||
*/
|
||||
@TableField("FLW_STS")
|
||||
private String flowStatus;
|
||||
/**
|
||||
* 流程实例id
|
||||
*/
|
||||
@TableField("FLW_INSC_ID")
|
||||
private String flowInstanceId;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.zt.plat.module.qms.office.supplier.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 供应商属性 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_splr_prps")
|
||||
@KeySequence("t_splr_prps_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class SupplierPropertiesDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
@TableField("SPLR_ID")
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 业务类型,【字典】【jy_supplier_bsn_type】供应商类型、资质、证照等
|
||||
*/
|
||||
@TableField("BSN_TP")
|
||||
private String businessType;
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
@TableField("BSN_CD")
|
||||
private String businessCode;
|
||||
/**
|
||||
* 子业务编码
|
||||
*/
|
||||
@TableField("SUB_CD")
|
||||
private String subitemCode;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 有效期开始
|
||||
*/
|
||||
@TableField("STRT_DT")
|
||||
private LocalDateTime startDate;
|
||||
/**
|
||||
* 有效期截止
|
||||
*/
|
||||
@TableField("END_DT")
|
||||
private LocalDateTime endDate;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.qms.office.supplier.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.module.qms.office.supplier.dal.dataobject.SupplierEvaluationAtDO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtPageReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 供应商评价关系 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface SupplierEvaluationAtMapper extends BaseMapperX<SupplierEvaluationAtDO> {
|
||||
|
||||
default PageResult<SupplierEvaluationAtDO> selectPage(SupplierEvaluationAtPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<SupplierEvaluationAtDO>()
|
||||
.eqIfPresent(SupplierEvaluationAtDO::getSupplierEvaluationId, reqVO.getSupplierEvaluationId())
|
||||
.eqIfPresent(SupplierEvaluationAtDO::getTargetId, reqVO.getTargetId())
|
||||
.eqIfPresent(SupplierEvaluationAtDO::getTargetType, reqVO.getTargetType())
|
||||
.eqIfPresent(SupplierEvaluationAtDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(SupplierEvaluationAtDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(SupplierEvaluationAtDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(SupplierEvaluationAtDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.qms.office.supplier.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.module.qms.office.supplier.dal.dataobject.SupplierEvaluationDO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationPageReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 供应商评价 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface SupplierEvaluationMapper extends BaseMapperX<SupplierEvaluationDO> {
|
||||
|
||||
default PageResult<SupplierEvaluationDO> selectPage(SupplierEvaluationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<SupplierEvaluationDO>()
|
||||
.eqIfPresent(SupplierEvaluationDO::getSupplierId, reqVO.getSupplierId())
|
||||
.eqIfPresent(SupplierEvaluationDO::getFormId, reqVO.getFormId())
|
||||
.eqIfPresent(SupplierEvaluationDO::getContent, reqVO.getContent())
|
||||
.eqIfPresent(SupplierEvaluationDO::getConclusion, reqVO.getConclusion())
|
||||
.eqIfPresent(SupplierEvaluationDO::getEvaluator, reqVO.getEvaluator())
|
||||
.eqIfPresent(SupplierEvaluationDO::getEvaluatorId, reqVO.getEvaluatorId())
|
||||
.betweenIfPresent(SupplierEvaluationDO::getEvaluationDate, reqVO.getEvaluationDate())
|
||||
.eqIfPresent(SupplierEvaluationDO::getFlowStatus, reqVO.getFlowStatus())
|
||||
.eqIfPresent(SupplierEvaluationDO::getFlowInstanceId, reqVO.getFlowInstanceId())
|
||||
.eqIfPresent(SupplierEvaluationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(SupplierEvaluationDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(SupplierEvaluationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(SupplierEvaluationDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zt.plat.module.qms.office.supplier.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.module.qms.office.supplier.dal.dataobject.SupplierDO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPageReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 供应商 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface SupplierMapper extends BaseMapperX<SupplierDO> {
|
||||
|
||||
default PageResult<SupplierDO> selectPage(SupplierPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<SupplierDO>()
|
||||
.likeIfPresent(SupplierDO::getName, reqVO.getName())
|
||||
.eqIfPresent(SupplierDO::getCode, reqVO.getCode())
|
||||
.eqIfPresent(SupplierDO::getType, reqVO.getType())
|
||||
.eqIfPresent(SupplierDO::getAddress, reqVO.getAddress())
|
||||
.eqIfPresent(SupplierDO::getContact, reqVO.getContact())
|
||||
.eqIfPresent(SupplierDO::getMobile, reqVO.getMobile())
|
||||
.eqIfPresent(SupplierDO::getBusinessScope, reqVO.getBusinessScope())
|
||||
.eqIfPresent(SupplierDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(SupplierDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(SupplierDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(SupplierDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zt.plat.module.qms.office.supplier.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.module.qms.office.supplier.dal.dataobject.SupplierPropertiesDO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesPageReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 供应商属性 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface SupplierPropertiesMapper extends BaseMapperX<SupplierPropertiesDO> {
|
||||
|
||||
default PageResult<SupplierPropertiesDO> selectPage(SupplierPropertiesPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<SupplierPropertiesDO>()
|
||||
.eqIfPresent(SupplierPropertiesDO::getSupplierId, reqVO.getSupplierId())
|
||||
.eqIfPresent(SupplierPropertiesDO::getBusinessType, reqVO.getBusinessType())
|
||||
.eqIfPresent(SupplierPropertiesDO::getBusinessCode, reqVO.getBusinessCode())
|
||||
.eqIfPresent(SupplierPropertiesDO::getSubitemCode, reqVO.getSubitemCode())
|
||||
.likeIfPresent(SupplierPropertiesDO::getName, reqVO.getName())
|
||||
.betweenIfPresent(SupplierPropertiesDO::getStartDate, reqVO.getStartDate())
|
||||
.betweenIfPresent(SupplierPropertiesDO::getEndDate, reqVO.getEndDate())
|
||||
.eqIfPresent(SupplierPropertiesDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(SupplierPropertiesDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(SupplierPropertiesDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(SupplierPropertiesDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierEvaluationAtDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 供应商评价关系 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface SupplierEvaluationAtService {
|
||||
|
||||
/**
|
||||
* 创建供应商评价关系
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
SupplierEvaluationAtRespVO createSupplierEvaluationAt(@Valid SupplierEvaluationAtSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新供应商评价关系
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateSupplierEvaluationAt(@Valid SupplierEvaluationAtSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除供应商评价关系
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteSupplierEvaluationAt(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商评价关系
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteSupplierEvaluationAtListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得供应商评价关系
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 供应商评价关系
|
||||
*/
|
||||
SupplierEvaluationAtDO getSupplierEvaluationAt(Long id);
|
||||
|
||||
/**
|
||||
* 获得供应商评价关系分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 供应商评价关系分页
|
||||
*/
|
||||
PageResult<SupplierEvaluationAtDO> getSupplierEvaluationAtPage(SupplierEvaluationAtPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationAtSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierEvaluationAtDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierEvaluationAtMapper;
|
||||
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 供应商评价关系 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class SupplierEvaluationAtServiceImpl implements SupplierEvaluationAtService {
|
||||
|
||||
@Resource
|
||||
private SupplierEvaluationAtMapper supplierEvaluationAtMapper;
|
||||
|
||||
@Override
|
||||
public SupplierEvaluationAtRespVO createSupplierEvaluationAt(SupplierEvaluationAtSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
SupplierEvaluationAtDO supplierEvaluationAt = BeanUtils.toBean(createReqVO, SupplierEvaluationAtDO.class);
|
||||
supplierEvaluationAtMapper.insert(supplierEvaluationAt);
|
||||
// 返回
|
||||
return BeanUtils.toBean(supplierEvaluationAt, SupplierEvaluationAtRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSupplierEvaluationAt(SupplierEvaluationAtSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSupplierEvaluationAtExists(updateReqVO.getId());
|
||||
// 更新
|
||||
SupplierEvaluationAtDO updateObj = BeanUtils.toBean(updateReqVO, SupplierEvaluationAtDO.class);
|
||||
supplierEvaluationAtMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierEvaluationAt(Long id) {
|
||||
// 校验存在
|
||||
validateSupplierEvaluationAtExists(id);
|
||||
// 删除
|
||||
supplierEvaluationAtMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierEvaluationAtListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateSupplierEvaluationAtExists(ids);
|
||||
// 删除
|
||||
supplierEvaluationAtMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateSupplierEvaluationAtExists(List<Long> ids) {
|
||||
List<SupplierEvaluationAtDO> list = supplierEvaluationAtMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(SUPPLIER_EVALUATION_AT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateSupplierEvaluationAtExists(Long id) {
|
||||
if (supplierEvaluationAtMapper.selectById(id) == null) {
|
||||
throw exception(SUPPLIER_EVALUATION_AT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierEvaluationAtDO getSupplierEvaluationAt(Long id) {
|
||||
return supplierEvaluationAtMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<SupplierEvaluationAtDO> getSupplierEvaluationAtPage(SupplierEvaluationAtPageReqVO pageReqVO) {
|
||||
return supplierEvaluationAtMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierEvaluationDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 供应商评价 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface SupplierEvaluationService {
|
||||
|
||||
/**
|
||||
* 创建供应商评价
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
SupplierEvaluationRespVO createSupplierEvaluation(@Valid SupplierEvaluationSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新供应商评价
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateSupplierEvaluation(@Valid SupplierEvaluationSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除供应商评价
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteSupplierEvaluation(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商评价
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteSupplierEvaluationListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得供应商评价
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 供应商评价
|
||||
*/
|
||||
SupplierEvaluationDO getSupplierEvaluation(Long id);
|
||||
|
||||
/**
|
||||
* 获得供应商评价分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 供应商评价分页
|
||||
*/
|
||||
PageResult<SupplierEvaluationDO> getSupplierEvaluationPage(SupplierEvaluationPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierEvaluationSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierEvaluationDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierEvaluationMapper;
|
||||
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 供应商评价 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class SupplierEvaluationServiceImpl implements SupplierEvaluationService {
|
||||
|
||||
@Resource
|
||||
private SupplierEvaluationMapper supplierEvaluationMapper;
|
||||
|
||||
@Override
|
||||
public SupplierEvaluationRespVO createSupplierEvaluation(SupplierEvaluationSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
SupplierEvaluationDO supplierEvaluation = BeanUtils.toBean(createReqVO, SupplierEvaluationDO.class);
|
||||
supplierEvaluationMapper.insert(supplierEvaluation);
|
||||
// 返回
|
||||
return BeanUtils.toBean(supplierEvaluation, SupplierEvaluationRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSupplierEvaluation(SupplierEvaluationSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSupplierEvaluationExists(updateReqVO.getId());
|
||||
// 更新
|
||||
SupplierEvaluationDO updateObj = BeanUtils.toBean(updateReqVO, SupplierEvaluationDO.class);
|
||||
supplierEvaluationMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierEvaluation(Long id) {
|
||||
// 校验存在
|
||||
validateSupplierEvaluationExists(id);
|
||||
// 删除
|
||||
supplierEvaluationMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierEvaluationListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateSupplierEvaluationExists(ids);
|
||||
// 删除
|
||||
supplierEvaluationMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateSupplierEvaluationExists(List<Long> ids) {
|
||||
List<SupplierEvaluationDO> list = supplierEvaluationMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(SUPPLIER_EVALUATION_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateSupplierEvaluationExists(Long id) {
|
||||
if (supplierEvaluationMapper.selectById(id) == null) {
|
||||
throw exception(SUPPLIER_EVALUATION_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierEvaluationDO getSupplierEvaluation(Long id) {
|
||||
return supplierEvaluationMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<SupplierEvaluationDO> getSupplierEvaluationPage(SupplierEvaluationPageReqVO pageReqVO) {
|
||||
return supplierEvaluationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierPropertiesDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 供应商属性 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface SupplierPropertiesService {
|
||||
|
||||
/**
|
||||
* 创建供应商属性
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
SupplierPropertiesRespVO createSupplierProperties(@Valid SupplierPropertiesSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新供应商属性
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateSupplierProperties(@Valid SupplierPropertiesSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除供应商属性
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteSupplierProperties(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商属性
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteSupplierPropertiesListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得供应商属性
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 供应商属性
|
||||
*/
|
||||
SupplierPropertiesDO getSupplierProperties(Long id);
|
||||
|
||||
/**
|
||||
* 获得供应商属性分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 供应商属性分页
|
||||
*/
|
||||
PageResult<SupplierPropertiesDO> getSupplierPropertiesPage(SupplierPropertiesPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPropertiesSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierPropertiesDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierPropertiesMapper;
|
||||
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 供应商属性 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class SupplierPropertiesServiceImpl implements SupplierPropertiesService {
|
||||
|
||||
@Resource
|
||||
private SupplierPropertiesMapper supplierPropertiesMapper;
|
||||
|
||||
@Override
|
||||
public SupplierPropertiesRespVO createSupplierProperties(SupplierPropertiesSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
SupplierPropertiesDO supplierProperties = BeanUtils.toBean(createReqVO, SupplierPropertiesDO.class);
|
||||
supplierPropertiesMapper.insert(supplierProperties);
|
||||
// 返回
|
||||
return BeanUtils.toBean(supplierProperties, SupplierPropertiesRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSupplierProperties(SupplierPropertiesSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSupplierPropertiesExists(updateReqVO.getId());
|
||||
// 更新
|
||||
SupplierPropertiesDO updateObj = BeanUtils.toBean(updateReqVO, SupplierPropertiesDO.class);
|
||||
supplierPropertiesMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierProperties(Long id) {
|
||||
// 校验存在
|
||||
validateSupplierPropertiesExists(id);
|
||||
// 删除
|
||||
supplierPropertiesMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierPropertiesListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateSupplierPropertiesExists(ids);
|
||||
// 删除
|
||||
supplierPropertiesMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateSupplierPropertiesExists(List<Long> ids) {
|
||||
List<SupplierPropertiesDO> list = supplierPropertiesMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(SUPPLIER_PROPERTIES_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateSupplierPropertiesExists(Long id) {
|
||||
if (supplierPropertiesMapper.selectById(id) == null) {
|
||||
throw exception(SUPPLIER_PROPERTIES_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierPropertiesDO getSupplierProperties(Long id) {
|
||||
return supplierPropertiesMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<SupplierPropertiesDO> getSupplierPropertiesPage(SupplierPropertiesPageReqVO pageReqVO) {
|
||||
return supplierPropertiesMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 供应商 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface SupplierService {
|
||||
|
||||
/**
|
||||
* 创建供应商
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
SupplierRespVO createSupplier(@Valid SupplierSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新供应商
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateSupplier(@Valid SupplierSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除供应商
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteSupplier(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteSupplierListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得供应商
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 供应商
|
||||
*/
|
||||
SupplierDO getSupplier(Long id);
|
||||
|
||||
/**
|
||||
* 获得供应商分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 供应商分页
|
||||
*/
|
||||
PageResult<SupplierDO> getSupplierPage(SupplierPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.qms.office.supplier.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierPageReqVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierRespVO;
|
||||
import com.zt.plat.module.qms.office.supplier.controller.vo.SupplierSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.dataobject.SupplierDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierMapper;
|
||||
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 供应商 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class SupplierServiceImpl implements SupplierService {
|
||||
|
||||
@Resource
|
||||
private SupplierMapper supplierMapper;
|
||||
|
||||
@Override
|
||||
public SupplierRespVO createSupplier(SupplierSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
SupplierDO supplier = BeanUtils.toBean(createReqVO, SupplierDO.class);
|
||||
supplierMapper.insert(supplier);
|
||||
// 返回
|
||||
return BeanUtils.toBean(supplier, SupplierRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSupplier(SupplierSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSupplierExists(updateReqVO.getId());
|
||||
// 更新
|
||||
SupplierDO updateObj = BeanUtils.toBean(updateReqVO, SupplierDO.class);
|
||||
supplierMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplier(Long id) {
|
||||
// 校验存在
|
||||
validateSupplierExists(id);
|
||||
// 删除
|
||||
supplierMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSupplierListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateSupplierExists(ids);
|
||||
// 删除
|
||||
supplierMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateSupplierExists(List<Long> ids) {
|
||||
List<SupplierDO> list = supplierMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(SUPPLIER_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateSupplierExists(Long id) {
|
||||
if (supplierMapper.selectById(id) == null) {
|
||||
throw exception(SUPPLIER_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierDO getSupplier(Long id) {
|
||||
return supplierMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<SupplierDO> getSupplierPage(SupplierPageReqVO pageReqVO) {
|
||||
return supplierMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
-->
|
||||
|
||||
<select id="queryWaitingDataForReport" resultType="com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO">
|
||||
-- SELECT d.*,
|
||||
select
|
||||
d.ID as id,
|
||||
d.CFG_RPT_TP_ID as configReportTypeId,
|
||||
|
||||
@@ -33,8 +33,11 @@
|
||||
<if test="reqVO.sampleFlowNodeKey != null and reqVO.sampleFlowNodeKey != ''">
|
||||
AND tbatd.SMP_FLW_NDE_KY = #{reqVO.sampleFlowNodeKey}
|
||||
</if>
|
||||
<if test="reqVO.sampleFlowNodeTime[0] != null and reqVO.sampleFlowNodeTime[1] != null">
|
||||
AND tbatd.SMP_FLW_NDE_TM #{reqVO.sampleFlowNodeTime[0]} and #{reqVO.sampleFlowNodeTime[1]}
|
||||
<if test="reqVO.sampleFlowNodeTime != null and reqVO.sampleFlowNodeTime.length == 2">
|
||||
AND tbatd.SMP_FLW_NDE_TM BETWEEN #{reqVO.sampleFlowNodeTime[0]} AND #{reqVO.sampleFlowNodeTime[1]}
|
||||
</if>
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.configAssayMethodName} || '%'
|
||||
</if>
|
||||
GROUP BY
|
||||
tbatd.CFG_ASY_MTHD_ID,
|
||||
@@ -76,9 +79,12 @@
|
||||
AND tbatd.TENANT_ID = 1
|
||||
AND tbatd.IS_ASN_TSKD = 1
|
||||
AND tbssag.SMP_STS = '已收样'
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tbssag.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||
</if>
|
||||
GROUP BY
|
||||
tbatd.TENANT_ID ,
|
||||
tbatd.BSN_SB_PRN_SMP_ID ,
|
||||
@@ -93,6 +99,9 @@
|
||||
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')
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.configAssayMethodName} || '%'
|
||||
</if>
|
||||
GROUP BY
|
||||
t.CFG_ASY_MTHD_ID,
|
||||
t.ASY_TP,
|
||||
@@ -126,8 +135,17 @@
|
||||
<if test="reqVO.sampleFlowNodeKey != null and reqVO.sampleFlowNodeKey != ''">
|
||||
AND tbatd.SMP_FLW_NDE_KY = #{reqVO.sampleFlowNodeKey}
|
||||
</if>
|
||||
<if test="reqVO.sampleFlowNodeTime[0] != null and reqVO.sampleFlowNodeTime[1] != null">
|
||||
AND tbatd.SMP_FLW_NDE_TM #{reqVO.sampleFlowNodeTime[0]} and #{reqVO.sampleFlowNodeTime[1]}
|
||||
<if test="reqVO.sampleFlowNodeTime != null and reqVO.sampleFlowNodeTime.length == 2">
|
||||
AND tbatd.SMP_FLW_NDE_TM BETWEEN #{reqVO.sampleFlowNodeTime[0]} AND #{reqVO.sampleFlowNodeTime[1]}
|
||||
</if>
|
||||
<if test="reqVO.sampleCode != null and reqVO.sampleCode != ''">
|
||||
AND tbss.SMP_CD = #{reqVO.sampleCode}
|
||||
</if>
|
||||
<if test="reqVO.sampleAssayCode != null and reqVO.sampleAssayCode != ''">
|
||||
AND tbss.SMP_ASY_CD = #{reqVO.sampleAssayCode}
|
||||
</if>
|
||||
<if test="reqVO.sampleReturnCode != null and reqVO.sampleReturnCode != ''">
|
||||
AND tbss.SMP_RTN_CD = #{reqVO.sampleReturnCode}
|
||||
</if>
|
||||
GROUP BY tbss.ID ,
|
||||
tbss.SMP_NAME ,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
|
||||
<select id="queryWaitingDataForReport" resultType="com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO">
|
||||
-- SELECT d.*,
|
||||
select
|
||||
m.ID as id,
|
||||
m.ENTT_ID as entrustId,
|
||||
@@ -65,6 +64,22 @@
|
||||
select 1 from T_RPT_DOC_MAIN dm left join T_RPT_DOC_MAIN_CORR dc on dm.id = dc.MAIN_ID
|
||||
where dc.CORR_ID = m.id and dm.FLW_STS in ('not_start','in_progress','completed','rejected') and dm.deleted = 0
|
||||
)
|
||||
|
||||
<if test="param.configReportTypeId != null">
|
||||
<!-- 通过主样配置id过滤-->
|
||||
and exists (
|
||||
select 1 from T_BSN_SMP_ENTT_DTL d
|
||||
inner join T_BSN_BSE_SMP s on d.BSN_BSE_SMP_ID = s.id
|
||||
where
|
||||
d.BSN_SMP_ENTT_REG_ID = m.id
|
||||
and s.CFG_BSE_SMP_ID in (
|
||||
select csr.CFG_BSE_SMP_ID from T_CFG_SMP_RPT csr where
|
||||
csr.CFG_RPT_TP_ID = ${param.configReportTypeId}
|
||||
and csr.DELETED = 0
|
||||
)
|
||||
and d.DELETED = 0
|
||||
)
|
||||
</if>
|
||||
<if test="param.assayStatus != null and param.assayStatus != ''">
|
||||
and m.ASY_STS = #{param.assayStatus}
|
||||
</if>
|
||||
|
||||
@@ -31,15 +31,21 @@
|
||||
tbssa.BSN_SB_PRN_SMP_ASMT_ID = tbspsa.ID
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||
LEFT JOIN T_BSN_SB_SMP_ANL_GRP tbssag ON
|
||||
tbssa.BSN_SB_SMP_ID = tbssag.BSN_SB_SMP_ID
|
||||
AND tcam.ASY_DEPT_ID = tbssag.ASY_DEPT_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} || '%'
|
||||
AND tcam.NAME like '%' || #{reqVO.configAssayMethodName} || '%'
|
||||
</if>
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tcam.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||
</if>
|
||||
GROUP BY
|
||||
tbspsa.TENANT_ID ,
|
||||
@@ -66,7 +72,8 @@
|
||||
tbssa.ASY_TP AS assayType,
|
||||
tbsps.CFG_SB_SMP_PRN_ID AS configSubSampleParentId,
|
||||
tbsps.SMP_NAME AS sampleName,
|
||||
tbs.NAME AS baseSampleName
|
||||
tbs.NAME AS baseSampleName,
|
||||
tbssag.SMP_RCV_TM AS sampleReceiveTime
|
||||
FROM
|
||||
T_BSN_SB_SMP_ASMT tbssa
|
||||
LEFT JOIN T_BSN_SB_PRN_SMP tbsps ON
|
||||
@@ -75,6 +82,11 @@
|
||||
tbsps.CFG_SB_SMP_PRN_ID = tcssp.ID
|
||||
LEFT JOIN T_BSE_SMP tbs ON
|
||||
tcssp.BSE_SMP_ID = tbs.ID
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||
LEFT JOIN T_BSN_SB_SMP_ANL_GRP tbssag ON
|
||||
tbssa.BSN_SB_SMP_ID = tbssag.BSN_SB_SMP_ID
|
||||
AND tcam.ASY_DEPT_ID = tbssag.ASY_DEPT_ID
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
tbspsa.BSN_SB_PRN_SMP_ID ,
|
||||
@@ -84,7 +96,7 @@
|
||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
||||
WHERE
|
||||
tbspsa.IS_RPOD = 0
|
||||
AND tbspsa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
AND tbspsa.CFG_ASY_MTHD_ID = #{reqVO.configAssayMethodId}
|
||||
GROUP BY
|
||||
tbspsa.BSN_SB_PRN_SMP_ID ,
|
||||
tbspsa.CFG_ASY_MTHD_ID ,
|
||||
@@ -94,7 +106,10 @@
|
||||
WHERE
|
||||
tbssa.IS_RPOD = 1
|
||||
AND t.IS_RPOD = 0
|
||||
AND tbssa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
AND tbssa.CFG_ASY_MTHD_ID = #{reqVO.configAssayMethodId}
|
||||
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||
</if>
|
||||
GROUP BY
|
||||
tcssp.BSE_SMP_ID ,
|
||||
tbsps.BSN_BSE_SMP_ID ,
|
||||
@@ -104,7 +119,8 @@
|
||||
tbssa.ASY_TP ,
|
||||
tbsps.CFG_SB_SMP_PRN_ID,
|
||||
tbsps.SMP_NAME ,
|
||||
tbs.NAME
|
||||
tbs.NAME,
|
||||
tbssag.SMP_RCV_TM
|
||||
</select>
|
||||
|
||||
<select id="getRecheckAssayMethodList" resultType="com.zt.plat.module.qms.business.bus.controller.vo.RecheckSubSampleParentMethodRespVO">
|
||||
@@ -134,12 +150,12 @@
|
||||
AND tmas.BSE_SMP_ID = #{baseSampleId}
|
||||
AND tmasd.DIC_PRJ_ID IN (
|
||||
SELECT
|
||||
tbspsa.DIC_PRJ_ID
|
||||
tbspsap.DIC_PRJ_ID
|
||||
FROM
|
||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
||||
T_BSN_SB_PRN_SMP_ASMT_PRJ tbspsap
|
||||
WHERE
|
||||
tbspsa.BSN_SB_PRN_SMP_ID = #{businessSubParentSampleId}
|
||||
AND tbspsa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
tbspsap.BSN_SB_PRN_SMP_ID = #{businessSubParentSampleId}
|
||||
AND tbspsap.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
)
|
||||
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierEvaluationAtMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierEvaluationMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierPropertiesMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user