| | |
| | | //log.info("InHedTBScheduler开始了" |
| | | // 7); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_InHedTB where LKName='中扬二期'"; |
| | | String sqlInHed = "select * from erp_InHedTB where LKName='高霖立库'"; |
| | | List<InHedTB> inHeds = erpSqlServer.select(sqlInHed, InHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (InHedTB inHed : inHeds) { |
| | |
| | | //continue; |
| | | } |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + inHed.getBillNo() + "'"); |
| | | condition.put("bill_no", "'" + inHed.getBillNo() + "'"); |
| | | List<InDetTB> inDetTBS = erpSqlServer.selectList(InDetTB.class, condition); |
| | | HashMap<String, Object> hedAndDet = new HashMap<>(); |
| | | hedAndDet.put("hed", inHed); |
| | |
| | | } catch (Exception e) { |
| | | log.info(e.getMessage()); |
| | | //e.printStackTrace(); |
| | | String sql = "UPDATE erp_InHedTB SET Temp3 = 'fault' WHERE BillNo = '" + inHed.getBillNo() + "'"; |
| | | String sql = "UPDATE erp_InHedTB SET Temp3 = 'fault' WHERE bill_no = '" + inHed.getBillNo() + "'"; |
| | | erpSqlServer.update(sql); |
| | | } |
| | | } |
| | |
| | | InHedTB hed = (InHedTB) hedAndDet.get("hed"); |
| | | ArrayList<InDetTB> dets = (ArrayList<InDetTB>) hedAndDet.get("det"); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + hed.getBillNo() + "'"); |
| | | condition.put("bill_no", "'" + hed.getBillNo() + "'"); |
| | | erpSqlServer.delete(InHedTB.class, condition); |
| | | for (InDetTB 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(InDetTB.class, condition2); |
| | | } |
| | | |