Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -62,6 +62,10 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS = new ErrorCode(1_032_050_000, "LiteFlow脚本配置不存在");
|
||||
ErrorCode CONFIG_RULE_NOT_EXISTS = new ErrorCode(1_032_050_000, "规则配置不存在");
|
||||
|
||||
ErrorCode CONFIG_XRF_LINE_NOT_EXISTS = new ErrorCode(1_032_050_000, "荧光分析线不存在");
|
||||
ErrorCode CONFIG_XRF_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "荧光采集检测项目配置不存在");
|
||||
ErrorCode CONFIG_XRF_CONVERSION_RATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "荧光数据采集特殊检测项目转换率配置不存在");
|
||||
|
||||
ErrorCode BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品大类管理不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准明细不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准不存在");
|
||||
@@ -124,6 +128,8 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode BUSINESS_QC_COEFFICIENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数任务数据,空白样、标样不存在");
|
||||
ErrorCode BUSINESS_QC_COEFFICIENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数参数业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_XRF_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "荧光采集记录不存在");
|
||||
|
||||
|
||||
//检测报告
|
||||
ErrorCode REPORT_DOCUMENT_MAIN_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告业务不存在");
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
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.BusinessXRFDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessXRFDataService;
|
||||
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-XRF-data")
|
||||
@Validated
|
||||
public class BusinessXRFDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessXRFDataService businessXRFDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建荧光采集记录")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:create')")
|
||||
public CommonResult<BusinessXRFDataRespVO> createBusinessXRFData(@Valid @RequestBody BusinessXRFDataSaveReqVO createReqVO) {
|
||||
return success(businessXRFDataService.createBusinessXRFData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新荧光采集记录")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:update')")
|
||||
public CommonResult<Boolean> updateBusinessXRFData(@Valid @RequestBody BusinessXRFDataSaveReqVO updateReqVO) {
|
||||
businessXRFDataService.updateBusinessXRFData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除荧光采集记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessXRFData(@RequestParam("id") Long id) {
|
||||
businessXRFDataService.deleteBusinessXRFData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除荧光采集记录")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessXRFDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessXRFDataService.deleteBusinessXRFDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得荧光采集记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:query')")
|
||||
public CommonResult<BusinessXRFDataRespVO> getBusinessXRFData(@RequestParam("id") Long id) {
|
||||
BusinessXRFDataDO businessXRFData = businessXRFDataService.getBusinessXRFData(id);
|
||||
return success(BeanUtils.toBean(businessXRFData, BusinessXRFDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得荧光采集记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:query')")
|
||||
public CommonResult<PageResult<BusinessXRFDataRespVO>> getBusinessXRFDataPage(@Valid BusinessXRFDataPageReqVO pageReqVO) {
|
||||
PageResult<BusinessXRFDataDO> pageResult = businessXRFDataService.getBusinessXRFDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessXRFDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出荧光采集记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-XRF-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessXRFDataExcel(@Valid BusinessXRFDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessXRFDataDO> list = businessXRFDataService.getBusinessXRFDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "荧光采集记录.xls", "数据", BusinessXRFDataRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessXRFDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 荧光采集记录分页 Request VO")
|
||||
@Data
|
||||
public class BusinessXRFDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", example = "王五")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "荧光样品id", example = "13273")
|
||||
private String xRFSampleId;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", example = "李四")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "样品时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] sampleTime;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "样品主样ID", example = "29288")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", example = "4878")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", example = "13189")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测数据")
|
||||
private String assayData;
|
||||
|
||||
@Schema(description = "是否为检查创建数据")
|
||||
private Integer isCheckCreate;
|
||||
|
||||
@Schema(description = "是否已匹配")
|
||||
private Integer isMatched;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", example = "4171")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 荧光采集记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessXRFDataRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18701")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("荧光线名称")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "荧光样品id", example = "13273")
|
||||
@ExcelProperty("荧光样品id")
|
||||
private String xRFSampleId;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
@ExcelProperty("样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", example = "李四")
|
||||
@ExcelProperty("样品名称")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "样品时间")
|
||||
@ExcelProperty("样品时间")
|
||||
private LocalDateTime sampleTime;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29288")
|
||||
@ExcelProperty("样品主样ID")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4878")
|
||||
@ExcelProperty("样品分样ID")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13189")
|
||||
@ExcelProperty("分样子样ID")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("检测数据")
|
||||
private String assayData;
|
||||
|
||||
@Schema(description = "是否为检查创建数据")
|
||||
@ExcelProperty("是否为检查创建数据")
|
||||
private Integer isCheckCreate;
|
||||
|
||||
@Schema(description = "是否已匹配")
|
||||
@ExcelProperty("是否已匹配")
|
||||
private Integer isMatched;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
@ExcelProperty("是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
@ExcelProperty("上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4171")
|
||||
@ExcelProperty("乐观锁")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
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 BusinessXRFDataSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18701")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "设备编号不能为空")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "荧光线名称不能为空")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "荧光样品id", example = "13273")
|
||||
private String xRFSampleId;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称", example = "李四")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "样品时间")
|
||||
private LocalDateTime sampleTime;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29288")
|
||||
@NotNull(message = "样品主样ID不能为空")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4878")
|
||||
@NotNull(message = "样品分样ID不能为空")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13189")
|
||||
@NotNull(message = "分样子样ID不能为空")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "检测数据不能为空")
|
||||
private String assayData;
|
||||
|
||||
@Schema(description = "是否为检查创建数据")
|
||||
private Integer isCheckCreate;
|
||||
|
||||
@Schema(description = "是否已匹配")
|
||||
private Integer isMatched;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4171")
|
||||
@NotNull(message = "乐观锁不能为空")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.zt.plat.module.qms.business.bus.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 荧光采集记录 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_bsn_xrf_dat")
|
||||
@KeySequence("t_bsn_xrf_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class BusinessXRFDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEV_NO")
|
||||
private Long deviceNo;
|
||||
/**
|
||||
* 荧光线名称
|
||||
*/
|
||||
@TableField("LINE_NAME")
|
||||
private String lineName;
|
||||
/**
|
||||
* 荧光样品id
|
||||
*/
|
||||
@TableField("XRF_SMP_ID")
|
||||
private String xRFSampleId;
|
||||
/**
|
||||
* 样品编号
|
||||
*/
|
||||
@TableField("SMP_CD")
|
||||
private String sampleCode;
|
||||
/**
|
||||
* 样品名称
|
||||
*/
|
||||
@TableField("SMP_NAME")
|
||||
private String sampleName;
|
||||
/**
|
||||
* 样品时间
|
||||
*/
|
||||
@TableField("SMP_TM")
|
||||
private LocalDateTime sampleTime;
|
||||
/**
|
||||
* 分析人
|
||||
*/
|
||||
@TableField("ASY_OPTR")
|
||||
private String assayOperator;
|
||||
/**
|
||||
* 样品主样ID
|
||||
*/
|
||||
@TableField("BSN_BSE_SMP_ID")
|
||||
private Long businessBaseSampleId;
|
||||
/**
|
||||
* 样品分样ID
|
||||
*/
|
||||
@TableField("BSN_SB_PRN_SMP_ID")
|
||||
private Long businessSubParentSampleId;
|
||||
/**
|
||||
* 分样子样ID
|
||||
*/
|
||||
@TableField("BSN_SB_SMP_ID")
|
||||
private Long businessSubSampleId;
|
||||
/**
|
||||
* 检测数据
|
||||
*/
|
||||
@TableField("ASY_DAT")
|
||||
private String assayData;
|
||||
/**
|
||||
* 是否为检查创建数据
|
||||
*/
|
||||
@TableField("IS_CHK_CRT")
|
||||
private Integer isCheckCreate;
|
||||
/**
|
||||
* 是否已匹配
|
||||
*/
|
||||
@TableField("IS_MATD")
|
||||
private Integer isMatched;
|
||||
/**
|
||||
* 是否已上报
|
||||
*/
|
||||
@TableField("IS_RPOD")
|
||||
private Integer isReported;
|
||||
/**
|
||||
* 上报人
|
||||
*/
|
||||
@TableField("RPTR")
|
||||
private String reporter;
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
@TableField("RPT_TM")
|
||||
private LocalDateTime reportTime;
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
@TableField("UPD_CNT")
|
||||
private Integer updateCount;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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.dal.dataobject.BusinessXRFDataDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 荧光采集记录 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessXRFDataMapper extends BaseMapperX<BusinessXRFDataDO> {
|
||||
|
||||
default PageResult<BusinessXRFDataDO> selectPage(BusinessXRFDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessXRFDataDO>()
|
||||
.eqIfPresent(BusinessXRFDataDO::getDeviceNo, reqVO.getDeviceNo())
|
||||
.likeIfPresent(BusinessXRFDataDO::getLineName, reqVO.getLineName())
|
||||
.eqIfPresent(BusinessXRFDataDO::getXRFSampleId, reqVO.getXRFSampleId())
|
||||
.eqIfPresent(BusinessXRFDataDO::getSampleCode, reqVO.getSampleCode())
|
||||
.likeIfPresent(BusinessXRFDataDO::getSampleName, reqVO.getSampleName())
|
||||
.betweenIfPresent(BusinessXRFDataDO::getSampleTime, reqVO.getSampleTime())
|
||||
.eqIfPresent(BusinessXRFDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessXRFDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessXRFDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessXRFDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.eqIfPresent(BusinessXRFDataDO::getAssayData, reqVO.getAssayData())
|
||||
.eqIfPresent(BusinessXRFDataDO::getIsCheckCreate, reqVO.getIsCheckCreate())
|
||||
.eqIfPresent(BusinessXRFDataDO::getIsMatched, reqVO.getIsMatched())
|
||||
.eqIfPresent(BusinessXRFDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessXRFDataDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessXRFDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessXRFDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessXRFDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessXRFDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessXRFDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessXRFDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessXRFDataDO;
|
||||
|
||||
/**
|
||||
* 荧光采集记录 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessXRFDataService {
|
||||
|
||||
/**
|
||||
* 创建荧光采集记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessXRFDataRespVO createBusinessXRFData(@Valid BusinessXRFDataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新荧光采集记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessXRFData(@Valid BusinessXRFDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除荧光采集记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessXRFData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除荧光采集记录
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessXRFDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得荧光采集记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 荧光采集记录
|
||||
*/
|
||||
BusinessXRFDataDO getBusinessXRFData(Long id);
|
||||
|
||||
/**
|
||||
* 获得荧光采集记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 荧光采集记录分页
|
||||
*/
|
||||
PageResult<BusinessXRFDataDO> getBusinessXRFDataPage(BusinessXRFDataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.zt.plat.module.qms.business.bus.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessXRFDataDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessXRFDataMapper;
|
||||
|
||||
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 BusinessXRFDataServiceImpl implements BusinessXRFDataService {
|
||||
|
||||
@Resource
|
||||
private BusinessXRFDataMapper businessXRFDataMapper;
|
||||
|
||||
@Override
|
||||
public BusinessXRFDataRespVO createBusinessXRFData(BusinessXRFDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessXRFDataDO businessXRFData = BeanUtils.toBean(createReqVO, BusinessXRFDataDO.class);
|
||||
businessXRFDataMapper.insert(businessXRFData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessXRFData, BusinessXRFDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessXRFData(BusinessXRFDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessXRFDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessXRFDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessXRFDataDO.class);
|
||||
businessXRFDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessXRFData(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessXRFDataExists(id);
|
||||
// 删除
|
||||
businessXRFDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessXRFDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessXRFDataExists(ids);
|
||||
// 删除
|
||||
businessXRFDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessXRFDataExists(List<Long> ids) {
|
||||
List<BusinessXRFDataDO> list = businessXRFDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_XRF_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessXRFDataExists(Long id) {
|
||||
if (businessXRFDataMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_XRF_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessXRFDataDO getBusinessXRFData(Long id) {
|
||||
return businessXRFDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessXRFDataDO> getBusinessXRFDataPage(BusinessXRFDataPageReqVO pageReqVO) {
|
||||
return businessXRFDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.admin;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFConversionRateDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigXRFConversionRateService;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 荧光数据采集特殊检测项目转换率配置")
|
||||
@RestController
|
||||
@RequestMapping("/qms/config-XRF-conversion-rate")
|
||||
@Validated
|
||||
public class ConfigXRFConversionRateController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigXRFConversionRateService configXRFConversionRateService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建荧光数据采集特殊检测项目转换率配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:create')")
|
||||
public CommonResult<ConfigXRFConversionRateRespVO> createConfigXRFConversionRate(@Valid @RequestBody ConfigXRFConversionRateSaveReqVO createReqVO) {
|
||||
return success(configXRFConversionRateService.createConfigXRFConversionRate(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新荧光数据采集特殊检测项目转换率配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:update')")
|
||||
public CommonResult<Boolean> updateConfigXRFConversionRate(@Valid @RequestBody ConfigXRFConversionRateSaveReqVO updateReqVO) {
|
||||
configXRFConversionRateService.updateConfigXRFConversionRate(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除荧光数据采集特殊检测项目转换率配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:delete')")
|
||||
public CommonResult<Boolean> deleteConfigXRFConversionRate(@RequestParam("id") Long id) {
|
||||
configXRFConversionRateService.deleteConfigXRFConversionRate(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除荧光数据采集特殊检测项目转换率配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:delete')")
|
||||
public CommonResult<Boolean> deleteConfigXRFConversionRateList(@RequestBody BatchDeleteReqVO req) {
|
||||
configXRFConversionRateService.deleteConfigXRFConversionRateListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得荧光数据采集特殊检测项目转换率配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:query')")
|
||||
public CommonResult<ConfigXRFConversionRateRespVO> getConfigXRFConversionRate(@RequestParam("id") Long id) {
|
||||
ConfigXRFConversionRateDO configXRFConversionRate = configXRFConversionRateService.getConfigXRFConversionRate(id);
|
||||
return success(BeanUtils.toBean(configXRFConversionRate, ConfigXRFConversionRateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得荧光数据采集特殊检测项目转换率配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:query')")
|
||||
public CommonResult<PageResult<ConfigXRFConversionRateRespVO>> getConfigXRFConversionRatePage(@Valid ConfigXRFConversionRatePageReqVO pageReqVO) {
|
||||
PageResult<ConfigXRFConversionRateDO> pageResult = configXRFConversionRateService.getConfigXRFConversionRatePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigXRFConversionRateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出荧光数据采集特殊检测项目转换率配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-conversion-rate:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigXRFConversionRateExcel(@Valid ConfigXRFConversionRatePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigXRFConversionRateDO> list = configXRFConversionRateService.getConfigXRFConversionRatePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "荧光数据采集特殊检测项目转换率配置.xls", "数据", ConfigXRFConversionRateRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigXRFConversionRateRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.admin;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFLineDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigXRFLineService;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 荧光分析线")
|
||||
@RestController
|
||||
@RequestMapping("/qms/config-XRF-line")
|
||||
@Validated
|
||||
public class ConfigXRFLineController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigXRFLineService configXRFLineService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建荧光分析线")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:create')")
|
||||
public CommonResult<ConfigXRFLineRespVO> createConfigXRFLine(@Valid @RequestBody ConfigXRFLineSaveReqVO createReqVO) {
|
||||
return success(configXRFLineService.createConfigXRFLine(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新荧光分析线")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:update')")
|
||||
public CommonResult<Boolean> updateConfigXRFLine(@Valid @RequestBody ConfigXRFLineSaveReqVO updateReqVO) {
|
||||
configXRFLineService.updateConfigXRFLine(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除荧光分析线")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:delete')")
|
||||
public CommonResult<Boolean> deleteConfigXRFLine(@RequestParam("id") Long id) {
|
||||
configXRFLineService.deleteConfigXRFLine(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除荧光分析线")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:delete')")
|
||||
public CommonResult<Boolean> deleteConfigXRFLineList(@RequestBody BatchDeleteReqVO req) {
|
||||
configXRFLineService.deleteConfigXRFLineListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得荧光分析线")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:query')")
|
||||
public CommonResult<ConfigXRFLineRespVO> getConfigXRFLine(@RequestParam("id") Long id) {
|
||||
ConfigXRFLineDO configXRFLine = configXRFLineService.getConfigXRFLine(id);
|
||||
return success(BeanUtils.toBean(configXRFLine, ConfigXRFLineRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得荧光分析线分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:query')")
|
||||
public CommonResult<PageResult<ConfigXRFLineRespVO>> getConfigXRFLinePage(@Valid ConfigXRFLinePageReqVO pageReqVO) {
|
||||
PageResult<ConfigXRFLineDO> pageResult = configXRFLineService.getConfigXRFLinePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigXRFLineRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出荧光分析线 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-line:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigXRFLineExcel(@Valid ConfigXRFLinePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigXRFLineDO> list = configXRFLineService.getConfigXRFLinePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "荧光分析线.xls", "数据", ConfigXRFLineRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigXRFLineRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.admin;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFProjectDO;
|
||||
import com.zt.plat.module.qms.business.config.service.ConfigXRFProjectService;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 荧光采集检测项目配置")
|
||||
@RestController
|
||||
@RequestMapping("/qms/config-XRF-project")
|
||||
@Validated
|
||||
public class ConfigXRFProjectController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigXRFProjectService configXRFProjectService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建荧光采集检测项目配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:create')")
|
||||
public CommonResult<ConfigXRFProjectRespVO> createConfigXRFProject(@Valid @RequestBody ConfigXRFProjectSaveReqVO createReqVO) {
|
||||
return success(configXRFProjectService.createConfigXRFProject(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新荧光采集检测项目配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:update')")
|
||||
public CommonResult<Boolean> updateConfigXRFProject(@Valid @RequestBody ConfigXRFProjectSaveReqVO updateReqVO) {
|
||||
configXRFProjectService.updateConfigXRFProject(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除荧光采集检测项目配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:delete')")
|
||||
public CommonResult<Boolean> deleteConfigXRFProject(@RequestParam("id") Long id) {
|
||||
configXRFProjectService.deleteConfigXRFProject(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除荧光采集检测项目配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:delete')")
|
||||
public CommonResult<Boolean> deleteConfigXRFProjectList(@RequestBody BatchDeleteReqVO req) {
|
||||
configXRFProjectService.deleteConfigXRFProjectListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得荧光采集检测项目配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:query')")
|
||||
public CommonResult<ConfigXRFProjectRespVO> getConfigXRFProject(@RequestParam("id") Long id) {
|
||||
ConfigXRFProjectDO configXRFProject = configXRFProjectService.getConfigXRFProject(id);
|
||||
return success(BeanUtils.toBean(configXRFProject, ConfigXRFProjectRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得荧光采集检测项目配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:query')")
|
||||
public CommonResult<PageResult<ConfigXRFProjectRespVO>> getConfigXRFProjectPage(@Valid ConfigXRFProjectPageReqVO pageReqVO) {
|
||||
PageResult<ConfigXRFProjectDO> pageResult = configXRFProjectService.getConfigXRFProjectPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigXRFProjectRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出荧光采集检测项目配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-XRF-project:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigXRFProjectExcel(@Valid ConfigXRFProjectPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigXRFProjectDO> list = configXRFProjectService.getConfigXRFProjectPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "荧光采集检测项目配置.xls", "数据", ConfigXRFProjectRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigXRFProjectRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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 ConfigXRFConversionRatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", example = "张三")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目名称", example = "张三")
|
||||
private String xRFProjectName;
|
||||
|
||||
@Schema(description = "转换率(乘数)")
|
||||
private Integer conversionRate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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 ConfigXRFConversionRateRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12818")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("荧光线名称")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目名称", example = "张三")
|
||||
@ExcelProperty("荧光仪器采集系统检测项目名称")
|
||||
private String xRFProjectName;
|
||||
|
||||
@Schema(description = "转换率(乘数)")
|
||||
@ExcelProperty("转换率(乘数)")
|
||||
private Integer conversionRate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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 ConfigXRFConversionRateSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12818")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "设备编号不能为空")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "荧光线名称不能为空")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目名称", example = "张三")
|
||||
private String xRFProjectName;
|
||||
|
||||
@Schema(description = "转换率(乘数)")
|
||||
private Integer conversionRate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
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 ConfigXRFLinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", example = "芋艿")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "是否启用,0、未启用;1、启用;")
|
||||
private Integer isUse;
|
||||
|
||||
@Schema(description = "连接字符串")
|
||||
private String connectString;
|
||||
|
||||
@Schema(description = "数据源类型,(1:rdb,2:mdb)", example = "1")
|
||||
private Integer dataSourceType;
|
||||
|
||||
@Schema(description = "末次同步数据时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] lastSynchronousDataTime;
|
||||
|
||||
@Schema(description = "末次检查数据时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] lastCheckDataTime;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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 ConfigXRFLineRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10711")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("荧光线名称")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "是否启用,0、未启用;1、启用;")
|
||||
@ExcelProperty("是否启用,0、未启用;1、启用;")
|
||||
private Integer isUse;
|
||||
|
||||
@Schema(description = "连接字符串")
|
||||
@ExcelProperty("连接字符串")
|
||||
private String connectString;
|
||||
|
||||
@Schema(description = "数据源类型,(1:rdb,2:mdb)", example = "1")
|
||||
@ExcelProperty("数据源类型,(1:rdb,2:mdb)")
|
||||
private Integer dataSourceType;
|
||||
|
||||
@Schema(description = "末次同步数据时间")
|
||||
@ExcelProperty("末次同步数据时间")
|
||||
private LocalDateTime lastSynchronousDataTime;
|
||||
|
||||
@Schema(description = "末次检查数据时间")
|
||||
@ExcelProperty("末次检查数据时间")
|
||||
private LocalDateTime lastCheckDataTime;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
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.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 荧光分析线新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigXRFLineSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10711")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "设备编号不能为空")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "荧光线名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "荧光线名称不能为空")
|
||||
private String lineName;
|
||||
|
||||
@Schema(description = "是否启用,0、未启用;1、启用;")
|
||||
private Integer isUse;
|
||||
|
||||
@Schema(description = "连接字符串")
|
||||
private String connectString;
|
||||
|
||||
@Schema(description = "数据源类型,(1:rdb,2:mdb)", example = "1")
|
||||
private Integer dataSourceType;
|
||||
|
||||
@Schema(description = "末次同步数据时间")
|
||||
private LocalDateTime lastSynchronousDataTime;
|
||||
|
||||
@Schema(description = "末次检查数据时间")
|
||||
private LocalDateTime lastCheckDataTime;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
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 ConfigXRFProjectPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "12325")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "检测项目显示名称", example = "李四")
|
||||
private String showName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目名称", example = "赵六")
|
||||
private String xRFProjectName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目单位")
|
||||
private String xRFProjectUnit;
|
||||
|
||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "转换率(乘数)")
|
||||
private Integer conversionRate;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
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 ConfigXRFProjectRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15989")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("设备编号")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "12325")
|
||||
@ExcelProperty("检测项目ID,字典表【T_DIC_PRJ】")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "检测项目显示名称", example = "李四")
|
||||
@ExcelProperty("检测项目显示名称")
|
||||
private String showName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目名称", example = "赵六")
|
||||
@ExcelProperty("荧光仪器采集系统检测项目名称")
|
||||
private String xRFProjectName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目单位")
|
||||
@ExcelProperty("荧光仪器采集系统检测项目单位")
|
||||
private String xRFProjectUnit;
|
||||
|
||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1")
|
||||
@ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
@ExcelProperty("小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "转换率(乘数)")
|
||||
@ExcelProperty("转换率(乘数)")
|
||||
private Integer conversionRate;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@ExcelProperty("排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
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 ConfigXRFProjectSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15989")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "设备编号不能为空")
|
||||
private Long deviceNo;
|
||||
|
||||
@Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "12325")
|
||||
@NotNull(message = "检测项目ID,字典表【T_DIC_PRJ】不能为空")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "检测项目显示名称", example = "李四")
|
||||
private String showName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目名称", example = "赵六")
|
||||
private String xRFProjectName;
|
||||
|
||||
@Schema(description = "荧光仪器采集系统检测项目单位")
|
||||
private String xRFProjectUnit;
|
||||
|
||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "转换率(乘数)")
|
||||
private Integer conversionRate;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNo;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
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_xrf_cnv_rte")
|
||||
@KeySequence("t_cfg_xrf_cnv_rte_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ConfigXRFConversionRateDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEV_NO")
|
||||
private Long deviceNo;
|
||||
/**
|
||||
* 荧光线名称
|
||||
*/
|
||||
@TableField("LINE_NAME")
|
||||
private String lineName;
|
||||
/**
|
||||
* 荧光仪器采集系统检测项目名称
|
||||
*/
|
||||
@TableField("XRF_PRJ_NAME")
|
||||
private String xRFProjectName;
|
||||
/**
|
||||
* 转换率(乘数)
|
||||
*/
|
||||
@TableField("CNV_RTE")
|
||||
private Integer conversionRate;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.dataobject;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 荧光分析线 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_cfg_xrf_line")
|
||||
@KeySequence("t_cfg_xrf_line_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ConfigXRFLineDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEV_NO")
|
||||
private Long deviceNo;
|
||||
/**
|
||||
* 荧光线名称
|
||||
*/
|
||||
@TableField("LINE_NAME")
|
||||
private String lineName;
|
||||
/**
|
||||
* 是否启用,0、未启用;1、启用;
|
||||
*/
|
||||
@TableField("IS_USE")
|
||||
private Integer isUse;
|
||||
/**
|
||||
* 连接字符串
|
||||
*/
|
||||
@TableField("CONN_STR")
|
||||
private String connectString;
|
||||
/**
|
||||
* 数据源类型,(1:rdb,2:mdb)
|
||||
*/
|
||||
@TableField("DAT_SRC_TP")
|
||||
private Integer dataSourceType;
|
||||
/**
|
||||
* 末次同步数据时间
|
||||
*/
|
||||
@TableField("LST_SYNC_DAT_TM")
|
||||
private LocalDateTime lastSynchronousDataTime;
|
||||
/**
|
||||
* 末次检查数据时间
|
||||
*/
|
||||
@TableField("LST_CHK_DAT_TM")
|
||||
private LocalDateTime lastCheckDataTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
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_xrf_prj")
|
||||
@KeySequence("t_cfg_xrf_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ConfigXRFProjectDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("DEV_NO")
|
||||
private Long deviceNo;
|
||||
/**
|
||||
* 检测项目ID,字典表【T_DIC_PRJ】
|
||||
*/
|
||||
@TableField("DIC_PRJ_ID")
|
||||
private Long dictionaryProjectId;
|
||||
/**
|
||||
* 检测项目显示名称
|
||||
*/
|
||||
@TableField("SHW_NAME")
|
||||
private String showName;
|
||||
/**
|
||||
* 荧光仪器采集系统检测项目名称
|
||||
*/
|
||||
@TableField("XRF_PRJ_NAME")
|
||||
private String xRFProjectName;
|
||||
/**
|
||||
* 荧光仪器采集系统检测项目单位
|
||||
*/
|
||||
@TableField("XRF_PRJ_UNT")
|
||||
private String xRFProjectUnit;
|
||||
/**
|
||||
* 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间
|
||||
*/
|
||||
@TableField("DAT_TP")
|
||||
private String dataType;
|
||||
/**
|
||||
* 小数位
|
||||
*/
|
||||
@TableField("DEC_POS")
|
||||
private Integer decimalPosition;
|
||||
/**
|
||||
* 转换率(乘数)
|
||||
*/
|
||||
@TableField("CNV_RTE")
|
||||
private Integer conversionRate;
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@TableField("SRT_NO")
|
||||
private Integer sortNo;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFConversionRateDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 荧光数据采集特殊检测项目转换率配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigXRFConversionRateMapper extends BaseMapperX<ConfigXRFConversionRateDO> {
|
||||
|
||||
default PageResult<ConfigXRFConversionRateDO> selectPage(ConfigXRFConversionRatePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigXRFConversionRateDO>()
|
||||
.eqIfPresent(ConfigXRFConversionRateDO::getDeviceNo, reqVO.getDeviceNo())
|
||||
.likeIfPresent(ConfigXRFConversionRateDO::getLineName, reqVO.getLineName())
|
||||
.likeIfPresent(ConfigXRFConversionRateDO::getXRFProjectName, reqVO.getXRFProjectName())
|
||||
.eqIfPresent(ConfigXRFConversionRateDO::getConversionRate, reqVO.getConversionRate())
|
||||
.eqIfPresent(ConfigXRFConversionRateDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigXRFConversionRateDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigXRFConversionRateDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigXRFConversionRateDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFLineDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 荧光分析线 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigXRFLineMapper extends BaseMapperX<ConfigXRFLineDO> {
|
||||
|
||||
default PageResult<ConfigXRFLineDO> selectPage(ConfigXRFLinePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigXRFLineDO>()
|
||||
.eqIfPresent(ConfigXRFLineDO::getDeviceNo, reqVO.getDeviceNo())
|
||||
.likeIfPresent(ConfigXRFLineDO::getLineName, reqVO.getLineName())
|
||||
.eqIfPresent(ConfigXRFLineDO::getIsUse, reqVO.getIsUse())
|
||||
.eqIfPresent(ConfigXRFLineDO::getConnectString, reqVO.getConnectString())
|
||||
.eqIfPresent(ConfigXRFLineDO::getDataSourceType, reqVO.getDataSourceType())
|
||||
.betweenIfPresent(ConfigXRFLineDO::getLastSynchronousDataTime, reqVO.getLastSynchronousDataTime())
|
||||
.betweenIfPresent(ConfigXRFLineDO::getLastCheckDataTime, reqVO.getLastCheckDataTime())
|
||||
.eqIfPresent(ConfigXRFLineDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigXRFLineDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigXRFLineDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigXRFLineDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFProjectDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 荧光采集检测项目配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigXRFProjectMapper extends BaseMapperX<ConfigXRFProjectDO> {
|
||||
|
||||
default PageResult<ConfigXRFProjectDO> selectPage(ConfigXRFProjectPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigXRFProjectDO>()
|
||||
.eqIfPresent(ConfigXRFProjectDO::getDeviceNo, reqVO.getDeviceNo())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.likeIfPresent(ConfigXRFProjectDO::getShowName, reqVO.getShowName())
|
||||
.likeIfPresent(ConfigXRFProjectDO::getXRFProjectName, reqVO.getXRFProjectName())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getXRFProjectUnit, reqVO.getXRFProjectUnit())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getConversionRate, reqVO.getConversionRate())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getSortNo, reqVO.getSortNo())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigXRFProjectDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigXRFProjectDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigXRFProjectDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFConversionRateDO;
|
||||
|
||||
/**
|
||||
* 荧光数据采集特殊检测项目转换率配置 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigXRFConversionRateService {
|
||||
|
||||
/**
|
||||
* 创建荧光数据采集特殊检测项目转换率配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigXRFConversionRateRespVO createConfigXRFConversionRate(@Valid ConfigXRFConversionRateSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新荧光数据采集特殊检测项目转换率配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigXRFConversionRate(@Valid ConfigXRFConversionRateSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除荧光数据采集特殊检测项目转换率配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigXRFConversionRate(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除荧光数据采集特殊检测项目转换率配置
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigXRFConversionRateListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得荧光数据采集特殊检测项目转换率配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 荧光数据采集特殊检测项目转换率配置
|
||||
*/
|
||||
ConfigXRFConversionRateDO getConfigXRFConversionRate(Long id);
|
||||
|
||||
/**
|
||||
* 获得荧光数据采集特殊检测项目转换率配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 荧光数据采集特殊检测项目转换率配置分页
|
||||
*/
|
||||
PageResult<ConfigXRFConversionRateDO> getConfigXRFConversionRatePage(ConfigXRFConversionRatePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFConversionRateDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigXRFConversionRateMapper;
|
||||
|
||||
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 ConfigXRFConversionRateServiceImpl implements ConfigXRFConversionRateService {
|
||||
|
||||
@Resource
|
||||
private ConfigXRFConversionRateMapper configXRFConversionRateMapper;
|
||||
|
||||
@Override
|
||||
public ConfigXRFConversionRateRespVO createConfigXRFConversionRate(ConfigXRFConversionRateSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigXRFConversionRateDO configXRFConversionRate = BeanUtils.toBean(createReqVO, ConfigXRFConversionRateDO.class);
|
||||
configXRFConversionRateMapper.insert(configXRFConversionRate);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configXRFConversionRate, ConfigXRFConversionRateRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigXRFConversionRate(ConfigXRFConversionRateSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigXRFConversionRateExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigXRFConversionRateDO updateObj = BeanUtils.toBean(updateReqVO, ConfigXRFConversionRateDO.class);
|
||||
configXRFConversionRateMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigXRFConversionRate(Long id) {
|
||||
// 校验存在
|
||||
validateConfigXRFConversionRateExists(id);
|
||||
// 删除
|
||||
configXRFConversionRateMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigXRFConversionRateListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigXRFConversionRateExists(ids);
|
||||
// 删除
|
||||
configXRFConversionRateMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigXRFConversionRateExists(List<Long> ids) {
|
||||
List<ConfigXRFConversionRateDO> list = configXRFConversionRateMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_XRF_CONVERSION_RATE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigXRFConversionRateExists(Long id) {
|
||||
if (configXRFConversionRateMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_XRF_CONVERSION_RATE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigXRFConversionRateDO getConfigXRFConversionRate(Long id) {
|
||||
return configXRFConversionRateMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigXRFConversionRateDO> getConfigXRFConversionRatePage(ConfigXRFConversionRatePageReqVO pageReqVO) {
|
||||
return configXRFConversionRateMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFLineDO;
|
||||
|
||||
/**
|
||||
* 荧光分析线 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigXRFLineService {
|
||||
|
||||
/**
|
||||
* 创建荧光分析线
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigXRFLineRespVO createConfigXRFLine(@Valid ConfigXRFLineSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新荧光分析线
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigXRFLine(@Valid ConfigXRFLineSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除荧光分析线
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigXRFLine(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除荧光分析线
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigXRFLineListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得荧光分析线
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 荧光分析线
|
||||
*/
|
||||
ConfigXRFLineDO getConfigXRFLine(Long id);
|
||||
|
||||
/**
|
||||
* 获得荧光分析线分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 荧光分析线分页
|
||||
*/
|
||||
PageResult<ConfigXRFLineDO> getConfigXRFLinePage(ConfigXRFLinePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFLineDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigXRFLineMapper;
|
||||
|
||||
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 ConfigXRFLineServiceImpl implements ConfigXRFLineService {
|
||||
|
||||
@Resource
|
||||
private ConfigXRFLineMapper configXRFLineMapper;
|
||||
|
||||
@Override
|
||||
public ConfigXRFLineRespVO createConfigXRFLine(ConfigXRFLineSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigXRFLineDO configXRFLine = BeanUtils.toBean(createReqVO, ConfigXRFLineDO.class);
|
||||
configXRFLineMapper.insert(configXRFLine);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configXRFLine, ConfigXRFLineRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigXRFLine(ConfigXRFLineSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigXRFLineExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigXRFLineDO updateObj = BeanUtils.toBean(updateReqVO, ConfigXRFLineDO.class);
|
||||
configXRFLineMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigXRFLine(Long id) {
|
||||
// 校验存在
|
||||
validateConfigXRFLineExists(id);
|
||||
// 删除
|
||||
configXRFLineMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigXRFLineListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigXRFLineExists(ids);
|
||||
// 删除
|
||||
configXRFLineMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigXRFLineExists(List<Long> ids) {
|
||||
List<ConfigXRFLineDO> list = configXRFLineMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_XRF_LINE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigXRFLineExists(Long id) {
|
||||
if (configXRFLineMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_XRF_LINE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigXRFLineDO getConfigXRFLine(Long id) {
|
||||
return configXRFLineMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigXRFLineDO> getConfigXRFLinePage(ConfigXRFLinePageReqVO pageReqVO) {
|
||||
return configXRFLineMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFProjectDO;
|
||||
|
||||
/**
|
||||
* 荧光采集检测项目配置 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigXRFProjectService {
|
||||
|
||||
/**
|
||||
* 创建荧光采集检测项目配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigXRFProjectRespVO createConfigXRFProject(@Valid ConfigXRFProjectSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新荧光采集检测项目配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigXRFProject(@Valid ConfigXRFProjectSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除荧光采集检测项目配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigXRFProject(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除荧光采集检测项目配置
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigXRFProjectListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得荧光采集检测项目配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 荧光采集检测项目配置
|
||||
*/
|
||||
ConfigXRFProjectDO getConfigXRFProject(Long id);
|
||||
|
||||
/**
|
||||
* 获得荧光采集检测项目配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 荧光采集检测项目配置分页
|
||||
*/
|
||||
PageResult<ConfigXRFProjectDO> getConfigXRFProjectPage(ConfigXRFProjectPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFProjectDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigXRFProjectMapper;
|
||||
|
||||
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 ConfigXRFProjectServiceImpl implements ConfigXRFProjectService {
|
||||
|
||||
@Resource
|
||||
private ConfigXRFProjectMapper configXRFProjectMapper;
|
||||
|
||||
@Override
|
||||
public ConfigXRFProjectRespVO createConfigXRFProject(ConfigXRFProjectSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigXRFProjectDO configXRFProject = BeanUtils.toBean(createReqVO, ConfigXRFProjectDO.class);
|
||||
configXRFProjectMapper.insert(configXRFProject);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configXRFProject, ConfigXRFProjectRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigXRFProject(ConfigXRFProjectSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigXRFProjectExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigXRFProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigXRFProjectDO.class);
|
||||
configXRFProjectMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigXRFProject(Long id) {
|
||||
// 校验存在
|
||||
validateConfigXRFProjectExists(id);
|
||||
// 删除
|
||||
configXRFProjectMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigXRFProjectListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigXRFProjectExists(ids);
|
||||
// 删除
|
||||
configXRFProjectMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigXRFProjectExists(List<Long> ids) {
|
||||
List<ConfigXRFProjectDO> list = configXRFProjectMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_XRF_PROJECT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigXRFProjectExists(Long id) {
|
||||
if (configXRFProjectMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_XRF_PROJECT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigXRFProjectDO getConfigXRFProject(Long id) {
|
||||
return configXRFProjectMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigXRFProjectDO> getConfigXRFProjectPage(ConfigXRFProjectPageReqVO pageReqVO) {
|
||||
return configXRFProjectMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.qms.framework.datapermission.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.zt.plat.framework.datapermission.core.rule.dept.DeptDataPermissionRuleCustomizer;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class DataPermissionConfiguration {
|
||||
|
||||
@Bean
|
||||
public DeptDataPermissionRuleCustomizer sysDeptDataPermissionRuleCustomizer() {
|
||||
return rule -> {
|
||||
// dept
|
||||
//rule.addUserColumn(AdminUserDO.class, "id");
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* qms 模块的数据权限配置
|
||||
*/
|
||||
package com.zt.plat.module.qms.framework.datapermission;
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.bus.dal.mapper.BusinessXRFDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.config.dal.mapper.ConfigXRFConversionRateMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.config.dal.mapper.ConfigXRFLineMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.business.config.dal.mapper.ConfigXRFProjectMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user