| | |
| | | public static final String URI = "http://8.133.182.21:8080/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 static final String UPLOAD_STOCK = "cM/basis/uploadStock"; |
| | | |
| | | @Autowired |
| | |
| | | // 表头 |
| | | if (Cools.isEmpty(getOrderResult0.getNumber())) { |
| | | getOrderResult0.setNumber(number); |
| | | getOrderResult0.setVchType(34); // todo:luxiaotao |
| | | getOrderResult0.setVchType(11); // todo:luxiaotao |
| | | getOrderResult0.setBillDate(custOrder.getBillDate()); |
| | | getOrderResult0.setBTypeID(custOrder.getBTypeId()); |
| | | getOrderResult0.setKTypeID("宏挺仓库"); |
| | |
| | | |
| | | System.out.println(JSON.toJSONString(getOrderResult0)); |
| | | |
| | | int save = custOrderMapper.saveLog(getOrderResult0.getNumber()); |
| | | if (save > 0) { |
| | | if (custOrderMapper.delete(new EntityWrapper<CustOrder>().eq("number", getOrderResult0.getNumber())) == 0) { |
| | | throw new CoolException("删除销售订单失败"); |
| | | |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(URI) |
| | | .setPath(UPLOAD_BILL) |
| | | .setJson(JSON.toJSONString(getOrderResult0)) |
| | | .build() |
| | | .doPost(); |
| | | if (!Cools.isEmpty(response)) { |
| | | log.warn(response); |
| | | Result result = JSON.parseObject(response, Result.class); |
| | | if (result.getCode() != 1) { |
| | | return; |
| | | } |
| | | // 转历史档 |
| | | int save = custOrderMapper.saveLog(getOrderResult0.getNumber()); |
| | | if (save > 0) { |
| | | if (custOrderMapper.delete(new EntityWrapper<CustOrder>().eq("number", getOrderResult0.getNumber())) == 0) { |
| | | throw new CoolException("删除销售订单失败"); |
| | | } |
| | | log.info("{}销售订单拣货结束", getOrderResult0.getNumber()); |
| | | } |
| | | } |
| | | |
| | | // String response = new HttpHandler.Builder() |
| | | // .setUri(URI) |
| | | // .setPath(GET_ORDERS) |
| | | // .setJson(JSON.toJSONString(getOrderResult0)) |
| | | // .build() |
| | | // .doPost(); |
| | | // if (!Cools.isEmpty(response)) { |
| | | //// log.info(response); |
| | | // Date now = new Date(); |
| | | // Result result = JSON.parseObject(response, Result.class); |
| | | // if (result.getCode() != 1) { |
| | | // return; |
| | | // } |
| | | // // 转历史档 |
| | | // } |
| | | |
| | | } |
| | | } |