手环管理

This commit is contained in:
jjLv 2024-08-13 17:44:32 +08:00
parent 1597f0ff51
commit 458d517fd7
1 changed files with 13 additions and 13 deletions

View File

@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select tb.id as shId,tb.sh_code as shCode,sh_status as shStatus,tsb.box_name as shboxName,
tsb.box_code as shboxCode,tb.peopel_type as shPersonType,tb.bid_id as shPersonId,tsb.id as shboxId
from tb_bracelet tb
left join tb_sh_box tsb on tb.box_ix = tsb.id and tsb.del_flag = 0
left join tb_sh_box tsb on tb.box_id = tsb.id and tsb.del_flag = 0
where tb.del_flag = 0
<if test="shCode != null and shCode!=''">
AND INSTR(tb.sh_code,#{shCode}) > 0
@ -27,10 +27,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--手环箱绑定手环列表-->
<select id="getShBindLists" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
select id as shId,sh_code as shCode,box_ix as shboxId,bid_id as shPersonId,
select id as shId,sh_code as shCode,box_id as shboxId,bid_id as shPersonId,
peopel_type as shPersonType,sh_status as shStatus
from tb_bracelet tb
where tb.del_flag = 0 and tb.box_ix = #{shboxId}
where tb.del_flag = 0 and tb.box_id = #{shboxId}
<if test="shCode != null and shCode!=''">
AND INSTR(tb.sh_code,#{shCode}) > 0
</if>
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getShBindNoLists" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
select id as shId,sh_code as shCode
from tb_bracelet
where box_ix is NULL and del_flag = 0
where box_id is NULL and del_flag = 0
order by id ASC
</select>
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getShboxLists" resultType="com.bonus.common.entity.bracelet.vo.ShboxVo">
select tsb.id as shboxId, tsb.box_name as shboxName,tsb.box_code as shboxCode,tsb.box_capacity as shboxCapacity,count(tb.id) as shboxBindNum
from tb_sh_box tsb
left join tb_bracelet tb on tsb.id = tb.box_ix and tb.del_flag = 0
left join tb_bracelet tb on tsb.id = tb.box_id and tb.del_flag = 0
where tsb.del_flag = 0
group by tsb.id
order by tsb.id ASC
@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tsb.box_capacity as shboxCapacity,twt.team_leader as lyName
from tb_sh_box tsb
left join t_work_team twt on tsb.team_id = twt.team_id and twt.del_flag = 0
left join tb_bracelet tb on tsb.id = tb.box_ix and tb.del_flag = 0
left join tb_bracelet tb on tsb.id = tb.box_id and tb.del_flag = 0
where tsb.del_flag = 0
<if test="shboxName != null and shboxName!=''">
AND INSTR(tsb.box_name,#{shboxName}) > 0
@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getShboxBindLists" resultType="com.bonus.common.entity.bracelet.vo.ShboxVo">
select tsb.id as shboxId, tsb.box_name as shboxName,tsb.box_code as shboxCode,tsb.box_capacity as shboxCapacity,count(tb.id) as shboxBindNum
from tb_sh_box tsb
left join tb_bracelet tb on tsb.id = tb.box_ix and tb.del_flag = 0
left join tb_bracelet tb on tsb.id = tb.box_id and tb.del_flag = 0
where tsb.del_flag = 0
<if test="keyword != null and keyword!=''">
AND (INSTR(tsb.box_name,#{keyword}) > 0 or
@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateSh">
UPDATE tb_bracelet tb
set
box_ix = #{shboxId},
box_id = #{shboxId},
sh_status = #{shStatus},sh_code = #{shCode}
where id = #{shId}
</update>
@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--新增手环信息-->
<insert id="addSh" parameterType="com.bonus.common.entity.bracelet.vo.ShboxVo" >
insert into tb_bracelet(
<if test="shboxId != null">box_ix,</if>
<if test="shboxId != null">box_id,</if>
<if test="shCode != null and shCode != ''">sh_code,</if>
<if test="shStatus != null ">sh_status,</if>
del_flag
@ -259,14 +259,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--手环绑定选择页面绑定手环信息-->
<update id="addShBind">
UPDATE tb_bracelet
SET box_ix = #{shboxId},bid_time = now(),sh_status = 0
SET box_id = #{shboxId},bid_time = now(),sh_status = 0
where id = #{shId}
</update>
<!--解除绑定-->
<update id="delSh">
UPDATE tb_bracelet
SET box_ix = null,sh_status = 1
SET box_id = null,sh_status = 1
where id = #{shId}
</update>
@ -294,7 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBoxNewById" parameterType="int" resultType="com.bonus.common.entity.bracelet.vo.ShboxVo">
select tsb.id as shboxId, tsb.box_name as shboxName,tsb.box_code as shboxCode,tsb.box_capacity as shboxCapacity,count(tb.id) as shboxBindNum
from tb_sh_box tsb
left join tb_bracelet tb on tsb.id = tb.box_ix and tb.del_flag = 0
left join tb_bracelet tb on tsb.id = tb.box_id and tb.del_flag = 0
where tsb.del_flag = 0 and tsb.id = #{shboxId}
group by tsb.id
order by tsb.id ASC
@ -303,7 +303,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--绑定-->
<update id="bindSh">
UPDATE tb_bracelet
SET box_ix = #{shboxId},sh_status = 0
SET box_id = #{shboxId},sh_status = 0
where id = #{shId}
</update>