| | |
| | | //continue; |
| | | } |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("bill_no", "'" + inHed.getBillNo() + "'"); |
| | | condition.put("BillNo", "'" + 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 bill_no = '" + inHed.getBillNo() + "'"; |
| | | String sql = "UPDATE erp_InHedTB SET Temp3 = 'fault' WHERE BillNo = '" + 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("bill_no", "'" + hed.getBillNo() + "'"); |
| | | condition.put("BillNo", "'" + hed.getBillNo() + "'"); |
| | | erpSqlServer.delete(InHedTB.class, condition); |
| | | for (InDetTB det : dets) { |
| | | HashMap<String, String> condition2 = new HashMap<>(); |
| | | condition2.put("bill_no", "'" + det.getBillNo() + "'"); |
| | | condition2.put("i_no", String.valueOf(det.getINO())); |
| | | condition2.put("BillNo", "'" + det.getBillNo() + "'"); |
| | | condition2.put("iNo", String.valueOf(det.getINO())); |
| | | erpSqlServer.delete(InDetTB.class, condition2); |
| | | } |
| | | |