Browse Source

Merge branch 'hangche' of https://ssc.tuoren.com/lifang/tr-footstone into hangche

Lee 1 month ago
parent
commit
64ba8bb1af

+ 4 - 0
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/job/po/BizJobSchedulePO.java

@@ -2,6 +2,7 @@ package cn.tr.module.hc.job.po;
 
 import cn.tr.core.pojo.BasePO;
 import cn.tr.module.hc.mapelement.dto.AreaDTO;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -52,14 +53,17 @@ public class BizJobSchedulePO extends BasePO {
 
     /** 每日定时执行的时间点数组, 格式如 ["08:00", "14:00"] (对应: 定时执行时间点) */
     @Schema(description = "每日定时执行时间点数组, 格式如 [\"08:00\", \"14:00\"] (对应: 定时执行时间点)")
+    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
     private List<String> scheduleTimes;
 
     /** 抓料起始位点 (对应: 抓料源点) */
     @Schema(description = "抓料起始位点 (对应: 抓料源点)")
+    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
     private AreaDTO sourceLocation;
 
     /** 放料目标位点 (对应: 放料终点) */
     @Schema(description = "放料目标位点 (对应: 放料终点)")
+    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
     private AreaDTO destLocation;
 
     /** 启用状态 */

+ 2 - 0
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/job/service/impl/BizJobScheduleServiceImpl.java

@@ -1,5 +1,6 @@
 package cn.tr.module.hc.job.service.impl;
 
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -31,6 +32,7 @@ public class BizJobScheduleServiceImpl implements IBizJobScheduleService {
     private BizJobScheduleRepository baseRepository;
     
     @Resource
+    @Lazy
     private JobScheduleQuartzService jobScheduleQuartzService;
 
     /**

+ 0 - 28
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/mapelement/mapper/BizJobScheduleMapper.java

@@ -1,28 +0,0 @@
-package cn.tr.module.hc.mapelement.mapper;
-
-import cn.tr.module.hc.mapelement.po.BizJobSchedulePO;
-import cn.tr.module.hc.mapelement.dto.BizJobScheduleDTO;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * 作业调度指令表映射工具
- *
- * @author AutoGenerator
- * @date 2025-12-25
- **/
-@Mapper
-public interface BizJobScheduleMapper {
-    BizJobScheduleMapper INSTANCE = Mappers.getMapper(BizJobScheduleMapper.class);
-
-    BizJobSchedulePO convertPO(BizJobScheduleDTO source);
-
-    BizJobScheduleDTO convertDto(BizJobSchedulePO source);
-
-    List<BizJobScheduleDTO> convertDtoList(List<BizJobSchedulePO> source);
-
-    List<BizJobSchedulePO> convertPOList(List<BizJobScheduleDTO> source);
-
-}

+ 0 - 67
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/mapelement/po/BizJobSchedulePO.java

@@ -1,67 +0,0 @@
-package cn.tr.module.hc.mapelement.po;
-
-import cn.tr.plugin.mybatis.pojo.BasePO;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.ToString;
-
-import java.time.LocalDate;
-import java.util.List;
-
-/**
- * 作业调度指令表实体
- *
- * @author AutoGenerator
- * @date 2025-12-25
- **/
-@Data
-@TableName(value = "biz_job_schedule", autoResultMap = true)
-@EqualsAndHashCode(callSuper = true)
-@ToString
-public class BizJobSchedulePO extends BasePO {
-
-    /** 主键ID */
-    @TableId
-    @Schema(description = "主键ID")
-    private String id;
-
-    /** 指定行车ID (对应: 指定行车) */
-    @Schema(description = "指定行车ID (对应: 指定行车)")
-    private String craneId;
-
-    /** 作业类型: TRANSFER-转堆, FEEDING-上料 (对应: 作业类型) */
-    @Schema(description = "作业类型: TRANSFER-转堆, FEEDING-上料 (对应: 作业类型)")
-    private String jobType;
-
-    /** 任务标题 (对应: 任务标题) */
-    @Schema(description = "任务标题 (对应: 任务标题)")
-    private String jobName;
-
-    /** 任务开始执行日期 (对应: 开始日期) */
-    @Schema(description = "任务开始执行日期 (对应: 开始日期)")
-    private LocalDate startDate;
-
-    /** 任务结束执行日期 (对应: 结束日期) */
-    @Schema(description = "任务结束执行日期 (对应: 结束日期)")
-    private LocalDate endDate;
-
-    /** 每日定时执行的时间点数组, 格式如 ["08:00", "14:00"] (对应: 定时执行时间点) */
-    @Schema(description = "每日定时执行的时间点数组, 格式如 [\"08:00\", \"14:00\"] (对应: 定时执行时间点)")
-    private List<String> scheduleTimes;
-
-    /** 抓料起始位点 (对应: 抓料源点) */
-    @Schema(description = "抓料起始位点 (对应: 抓料源点)")
-    private Object sourceLocation;
-
-    /** 放料目标位点 (对应: 放料终点) */
-    @Schema(description = "放料目标位点 (对应: 放料终点)")
-    private Object destLocation;
-
-    /** 启用状态 */
-    @Schema(description = "启用状态")
-    private Integer enabled;
-
-}

+ 0 - 17
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/mapelement/repository/BizJobScheduleRepository.java

@@ -1,17 +0,0 @@
-package cn.tr.module.hc.mapelement.repository;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import java.util.*;
-import cn.tr.module.hc.mapelement.po.BizJobSchedulePO;
-
-/**
- * 作业调度指令表Mapper接口
- *
- * @author AutoGenerator
- * @date 2025-12-25
- **/
-@Mapper
-public interface BizJobScheduleRepository extends BaseMapper<BizJobSchedulePO> {
-}

+ 0 - 54
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/mapelement/service/IBizJobScheduleService.java

@@ -1,54 +0,0 @@
-package cn.tr.module.hc.mapelement.service;
-
-import cn.tr.module.hc.mapelement.dto.BizJobScheduleDTO;
-import cn.tr.module.hc.mapelement.dto.BizJobScheduleQueryDTO;
-import java.util.*;
-
-/**
- * 作业调度指令表Service接口
- *
- * @author AutoGenerator
- * @date 2025-12-25
- **/
-public interface IBizJobScheduleService {
-
-    /**
-     * 根据条件查询作业调度指令表
-     * @param    query 查询参数
-     * @author   AutoGenerator
-     * @date     2025-12-25
-     */
-    List<BizJobScheduleDTO> selectBizJobScheduleList(BizJobScheduleQueryDTO query);
-
-    /**
-     * 根据id查询作业调度指令表
-     * @param    id 主键id
-     * @author   AutoGenerator
-     * @date     2025-12-25
-     */
-    BizJobScheduleDTO selectBizJobScheduleById(String id);
-
-    /**
-     * 编辑作业调度指令表
-     * @param   source 编辑实体类
-     * @author  AutoGenerator
-     * @date    2025-12-25
-     */
-    boolean updateBizJobScheduleById(BizJobScheduleDTO source);
-
-    /**
-     * 新增作业调度指令表
-     * @param   source 新增实体类
-     * @author AutoGenerator
-     * @date 2025-12-25
-     */
-    boolean insertBizJobSchedule(BizJobScheduleDTO source);
-
-    /**
-     * 删除作业调度指令表详情
-     * @param  ids 删除主键集合
-     * @author AutoGenerator
-     * @date   2025-12-25
-     */
-    int removeBizJobScheduleByIds(Collection<String> ids);
-}

+ 0 - 122
tr-modules/tr-module-hangche/src/main/java/cn/tr/module/hc/mapelement/service/impl/BizJobScheduleServiceImpl.java

@@ -1,122 +0,0 @@
-package cn.tr.module.hc.mapelement.service.impl;
-
-import org.springframework.stereotype.Service;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.ObjectUtil;
-import org.springframework.transaction.annotation.Transactional;
-import cn.tr.core.exception.ServiceException;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import cn.tr.module.hc.mapelement.repository.BizJobScheduleRepository;
-import cn.tr.module.hc.mapelement.po.BizJobSchedulePO;
-import cn.tr.module.hc.mapelement.dto.BizJobScheduleDTO;
-import cn.tr.module.hc.mapelement.dto.BizJobScheduleQueryDTO;
-import java.util.*;
-import cn.tr.module.hc.mapelement.service.IBizJobScheduleService;
-import cn.tr.module.hc.mapelement.mapper.BizJobScheduleMapper;
-import jakarta.annotation.Resource;
-import cn.tr.core.exception.TRExcCode;
-
-/**
- * 作业调度指令表Service接口实现类
- *
- * @author AutoGenerator
- * @date 2025-12-25
- **/
-@Service
-public class BizJobScheduleServiceImpl implements IBizJobScheduleService {
-    @Resource
-    private BizJobScheduleRepository baseRepository;
-
-
-    /**
-     * 根据条件查询作业调度指令表
-     * @param    query 查询参数
-     * @author   AutoGenerator
-     * @date     2025-12-25
-     */
-    @Override
-    public List<BizJobScheduleDTO> selectBizJobScheduleList(BizJobScheduleQueryDTO query) {
-        return BizJobScheduleMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BizJobSchedulePO>()
-                        .eq(ObjectUtil.isNotEmpty(query.getId()), BizJobSchedulePO::getId, query.getId())
-                        .eq(ObjectUtil.isNotEmpty(query.getCraneId()), BizJobSchedulePO::getCraneId, query.getCraneId())
-                        .eq(ObjectUtil.isNotEmpty(query.getJobType()), BizJobSchedulePO::getJobType, query.getJobType())
-                        .like(ObjectUtil.isNotEmpty(query.getJobName()), BizJobSchedulePO::getJobName, query.getJobName())
-                        .eq(ObjectUtil.isNotEmpty(query.getStartDate()), BizJobSchedulePO::getStartDate, query.getStartDate())
-                        .eq(ObjectUtil.isNotEmpty(query.getEndDate()), BizJobSchedulePO::getEndDate, query.getEndDate())
-                        .eq(ObjectUtil.isNotEmpty(query.getEnabled()), BizJobSchedulePO::getEnabled, query.getEnabled())
-                )
-        );
-    };
-
-    /**
-     * 根据id查询作业调度指令表
-     * @param    id 主键id
-     * @author   AutoGenerator
-     * @date     2025-12-25
-     */
-    @Override
-    public BizJobScheduleDTO selectBizJobScheduleById(String id) {
-        return BizJobScheduleMapper.INSTANCE.convertDto(baseRepository.selectById(id));
-    };
-
-    /**
-     * 编辑作业调度指令表
-     * @param   source 编辑实体类
-     * @author  AutoGenerator
-     * @date    2025-12-25
-     */
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public boolean updateBizJobScheduleById(BizJobScheduleDTO source) {
-        // 检查任务标题是否重复
-        if (ObjectUtil.isNotEmpty(source.getJobName())) {
-            BizJobSchedulePO existPO = baseRepository.selectOne(new LambdaQueryWrapper<BizJobSchedulePO>()
-                    .eq(BizJobSchedulePO::getJobName, source.getJobName())
-                    .ne(BizJobSchedulePO::getId, source.getId())
-                    .last("limit 1"));
-            if (existPO != null) {
-                throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "任务标题已存在");
-            }
-        }
-
-        return baseRepository.updateById(BizJobScheduleMapper.INSTANCE.convertPO(source)) != 0;
-    };
-
-    /**
-     * 新增作业调度指令表
-     * @param   source 新增实体类
-     * @author AutoGenerator
-     * @date 2025-12-25
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean insertBizJobSchedule(BizJobScheduleDTO source) {
-        // 检查任务标题是否重复
-        if (ObjectUtil.isNotEmpty(source.getJobName())) {
-            BizJobSchedulePO existPO = baseRepository.selectOne(new LambdaQueryWrapper<BizJobSchedulePO>()
-                    .eq(BizJobSchedulePO::getJobName, source.getJobName())
-                    .last("limit 1"));
-            if (existPO != null) {
-                throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "任务标题已存在");
-            }
-        }
-
-        return baseRepository.insert(BizJobScheduleMapper.INSTANCE.convertPO(source)) != 0;
-    };
-
-    /**
-     * 删除作业调度指令表详情
-     * @param  ids 删除主键集合
-     * @author AutoGenerator
-     * @date   2025-12-25
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public int removeBizJobScheduleByIds(Collection<String> ids) {
-        if (CollectionUtil.isEmpty(ids)) {
-            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请选择要删除的数据");
-        }
-        return baseRepository.deleteByIds(ids);
-    };
-}

+ 0 - 154
tr-test/.flattened-pom.xml

@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>cn.tr</groupId>
-    <artifactId>tr-footstone</artifactId>
-    <version>2.0.0</version>
-  </parent>
-  <groupId>cn.tr</groupId>
-  <artifactId>tr-test</artifactId>
-  <version>2.0.0</version>
-  <dependencies>
-    <dependency>
-      <groupId>cn.tr</groupId>
-      <artifactId>tr-module-ai</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>cn.tr</groupId>
-      <artifactId>tr-module-system</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>cn.tr</groupId>
-      <artifactId>tr-module-platform</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-data-redis</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.springframework.boot</groupId>
-          <artifactId>spring-boot-starter-logging</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>ch.qos.logback</groupId>
-          <artifactId>logback-classic</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.logging.log4j</groupId>
-          <artifactId>log4j-to-slf4j</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.springframework.boot</groupId>
-          <artifactId>spring-boot-starter-logging</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>ch.qos.logback</groupId>
-          <artifactId>logback-classic</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.logging.log4j</groupId>
-          <artifactId>log4j-to-slf4j</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-log4j2</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.logging.log4j</groupId>
-          <artifactId>log4j-to-slf4j</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.flywaydb</groupId>
-      <artifactId>flyway-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.flywaydb</groupId>
-      <artifactId>flyway-database-postgresql</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-web</artifactId>
-    </dependency>
-  </dependencies>
-  <build>
-    <defaultGoal>compile</defaultGoal>
-    <resources>
-      <resource>
-        <filtering>true</filtering>
-        <directory>src/main/resources</directory>
-      </resource>
-    </resources>
-    <finalName>${project.name}</finalName>
-    <plugins>
-      <plugin>
-        <artifactId>maven-resources-plugin</artifactId>
-        <configuration>
-          <nonFilteredFileExtensions>
-            <nonFilteredFileExtension>p12</nonFilteredFileExtension>
-            <nonFilteredFileExtension>pem</nonFilteredFileExtension>
-            <nonFilteredFileExtension>cer</nonFilteredFileExtension>
-            <nonFilteredFileExtension>crt</nonFilteredFileExtension>
-            <nonFilteredFileExtension>key</nonFilteredFileExtension>
-          </nonFilteredFileExtensions>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>flatten-maven-plugin</artifactId>
-        <version>1.5.0</version>
-        <executions>
-          <execution>
-            <id>flatten</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>flatten</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>flatten.clean</id>
-            <phase>clean</phase>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <updatePomFile>true</updatePomFile>
-          <flattenMode>resolveCiFriendliesOnly</flattenMode>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-maven-plugin</artifactId>
-        <version>${spring-boot.version}</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>repackage</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <includeSystemScope>true</includeSystemScope>
-          <mainClass>cn.tr.test.WebApplication</mainClass>
-          <finalName>${project.build.finalName}</finalName>
-          <layers>
-            <enabled>true</enabled>
-          </layers>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>