|
|
@ -11,6 +11,7 @@ import org.wdk.core.bean.WDKLogger; |
|
|
|
import org.wdk.core.env.context.ServiceContext; |
|
|
|
import org.wdk.core.spring.annotation.WDKTransaction; |
|
|
|
import org.wdk.core.util.uString; |
|
|
|
import org.wdk.core.wql.core.bean.ResultBean; |
|
|
|
import org.wdk.core.wql.core.bean.WQLData; |
|
|
|
import org.wdk.core.wql.core.bean.WQLObject; |
|
|
|
|
|
|
@ -237,8 +238,8 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
String IF_SAP_ProductOrder = "IF_SAP_ProductOrder"; |
|
|
|
// 生产订单接口处理表
|
|
|
|
String IF_SAP_ProductOrderProc = "IF_SAP_ProductOrderProc"; |
|
|
|
WQLObject wo_IssueBillUrgent = WQLObject.getWQLObject(IF_SAP_ProductOrder); |
|
|
|
WQLObject wo_IssueBillUrgentProc = WQLObject.getWQLObject(IF_SAP_ProductOrderProc); |
|
|
|
WQLObject wo_IF_SAP_ProductOrder = WQLObject.getWQLObject(IF_SAP_ProductOrder); |
|
|
|
WQLObject wo_IF_SAP_ProductOrderProc = WQLObject.getWQLObject(IF_SAP_ProductOrderProc); |
|
|
|
logger.debug("数据数量:" + tblexport.getNumRows()); |
|
|
|
for (int i = 0; i < tblexport.getNumRows(); i++) { |
|
|
|
tblexport.setRow(i); |
|
|
@ -261,7 +262,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
joi.put("MEINS", tblexport.getString("MEINS")); |
|
|
|
joi.put("LGORT", tblexport.getString("LGORT")); |
|
|
|
// 新增
|
|
|
|
wo_IssueBillUrgent.insert(joi); |
|
|
|
wo_IF_SAP_ProductOrder.insert(joi); |
|
|
|
|
|
|
|
JSONObject row = WdkUtil.queryOneByAttr(whereExpr.toJSONArray(), "", IF_SAP_ProductOrderProc); |
|
|
|
if (row == null || row.optDouble("crea_receive_qty") == 0) { |
|
|
@ -277,7 +278,7 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
joi.put("no_instor_qty", qty + ""); |
|
|
|
joi.put("importor_id", "0000"); |
|
|
|
joi.put("import_time", WDK.getDateTime()); |
|
|
|
wo_IssueBillUrgentProc.insert(joi); |
|
|
|
wo_IF_SAP_ProductOrderProc.insert(joi); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -790,6 +791,8 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
jo = new JSONObject(); |
|
|
|
jo.put("material_code", joi.optString("MATNR")); |
|
|
|
String material_name = joi.optString("MAKTX"); |
|
|
|
material_name = material_name.replace("\"","’"); |
|
|
|
|
|
|
|
material_name = material_name.replace("'","’"); |
|
|
|
jo.put("material_name", material_name); |
|
|
|
JSONObject unit = WQLObject.getWQLObject("MD_PB_MeasureUnit") |
|
|
@ -855,18 +858,23 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
ST_BS_WMSMaterialIsDull.insert(wmsmaterial); |
|
|
|
|
|
|
|
//暂时屏蔽1061的物料
|
|
|
|
wmsmaterial.put("wmsmaterial_uuid", "uuid-" + MATNR + "-1061"); |
|
|
|
/*wmsmaterial.put("wmsmaterial_uuid", "uuid-" + MATNR + "-1061"); |
|
|
|
wmsmaterial.put("factory_uuid", "1061"); |
|
|
|
ST_BS_WMSMaterial.insert(wmsmaterial); |
|
|
|
wmsmaterial.put("is_dull", "0"); |
|
|
|
ST_BS_WMSMaterialIsDull.insert(wmsmaterial); |
|
|
|
ST_BS_WMSMaterialIsDull.insert(wmsmaterial);*/ |
|
|
|
|
|
|
|
} else {// 更新
|
|
|
|
|
|
|
|
jo.put("sysupdatetime", datanow); |
|
|
|
jo.put("sysupdateuseruuid", "0000"); |
|
|
|
|
|
|
|
jo.put("material_name", joi.optString("MAKTX")); |
|
|
|
String material_name = joi.optString("MAKTX"); |
|
|
|
material_name = material_name.replace("\"","’"); |
|
|
|
|
|
|
|
material_name = material_name.replace("'","’"); |
|
|
|
jo.put("material_name", material_name); |
|
|
|
|
|
|
|
JSONObject unit = WQLObject.getWQLObject("MD_PB_MeasureUnit") |
|
|
|
.query("unit_name = '" + joi.optString("MEINS") + "'").uniqueResult(0); |
|
|
|
jo.put("base_unit_uuid", unit.optString("measure_unit_uuid")); |
|
|
@ -905,6 +913,11 @@ public class SapToWmsServiceImpl implements SapToWmsService { |
|
|
|
jo.put("sect_name", sect.optString("sect_name", "")); |
|
|
|
} |
|
|
|
MD_ME_MaterialBase.update(jo); |
|
|
|
//更新物料唯一表
|
|
|
|
HashMap<String, String> map = new HashMap<String, String>(); |
|
|
|
map.put("material_name", material_name); |
|
|
|
ResultBean rb2 = ST_BS_WMSMaterial.update(map, "material_code = ?", |
|
|
|
new String[] { MATNR }); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|