自动化立体仓库 - WMS系统
pang.jiabao
16 小时以前 0aecb1b1d0164f092e258422162d3e29d9c65938
src/main/java/com/zy/third/erp/task/ERPOutHedTBScheduler.java
@@ -7,7 +7,6 @@
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;
@@ -37,7 +36,7 @@
    //@Transactional(rollbackFor = Throwable.class)
    @Scheduled(cron = "${erp.refreshtime}")
    @Async("orderThreadPool")
//    @Async("orderThreadPool")
    public void OutHedTBScheduler() {
        //log.info("OutHedTBScheduler开始了");
        if (!erpEnabled) return;
@@ -54,6 +53,9 @@
                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);
@@ -69,12 +71,11 @@
        }
    }
    @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) {