fix:批次工段接口调整,批次拆分和物料入库添加了锁定数量限制。

This commit is contained in:
shusir
2026-03-04 18:00:49 +08:00
parent 787a6c12a0
commit 986a86f524
13 changed files with 152 additions and 244 deletions

View File

@@ -9,6 +9,7 @@ public class MaterialConstants {
public static final String DICT_MATERIAL_INBOUND_QUANTITY_LIMIT = "materialInboundQuantityLimit"; public static final String DICT_MATERIAL_INBOUND_QUANTITY_LIMIT = "materialInboundQuantityLimit";
// 序列号 // 序列号
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";
// 外部模块 // 外部模块

View File

@@ -92,12 +92,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
@Operation(summary = "获得物料批次分页") @Operation(summary = "获得物料批次分页")
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')") // @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) { public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
PageResult<MaterialBatchRespVO> pageResult; PageResult<MaterialBatchRespVO> pageResult = materialBatchService.getBatchGongPageWithPdtInfo(pageReqVO);
if (!pageReqVO.getOnlyGong()) {
pageResult = materialBatchService.getMaterialBatchPageWithPdtInfo(pageReqVO);
} else {
pageResult = materialBatchService.getMaterialBatchGongPageWithPdtInfo(pageReqVO);
}
return success(pageResult); return success(pageResult);
} }

View File

@@ -65,14 +65,6 @@ public class MaterialProductController extends AbstractFileUploadController impl
return success(materialProductService.getMaterialCategoryTree()); return success(materialProductService.getMaterialCategoryTree());
} }
// TODO 后边再对接
@GetMapping("/orig-material/{code}")
@Operation(summary = "根据物料编码获取外部系统原始物料")
public CommonResult<MaterialProductRespVO> getOriginalMaterial(@PathVariable String code) {
return success(new MaterialProductRespVO().setCode(code).setName("测试物料"));
}
@PostMapping("/save-material") @PostMapping("/save-material")
@Operation(summary = "保存物料大类") @Operation(summary = "保存物料大类")
// @PreAuthorize("@ss.hasPermission('qms:material-product:create')") // @PreAuthorize("@ss.hasPermission('qms:material-product:create')")

View File

@@ -22,8 +22,8 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "是否需要组装 children") @Schema(description = "是否需要组装 children")
private Boolean children = false; private Boolean children = false;
@Schema(description = "是否只需要工段") @Schema(description = "数据类型 batch-批次gong-工段,空-全部")
private Boolean onlyGong = false; private String dataType;
@Schema(description = "true-已处理false-未处理") @Schema(description = "true-已处理false-未处理")
private Boolean treatment = false; private Boolean treatment = false;
@@ -31,9 +31,6 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "批次编号") @Schema(description = "批次编号")
private String batchNo; private String batchNo;
// @Schema(description = "总数量")
// private BigDecimal inboundQuantity;
@Schema(description = "存放位置描述") @Schema(description = "存放位置描述")
private String location; private String location;
@@ -57,7 +54,7 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "提交状态,0-未提交1-已提交", example = "1") @Schema(description = "提交状态,0-未提交1-已提交", example = "1")
private Integer submitStatus; private Integer submitStatus;
@Schema(description = "验收状态", example = "1") @Schema(description = "验收状态 accepted-已验收not_accepted-未验收")
private String acceptanceStatus; private String acceptanceStatus;
@Schema(description = "是否检化验,1-是0-否") @Schema(description = "是否检化验,1-是0-否")

View File

@@ -15,6 +15,9 @@ public class MaterialProductQueryVO {
@Schema(description = "category-分类data-大类sku空-全部数据") @Schema(description = "category-分类data-大类sku空-全部数据")
private String nodeType; private String nodeType;
@Schema(description = "名称", example = "ZT")
private String name;
@Schema(description = "允许按量领取,1-领用时输入量按量领取0-领用时不能输入量,整个领走") @Schema(description = "允许按量领取,1-领用时输入量按量领取0-领用时不能输入量,整个领走")
private Integer enablePartial; private Integer enablePartial;

View File

@@ -44,6 +44,8 @@ public interface MaterialUseRecordMapper extends BaseMapperX<MaterialUseRecordDO
MPJLambdaWrapperX<MaterialUseRecordDO> wrapperX = new MPJLambdaWrapperX<MaterialUseRecordDO>() MPJLambdaWrapperX<MaterialUseRecordDO> wrapperX = new MPJLambdaWrapperX<MaterialUseRecordDO>()
.selectAll(MaterialUseRecordDO.class) .selectAll(MaterialUseRecordDO.class)
.selectAs(MaterialInfomationDO::getCode, MaterialUseRecordRespVO::getInfomationCode) .selectAs(MaterialInfomationDO::getCode, MaterialUseRecordRespVO::getInfomationCode)
.selectAs(MaterialProductDO::getName, MaterialUseRecordRespVO::getInfomationName)
.selectAs(MaterialProductDO::getModelNo, MaterialUseRecordRespVO::getModelNo)
.leftJoin(MaterialInfomationDO.class, MaterialInfomationDO::getId, MaterialUseRecordDO::getInfomationId) .leftJoin(MaterialInfomationDO.class, MaterialInfomationDO::getId, MaterialUseRecordDO::getInfomationId)
.innerJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialInfomationDO::getProductId) .innerJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialInfomationDO::getProductId)
.eqIfPresent(MaterialProductDO::getId, reqVO.getProductId()) .eqIfPresent(MaterialProductDO::getId, reqVO.getProductId())

View File

@@ -12,9 +12,9 @@ public enum MaterialAcceptStatus {
/** /**
* 部分验收 * 部分验收
*/ */
partAccepted, part_accepted,
/** /**
* 未验收 * 未验收
*/ */
notAccepted not_accepted
} }

View File

@@ -0,0 +1,16 @@
package com.zt.plat.module.qms.resource.material.enums;
/**
* 物料批次工段枚举
*
*/
public enum MaterialBatchGongType {
/**
* 批次
*/
batch,
/**
* 工段
*/
gong
}

View File

@@ -64,14 +64,6 @@ public interface MaterialBatchService {
*/ */
PageResult<MaterialBatchDO> getMaterialBatchPage(MaterialBatchPageReqVO pageReqVO); PageResult<MaterialBatchDO> getMaterialBatchPage(MaterialBatchPageReqVO pageReqVO);
/**
* 获得物料批次分页-可根据物料分类和大类级联查询
*
* @param pageReqVO 分页查询
* @return 物料批次分页
*/
PageResult<MaterialBatchRespVO> getMaterialBatchPageWithPdtInfo(MaterialBatchPageReqVO pageReqVO);
/** /**
* 批次工段拆分 * 批次工段拆分
* *
@@ -80,22 +72,6 @@ public interface MaterialBatchService {
*/ */
List<MaterialBatchRespVO> assignMaterialBatchGongduan(@Valid List<MaterialBatchSaveReqVO> createReqVOs); List<MaterialBatchRespVO> assignMaterialBatchGongduan(@Valid List<MaterialBatchSaveReqVO> createReqVOs);
/**
* 检查物料大类下是否有物料批次
*
* @param pdtId id
* @return 存在与否
*/
boolean checkIsExistsDataByPdt(Long pdtId);
/**
* 检查物料大类下是否有物料批次
*
* @param ids id 集合
* @return 存在与否
*/
boolean checkIsExistsDataByPdts(List<Long> ids);
/** /**
* 获取工段列表 * 获取工段列表
* *
@@ -120,14 +96,6 @@ public interface MaterialBatchService {
*/ */
List<MaterialBatchDO> getGongduanListByGongIds(List<Long> gongIds); List<MaterialBatchDO> getGongduanListByGongIds(List<Long> gongIds);
/**
* 获得批次工段分页 - 需要可以层级穿透查询及返回物料信息
*
* @param pageReqVO 分页请求参数
* @return 分页数据
*/
PageResult<MaterialBatchRespVO> getMaterialBatchGongPageWithPdtInfo(@Valid MaterialBatchPageReqVO pageReqVO);
/** /**
* 更新批次工段入库数量 * 更新批次工段入库数量
* *
@@ -190,4 +158,12 @@ public interface MaterialBatchService {
* @param lockType 锁定类型 * @param lockType 锁定类型
*/ */
void lockGongduanReturnExchangeCount(List<MaterialLifecycleDetailDO> gongs, LockType lockType); void lockGongduanReturnExchangeCount(List<MaterialLifecycleDetailDO> gongs, LockType lockType);
/**
* 获得批次工段分页 - 需要可以层级穿透查询及返回物料信息
*
* @param pageReqVO 分页请求参数
* @return 分页数据
*/
PageResult<MaterialBatchRespVO> getBatchGongPageWithPdtInfo(@Valid MaterialBatchPageReqVO pageReqVO);
} }

Some files were not shown because too many files have changed in this diff Show More