空白样检测项目配置
This commit is contained in:
@@ -79,6 +79,7 @@ public interface ErrorCodeConstants {
|
|||||||
|
|
||||||
ErrorCode CONFIG_QC_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控样与检测方法配置不存在");
|
ErrorCode CONFIG_QC_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控样与检测方法配置不存在");
|
||||||
ErrorCode CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控与定值样关系不存在");
|
ErrorCode CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控与定值样关系不存在");
|
||||||
|
ErrorCode CONFIG_QC_SAMPLE_METHOD_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控样检测方法参数配置不存在");
|
||||||
|
|
||||||
/*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/
|
/*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/
|
||||||
ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在");
|
ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在");
|
||||||
|
|||||||
@@ -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.ConfigQCSampleMethodParameterDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.service.ConfigQCSampleMethodParameterService;
|
||||||
|
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-QC-sample-method-parameter")
|
||||||
|
@Validated
|
||||||
|
public class ConfigQCSampleMethodParameterController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigQCSampleMethodParameterService configQCSampleMethodParameterService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建质控样检测方法参数配置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:create')")
|
||||||
|
public CommonResult<ConfigQCSampleMethodParameterRespVO> createConfigQCSampleMethodParameter(@Valid @RequestBody ConfigQCSampleMethodParameterSaveReqVO createReqVO) {
|
||||||
|
return success(configQCSampleMethodParameterService.createConfigQCSampleMethodParameter(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新质控样检测方法参数配置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:update')")
|
||||||
|
public CommonResult<Boolean> updateConfigQCSampleMethodParameter(@Valid @RequestBody ConfigQCSampleMethodParameterSaveReqVO updateReqVO) {
|
||||||
|
configQCSampleMethodParameterService.updateConfigQCSampleMethodParameter(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除质控样检测方法参数配置")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:delete')")
|
||||||
|
public CommonResult<Boolean> deleteConfigQCSampleMethodParameter(@RequestParam("id") Long id) {
|
||||||
|
configQCSampleMethodParameterService.deleteConfigQCSampleMethodParameter(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除质控样检测方法参数配置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:delete')")
|
||||||
|
public CommonResult<Boolean> deleteConfigQCSampleMethodParameterList(@RequestBody BatchDeleteReqVO req) {
|
||||||
|
configQCSampleMethodParameterService.deleteConfigQCSampleMethodParameterListByIds(req.getIds());
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得质控样检测方法参数配置")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:query')")
|
||||||
|
public CommonResult<ConfigQCSampleMethodParameterRespVO> getConfigQCSampleMethodParameter(@RequestParam("id") Long id) {
|
||||||
|
ConfigQCSampleMethodParameterDO configQCSampleMethodParameter = configQCSampleMethodParameterService.getConfigQCSampleMethodParameter(id);
|
||||||
|
return success(BeanUtils.toBean(configQCSampleMethodParameter, ConfigQCSampleMethodParameterRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得质控样检测方法参数配置分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:query')")
|
||||||
|
public CommonResult<PageResult<ConfigQCSampleMethodParameterRespVO>> getConfigQCSampleMethodParameterPage(@Valid ConfigQCSampleMethodParameterPageReqVO pageReqVO) {
|
||||||
|
PageResult<ConfigQCSampleMethodParameterDO> pageResult = configQCSampleMethodParameterService.getConfigQCSampleMethodParameterPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, ConfigQCSampleMethodParameterRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出质控样检测方法参数配置 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('qms:config-QC-sample-method-parameter:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportConfigQCSampleMethodParameterExcel(@Valid ConfigQCSampleMethodParameterPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<ConfigQCSampleMethodParameterDO> list = configQCSampleMethodParameterService.getConfigQCSampleMethodParameterPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "质控样检测方法参数配置.xls", "数据", ConfigQCSampleMethodParameterRespVO.class,
|
||||||
|
BeanUtils.toBean(list, ConfigQCSampleMethodParameterRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
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 ConfigQCSampleMethodParameterPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "检测方法与质控样类型配置ID", example = "28109")
|
||||||
|
private Long configQCSampleMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "29135")
|
||||||
|
private Long dictionaryParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许为空")
|
||||||
|
private Integer isNull;
|
||||||
|
|
||||||
|
@Schema(description = "计算公式")
|
||||||
|
private String formula;
|
||||||
|
|
||||||
|
@Schema(description = "pc界面是否显示")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
|
||||||
|
@Schema(description = "版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
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 ConfigQCSampleMethodParameterRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26251")
|
||||||
|
@ExcelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法与质控样类型配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28109")
|
||||||
|
@ExcelProperty("检测方法与质控样类型配置ID")
|
||||||
|
private Long configQCSampleMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29135")
|
||||||
|
@ExcelProperty("参数ID,字典表【T_DIC_PRM】")
|
||||||
|
private Long dictionaryParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
@ExcelProperty("小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "默认值")
|
||||||
|
@ExcelProperty("默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("是否允许为空")
|
||||||
|
private Integer isNull;
|
||||||
|
|
||||||
|
@Schema(description = "计算公式")
|
||||||
|
@ExcelProperty("计算公式")
|
||||||
|
private String formula;
|
||||||
|
|
||||||
|
@Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("pc界面是否显示")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
|
||||||
|
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
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 ConfigQCSampleMethodParameterSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26251")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法与质控样类型配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28109")
|
||||||
|
@NotNull(message = "检测方法与质控样类型配置ID不能为空")
|
||||||
|
private Long configQCSampleMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29135")
|
||||||
|
@NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空")
|
||||||
|
private Long dictionaryParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "小数位")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
|
||||||
|
@Schema(description = "默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "是否允许为空不能为空")
|
||||||
|
private Integer isNull;
|
||||||
|
|
||||||
|
@Schema(description = "计算公式")
|
||||||
|
private String formula;
|
||||||
|
|
||||||
|
@Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "pc界面是否显示不能为空")
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
@Schema(description = "排序号")
|
||||||
|
private Integer sortNo;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "版本不能为空")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
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_qc_smp_mthd_prm")
|
||||||
|
@KeySequence("t_cfg_qc_smp_mthd_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class ConfigQCSampleMethodParameterDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 检测方法与质控样类型配置ID
|
||||||
|
*/
|
||||||
|
@TableField("CFG_QC_SMP_MTHD_ID")
|
||||||
|
private Long configQCSampleMethodId;
|
||||||
|
/**
|
||||||
|
* 参数ID,字典表【T_DIC_PRM】
|
||||||
|
*/
|
||||||
|
@TableField("DIC_PRM_ID")
|
||||||
|
private Long dictionaryParameterId;
|
||||||
|
/**
|
||||||
|
* 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间
|
||||||
|
*/
|
||||||
|
@TableField("DAT_TP")
|
||||||
|
private String dataType;
|
||||||
|
/**
|
||||||
|
* 小数位
|
||||||
|
*/
|
||||||
|
@TableField("DEC_POS")
|
||||||
|
private Integer decimalPosition;
|
||||||
|
/**
|
||||||
|
* 默认值
|
||||||
|
*/
|
||||||
|
@TableField("DFT_VAL")
|
||||||
|
private String defaultValue;
|
||||||
|
/**
|
||||||
|
* 是否允许为空
|
||||||
|
*/
|
||||||
|
@TableField("IS_NLL")
|
||||||
|
private Integer isNull;
|
||||||
|
/**
|
||||||
|
* 计算公式
|
||||||
|
*/
|
||||||
|
@TableField("FMU")
|
||||||
|
private String formula;
|
||||||
|
/**
|
||||||
|
* pc界面是否显示
|
||||||
|
*/
|
||||||
|
@TableField("IS_SHW")
|
||||||
|
private Integer isShow;
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
@TableField("SRT_NO")
|
||||||
|
private Integer sortNo;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@TableField("SYS_DEPT_CD")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField("RMK")
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 版本
|
||||||
|
*/
|
||||||
|
@TableField("VER")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
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.ConfigQCSampleMethodParameterDO;
|
||||||
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质控样检测方法参数配置 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ConfigQCSampleMethodParameterMapper extends BaseMapperX<ConfigQCSampleMethodParameterDO> {
|
||||||
|
|
||||||
|
default PageResult<ConfigQCSampleMethodParameterDO> selectPage(ConfigQCSampleMethodParameterPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigQCSampleMethodParameterDO>()
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getConfigQCSampleMethodId, reqVO.getConfigQCSampleMethodId())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getDictionaryParameterId, reqVO.getDictionaryParameterId())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getDataType, reqVO.getDataType())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getDefaultValue, reqVO.getDefaultValue())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getIsNull, reqVO.getIsNull())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getFormula, reqVO.getFormula())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getIsShow, reqVO.getIsShow())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getSortNo, reqVO.getSortNo())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.betweenIfPresent(ConfigQCSampleMethodParameterDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getRemark, reqVO.getRemark())
|
||||||
|
.eqIfPresent(ConfigQCSampleMethodParameterDO::getVersion, reqVO.getVersion())
|
||||||
|
.orderByDesc(ConfigQCSampleMethodParameterDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.zt.plat.module.qms.business.config.service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCSampleMethodParameterDO;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质控样检测方法参数配置 Service 接口
|
||||||
|
*
|
||||||
|
* @author 后台管理
|
||||||
|
*/
|
||||||
|
public interface ConfigQCSampleMethodParameterService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建质控样检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
ConfigQCSampleMethodParameterRespVO createConfigQCSampleMethodParameter(@Valid ConfigQCSampleMethodParameterSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新质控样检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateConfigQCSampleMethodParameter(@Valid ConfigQCSampleMethodParameterSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除质控样检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteConfigQCSampleMethodParameter(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除质控样检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteConfigQCSampleMethodParameterListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得质控样检测方法参数配置
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 质控样检测方法参数配置
|
||||||
|
*/
|
||||||
|
ConfigQCSampleMethodParameterDO getConfigQCSampleMethodParameter(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得质控样检测方法参数配置分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 质控样检测方法参数配置分页
|
||||||
|
*/
|
||||||
|
PageResult<ConfigQCSampleMethodParameterDO> getConfigQCSampleMethodParameterPage(ConfigQCSampleMethodParameterPageReqVO 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.ConfigQCSampleMethodParameterDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodParameterMapper;
|
||||||
|
|
||||||
|
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 ConfigQCSampleMethodParameterServiceImpl implements ConfigQCSampleMethodParameterService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ConfigQCSampleMethodParameterMapper configQCSampleMethodParameterMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigQCSampleMethodParameterRespVO createConfigQCSampleMethodParameter(ConfigQCSampleMethodParameterSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
ConfigQCSampleMethodParameterDO configQCSampleMethodParameter = BeanUtils.toBean(createReqVO, ConfigQCSampleMethodParameterDO.class);
|
||||||
|
configQCSampleMethodParameterMapper.insert(configQCSampleMethodParameter);
|
||||||
|
// 返回
|
||||||
|
return BeanUtils.toBean(configQCSampleMethodParameter, ConfigQCSampleMethodParameterRespVO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateConfigQCSampleMethodParameter(ConfigQCSampleMethodParameterSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateConfigQCSampleMethodParameterExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
ConfigQCSampleMethodParameterDO updateObj = BeanUtils.toBean(updateReqVO, ConfigQCSampleMethodParameterDO.class);
|
||||||
|
configQCSampleMethodParameterMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteConfigQCSampleMethodParameter(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateConfigQCSampleMethodParameterExists(id);
|
||||||
|
// 删除
|
||||||
|
configQCSampleMethodParameterMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteConfigQCSampleMethodParameterListByIds(List<Long> ids) {
|
||||||
|
// 校验存在
|
||||||
|
validateConfigQCSampleMethodParameterExists(ids);
|
||||||
|
// 删除
|
||||||
|
configQCSampleMethodParameterMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateConfigQCSampleMethodParameterExists(List<Long> ids) {
|
||||||
|
List<ConfigQCSampleMethodParameterDO> list = configQCSampleMethodParameterMapper.selectByIds(ids);
|
||||||
|
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||||
|
throw exception(CONFIG_QC_SAMPLE_METHOD_PARAMETER_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateConfigQCSampleMethodParameterExists(Long id) {
|
||||||
|
if (configQCSampleMethodParameterMapper.selectById(id) == null) {
|
||||||
|
throw exception(CONFIG_QC_SAMPLE_METHOD_PARAMETER_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigQCSampleMethodParameterDO getConfigQCSampleMethodParameter(Long id) {
|
||||||
|
return configQCSampleMethodParameterMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ConfigQCSampleMethodParameterDO> getConfigQCSampleMethodParameterPage(ConfigQCSampleMethodParameterPageReqVO pageReqVO) {
|
||||||
|
return configQCSampleMethodParameterMapper.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.config.dal.mapper.ConfigQCSampleMethodParameterMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user