| | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InCancelScheduler() { |
| | | //log.info("InCancelScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInCancelTB = "select * from erp_InCancelTB where LKName='中扬二期'"; |
| | | String sqlInCancelTB = "select * from erp_InCancelTB "; |
| | | List<InCancelTB> ins = erpSqlServer.select(sqlInCancelTB, InCancelTB.class); |
| | | for (InCancelTB in : ins) { |
| | | System.out.println(in); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancel(in.getBillNo()); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancelIn(in.getBillNo()); |
| | | if (lkCancel != null) { |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + in.getBillNo() + "'"); |
| | | int delete = erpSqlServer.delete(InCancelTB.class, condition); |
| | | int delete = erpSqlServer.delete(com.zy.third.erp.entity.InCancelTB.class, condition); |
| | | if (delete > 0) { |
| | | log.info("将入库取消通知单删除成功,{}", lkCancel.getBillNo()); |
| | | } else { |