fix:批次工段接口调整,批次拆分和物料入库添加了锁定数量限制。
This commit is contained in:
@@ -9,6 +9,7 @@ public class MaterialConstants {
|
||||
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";
|
||||
|
||||
// 外部模块
|
||||
|
||||
@@ -92,12 +92,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
|
||||
@Operation(summary = "获得物料批次分页")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
|
||||
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
|
||||
PageResult<MaterialBatchRespVO> pageResult;
|
||||
if (!pageReqVO.getOnlyGong()) {
|
||||
pageResult = materialBatchService.getMaterialBatchPageWithPdtInfo(pageReqVO);
|
||||
} else {
|
||||
pageResult = materialBatchService.getMaterialBatchGongPageWithPdtInfo(pageReqVO);
|
||||
}
|
||||
PageResult<MaterialBatchRespVO> pageResult = materialBatchService.getBatchGongPageWithPdtInfo(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,14 +65,6 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
||||
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")
|
||||
@Operation(summary = "保存物料大类")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:material-product:create')")
|
||||
|
||||
@@ -22,8 +22,8 @@ public class MaterialBatchPageReqVO extends PageParam {
|
||||
@Schema(description = "是否需要组装 children")
|
||||
private Boolean children = false;
|
||||
|
||||
@Schema(description = "是否只需要工段")
|
||||
private Boolean onlyGong = false;
|
||||
@Schema(description = "数据类型 batch-批次,gong-工段,空-全部")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "true-已处理,false-未处理")
|
||||
private Boolean treatment = false;
|
||||
@@ -31,9 +31,6 @@ public class MaterialBatchPageReqVO extends PageParam {
|
||||
@Schema(description = "批次编号")
|
||||
private String batchNo;
|
||||
|
||||
// @Schema(description = "总数量")
|
||||
// private BigDecimal inboundQuantity;
|
||||
|
||||
@Schema(description = "存放位置描述")
|
||||
private String location;
|
||||
|
||||
@@ -57,7 +54,7 @@ public class MaterialBatchPageReqVO extends PageParam {
|
||||
@Schema(description = "提交状态,0-未提交,1-已提交", example = "1")
|
||||
private Integer submitStatus;
|
||||
|
||||
@Schema(description = "验收状态", example = "1")
|
||||
@Schema(description = "验收状态 accepted-已验收,not_accepted-未验收")
|
||||
private String acceptanceStatus;
|
||||
|
||||
@Schema(description = "是否检化验,1-是,0-否")
|
||||
|
||||
@@ -15,6 +15,9 @@ public class MaterialProductQueryVO {
|
||||
@Schema(description = "category-分类,data-大类sku,空-全部数据")
|
||||
private String nodeType;
|
||||
|
||||
@Schema(description = "名称", example = "ZT")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "允许按量领取,1-领用时输入量,按量领取;0-领用时不能输入量,整个领走")
|
||||
private Integer enablePartial;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,8 @@ public interface MaterialUseRecordMapper extends BaseMapperX<MaterialUseRecordDO
|
||||
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)
|
||||
.innerJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialInfomationDO::getProductId)
|
||||
.eqIfPresent(MaterialProductDO::getId, reqVO.getProductId())
|
||||
|
||||
@@ -12,9 +12,9 @@ public enum MaterialAcceptStatus {
|
||||
/**
|
||||
* 部分验收
|
||||
*/
|
||||
partAccepted,
|
||||
part_accepted,
|
||||
/**
|
||||
* 未验收
|
||||
*/
|
||||
notAccepted
|
||||
not_accepted
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.zt.plat.module.qms.resource.material.enums;
|
||||
|
||||
/**
|
||||
* 物料批次工段枚举
|
||||
*
|
||||
*/
|
||||
public enum MaterialBatchGongType {
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
batch,
|
||||
/**
|
||||
* 工段
|
||||
*/
|
||||
gong
|
||||
}
|
||||
@@ -64,14 +64,6 @@ public interface MaterialBatchService {
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* 检查物料大类下是否有物料批次
|
||||
*
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* 获得批次工段分页 - 需要可以层级穿透查询及返回物料信息
|
||||
*
|
||||
* @param pageReqVO 分页请求参数
|
||||
* @return 分页数据
|
||||
*/
|
||||
PageResult<MaterialBatchRespVO> getMaterialBatchGongPageWithPdtInfo(@Valid MaterialBatchPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 更新批次工段入库数量
|
||||
*
|
||||
@@ -190,4 +158,12 @@ public interface MaterialBatchService {
|
||||
* @param 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
Reference in New Issue
Block a user