1.新增 product_id和 product_name 字段

2.穿梭车线程注入回传表server
This commit is contained in:
zgw
2025-12-18 16:38:55 +08:00
parent d8412ac3cc
commit ccd7d95206
4 changed files with 34 additions and 7 deletions

View File

@@ -91,4 +91,12 @@ public class MydoJob extends BaseEntity
private String inOut; private String inOut;
private String theFloor; private String theFloor;
/** 物料编码 */
@Excel(name = "物料编码")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
private String productName;
} }

View File

@@ -71,6 +71,11 @@ public class ScheduleThread {
plcReadInit(); plcReadInit();
//调度初始化 //调度初始化
scheduleInit(); scheduleInit();
startAllThread();
startAllThread2();
log.info("调度服务执行成功"); log.info("调度服务执行成功");
} }
/** /**

View File

@@ -84,6 +84,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
wcsSrgvMapService = SpringUtils.getBean(IWcsSrgvMapService.class); wcsSrgvMapService = SpringUtils.getBean(IWcsSrgvMapService.class);
roadCacheService = SpringUtils.getBean(RoadCacheService.class); roadCacheService = SpringUtils.getBean(RoadCacheService.class);
deviceSrgvService = SpringUtils.getBean(DeviceSrgvServiceImpl.class); deviceSrgvService = SpringUtils.getBean(DeviceSrgvServiceImpl.class);
jobCallBackService=SpringUtils.getBean(JobCallBackServiceImpl.class);
} }
@Override @Override
@@ -242,7 +243,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
resQueue(deviceSrgv); resQueue(deviceSrgv);
// 小车完成队列 // 小车完成队列
completeCarTask(deviceSrgv); // completeCarTask(deviceSrgv);
//小车发送任务 //小车发送任务
sendTask(deviceSrgv); sendTask(deviceSrgv);

View File

@@ -23,13 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseId" column="warehouse_id" /> <result property="warehouseId" column="warehouse_id" />
<result property="faultFlag" column="fault_flag" /> <result property="faultFlag" column="fault_flag" />
<result property="theFloor" column="the_floor" /> <result property="theFloor" column="the_floor" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
</resultMap> </resultMap>
<sql id="selectMydoJobVo"> <sql id="selectMydoJobVo">
select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor from mydo_job_wcs select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor,product_id,product_name from mydo_job_wcs
</sql> </sql>
<sql id="selectMydoJobFinishVo"> <sql id="selectMydoJobFinishVo">
select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor from mydo_job_wcs_finish select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor,product_id,product_name from mydo_job_wcs_finish
</sql> </sql>
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult"> <select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
@@ -51,7 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if> <if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if> <if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
<if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if> <if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
</where> </where>
</select> </select>
@@ -82,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)} )}
</select> </select>
<select id="selectMydoJobByExitList" resultMap="MydoJobResult"> <select id="selectMydoJobByExitList" resultMap="MydoJobResult">
select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor from mydo_job_wcs select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor,product_id,product_name from mydo_job_wcs
where exit_id in where exit_id in
<foreach item="item" index="index" collection="exitList" separator="," open="(" close=")"> <foreach item="item" index="index" collection="exitList" separator="," open="(" close=")">
#{item} #{item}
@@ -113,6 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id,</if> <if test="warehouseId != null">warehouse_id,</if>
<if test="faultFlag != null">fault_flag,</if> <if test="faultFlag != null">fault_flag,</if>
<if test="theFloor != null">the_floor,</if> <if test="theFloor != null">the_floor,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jobId != null">#{jobId},</if> <if test="jobId != null">#{jobId},</if>
@@ -133,6 +138,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">#{warehouseId},</if> <if test="warehouseId != null">#{warehouseId},</if>
<if test="faultFlag != null">#{faultFlag},</if> <if test="faultFlag != null">#{faultFlag},</if>
<if test="theFloor != null">#{theFloor},</if> <if test="theFloor != null">#{theFloor},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertHistory"> <insert id="insertHistory">
@@ -160,6 +167,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if> <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="faultFlag != null">fault_flag = #{faultFlag},</if> <if test="faultFlag != null">fault_flag = #{faultFlag},</if>
<if test="theFloor != null">the_floor = #{theFloor},</if> <if test="theFloor != null">the_floor = #{theFloor},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="productName != null">product_name = #{productName},</if>
</trim> </trim>
where job_id = #{jobId} where job_id = #{jobId}
</update> </update>
@@ -197,10 +206,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if> <if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if> <if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
<if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if> <if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
</where> </where>
</select> </select>
<select id="selectMydoJobByEntranceList" resultMap="MydoJobResult"> <select id="selectMydoJobByEntranceList" resultMap="MydoJobResult">
select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor from mydo_job_wcs select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor,product_id,product_name from mydo_job_wcs
where entrance_id in where entrance_id in
<foreach item="item" index="index" collection="entranceList" separator="," open="(" close=")"> <foreach item="item" index="index" collection="entranceList" separator="," open="(" close=")">
#{item} #{item}
@@ -227,10 +238,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if> <if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if> <if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
<if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if> <if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
</where> </where>
</select> </select>
<select id="selectRunningMydoJobByExitList" resultMap="MydoJobResult"> <select id="selectRunningMydoJobByExitList" resultMap="MydoJobResult">
select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor from mydo_job_wcs select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,the_floor,product_id,product_name from mydo_job_wcs
where exit_id in where exit_id in
<foreach item="item" index="index" collection="exitList" separator="," open="(" close=")"> <foreach item="item" index="index" collection="exitList" separator="," open="(" close=")">
#{item} #{item}