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; private Integer dispatchMethod;
/** /**
* 巡检方式 * 审核方式
*/ */
@TableField(value = "review_method") @TableField(value = "review_method")
private Integer reviewMethod; 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") @Condition(name = "lower_task_id", type = Condition.ConditionType.in, tableName = "i")
private List<Long> lowerTaskIds; private List<Long> lowerTaskIds;
} }

View File

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

View File

@ -34,45 +34,41 @@
</sql> </sql>
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.FiveStoreVO"> <select id="pageList" resultType="com.chushang.inspection.terminal.vo.FiveStoreVO">
SELECT SELECT t.terminal_id AS terminalId,
t.terminal_id AS terminalId, fs.five_id AS fiveId,
fs.five_id AS fiveId, fs.first_level_branch AS firstLevelBranch,
fs.first_level_branch AS firstLevelBranch, fs.secondary_branches AS secondaryBranch,
fs.secondary_branches AS secondaryBranch, t.terminal_no AS terminalNo,
t.terminal_no AS terminalNo, fs.store_id AS storeId,
fs.store_id AS storeId, t.store_no AS storeNo,
t.store_no AS storeNo, fs.new_year AS logoOfNewlySignedMerchantsThatYear,
fs.new_year AS logoOfNewlySignedMerchantsThatYear, fs.new_month AS logoOfNewlySignedMerchantsOfTheMonth,
fs.new_month AS logoOfNewlySignedMerchantsOfTheMonth, fs.new_day AS logoOfNewlySignedMerchantsOnTheDay,
fs.new_day AS logoOfNewlySignedMerchantsOnTheDay, fs.client_name AS clientName,
fs.client_name AS clientName, fs.marketing_date AS marketingDate,
fs.marketing_date AS marketingDate, fs.consumption_date AS consumptionDate,
fs.consumption_date AS consumptionDate, fs.marketer AS marketer
fs.marketer AS marketer FROM st_terminal t
FROM st_terminal t LEFT JOIN st_five_store fs ON t.terminal_id = fs.terminal_id
LEFT JOIN st_five_store fs ON t.terminal_id= fs.terminal_id WHERE t.del_state = 0
<where>
<if test="query.terminalNo != null and query.terminalNo != ''"> <if test="query.terminalNo != null and query.terminalNo != ''">
AND t.terminal_no = #{query.terminalNo} AND t.terminal_no = #{query.terminalNo}
</if> </if>
<if test="query.no != null and query.no != ''"> <if test="query.no != null and query.no != ''">
AND t.store_no = #{query.no} AND t.store_no = #{query.no}
</if> </if>
<if test="query.firstLevelBranch != null"> <if test="query.firstLevelBranch != null">
AND fs.first_level_branch = #{query.firstLevelBranch} AND fs.first_level_branch = #{query.firstLevelBranch}
</if> </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 AND fs.secondary_branches IN
<foreach collection="query.secondaryBranches" item="item" index="index" open="(" close=")" separator=","> <foreach collection="query.secondaryBranches" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="1 == 1"> <if test="1 == 1">
${query.sqlParam.get('dataScpoe')} ${query.sqlParam.get('dataScpoe')}
</if> </if>
ORDER BY #{query.orderBy} #{query.isAsc}
</where>
ORDER BY #{query.orderBy} #{query.isAsc}
</select> </select>
</mapper> </mapper>

View File

@ -25,75 +25,74 @@
LEFT JOIN ta_polling_task pt1 ON s.task_id = pt1.id 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 ta_polling_task pt2 ON s.lower_task_id = pt2.id
LEFT JOIN st_terminal t ON s.store_id = t.store_id LEFT JOIN st_terminal t ON s.store_id = t.store_id
<where> WHERE s.del_state = 0
<if test="query.storeId != null"> <if test="query.storeId != null">
AND s.store_id = #{query.storeId} AND s.store_id = #{query.storeId}
</if> </if>
<if test="query.storeIds != null and query.storeIds.size() > 0"> <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} #{storeId}
</foreach> </foreach>
</if> </if>
<if test="query.storeNo != null "> <if test="query.storeNo != null">
AND s.store_no = #{query.storeNo} AND s.store_no = #{query.storeNo}
</if> </if>
<if test="query.terminalNo != null"> <if test="query.terminalNo != null">
AND t.terminal_no = #{query.terminalNo} AND t.terminal_no = #{query.terminalNo}
</if> </if>
<if test="query.taskId != null"> <if test="query.taskId != null">
AND s.task_id = #{query.taskId} AND s.task_id = #{query.taskId}
</if> </if>
<if test="query.lowerTaskIds != null and query.lowerTaskIds.size() > 0"> <if test="query.lowerTaskIds != null and query.lowerTaskIds.size() > 0">
AND s.lower_task_id IN AND s.lower_task_id IN
<foreach collection="query.lowerTaskIds" open="(" close=")" separator="," item="lowerTaskId"> <foreach collection="query.lowerTaskIds" open="(" close=")" separator="," item="lowerTaskId">
#{lowerTaskId} #{lowerTaskId}
</foreach> </foreach>
</if> </if>
<if test="query.state != null "> <if test="query.state != null">
AND s.state = #{query.state} AND s.state = #{query.state}
</if> </if>
<if test="query.occupy != null "> <if test="query.occupy != null">
AND t.occupy = #{query.occupy} AND t.occupy = #{query.occupy}
</if> </if>
<if test="query.terminalSn != null"> <if test="query.terminalSn != null">
AND t.terminal_sn = #{query.terminalSn} AND t.terminal_sn = #{query.terminalSn}
</if> </if>
<if test="query.storeName != null and query.storeName != ''"> <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>
<if test="query.storeContact != null and query.storeContact != ''"> <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>
<if test="query.storePhone != null and query.storePhone != ''"> <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>
<if test="query.storeAddress != null and query.storeAddress != ''"> <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>
<if test="query.specialNum != null and query.specialNum != ''"> <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>
<if test="query.shopName != null and query.shopName != ''"> <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>
<if test="query.startTime != null "> <if test="query.startTime != null">
AND s.create_time >= #{query.startTime} AND s.create_time >= #{query.startTime}
</if> </if>
<if test="query.endTime != null " > <if test="query.endTime != null">
AND s.create_time &lt;= #{query.endTime} AND s.create_time &lt;= #{query.endTime}
</if> </if>
<if test="query.createTime != null and query.createTime.size() > 0"> <if test="query.createTime != null and query.createTime.size() > 0">
AND AND s.create_time BETWEEN #{query.createTime[0]}
s.create_time BETWEEN #{query.createTime[0]}
AND #{query.createTime[1]} AND #{query.createTime[1]}
</if> </if>
<if test="1==1"> <if test="1 == 1">
${query.sqlParam.get('dataScpoe')} ${query.sqlParam.get('dataScpoe')}
</if> </if>
</where>
ORDER BY #{query.orderBy} #{query.isAsc} ORDER BY #{query.orderBy} #{query.isAsc}
</select> </select>
</mapper> </mapper>

View File

@ -112,8 +112,8 @@
ti.work_location AS workLocation, ti.work_location AS workLocation,
ti.work_adderss AS workAddress ti.work_adderss AS workAddress
FROM st_terminal t 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_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 ta_polling_task pt ON t.task_id = pt.id
INNER JOIN wrk_project p ON pt.project_id = p.project_id INNER JOIN wrk_project p ON pt.project_id = p.project_id
</sql> </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_store_record s ON i.wrk_id = s.wrk_id
INNER JOIN wrk_info_terminal_record t ON i.wrk_id = t.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 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"> <if test="1 == 1">
${query.sqlParam.get('sqlWhere')} ${query.sqlParam.get('sqlWhere')}
</if> </if>
</where>
ORDER BY #{query.orderBy} #{query.isAsc} ORDER BY #{query.orderBy} #{query.isAsc}
</select> </select>
</mapper> </mapper>

View File

@ -31,6 +31,6 @@
<select id="queryListByProjectIds" resultMap="BaseResultMap" parameterType="java.util.List"> <select id="queryListByProjectIds" resultMap="BaseResultMap" parameterType="java.util.List">
select <include refid="Base_Column_List" /> from wrk_project_contract 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> </select>
</mapper> </mapper>