荧光采集
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user