Browse Source

opt:优化物料更新

master
DESKTOP-5DIJMF9\admin 2 months ago
parent
commit
5a4569180f
  1. 37
      lxapp/src/wql/mes/ifs/sap/IFS_SAP_INTERFACE_01.wql
  2. 13
      lxservice/com/noblelift/imp/products/mes/service/ifs/sap/SapToWmsServiceImpl.java

37
lxapp/src/wql/mes/ifs/sap/IFS_SAP_INTERFACE_01.wql

@ -423,6 +423,43 @@ IF 输入.flag = "8"
ENDQUERY ENDQUERY
ENDIF ENDIF
IF 输入.flag = "9"
DELETE
FROM
MD_ME_MaterialBase
WHERE
material_uuid IN ( SELECT 'uuid-' + ma.MATNR AS material_uuid FROM if_sap_mater ma )
ENDDELETE
ENDIF
IF 输入.flag = "10"
DELETE
FROM
MD_PB_BaseData_ClassInfo
WHERE
class_uuid = 'B5CFEA82959F4A8EB53847C693F58E6B'
AND base_data_uuid IN ( SELECT 'uuid-' + ma.MATNR AS base_data_uuid FROM if_sap_mater ma )
ENDDELETE
ENDIF
IF 输入.flag = "11"
DELETE
FROM
ST_BS_WMSMaterial
WHERE
wmsmaterial_uuid IN ( SELECT 'uuid-' + ma.MATNR + '-1060' AS wmsmaterial_uuid FROM if_sap_mater ma )
ENDDELETE
ENDIF
IF 输入.flag = "12"
DELETE
FROM
ST_BS_WMSMaterialIsDull
WHERE
wmsmaterial_uuid IN ( SELECT 'uuid-' + ma.MATNR + '-1060' AS wmsmaterial_uuid FROM if_sap_mater ma )
ENDDELETE
ENDIF

13
lxservice/com/noblelift/imp/products/mes/service/ifs/sap/SapToWmsServiceImpl.java

@ -803,6 +803,11 @@ public class SapToWmsServiceImpl implements SapToWmsService {
} }
JSONArray ja = WQL.getWO("IFS_SAP_INTERFACE_01").addParam("flag", "8").process().getResultJSONArray(0); JSONArray ja = WQL.getWO("IFS_SAP_INTERFACE_01").addParam("flag", "8").process().getResultJSONArray(0);
WQL.getWO("IFS_SAP_INTERFACE_01").addParam("flag", "9").process();
WQL.getWO("IFS_SAP_INTERFACE_01").addParam("flag", "10").process();
WQL.getWO("IFS_SAP_INTERFACE_01").addParam("flag", "11").process();
WQL.getWO("IFS_SAP_INTERFACE_01").addParam("flag", "12").process();
String datanow = WDK.getDateTime(); String datanow = WDK.getDateTime();
for(int i=0;i<ja.size();i++){ for(int i=0;i<ja.size();i++){
@ -845,7 +850,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
if(MD_ME_MaterialBase.existField(key)) if(MD_ME_MaterialBase.existField(key))
wd_MaterialBase.setValue(key, value); wd_MaterialBase.setValue(key, value);
} }
MD_ME_MaterialBase.delete("material_uuid='"+jo.getString("material_uuid")+"'"); //MD_ME_MaterialBase.delete("material_uuid='"+jo.getString("material_uuid")+"'");
JSONObject jo2 = new JSONObject(); JSONObject jo2 = new JSONObject();
jo2.put("class_uuid", "B5CFEA82959F4A8EB53847C693F58E6B"); jo2.put("class_uuid", "B5CFEA82959F4A8EB53847C693F58E6B");
@ -861,7 +866,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
if(MD_PB_BaseData_ClassInfo.existField(key)) if(MD_PB_BaseData_ClassInfo.existField(key))
wd_BaseData_ClassInfo.setValue(key, value); wd_BaseData_ClassInfo.setValue(key, value);
} }
MD_PB_BaseData_ClassInfo.delete("class_uuid='B5CFEA82959F4A8EB53847C693F58E6B' and base_data_uuid='"+jo2.optString("base_data_uuid")+"'"); //MD_PB_BaseData_ClassInfo.delete("class_uuid='B5CFEA82959F4A8EB53847C693F58E6B' and base_data_uuid='"+jo2.optString("base_data_uuid")+"'");
JSONObject wmsmaterial = new JSONObject(); JSONObject wmsmaterial = new JSONObject();
wmsmaterial.put("wmsmaterial_uuid", "uuid-" + material_code + "-1060"); wmsmaterial.put("wmsmaterial_uuid", "uuid-" + material_code + "-1060");
@ -877,7 +882,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
if(ST_BS_WMSMaterial.existField(key)) if(ST_BS_WMSMaterial.existField(key))
wd_WMSMaterial.setValue(key, value); wd_WMSMaterial.setValue(key, value);
} }
ST_BS_WMSMaterial.delete("wmsmaterial_uuid='"+wmsmaterial.getString("wmsmaterial_uuid")+"'"); //ST_BS_WMSMaterial.delete("wmsmaterial_uuid='"+wmsmaterial.getString("wmsmaterial_uuid")+"'");
JSONObject wmsmaterial2 = new JSONObject(); JSONObject wmsmaterial2 = new JSONObject();
@ -891,7 +896,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
if(ST_BS_WMSMaterialIsDull.existField(key)) if(ST_BS_WMSMaterialIsDull.existField(key))
wd_WMSMaterialIsDull.setValue(key, value); wd_WMSMaterialIsDull.setValue(key, value);
} }
ST_BS_WMSMaterialIsDull.delete("wmsmaterial_uuid='"+wmsmaterial2.getString("wmsmaterial_uuid")+"'"); //ST_BS_WMSMaterialIsDull.delete("wmsmaterial_uuid='"+wmsmaterial2.getString("wmsmaterial_uuid")+"'");
}//end if }//end if

Loading…
Cancel
Save