| | |
| | | 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; |
| | |
| | | |
| | | //@Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | @Async("orderThreadPool") |
| | | // @Async("orderThreadPool") |
| | | public void OutHedTBScheduler() { |
| | | //log.info("OutHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | |
| | | HashMap<String, Object> hedAndDet = new HashMap<>(); |
| | | hedAndDet.put("hed", inHed); |
| | | hedAndDet.put("det", inDetTBS); |
| | | if (inDetTBS == null || inDetTBS.isEmpty()) { |
| | | continue; |
| | | } |
| | | try { |
| | | inMS.createOutOrder(inHed, inDetTBS); |
| | | log.info("出库单据成功,{}", inHed); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public void OutHedTBScheduler(String orderNo) { |
| | | //log.info("OutHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期' and BillNo = '"+ orderNo +"'"; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期' and BillNo = '" + orderNo + "'"; |
| | | List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (OutHedTB inHed : inHeds) { |