This commit is contained in:
USER-20220102CG\noblelift
2023-09-08 10:39:19 +08:00
8 changed files with 143 additions and 62 deletions

View File

@@ -55,6 +55,7 @@ public class StructivtServiceImpl implements StructivtService {
String sale_order_name = MapUtil.getStr(whereJson, "sale_order_name");
String ivt_status = MapUtil.getStr(whereJson, "ivt_status");
String is_virtual = MapUtil.getStr(whereJson, "is_virtual");
String rein_flag = MapUtil.getStr(whereJson, "rein_flag");
JSONObject map = new JSONObject();
map.put("flag", "1");
map.put("stor_id", stor_id);
@@ -95,6 +96,7 @@ public class StructivtServiceImpl implements StructivtService {
String in_stor_id = userStorService.getInStor();
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id", in_stor_id);
if (ObjectUtil.isNotEmpty(rein_flag)) map.put("rein_flag", rein_flag);
JSONObject jsonObject = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.instorage_time desc");
return jsonObject;
@@ -199,6 +201,7 @@ public class StructivtServiceImpl implements StructivtService {
String package_box_sn = MapUtil.getStr(whereJson, "package_box_sn");
String sale_order_name = MapUtil.getStr(whereJson, "sale_order_name");
String is_virtual = MapUtil.getStr(whereJson, "is_virtual");
String rein_flag = MapUtil.getStr(whereJson, "rein_flag");
JSONObject map = new JSONObject();
map.put("flag", "2");
map.put("stor_id", stor_id);
@@ -238,6 +241,7 @@ public class StructivtServiceImpl implements StructivtService {
String in_stor_id = userStorService.getInStor();
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id", in_stor_id);
if (ObjectUtil.isNotEmpty(rein_flag)) map.put("rein_flag", rein_flag);
JSONArray resultJSONArray = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).process().getResultJSONArray(0);

View File

@@ -25,6 +25,7 @@
输入.sale_order_name TYPEAS s_string
输入.package_box_sn TYPEAS s_string
输入.is_virtual TYPEAS s_string
输入.rein_flag TYPEAS s_string
输入.in_stor_id TYPEAS f_string
[临时表]
@@ -51,6 +52,10 @@
IF 输入.flag = "1"
PAGEQUERY
SELECT
a.*
FROM
(
SELECT
ivt.*,
attr.sect_id,
@@ -134,6 +139,24 @@
OPTION 输入.ivt_status = "frozen_qty"
ivt.frozen_qty > 0
ENDOPTION
) a
INNER JOIN (
SELECT
dis.pcsn,
mst.bill_type
FROM
st_ivt_iostorinvdis dis
INNER JOIN ( SELECT MAX( iostorinvdis_id ) AS iostorinvdis_id, pcsn FROM st_ivt_iostorinvdis GROUP BY pcsn ) a ON a.iostorinvdis_id = dis.iostorinvdis_id
INNER JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
) b ON a.pcsn = b.pcsn
WHERE
1=1
OPTION 输入.rein_flag = "1"
b.bill_type = '0002'
ENDOPTION
OPTION 输入.rein_flag = "0"
b.bill_type <> '0002'
ENDOPTION
ENDSELECT
ENDPAGEQUERY
@@ -141,6 +164,10 @@
IF 输入.flag = "2"
QUERY
SELECT
a.*
FROM
(
SELECT
ivt.*,
attr.sect_id,
@@ -223,6 +250,24 @@
ENDOPTION
OPTION 输入.areas <> ""
LEFT(sub.container_name,2) IN 输入.areas
ENDOPTION
) a
INNER JOIN (
SELECT
dis.pcsn,
mst.bill_type
FROM
st_ivt_iostorinvdis dis
INNER JOIN ( SELECT MAX( iostorinvdis_id ) AS iostorinvdis_id, pcsn FROM st_ivt_iostorinvdis GROUP BY pcsn ) a ON a.iostorinvdis_id = dis.iostorinvdis_id
INNER JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
) b ON a.pcsn = b.pcsn
WHERE
1=1
OPTION 输入.rein_flag = "1"
b.bill_type = '0002'
ENDOPTION
OPTION 输入.rein_flag = "0"
b.bill_type <> '0002'
ENDOPTION
ENDSELECT
ENDQUERY

View File

@@ -401,6 +401,9 @@ public class BakingServiceImpl implements BakingService {
JSONObject last_hot_mst = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst").query("container_name = '" + jsonHotIvt.getString("container_name") + "' AND io_type = '0' order by confirm_time desc").uniqueResult(0);
JSONObject jsonRaw = rawTab.query("container_name = '" + jsonHotIvt.getString("container_name") + "' and is_delete = '0'").uniqueResult(0);
if(ObjectUtil.isEmpty(jsonRaw)){
throw new BadRequestException("未查询到母卷号:"+jsonHotIvt.getString("container_name")+"对应的生箔工单!");
}
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) {
throw new BadRequestException("物料基础信息中无此物料!");

View File

@@ -17,7 +17,9 @@ import org.nl.common.utils.SecurityUtils;
import org.nl.modules.system.util.CodeUtil;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.system.service.param.impl.SysParamServiceImpl;
import org.nl.wms.basedata.master.service.dto.MaterialbaseDto;
import org.nl.wms.basedata.st.service.StorattrService;
import org.nl.wms.basedata.st.service.StructattrService;
@@ -864,6 +866,12 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
row_map.put("sale_order_name", sale_order_name);
row_map.put("sect_id", sect_id);
row_map.put("flag", "11");
// 获取系统参数入库到第几层 0-3层都可 1-1层 2-2层 3-3层
String in_layer_num = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("in_layer_num").getValue();
row_map.put("col_num", "1,2,3".contains(in_layer_num) ? in_layer_num : "");
//查询到当前可用的巷道
JSONArray rowArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0);
@@ -1046,7 +1054,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
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),block_num,row_num").process().uniqueResult(0);
JSONObject empty_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("col_num", "1,2,3".contains(in_layer_num) ? in_layer_num : "").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)) {
String block_num = empty_row.getString("block_num");
String row_num = empty_row.getString("row_num");
@@ -1060,7 +1068,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
} else {
//如果查询不到空的一排,则查询有空位双通的一排
JSONArray haveArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "14").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().getResultJSONArray(0);
JSONArray haveArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("col_num", "1,2,3".contains(in_layer_num) ? in_layer_num : "").addParam("sect_id", sect_id).addParam("flag", "14").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().getResultJSONArray(0);
for (int j = 0; j < haveArr.size(); j++) {
JSONObject have_row = haveArr.getJSONObject(j);

View File

@@ -71,7 +71,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id", in_stor_id);
JSONObject jo = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time desc");
JSONObject jo = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time desc");
return jo;
}
@@ -129,14 +129,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分入库回传mes
if (StrUtil.equals(bill_type, "0005")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no"));
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -155,14 +155,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分出库回传mes
if (StrUtil.equals(bill_type, "1005")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no"));
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -181,7 +181,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 返检出库回传mes
if (StrUtil.equals(bill_type, "1006")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
@@ -189,7 +189,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
param.put("PackageBoxSN", json.getString("box_no"));
param.put("Attribute1", "ReCheck");
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -207,7 +207,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
}
// 销售出库
if (StrUtil.equals(bill_type, "1001") && is_productstore.equals("1")) {
// if (StrUtil.equals(bill_type, "1001") && is_productstore.equals("1")) {
if (StrUtil.equals(bill_type, "1001")) {
// 2.回传mes
JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
@@ -217,7 +218,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname"));
paramMesMst.put("iOutboundTime", jo_mst.getString("confirm_time"));
paramMesMst.put("iOutboundTime", DateUtil.now());
JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
@@ -246,7 +247,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
}
// 调拨出库
if (StrUtil.equals(bill_type, "1004") && is_productstore.equals("1")) {
// if (StrUtil.equals(bill_type, "1004") && is_productstore.equals("1")) {
if (StrUtil.equals(bill_type, "1004")) {
// 2.回传mes
JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
@@ -256,7 +258,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname"));
paramMesMst.put("iOutboundTime", jo_mst.getString("confirm_time"));
paramMesMst.put("iOutboundTime", DateUtil.now());
JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
@@ -369,7 +371,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -442,7 +444,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -516,7 +518,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -559,7 +561,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
JSONObject jsonDtl = wo_dtl.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").uniqueResult(0);
param.put("ZDBSQD",jsonDtl.getString("vbeln"));
param.put("ZDBSQD", jsonDtl.getString("vbeln"));
param.put("LGORT2", jo_mst.getString("stor_code"));
JSONObject jsonStorOut = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("stor_id = '" + jo_mst.getString("out_stor_id") + "'").uniqueResult(0);
param.put("LGORT1", jsonStorOut.getString("stor_code"));
@@ -576,7 +578,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("ZHL02", jsonSub.getString("width"));
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"),3));
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"), 3));
paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis);
}
@@ -696,7 +698,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -866,7 +868,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -907,7 +909,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
JSONObject jsonDtl = wo_dtl.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").uniqueResult(0);
param.put("ZDBSQD",jsonDtl.getString("vbeln"));
param.put("ZDBSQD", jsonDtl.getString("vbeln"));
param.put("LGORT2", jo_mst.getString("stor_code"));
JSONObject jsonStorOut = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("stor_id = '" + jo_mst.getString("out_stor_id") + "'").uniqueResult(0);
param.put("LGORT1", jsonStorOut.getString("stor_code"));
@@ -924,7 +926,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("ZHL02", jsonSub.getString("width"));
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"),3));
paramDis.put("KALAB", NumberUtil.round(jsonDis.getDoubleValue("plan_qty"), 3));
paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis);
}
@@ -943,14 +945,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分入库回传mes
if (StrUtil.equals(bill_type, "0005")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no"));
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -1007,7 +1009,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -1041,14 +1043,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分出库回传mes
if (StrUtil.equals(bill_type, "1005")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no"));
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -1107,7 +1109,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}
@@ -1137,36 +1139,36 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 2.回传mes
if (is_productstore.equals("1")) {
JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
//if (is_productstore.equals("1")) {
JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
paramMesMst.put("UserName", userName);
paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname"));
paramMesMst.put("iOutboundTime", jo_mst.getString("confirm_time"));
paramMesMst.put("UserName", userName);
paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname"));
paramMesMst.put("iOutboundTime", DateUtil.now());
JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
.process().getResultJSONArray(0);
JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
.process().getResultJSONArray(0);
JSONArray paramArr = new JSONArray();
for (int j = 0; j < boxArr.size(); j++) {
JSONObject json = boxArr.getJSONObject(j);
JSONObject jsonBox = new JSONObject();
JSONArray paramArr = new JSONArray();
for (int j = 0; j < boxArr.size(); j++) {
JSONObject json = boxArr.getJSONObject(j);
JSONObject jsonBox = new JSONObject();
jsonBox.put("PackageBoxSN", json.getString("box_no"));
paramArr.add(jsonBox);
}
paramMesMst.put("item", paramArr);
// 调用接口回传
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
jo_mst.put("upload_mes", "1");
jsonBox.put("PackageBoxSN", json.getString("box_no"));
paramArr.add(jsonBox);
}
paramMesMst.put("item", paramArr);
// 调用接口回传
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
jo_mst.put("upload_mes", "1");
// }
jo_mst.put("is_upload", "1");
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
jo_mst.put("upload_time", DateUtil.now());
@@ -1238,7 +1240,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname"));
paramMesMst.put("iOutboundTime", jo_mst.getString("confirm_time"));
paramMesMst.put("iOutboundTime", DateUtil.now());
JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
@@ -1266,7 +1268,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 改切出库回传mes
if (StrUtil.equals(bill_type, "1003")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
@@ -1274,7 +1276,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
param.put("PackageBoxSN", json.getString("box_no"));
param.put("Attribute1", "ReCut");
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -1293,7 +1295,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 返检出库回传mes
if (StrUtil.equals(bill_type, "1006")) {
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject();
JSONArray details = new JSONArray();
@@ -1301,7 +1303,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
param.put("PackageBoxSN", json.getString("box_no"));
param.put("Attribute1", "ReCheck");
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '" + json.getString("box_no") + "'").getResultJSONArray(0);
for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject();
@@ -1358,7 +1360,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
}

View File

@@ -134,6 +134,23 @@
/>
</el-select>
</el-form-item>
<el-form-item label="退货库存">
<el-select
v-model="query.rein_flag"
clearable
size="mini"
placeholder="请选择"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.IS_OR_NOT"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<rrOperation :crud="crud" />
</el-form>
</div>

View File

@@ -80,7 +80,7 @@
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
<el-form-item label="点位编码" prop="point_code">
<el-input v-model="form.point_code" style="width: 370px;" />
<el-input v-model="form.point_code" style="width: 370px;" disabled/>
</el-form-item>
<el-form-item label="生产区域">
<el-select
@@ -89,6 +89,7 @@
placeholder="生产区域"
class="filter-item"
style="width: 370px;"
disabled
>
<el-option
v-for="item in dict.product_area"
@@ -125,6 +126,7 @@
placeholder="位置"
class="filter-item"
style="width: 370px;"
disabled
>
<el-option
v-for="item in dict.point_location"
@@ -134,7 +136,7 @@
</el-select>
</el-form-item>
<el-form-item label="顺序号" prop="sort_seq">
<el-input v-model="form.sort_seq" style="width: 370px;" />
<el-input v-model="form.sort_seq" style="width: 370px;" disabled/>
</el-form-item>
<el-form-item label="是否启用" prop="is_used">
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" />

View File

@@ -481,7 +481,7 @@ export default {
},
outReturn() {
alert('点击确认按钮后,单据进行回传!')
checkoutbill.outReturn({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
checkoutbill.outReturn(this.currentRow).then(res => {
this.crud.notify('回传成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.querytable()
})