rev:回传修改、库存报表新增查询条件

This commit is contained in:
2023-09-08 09:15:56 +08:00
parent bced0538ac
commit 1094e00242
7 changed files with 133 additions and 60 deletions

View File

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

View File

@@ -25,6 +25,7 @@
输入.sale_order_name TYPEAS s_string 输入.sale_order_name TYPEAS s_string
输入.package_box_sn TYPEAS s_string 输入.package_box_sn TYPEAS s_string
输入.is_virtual TYPEAS s_string 输入.is_virtual TYPEAS s_string
输入.rein_flag TYPEAS s_string
输入.in_stor_id TYPEAS f_string 输入.in_stor_id TYPEAS f_string
[临时表] [临时表]
@@ -51,6 +52,10 @@
IF 输入.flag = "1" IF 输入.flag = "1"
PAGEQUERY PAGEQUERY
SELECT
a.*
FROM
(
SELECT SELECT
ivt.*, ivt.*,
attr.sect_id, attr.sect_id,
@@ -134,6 +139,24 @@
OPTION 输入.ivt_status = "frozen_qty" OPTION 输入.ivt_status = "frozen_qty"
ivt.frozen_qty > 0 ivt.frozen_qty > 0
ENDOPTION 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 ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY
@@ -141,6 +164,10 @@
IF 输入.flag = "2" IF 输入.flag = "2"
QUERY QUERY
SELECT
a.*
FROM
(
SELECT SELECT
ivt.*, ivt.*,
attr.sect_id, attr.sect_id,
@@ -223,6 +250,24 @@
ENDOPTION ENDOPTION
OPTION 输入.areas <> "" OPTION 输入.areas <> ""
LEFT(sub.container_name,2) IN 输入.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 ENDOPTION
ENDSELECT ENDSELECT
ENDQUERY 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 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); 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); JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) { if (ObjectUtil.isEmpty(jsonMater)) {
throw new BadRequestException("物料基础信息中无此物料!"); throw new BadRequestException("物料基础信息中无此物料!");

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); 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; return jo;
} }
@@ -129,14 +129,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分入库回传mes // 拆分入库回传mes
if (StrUtil.equals(bill_type, "0005")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j); JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no")); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); JSONObject jsonParamDtl = new JSONObject();
@@ -155,14 +155,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分出库回传mes // 拆分出库回传mes
if (StrUtil.equals(bill_type, "1005")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j); JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no")); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); JSONObject jsonParamDtl = new JSONObject();
@@ -181,7 +181,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 返检出库回传mes // 返检出库回传mes
if (StrUtil.equals(bill_type, "1006")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
@@ -189,7 +189,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
param.put("PackageBoxSN", json.getString("box_no")); param.put("PackageBoxSN", json.getString("box_no"));
param.put("Attribute1", "ReCheck"); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); 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 // 2.回传mes
JSONObject paramMesMst = new JSONObject(); JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue(); 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("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code")); paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname")); 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") JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id")) .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 // 2.回传mes
JSONObject paramMesMst = new JSONObject(); JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue(); 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("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code")); paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname")); 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") JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id")) .addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
@@ -369,7 +371,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -442,7 +444,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -516,7 +518,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 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); 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); 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")); 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); 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")); param.put("LGORT1", jsonStorOut.getString("stor_code"));
@@ -576,7 +578,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("ZHL02", jsonSub.getString("width")); paramDis.put("ZHL02", jsonSub.getString("width"));
paramDis.put("ZZWLHD", jsonSub.getString("thickness")); paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn")); 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"); paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis); paramSapMstArr.add(paramDis);
} }
@@ -696,7 +698,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -866,7 +868,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 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); 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); 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")); 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); 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")); param.put("LGORT1", jsonStorOut.getString("stor_code"));
@@ -924,7 +926,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("ZHL02", jsonSub.getString("width")); paramDis.put("ZHL02", jsonSub.getString("width"));
paramDis.put("ZZWLHD", jsonSub.getString("thickness")); paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn")); 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"); paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis); paramSapMstArr.add(paramDis);
} }
@@ -943,14 +945,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分入库回传mes // 拆分入库回传mes
if (StrUtil.equals(bill_type, "0005")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j); JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no")); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); JSONObject jsonParamDtl = new JSONObject();
@@ -1007,7 +1009,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -1041,14 +1043,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 拆分出库回传mes // 拆分出库回传mes
if (StrUtil.equals(bill_type, "1005")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
JSONObject json = disArr.getJSONObject(j); JSONObject json = disArr.getJSONObject(j);
param.put("PackageBoxSN", json.getString("box_no")); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); JSONObject jsonParamDtl = new JSONObject();
@@ -1107,7 +1109,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -1137,36 +1139,36 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 2.回传mes // 2.回传mes
if (is_productstore.equals("1")) { //if (is_productstore.equals("1")) {
JSONObject paramMesMst = new JSONObject(); JSONObject paramMesMst = new JSONObject();
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue(); String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue(); String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
paramMesMst.put("UserName", userName); paramMesMst.put("UserName", userName);
paramMesMst.put("Password", passWord); paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code")); paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname")); 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") JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id")) .addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
.process().getResultJSONArray(0); .process().getResultJSONArray(0);
JSONArray paramArr = new JSONArray(); JSONArray paramArr = new JSONArray();
for (int j = 0; j < boxArr.size(); j++) { for (int j = 0; j < boxArr.size(); j++) {
JSONObject json = boxArr.getJSONObject(j); JSONObject json = boxArr.getJSONObject(j);
JSONObject jsonBox = new JSONObject(); JSONObject jsonBox = new JSONObject();
jsonBox.put("PackageBoxSN", json.getString("box_no")); jsonBox.put("PackageBoxSN", json.getString("box_no"));
paramArr.add(jsonBox); paramArr.add(jsonBox);
}
paramMesMst.put("item", paramArr);
// 调用接口回传
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
jo_mst.put("upload_mes", "1");
} }
paramMesMst.put("item", paramArr);
// 调用接口回传
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
jo_mst.put("upload_mes", "1");
// }
jo_mst.put("is_upload", "1"); jo_mst.put("is_upload", "1");
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId()); jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
jo_mst.put("upload_time", DateUtil.now()); jo_mst.put("upload_time", DateUtil.now());
@@ -1238,7 +1240,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramMesMst.put("Password", passWord); paramMesMst.put("Password", passWord);
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code")); paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname")); 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") JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id")) .addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
@@ -1266,7 +1268,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 改切出库回传mes // 改切出库回传mes
if (StrUtil.equals(bill_type, "1003")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
@@ -1274,7 +1276,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
param.put("PackageBoxSN", json.getString("box_no")); param.put("PackageBoxSN", json.getString("box_no"));
param.put("Attribute1", "ReCut"); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); JSONObject jsonParamDtl = new JSONObject();
@@ -1293,7 +1295,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 返检出库回传mes // 返检出库回传mes
if (StrUtil.equals(bill_type, "1006")) { 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++) { for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray details = new JSONArray(); JSONArray details = new JSONArray();
@@ -1301,7 +1303,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
param.put("PackageBoxSN", json.getString("box_no")); param.put("PackageBoxSN", json.getString("box_no"));
param.put("Attribute1", "ReCheck"); 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++) { for (int k = 0; k < container_jo.size(); k++) {
JSONObject dis_jo = container_jo.getJSONObject(k); JSONObject dis_jo = container_jo.getJSONObject(k);
JSONObject jsonParamDtl = new JSONObject(); JSONObject jsonParamDtl = new JSONObject();
@@ -1358,7 +1360,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 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)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }

View File

@@ -134,6 +134,23 @@
/> />
</el-select> </el-select>
</el-form-item> </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" /> <rrOperation :crud="crud" />
</el-form> </el-form>
</div> </div>

View File

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

View File

@@ -481,7 +481,7 @@ export default {
}, },
outReturn() { outReturn() {
alert('点击确认按钮后,单据进行回传!') 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.crud.notify('回传成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.querytable() this.querytable()
}) })