|
|
@ -40,7 +40,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_PO_INFO"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_PO_INFO"); |
|
|
|
|
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
// 是否有物料号的po
|
|
|
@ -210,7 +210,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_WO_INFO"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_WO_INFO"); |
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
// 生產訂單號碼
|
|
|
|
input.setValue("P_AUFNR", p_aufnr); |
|
|
@ -295,7 +295,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_MATERIAL_ISSUELIST"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_MATERIAL_ISSUELIST"); |
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
input.setValue("P_BUKRS", form.getString("p_bukrs")); |
|
|
|
|
|
|
@ -425,7 +425,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_MATERIAL_SHORTLIST"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_MATERIAL_SHORTLIST"); |
|
|
|
|
|
|
|
function.execute(SapJCoInterface.myConnection); |
|
|
|
} catch (JCoException e) { |
|
|
@ -505,7 +505,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
logger.debug("getMaterialStock-------if之后try之前"); |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_MATERIAL_STOCK"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_MATERIAL_STOCK"); |
|
|
|
|
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
JCoTable ZS_MATNR = input.getTable("ZS_MATNR"); |
|
|
@ -686,7 +686,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_MATERIAL"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_MATERIAL"); |
|
|
|
|
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
if (!(matnr_begin.isEmpty() || matnr_end.isEmpty())) { |
|
|
@ -891,7 +891,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_MATERIAL_INFO"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_MATERIAL_INFO"); |
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
input.setValue("P_MATNR", p_matnr); |
|
|
|
|
|
|
@ -956,7 +956,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_VENDOR_INFO"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_VENDOR_INFO"); |
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
// ----from to
|
|
|
|
JCoTable ZS_ERDAT = input.getTable("ZS_ERDAT"); |
|
|
@ -1059,7 +1059,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
JCoFunction function = null; |
|
|
|
JCoParameterList tablelist = null; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_MATERIAL_STOCK_MOVE"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_MATERIAL_STOCK_MOVE"); |
|
|
|
}catch(Exception e) { |
|
|
|
|
|
|
|
for (int i = 0; i < allrows.size(); i++) { |
|
|
@ -1186,7 +1186,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
JCoFunction function = null; |
|
|
|
JCoParameterList tablelist = null; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_MATERIAL_STOCK_UPDATE"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_MATERIAL_STOCK_UPDATE"); |
|
|
|
tablelist = function.getTableParameterList(); |
|
|
|
}catch(Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
@ -1405,7 +1405,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
logger.debug("WOPost------------回传开关已开!"); |
|
|
|
} |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_WO_POST"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_WO_POST"); |
|
|
|
tablelist = function.getTableParameterList(); |
|
|
|
}catch(Exception e) { |
|
|
|
for (int i = 0; i < allrows.size(); i++) { |
|
|
@ -1780,7 +1780,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_WO_COMPONENT"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_WO_COMPONENT"); |
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
// 生產訂單號碼
|
|
|
|
input.setValue("IN_AUFNR", aufnr); |
|
|
@ -1897,7 +1897,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
} |
|
|
|
JCoFunction function = null; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_WO_SEND"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_WO_SEND"); |
|
|
|
}catch(Exception e) { |
|
|
|
|
|
|
|
JSONObject joi = new JSONObject(); |
|
|
@ -2011,8 +2011,10 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
if (flag.equals("1")) { |
|
|
|
JCoFunction function; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_GET_WORKCENTER"); |
|
|
|
|
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_GET_WORKCENTER"); |
|
|
|
|
|
|
|
logger.debug("JCO function [ZFSWMS_GET_WORKCENTER]:"+function.toString() ); |
|
|
|
|
|
|
|
JCoParameterList input = function.getImportParameterList(); |
|
|
|
JCoTable IN_ERDAT = input.getTable("IN_ERDAT"); |
|
|
|
IN_ERDAT.appendRow(); |
|
|
@ -2051,7 +2053,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
|
|
|
|
// SAP组盘表
|
|
|
|
String IF_SAP_WorkGroup = "IF_SAP_WorkGroup"; |
|
|
|
WQLObject wo_IssueBillUrgent = WQLObject.getWQLObject(IF_SAP_WorkGroup); |
|
|
|
WQLObject wo_SAP_WorkGroup = WQLObject.getWQLObject(IF_SAP_WorkGroup); |
|
|
|
WQLObject ST_BS_WorkGroup = WQLObject.getWQLObject("ST_BS_WorkGroup"); |
|
|
|
for (int i = 0; i < tblexport.getNumRows(); i++) { |
|
|
|
tblexport.setRow(i); |
|
|
@ -2061,11 +2063,11 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
joi.put("id", id); |
|
|
|
String ARBPL = tblexport.getString("ARBPL"); |
|
|
|
String KTEXT = tblexport.getString("KTEXT"); |
|
|
|
JSONObject group = wo_IssueBillUrgent.query("ARBPL = '" + ARBPL + "'").uniqueResult(0); |
|
|
|
JSONObject group = wo_SAP_WorkGroup.query("ARBPL = '" + ARBPL + "'").uniqueResult(0); |
|
|
|
if (group == null) { |
|
|
|
joi.put("ARBPL", ARBPL); |
|
|
|
joi.put("KTEXT", KTEXT); |
|
|
|
wo_IssueBillUrgent.insert(joi); |
|
|
|
wo_SAP_WorkGroup.insert(joi); |
|
|
|
|
|
|
|
row.put("group_uuid", id); |
|
|
|
row.put("group_name", ARBPL); |
|
|
@ -2079,13 +2081,14 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
row.put("SYSUPDATEDATE", WDK.getDateTime()); |
|
|
|
ST_BS_WorkGroup.insert(row); |
|
|
|
} else { |
|
|
|
group.put("KTEXT", tblexport.getString("KTEXT")); |
|
|
|
wo_IssueBillUrgent.update(joi); |
|
|
|
group.put("ktext", tblexport.getString("KTEXT")); |
|
|
|
wo_SAP_WorkGroup.update(joi); |
|
|
|
row = ST_BS_WorkGroup.query("group_uuid = '" + group.optString("id") + "'").uniqueResult(0); |
|
|
|
row.put("simple_name", KTEXT); |
|
|
|
row.put("SYSUPDATORUUID", "0000"); |
|
|
|
row.put("SYSUPDATEDATE", WDK.getDateTime()); |
|
|
|
ST_BS_WorkGroup.update(row); |
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
map.put("simple_name", KTEXT); |
|
|
|
map.put("sysupdatoruuid", "0000"); |
|
|
|
map.put("sysupdatedate", WDK.getDateTime()); |
|
|
|
ST_BS_WorkGroup.update(map, "group_uuid=?", new String[] {row.optString("id")}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2104,7 +2107,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
JCoFunction function = null; |
|
|
|
JCoParameterList tablelist = null; |
|
|
|
try { |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZWMS_PO_POST"); |
|
|
|
function = SapJCoInterface.getRepository().getFunction("ZFSWMS_PO_POST"); |
|
|
|
}catch(Exception e) { |
|
|
|
|
|
|
|
for (int i = 0; i < allrows.size(); i++) { |
|
|
|