| | |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | public void deleteInOrder() { |
| | | //log.info("读取入库单据"); |
| | | List<String> orderNos = exdInstockSourceMapper.deletelistOrderNo(); |
| | | for (String orderNo : orderNos) { |
| | | List<ExdInstockSource> exdInstockSources = exdInstockSourceMapper.listAll(orderNo); |
| | | List<ExdInstockSource> exdInstockSources = exdInstockSourceMapper.deletelistOrderNo(); |
| | | for (ExdInstockSource exdInstockSource : exdInstockSources) { |
| | | try { |
| | | boolean success = orderHandler.deletereadInOrder(exdInstockSources).isSuccess(); |
| | | for (ExdInstockSource exdInstockSource : exdInstockSources) { |
| | | boolean success = orderHandler.deletereadInOrder(exdInstockSource).isSuccess(); |
| | | if (success) { |
| | | exdInstockSource.setReadtime(new Date()); |
| | | exdInstockSource.setStatus(8); |
| | |
| | | exdInstockSource.setStatus(7); |
| | | exdInstockSourceMapper.updateById(exdInstockSource); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | // log.error("读取入库单据信息失败:{},{}", exdInstockSources, e.getMessage()); |
| | | e.printStackTrace(); |
| | | for (ExdInstockSource exdInstockSource : exdInstockSources) { |
| | | exdInstockSource.setReadormsg(e.getMessage()); |
| | | exdInstockSource.setStatus(7); |
| | | exdInstockSourceMapper.updateById(exdInstockSource); |
| | | } |
| | | exdInstockSource.setReadormsg(e.getMessage()); |
| | | exdInstockSource.setStatus(7); |
| | | exdInstockSourceMapper.updateById(exdInstockSource); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | public void deletereadOutOrder() { |
| | | //log.info("读取出库单据"); |
| | | List<String> orderNos = exdOutstockSourceMapper.deletelistOrderNo(); |
| | | for (String orderNo : orderNos) { |
| | | List<ExdOutstockSource> exdOutstockSources = exdOutstockSourceMapper.listAll(orderNo); |
| | | List<ExdOutstockSource> exdOutstockSources = exdOutstockSourceMapper.deletelistOrderNo(); |
| | | for (ExdOutstockSource exdOutstockSource : exdOutstockSources) { |
| | | try { |
| | | boolean success = orderHandler.deletereadOutOrder(exdOutstockSources).isSuccess(); |
| | | for (ExdOutstockSource exdOutstockSource : exdOutstockSources) { |
| | | if (success) { |
| | | exdOutstockSource.setReadtime(new Date()); |
| | | exdOutstockSource.setStatus(8); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } else { |
| | | exdOutstockSource.setReadtime(new Date()); |
| | | exdOutstockSource.setStatus(7); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } |
| | | boolean success = orderHandler.deletereadOutOrder(exdOutstockSource).isSuccess(); |
| | | if (success) { |
| | | exdOutstockSource.setReadtime(new Date()); |
| | | exdOutstockSource.setStatus(8); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } else { |
| | | exdOutstockSource.setReadtime(new Date()); |
| | | exdOutstockSource.setStatus(7); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } |
| | | } catch (Exception e) { |
| | | // log.error("读取出库单据信息失败:{},{}", exdOutstockSources, e.getMessage()); |
| | | e.printStackTrace(); |
| | | for (ExdOutstockSource exdOutstockSource : exdOutstockSources) { |
| | | exdOutstockSource.setStatus(7); |
| | | exdOutstockSource.setReadormsg(e.getMessage()); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } |
| | | exdOutstockSource.setStatus(7); |
| | | exdOutstockSource.setReadormsg(e.getMessage()); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | List<OrderDetl1> orderNo = orderDetl1Service.selectList(new EntityWrapper<OrderDetl1>().eq("order_no", exdOutstockTarget.getFbillno())); |
| | | if (!Cools.isEmpty(orderNo)) { |
| | | for (OrderDetl1 orderDetl1 : orderNo) { |
| | | if (!Cools.isEmpty(orderDetl1.getMemo())&&orderDetl1.getMemo().equals(exdOutstockTarget.getReadormsg())) { |
| | | if (!Cools.isEmpty(orderDetl1.getMemo()) && orderDetl1.getMemo().equals(exdOutstockTarget.getReadormsg())) { |
| | | break; |
| | | } |
| | | orderDetl1.setMemo(exdOutstockTarget.getReadormsg()); |