| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void reportOrders(List<WkOrder> orders) { |
| | | for (WkOrder order : orders) { |
| | | if (order.getReportOnce() > 4) { |
| | | if (order.getReportOnce() > 4 || order.getNtyStatus() == 1) { |
| | | continue; |
| | | } |
| | | ReportParams params = new ReportParams(); |
| | |
| | | |
| | | R reported = reportMsgService.uploadReportOrders(params); |
| | | if (reported.get("code").equals(200)) { |
| | | order.setNtyStatus(1); |
| | | order.setNtyStatus(1).setReportOnce(order.getReportOnce() + 1) ; |
| | | if (!asnOrderService.updateById(order)) { |
| | | throw new CoolException("上报状态修改失败!!"); |
| | | } |