feat:准备检化验发起;标签二维码用json字符串;
This commit is contained in:
@@ -11,6 +11,7 @@ public class MaterialConstants {
|
|||||||
// 序列号
|
// 序列号
|
||||||
public static final String SEQUENCE_BATCH_KEY = "QMS_MATERIAL_BATCH_NO";
|
public static final String SEQUENCE_BATCH_KEY = "QMS_MATERIAL_BATCH_NO";
|
||||||
public static final String SEQUENCE_INF_KEY = "QMS_MATERIAL_INF_NO";
|
public static final String SEQUENCE_INF_KEY = "QMS_MATERIAL_INF_NO";
|
||||||
|
public static final String SEQUENCE_ASSAY_ACCEPT_SAMPLE_KEY = "QMS_MATERIAL_ASSAY_ACCEPT_SAMPLE";
|
||||||
|
|
||||||
// 外部模块
|
// 外部模块
|
||||||
public static final String DEVICE_BURETTE_CATEGORY_NAME = "滴定管";
|
public static final String DEVICE_BURETTE_CATEGORY_NAME = "滴定管";
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.assist.MaterialQrCode;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@@ -37,9 +40,7 @@ public class MaterialInfomationRespVO {
|
|||||||
@Schema(description = "工段部门id")
|
@Schema(description = "工段部门id")
|
||||||
@ExcelProperty("工段部门id")
|
@ExcelProperty("工段部门id")
|
||||||
private Long assignDepartmentId;
|
private Long assignDepartmentId;
|
||||||
/**
|
|
||||||
* 分配部门名称
|
|
||||||
*/
|
|
||||||
@Schema(description = "工段分配部门名称")
|
@Schema(description = "工段分配部门名称")
|
||||||
@ExcelProperty("工段分配部门名称")
|
@ExcelProperty("工段分配部门名称")
|
||||||
private String assignDepartmentName;
|
private String assignDepartmentName;
|
||||||
@@ -56,6 +57,9 @@ public class MaterialInfomationRespVO {
|
|||||||
@ExcelProperty("编码")
|
@ExcelProperty("编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "二维码内容")
|
||||||
|
private MaterialQrCode qrCode;
|
||||||
|
|
||||||
@Schema(description = "来源,批次入库,标液配置、危化品配置等")
|
@Schema(description = "来源,批次入库,标液配置、危化品配置等")
|
||||||
@ExcelProperty("来源,批次入库,标液配置、危化品配置等")
|
@ExcelProperty("来源,批次入库,标液配置、危化品配置等")
|
||||||
@Dict(dicCode = "material_infomation_origin")
|
@Dict(dicCode = "material_infomation_origin")
|
||||||
@@ -216,4 +220,12 @@ public class MaterialInfomationRespVO {
|
|||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
// 设置二维码内容
|
||||||
|
public String getQrCode() {
|
||||||
|
MaterialQrCode qrCode = new MaterialQrCode();
|
||||||
|
qrCode.setCode(this.code);
|
||||||
|
qrCode.setName(this.name);
|
||||||
|
return JSONUtil.toJsonStr(qrCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.assist.MaterialQrCode;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -86,4 +89,15 @@ public class MaterialInventoryInboundDetailRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "二维码内容")
|
||||||
|
private MaterialQrCode qrCode;
|
||||||
|
|
||||||
|
// 设置二维码内容
|
||||||
|
public String getQrCode() {
|
||||||
|
MaterialQrCode qrCode = new MaterialQrCode();
|
||||||
|
qrCode.setCode(this.infomationCode);
|
||||||
|
qrCode.setName(this.infomationName);
|
||||||
|
return JSONUtil.toJsonStr(qrCode);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -98,4 +98,7 @@ public class MaterialInventoryInboundRespVO {
|
|||||||
@ExcelProperty("入库明细")
|
@ExcelProperty("入库明细")
|
||||||
private List<MaterialInventoryInboundDetailRespVO> detailList;
|
private List<MaterialInventoryInboundDetailRespVO> detailList;
|
||||||
|
|
||||||
|
/*@Schema(description = "当次入库的物料实例")
|
||||||
|
private List<MaterialInfomationRespVO> infomationList;*/
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 物料通用流程明细 Response VO")
|
@Schema(description = "管理后台 - 物料通用流程明细 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -100,6 +101,12 @@ public class MaterialLifecycleDetailRespVO {
|
|||||||
@Schema(description = "检化验id")
|
@Schema(description = "检化验id")
|
||||||
private Long assayId;
|
private Long assayId;
|
||||||
|
|
||||||
|
@Schema(description = "检化验样品大类")
|
||||||
|
private Long assaySampleId;
|
||||||
|
|
||||||
|
@Schema(description = "检化验检测项")
|
||||||
|
private List<Long> assayItemIds;
|
||||||
|
|
||||||
@Schema(description = "物料实例id", example = "968")
|
@Schema(description = "物料实例id", example = "968")
|
||||||
@ExcelProperty("物料实例id")
|
@ExcelProperty("物料实例id")
|
||||||
private Long infomationId;
|
private Long infomationId;
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.controller.vo.assist;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料二维码信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MaterialQrCode {
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
package com.zt.plat.module.qms.resource.material.controller.vo.query;
|
package com.zt.plat.module.qms.resource.material.controller.vo.query;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.zt.plat.framework.common.exception.ServiceException;
|
||||||
|
import com.zt.plat.module.qms.resource.material.controller.vo.assist.MaterialQrCode;
|
||||||
import com.zt.plat.module.qms.resource.material.enums.MaterialInfomationOneBusinessType;
|
import com.zt.plat.module.qms.resource.material.enums.MaterialInfomationOneBusinessType;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -33,6 +37,9 @@ public class MaterialInfomationQueryVO {
|
|||||||
@Schema(description = "名称")
|
@Schema(description = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "二维码")
|
||||||
|
private String qrCode;
|
||||||
|
|
||||||
@Schema(description = "是否危险品,1-是,0-否")
|
@Schema(description = "是否危险品,1-是,0-否")
|
||||||
private Integer hazardous;
|
private Integer hazardous;
|
||||||
|
|
||||||
@@ -88,4 +95,18 @@ public class MaterialInfomationQueryVO {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
// 优先从二维码字符串中解析 code
|
||||||
|
if (StrUtil.isNotEmpty(this.qrCode)) {
|
||||||
|
try {
|
||||||
|
MaterialQrCode materialQrCode = JSONUtil.toBean(this.qrCode, MaterialQrCode.class);
|
||||||
|
if (materialQrCode == null) return this.code;
|
||||||
|
return StrUtil.isNotEmpty(materialQrCode.getCode()) ? materialQrCode.getCode() : this.code;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(1_032_160_000,"二维码解析失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.code;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -54,6 +54,16 @@ public class MaterialCorrelationAssayDO extends BusinessBaseDO {
|
|||||||
@TableField("SMP_ID")
|
@TableField("SMP_ID")
|
||||||
private Long sampleId;
|
private Long sampleId;
|
||||||
/**
|
/**
|
||||||
|
* 样品名称
|
||||||
|
*/
|
||||||
|
@TableField("SMP_NAME")
|
||||||
|
private String sampleName;
|
||||||
|
/**
|
||||||
|
* 样品编号
|
||||||
|
*/
|
||||||
|
@TableField("SMP_CD")
|
||||||
|
private String sampleCode;
|
||||||
|
/**
|
||||||
* 批次id
|
* 批次id
|
||||||
*/
|
*/
|
||||||
@TableField("BAT_ID")
|
@TableField("BAT_ID")
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料检化验业务类型
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public enum MaterialAssayBusinessType {
|
||||||
|
/**
|
||||||
|
* 验收检化验
|
||||||
|
*/
|
||||||
|
accept_assay,
|
||||||
|
}
|
||||||
@@ -61,4 +61,32 @@ public interface MaterialCorrelationAssayService {
|
|||||||
*/
|
*/
|
||||||
PageResult<MaterialCorrelationAssayDO> getMaterialCorrelationAssayPage(MaterialCorrelationAssayPageReqVO pageReqVO);
|
PageResult<MaterialCorrelationAssayDO> getMaterialCorrelationAssayPage(MaterialCorrelationAssayPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param assayDO 检化验关联信息
|
||||||
|
*/
|
||||||
|
void save(MaterialCorrelationAssayDO assayDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存
|
||||||
|
*
|
||||||
|
* @param assayDOS 检化验关联信息
|
||||||
|
*/
|
||||||
|
void saveBatch(List<MaterialCorrelationAssayDO> assayDOS);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param ids id列表
|
||||||
|
* @return 检化验关联信息列表
|
||||||
|
*/
|
||||||
|
List<MaterialCorrelationAssayDO> getListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新
|
||||||
|
*
|
||||||
|
* @param needUpdateAssays 检化验关联信息列表
|
||||||
|
*/
|
||||||
|
void updateBatch(List<MaterialCorrelationAssayDO> needUpdateAssays);
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user