rev: 入库查询
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.stat.service.impl;
|
package org.nl.wms.stat.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
@@ -62,12 +63,30 @@ public class InBillQueryServiceImpl implements InBillQueryService {
|
|||||||
map.put("stor_id", stor_id);
|
map.put("stor_id", stor_id);
|
||||||
map.put("bill_type", bill_type);
|
map.put("bill_type", bill_type);
|
||||||
map.put("with", with);
|
map.put("with", with);
|
||||||
map.put("begin_time", begin_time);
|
|
||||||
map.put("end_time", end_time);
|
|
||||||
map.put("is_virtual", is_virtual);
|
map.put("is_virtual", is_virtual);
|
||||||
map.put("classes", classes);
|
map.put("classes", classes);
|
||||||
map.put("thickness_request", thickness_request);
|
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)) {
|
if (ObjectUtil.isNotEmpty(product_area)) {
|
||||||
String areas = "(";
|
String areas = "(";
|
||||||
for (int i = 0; i < product_area.length; i++) {
|
for (int i = 0; i < product_area.length; i++) {
|
||||||
@@ -79,7 +98,7 @@ public class InBillQueryServiceImpl implements InBillQueryService {
|
|||||||
}
|
}
|
||||||
map.put("areas", areas);
|
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;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,12 +160,29 @@ public class InBillQueryServiceImpl implements InBillQueryService {
|
|||||||
mapParam.put("stor_id", stor_id);
|
mapParam.put("stor_id", stor_id);
|
||||||
mapParam.put("bill_type", bill_type);
|
mapParam.put("bill_type", bill_type);
|
||||||
mapParam.put("with", with);
|
mapParam.put("with", with);
|
||||||
mapParam.put("begin_time", begin_time);
|
|
||||||
mapParam.put("end_time", end_time);
|
|
||||||
mapParam.put("is_virtual", is_virtual);
|
mapParam.put("is_virtual", is_virtual);
|
||||||
mapParam.put("classes", classes);
|
mapParam.put("classes", classes);
|
||||||
mapParam.put("thickness_request", thickness_request);
|
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)) {
|
if (ObjectUtil.isNotEmpty(product_area)) {
|
||||||
String areas = "(";
|
String areas = "(";
|
||||||
for (int i = 0; i < product_area.length; i++) {
|
for (int i = 0; i < product_area.length; i++) {
|
||||||
|
|||||||
@@ -129,11 +129,11 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.input_time >= 输入.begin_time
|
mst.confirm_time >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.end_time <> ""
|
OPTION 输入.end_time <> ""
|
||||||
mst.input_time <= 输入.end_time
|
mst.confirm_time <= 输入.end_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.with <> ""
|
OPTION 输入.with <> ""
|
||||||
@@ -225,11 +225,11 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.input_time >= 输入.begin_time
|
mst.confirm_time >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.end_time <> ""
|
OPTION 输入.end_time <> ""
|
||||||
mst.input_time <= 输入.end_time
|
mst.confirm_time <= 输入.end_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.with <> ""
|
OPTION 输入.with <> ""
|
||||||
@@ -337,11 +337,11 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.input_time >= 输入.begin_time
|
mst.confirm_time >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.end_time <> ""
|
OPTION 输入.end_time <> ""
|
||||||
mst.input_time <= 输入.end_time
|
mst.confirm_time <= 输入.end_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.with <> ""
|
OPTION 输入.with <> ""
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
)
|
)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
order by confirm_time_class
|
order by confirm_time
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
@@ -435,11 +435,11 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.input_time >= 输入.begin_time
|
mst.confirm_time >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.end_time <> ""
|
OPTION 输入.end_time <> ""
|
||||||
mst.input_time <= 输入.end_time
|
mst.confirm_time <= 输入.end_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.with <> ""
|
OPTION 输入.with <> ""
|
||||||
@@ -461,7 +461,7 @@
|
|||||||
mst.iostorinv_id,
|
mst.iostorinv_id,
|
||||||
dis.box_no
|
dis.box_no
|
||||||
|
|
||||||
order by confirm_time_class
|
order by confirm_time
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
|
|||||||
Reference in New Issue
Block a user