| | |
| | | public void OutHedTBScheduler() { |
| | | //log.info("OutHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期'"; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='高霖立库'"; |
| | | List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (OutHedTB inHed : inHeds) { |
| | |
| | | //continue; |
| | | } |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + inHed.getBillNo() + "'"); |
| | | condition.put("bill_no", "'" + inHed.getBillNo() + "'"); |
| | | List<OutDetTB> inDetTBS = erpSqlServer.selectList(OutDetTB.class, condition); |
| | | HashMap<String, Object> hedAndDet = new HashMap<>(); |
| | | hedAndDet.put("hed", inHed); |
| | |
| | | public void OutHedTBScheduler(String orderNo) { |
| | | //log.info("OutHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期' and BillNo = '" + orderNo + "'"; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='高霖立库' and BillNo = '" + orderNo + "'"; |
| | | List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (OutHedTB inHed : inHeds) { |
| | |
| | | OutHedTB hed = (OutHedTB) hedAndDet.get("hed"); |
| | | ArrayList<OutDetTB> dets = (ArrayList<OutDetTB>) hedAndDet.get("det"); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + hed.getBillNo() + "'"); |
| | | condition.put("bill_no", "'" + hed.getBillNo() + "'"); |
| | | erpSqlServer.delete(OutHedTB.class, condition); |
| | | for (OutDetTB det : dets) { |
| | | HashMap<String, String> condition2 = new HashMap<>(); |
| | | condition2.put("BillNo", "'" + det.getBillNo() + "'"); |
| | | condition2.put("iNo", String.valueOf(det.getINO())); |
| | | condition2.put("bill_no", "'" + det.getBillNo() + "'"); |
| | | condition2.put("i_no", String.valueOf(det.getINO())); |
| | | erpSqlServer.delete(OutDetTB.class, condition2); |
| | | } |
| | | |