From 16155f87caaebbcbca503b9aa5779b5b4351cd84 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Fri, 20 Oct 2023 11:21:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9A=E6=97=B6=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/config/lucene/LogMessageConstant.java | 2 +- .../ext/mes/autotask/AutoSynMaterialInfo.java | 25 +++++++++++++++++++ .../mes/service/impl/WmsToMesServiceImpl.java | 5 ---- .../java/org/nl/wms/util/TreePrinter.java | 2 +- .../src/main/resources/config/application.yml | 3 ++- 5 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/autotask/AutoSynMaterialInfo.java diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java index e1a03e7..68ca638 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java @@ -42,6 +42,6 @@ public class LogMessageConstant { public final static String BACKGROUND_YELLOW = "\u001B[43m"; /** 索引路径 */ - public final static String INDEX_DIR = "E:\\lucene\\index"; + public final static String INDEX_DIR = "D:\\lucene\\index"; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/autotask/AutoSynMaterialInfo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/autotask/AutoSynMaterialInfo.java new file mode 100644 index 0000000..c39b48b --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/autotask/AutoSynMaterialInfo.java @@ -0,0 +1,25 @@ +package org.nl.wms.ext.mes.autotask; + +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.nl.wms.ext.mes.service.WmsToMesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +/** + * @Author: lyd + * @Description: 自动同步物料 + * @Date: 2023/10/20 + */ +@Slf4j +@Component +@Order(value = 1) +public class AutoSynMaterialInfo { + @Autowired + private WmsToMesService wmsToMesService; + @SneakyThrows + public void run() { + wmsToMesService.synchronizeMaterialInfo(); + } +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java index 109194b..d903334 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; -import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.extern.slf4j.Slf4j; @@ -12,13 +11,9 @@ import org.nl.system.service.notice.ISysNoticeService; import org.nl.wms.database.brick.service.dao.MdBaseBrickInfo; import org.nl.wms.database.material.service.IMdBaseMaterialService; import org.nl.wms.database.material.service.dao.MdBaseMaterial; -import org.nl.wms.ext.acs.service.dto.BrickInfoDto; -import org.nl.wms.ext.mes.autotask.AutoSaveWaitGdyInfo; import org.nl.wms.ext.mes.service.WmsToMesService; import org.nl.wms.ext.mes.service.dao.mapper.MesRequestMapper; import org.nl.wms.ext.mes.service.dto.*; -import org.nl.wms.ext.record.service.ISysInteractRecordService; -import org.nl.wms.pdm.consumption.service.dao.mapper.PdmBdMudConsumptionMapper; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TreePrinter.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TreePrinter.java index d24bbb8..331ba15 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TreePrinter.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TreePrinter.java @@ -10,7 +10,7 @@ import java.io.File; public class TreePrinter { public static void main(String[] args) { // 指定文件夹的路径 - String folderPath = "D:\\Code\\Work\\rl_mg\\lms\\nladmin-system\\nlsso-server\\src\\main\\java\\org\\nl\\wms"; + String folderPath = "D:\\Code\\Work\\rl_mg\\acs\\nladmin-system\\src\\main\\java\\org\\nl\\acs\\device_driver"; // 调用递归方法获取文件树并打印 File folder = new File(folderPath); diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml index a37104c..bbaafa7 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml @@ -42,7 +42,7 @@ spring: freemarker: check-template-location: false profiles: - active: prod + active: dev jackson: time-zone: GMT+8 data: @@ -122,6 +122,7 @@ security: mybatis-plus: configuration: map-underscore-to-camel-case: false + jdbc-type-for-null: null # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl mapper-locations: - classpath:org.nl.**.mapper/*.xml