box_ix->box_id
This commit is contained in:
parent
726ad4e506
commit
62fdcdce89
|
|
@ -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
|
||||
|
|
@ -169,7 +169,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
|
||||
|
|
@ -222,14 +222,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>
|
||||
|
||||
|
|
@ -257,7 +257,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
|
||||
|
|
@ -266,7 +266,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>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue