fix:退换货、用完清洗金额口调整

This commit is contained in:
shusir
2026-03-03 18:05:53 +08:00
parent 20a377f715
commit d179bd9379
29 changed files with 432 additions and 65 deletions

View File

@@ -13,7 +13,6 @@ import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIg
import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.resource.material.controller.vo.*;
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialLifecycleDO;
import com.zt.plat.module.qms.resource.material.service.MaterialBatchService;
import com.zt.plat.module.qms.resource.material.service.MaterialLifecycleService;
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
@@ -23,7 +22,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -90,7 +88,7 @@ public class MaterialLifecycleController extends AbstractFileUploadController im
@Parameter(name = "id", description = "编号", required = true, example = "1024")
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:query')")
public CommonResult<MaterialLifecycleRespVO> getMaterialLifecycle(@RequestParam("id") Long id) {
MaterialLifecycleRespVO lifecycleRespVO = materialLifecycleService.getMaterialLifecycle(id);
MaterialLifecycleRespVO lifecycleRespVO = materialLifecycleService.getMaterialLifecycleWithDetailList(id);
return success(lifecycleRespVO);
}

View File

@@ -69,6 +69,10 @@ public class MaterialBatchRespVO {
@ExcelProperty("已入库数量")
private BigDecimal inboundEndQuantity;
@Schema(description = "锁定数量")
@ExcelProperty("锁定数量")
private BigDecimal lockQuantity;
@Schema(description = "存放位置描述")
@ExcelProperty("存放位置描述")
private String location;
@@ -97,6 +101,10 @@ public class MaterialBatchRespVO {
@ExcelProperty("提交状态,0-未提交1-已提交")
private Integer submitStatus;
@Schema(description = "提交日期")
@ExcelProperty("提交日期")
private LocalDateTime submitDate;
@Schema(description = "验收状态", example = "1")
@ExcelProperty("验收状态")
private String acceptanceStatus;

View File

@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 物料通用流程明细 Response VO")
@@ -20,6 +21,9 @@ public class MaterialLifecycleDetailRespVO {
@ExcelProperty("父id")
private Long lifecycleId;
@Schema(description = "工段或批次父id", example = "6294")
@ExcelProperty("工段或批次父id")
private Long gongParentId;
@Schema(description = "物料大类id", example = "31283")
@ExcelProperty("物料大类id")
@@ -105,6 +109,10 @@ public class MaterialLifecycleDetailRespVO {
@ExcelProperty("物料实例单位")
private String infomationUnit;
@Schema(description = "批次或工段数量")
@ExcelProperty("批次或工段数量")
private BigDecimal inboundQuantity;
@Schema(description = "影响数量", example = "15772")
@ExcelProperty("影响数量")
private String influenceCount;

View File

@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 物料用完标记或清洗回收明细 Response VO")
@@ -52,6 +53,14 @@ public class MaterialUseEndReuseDetailRespVO {
@ExcelProperty("型号")
private String modelNo;
@Schema(description = "数量")
@ExcelProperty("数量")
private BigDecimal quantity;
@Schema(description = "物料类型:玻璃,塑料")
@ExcelProperty("物料类型:玻璃,塑料")
private String materialType;
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String systemDepartmentCode;

View File

@@ -1,8 +1,11 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 物料用完标记或清洗回收明细新增/修改 Request VO")
@Data
public class MaterialUseEndReuseDetailSaveReqVO {
@@ -16,6 +19,12 @@ public class MaterialUseEndReuseDetailSaveReqVO {
@Schema(description = "物料id", example = "7953")
private Long infomationId;
@Schema(description = "数量")
private BigDecimal quantity;
@Schema(description = "物料类型:玻璃,塑料")
private String materialType;
@Schema(description = "所属部门")
private String systemDepartmentCode;

View File

@@ -35,7 +35,10 @@ public class MaterialUseEndReuseSaveReqVO {
private String remark;
@Schema(description = "物料ids")
@NotEmpty
private List<Long> infomationIds;
@Schema(description = "明细列表")
@NotEmpty
private List<MaterialUseEndReuseDetailSaveReqVO> detailList;
}

View File

@@ -6,6 +6,7 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 物料批次 DO
@@ -72,6 +73,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
*/
@TableField("INB_END_QTY")
private BigDecimal inboundEndQuantity;
/**
* 锁定数量
*/
@TableField("LC_QTY")
private BigDecimal lockQuantity;
/**
* 存放位置描述
*/
@@ -107,6 +113,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
*/
@TableField("SBM_STS")
private Integer submitStatus;
/**
* 提交日期
*/
@TableField("SBM_DT")
private LocalDateTime submitDate;
/**
* 验收状态
*/

View File

@@ -109,7 +109,7 @@ public class MaterialInfomationDO extends BusinessBaseDO {
@TableField("PUB_STS")
private Integer publishStatus;
/**
* 领用状态,0-未领用1-已领用
* 领用状态,0-未领用1-已领用2-锁定
*/
@TableField("USG_STS")
private Integer usageStatus;

View File

@@ -3,6 +3,9 @@ package com.zt.plat.module.qms.resource.material.dal.dataobject;
import com.baomidou.mybatisplus.annotation.*;
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
import lombok.*;
import java.math.BigDecimal;
/**
* 物料用完标记或清洗回收明细 DO
*
@@ -39,6 +42,16 @@ public class MaterialUseEndReuseDetailDO extends BusinessBaseDO {
@TableField("INF_ID")
private Long infomationId;
/**
* 数量
*/
@TableField("QTY")
private BigDecimal quantity;
/**
* 物料类型:玻璃,塑料
*/
@TableField("MTRL_TP")
private String materialType;
/**
* 所属部门
*/
@TableField("SYS_DEPT_CD")

View File

@@ -53,15 +53,9 @@ public interface MaterialLifecycleDetailMapper extends BaseMapperX<MaterialLifec
.selectAs("product.UNT", MaterialLifecycleDetailRespVO::getUnit)
.selectAs("batch.BAT_NO", MaterialLifecycleDetailRespVO::getBatchNo)
.selectAs("gongduan.INB_QTY", MaterialLifecycleDetailRespVO::getInfluenceCount)
.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);
@@ -118,4 +112,22 @@ public interface MaterialLifecycleDetailMapper extends BaseMapperX<MaterialLifec
map -> (Long) map.get("QUANTITY")
));
}
default List<MaterialLifecycleDetailRespVO> selectListWithReturnExchangeInfo(Long id) {
MPJLambdaWrapper<MaterialLifecycleDetailDO> wrapper = new MPJLambdaWrapper<MaterialLifecycleDetailDO>()
.selectAll(MaterialLifecycleDetailDO.class)
.selectAs("batch.BAT_NO", MaterialLifecycleDetailRespVO::getBatchNo)
.selectAs("gongduan.ASN_DEPT_NAME", MaterialLifecycleDetailRespVO::getAssignDepartmentName)
.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(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);
}
}

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