rev: 入库查询

This commit is contained in:
2023-07-17 16:20:35 +08:00
parent 02364658a5
commit aa2b522249
2 changed files with 51 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
package org.nl.wms.stat.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
@@ -62,12 +63,30 @@ public class InBillQueryServiceImpl implements InBillQueryService {
map.put("stor_id", stor_id);
map.put("bill_type", bill_type);
map.put("with", with);
map.put("begin_time", begin_time);
map.put("end_time", end_time);
map.put("is_virtual", is_virtual);
map.put("classes", classes);
map.put("thickness_request", thickness_request);
// 处理时间
if (ObjectUtil.isNotEmpty(begin_time) && ObjectUtil.isNotEmpty(end_time)) {
String begin_time_today = begin_time.substring(0, 10);
String end_time_today = end_time.substring(0, 10);
// 开始时间
String today_begin_time = begin_time_today + " 08:00:00";
// 结束时间19:59:59
DateTime parse = DateUtil.parse(end_time_today);
String substring = DateUtil.offsetDay(parse, 1).toString().substring(0, 10);
String today_end_time = substring + " 07:59:59";
map.put("begin_time", today_begin_time);
map.put("end_time", today_end_time);
}
if (ObjectUtil.isNotEmpty(product_area)) {
String areas = "(";
for (int i = 0; i < product_area.length; i++) {
@@ -79,7 +98,7 @@ public class InBillQueryServiceImpl implements InBillQueryService {
}
map.put("areas", areas);
}
JSONObject json = WQL.getWO("ST_IVT_INBILLQUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC,dis.box_no");
JSONObject json = WQL.getWO("ST_IVT_INBILLQUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.confirm_time DESC,dis.box_no");
return json;
}
@@ -141,12 +160,29 @@ public class InBillQueryServiceImpl implements InBillQueryService {
mapParam.put("stor_id", stor_id);
mapParam.put("bill_type", bill_type);
mapParam.put("with", with);
mapParam.put("begin_time", begin_time);
mapParam.put("end_time", end_time);
mapParam.put("is_virtual", is_virtual);
mapParam.put("classes", classes);
mapParam.put("thickness_request", thickness_request);
// 处理时间
if (ObjectUtil.isNotEmpty(begin_time) && ObjectUtil.isNotEmpty(end_time)) {
String begin_time_today = begin_time.substring(0, 10);
String end_time_today = end_time.substring(0, 10);
// 开始时间
String today_begin_time = begin_time_today + " 08:00:00";
// 结束时间19:59:59
DateTime parse = DateUtil.parse(end_time_today);
String substring = DateUtil.offsetDay(parse, 1).toString().substring(0, 10);
String today_end_time = substring + " 07:59:59";
mapParam.put("begin_time", today_begin_time);
mapParam.put("end_time", today_end_time);
}
if (ObjectUtil.isNotEmpty(product_area)) {
String areas = "(";
for (int i = 0; i < product_area.length; i++) {

View File

@@ -129,11 +129,11 @@
ENDOPTION
OPTION 输入.begin_time <> ""
mst.input_time >= 输入.begin_time
mst.confirm_time >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
mst.input_time <= 输入.end_time
mst.confirm_time <= 输入.end_time
ENDOPTION
OPTION 输入.with <> ""
@@ -225,11 +225,11 @@
ENDOPTION
OPTION 输入.begin_time <> ""
mst.input_time >= 输入.begin_time
mst.confirm_time >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
mst.input_time <= 输入.end_time
mst.confirm_time <= 输入.end_time
ENDOPTION
OPTION 输入.with <> ""
@@ -337,11 +337,11 @@
ENDOPTION
OPTION 输入.begin_time <> ""
mst.input_time >= 输入.begin_time
mst.confirm_time >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
mst.input_time <= 输入.end_time
mst.confirm_time <= 输入.end_time
ENDOPTION
OPTION 输入.with <> ""
@@ -360,7 +360,7 @@
)
ENDOPTION
order by confirm_time_class
order by confirm_time
ENDSELECT
ENDPAGEQUERY
@@ -435,11 +435,11 @@
ENDOPTION
OPTION 输入.begin_time <> ""
mst.input_time >= 输入.begin_time
mst.confirm_time >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
mst.input_time <= 输入.end_time
mst.confirm_time <= 输入.end_time
ENDOPTION
OPTION 输入.with <> ""
@@ -461,7 +461,7 @@
mst.iostorinv_id,
dis.box_no
order by confirm_time_class
order by confirm_time
ENDSELECT
ENDPAGEQUERY