fix:危化品配置记录
This commit is contained in:
@@ -33,6 +33,9 @@ public class MaterialInfomationPageReqVO extends PageParam {
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "是否需要识别存在危化品配置信息,默认false")
|
||||
private Boolean needDetectExistHazardousMake = false;
|
||||
|
||||
@Schema(description = "技术参数")
|
||||
private String parameter;
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
@@ -124,6 +122,10 @@ public class MaterialInfomationRespVO {
|
||||
@Dict(dicCode = "yes_or_no")
|
||||
private Integer hazardous;
|
||||
|
||||
@Schema(description = "是否存在危化品配置信息")
|
||||
@ExcelProperty("是否存在危化品配置信息")
|
||||
private Boolean existHazardousMake;
|
||||
|
||||
@Schema(description = "是否标准溶液,1-是,0-否")
|
||||
@ExcelProperty("是否标准溶液,1-是,0-否")
|
||||
@Dict(dicCode = "yes_or_no")
|
||||
@@ -184,7 +186,11 @@ public class MaterialInfomationRespVO {
|
||||
|
||||
@Schema(description = "剩余量")
|
||||
@ExcelProperty("剩余量")
|
||||
private String remainingVolume;
|
||||
private BigDecimal remainingVolume;
|
||||
|
||||
@Schema(description = "初始总量")
|
||||
@ExcelProperty("初始总量")
|
||||
private BigDecimal initialVolume;
|
||||
|
||||
@Schema(description = "用完标记,0-未标记,1-已用完标记")
|
||||
@ExcelProperty("用完标记,0-未标记,1-已用完标记")
|
||||
|
||||
@@ -13,9 +13,12 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@Data
|
||||
public class MaterialUseRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料实例id,1-是;0-否", example = "16550")
|
||||
@Schema(description = "物料实例id", example = "16550")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "大类id", example = "16550")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "是否配置危险品")
|
||||
private String hazardousMakeFlag;
|
||||
|
||||
|
||||
@@ -25,6 +25,14 @@ public class MaterialUseRecordRespVO {
|
||||
@ExcelProperty("物料实例编号")
|
||||
private String infomationCode;
|
||||
|
||||
@Schema(description = "物料实例名称")
|
||||
@ExcelProperty("物料实例名称")
|
||||
private String infomationName;
|
||||
|
||||
@Schema(description = "型号")
|
||||
@ExcelProperty("型号")
|
||||
private String modelNo;
|
||||
|
||||
@Schema(description = "是否配置危险品", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否配置危险品")
|
||||
@Dict(dicCode = "yes_or_no")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo.resp;
|
||||
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInfomationRespVO;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialUseRecordRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -11,7 +12,7 @@ import java.util.List;
|
||||
public class MaterialUseRecordWithMakeInfoRespVO {
|
||||
|
||||
@Schema(description = "参与配置明细")
|
||||
private List<MaterialInfomationRespVO> makeInfoList;
|
||||
private List<MaterialUseRecordRespVO> makeInfoList;
|
||||
|
||||
@Schema(description = "配置生成的实例")
|
||||
private MaterialInfomationRespVO targetInfo;
|
||||
|
||||
@@ -174,6 +174,11 @@ public class MaterialInfomationDO extends BusinessBaseDO {
|
||||
@TableField("RMNG_VOL")
|
||||
private BigDecimal remainingVolume;
|
||||
/**
|
||||
* 初始总量
|
||||
*/
|
||||
@TableField("INIT_VOL")
|
||||
private BigDecimal initialVolume;
|
||||
/**
|
||||
* 用完标记,0-未标记,1-已用完标记
|
||||
*/
|
||||
@TableField("USE_END_FLG")
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialStandardS
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 物料实例 Mapper
|
||||
@@ -123,7 +122,7 @@ public interface MaterialInfomationMapper extends BaseMapperX<MaterialInfomation
|
||||
MaterialInfomationDO::getOpenStatus, MaterialInfomationDO::getOpenUserId, MaterialInfomationDO::getOpenUserName,
|
||||
MaterialInfomationDO::getOpenDate, MaterialInfomationDO::getExpirationDate, MaterialInfomationDO::getManufacturerDate,
|
||||
MaterialInfomationDO::getExpirationFlag, MaterialInfomationDO::getRemainingVolume, MaterialInfomationDO::getUseEndFlag,
|
||||
MaterialInfomationDO::getSystemDepartmentCode, MaterialInfomationDO::getRemark,
|
||||
MaterialInfomationDO::getInitialVolume, MaterialInfomationDO::getSystemDepartmentCode, MaterialInfomationDO::getRemark,
|
||||
MaterialInfomationDO::getCreateTime, MaterialInfomationDO::getUpdateTime)
|
||||
.select(MaterialProductDO::getName, MaterialProductDO::getSpecification, MaterialProductDO::getStandardCapacity,
|
||||
MaterialProductDO::getModelNo, MaterialProductDO::getParameter, MaterialProductDO::getManufacturer,
|
||||
@@ -148,7 +147,7 @@ public interface MaterialInfomationMapper extends BaseMapperX<MaterialInfomation
|
||||
return selectJoinOne(MaterialInfomationRespVO.class, wrapper);
|
||||
}
|
||||
|
||||
default List<MaterialInfomationRespVO> selectOneWithPdtInfoByInfIds(List<Long> ids) {
|
||||
default List<MaterialInfomationRespVO> selectListWithPdtInfoByInfIds(List<Long> ids) {
|
||||
MPJLambdaWrapper<MaterialInfomationDO> wrapper = getInfomationDOMPJLambdaWrapper();
|
||||
wrapper.in(MaterialInfomationDO::getId, ids);
|
||||
return selectJoinList(MaterialInfomationRespVO.class, wrapper);
|
||||
|
||||
@@ -7,9 +7,12 @@ import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialUseRecordPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialUseRecordRespVO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInfomationDO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialProductDO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialUseRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 使用记录 Mapper
|
||||
*
|
||||
@@ -42,6 +45,9 @@ public interface MaterialUseRecordMapper extends BaseMapperX<MaterialUseRecordDO
|
||||
.selectAll(MaterialUseRecordDO.class)
|
||||
.selectAs(MaterialInfomationDO::getCode, MaterialUseRecordRespVO::getInfomationCode)
|
||||
.leftJoin(MaterialInfomationDO.class, MaterialInfomationDO::getId, MaterialUseRecordDO::getInfomationId)
|
||||
.innerJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialInfomationDO::getProductId)
|
||||
.eqIfPresent(MaterialProductDO::getId, reqVO.getProductId())
|
||||
.eqIfPresent(MaterialUseRecordDO::getInfomationId, reqVO.getInfomationId())
|
||||
.eqIfPresent(MaterialUseRecordDO::getHazardousMakeFlag, reqVO.getHazardousMakeFlag())
|
||||
.betweenIfPresent(MaterialUseRecordDO::getUseDate, reqVO.getUseDate())
|
||||
.likeIfPresent(MaterialUseRecordDO::getUserName, reqVO.getUserName())
|
||||
@@ -50,7 +56,19 @@ public interface MaterialUseRecordMapper extends BaseMapperX<MaterialUseRecordDO
|
||||
.eqIfPresent(MaterialUseRecordDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.likeIfPresent(MaterialUseRecordDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(MaterialUseRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(MaterialUseRecordDO::getId);
|
||||
.orderByDesc(MaterialInfomationDO::getId);
|
||||
return selectJoinPage(reqVO, MaterialUseRecordRespVO.class, wrapperX);
|
||||
}
|
||||
|
||||
default List<MaterialUseRecordRespVO> selectListWithInf(List<Long> ids) {
|
||||
MPJLambdaWrapperX<MaterialUseRecordDO> wrapperX = new MPJLambdaWrapperX<MaterialUseRecordDO>()
|
||||
.selectAll(MaterialUseRecordDO.class)
|
||||
.selectAs(MaterialInfomationDO::getCode, MaterialUseRecordRespVO::getInfomationCode)
|
||||
.selectAs(MaterialProductDO::getName, MaterialUseRecordRespVO::getInfomationName)
|
||||
.selectAs(MaterialProductDO::getModelNo, MaterialUseRecordRespVO::getModelNo)
|
||||
.leftJoin(MaterialInfomationDO.class, MaterialInfomationDO::getId, MaterialUseRecordDO::getInfomationId)
|
||||
.leftJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialInfomationDO::getProductId)
|
||||
.in(MaterialUseRecordDO::getId, ids);
|
||||
return selectJoinList(MaterialUseRecordRespVO.class, wrapperX);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.zt.plat.module.qms.resource.material.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInfomationPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInfomationRespVO;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInfomationSaveReqVO;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.query.MaterialInfomationQueryVO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialBatchDO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInfomationDO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialProductDO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialStandardSolutionDO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
|
||||
@@ -145,4 +149,35 @@ public interface MaterialInfomationService {
|
||||
* @return 物料信息
|
||||
*/
|
||||
List<MaterialInfomationRespVO> getMaterialInfomationsWithPdtInfoByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 保存物料信息 - 危化品配置生成
|
||||
*
|
||||
* @param product 大类信息
|
||||
* @param totalOperationQuantity 总操作数量
|
||||
* @param productId 大类id
|
||||
* @return 物料信息
|
||||
*/
|
||||
MaterialInfomationDO saveMaterialInfomationByHzrdMtrlMake(MaterialProductDO product, BigDecimal totalOperationQuantity, Long productId);
|
||||
|
||||
/**
|
||||
* 批量保存物料信息 - 标准溶液配置生成生成
|
||||
*
|
||||
* @param productId 大类id
|
||||
* @param mtrlStandSol 标液
|
||||
* @return 物料信息
|
||||
*/
|
||||
MaterialInfomationDO saveMaterialInfomationByStdSolMake(Long productId, MaterialStandardSolutionDO mtrlStandSol);
|
||||
|
||||
/**
|
||||
* 批量保存物料信息 - 批次入库生成
|
||||
*
|
||||
* @param locationId 位置id
|
||||
* @param reqQuantity 数量
|
||||
* @param gongduanId 工段id
|
||||
* @param product 大类信息
|
||||
* @param batch 批次信息
|
||||
* @return 物料信息
|
||||
*/
|
||||
List<MaterialInfomationDO> saveMaterialInfomationsByBatInb(Long locationId, BigDecimal reqQuantity, Long gongduanId, MaterialProductDO product, MaterialBatchDO batch);
|
||||
}
|
||||
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