修改
This commit is contained in:
@@ -858,10 +858,19 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
//根据分切计划查询该订单物料大概还有多少未入
|
//根据分切计划查询该订单物料大概还有多少未入
|
||||||
row_map.put("flag", "12");
|
row_map.put("flag", "12");
|
||||||
JSONArray plan_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0);
|
JSONArray plan_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0);
|
||||||
int box_num = (int) Math.ceil(plan_rows.size() / 2);
|
if (ObjectUtil.isEmpty(plan_rows)){
|
||||||
|
plan_rows = new JSONArray();
|
||||||
|
}
|
||||||
|
//查询该销售订单及行号有多少个生成状态的箱子
|
||||||
|
row_map.put("flag", "27");
|
||||||
|
JSONArray box_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isEmpty(box_rows)){
|
||||||
|
box_rows = new JSONArray();
|
||||||
|
}
|
||||||
|
int box_num = (int) Math.ceil(plan_rows.size() / 2) + box_rows.size();
|
||||||
|
|
||||||
//查询数量与订单物料箱子数量相近的一排
|
//查询数量与订单物料箱子数量相近的一排
|
||||||
JSONObject empty_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "13").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().uniqueResult(0);
|
JSONObject empty_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "13").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num),block_num,row_num").process().uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(empty_row)) {
|
if (ObjectUtil.isNotEmpty(empty_row)) {
|
||||||
String block_num = empty_row.getString("block_num");
|
String block_num = empty_row.getString("block_num");
|
||||||
String row_num = empty_row.getString("row_num");
|
String row_num = empty_row.getString("row_num");
|
||||||
|
|||||||
@@ -930,6 +930,19 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "27"
|
||||||
|
QUERY
|
||||||
|
SELECT DISTINCT
|
||||||
|
package_box_sn
|
||||||
|
FROM
|
||||||
|
pdm_bi_subpackagerelation
|
||||||
|
WHERE
|
||||||
|
sale_order_name = 输入.sale_order_name
|
||||||
|
AND `status` = '0'
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user