| | |
| | | |
| | | select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd from c_orders co,c_business cb where co.o_id = cb.o_id |
| | | and cb.business_type_cd in ('110100030001','110100040001','110100050001','111100030001','111100050001') |
| | | and cb.status_cd <> 'C1' |
| | | and cb.status_cd = 'C' |
| | | |
| | | ]]> |
| | | </select> |
| | |
| | | |
| | | select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd from c_orders co,c_business cb where co.o_id = cb.o_id |
| | | and cb.business_type_cd in ('200200030001','200200040001','200200050001') |
| | | and cb.status_cd <> 'C1' |
| | | and cb.status_cd = 'C' |
| | | |
| | | ]]> |
| | | </select> |
| | |
| | | |
| | | select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd from c_orders co,c_business cb where co.o_id = cb.o_id |
| | | and cb.business_type_cd in ('240200040001','240200050001') |
| | | and cb.status_cd <> 'C1' |
| | | and cb.status_cd = 'C' |
| | | |
| | | ]]> |
| | | </select> |
| | | |
| | | <update id="updateBusinessStatusCd" parameterType="Map" > |
| | | <select id="queryOrderByBusinessType" parameterType="map" resultType="map"> |
| | | select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd |
| | | from c_orders co,c_business cb |
| | | where co.o_id = cb.o_id |
| | | and cb.status_cd = 'C' |
| | | <if test="businessTypeCds !=null"> |
| | | and cb.business_type_cd in |
| | | <foreach collection="businessTypeCds" item="item" index="index" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <update id="updateBusinessStatusCd" parameterType="Map"> |
| | | update c_business cb set cb.status_cd = 'C1' |
| | | where cb.b_id = #{bId} |
| | | </update> |
| | |
| | | <!-- querySameOrderBusiness 查询同订单 订单项 --> |
| | | <select id="querySameOrderBusiness" parameterType="map" resultType="map"> |
| | | |
| | | SELECT |
| | | cb1.b_id bId, |
| | | cb1.o_id oId, |
| | | cb1.create_time createTime, |
| | | cb1.business_type_cd businessTypeCd, |
| | | cb1.finish_time finishTime, |
| | | cb1.status_cd statusCd |
| | | FROM |
| | | c_business cb1 |
| | | <if test="bId != null and bId != ''"> |
| | | ,c_business cb2 |
| | | </if> |
| | | WHERE |
| | | 1=1 |
| | | <if test="bId != null and bId != ''"> |
| | | and cb1.o_id = cb2.o_id |
| | | AND cb2.b_id = #{bId} |
| | | </if> |
| | | <if test="oId != null and oId != ''"> |
| | | and cb1.o_id = #{oId} |
| | | </if> |
| | | <if test="businessTypeCd != null and businessTypeCd != ''"> |
| | | and cb1.business_type_cd = #{businessTypeCd} |
| | | </if> |
| | | SELECT |
| | | cb1.b_id bId, |
| | | cb1.o_id oId, |
| | | cb1.create_time createTime, |
| | | cb1.business_type_cd businessTypeCd, |
| | | cb1.finish_time finishTime, |
| | | cb1.status_cd statusCd |
| | | FROM |
| | | c_business cb1 |
| | | <if test="bId != null and bId != ''"> |
| | | ,c_business cb2 |
| | | </if> |
| | | WHERE |
| | | 1=1 |
| | | <if test="bId != null and bId != ''"> |
| | | and cb1.o_id = cb2.o_id |
| | | AND cb2.b_id = #{bId} |
| | | </if> |
| | | <if test="oId != null and oId != ''"> |
| | | and cb1.o_id = #{oId} |
| | | </if> |
| | | <if test="businessTypeCd != null and businessTypeCd != ''"> |
| | | and cb1.business_type_cd = #{businessTypeCd} |
| | | </if> |
| | | |
| | | |
| | | </select> |