| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | //@Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | @Async("orderThreadPool") |
| | | public void OutHedTBScheduler() { |
| | | //log.info("OutHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | |
| | | log.info("出库单据成功,{}", inHed); |
| | | move(hedAndDet); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.info(e.getMessage()); |
| | | // e.printStackTrace(); |
| | | String sql = "UPDATE erp_OutHedTB SET Temp3 = 'fault' WHERE BillNo = '" + inHed.getBillNo() + "'"; |
| | | erpSqlServer.update(sql); |
| | | // |
| | | } |
| | | } |
| | | } |