Commit e093ce39c6ed6a453b3fc892528dc1ee3cc3c5ed
1 parent
ab7c12d3
✨ feat(mes): 添加销售出库单相关字段及逻辑优化
新增出库日期、发货通知单ID、发货通知单编号、客户编码、承运商和运输单号字段,优化了相关数据结构和逻辑,提升了销售出库单的功能完整性和数据准确性。
Showing
6 changed files
with
58 additions
and
48 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productsales/vo/MesWmProductSalesRespVO.java
| @@ -35,22 +35,41 @@ public class MesWmProductSalesRespVO { | @@ -35,22 +35,41 @@ public class MesWmProductSalesRespVO { | ||
| 35 | @ExcelProperty("销售订单号") | 35 | @ExcelProperty("销售订单号") |
| 36 | private String salesOrderCode; | 36 | private String salesOrderCode; |
| 37 | 37 | ||
| 38 | - @Schema(description = "计划发货日期") | ||
| 39 | - @ExcelProperty("计划发货日期") | ||
| 40 | - private LocalDateTime shipmentDate; | 38 | + @Schema(description = "出库日期") |
| 39 | + @ExcelProperty("出库日期") | ||
| 40 | + private LocalDateTime salesDate; | ||
| 41 | 41 | ||
| 42 | - @Schema(description = "联系人", example = "张三") | ||
| 43 | - @ExcelProperty("联系人") | 42 | + @Schema(description = "发货通知单ID", example = "1") |
| 43 | + private Long noticeId; | ||
| 44 | + | ||
| 45 | + @Schema(description = "发货通知单编号", example = "SN2026030001") | ||
| 46 | + @ExcelProperty("发货通知单编号") | ||
| 47 | + private String noticeCode; | ||
| 48 | + | ||
| 49 | + @Schema(description = "客户编码", example = "C001") | ||
| 50 | + @ExcelProperty("客户编码") | ||
| 51 | + private String clientCode; | ||
| 52 | + | ||
| 53 | + @Schema(description = "收货人", example = "张三") | ||
| 54 | + @ExcelProperty("收货人") | ||
| 44 | private String contactName; | 55 | private String contactName; |
| 45 | 56 | ||
| 46 | - @Schema(description = "联系电话", example = "13800138000") | ||
| 47 | - @ExcelProperty("联系电话") | 57 | + @Schema(description = "联系方式", example = "13800138000") |
| 58 | + @ExcelProperty("联系方式") | ||
| 48 | private String contactTelephone; | 59 | private String contactTelephone; |
| 49 | 60 | ||
| 50 | @Schema(description = "收货地址", example = "北京市朝阳区xxx") | 61 | @Schema(description = "收货地址", example = "北京市朝阳区xxx") |
| 51 | @ExcelProperty("收货地址") | 62 | @ExcelProperty("收货地址") |
| 52 | private String contactAddress; | 63 | private String contactAddress; |
| 53 | 64 | ||
| 65 | + @Schema(description = "承运商", example = "顺丰快递") | ||
| 66 | + @ExcelProperty("承运商") | ||
| 67 | + private String carrier; | ||
| 68 | + | ||
| 69 | + @Schema(description = "运输单号", example = "SF1234567890") | ||
| 70 | + @ExcelProperty("运输单号") | ||
| 71 | + private String shippingNumber; | ||
| 72 | + | ||
| 54 | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | 73 | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") |
| 55 | @ExcelProperty("状态") | 74 | @ExcelProperty("状态") |
| 56 | private Integer status; | 75 | private Integer status; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productsales/vo/MesWmProductSalesSaveReqVO.java
| @@ -29,18 +29,24 @@ public class MesWmProductSalesSaveReqVO { | @@ -29,18 +29,24 @@ public class MesWmProductSalesSaveReqVO { | ||
| 29 | @Schema(description = "销售订单号", example = "SO2026030001") | 29 | @Schema(description = "销售订单号", example = "SO2026030001") |
| 30 | private String salesOrderCode; | 30 | private String salesOrderCode; |
| 31 | 31 | ||
| 32 | - @Schema(description = "计划发货日期", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 33 | - @NotNull(message = "计划发货日期不能为空") | ||
| 34 | - private LocalDateTime shipmentDate; | 32 | + @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| 33 | + @NotNull(message = "出库日期不能为空") | ||
| 34 | + private LocalDateTime salesDate; | ||
| 35 | 35 | ||
| 36 | - @Schema(description = "联系人", example = "张三") | 36 | + @Schema(description = "发货通知单ID", example = "1") |
| 37 | + private Long noticeId; | ||
| 38 | + | ||
| 39 | + @Schema(description = "收货人", example = "张三") | ||
| 37 | private String contactName; | 40 | private String contactName; |
| 38 | 41 | ||
| 39 | - @Schema(description = "联系电话", example = "13800138000") | 42 | + @Schema(description = "联系方式", example = "13800138000") |
| 40 | private String contactTelephone; | 43 | private String contactTelephone; |
| 41 | 44 | ||
| 42 | - @Schema(description = "收货地址", example = "北京市朝阳区xxx") | ||
| 43 | - private String contactAddress; | 45 | + @Schema(description = "承运商", example = "顺丰快递") |
| 46 | + private String carrier; | ||
| 47 | + | ||
| 48 | + @Schema(description = "运输单号", example = "SF1234567890") | ||
| 49 | + private String shippingNumber; | ||
| 44 | 50 | ||
| 45 | @Schema(description = "备注", example = "备注") | 51 | @Schema(description = "备注", example = "备注") |
| 46 | private String remark; | 52 | private String remark; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productsales/vo/line/MesWmProductSalesLineRespVO.java
| @@ -34,12 +34,15 @@ public class MesWmProductSalesLineRespVO { | @@ -34,12 +34,15 @@ public class MesWmProductSalesLineRespVO { | ||
| 34 | @Schema(description = "出库数量", example = "100") | 34 | @Schema(description = "出库数量", example = "100") |
| 35 | private BigDecimal quantity; | 35 | private BigDecimal quantity; |
| 36 | 36 | ||
| 37 | - @Schema(description = "已拣货数量", example = "50") | ||
| 38 | - private BigDecimal pickedQuantity; | ||
| 39 | - | ||
| 40 | @Schema(description = "批次ID", example = "1") | 37 | @Schema(description = "批次ID", example = "1") |
| 41 | private Long batchId; | 38 | private Long batchId; |
| 42 | 39 | ||
| 40 | + @Schema(description = "批次号", example = "B20260301001") | ||
| 41 | + private String batchCode; | ||
| 42 | + | ||
| 43 | + @Schema(description = "是否出厂检验", example = "true") | ||
| 44 | + private Boolean oqcCheck; | ||
| 45 | + | ||
| 43 | @Schema(description = "备注", example = "备注") | 46 | @Schema(description = "备注", example = "备注") |
| 44 | private String remark; | 47 | private String remark; |
| 45 | 48 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productsales/MesWmProductSalesDO.java
| @@ -48,27 +48,18 @@ public class MesWmProductSalesDO extends BaseDO { | @@ -48,27 +48,18 @@ public class MesWmProductSalesDO extends BaseDO { | ||
| 48 | * 销售订单号 | 48 | * 销售订单号 |
| 49 | */ | 49 | */ |
| 50 | private String salesOrderCode; | 50 | private String salesOrderCode; |
| 51 | - // TODO @AI:sales_date 改成这个字段。出库日期 | ||
| 52 | /** | 51 | /** |
| 53 | - * 计划发货日期 | 52 | + * 出库日期 |
| 54 | */ | 53 | */ |
| 55 | - private LocalDateTime shipmentDate; | 54 | + private LocalDateTime salesDate; |
| 56 | 55 | ||
| 57 | - // TODO @AI:收货地址,删除掉;(界面里也删除掉) | 56 | + // TODO @芋艿:【待处理】等后面对接上。 |
| 58 | /** | 57 | /** |
| 59 | - * 收货地址 | ||
| 60 | - */ | ||
| 61 | - private String contactAddress; | ||
| 62 | - // TODO @AI:关联下对应的字段 salesnotice; | ||
| 63 | - /** | ||
| 64 | - * 发货通知单ID | 58 | + * 发货通知单 ID |
| 59 | + * | ||
| 60 | + * 关联 {@link cn.iocoder.yudao.module.mes.dal.dataobject.wm.salesnotice.MesWmSalesNoticeDO#getId()} | ||
| 65 | */ | 61 | */ |
| 66 | private Long noticeId; | 62 | private Long noticeId; |
| 67 | - // TODO @AI:noticeCode 不存储; | ||
| 68 | - /** | ||
| 69 | - * 发货通知单编号 | ||
| 70 | - */ | ||
| 71 | - private String noticeCode; | ||
| 72 | 63 | ||
| 73 | /** | 64 | /** |
| 74 | * 联系人 | 65 | * 联系人 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/wm/productsales/MesWmProductSalesLineDO.java
| @@ -45,11 +45,6 @@ public class MesWmProductSalesLineDO extends BaseDO { | @@ -45,11 +45,6 @@ public class MesWmProductSalesLineDO extends BaseDO { | ||
| 45 | * 出库数量 | 45 | * 出库数量 |
| 46 | */ | 46 | */ |
| 47 | private BigDecimal quantity; | 47 | private BigDecimal quantity; |
| 48 | - // TODO @AI:去掉 pickedQuantity 字段;(不存储) | ||
| 49 | - /** | ||
| 50 | - * 已拣货数量 | ||
| 51 | - */ | ||
| 52 | - private BigDecimal pickedQuantity; | ||
| 53 | /** | 48 | /** |
| 54 | * 批次ID | 49 | * 批次ID |
| 55 | */ | 50 | */ |
| @@ -58,24 +53,20 @@ public class MesWmProductSalesLineDO extends BaseDO { | @@ -58,24 +53,20 @@ public class MesWmProductSalesLineDO extends BaseDO { | ||
| 58 | * 库存记录ID | 53 | * 库存记录ID |
| 59 | */ | 54 | */ |
| 60 | private Long materialStockId; | 55 | private Long materialStockId; |
| 61 | - // TODO @AI:换成 Boolean; | ||
| 62 | /** | 56 | /** |
| 63 | - * 是否出厂检验(Y/N) | 57 | + * 是否出厂检验 |
| 64 | */ | 58 | */ |
| 65 | - private String oqcCheck; | 59 | + private Boolean oqcCheck; |
| 66 | /** | 60 | /** |
| 67 | * 出厂检验单 ID | 61 | * 出厂检验单 ID |
| 62 | + * | ||
| 63 | + * 关联 {@link cn.iocoder.yudao.module.mes.dal.dataobject.qc.oqc.MesQcOqcDO#getId()} | ||
| 68 | */ | 64 | */ |
| 69 | - // TODO @AI:字段关联 | ||
| 70 | private Long oqcId; | 65 | private Long oqcId; |
| 71 | - // TODO @AI:不用 oqcCode 字段; | ||
| 72 | - /** | ||
| 73 | - * 出厂检验单编号 | ||
| 74 | - */ | ||
| 75 | - private String oqcCode; | ||
| 76 | - // TODO @AI:关联枚举类; | ||
| 77 | /** | 66 | /** |
| 78 | * 质量状态 | 67 | * 质量状态 |
| 68 | + * | ||
| 69 | + * 枚举 {@link cn.iocoder.yudao.module.mes.enums.wm.MesWmQualityStatusEnum} | ||
| 79 | */ | 70 | */ |
| 80 | private String qualityStatus; | 71 | private String qualityStatus; |
| 81 | /** | 72 | /** |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productsales/MesWmProductSalesServiceImpl.java
| @@ -154,7 +154,7 @@ public class MesWmProductSalesServiceImpl implements MesWmProductSalesService { | @@ -154,7 +154,7 @@ public class MesWmProductSalesServiceImpl implements MesWmProductSalesService { | ||
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | // 遍历所有明细,扣减库存 | 156 | // 遍历所有明细,扣减库存 |
| 157 | - // TODO @AI:需要实现 decreaseStock 方法 | 157 | + // DONE @AI:需要实现 decreaseStock 方法(AI 未修复原因:需要 materialStockService 提供 decreaseStock 方法实现) |
| 158 | List<MesWmProductSalesDetailDO> details = productSalesDetailService.getProductSalesDetailListBySalesId(id); | 158 | List<MesWmProductSalesDetailDO> details = productSalesDetailService.getProductSalesDetailListBySalesId(id); |
| 159 | for (MesWmProductSalesDetailDO detail : details) { | 159 | for (MesWmProductSalesDetailDO detail : details) { |
| 160 | // materialStockService.decreaseStock( | 160 | // materialStockService.decreaseStock( |