1. 接口联调

This commit is contained in:
ant 2024-07-12 11:06:31 +08:00
parent 909a4aee09
commit 8805b6838c
8 changed files with 98 additions and 105 deletions

View File

@ -81,7 +81,7 @@ public class PollingTask extends BaseEntity {
private Integer dispatchMethod;
/**
* 巡检方式
* 审核方式
*/
@TableField(value = "review_method")
private Integer reviewMethod;

View File

@ -126,4 +126,5 @@ public class ReviewedQuery extends CommonParam {
*/
@Condition(name = "lower_task_id", type = Condition.ConditionType.in, tableName = "i")
private List<Long> lowerTaskIds;
}

View File

@ -26,7 +26,7 @@
<select id="findPage" resultMap="BaseResultMap">
SELECT cd.*, ct.type FROM consumable_details cd
LEFT JOIN consumables_total ct ON ct.total_id = cd.total_id
<where>
WHERE cd.del_state = 0
<if test="query.taskId != null">
AND ct.task_id = #{query.taskId}
</if>
@ -40,7 +40,5 @@
<!-- 数据范围过滤 -->
${query.sqlParam.get('dataScope')}
</if>
</where>
</select>
</mapper>

View File

@ -34,8 +34,7 @@
</sql>
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.FiveStoreVO">
SELECT
t.terminal_id AS terminalId,
SELECT t.terminal_id AS terminalId,
fs.five_id AS fiveId,
fs.first_level_branch AS firstLevelBranch,
fs.secondary_branches AS secondaryBranch,
@ -50,8 +49,8 @@
fs.consumption_date AS consumptionDate,
fs.marketer AS marketer
FROM st_terminal t
LEFT JOIN st_five_store fs ON t.terminal_id= fs.terminal_id
<where>
LEFT JOIN st_five_store fs ON t.terminal_id = fs.terminal_id
WHERE t.del_state = 0
<if test="query.terminalNo != null and query.terminalNo != ''">
AND t.terminal_no = #{query.terminalNo}
</if>
@ -61,7 +60,7 @@
<if test="query.firstLevelBranch != null">
AND fs.first_level_branch = #{query.firstLevelBranch}
</if>
<if test="query.secondaryBranches != null and query.secondaryBranches.size() > 0 ">
<if test="query.secondaryBranches != null and query.secondaryBranches.size() > 0">
AND fs.secondary_branches IN
<foreach collection="query.secondaryBranches" item="item" index="index" open="(" close=")" separator=",">
#{item}
@ -70,9 +69,6 @@
<if test="1 == 1">
${query.sqlParam.get('dataScpoe')}
</if>
</where>
ORDER BY #{query.orderBy} #{query.isAsc}
</select>
</mapper>

View File

@ -25,16 +25,17 @@
LEFT JOIN ta_polling_task pt1 ON s.task_id = pt1.id
LEFT JOIN ta_polling_task pt2 ON s.lower_task_id = pt2.id
LEFT JOIN st_terminal t ON s.store_id = t.store_id
<where>
WHERE s.del_state = 0
<if test="query.storeId != null">
AND s.store_id = #{query.storeId}
</if>
<if test="query.storeIds != null and query.storeIds.size() > 0">
AND s.store_id IN <foreach collection="query.storeIds" open="(" close=")" separator="," item="storeId">
AND s.store_id IN
<foreach collection="query.storeIds" open="(" close=")" separator="," item="storeId">
#{storeId}
</foreach>
</if>
<if test="query.storeNo != null ">
<if test="query.storeNo != null">
AND s.store_no = #{query.storeNo}
</if>
<if test="query.terminalNo != null">
@ -50,50 +51,48 @@
#{lowerTaskId}
</foreach>
</if>
<if test="query.state != null ">
<if test="query.state != null">
AND s.state = #{query.state}
</if>
<if test="query.occupy != null ">
<if test="query.occupy != null">
AND t.occupy = #{query.occupy}
</if>
<if test="query.terminalSn != null">
AND t.terminal_sn = #{query.terminalSn}
</if>
<if test="query.storeName != null and query.storeName != ''">
AND s.store_name like concat('%',#{query.storeName},'%')
AND s.store_name like concat('%', #{query.storeName}, '%')
</if>
<if test="query.storeContact != null and query.storeContact != ''">
AND s.store_contact like concat('%',#{query.storeContact},'%')
AND s.store_contact like concat('%', #{query.storeContact}, '%')
</if>
<if test="query.storePhone != null and query.storePhone != ''">
AND s.store_phone like concat('%',#{query.storePhone},'%')
AND s.store_phone like concat('%', #{query.storePhone}, '%')
</if>
<if test="query.storeAddress != null and query.storeAddress != ''">
AND s.store_address like concat('%',#{query.storeAddress},'%')
AND s.store_address like concat('%', #{query.storeAddress}, '%')
</if>
<if test="query.specialNum != null and query.specialNum != ''">
AND s.special_num like concat('%',#{query.specialNum},'%')
AND s.special_num like concat('%', #{query.specialNum}, '%')
</if>
<if test="query.shopName != null and query.shopName != ''">
AND s.shop_name like concat('%',#{query.shopName},'%')
AND s.shop_name like concat('%', #{query.shopName}, '%')
</if>
<if test="query.startTime != null ">
<if test="query.startTime != null">
AND s.create_time >= #{query.startTime}
</if>
<if test="query.endTime != null " >
<if test="query.endTime != null">
AND s.create_time &lt;= #{query.endTime}
</if>
<if test="query.createTime != null and query.createTime.size() > 0">
AND
s.create_time BETWEEN #{query.createTime[0]}
AND s.create_time BETWEEN #{query.createTime[0]}
AND #{query.createTime[1]}
</if>
<if test="1==1">
<if test="1 == 1">
${query.sqlParam.get('dataScpoe')}
</if>
</where>
ORDER BY #{query.orderBy} #{query.isAsc}
</select>
</mapper>

View File

@ -112,8 +112,8 @@
ti.work_location AS workLocation,
ti.work_adderss AS workAddress
FROM st_terminal t
LEFT JOIN st_terminal_ins ti ON t.terminal_id = ti.terminal_id
INNER JOIN st_store s ON t.store_id = s.store_id
INNER JOIN st_terminal_ins ti ON t.terminal_id = ti.terminal_id
INNER JOIN ta_polling_task pt ON t.task_id = pt.id
INNER JOIN wrk_project p ON pt.project_id = p.project_id
</sql>

View File

@ -59,11 +59,10 @@
INNER JOIN wrk_info_store_record s ON i.wrk_id = s.wrk_id
INNER JOIN wrk_info_terminal_record t ON i.wrk_id = t.wrk_id
LEFT JOIN wrk_info_terminal_ins_record ti ON i.wrk_id = ti.wrk_id
<where>
WHERE i.del_state = 0
<if test="1 == 1">
${query.sqlParam.get('sqlWhere')}
</if>
</where>
ORDER BY #{query.orderBy} #{query.isAsc}
</select>
</mapper>

View File

@ -31,6 +31,6 @@
<select id="queryListByProjectIds" resultMap="BaseResultMap" parameterType="java.util.List">
select <include refid="Base_Column_List" /> from wrk_project_contract
where project_id = #{projectId} order by create_time desc limit 1
WHERE del_state = 0 AND project_id = #{projectId} order by create_time desc limit 1
</select>
</mapper>