java110
2020-06-07 a8c5ab7f20c29589d06bfcda09929d3294d4e4cf
java110-db/src/main/resources/mapper/center/CenterServiceDAOImplMapper.xml
@@ -198,24 +198,48 @@
    </select>
    <!---->
    <select id="queryOwenrOrders" parameterType="map">
    <select id="queryOwenrOrders" parameterType="map" resultType="map">
        <![CDATA[
                    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')
                    and cb.status_cd <> 'C1'
                    and cb.business_type_cd in ('110100030001','110100040001','110100050001','111100030001','111100050001')
                    and cb.status_cd = 'C'
        ]]>
    </select>
    <select id="queryManchineOrders" parameterType="map">
    <select id="queryManchineOrders" parameterType="map" resultType="map">
        <![CDATA[
                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>
    <!-- 240200030001', -->
    <select id="queryApplicationKeyOrders" parameterType="map" resultType="map">
        <![CDATA[
                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 = 'C'
        ]]>
    </select>
    <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">
@@ -224,4 +248,35 @@
    </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>
</mapper>