rev:手持生产区、发货区优化
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
package org.nl.wms.pda.st.service.impl;
|
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.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -68,6 +69,7 @@ public class VirtualOutServiceImpl implements VirtualOutService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject ivtDisQuery(JSONObject whereJson) {
|
public JSONObject ivtDisQuery(JSONObject whereJson) {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "2");
|
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("data", resultJSONArray);
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
|
|||||||
@@ -108,7 +108,8 @@
|
|||||||
ROUND(sub.box_weight,3) AS box_weight,
|
ROUND(sub.box_weight,3) AS box_weight,
|
||||||
sub.product_name,
|
sub.product_name,
|
||||||
sub.product_description,
|
sub.product_description,
|
||||||
sub.sale_order_name
|
sub.sale_order_name,
|
||||||
|
ROUND(sub.net_weight_num,3) AS net_weight_num
|
||||||
FROM
|
FROM
|
||||||
sch_base_point point
|
sch_base_point point
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
@@ -126,6 +127,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
package_box_sn,
|
package_box_sn,
|
||||||
MAX(box_weight) AS box_weight,
|
MAX(box_weight) AS box_weight,
|
||||||
|
sum(net_weight) AS net_weight_num,
|
||||||
MAX(product_name) AS product_name,
|
MAX(product_name) AS product_name,
|
||||||
MAX(product_description) AS product_description,
|
MAX(product_description) AS product_description,
|
||||||
MAX(sale_order_name) AS sale_order_name
|
MAX(sale_order_name) AS sale_order_name
|
||||||
|
|||||||
@@ -156,3 +156,20 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
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
|
||||||
Reference in New Issue
Block a user