skyouc
1 天以前 35f92fe6b383057a576fd31c1efe29d735b61215
跑库程序修改
12个文件已修改
130 ■■■■ 已修改文件
rsf-admin/.env 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-open-api/src/main/resources/application-dev.yml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-open-api/src/main/resources/application-prod.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-open-api/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/common/config/MybatisPlusConfig.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/AutoRunSchedules.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/SerialRule.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/resources/application-dev.yml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/resources/application-prod.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/.env
@@ -1,3 +1,3 @@
VITE_BASE_IP=127.0.0.1
# VITE_BASE_IP=47.76.147.249
VITE_BASE_PORT=8080
VITE_BASE_PORT=8085
rsf-open-api/src/main/resources/application-dev.yml
@@ -14,10 +14,10 @@
#    url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    username: rsf
    username: root
#    url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    password: 34821015
    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    password: xltys1995
    url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    password: 34821015
#    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    password: xltys1995
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 5
@@ -58,11 +58,11 @@
  #RCS链接
  rcs:
    #链接
    host: http://10.10.10.200
    host: http://127.0.0.1
    #端口
    port: 8088
  wms:
    #链接
    host: http://10.10.10.157
    host: http://127.0.0.1
    #端口
    port: 8080
    port: 8081
rsf-open-api/src/main/resources/application-prod.yml
@@ -77,6 +77,6 @@
      port: 8088
    wms:
      #链接
      host: http://10.10.10.200
      host: http://127.0.0.1
      #端口
      port: 8085
rsf-open-api/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: prod
    active: dev
mybatis-plus:
  mapper-locations: classpath:mapper/*/*.xml
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -428,7 +428,7 @@
                for (SyncLocsDto dto : dtos) {
                    Loc loc = new Loc();
                    String string = new Random().nextInt(10000000) + "";
                    Loc one = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, string));
                    Loc one = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, dto.getLocNo()));
                    if (!Objects.isNull(one)) {
                        string = new Random().nextInt(10000000) + "";
                    }
rsf-server/src/main/java/com/vincent/rsf/server/common/config/MybatisPlusConfig.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
import com.vincent.rsf.server.system.entity.User;
@@ -32,6 +33,9 @@
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        // 添加乐观锁插件
        interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
        // 多租户插件配置
        TenantLineHandler tenantLineHandler = new TenantLineHandler() {
@@ -108,5 +112,4 @@
            }
        };
    }
}
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/AutoRunSchedules.java
@@ -60,7 +60,7 @@
     * 自动生成库位明细
     */
    @Transactional(rollbackFor = Exception.class)
//    @Scheduled(cron = "0/25 * * * * ?")
    @Scheduled(cron = "0/25 * * * * ?")
    public void insertRandomMats() {
        List<Loc> list = locService.list(new LambdaQueryWrapper<Loc>().eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_F.type));
        for (Loc loc : list) {
@@ -103,7 +103,7 @@
     * @description: 自动完成盘点功能
     * @version 1.0
     */
    @Scheduled(cron = "0/35 * * * * ?")
    @Scheduled(cron = "0/25 * * * * ?")
    @Transactional(rollbackFor = Exception.class)
    public void autoCheckComplete() {
        //获取任务列表中,为盘点出库的任务
@@ -146,7 +146,7 @@
     * @description: 自动生成任务
     * @version 1.0
     */
    @Scheduled(cron = "0/25 * * * * ?")
    @Scheduled(cron = "0/5 * * * * ?")
    public void genRun() {
        Config config = configService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getFlag, GlobalConfigCode.AUTO_RUN_CHECK_ORDERS));
        if (!Boolean.parseBoolean(config.getVal())) {
@@ -155,7 +155,7 @@
        //获取任务列表中,为盘点出库的任务
        List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>()
                .in(Task::getTaskType, Arrays.asList(TaskType.TASK_TYPE_CHECK_OUT.type, TaskType.TASK_TYPE_CHECK_IN.type)));
        if (tasks.size() >= 6) {
        if (tasks.size() >= 30) {
            return;
        }
        String autoRunArea = configService.getVal("AUTO_RUN_AREA", String.class);
@@ -238,7 +238,7 @@
//        // 出库,需要校验工作档是否存在,存在就说明站点处于忙碌状态
//        this.runLocToSta(locGroupList, staGroupList, staTaskMemo);
//        // 移库
//        // 移库locGroupList
//        this.runLocToLoc(locGroupList, staTaskMemo);
    }
@@ -265,14 +265,56 @@
    }
    /**
     * 生成移库任务
     * @param
     * @param
     */
    // 移库
    private void runLocToLoc(List<Integer> locGroupList, String staTaskMemo) {
    @Scheduled(cron = "0/7 * * * * ?")
    @Transactional(rollbackFor = Exception.class)
    public void runLocToLoc() {
        Config config = configService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getFlag, GlobalConfigCode.AUTO_RUN_CHECK_ORDERS));
        if (!Boolean.parseBoolean(config.getVal())) {
            return;
        }
        List<Integer> locGroupList = new ArrayList<>();
        //获取任务列表中,为盘点出库的任务
        List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>()
                .eq(Task::getTaskType, TaskType.TASK_TYPE_LOC_MOVE.type));
        if (!tasks.isEmpty() && tasks.size() >= 10) {
            return;
        }
        String autoRunArea = configService.getVal("AUTO_RUN_AREA", String.class);
        if (Cools.isEmpty(autoRunArea)) {
            return;
        }
        for (char c : autoRunArea.toCharArray()) {
            switch (c) {
                case '1':
                    locGroupList = LocGroupConstant.FAR_RIGHT_LOC_ROW_LIST;
                    break;
                case '2':
                    locGroupList = LocGroupConstant.RIGHT_LOC_ROW_LIST;
                    break;
                case '3':
                    locGroupList = LocGroupConstant.MIDDLE_LOC_ROW_LIST;
                    break;
                case '4':
                    locGroupList = LocGroupConstant.LEFT_LOC_ROW_LIST;
                    break;
                case '5':
                    locGroupList = LocGroupConstant.FAR_LEFT_LOC_ROW_LIST;
                    break;
                default:
                    break;
            }
        }
        Integer startRow = Collections.min(locGroupList);
        Integer endRow = Collections.max(locGroupList);
        String memo = "DEMO_LOC_" + startRow + "-" + endRow;
        // STOCK
        LambdaQueryWrapper<Loc> stockWrapper = new LambdaQueryWrapper<Loc>().eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_F.type);
        if (null != startRow) {
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java
@@ -364,16 +364,22 @@
        //主参数
        taskParams.setBatch(task.getBarcode());
        BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, task.getTargSite()));
        if (Objects.isNull(station)) {
            throw new CoolException("站点不存在!!");
        BasStation station = null;
        if (!task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type)) {
             station = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, task.getTargSite()));
            if (Objects.isNull(station)) {
                throw new CoolException("站点不存在!!");
            }
        }
        /**判断是否光电站点,非光店站点需管控站点状态*/
        if (station.getType().equals(StationTypeEnum.STATION_TYPE_NORMAL.type)) {
        if (!Objects.isNull(station) && station.getType().equals(StationTypeEnum.STATION_TYPE_NORMAL.type)) {
            if (task.getTaskType() <= TaskType.TASK_TYPE_CHECK_IN.type && !task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type)) {
                if (!station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type)) {
                    throw new CoolException("当前站点不是F.在库状态状态!!");
                }
//                if (!station.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type)) {
//                    throw new CoolException( "当前站点不是F.在库状态状态!!");
//                }
                station.setUseStatus(LocStsType.LOC_STS_TYPE_R.type);
                if (!basStationService.updateById(station)) {
                    throw new CoolException("站点状态更新失败!!");
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/SerialRule.java
@@ -1,6 +1,7 @@
package com.vincent.rsf.server.system.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -12,10 +13,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -131,6 +129,9 @@
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    @Version
    private Integer sVersion;
    /**
     * 备注
     */
rsf-server/src/main/resources/application-dev.yml
@@ -1,5 +1,5 @@
server:
  port: 8080
  port: 8085
  servlet:
    context-path: /@pom.artifactId@
spring:
@@ -14,10 +14,10 @@
#    url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    username: rsf
    username: root
#    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    password: xltys1995
    url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    password: 34821015
    url: jdbc:mysql://10.10.10.200:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    password: xltys1995
#    url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    password: 34821015
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 5
rsf-server/src/main/resources/application-prod.yml
@@ -74,7 +74,7 @@
    #企业ERP平台
    erp:
      #localhost
      host: http://10.10.10.200
      host: http://127.0.0.1
      #端口号
      port: 8085
      #接品链接前缀
@@ -85,6 +85,6 @@
        notify-inspect: /report/inspect
    rcs:
      #链接
      host: http://10.10.10.200
      host: http://127.0.0.1
      #端口
      port: 8081
rsf-server/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: prod
    active: dev
config:
  system-name: @pom.artifactId@