feat:报告编制开发
This commit is contained in:
@@ -51,7 +51,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode CONFIG_REPORT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表类型配置不存在");
|
||||
ErrorCode CONFIG_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测项目配置不存在");
|
||||
ErrorCode CONFIG_ENTRUST_SOURCE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检验委托来源配置不存在");
|
||||
ErrorCode CONFIG_DOCUMENT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报告类型配置不存在");
|
||||
|
||||
ErrorCode CONFIG_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "主样配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目参数配置不存在");
|
||||
ErrorCode CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品库位信息不存在");
|
||||
@@ -101,8 +101,10 @@ public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode BUSINESS_TEAM_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "班组判定数据业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_DOCUMENT_MAIN_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告业务不存在");
|
||||
ErrorCode BUSINESS_DOCUMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告明细不存在");
|
||||
//检测报告
|
||||
ErrorCode REPORT_DOCUMENT_MAIN_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告业务不存在");
|
||||
ErrorCode REPORT_DOCUMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告明细不存在");
|
||||
ErrorCode REPORT_DOCUMENT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报告类型配置不存在");
|
||||
|
||||
/*=================================resource 资源管理 1_032_150_000 ~ 1_032_199_999 ==================================*/
|
||||
ErrorCode DEVICE_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备_设备信息不存在");
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessDocumentDataService;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 检测报告明细")
|
||||
@RestController
|
||||
@RequestMapping("/qms/business-document-data")
|
||||
@Validated
|
||||
public class BusinessDocumentDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessDocumentDataService businessDocumentDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建检测报告明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:create')")
|
||||
public CommonResult<BusinessDocumentDataRespVO> createBusinessDocumentData(@Valid @RequestBody BusinessDocumentDataSaveReqVO createReqVO) {
|
||||
return success(businessDocumentDataService.createBusinessDocumentData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新检测报告明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:update')")
|
||||
public CommonResult<Boolean> updateBusinessDocumentData(@Valid @RequestBody BusinessDocumentDataSaveReqVO updateReqVO) {
|
||||
businessDocumentDataService.updateBusinessDocumentData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除检测报告明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDocumentData(@RequestParam("id") Long id) {
|
||||
businessDocumentDataService.deleteBusinessDocumentData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除检测报告明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDocumentDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessDocumentDataService.deleteBusinessDocumentDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得检测报告明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:query')")
|
||||
public CommonResult<BusinessDocumentDataRespVO> getBusinessDocumentData(@RequestParam("id") Long id) {
|
||||
BusinessDocumentDataDO businessDocumentData = businessDocumentDataService.getBusinessDocumentData(id);
|
||||
return success(BeanUtils.toBean(businessDocumentData, BusinessDocumentDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得检测报告明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:query')")
|
||||
public CommonResult<PageResult<BusinessDocumentDataRespVO>> getBusinessDocumentDataPage(@Valid BusinessDocumentDataPageReqVO pageReqVO) {
|
||||
PageResult<BusinessDocumentDataDO> pageResult = businessDocumentDataService.getBusinessDocumentDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessDocumentDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出检测报告明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessDocumentDataExcel(@Valid BusinessDocumentDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessDocumentDataDO> list = businessDocumentDataService.getBusinessDocumentDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "检测报告明细.xls", "数据", BusinessDocumentDataRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessDocumentDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentMainDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessDocumentMainService;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 检测报告业务")
|
||||
@RestController
|
||||
@RequestMapping("/qms/business-document-main")
|
||||
@Validated
|
||||
public class BusinessDocumentMainController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessDocumentMainService businessDocumentMainService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建检测报告业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:create')")
|
||||
public CommonResult<BusinessDocumentMainRespVO> createBusinessDocumentMain(@Valid @RequestBody BusinessDocumentMainSaveReqVO createReqVO) {
|
||||
return success(businessDocumentMainService.createBusinessDocumentMain(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新检测报告业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:update')")
|
||||
public CommonResult<Boolean> updateBusinessDocumentMain(@Valid @RequestBody BusinessDocumentMainSaveReqVO updateReqVO) {
|
||||
businessDocumentMainService.updateBusinessDocumentMain(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除检测报告业务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDocumentMain(@RequestParam("id") Long id) {
|
||||
businessDocumentMainService.deleteBusinessDocumentMain(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除检测报告业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessDocumentMainList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessDocumentMainService.deleteBusinessDocumentMainListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得检测报告业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:query')")
|
||||
public CommonResult<BusinessDocumentMainRespVO> getBusinessDocumentMain(@RequestParam("id") Long id) {
|
||||
BusinessDocumentMainDO businessDocumentMain = businessDocumentMainService.getBusinessDocumentMain(id);
|
||||
return success(BeanUtils.toBean(businessDocumentMain, BusinessDocumentMainRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得检测报告业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:query')")
|
||||
public CommonResult<PageResult<BusinessDocumentMainRespVO>> getBusinessDocumentMainPage(@Valid BusinessDocumentMainPageReqVO pageReqVO) {
|
||||
PageResult<BusinessDocumentMainDO> pageResult = businessDocumentMainService.getBusinessDocumentMainPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessDocumentMainRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出检测报告业务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-document-main:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessDocumentMainExcel(@Valid BusinessDocumentMainPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessDocumentMainDO> list = businessDocumentMainService.getBusinessDocumentMainPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "检测报告业务.xls", "数据", BusinessDocumentMainRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessDocumentMainRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 检测报告业务新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessDocumentMainSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23015")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "流程实例ID", example = "780")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "报告类型ID", example = "15259")
|
||||
private Long configDocumentTypeId;
|
||||
|
||||
@Schema(description = "流程模型Key")
|
||||
private String modelKey;
|
||||
|
||||
@Schema(description = "流程流水号")
|
||||
private String flowSerialNumber;
|
||||
|
||||
@Schema(description = "当前节点", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "当前节点不能为空")
|
||||
private String currentNode;
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
private String documentCode;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空")
|
||||
private String documentType;
|
||||
|
||||
@Schema(description = "报告标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告标题不能为空")
|
||||
private String documentTitle;
|
||||
|
||||
@Schema(description = "报告配置项", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告配置项不能为空")
|
||||
private String documentConfig;
|
||||
|
||||
@Schema(description = "报告签名信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告签名信息不能为空")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "报告发起时间")
|
||||
private LocalDateTime documentStartTime;
|
||||
|
||||
@Schema(description = "报告结束时间")
|
||||
private LocalDateTime documentEndTime;
|
||||
|
||||
@Schema(description = "报告表单数据")
|
||||
private String formData;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String attachment;
|
||||
|
||||
@Schema(description = "状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "状态,【字典】【jy_doc_main_status】待编制、审批中、已结束不能为空")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentDataDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessDocumentDataMapper extends BaseMapperX<BusinessDocumentDataDO> {
|
||||
|
||||
default PageResult<BusinessDocumentDataDO> selectPage(BusinessDocumentDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessDocumentDataDO>()
|
||||
.eqIfPresent(BusinessDocumentDataDO::getBusinessDocumentMainId, reqVO.getBusinessDocumentMainId())
|
||||
.eqIfPresent(BusinessDocumentDataDO::getSourceId, reqVO.getSourceId())
|
||||
.eqIfPresent(BusinessDocumentDataDO::getDocumentContent, reqVO.getDocumentContent())
|
||||
.eqIfPresent(BusinessDocumentDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessDocumentDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessDocumentDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessDocumentDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentMainDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测报告业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessDocumentMainMapper extends BaseMapperX<BusinessDocumentMainDO> {
|
||||
|
||||
default PageResult<BusinessDocumentMainDO> selectPage(BusinessDocumentMainPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessDocumentMainDO>()
|
||||
.eqIfPresent(BusinessDocumentMainDO::getFlowInstanceId, reqVO.getFlowInstanceId())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getConfigDocumentTypeId, reqVO.getConfigDocumentTypeId())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getModelKey, reqVO.getModelKey())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getFlowSerialNumber, reqVO.getFlowSerialNumber())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getCurrentNode, reqVO.getCurrentNode())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getDocumentCode, reqVO.getDocumentCode())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getDocumentType, reqVO.getDocumentType())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getDocumentTitle, reqVO.getDocumentTitle())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getDocumentConfig, reqVO.getDocumentConfig())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getDocumentSignature, reqVO.getDocumentSignature())
|
||||
.betweenIfPresent(BusinessDocumentMainDO::getDocumentStartTime, reqVO.getDocumentStartTime())
|
||||
.betweenIfPresent(BusinessDocumentMainDO::getDocumentEndTime, reqVO.getDocumentEndTime())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getFormData, reqVO.getFormData())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getAttachment, reqVO.getAttachment())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessDocumentMainDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessDocumentMainDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessDocumentMainDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -63,4 +63,7 @@ public interface BusinessAssayReportDataService {
|
||||
*/
|
||||
PageResult<BusinessAssayReportDataDO> getBusinessAssayReportDataPage(BusinessAssayReportDataPageReqVO pageReqVO);
|
||||
|
||||
|
||||
List<BusinessAssayReportDataDO> listByIds(List<Long> ids);
|
||||
|
||||
}
|
||||
@@ -90,4 +90,8 @@ public class BusinessAssayReportDataServiceImpl implements BusinessAssayReportDa
|
||||
return businessAssayReportDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessAssayReportDataDO> listByIds(List<Long> ids) {
|
||||
return businessAssayReportDataMapper.selectByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentDataDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessDocumentDataService {
|
||||
|
||||
/**
|
||||
* 创建检测报告明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessDocumentDataRespVO createBusinessDocumentData(@Valid BusinessDocumentDataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新检测报告明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessDocumentData(@Valid BusinessDocumentDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除检测报告明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessDocumentData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除检测报告明细
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessDocumentDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得检测报告明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 检测报告明细
|
||||
*/
|
||||
BusinessDocumentDataDO getBusinessDocumentData(Long id);
|
||||
|
||||
/**
|
||||
* 获得检测报告明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 检测报告明细分页
|
||||
*/
|
||||
PageResult<BusinessDocumentDataDO> getBusinessDocumentDataPage(BusinessDocumentDataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentDataSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessDocumentDataMapper;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessDocumentDataServiceImpl implements BusinessDocumentDataService {
|
||||
|
||||
@Resource
|
||||
private BusinessDocumentDataMapper businessDocumentDataMapper;
|
||||
|
||||
@Override
|
||||
public BusinessDocumentDataRespVO createBusinessDocumentData(BusinessDocumentDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessDocumentDataDO businessDocumentData = BeanUtils.toBean(createReqVO, BusinessDocumentDataDO.class);
|
||||
businessDocumentDataMapper.insert(businessDocumentData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessDocumentData, BusinessDocumentDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessDocumentData(BusinessDocumentDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessDocumentDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessDocumentDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessDocumentDataDO.class);
|
||||
businessDocumentDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessDocumentData(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessDocumentDataExists(id);
|
||||
// 删除
|
||||
businessDocumentDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessDocumentDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessDocumentDataExists(ids);
|
||||
// 删除
|
||||
businessDocumentDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessDocumentDataExists(List<Long> ids) {
|
||||
List<BusinessDocumentDataDO> list = businessDocumentDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_DOCUMENT_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessDocumentDataExists(Long id) {
|
||||
if (businessDocumentDataMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_DOCUMENT_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessDocumentDataDO getBusinessDocumentData(Long id) {
|
||||
return businessDocumentDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessDocumentDataDO> getBusinessDocumentDataPage(BusinessDocumentDataPageReqVO pageReqVO) {
|
||||
return businessDocumentDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentMainDO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 检测报告业务 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessDocumentMainService {
|
||||
|
||||
/**
|
||||
* 创建检测报告业务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessDocumentMainRespVO createBusinessDocumentMain(@Valid BusinessDocumentMainSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新检测报告业务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessDocumentMain(@Valid BusinessDocumentMainSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除检测报告业务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessDocumentMain(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除检测报告业务
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessDocumentMainListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得检测报告业务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 检测报告业务
|
||||
*/
|
||||
BusinessDocumentMainDO getBusinessDocumentMain(Long id);
|
||||
|
||||
/**
|
||||
* 获得检测报告业务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 检测报告业务分页
|
||||
*/
|
||||
PageResult<BusinessDocumentMainDO> getBusinessDocumentMainPage(BusinessDocumentMainPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainRespVO;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessDocumentMainSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessDocumentMainDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessDocumentMainMapper;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 检测报告业务 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessDocumentMainServiceImpl implements BusinessDocumentMainService {
|
||||
|
||||
@Resource
|
||||
private BusinessDocumentMainMapper businessDocumentMainMapper;
|
||||
|
||||
@Override
|
||||
public BusinessDocumentMainRespVO createBusinessDocumentMain(BusinessDocumentMainSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessDocumentMainDO businessDocumentMain = BeanUtils.toBean(createReqVO, BusinessDocumentMainDO.class);
|
||||
businessDocumentMainMapper.insert(businessDocumentMain);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessDocumentMain, BusinessDocumentMainRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessDocumentMain(BusinessDocumentMainSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessDocumentMainExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessDocumentMainDO updateObj = BeanUtils.toBean(updateReqVO, BusinessDocumentMainDO.class);
|
||||
businessDocumentMainMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessDocumentMain(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessDocumentMainExists(id);
|
||||
// 删除
|
||||
businessDocumentMainMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessDocumentMainListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessDocumentMainExists(ids);
|
||||
// 删除
|
||||
businessDocumentMainMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessDocumentMainExists(List<Long> ids) {
|
||||
List<BusinessDocumentMainDO> list = businessDocumentMainMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_DOCUMENT_MAIN_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessDocumentMainExists(Long id) {
|
||||
if (businessDocumentMainMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_DOCUMENT_MAIN_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessDocumentMainDO getBusinessDocumentMain(Long id) {
|
||||
return businessDocumentMainMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessDocumentMainDO> getBusinessDocumentMainPage(BusinessDocumentMainPageReqVO pageReqVO) {
|
||||
return businessDocumentMainMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.admin;
|
||||
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypePageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypeRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypeSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
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.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigDocumentTypeService;
|
||||
|
||||
@Tag(name = "管理后台 - 报告类型配置")
|
||||
@RestController
|
||||
@RequestMapping("/qms/config-document-type")
|
||||
@Validated
|
||||
public class ConfigDocumentTypeController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigDocumentTypeService configDocumentTypeService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建报告类型配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:create')")
|
||||
public CommonResult<ConfigDocumentTypeRespVO> createConfigDocumentType(@Valid @RequestBody ConfigDocumentTypeSaveReqVO createReqVO) {
|
||||
return success(configDocumentTypeService.createConfigDocumentType(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新报告类型配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:update')")
|
||||
public CommonResult<Boolean> updateConfigDocumentType(@Valid @RequestBody ConfigDocumentTypeSaveReqVO updateReqVO) {
|
||||
configDocumentTypeService.updateConfigDocumentType(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除报告类型配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:delete')")
|
||||
public CommonResult<Boolean> deleteConfigDocumentType(@RequestParam("id") Long id) {
|
||||
configDocumentTypeService.deleteConfigDocumentType(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除报告类型配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:delete')")
|
||||
public CommonResult<Boolean> deleteConfigDocumentTypeList(@RequestBody BatchDeleteReqVO req) {
|
||||
configDocumentTypeService.deleteConfigDocumentTypeListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得报告类型配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:query')")
|
||||
public CommonResult<ConfigDocumentTypeRespVO> getConfigDocumentType(@RequestParam("id") Long id) {
|
||||
ConfigDocumentTypeDO configDocumentType = configDocumentTypeService.getConfigDocumentType(id);
|
||||
return success(BeanUtils.toBean(configDocumentType, ConfigDocumentTypeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得报告类型配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:query')")
|
||||
public CommonResult<PageResult<ConfigDocumentTypeRespVO>> getConfigDocumentTypePage(@Valid ConfigDocumentTypePageReqVO pageReqVO) {
|
||||
PageResult<ConfigDocumentTypeDO> pageResult = configDocumentTypeService.getConfigDocumentTypePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigDocumentTypeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出报告类型配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-document-type:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigDocumentTypeExcel(@Valid ConfigDocumentTypePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigDocumentTypeDO> list = configDocumentTypeService.getConfigDocumentTypePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "报告类型配置.xls", "数据", ConfigDocumentTypeRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigDocumentTypeRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置分页 Request VO")
|
||||
@Data
|
||||
public class ConfigDocumentTypePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报表类型ID", example = "23835")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程模型key")
|
||||
private String flowModelKey;
|
||||
|
||||
@Schema(description = "流程表单key")
|
||||
private String flowFormKey;
|
||||
|
||||
@Schema(description = "报告模板key")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ConfigDocumentTypeRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8816")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23835")
|
||||
@ExcelProperty("报表类型ID")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("类型名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程模型key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("流程模型key")
|
||||
private String flowModelKey;
|
||||
|
||||
@Schema(description = "流程表单key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("流程表单key")
|
||||
private String flowFormKey;
|
||||
|
||||
@Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告模板key")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告编号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("版本")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigDocumentTypeSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8816")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23835")
|
||||
@NotNull(message = "报表类型ID不能为空")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "类型名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程模型key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程模型key不能为空")
|
||||
private String flowModelKey;
|
||||
|
||||
@Schema(description = "流程表单key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程表单key不能为空")
|
||||
private String flowFormKey;
|
||||
|
||||
@Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告模板key不能为空")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告编号规则不能为空")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "版本不能为空")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 报告类型配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_cfg_doc_tp")
|
||||
@KeySequence("t_cfg_doc_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ConfigDocumentTypeDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 报表类型ID
|
||||
*/
|
||||
@TableField("CFG_RPT_TP_ID")
|
||||
private Long configReportTypeId;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 流程模型key
|
||||
*/
|
||||
@TableField("FLW_MDL_KY")
|
||||
private String flowModelKey;
|
||||
/**
|
||||
* 流程表单key
|
||||
*/
|
||||
@TableField("FLW_FORM_KY")
|
||||
private String flowFormKey;
|
||||
/**
|
||||
* 报告模板key
|
||||
*/
|
||||
@TableField("RPT_KY")
|
||||
private String reportKey;
|
||||
/**
|
||||
* 报告编号规则
|
||||
*/
|
||||
@TableField("CD_RUL")
|
||||
private String codeRule;
|
||||
/**
|
||||
* 报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
@TableField("VER")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypePageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
|
||||
/**
|
||||
* 报告类型配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigDocumentTypeMapper extends BaseMapperX<ConfigDocumentTypeDO> {
|
||||
|
||||
default PageResult<ConfigDocumentTypeDO> selectPage(ConfigDocumentTypePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigDocumentTypeDO>()
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getConfigReportTypeId, reqVO.getConfigReportTypeId())
|
||||
.likeIfPresent(ConfigDocumentTypeDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getFlowModelKey, reqVO.getFlowModelKey())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getFlowFormKey, reqVO.getFlowFormKey())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getReportKey, reqVO.getReportKey())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getCodeRule, reqVO.getCodeRule())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigDocumentTypeDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ConfigDocumentTypeDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(ConfigDocumentTypeDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypePageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypeRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypeSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 报告类型配置 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigDocumentTypeService {
|
||||
|
||||
/**
|
||||
* 创建报告类型配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigDocumentTypeRespVO createConfigDocumentType(@Valid ConfigDocumentTypeSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新报告类型配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigDocumentType(@Valid ConfigDocumentTypeSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除报告类型配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigDocumentType(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除报告类型配置
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigDocumentTypeListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得报告类型配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 报告类型配置
|
||||
*/
|
||||
ConfigDocumentTypeDO getConfigDocumentType(Long id);
|
||||
|
||||
/**
|
||||
* 获得报告类型配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 报告类型配置分页
|
||||
*/
|
||||
PageResult<ConfigDocumentTypeDO> getConfigDocumentTypePage(ConfigDocumentTypePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypePageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypeRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigDocumentTypeSaveReqVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigDocumentTypeMapper;
|
||||
|
||||
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.CONFIG_DOCUMENT_TYPE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 报告类型配置 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ConfigDocumentTypeServiceImpl implements ConfigDocumentTypeService {
|
||||
|
||||
@Resource
|
||||
private ConfigDocumentTypeMapper configDocumentTypeMapper;
|
||||
|
||||
@Override
|
||||
public ConfigDocumentTypeRespVO createConfigDocumentType(ConfigDocumentTypeSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigDocumentTypeDO configDocumentType = BeanUtils.toBean(createReqVO, ConfigDocumentTypeDO.class);
|
||||
configDocumentTypeMapper.insert(configDocumentType);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configDocumentType, ConfigDocumentTypeRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigDocumentType(ConfigDocumentTypeSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigDocumentTypeExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigDocumentTypeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigDocumentTypeDO.class);
|
||||
configDocumentTypeMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigDocumentType(Long id) {
|
||||
// 校验存在
|
||||
validateConfigDocumentTypeExists(id);
|
||||
// 删除
|
||||
configDocumentTypeMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigDocumentTypeListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigDocumentTypeExists(ids);
|
||||
// 删除
|
||||
configDocumentTypeMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigDocumentTypeExists(List<Long> ids) {
|
||||
List<ConfigDocumentTypeDO> list = configDocumentTypeMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_DOCUMENT_TYPE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigDocumentTypeExists(Long id) {
|
||||
if (configDocumentTypeMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_DOCUMENT_TYPE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigDocumentTypeDO getConfigDocumentType(Long id) {
|
||||
return configDocumentTypeMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigDocumentTypeDO> getConfigDocumentTypePage(ConfigDocumentTypePageReqVO pageReqVO) {
|
||||
return configDocumentTypeMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.admin;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentDataPageReqVO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentDataRespVO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentDataSaveReqVO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.service.ReportDocumentDataService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 检测报告明细")
|
||||
@RestController
|
||||
@RequestMapping("/qms/report-document-data")
|
||||
@Validated
|
||||
@FileUploadController(source = "qms.reportdocumentdata")
|
||||
public class ReportDocumentDataController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = ReportDocumentDataController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private ReportDocumentDataService reportDocumentDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建检测报告明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:create')")
|
||||
public CommonResult<ReportDocumentDataRespVO> createReportDocumentData(@Valid @RequestBody ReportDocumentDataSaveReqVO createReqVO) {
|
||||
return success(reportDocumentDataService.createReportDocumentData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新检测报告明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:update')")
|
||||
public CommonResult<Boolean> updateReportDocumentData(@Valid @RequestBody ReportDocumentDataSaveReqVO updateReqVO) {
|
||||
reportDocumentDataService.updateReportDocumentData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除检测报告明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:delete')")
|
||||
public CommonResult<Boolean> deleteReportDocumentData(@RequestParam("id") Long id) {
|
||||
reportDocumentDataService.deleteReportDocumentData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除检测报告明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:delete')")
|
||||
public CommonResult<Boolean> deleteReportDocumentDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
reportDocumentDataService.deleteReportDocumentDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得检测报告明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:query')")
|
||||
public CommonResult<ReportDocumentDataRespVO> getReportDocumentData(@RequestParam("id") Long id) {
|
||||
ReportDocumentDataDO reportDocumentData = reportDocumentDataService.getReportDocumentData(id);
|
||||
return success(BeanUtils.toBean(reportDocumentData, ReportDocumentDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得检测报告明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:query')")
|
||||
public CommonResult<PageResult<ReportDocumentDataRespVO>> getReportDocumentDataPage(@Valid ReportDocumentDataPageReqVO pageReqVO) {
|
||||
PageResult<ReportDocumentDataDO> pageResult = reportDocumentDataService.getReportDocumentDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ReportDocumentDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出检测报告明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportReportDocumentDataExcel(@Valid ReportDocumentDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ReportDocumentDataDO> list = reportDocumentDataService.getReportDocumentDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "检测报告明细.xls", "数据", ReportDocumentDataRespVO.class,
|
||||
BeanUtils.toBean(list, ReportDocumentDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.admin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentMainDO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.service.ReportDocumentMainService;
|
||||
import com.zt.plat.module.qms.business.reportdoc.service.ReportDocumentTypeService;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.error;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.REPORT_DOCUMENT_TYPE_NOT_EXISTS;
|
||||
|
||||
@Tag(name = "管理后台 - 检测报告业务")
|
||||
@RestController
|
||||
@RequestMapping("/qms/report-document-main")
|
||||
@Validated
|
||||
@FileUploadController(source = "qms.reportdocumentmain")
|
||||
public class ReportDocumentMainController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = ReportDocumentMainController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource private ReportDocumentMainService reportDocumentMainService;
|
||||
@Resource private ReportDocumentTypeService reportDocumentTypeService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建检测报告业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:create')")
|
||||
public CommonResult<ReportDocumentMainRespVO> createReportDocumentMain(@Valid @RequestBody ReportDocumentMainSaveReqVO createReqVO) {
|
||||
return success(reportDocumentMainService.createReportDocumentMain(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/createTempData")
|
||||
@Operation(summary = "创建临时数据")
|
||||
public CommonResult<ReportDocumentMainRespVO> createTempData(@RequestBody ReportDocumentMainSaveReqVO vo) {
|
||||
Long reportDocumentTypeId = vo.getReportDocumentTypeId();
|
||||
if(reportDocumentTypeId == null){
|
||||
return error(REPORT_DOCUMENT_TYPE_NOT_EXISTS, "报告类型ID不能为空,请刷新后重试");
|
||||
}
|
||||
ReportDocumentTypeDO typeDO = reportDocumentTypeService.getReportDocumentType(reportDocumentTypeId);
|
||||
if(typeDO == null){
|
||||
return error(REPORT_DOCUMENT_TYPE_NOT_EXISTS, "报告类型不存在,请刷新后重试");
|
||||
}
|
||||
vo.setFlowKey(typeDO.getFlowKey());
|
||||
vo.setDocumentType(typeDO.getDocumentType());
|
||||
vo.setDocumentConfig(JSONObject.toJSONString(typeDO));
|
||||
vo.setFlowStatus(QmsCommonConstant.NOT_START);
|
||||
vo.setCancelFlag("-1");
|
||||
return success(reportDocumentMainService.createReportDocumentMain(vo));
|
||||
}
|
||||
|
||||
@PostMapping("/execAddData")
|
||||
@Operation(summary = "增加数据")
|
||||
public CommonResult<String> execAddData(@RequestBody ReportDocumentMainSaveReqVO vo) {
|
||||
return reportDocumentMainService.execAddData(vo);
|
||||
}
|
||||
|
||||
@PostMapping("/execRemoveData")
|
||||
@Operation(summary = "移除数据")
|
||||
public CommonResult<String> execRemoveData(@RequestBody ReportDocumentMainSaveReqVO vo) {
|
||||
return reportDocumentMainService.execRemoveData(vo);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新检测报告业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:update')")
|
||||
public CommonResult<Boolean> updateReportDocumentMain(@Valid @RequestBody ReportDocumentMainSaveReqVO updateReqVO) {
|
||||
reportDocumentMainService.updateReportDocumentMain(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除检测报告业务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:delete')")
|
||||
public CommonResult<Boolean> deleteReportDocumentMain(@RequestParam("id") Long id) {
|
||||
reportDocumentMainService.deleteReportDocumentMain(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除检测报告业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:delete')")
|
||||
public CommonResult<Boolean> deleteReportDocumentMainList(@RequestBody BatchDeleteReqVO req) {
|
||||
reportDocumentMainService.deleteReportDocumentMainListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得检测报告业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:query')")
|
||||
public CommonResult<ReportDocumentMainRespVO> getReportDocumentMain(@RequestParam("id") Long id) {
|
||||
ReportDocumentMainDO reportDocumentMain = reportDocumentMainService.getReportDocumentMain(id);
|
||||
return success(BeanUtils.toBean(reportDocumentMain, ReportDocumentMainRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得检测报告业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:query')")
|
||||
public CommonResult<PageResult<ReportDocumentMainRespVO>> getReportDocumentMainPage(@Valid ReportDocumentMainPageReqVO pageReqVO) {
|
||||
PageResult<ReportDocumentMainDO> pageResult = reportDocumentMainService.getReportDocumentMainPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ReportDocumentMainRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出检测报告业务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-main:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportReportDocumentMainExcel(@Valid ReportDocumentMainPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ReportDocumentMainDO> list = reportDocumentMainService.getReportDocumentMainPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "检测报告业务.xls", "数据", ReportDocumentMainRespVO.class,
|
||||
BeanUtils.toBean(list, ReportDocumentMainRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.admin;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.service.ReportDocumentTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 报告类型配置")
|
||||
@RestController
|
||||
@RequestMapping("/qms/report-document-type")
|
||||
@Validated
|
||||
public class ReportDocumentTypeController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ReportDocumentTypeService reportDocumentTypeService;
|
||||
|
||||
@PostMapping("/save")
|
||||
@Operation(summary = "更新报告类型配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-type:update')")
|
||||
public CommonResult<String> updateReportDocumentType(@Valid @RequestBody ReportDocumentTypeSaveReqVO updateReqVO) {
|
||||
return reportDocumentTypeService.save(updateReqVO);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除报告类型配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-type:delete')")
|
||||
public CommonResult<Boolean> deleteReportDocumentType(@RequestParam("id") Long id) {
|
||||
reportDocumentTypeService.deleteReportDocumentType(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除报告类型配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-type:delete')")
|
||||
public CommonResult<Boolean> deleteReportDocumentTypeList(@RequestBody BatchDeleteReqVO req) {
|
||||
reportDocumentTypeService.deleteReportDocumentTypeListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得报告类型配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-type:query')")
|
||||
public CommonResult<ReportDocumentTypeRespVO> getReportDocumentType(@RequestParam("id") Long id) {
|
||||
ReportDocumentTypeDO reportDocumentType = reportDocumentTypeService.getReportDocumentType(id);
|
||||
return success(BeanUtils.toBean(reportDocumentType, ReportDocumentTypeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得报告类型配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-type:query')")
|
||||
public CommonResult<PageResult<ReportDocumentTypeRespVO>> getReportDocumentTypePage(@Valid ReportDocumentTypePageReqVO pageReqVO) {
|
||||
PageResult<ReportDocumentTypeDO> pageResult = reportDocumentTypeService.getReportDocumentTypePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ReportDocumentTypeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出报告类型配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:report-document-type:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportReportDocumentTypeExcel(@Valid ReportDocumentTypePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ReportDocumentTypeDO> list = reportDocumentTypeService.getReportDocumentTypePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "报告类型配置.xls", "数据", ReportDocumentTypeRespVO.class,
|
||||
BeanUtils.toBean(list, ReportDocumentTypeRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
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 BusinessDocumentDataPageReqVO extends PageParam {
|
||||
public class ReportDocumentDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报告ID", example = "26917")
|
||||
private Long businessDocumentMainId;
|
||||
@Schema(description = "报告ID", example = "13627")
|
||||
private Long mainId;
|
||||
|
||||
@Schema(description = "原始数据ID", example = "17211")
|
||||
@Schema(description = "原始数据ID", example = "19655")
|
||||
private Long sourceId;
|
||||
|
||||
@Schema(description = "数据内容")
|
||||
@@ -1,26 +1,26 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 检测报告明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessDocumentDataRespVO {
|
||||
public class ReportDocumentDataRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18647")
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3054")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26917")
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13627")
|
||||
@ExcelProperty("报告ID")
|
||||
private Long businessDocumentMainId;
|
||||
private Long mainId;
|
||||
|
||||
@Schema(description = "原始数据ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17211")
|
||||
@Schema(description = "原始数据ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19655")
|
||||
@ExcelProperty("原始数据ID")
|
||||
private Long sourceId;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BusinessDocumentDataRespVO {
|
||||
@ExcelProperty("数据内容")
|
||||
private String documentContent;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@@ -1,29 +1,28 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 检测报告明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessDocumentDataSaveReqVO {
|
||||
public class ReportDocumentDataSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18647")
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3054")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26917")
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13627")
|
||||
@NotNull(message = "报告ID不能为空")
|
||||
private Long businessDocumentMainId;
|
||||
private Long mainId;
|
||||
|
||||
@Schema(description = "原始数据ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17211")
|
||||
@Schema(description = "原始数据ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19655")
|
||||
@NotNull(message = "原始数据ID不能为空")
|
||||
private Long sourceId;
|
||||
|
||||
@Schema(description = "数据内容")
|
||||
private String documentContent;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@@ -1,26 +1,27 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
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 BusinessDocumentMainPageReqVO extends PageParam {
|
||||
public class ReportDocumentMainPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "流程实例ID", example = "780")
|
||||
@Schema(description = "流程实例ID", example = "10765")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "报告类型ID", example = "15259")
|
||||
private Long configDocumentTypeId;
|
||||
@Schema(description = "报告类型ID", example = "2124")
|
||||
private Long reportDocumentTypeId;
|
||||
|
||||
@Schema(description = "流程模型Key")
|
||||
private String modelKey;
|
||||
private String flowKey;
|
||||
|
||||
@Schema(description = "流程流水号")
|
||||
private String flowSerialNumber;
|
||||
@@ -29,9 +30,9 @@ public class BusinessDocumentMainPageReqVO extends PageParam {
|
||||
private String currentNode;
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
private String documentCode;
|
||||
private String documentCustomsDeclaration;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "1")
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "2")
|
||||
private String documentType;
|
||||
|
||||
@Schema(description = "报告标题")
|
||||
@@ -54,11 +55,11 @@ public class BusinessDocumentMainPageReqVO extends PageParam {
|
||||
@Schema(description = "报告表单数据")
|
||||
private String formData;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String attachment;
|
||||
@Schema(description = "审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", example = "2")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", example = "2")
|
||||
private String status;
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
private String cancelFlag;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
@@ -70,4 +71,16 @@ public class BusinessDocumentMainPageReqVO extends PageParam {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "发布状态")
|
||||
private String publishStatus;
|
||||
|
||||
@Schema(description = "发布人id")
|
||||
private String publishUserId;
|
||||
|
||||
@Schema(description = "发布人姓名")
|
||||
private String publishUserName;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
private String publishTime;
|
||||
|
||||
}
|
||||
@@ -1,46 +1,46 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 检测报告业务 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessDocumentMainRespVO {
|
||||
public class ReportDocumentMainRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23015")
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6004")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "流程实例ID", example = "780")
|
||||
@Schema(description = "流程实例ID", example = "10765")
|
||||
@ExcelProperty("流程实例ID")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "报告类型ID", example = "15259")
|
||||
@Schema(description = "报告类型ID", example = "2124")
|
||||
@ExcelProperty("报告类型ID")
|
||||
private Long configDocumentTypeId;
|
||||
private Long reportDocumentTypeId;
|
||||
|
||||
@Schema(description = "流程模型Key")
|
||||
@ExcelProperty("流程模型Key")
|
||||
private String modelKey;
|
||||
private String flowKey;
|
||||
|
||||
@Schema(description = "流程流水号")
|
||||
@ExcelProperty("流程流水号")
|
||||
private String flowSerialNumber;
|
||||
|
||||
@Schema(description = "当前节点", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "当前节点")
|
||||
@ExcelProperty("当前节点")
|
||||
private String currentNode;
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
@ExcelProperty("报告编号")
|
||||
private String documentCode;
|
||||
private String documentCustomsDeclaration;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告")
|
||||
private String documentType;
|
||||
|
||||
@@ -48,11 +48,11 @@ public class BusinessDocumentMainRespVO {
|
||||
@ExcelProperty("报告标题")
|
||||
private String documentTitle;
|
||||
|
||||
@Schema(description = "报告配置项", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "报告配置项")
|
||||
@ExcelProperty("报告配置项")
|
||||
private String documentConfig;
|
||||
|
||||
@Schema(description = "报告签名信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "报告签名信息")
|
||||
@ExcelProperty("报告签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@@ -68,15 +68,15 @@ public class BusinessDocumentMainRespVO {
|
||||
@ExcelProperty("报告表单数据")
|
||||
private String formData;
|
||||
|
||||
@Schema(description = "附件")
|
||||
@ExcelProperty("附件")
|
||||
private String attachment;
|
||||
@Schema(description = "审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("状态,【字典】【jy_doc_main_status】待编制、审批中、已结束")
|
||||
private String status;
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
@ExcelProperty("作废标识:0-有效;1-作废")
|
||||
private String cancelFlag;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@@ -88,4 +88,20 @@ public class BusinessDocumentMainRespVO {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "发布状态")
|
||||
@ExcelProperty("发布状态")
|
||||
private String publishStatus;
|
||||
|
||||
@Schema(description = "发布人id")
|
||||
@ExcelProperty("发布人id")
|
||||
private String publishUserId;
|
||||
|
||||
@Schema(description = "发布人姓名")
|
||||
@ExcelProperty("发布人姓名")
|
||||
private String publishUserName;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
@ExcelProperty("发布时间")
|
||||
private String publishTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 检测报告业务新增/修改 Request VO")
|
||||
@Data
|
||||
public class ReportDocumentMainSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6004")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "流程实例ID", example = "10765")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "报告类型ID", example = "2124")
|
||||
private Long reportDocumentTypeId;
|
||||
|
||||
@Schema(description = "流程模型Key")
|
||||
private String flowKey;
|
||||
|
||||
@Schema(description = "流程流水号")
|
||||
private String flowSerialNumber;
|
||||
|
||||
@Schema(description = "当前节点")
|
||||
private String currentNode;
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
private String documentCustomsDeclaration;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private String documentType;
|
||||
|
||||
@Schema(description = "报告标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String documentTitle;
|
||||
|
||||
@Schema(description = "报告配置项")
|
||||
private String documentConfig;
|
||||
|
||||
@Schema(description = "报告签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "报告发起时间")
|
||||
private LocalDateTime documentStartTime;
|
||||
|
||||
@Schema(description = "报告结束时间")
|
||||
private LocalDateTime documentEndTime;
|
||||
|
||||
@Schema(description = "报告表单数据")
|
||||
private String formData;
|
||||
|
||||
@Schema(description = "审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
private String cancelFlag;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "发布状态")
|
||||
private String publishStatus;
|
||||
|
||||
@Schema(description = "发布人id")
|
||||
private String publishUserId;
|
||||
|
||||
@Schema(description = "发布人姓名")
|
||||
private String publishUserName;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
private String publishTime;
|
||||
|
||||
@Schema(description = "报表数据ids")
|
||||
private String businessAssayReportDataIds;
|
||||
|
||||
@Schema(description = "报告明细数据ids")
|
||||
private String reportDocumentDataIds;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
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 ReportDocumentTypePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报表类型ID", example = "9447")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程key")
|
||||
private String flowKey;
|
||||
|
||||
@Schema(description = "报告模板key")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则")
|
||||
private String customsDeclarationRule;
|
||||
|
||||
@Schema(description = "报告分类")
|
||||
private String documentType;
|
||||
|
||||
@Schema(description = "权限")
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "样品数量", example = "30323")
|
||||
private Integer sampleCount;
|
||||
|
||||
@Schema(description = "其他配置")
|
||||
private String customConfig;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
@Schema(description = "是否最新版本")
|
||||
private Integer currentFlag;
|
||||
|
||||
@Schema(description = "主id")
|
||||
private Long mainId;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ReportDocumentTypeRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9014")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9447")
|
||||
@ExcelProperty("报表类型ID")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("类型名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("流程key")
|
||||
private String flowKey;
|
||||
|
||||
@Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告模板key")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告编号规则")
|
||||
private String customsDeclarationRule;
|
||||
|
||||
@Schema(description = "报告分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("报告分类")
|
||||
@Dict(dicCode = "jy_doc_main_type")
|
||||
private String documentType;
|
||||
|
||||
@Schema(description = "权限")
|
||||
@ExcelProperty("权限")
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "样品数量", example = "30323")
|
||||
@ExcelProperty("样品数量")
|
||||
private Integer sampleCount;
|
||||
|
||||
@Schema(description = "其他配置")
|
||||
@ExcelProperty("其他配置")
|
||||
private String customConfig;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("版本")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@ExcelProperty("排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
@Schema(description = "是否最新版本")
|
||||
@ExcelProperty("是否最新版本")
|
||||
private String currentFlag;
|
||||
|
||||
@Schema(description = "主id")
|
||||
@ExcelProperty("主id")
|
||||
private Long mainId;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ReportDocumentTypeSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9014")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9447")
|
||||
@NotNull(message = "报表类型ID不能为空")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "类型名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程key不能为空")
|
||||
private String flowKey;
|
||||
|
||||
@Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告模板key不能为空")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告编号规则不能为空")
|
||||
private String customsDeclarationRule;
|
||||
|
||||
@Schema(description = "报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空")
|
||||
private String documentType;
|
||||
|
||||
@Schema(description = "权限")
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "样品数量", example = "30323")
|
||||
private Integer sampleCount;
|
||||
|
||||
@Schema(description = "其他配置")
|
||||
private String customConfig;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
@Schema(description = "是否最新版本")
|
||||
private Integer currentFlag;
|
||||
|
||||
@Schema(description = "是否创建新版本")
|
||||
private String newVersionFlag;
|
||||
|
||||
@Schema(description = "主id")
|
||||
private Long mainId;
|
||||
}
|
||||
@@ -1,18 +1,15 @@
|
||||
package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
||||
package com.zt.plat.module.qms.business.reportdoc.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 检测报告明细 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_bsn_doc_dat")
|
||||
@KeySequence("t_bsn_doc_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@TableName("t_rpt_doc_dat")
|
||||
@KeySequence("t_rpt_doc_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@@ -22,7 +19,7 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class BusinessDocumentDataDO extends BusinessBaseDO {
|
||||
public class ReportDocumentDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
@@ -34,8 +31,8 @@ public class BusinessDocumentDataDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 报告ID
|
||||
*/
|
||||
@TableField("BSN_DOC_MAIN_ID")
|
||||
private Long businessDocumentMainId;
|
||||
@TableField("MAIN_ID")
|
||||
private Long mainId;
|
||||
/**
|
||||
* 原始数据ID
|
||||
*/
|
||||
@@ -1,20 +1,18 @@
|
||||
package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
||||
package com.zt.plat.module.qms.business.reportdoc.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* 检测报告业务 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_bsn_doc_main")
|
||||
@KeySequence("t_bsn_doc_main_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@TableName("t_rpt_doc_main")
|
||||
@KeySequence("t_rpt_doc_main_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@@ -24,7 +22,7 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class BusinessDocumentMainDO extends BusinessBaseDO {
|
||||
public class ReportDocumentMainDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
@@ -41,13 +39,13 @@ public class BusinessDocumentMainDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 报告类型ID
|
||||
*/
|
||||
@TableField("CFG_DOC_TP_ID")
|
||||
private Long configDocumentTypeId;
|
||||
@TableField("RPT_DOC_TP")
|
||||
private Long reportDocumentTypeId;
|
||||
/**
|
||||
* 流程模型Key
|
||||
*/
|
||||
@TableField("MDL_KY")
|
||||
private String modelKey;
|
||||
@TableField("FLW_KY")
|
||||
private String flowKey;
|
||||
/**
|
||||
* 流程流水号
|
||||
*/
|
||||
@@ -62,7 +60,7 @@ public class BusinessDocumentMainDO extends BusinessBaseDO {
|
||||
* 报告编号
|
||||
*/
|
||||
@TableField("DOC_CD")
|
||||
private String documentCode;
|
||||
private String documentCustomsDeclaration;
|
||||
/**
|
||||
* 报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告
|
||||
*/
|
||||
@@ -99,15 +97,15 @@ public class BusinessDocumentMainDO extends BusinessBaseDO {
|
||||
@TableField("FORM_DAT")
|
||||
private String formData;
|
||||
/**
|
||||
* 附件
|
||||
* 审批状态,【字典】【jy_doc_main_status】待编制、审批中、已结束
|
||||
*/
|
||||
@TableField("ATM")
|
||||
private String attachment;
|
||||
@TableField("FLW_STS")
|
||||
private String flowStatus;
|
||||
/**
|
||||
* 状态,【字典】【jy_doc_main_status】待编制、审批中、已结束
|
||||
* 作废标识:0-有效;1-作废
|
||||
*/
|
||||
@TableField("STS")
|
||||
private String status;
|
||||
@TableField("CNL_FLG")
|
||||
private String cancelFlag;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@@ -119,4 +117,19 @@ public class BusinessDocumentMainDO extends BusinessBaseDO {
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
//发布状态
|
||||
@TableField("PUB_STS")
|
||||
private String publishStatus;
|
||||
|
||||
//发布人id
|
||||
@TableField("PUB_USER_ID")
|
||||
private String publishUserId;
|
||||
|
||||
//发布人姓名
|
||||
@TableField("PUB_USER_NAME")
|
||||
private String publishUserName;
|
||||
|
||||
//发布时间
|
||||
@TableField("PUB_USER_TIME")
|
||||
private String publishTime;
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.dal.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 报告类型配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_rpt_doc_tp")
|
||||
@KeySequence("t_rpt_doc_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ReportDocumentTypeDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 报表类型ID
|
||||
*/
|
||||
@TableField("CFG_RPT_TP_ID")
|
||||
private Long configReportTypeId;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 流程key
|
||||
*/
|
||||
@TableField("FLW_KY")
|
||||
private String flowKey;
|
||||
/**
|
||||
* 报告模板key
|
||||
*/
|
||||
@TableField("RPT_KY")
|
||||
private String reportKey;
|
||||
/**
|
||||
* 报告编号规则
|
||||
*/
|
||||
@TableField("CD_RUL")
|
||||
private String customsDeclarationRule;
|
||||
/**
|
||||
* 报告分类,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告
|
||||
*/
|
||||
@TableField("DOC_TP")
|
||||
private String documentType;
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
@TableField("PERM")
|
||||
private Integer permission;
|
||||
/**
|
||||
* 样品数量
|
||||
*/
|
||||
@TableField("SMP_CNT")
|
||||
private Integer sampleCount;
|
||||
/**
|
||||
* 其他配置
|
||||
*/
|
||||
@TableField("CST_CFG")
|
||||
private String customConfig;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
@TableField("VER")
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@TableField("SRT_NO")
|
||||
private Integer sortNo;
|
||||
|
||||
/**
|
||||
* 是否最新版本,默认显示最新版本
|
||||
*/
|
||||
@TableField("CRNT_FLG")
|
||||
private Integer currentFlag;
|
||||
|
||||
//主id
|
||||
@TableField("MAIN_ID")
|
||||
private Long mainId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReportDocumentDataMapper extends BaseMapperX<ReportDocumentDataDO> {
|
||||
|
||||
default PageResult<ReportDocumentDataDO> selectPage(ReportDocumentDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ReportDocumentDataDO>()
|
||||
.eqIfPresent(ReportDocumentDataDO::getMainId, reqVO.getMainId())
|
||||
.eqIfPresent(ReportDocumentDataDO::getSourceId, reqVO.getSourceId())
|
||||
.eqIfPresent(ReportDocumentDataDO::getDocumentContent, reqVO.getDocumentContent())
|
||||
.eqIfPresent(ReportDocumentDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ReportDocumentDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ReportDocumentDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ReportDocumentDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentMainDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测报告业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReportDocumentMainMapper extends BaseMapperX<ReportDocumentMainDO> {
|
||||
|
||||
|
||||
default PageResult<ReportDocumentMainDO> selectPage(ReportDocumentMainPageReqVO reqVO) {
|
||||
LambdaQueryWrapperX<ReportDocumentMainDO> wrapper = new LambdaQueryWrapperX<>();
|
||||
wrapper.ne(ReportDocumentMainDO::getCancelFlag, -1); //-1为临时数据
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowInstanceId, reqVO.getFlowInstanceId());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getReportDocumentTypeId, reqVO.getReportDocumentTypeId());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowKey, reqVO.getFlowKey());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowSerialNumber, reqVO.getFlowSerialNumber());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getCurrentNode, reqVO.getCurrentNode());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentCustomsDeclaration, reqVO.getDocumentCustomsDeclaration());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentType, reqVO.getDocumentType());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentTitle, reqVO.getDocumentTitle());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentConfig, reqVO.getDocumentConfig());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getDocumentSignature, reqVO.getDocumentSignature());
|
||||
wrapper.betweenIfPresent(ReportDocumentMainDO::getDocumentStartTime, reqVO.getDocumentStartTime());
|
||||
wrapper.betweenIfPresent(ReportDocumentMainDO::getDocumentEndTime, reqVO.getDocumentEndTime());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getFormData, reqVO.getFormData());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowStatus, reqVO.getFlowStatus());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getCancelFlag, reqVO.getCancelFlag());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode());
|
||||
wrapper.betweenIfPresent(ReportDocumentMainDO::getCreateTime, reqVO.getCreateTime());
|
||||
wrapper.eqIfPresent(ReportDocumentMainDO::getRemark, reqVO.getRemark());
|
||||
wrapper.orderByDesc(ReportDocumentMainDO::getId);
|
||||
return selectPage(reqVO, wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 报告类型配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReportDocumentTypeMapper extends BaseMapperX<ReportDocumentTypeDO> {
|
||||
|
||||
default PageResult<ReportDocumentTypeDO> selectPage(ReportDocumentTypePageReqVO reqVO) {
|
||||
LambdaQueryWrapperX<ReportDocumentTypeDO> wrapper = new LambdaQueryWrapperX<>();
|
||||
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getConfigReportTypeId, reqVO.getConfigReportTypeId());
|
||||
wrapper.likeIfPresent(ReportDocumentTypeDO::getName, reqVO.getName());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getFlowKey, reqVO.getFlowKey());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getReportKey, reqVO.getReportKey());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getCustomsDeclarationRule, reqVO.getCustomsDeclarationRule());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getDocumentType, reqVO.getDocumentType());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getPermission, reqVO.getPermission());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getSampleCount, reqVO.getSampleCount());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getCustomConfig, reqVO.getCustomConfig());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode());
|
||||
wrapper.betweenIfPresent(ReportDocumentTypeDO::getCreateTime, reqVO.getCreateTime());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getRemark, reqVO.getRemark());
|
||||
wrapper.eqIfPresent(ReportDocumentTypeDO::getVersion, reqVO.getVersion());
|
||||
wrapper.orderByDesc(ReportDocumentTypeDO::getId);
|
||||
if(reqVO.getMainId() != null){
|
||||
wrapper.orderByDesc(ReportDocumentTypeDO::getVersion);
|
||||
}
|
||||
wrapper.orderByAsc(ReportDocumentTypeDO::getSortNo);
|
||||
return selectPage(reqVO, wrapper);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.service;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ReportDocumentDataService {
|
||||
|
||||
CommonResult<List<ReportDocumentDataDO>> listByMainDataId(Long mainDataId);
|
||||
CommonResult<String> removeByMainIdAndDetailIds(Long mainDataId, List<Long> detailIds);
|
||||
|
||||
/**
|
||||
* 创建检测报告明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ReportDocumentDataRespVO createReportDocumentData(@Valid ReportDocumentDataSaveReqVO createReqVO);
|
||||
|
||||
|
||||
CommonResult<String> insertBatch(List<ReportDocumentDataDO> list);
|
||||
|
||||
/**
|
||||
* 更新检测报告明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateReportDocumentData(@Valid ReportDocumentDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除检测报告明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteReportDocumentData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除检测报告明细
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteReportDocumentDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得检测报告明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 检测报告明细
|
||||
*/
|
||||
ReportDocumentDataDO getReportDocumentData(Long id);
|
||||
|
||||
/**
|
||||
* 获得检测报告明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 检测报告明细分页
|
||||
*/
|
||||
PageResult<ReportDocumentDataDO> getReportDocumentDataPage(ReportDocumentDataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.mapper.ReportDocumentDataMapper;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.REPORT_DOCUMENT_DATA_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 检测报告明细 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ReportDocumentDataServiceImpl implements ReportDocumentDataService {
|
||||
|
||||
@Resource
|
||||
private ReportDocumentDataMapper reportDocumentDataMapper;
|
||||
|
||||
@Override
|
||||
public CommonResult<List<ReportDocumentDataDO>> listByMainDataId(Long mainDataId) {
|
||||
QueryWrapper<ReportDocumentDataDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("MAIN_ID", mainDataId);
|
||||
queryWrapper.orderByAsc("ID");
|
||||
List<ReportDocumentDataDO> list = reportDocumentDataMapper.selectList(queryWrapper);
|
||||
return CommonResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<String> removeByMainIdAndDetailIds(Long mainDataId, List<Long> detailIds) {
|
||||
QueryWrapper<ReportDocumentDataDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("MAIN_ID", mainDataId);
|
||||
queryWrapper.in("ID", detailIds);
|
||||
reportDocumentDataMapper.delete(queryWrapper);
|
||||
return CommonResult.success("移除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentDataRespVO createReportDocumentData(ReportDocumentDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ReportDocumentDataDO reportDocumentData = BeanUtils.toBean(createReqVO, ReportDocumentDataDO.class);
|
||||
reportDocumentDataMapper.insert(reportDocumentData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(reportDocumentData, ReportDocumentDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<String> insertBatch(List<ReportDocumentDataDO> list) {
|
||||
reportDocumentDataMapper.insertBatch(list);
|
||||
return CommonResult.success("添加成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateReportDocumentData(ReportDocumentDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateReportDocumentDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ReportDocumentDataDO updateObj = BeanUtils.toBean(updateReqVO, ReportDocumentDataDO.class);
|
||||
reportDocumentDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReportDocumentData(Long id) {
|
||||
// 校验存在
|
||||
validateReportDocumentDataExists(id);
|
||||
// 删除
|
||||
reportDocumentDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReportDocumentDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateReportDocumentDataExists(ids);
|
||||
// 删除
|
||||
reportDocumentDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateReportDocumentDataExists(List<Long> ids) {
|
||||
List<ReportDocumentDataDO> list = reportDocumentDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(REPORT_DOCUMENT_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateReportDocumentDataExists(Long id) {
|
||||
if (reportDocumentDataMapper.selectById(id) == null) {
|
||||
throw exception(REPORT_DOCUMENT_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentDataDO getReportDocumentData(Long id) {
|
||||
return reportDocumentDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ReportDocumentDataDO> getReportDocumentDataPage(ReportDocumentDataPageReqVO pageReqVO) {
|
||||
return reportDocumentDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.service;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentMainDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测报告业务 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ReportDocumentMainService {
|
||||
|
||||
//添加数据到报告
|
||||
CommonResult<String> execAddData(ReportDocumentMainSaveReqVO reqVO);
|
||||
|
||||
//移除数据
|
||||
CommonResult<String> execRemoveData(ReportDocumentMainSaveReqVO reqVO);
|
||||
|
||||
void updateCommonField(ReportDocumentMainDO reportDocumentMainDO);
|
||||
|
||||
/**
|
||||
* 创建检测报告业务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ReportDocumentMainRespVO createReportDocumentMain(@Valid ReportDocumentMainSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新检测报告业务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateReportDocumentMain(@Valid ReportDocumentMainSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除检测报告业务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteReportDocumentMain(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除检测报告业务
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteReportDocumentMainListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得检测报告业务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 检测报告业务
|
||||
*/
|
||||
ReportDocumentMainDO getReportDocumentMain(Long id);
|
||||
|
||||
/**
|
||||
* 获得检测报告业务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 检测报告业务分页
|
||||
*/
|
||||
PageResult<ReportDocumentMainDO> getReportDocumentMainPage(ReportDocumentMainPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessAssayReportDataService;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.mapper.ReportDocumentMainMapper;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentMainDO;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.error;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 检测报告业务 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ReportDocumentMainServiceImpl implements ReportDocumentMainService {
|
||||
|
||||
@Resource private ReportDocumentMainMapper reportDocumentMainMapper;
|
||||
@Resource private BusinessAssayReportDataService businessAssayReportDataService;
|
||||
@Resource private ReportDocumentDataService reportDocumentDataService;
|
||||
|
||||
/***
|
||||
* 增加报表数据
|
||||
* 传入:报告id、 报表数据ids
|
||||
* */
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<String> execAddData(ReportDocumentMainSaveReqVO reqVO) {
|
||||
Long id = reqVO.getId();
|
||||
String businessAssayReportDataIds = reqVO.getBusinessAssayReportDataIds();
|
||||
List<Long> addReportDataIdList = new ArrayList<>();
|
||||
if(!ObjectUtils.isEmpty(businessAssayReportDataIds)){
|
||||
String[] split = businessAssayReportDataIds.split(",");
|
||||
for (String s : split) {
|
||||
Long aLong = Long.valueOf(s);
|
||||
addReportDataIdList.add(aLong);
|
||||
}
|
||||
}
|
||||
if(ObjectUtils.isEmpty(businessAssayReportDataIds) || addReportDataIdList.isEmpty())
|
||||
return error(REPORT_DOCUMENT_DATA_NOT_EXISTS, "缺少businessAssayReportDataIds参数,请刷新后重试");
|
||||
List<ReportDocumentDataDO> savedDataList = reportDocumentDataService.listByMainDataId(id).getData();
|
||||
List<Long> hasIds = savedDataList.stream().map(ReportDocumentDataDO::getSourceId).toList();
|
||||
boolean isExist = false;
|
||||
for (Long addReportDataId : addReportDataIdList) {
|
||||
if(hasIds.contains(addReportDataId)){
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isExist)
|
||||
return error(REPORT_DOCUMENT_DATA_NOT_EXISTS, "报表数据已在本报告使用,请勿重复添加");
|
||||
List<BusinessAssayReportDataDO> assayReportDataList = businessAssayReportDataService.listByIds(addReportDataIdList);
|
||||
List<ReportDocumentDataDO> insertList = new ArrayList<>();
|
||||
for (BusinessAssayReportDataDO assayReportData : assayReportDataList) {
|
||||
ReportDocumentDataDO reportDocumentDataDO = new ReportDocumentDataDO();
|
||||
reportDocumentDataDO.setMainId(id);
|
||||
reportDocumentDataDO.setSourceId(assayReportData.getId());
|
||||
insertList.add(reportDocumentDataDO);
|
||||
}
|
||||
if(!insertList.isEmpty())
|
||||
reportDocumentDataService.insertBatch(insertList);
|
||||
|
||||
ReportDocumentMainDO reportDocumentMainDO = reportDocumentMainMapper.selectById(id);
|
||||
updateCommonField(reportDocumentMainDO);
|
||||
|
||||
return CommonResult.success("操作成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCommonField(ReportDocumentMainDO reportDocumentMainDO) {
|
||||
if(reportDocumentMainDO == null)
|
||||
return;
|
||||
if(reportDocumentMainDO.getCancelFlag() == null || reportDocumentMainDO.getCancelFlag().equals("-1"))
|
||||
reportDocumentMainDO.setCancelFlag("0");
|
||||
}
|
||||
|
||||
/***
|
||||
* 增加报表数据
|
||||
* 传入:报告id、 报告明细数据id
|
||||
* */
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<String> execRemoveData(ReportDocumentMainSaveReqVO reqVO) {
|
||||
Long id = reqVO.getId();
|
||||
String reportDocumentDataIds = reqVO.getReportDocumentDataIds();
|
||||
List<Long> reportDocumentDataIdsList = new ArrayList<>();
|
||||
if(!ObjectUtils.isEmpty(reportDocumentDataIds)){
|
||||
String[] split = reportDocumentDataIds.split(",");
|
||||
for (String s : split) {
|
||||
Long aLong = Long.valueOf(s);
|
||||
reportDocumentDataIdsList.add(aLong);
|
||||
}
|
||||
}
|
||||
if(ObjectUtils.isEmpty(reportDocumentDataIds) || reportDocumentDataIdsList.isEmpty())
|
||||
return error(REPORT_DOCUMENT_DATA_NOT_EXISTS, "缺少reportDocumentDataIds参数,请刷新后重试");
|
||||
return reportDocumentDataService.removeByMainIdAndDetailIds(id, reportDocumentDataIdsList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentMainRespVO createReportDocumentMain(ReportDocumentMainSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ReportDocumentMainDO reportDocumentMain = BeanUtils.toBean(createReqVO, ReportDocumentMainDO.class);
|
||||
reportDocumentMainMapper.insert(reportDocumentMain);
|
||||
// 返回
|
||||
return BeanUtils.toBean(reportDocumentMain, ReportDocumentMainRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateReportDocumentMain(ReportDocumentMainSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateReportDocumentMainExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ReportDocumentMainDO updateObj = BeanUtils.toBean(updateReqVO, ReportDocumentMainDO.class);
|
||||
reportDocumentMainMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReportDocumentMain(Long id) {
|
||||
// 校验存在
|
||||
validateReportDocumentMainExists(id);
|
||||
// 删除
|
||||
reportDocumentMainMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReportDocumentMainListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateReportDocumentMainExists(ids);
|
||||
// 删除
|
||||
reportDocumentMainMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateReportDocumentMainExists(List<Long> ids) {
|
||||
List<ReportDocumentMainDO> list = reportDocumentMainMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(REPORT_DOCUMENT_MAIN_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateReportDocumentMainExists(Long id) {
|
||||
if (reportDocumentMainMapper.selectById(id) == null) {
|
||||
throw exception(REPORT_DOCUMENT_MAIN_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentMainDO getReportDocumentMain(Long id) {
|
||||
return reportDocumentMainMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ReportDocumentMainDO> getReportDocumentMainPage(ReportDocumentMainPageReqVO pageReqVO) {
|
||||
return reportDocumentMainMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.service;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报告类型配置 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ReportDocumentTypeService {
|
||||
|
||||
|
||||
/*保存数据*/
|
||||
CommonResult<String> save(@Valid ReportDocumentTypeSaveReqVO reqV);
|
||||
CommonResult<String> saveWithNewVersion(@Valid ReportDocumentTypeSaveReqVO reqV);
|
||||
|
||||
/**
|
||||
* 创建报告类型配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ReportDocumentTypeRespVO createReportDocumentType(@Valid ReportDocumentTypeSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新报告类型配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateReportDocumentType(@Valid ReportDocumentTypeSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除报告类型配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteReportDocumentType(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除报告类型配置
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteReportDocumentTypeListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得报告类型配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 报告类型配置
|
||||
*/
|
||||
ReportDocumentTypeDO getReportDocumentType(Long id);
|
||||
|
||||
/**
|
||||
* 获得报告类型配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 报告类型配置分页
|
||||
*/
|
||||
PageResult<ReportDocumentTypeDO> getReportDocumentTypePage(ReportDocumentTypePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.zt.plat.module.qms.business.reportdoc.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.mapper.ReportDocumentTypeMapper;
|
||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentTypeDO;
|
||||
import com.zt.plat.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.REPORT_DOCUMENT_TYPE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 报告类型配置 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ReportDocumentTypeServiceImpl implements ReportDocumentTypeService {
|
||||
|
||||
@Resource
|
||||
private ReportDocumentTypeMapper reportDocumentTypeMapper;
|
||||
|
||||
@Override
|
||||
public CommonResult<String> save(ReportDocumentTypeSaveReqVO reqVo) {
|
||||
String newVersionFlag = reqVo.getNewVersionFlag();
|
||||
if("1".equals(newVersionFlag))
|
||||
return saveWithNewVersion(reqVo);
|
||||
if(reqVo.getId() == null){
|
||||
ReportDocumentTypeDO typeDO = BeanUtils.toBean(reqVo, ReportDocumentTypeDO.class);
|
||||
typeDO.setCurrentFlag(1);
|
||||
reportDocumentTypeMapper.insert(typeDO);
|
||||
Long id = typeDO.getId();
|
||||
typeDO.setMainId(id);
|
||||
this.reportDocumentTypeMapper.updateById(typeDO);
|
||||
}
|
||||
else
|
||||
this.updateReportDocumentType(reqVo);
|
||||
return CommonResult.success("保存成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<String> saveWithNewVersion(ReportDocumentTypeSaveReqVO reqV) {
|
||||
ReportDocumentTypeDO documentTypeDO = BeanUtils.toBean(reqV, ReportDocumentTypeDO.class);
|
||||
documentTypeDO.setCurrentFlag(0);
|
||||
reportDocumentTypeMapper.updateById(documentTypeDO);
|
||||
//创建新版本
|
||||
Integer version = documentTypeDO.getVersion();
|
||||
if(version != null)
|
||||
version ++;
|
||||
else
|
||||
version = 1;
|
||||
documentTypeDO.setId(null);
|
||||
documentTypeDO.setVersion(version);
|
||||
documentTypeDO.setCurrentFlag(1);
|
||||
documentTypeDO.setMainId(reqV.getMainId());
|
||||
reportDocumentTypeMapper.insert(documentTypeDO);
|
||||
return CommonResult.success("保存成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentTypeRespVO createReportDocumentType(ReportDocumentTypeSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ReportDocumentTypeDO reportDocumentType = BeanUtils.toBean(createReqVO, ReportDocumentTypeDO.class);
|
||||
reportDocumentTypeMapper.insert(reportDocumentType);
|
||||
// 返回
|
||||
return BeanUtils.toBean(reportDocumentType, ReportDocumentTypeRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateReportDocumentType(ReportDocumentTypeSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateReportDocumentTypeExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ReportDocumentTypeDO updateObj = BeanUtils.toBean(updateReqVO, ReportDocumentTypeDO.class);
|
||||
reportDocumentTypeMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReportDocumentType(Long id) {
|
||||
// 校验存在
|
||||
validateReportDocumentTypeExists(id);
|
||||
// 删除
|
||||
reportDocumentTypeMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReportDocumentTypeListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateReportDocumentTypeExists(ids);
|
||||
// 删除
|
||||
reportDocumentTypeMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateReportDocumentTypeExists(List<Long> ids) {
|
||||
List<ReportDocumentTypeDO> list = reportDocumentTypeMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(REPORT_DOCUMENT_TYPE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateReportDocumentTypeExists(Long id) {
|
||||
if (reportDocumentTypeMapper.selectById(id) == null) {
|
||||
throw exception(REPORT_DOCUMENT_TYPE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentTypeDO getReportDocumentType(Long id) {
|
||||
return reportDocumentTypeMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ReportDocumentTypeDO> getReportDocumentTypePage(ReportDocumentTypePageReqVO pageReqVO) {
|
||||
return reportDocumentTypeMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.reportdoc.dal.mapper.ReportDocumentDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.reportdoc.dal.mapper.ReportDocumentMainMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.reportdoc.dal.mapper.ReportDocumentTypeMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user