mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
✨ ERP:初始化销售退货逻辑 100%
This commit is contained in:
parent
926286fe08
commit
798b72778e
@ -74,4 +74,7 @@ public class ErpSaleOrderPageReqVO extends PageParam {
|
||||
@Schema(description = "是否可出库", example = "true")
|
||||
private Boolean outEnable;
|
||||
|
||||
@Schema(description = "是否可退货", example = "true")
|
||||
private Boolean returnEnable;
|
||||
|
||||
}
|
@ -42,7 +42,7 @@ public class ErpSaleReturnRespVO {
|
||||
|
||||
@Schema(description = "退货时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("退货时间")
|
||||
private LocalDateTime outTime;
|
||||
private LocalDateTime returnTime;
|
||||
|
||||
@Schema(description = "销售订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386")
|
||||
private Long orderId;
|
||||
|
@ -46,11 +46,16 @@ public interface ErpSaleOrderMapper extends BaseMapperX<ErpSaleOrderDO> {
|
||||
} else if (Objects.equals(reqVO.getReturnStatus(), ErpSaleOrderPageReqVO.RETURN_STATUS_ALL)) {
|
||||
query.apply("t.return_count = t.total_count");
|
||||
}
|
||||
// 可出库
|
||||
// 可销售出库
|
||||
if (Boolean.TRUE.equals(reqVO.getOutEnable())) {
|
||||
query.eq(ErpSaleOrderDO::getStatus, ErpAuditStatus.APPROVE.getStatus())
|
||||
.apply("t.out_count < t.total_count");
|
||||
}
|
||||
// 可销售退货
|
||||
if (Boolean.TRUE.equals(reqVO.getReturnEnable())) {
|
||||
query.eq(ErpSaleOrderDO::getStatus, ErpAuditStatus.APPROVE.getStatus())
|
||||
.apply("t.return_count < t.out_count");
|
||||
}
|
||||
if (reqVO.getProductId() != null) {
|
||||
query.leftJoin(ErpSaleOrderItemDO.class, ErpSaleOrderItemDO::getOrderId, ErpSaleOrderDO::getId)
|
||||
.eq(reqVO.getProductId() != null, ErpSaleOrderItemDO::getProductId, reqVO.getProductId())
|
||||
|
Loading…
Reference in New Issue
Block a user