opt:优化包装关系查询和导出

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-02-20 14:58:47 +08:00
parent 2d1ff9127a
commit c32e12a4c4
3 changed files with 81 additions and 38 deletions

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@@ -94,9 +95,17 @@ public class SubpackagerelationServiceImpl implements SubpackagerelationService
if (ObjectUtil.isNotEmpty(sap_pcsn)) {
map.put("sap_pcsn", "%" + sap_pcsn + "%");
}
String begin_time = (String) whereJson.get("begin_time");
if (!StrUtil.isEmpty(begin_time)) {
map.put("begin_time", begin_time);
}
String end_time = (String) whereJson.get("end_time");
if (!StrUtil.isEmpty(end_time)) {
map.put("end_time", end_time);
}
map.put("is_un_plan_production", is_un_plan_production);
map.put("date_of_production", date_of_production);
map.put("date_of_FG_inbound", date_of_FG_inbound);
map.put("status", status);
JSONObject json = WQL.getWO("PDM_BI_SUBPACKAGER01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page),"workorder_id desc");
JSONArray content = json.getJSONArray("content");
@@ -228,7 +237,15 @@ public class SubpackagerelationServiceImpl implements SubpackagerelationService
}
map.put("is_un_plan_production", is_un_plan_production);
map.put("date_of_production", date_of_production);
map.put("date_of_FG_inbound", date_of_FG_inbound);
String begin_time = (String) whereJson.get("begin_time");
if (!StrUtil.isEmpty(begin_time)) {
map.put("begin_time", begin_time);
}
String end_time = (String) whereJson.get("end_time");
if (!StrUtil.isEmpty(end_time)) {
map.put("end_time", end_time);
}
map.put("status", status);
map.put("limits", "10000");
JSONArray resultJSONArray = WQL.getWO("PDM_BI_SUBPACKAGER01").addParamMap(map).process().getResultJSONArray(0);

View File

@@ -26,6 +26,8 @@
输入.sap_pcsn TYPEAS s_string
输入.date_of_production TYPEAS s_string
输入.date_of_FG_inbound TYPEAS s_string
输入.begin_time TYPEAS s_string
输入.end_time TYPEAS s_string
输入.status TYPEAS s_string
@@ -99,10 +101,13 @@
date_of_production = 输入.date_of_production
ENDOPTION
OPTION 输入.date_of_FG_inbound <> ""
date_of_FG_inbound = 输入.date_of_FG_inbound
OPTION 输入.begin_time <> ""
date_of_FG_inbound>= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
date_of_FG_inbound <= 输入.end_time
ENDOPTION
OPTION 输入.status <> ""
status = 输入.status
ENDOPTION
@@ -277,15 +282,19 @@
date_of_production = 输入.date_of_production
ENDOPTION
OPTION 输入.date_of_FG_inbound <> ""
date_of_FG_inbound = 输入.date_of_FG_inbound
ENDOPTION
OPTION 输入.begin_time <> ""
date_of_FG_inbound>= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
date_of_FG_inbound <= 输入.end_time
ENDOPTION
OPTION 输入.status <> ""
status = 输入.status
ENDOPTION
OPTION 输入.limits <> ""
1=1 order by workorder_id desc limit 0,10000
1=1 order by date_of_FG_inbound desc limit 0,10000
ENDOPTION
ENDSELECT
ENDQUERY