添加稽核查询功能
This commit is contained in:
@@ -30,7 +30,6 @@ public interface HyInspectionMapper {
|
||||
|
||||
InterviewInspectionInfo interviewInspectionGetDetail(@Param("id") Long id);
|
||||
|
||||
List<InterviewInspectionHistoryInfo> interviewInspectionGetHistoryDetail(@Param("id") Long id);
|
||||
|
||||
List<InterviewInspectionResultVO> interviewInspectionResultGetList(GetInterviewInspectionResultListReq request);
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyInterviewInspectionLog;
|
||||
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface HyInterviewInspectionLogMapper {
|
||||
@@ -16,4 +20,6 @@ public interface HyInterviewInspectionLogMapper {
|
||||
int updateByPrimaryKeySelective(HyInterviewInspectionLog record);
|
||||
|
||||
int updateByPrimaryKey(HyInterviewInspectionLog record);
|
||||
|
||||
List<InterviewInspectionHistoryInfo> interviewInspectionGetHistoryDetail(@Param("inspectionId") Long id);
|
||||
}
|
||||
@@ -17,4 +17,7 @@ public interface MdmAreaMapper {
|
||||
|
||||
List<MDMAreaDO> getSonArea(@Param("code") String code);
|
||||
|
||||
List<MDMAreaDO> getProvinceAllCode(@Param("code") String code);
|
||||
|
||||
List<MDMAreaDO> getArea(@Param("code") String code);
|
||||
}
|
||||
|
||||
@@ -30,16 +30,119 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="interviewInspectionGetList" resultType="com.cool.store.vo.interview.InterviewInspectionVO">
|
||||
|
||||
SELECT
|
||||
eu.`name` AS interviewerName,
|
||||
eu.mobile AS interviewerMobile,
|
||||
hpui.username AS intervieweeName,
|
||||
hpui.mobile AS intervieweeMobile,
|
||||
hoai.area_name AS wantShopAreaName,
|
||||
hi.create_time AS interviewPassTime,
|
||||
hi.`status` AS `status`,
|
||||
euj.`name` AS auditorName,
|
||||
euj.mobile AS auditorMobile,
|
||||
hi.inspection_time AS inspectionTime,
|
||||
hi.id AS id,
|
||||
hi.interview_plan_id AS interviewPlanId
|
||||
FROM
|
||||
hy_inspection hi
|
||||
LEFT JOIN enterprise_user euj ON hi.operator_user_id = euj.user_id
|
||||
LEFT JOIN hy_partner_interview_plan hpip ON hi.interview_plan_id = hpip.id
|
||||
AND hi.deleted = 0
|
||||
AND hpip.deleted = 0
|
||||
LEFT JOIN hy_partner_interview hpi ON hpi.interview_plan_id = hpip.id
|
||||
AND hpi.deleted = 0
|
||||
LEFT JOIN enterprise_user eu ON hpi.interviewer = eu.user_id
|
||||
LEFT JOIN hy_partner_user_info hpui ON hpip.partner_id = hpui.partner_id
|
||||
LEFT JOIN hy_inspection_setting_mapping hism ON hpui.want_shop_area = hism.open_area_mapping_id
|
||||
AND hism.deleted = 0
|
||||
LEFT JOIN hy_inspection_setting his ON hism.inspection_setting_id = his.id
|
||||
AND his.deleted = 0
|
||||
AND eu.deleted = 0
|
||||
LEFT JOIN hy_open_area_info hoai ON hpui.want_shop_area = hoai.id
|
||||
AND hoai.deleted = 0
|
||||
<where>
|
||||
<if test="userId !=null and userId !=''">
|
||||
and (his.inspection_user_id = #{userId} OR hi.operator_user_id = #{userId})
|
||||
</if>
|
||||
<if test="interviewerName !=null and interviewerName !=''">
|
||||
and eu.`name`=#{interviewerName}
|
||||
</if>
|
||||
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
||||
and eu.mobile=#{interviewerMobile}
|
||||
</if>
|
||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
||||
and hpui.username=#{intervieweeName}
|
||||
</if>
|
||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
||||
and hpui.mobile=#{intervieweeMobile}
|
||||
</if>
|
||||
<if test="status !=null">
|
||||
and hi.`status`=#{status}
|
||||
</if>
|
||||
<if test="codeList !=null">
|
||||
and hpui.want_shop_area in <foreach collection="codeList" separator="," open="(" close=")" item="code" >#{code}</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and hpi.pass_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and hpi.pass_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by hi.id desc
|
||||
</select>
|
||||
<select id="interviewInspectionGetDetail" resultType="com.cool.store.vo.interview.InterviewInspectionInfo">
|
||||
|
||||
SELECT b.`name` as auditorName, b.mobile as auditorMobile,inspection_time as inspectionTime,`status` ,description,files as filesStr
|
||||
FROM hy_inspection a left join enterprise_user b on a.operator_user_id=b.user_id and a.deleted=0 and b.deleted=0
|
||||
where id=#{id}
|
||||
</select>
|
||||
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
|
||||
|
||||
</select>
|
||||
<select id="interviewInspectionResultGetList" resultType="com.cool.store.vo.interview.InterviewInspectionResultVO">
|
||||
|
||||
SELECT
|
||||
hpui.username AS intervieweeName,
|
||||
hpui.mobile AS intervieweeMobile,
|
||||
hoai.area_name AS wantShopAreaName,
|
||||
hi.create_time AS interviewPassTime,
|
||||
hi.`status` AS `status`,
|
||||
euj.`name` AS auditorName,
|
||||
euj.mobile AS auditorMobile,
|
||||
hi.inspection_time AS inspectionTime,
|
||||
hi.id AS id,
|
||||
hi.interview_plan_id AS interviewPlanId
|
||||
FROM
|
||||
hy_inspection hi
|
||||
LEFT JOIN enterprise_user euj ON hi.operator_user_id = euj.user_id
|
||||
LEFT JOIN hy_partner_interview_plan hpip ON hi.interview_plan_id = hpip.id
|
||||
AND hi.deleted = 0
|
||||
AND hpip.deleted = 0
|
||||
LEFT JOIN hy_partner_interview hpi ON hpi.interview_plan_id = hpip.id
|
||||
AND hpi.deleted = 0
|
||||
LEFT JOIN hy_partner_user_info hpui ON hpip.partner_id = hpui.partner_id
|
||||
LEFT JOIN hy_open_area_info hoai ON hpui.want_shop_area = hoai.id
|
||||
AND hoai.deleted = 0
|
||||
<where>
|
||||
<if test="userId !=null and userId !=''">
|
||||
and hpi.interviewer = #{userId}
|
||||
</if>
|
||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
||||
and hpui.username=#{intervieweeName}
|
||||
</if>
|
||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
||||
and hpui.mobile=#{intervieweeMobile}
|
||||
</if>
|
||||
<if test="status !=null">
|
||||
and hi.`status`=#{status}
|
||||
</if>
|
||||
<if test="codeList !=null">
|
||||
and hpui.want_shop_area in <foreach collection="codeList" separator="," open="(" close=")" item="code" >#{code}</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and hpi.pass_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and hpi.pass_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by hi.id desc
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_inspection
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
from hy_interview_inspection_log
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
|
||||
SELECT a.id, b.`name` as auditorName, b.mobile as auditorMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
|
||||
FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY a.id
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_interview_inspection_log
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
@@ -15,4 +15,13 @@
|
||||
FROM mdm_area
|
||||
WHERE parent_code = #{code}
|
||||
</select>
|
||||
<select id="getProvinceAllCode" resultType="com.cool.store.entity.MDMAreaDO">
|
||||
SELECT b.* FROM `mdm_area` a inner join mdm_area b on a.`code`=b.`parent_code`
|
||||
WHERE a.`parent_code`=#{code} ORDER BY b.id desc
|
||||
</select>
|
||||
<select id="getArea" resultType="com.cool.store.entity.MDMAreaDO">
|
||||
SELECT id, instance_id, code, area_name, parent_code
|
||||
FROM mdm_area
|
||||
WHERE `code` = #{code}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user