| | |
| | | @RestController |
| | | public class ErpScheduler { |
| | | |
| | | public static final String URI = "http://8.133.182.21:8080/api"; |
| | | public static final String URI = "http://8.133.182.21:6220/api"; |
| | | public static final String GET_ORDERS = "cM/basis/getOrders"; |
| | | public static final String GET_BASIS = "cM/basis/getBasis"; |
| | | public static final String UPLOAD_BILL = "cM/basis/uploadBill"; |
| | |
| | | public void getOrdersExecute(){ |
| | | try { |
| | | Map<String, Object> json = new HashMap<>(); |
| | | json.put("vchType", 151); |
| | | json.put("vchType", 11); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(URI) |
| | | .setPath(GET_ORDERS) |
| | |
| | | |
| | | |
| | | // 头 |
| | | getOrderResult0.setNumber(order.getUuid()); |
| | | getOrderResult0.setNumber(order.getOrderNo()); |
| | | getOrderResult0.setVchType(11); // todo:luxiaotao |
| | | getOrderResult0.setBillDate(order.getOrderTime()); |
| | | getOrderResult0.setBTypeID(order.getTel()); |
| | |
| | | if (result.getCode() != 1) { |
| | | continue; |
| | | } |
| | | if (!orderService.updateSettle(getOrderResult0.getNumber(), 6L)) { |
| | | if (!orderService.updateSettle(order.getOrderNo(), 6L)) { |
| | | throw new CoolException("修改订单状态失败"); |
| | | } |
| | | // // 转历史档 |
| | |
| | | public void getCancelOrdersExecute(){ |
| | | try { |
| | | Map<String, Object> json = new HashMap<>(); |
| | | json.put("vchType", 151); |
| | | json.put("vchType", 11); |
| | | json.put("flag", 2); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(URI) |
| | |
| | | existNumbers.add(result0.getNumber()); |
| | | } |
| | | for (String number : existNumbers) { |
| | | if (!orderService.updateSettle(number, 5L)) { |
| | | Order order = orderService.selectByOrderNo(number); |
| | | if (order != null) { |
| | | if (order.getSettle() != 3L && order.getSettle() != 5L) { |
| | | if (!orderService.updateSettle(number, 5L)) { |
| | | // throw new CoolException("修改订单状态失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |