| | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Synchronized |
| | | @Transactional |
| | | public synchronized void syncMat1() { |
| | | erpService.updateStateForGoods("PL0122231401176", 1); |
| | | } |
| | | |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Synchronized |
| | | @Transactional |
| | |
| | | } |
| | | |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException(JSON.toJSONString(good) + "商品同步失败"); |
| | | throw new CoolException(good.getBarCode() + "商品同步失败"); |
| | | } else { |
| | | int state = 1; |
| | | if (!erpService.updateStateForGoods(good.getBarCode(), state)) { |
| | | throw new CoolException(good.getBarCode() + "商品修改State为"+state+"失败"); |
| | | } |
| | | } |
| | | } |
| | | } |