Browse Source

opt:sap班组接口更新

master
DESKTOP-5DIJMF9\admin 2 weeks ago
parent
commit
4572b63032
  1. 24
      lxservice/com/noblelift/imp/products/mes/service/ifs/sap/SapToWmsServiceImpl.java

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

@ -2058,37 +2058,37 @@ public class SapToWmsServiceImpl implements SapToWmsService {
for (int i = 0; i < tblexport.getNumRows(); i++) {
tblexport.setRow(i);
JSONObject joi = new JSONObject();
JSONObject row = new JSONObject();
String id = WDK.getUUID();
joi.put("id", id);
String ARBPL = tblexport.getString("ARBPL");
String KTEXT = tblexport.getString("KTEXT");
JSONObject group = wo_SAP_WorkGroup.query("ARBPL = '" + ARBPL + "'").uniqueResult(0);
if (group == null) {
//删除
wo_SAP_WorkGroup.delete("ARBPL = '" + ARBPL + "'");
joi.put("id", id);
joi.put("ARBPL", ARBPL);
joi.put("KTEXT", KTEXT);
wo_SAP_WorkGroup.insert(joi);
JSONObject row = ST_BS_WorkGroup.query("group_code = '" + ARBPL + "'").uniqueResult(0);
if (row == null) {
row = new JSONObject();
row.put("group_uuid", id);
row.put("group_name", ARBPL);
row.put("group_code", ARBPL);
row.put("simple_name", KTEXT);
row.put("group_type", "01");
row.put("is_active", "1");
row.put("SYSCREATORUUID", "0000");
row.put("SYSCREATEDATE", WDK.getDateTime());
row.put("SYSUPDATORUUID", "0000");
row.put("SYSUPDATEDATE", WDK.getDateTime());
row.put("syscreatoruuid", "0000");
row.put("syscreatedate", WDK.getDateTime());
row.put("sysupdatoruuid", "0000");
row.put("sysupdatedate", WDK.getDateTime());
ST_BS_WorkGroup.insert(row);
} else {
group.put("ktext", tblexport.getString("KTEXT"));
wo_SAP_WorkGroup.update(joi);
row = ST_BS_WorkGroup.query("group_uuid = '" + group.optString("id") + "'").uniqueResult(0);
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")});
ST_BS_WorkGroup.update(map, "group_uuid=?", new String[] {row.optString("group_uuid")});
}
}
}

Loading…
Cancel
Save