Browse Source

根据批次策略/下架策略 返回 库存余额DO 接口 修改

master
陈薪名 2 years ago
parent
commit
a5049fd165
  1. 28
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/util/JobUtils.java

28
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/util/JobUtils.java

@ -870,54 +870,54 @@ public class JobUtils {
}
// 根据批次策略 作为查询库存余额排序
// 批次类型——按 生产时间
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("0")) {
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("PRODUCTION_TIME")) {
// ASC = 0,正向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("0")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("ASC")) {
queryWrapper.orderByAsc("produce_date");
}
// DESC = 1,逆向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("1")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("DESC")) {
queryWrapper.orderByDesc("produce_date");
}
}
// 批次类型——按 到货时间
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("1")) {
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("ARRIVE_TIME")) {
// ASC = 0,正向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("0")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("ASC")) {
queryWrapper.orderByAsc("arrive_date");
}
// DESC = 1,逆向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("1")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("DESC")) {
queryWrapper.orderByDesc("arrive_date");
}
}
// 批次类型——按 失效时间
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("2")) {
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("EXPIRE_TIME")) {
// ASC = 0,正向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("0")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("ASC")) {
queryWrapper.orderByAsc("expire_date");
}
// DESC = 1,逆向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("1")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("DESC")) {
queryWrapper.orderByDesc("expire_date");
}
}
// 批次类型——按 供应商批次
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("3")) {
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("SUPPLIER_BATCH")) {
// TODO: 供应商批次 ??? 不知道怎么搞了
}
// 批次类型——按 供应商优先级
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("4")) {
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("SUPPLIER_PRIORITY")) {
// TODO: 供应商优先级 ??? 不知道怎么搞了
}
// 批次类型——按 其它批次
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("5")) {
if (jsonObjectBatch.get("BatchType") != null && jsonObjectBatch.get("BatchType").equals("OTHER_BATCH")) {
// ASC = 0,正向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("0")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("ASC")) {
queryWrapper.orderByAsc("batch");
}
// DESC = 1,逆向
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("1")) {
if (jsonObjectBatch.get("BatchDirection") != null && jsonObjectBatch.get("BatchDirection").equals("DESC")) {
queryWrapper.orderByDesc("batch");
}
}

Loading…
Cancel
Save