电子标签亮灯 灭灯逻辑

This commit is contained in:
liuhanqing
2025-07-14 15:35:40 +08:00
parent 745ba9e49d
commit 96299038eb
16 changed files with 1719 additions and 5 deletions

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.bas.tag.mapper.BasTagMapper">
<resultMap type="BasTag" id="BasTagResult">
<result property="id" column="id" />
<result property="ip" column="ip" />
<result property="pickAdd" column="pick_add" />
<result property="trayCode" column="tray_code" />
<result property="curNum" column="cur_num" />
<result property="sendCompleted" column="send_completed" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectBasTagVo">
select id, ip, pick_add, tray_code, cur_num, send_completed, spare1, spare2, spare3 from bas_tag
</sql>
<select id="selectBasTagList" parameterType="BasTag" resultMap="BasTagResult">
<include refid="selectBasTagVo"/>
<where>
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
<if test="pickAdd != null and pickAdd != ''"> and pick_add = #{pickAdd}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="curNum != null and curNum != ''"> and cur_num = #{curNum}</if>
<if test="sendCompleted != null and sendCompleted != ''"> and send_completed = #{sendCompleted}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
</where>
</select>
<select id="selectBasTagById" parameterType="Long" resultMap="BasTagResult">
<include refid="selectBasTagVo"/>
where id = #{id}
</select>
<insert id="insertBasTag" parameterType="BasTag" useGeneratedKeys="true" keyProperty="id">
insert into bas_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ip != null">ip,</if>
<if test="pickAdd != null">pick_add,</if>
<if test="trayCode != null">tray_code,</if>
<if test="curNum != null">cur_num,</if>
<if test="sendCompleted != null">send_completed,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ip != null">#{ip},</if>
<if test="pickAdd != null">#{pickAdd},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="curNum != null">#{curNum},</if>
<if test="sendCompleted != null">#{sendCompleted},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateBasTag" parameterType="BasTag">
update bas_tag
<trim prefix="SET" suffixOverrides=",">
<if test="ip != null">ip = #{ip},</if>
<if test="pickAdd != null">pick_add = #{pickAdd},</if>
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="curNum != null">cur_num = #{curNum},</if>
<if test="sendCompleted != null">send_completed = #{sendCompleted},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBasTagById" parameterType="Long">
delete from bas_tag where id = #{id}
</delete>
<delete id="deleteBasTagByIds" parameterType="String">
delete from bas_tag where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.out.tagTask.mapper.TagTaskMapper">
<resultMap type="TagTask" id="TagTaskResult">
<result property="id" column="id" />
<result property="tagId" column="tag_id" />
<result property="jobDetailId" column="job_detail_id" />
<result property="productId" column="product_id" />
<result property="num" column="num" />
<result property="status" column="status" />
<result property="color" column="color" />
<result property="floor" column="floor" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectTagTaskVo">
select id, tag_id, job_detail_id, product_id, num, status, color, floor, spare1, spare2, spare3 from tag_task
</sql>
<select id="selectTagTaskList" parameterType="TagTask" resultMap="TagTaskResult">
<include refid="selectTagTaskVo"/>
<where>
<if test="tagId != null "> and tag_id = #{tagId}</if>
<if test="jobDetailId != null and jobDetailId != ''"> and job_detail_id = #{jobDetailId}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="num != null and num != ''"> and num = #{num}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="color != null and color != ''"> and color = #{color}</if>
<if test="floor != null and floor != ''"> and floor = #{floor}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
</where>
</select>
<select id="selectTagTaskById" parameterType="Long" resultMap="TagTaskResult">
<include refid="selectTagTaskVo"/>
where id = #{id}
</select>
<insert id="insertTagTask" parameterType="TagTask" useGeneratedKeys="true" keyProperty="id">
insert into tag_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tagId != null">tag_id,</if>
<if test="jobDetailId != null">job_detail_id,</if>
<if test="productId != null">product_id,</if>
<if test="num != null">num,</if>
<if test="status != null">status,</if>
<if test="color != null">color,</if>
<if test="floor != null">floor,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tagId != null">#{tagId},</if>
<if test="jobDetailId != null">#{jobDetailId},</if>
<if test="productId != null">#{productId},</if>
<if test="num != null">#{num},</if>
<if test="status != null">#{status},</if>
<if test="color != null">#{color},</if>
<if test="floor != null">#{floor},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateTagTask" parameterType="TagTask">
update tag_task
<trim prefix="SET" suffixOverrides=",">
<if test="tagId != null">tag_id = #{tagId},</if>
<if test="jobDetailId != null">job_detail_id = #{jobDetailId},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="num != null">num = #{num},</if>
<if test="status != null">status = #{status},</if>
<if test="color != null">color = #{color},</if>
<if test="floor != null">floor = #{floor},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTagTaskById" parameterType="Long">
delete from tag_task where id = #{id}
</delete>
<delete id="deleteTagTaskByIds" parameterType="String">
delete from tag_task where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>