feat:物料退换货及准备检化验

This commit is contained in:
shusir
2026-03-02 18:19:16 +08:00
parent ad01b42b65
commit fa06a85893
12 changed files with 154 additions and 42 deletions

View File

@@ -54,6 +54,9 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "分配部门名称")
private String assignDepartmentName;
@Schema(description = "提交状态,0-未提交1-已提交", example = "1")
private Integer submitStatus;
@Schema(description = "验收状态", example = "1")
private String acceptanceStatus;

View File

@@ -49,6 +49,10 @@ public class MaterialBatchRespVO {
@ExcelProperty("批次编号")
private String batchNo;
@Schema(description = "初始总数量")
@ExcelProperty("初始总数量")
private BigDecimal initialQuantity;
@Schema(description = "总数量")
@ExcelProperty("总数量")
private BigDecimal inboundQuantity;

View File

@@ -89,6 +89,22 @@ public class MaterialLifecycleDetailRespVO {
@ExcelProperty("物料实例id")
private Long infomationId;
@Schema(description = "物料实例编号")
@ExcelProperty("物料实例编号")
private String infomationCode;
@Schema(description = "物料实例名称")
@ExcelProperty("物料实例名称")
private String infomationName;
@Schema(description = "物料实例规格")
@ExcelProperty("物料实例规格")
private String infomationModelNo;
@Schema(description = "物料实例单位")
@ExcelProperty("物料实例单位")
private String infomationUnit;
@Schema(description = "影响数量", example = "15772")
@ExcelProperty("影响数量")
private String influenceCount;

View File

@@ -47,6 +47,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
*/
@TableField("BAT_NO")
private String batchNo;
/**
* 初始总数量
*/
@TableField("INIT_QTY")
private BigDecimal initialQuantity;
/**
* 总数量
*/

View File

@@ -58,6 +58,7 @@ public interface MaterialBatchMapper extends BaseMapperX<MaterialBatchDO> {
.eq(MaterialBatchDO::getParentId, 0)
.in(CollUtil.isNotEmpty(pdtIds), MaterialBatchDO::getProductId, pdtIds)
.eq(CollUtil.isEmpty(pdtIds) && reqVO.getProductId() != null, MaterialBatchDO::getProductId, reqVO.getProductId())
.eqIfExists(MaterialBatchDO::getSubmitStatus, reqVO.getSubmitStatus())
.likeIfExists(MaterialBatchDO::getBatchNo, reqVO.getBatchNo())
.likeIfExists(MaterialBatchDO::getLocation, reqVO.getLocation())
.likeIfExists(MaterialBatchDO::getSupplierId, reqVO.getSupplierId())

View File

@@ -47,15 +47,21 @@ public interface MaterialLifecycleDetailMapper extends BaseMapperX<MaterialLifec
default List<MaterialLifecycleDetailRespVO> selectListWithPdtBatInfo(Long id){
MPJLambdaWrapper<MaterialLifecycleDetailDO> wrapper = new MPJLambdaWrapper<MaterialLifecycleDetailDO>()
.selectAll(MaterialLifecycleDetailDO.class)
.selectAs(MaterialProductDO::getName, MaterialLifecycleDetailRespVO::getProductName)
.selectAs(MaterialProductDO::getCode, MaterialLifecycleDetailRespVO::getProductCode)
.selectAs(MaterialProductDO::getModelNo, MaterialLifecycleDetailRespVO::getProductModelNo)
.selectAs(MaterialProductDO::getUnit, MaterialLifecycleDetailRespVO::getUnit)
.selectAs("product.NAME", MaterialLifecycleDetailRespVO::getProductName)
.selectAs("product.CD", MaterialLifecycleDetailRespVO::getProductCode)
.selectAs("product.MDL_NO", MaterialLifecycleDetailRespVO::getProductModelNo)
.selectAs("product.UNT", MaterialLifecycleDetailRespVO::getUnit)
.selectAs("batch.BAT_NO", MaterialLifecycleDetailRespVO::getBatchNo)
.selectAs("gongduan.INB_QTY", MaterialLifecycleDetailRespVO::getInfluenceCount)
.leftJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialLifecycleDetailDO::getProductId)
.selectAs(MaterialInfomationDO::getCode, MaterialLifecycleDetailRespVO::getInfomationCode)
.selectAs("product_infomation.NAME", MaterialLifecycleDetailRespVO::getInfomationName)
.selectAs("product_infomation.MDL_NO", MaterialLifecycleDetailRespVO::getInfomationModelNo)
.selectAs("product_infomation.UNT", MaterialLifecycleDetailRespVO::getInfomationUnit)
.leftJoin(MaterialProductDO.class, "product", MaterialProductDO::getId, MaterialLifecycleDetailDO::getProductId)
.leftJoin(MaterialBatchDO.class, "batch", MaterialBatchDO::getId, MaterialLifecycleDetailDO::getBatchId)
.leftJoin(MaterialBatchDO.class, "gongduan", MaterialBatchDO::getId, MaterialLifecycleDetailDO::getBatchGongduanId)
.leftJoin(MaterialInfomationDO.class, MaterialInfomationDO::getId, MaterialLifecycleDetailDO::getInfomationId)
.leftJoin(MaterialProductDO.class, "product_infomation", MaterialProductDO::getId, MaterialInfomationDO::getProductId)
.eq(MaterialLifecycleDetailDO::getLifecycleId, id);
return selectJoinList(MaterialLifecycleDetailRespVO.class, wrapper);

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.qms.resource.material.dal.mapper;
import cn.hutool.core.util.StrUtil;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
@@ -7,6 +8,9 @@ import com.zt.plat.module.qms.resource.material.controller.vo.MaterialLifecycleP
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialLifecycleDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.Arrays;
import java.util.List;
/**
* 物料通用流程,物料验收、退换货 Mapper
*
@@ -16,9 +20,10 @@ import org.apache.ibatis.annotations.Mapper;
public interface MaterialLifecycleMapper extends BaseMapperX<MaterialLifecycleDO> {
default PageResult<MaterialLifecycleDO> selectPage(MaterialLifecyclePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialLifecycleDO>()
String businessType = reqVO.getBusinessType();
LambdaQueryWrapperX<MaterialLifecycleDO> wrapper = new LambdaQueryWrapperX<MaterialLifecycleDO>()
.likeIfPresent(MaterialLifecycleDO::getTitle, reqVO.getTitle())
.eqIfPresent(MaterialLifecycleDO::getBusinessType, reqVO.getBusinessType())
.eqIfPresent(MaterialLifecycleDO::getBusinessTypeCode, reqVO.getBusinessTypeCode())
.likeIfPresent(MaterialLifecycleDO::getApplyUser, reqVO.getApplyUser())
.eqIfPresent(MaterialLifecycleDO::getApplyUserId, reqVO.getApplyUserId())
@@ -32,7 +37,15 @@ public interface MaterialLifecycleMapper extends BaseMapperX<MaterialLifecycleDO
.eqIfPresent(MaterialLifecycleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.eqIfPresent(MaterialLifecycleDO::getRemark, reqVO.getRemark())
.betweenIfPresent(MaterialLifecycleDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(MaterialLifecycleDO::getId));
.orderByDesc(MaterialLifecycleDO::getId);
if (StrUtil.isNotEmpty(businessType) && !businessType.contains(",")) {
String[] split = businessType.split(",");
wrapper.inIfPresent(MaterialLifecycleDO::getBusinessType, Arrays.asList(split));
} else {
wrapper.eqIfPresent(MaterialLifecycleDO::getBusinessType, businessType);
}
return selectPage(reqVO, wrapper);
}
}

View File

@@ -262,6 +262,7 @@ public class MaterialInfomationServiceImpl implements MaterialInfomationService
}
}
this.updateBatch(infomationDOS);
}
}

View File

@@ -137,4 +137,12 @@ public interface MaterialLifecycleDetailService {
* @return map
*/
Map<Long, Long> getMadeCountMapByDetailIds(List<Long> detailIds);
/**
* 根据流程ids 获取流程明细数据
*
* @param lfcIds ids
* @return 明细列表
*/
List<MaterialLifecycleDetailDO> getDetailListByLfcIds(List<Long> lfcIds);
}

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