Browse Source

feat: 定时同步物料

master
李永德 1 year ago
parent
commit
16155f87ca
  1. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java
  2. 25
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/autotask/AutoSynMaterialInfo.java
  3. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java
  4. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TreePrinter.java
  5. 3
      lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml

2
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";
}

25
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();
}
}

5
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;

2
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);

3
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

Loading…
Cancel
Save