自动化立体仓库 - WMS系统
zc
2024-11-01 797fce4ad48f7b70dc08766068b64f35ee9d4775
Merge remote-tracking branch 'origin/xgmFlasrs2' into xgmFlasrs2
4个文件已修改
33 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/ThreadPoolConfig.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/third/erp/task/ERPOutHedTBScheduler.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -214,6 +214,24 @@
        // 获取单据
        Order order = orderService.selectByNo(orderNo);
        if (order == null) {
            int i = 30;
            while (i >= 0) {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                order = orderService.selectByNo(orderNo);
                if (order != null) {
                    break;
                }
                i--;
            }
        }
        if (order == null) {
            return R.parse("单据不存在:" + orderNo);
        }
        // 获取单据明细
        List<OrderDetl> orderDetlList = orderDetlService.selectByOrderId(order.getId());
@@ -287,6 +305,8 @@
        }
        return R.ok("出库成功");
    }
    @Override
    @Transactional
@@ -679,12 +699,12 @@
    @Override
    @Transactional
    public void syncMat(MatSyncParam param) {
        if (Cools.isEmpty(param.getMatDetails()) || param.getMatDetails().size() <=0 ) {
        if (Cools.isEmpty(param.getMatDetails()) || param.getMatDetails().size() <= 0) {
            throw new CoolException("商品数据为空");
        }
        for(MatSyncParam.MatParam matParam : param.getMatDetails()){
            if(Cools.isEmpty(matParam.getMatnr())){
        for (MatSyncParam.MatParam matParam : param.getMatDetails()) {
            if (Cools.isEmpty(matParam.getMatnr())) {
                throw new CoolException("商品编码不能为空");
            }
@@ -777,7 +797,7 @@
                }
            } else {
                mat.sync(param);
                if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr",matParam.getMatnr()))) {
                if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr", matParam.getMatnr()))) {
                    throw new CoolException("更新已存在商品信息失败,请联系管理员");
                }
            }
src/main/java/com/zy/common/config/ThreadPoolConfig.java
@@ -33,4 +33,5 @@
        return executor;
    }
}
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;
@@ -36,6 +37,7 @@
    //@Transactional(rollbackFor = Throwable.class)
    @Scheduled(cron = "${erp.refreshtime}")
    @Async("orderThreadPool")
    public void OutHedTBScheduler() {
        //log.info("OutHedTBScheduler开始了");
        if (!erpEnabled) return;
src/main/resources/application.yml
@@ -106,7 +106,7 @@
  enabled: true
  #enabled: false
  #查看ERP中间表间隔
  refreshtime: 0 0/1 * * * ?
  refreshtime: 0/5 * * * * ?
  db:
    driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://192.168.1.147:1800;databasename=XDLinkLK