3/7 order相关增加索引 1.0

dev_2.5_ocean
wangwei 4 months ago
parent 1696972fdb
commit c4ef1e321c

@ -51,33 +51,34 @@
INNER JOIN io_unit_maintain_platform a2 on io.action = a2.sourceAction AND io.fromCorp = a2.unitId INNER JOIN io_unit_maintain_platform a2 on io.action = a2.sourceAction AND io.fromCorp = a2.unitId
</if> </if>
<where> <where>
<if test="billNo != null and billNo != ''">
AND io.billNo like concat(#{billNo}, '%')
</if>
<if test="action != null and action != ''">
AND io.action = #{action}
</if>
<if test="invCode != null and invCode != ''">
AND io.invCode = #{invCode}
</if>
<if test="productType != null and productType != ''">
AND io.productType = #{productType}
</if>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
AND id = #{id} AND id = #{id}
</if> </if>
<if test="updateUser != null and updateUser != ''"> <if test="updateUser != null and updateUser != ''">
AND io.updateUser = #{updateUser} AND io.updateUser = #{updateUser}
</if> </if>
<if test="productType != null and productType != ''">
AND io.productType = #{productType}
</if>
<if test="corpName != null and corpName != ''"> <if test="corpName != null and corpName != ''">
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
concat('%', #{corpName}, '%') concat('%', #{corpName}, '%')
</if> </if>
<if test="action != null and action != ''">
AND io.action = #{action}
</if>
<if test="remark != null and remark != ''"> <if test="remark != null and remark != ''">
AND io.remark like concat('%', #{remark}, '%') AND io.remark like concat('%', #{remark}, '%')
</if> </if>
<if test="mainAction != null and mainAction != ''"> <if test="mainAction != null and mainAction != ''">
AND io.mainAction = #{mainAction} AND io.mainAction = #{mainAction}
</if> </if>
<if test="billNo != null and billNo != ''">
AND io.billNo like concat('%', #{billNo}, '%')
</if>
<if test="corpOrderId != null and corpOrderId != ''"> <if test="corpOrderId != null and corpOrderId != ''">
AND io.corpOrderId = #{corpOrderId} AND io.corpOrderId = #{corpOrderId}
</if> </if>
@ -102,9 +103,6 @@
<if test="deptCode != null and deptCode != ''"> <if test="deptCode != null and deptCode != ''">
AND io.deptCode = #{deptCode} AND io.deptCode = #{deptCode}
</if> </if>
<if test="invCode != null and invCode != ''">
AND io.invCode = #{invCode}
</if>
<if test="busType != null"> <if test="busType != null">
AND io.busType = #{busType} AND io.busType = #{busType}
</if> </if>
@ -280,6 +278,12 @@
) As partCount ) As partCount
from io_order as io from io_order as io
<where> <where>
<if test="billNo != null and billNo != ''">
AND billNo like concat(#{billNo}, '%')
</if>
<if test="action != null and action != ''">
AND action = #{action}
</if>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
AND id = #{id} AND id = #{id}
</if> </if>
@ -287,15 +291,9 @@
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
concat('%', #{corpName}, '%') concat('%', #{corpName}, '%')
</if> </if>
<if test="action != null and action != ''">
AND action = #{action}
</if>
<if test="mainAction != null and mainAction != ''"> <if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction} AND mainAction = #{mainAction}
</if> </if>
<if test="billNo != null and billNo != ''">
AND billNo like concat('%', #{billNo}, '%')
</if>
<if test="corpOrderId != null and corpOrderId != ''"> <if test="corpOrderId != null and corpOrderId != ''">
AND corpOrderId = #{corpOrderId} AND corpOrderId = #{corpOrderId}
</if> </if>
@ -414,14 +412,15 @@
from io_order from io_order
<where> <where>
<if test="billNo != null and billNo != ''"> <if test="billNo != null and billNo != ''">
AND billNo like concat('%', #{billNo}, '%') AND billNo like concat( #{billNo}, '%')
</if>
<if test="id != null and id != ''">
AND id = #{id}
</if> </if>
<if test="action != null and action != ''"> <if test="action != null and action != ''">
AND action = #{action} AND action = #{action}
</if> </if>
<if test="id != null and id != ''">
AND id = #{id}
</if>
<if test="mainAction != null and mainAction != ''"> <if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction} AND mainAction = #{mainAction}
</if> </if>
@ -502,6 +501,9 @@
left join io_order_upload_log ioul on io.billNo = ioul.billNo left join io_order_upload_log ioul on io.billNo = ioul.billNo
<where> <where>
io.dealStatus = 3 io.dealStatus = 3
<if test="billNo != null and billNo != ''">
AND io.billNo like concat(#{billNo}, '%')
</if>
<if test="billType != null and billType != ''"> <if test="billType != null and billType != ''">
AND action = #{billType} AND action = #{billType}
</if> </if>
@ -511,9 +513,6 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="billNo != null and billNo != ''">
AND io.billNo like concat('%', #{billNo}, '%')
</if>
<if test="invCode != null and invCode != ''"> <if test="invCode != null and invCode != ''">
AND invCode = #{invCode} AND invCode = #{invCode}
</if> </if>
@ -641,7 +640,7 @@
or io.outSickInfo like concat('%', #{unionRemark}, '%')) or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if> </if>
<if test="billNo != null and billNo != ''"> <if test="billNo != null and billNo != ''">
AND io.billNo like concat('%', #{billNo}, '%') AND io.billNo like concat( #{billNo}, '%')
</if> </if>
<if test="corpOrderId != null and corpOrderId != ''"> <if test="corpOrderId != null and corpOrderId != ''">
AND io.corpOrderId = #{corpOrderId} AND io.corpOrderId = #{corpOrderId}

@ -5267,3 +5267,11 @@ ALTER TABLE rel_code_batch
CALL Pro_Temp_ColumnWork('basic_corp', 'aliEntId', CALL Pro_Temp_ColumnWork('basic_corp', 'aliEntId',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里供应商ID''', 'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里供应商ID''',
1); 1);
CALL Modify_index('io_order', 'action,invCode', 'idex_order_query', 'BTREE');
CALL Modify_index('io_order', 'mainAction', 'idex_order_query_mainAction', 'BTREE');
call Modify_UNIQUE_index('io_code', 'code', 'idex_code_query', 'BTREE');
call Modify_UNIQUE_index('io_code_temp', 'code', 'idex_code_temp_query', 'BTREE');
CALL Modify_index('io_order_detail_code', 'orderIdFk', 'idex_query_orderIdFk', 'BTREE');
CALL Modify_index('io_order_detail_biz', 'orderIdFk', 'idex_query_orderIdFk', 'BTREE');

Loading…
Cancel
Save