现场调度修改

This commit is contained in:
liuhanqing
2026-03-02 08:40:01 +08:00
parent 9c6c32b7ed
commit 03e30d1db0
23 changed files with 668 additions and 1114 deletions

View File

@@ -6,9 +6,9 @@ spring:
druid:
#主数据信息
master:
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT546-WCS;
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT546-wcs;
username: sa
password: 123456
password: Flrd0914.
# 从库数据源
slave:
# 从数据源开关/默认关闭

View File

@@ -34,7 +34,7 @@ server:
# 日志配置
logging:
level:
com.ruoyi: debug
com.ruoyi: info
org.springframework: warn
# 用户配置
@@ -64,7 +64,7 @@ spring:
devtools:
restart:
# 热部署开关
enabled: true
enabled: false
# redis 配置
redis:
# 地址

View File

@@ -25,13 +25,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="theFloor" column="the_floor" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="trayCode" column="tray_code" />
</resultMap>
<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,product_id,product_name 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,tray_code from mydo_job_wcs
</sql>
<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,tray_code from mydo_job_wcs_finish
</sql>
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
@@ -55,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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 = #{productName}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
</where>
</select>
@@ -118,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id,</if>
<if test="faultFlag != null">fault_flag,</if>
<if test="theFloor != null">the_floor,</if>
<if test="trayCode != null">tray_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jobId != null">#{jobId},</if>
@@ -138,6 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">#{warehouseId},</if>
<if test="faultFlag != null">#{faultFlag},</if>
<if test="theFloor != null">#{theFloor},</if>
<if test="trayCode != null">#{trayCode},</if>
</trim>
</insert>
<insert id="insertHistory">
@@ -244,4 +248,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and status = 3
order by priority desc,create_time
</select>
<select id="selectMydoJobOut" resultMap="MydoJobResult">
WITH floor_group AS (
SELECT
b.cargo_space_id,
b.group_coding_no,
b.the_floor,
b.group_coding,
a.task_no AS task_no,
a.job_id AS job_id,
a.in_or_out, -- 之前新增的字段
a.target_cargo_space_id, -- 新增字段:加入target_cargo_space_id
ROW_NUMBER() OVER (PARTITION BY b.the_floor ORDER BY b.group_coding DESC) AS rn
FROM
mydo_job_wcs a
INNER JOIN bas_cargo_space b
ON a.cargo_space_id = b.cargo_space_id
AND a.the_floor = b.the_floor
WHERE
a.in_or_out >= 20
AND a.status = '1'
GROUP BY
b.group_coding_no,
b.cargo_space_id,
b.the_floor,
b.group_coding,
a.task_no,
a.job_id,
a.create_time,
a.in_or_out, -- 之前新增的分组字段
a.target_cargo_space_id -- 分组字段中新增:必须加入GROUP BY
)
SELECT
cargo_space_id,
group_coding_no,
the_floor,
task_no,
job_id,
in_or_out, -- 之前新增的展示字段
target_cargo_space_id -- 最终查询结果中显示该字段
FROM
floor_group
WHERE
rn &lt;= 2
ORDER BY
group_coding DESC;
</select>
<select id="selectMydoJobByTrayCode" resultMap="MydoJobResult">
<include refid="selectMydoJobVo"/>
where tray_code =#{trayCode}
</select>
<select id="selectExit" parameterType="string" resultType="java.lang.Integer">
select count(1) from mydo_job_wcs where in_or_out>=20 and exit_id = #{exitId}
</select>
<select id="selectMydoJobCount" resultType="java.lang.Integer">
select count(1) from mydo_job_wcs
</select>
</mapper>

View File

@@ -121,6 +121,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<select id="selectCount" resultType="java.lang.Integer">
select count(1)
from tsj_device_execution_queue
</select>
<update id="updateTsjDeviceExecutionQueue" parameterType="TsjDeviceExecutionQueue">
update tsj_device_execution_queue
<trim prefix="SET" suffixOverrides=",">

View File

@@ -212,4 +212,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose>
</select>
<select id="selectTsj" resultType="java.lang.Integer" >
select count(1) from wcs_srgv_queue where end_site='tsj'
</select>
</mapper>