自动化立体仓库 - WMS系统
zc
2024-11-01 797fce4ad48f7b70dc08766068b64f35ee9d4775
src/main/java/com/zy/third/erp/task/ERPOutHedTBScheduler.java
@@ -7,6 +7,7 @@
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;
@@ -34,8 +35,9 @@
    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;
@@ -57,9 +59,11 @@
                    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);
//
                }
            }
        }