| | |
| | | public void ItemScheduler() { |
| | | //log.info("ItemScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlItemTB = "select * from erp_ItemTB where LKName='中扬二期'"; |
| | | String sqlItemTB = "select TOP 1000 * from erp_ItemTB where LKName='中扬二期'"; |
| | | List<ItemTB> itemTBS = erpSqlServer.select(sqlItemTB, ItemTB.class); |
| | | if (itemTBS != null && itemTBS.size() > 0) { |
| | | for (ItemTB itemTB : itemTBS) { |
| | | System.out.println(itemTB); |
| | | log.info("新增物料成功,{}", itemTB); |
| | | //00代表新增 |
| | | if (itemTB.getFlag().equals("00")) { |
| | | erpItemService.addToMainDatabase(itemTB); |
| | | } |
| | | //22代表删除 |
| | | if (itemTB.getFlag().equals("22")) { |
| | | log.info("删除物料成功,{}", itemTB); |
| | | erpItemService.deleteFromMainDatabase(itemTB); |
| | | } |
| | | moveToBak(itemTB); |