rev:手持生产区、发货区优化

This commit is contained in:
2023-08-25 16:57:32 +08:00
parent bb6fc64d15
commit bbca77088f
3 changed files with 30 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
package org.nl.wms.pda.st.service.impl;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
@@ -68,6 +69,7 @@ public class VirtualOutServiceImpl implements VirtualOutService {
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject ivtDisQuery(JSONObject whereJson) {
JSONObject jo = new JSONObject();
JSONObject map = new JSONObject();
map.put("flag", "2");
@@ -89,7 +91,14 @@ public class VirtualOutServiceImpl implements VirtualOutService {
}
}
JSONObject jo = new JSONObject();
if (ObjectUtil.isNotEmpty(whereJson.getString("box_no"))) {
JSONObject jsonSub = WQL.getWO("PDA_VIRTUALOUT").addParam("flag", "4").addParam("box_no", whereJson.getString("box_no")).process().uniqueResult(0);
jo.put("net_weight_num", ObjectUtil.isNotEmpty(jsonSub) ? NumberUtil.round(jsonSub.getString("net_weight_num"), 3) : "0");
} else {
jo.put("net_weight_num", "0");
}
jo.put("data", resultJSONArray);
jo.put("message", "查询成功!");
return jo;

View File

@@ -108,7 +108,8 @@
ROUND(sub.box_weight,3) AS box_weight,
sub.product_name,
sub.product_description,
sub.sale_order_name
sub.sale_order_name,
ROUND(sub.net_weight_num,3) AS net_weight_num
FROM
sch_base_point point
LEFT JOIN (
@@ -126,6 +127,7 @@
SELECT
package_box_sn,
MAX(box_weight) AS box_weight,
sum(net_weight) AS net_weight_num,
MAX(product_name) AS product_name,
MAX(product_description) AS product_description,
MAX(sale_order_name) AS sale_order_name

View File

@@ -153,6 +153,23 @@
WHERE
code = 'ST_INV_OUT_TYPE'
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "4"
QUERY
SELECT
sum(net_weight) AS net_weight_num
FROM
pdm_bi_subpackagerelation
WHERE
1 = 1
OPTION 输入.box_no <> ""
package_box_sn = 输入.box_no
ENDOPTION
ENDSELECT
ENDQUERY
ENDIF