|
|
@@ -252,5 +252,306 @@
|
|
|
(#{map.method_},#{map.params_},#{map.user_id_},#{map.user_name_},now(),
|
|
|
#{map.time_},#{map.ip_},#{map.response_},#{map.uri_},#{map.type_},#{map.error_})
|
|
|
</insert >
|
|
|
+ <select id="selectByLocation" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ select a.*,
|
|
|
+ b.name_
|
|
|
+ from t_swdl a left join ibps_party_employee b on a.create_by_ = b.ID_
|
|
|
+ where a.di_dian_ = #{map.locationId} and a.shi_fou_qi_yong_ like '%enabled%' order by a.create_time_ desc
|
|
|
+ limit ${map.startPage},${map.limit}
|
|
|
+ </select>
|
|
|
+ <select id="selectByLocationCount" resultType="java.lang.Integer" parameterType="java.util.Map">
|
|
|
+ select count(a.id_) as count from t_swdl a where a.di_dian_ = #{map.locationId} and a.shi_fou_qi_yong_ like '%enabled%'
|
|
|
+ </select>
|
|
|
+ <select id="selectExInfoByLocation" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ qb.ti_ku_ming_cheng_ as bankName,
|
|
|
+ f.pei_xun_nei_rong_ as trainId,
|
|
|
+ ex.id_ as examId,
|
|
|
+ ex.ti_ku_id_ as bankId,
|
|
|
+ e.id_ as paperId,
|
|
|
+ ex.zhuang_tai_ as examState,
|
|
|
+ e.zhuang_tai_ as paperState,
|
|
|
+ qb.ti_shu_ as questionCount,
|
|
|
+ qb.zong_fen_ as totalScore,
|
|
|
+ ex.kao_shi_ming_chen as examName,
|
|
|
+ ex.kao_shi_lei_xing_ as examType,
|
|
|
+ ex.can_kao_ren_yuan_ as examinee,
|
|
|
+ e.kao_shi_ren_ as examineeId,
|
|
|
+ ex.create_by_ as createBy,
|
|
|
+ ex.chuang_jian_shi_j as createTime,
|
|
|
+ ex.fa_bu_shi_jian_ as publishDate,
|
|
|
+ ex.fa_bu_ren_ as publisher,
|
|
|
+ ex.xian_kao_shi_jian as limitDate,
|
|
|
+ ex.kao_shi_shi_chang as duration,
|
|
|
+ ex.xian_kao_ci_shu_ as limitCount,
|
|
|
+ ex.da_biao_zhan_bi_ as qualifiedRadio,
|
|
|
+ ex.ji_fen_fang_shi_ as scoringType,
|
|
|
+ ex.yun_xu_bao_ming_ as allowRegist,
|
|
|
+ ex.kao_shi_miao_shu_ as examDesc,
|
|
|
+ ex.shu_ju_yong_tu_ as dataType,
|
|
|
+ ex.sui_ji_chou_ti_ as isRand,
|
|
|
+ ex.chou_ti_fang_shi_ as randWay,
|
|
|
+ ex.sui_ji_ti_shu_ as randNumber,
|
|
|
+ ex.chou_ti_zong_fen_ as randScore,
|
|
|
+ ex.ti_mu_zong_shu_ as randTotal,
|
|
|
+ e.de_fen_ as score,
|
|
|
+ e.bao_ming_shi_jian as applyTime,
|
|
|
+ e.kai_shi_shi_jian_ as startTime,
|
|
|
+ e.jie_shu_shi_jian_ as endTime
|
|
|
+
|
|
|
+ from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
|
|
|
+ left join t_examination e on e.exam_id_ = ex.id_
|
|
|
+ left join t_rypxcjb f on f.id_=ex.guan_lian_id_
|
|
|
+ <where>
|
|
|
+ ex.di_dian_ = #{map.locationId}
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
|
|
|
+ and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
|
|
|
+ AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
|
|
|
+ AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
|
|
|
+ AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJUp)">
|
|
|
+ AND ex.chuang_jian_shi_j >= #{map.chuangJianShiJUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJLower)">
|
|
|
+ AND ex.chuang_jian_shi_j <![CDATA[ <= ]]> #{map.chuangJianShiJLower}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianUp)">
|
|
|
+ AND ex.fa_bu_shi_jian_ >= #{map.faBuShiJianUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianLower)">
|
|
|
+ AND ex.fa_bu_shi_jian_ <![CDATA[ <= ]]> #{map.faBuShiJianLower}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ union all
|
|
|
+ select
|
|
|
+ qb.ti_ku_ming_cheng_ as bankName,
|
|
|
+ f.pei_xun_nei_rong_ as trainId,
|
|
|
+ ex.id_ as examId,
|
|
|
+ ex.ti_ku_id_ as bankId,
|
|
|
+ e.id_ as paperId,
|
|
|
+ ex.zhuang_tai_ as examState,
|
|
|
+ e.zhuang_tai_ as paperState,
|
|
|
+ qb.ti_shu_ as questionCount,
|
|
|
+ qb.zong_fen_ as totalScore,
|
|
|
+ ex.kao_shi_ming_chen as examName,
|
|
|
+ ex.kao_shi_lei_xing_ as examType,
|
|
|
+ ex.can_kao_ren_yuan_ as examinee,
|
|
|
+ e.kao_shi_ren_ as examineeId,
|
|
|
+ ex.create_by_ as createBy,
|
|
|
+ ex.chuang_jian_shi_j as createTime,
|
|
|
+ ex.fa_bu_shi_jian_ as publishDate,
|
|
|
+ ex.fa_bu_ren_ as publisher,
|
|
|
+ ex.xian_kao_shi_jian as limitDate,
|
|
|
+ ex.kao_shi_shi_chang as duration,
|
|
|
+ ex.xian_kao_ci_shu_ as limitCount,
|
|
|
+ ex.da_biao_zhan_bi_ as qualifiedRadio,
|
|
|
+ ex.ji_fen_fang_shi_ as scoringType,
|
|
|
+ ex.yun_xu_bao_ming_ as allowRegist,
|
|
|
+ ex.kao_shi_miao_shu_ as examDesc,
|
|
|
+ ex.shu_ju_yong_tu_ as dataType,
|
|
|
+ ex.sui_ji_chou_ti_ as isRand,
|
|
|
+ ex.chou_ti_fang_shi_ as randWay,
|
|
|
+ ex.sui_ji_ti_shu_ as randNumber,
|
|
|
+ ex.chou_ti_zong_fen_ as randScore,
|
|
|
+ ex.ti_mu_zong_shu_ as randTotal,
|
|
|
+ e.de_fen_ as score,
|
|
|
+ e.bao_ming_shi_jian as applyTime,
|
|
|
+ e.kai_shi_shi_jian_ as startTime,
|
|
|
+ e.jie_shu_shi_jian_ as endTime
|
|
|
+
|
|
|
+ from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
|
|
|
+ left join t_examination e on e.exam_id_ = ex.id_
|
|
|
+ left join t_rypxcjb f on f.id_=ex.guan_lian_id_
|
|
|
+ <where>
|
|
|
+ ex.di_dian_ = #{map.locationId}
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
|
|
|
+ and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
|
|
|
+ AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
|
|
|
+ AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
|
|
|
+ AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
|
|
|
+ </if>
|
|
|
+ and ex.chuang_jian_shi_j is null or ex.fa_bu_shi_jian_ is null
|
|
|
+ </where>
|
|
|
+ order by createTime ${map.cjsj}, publishDate ${map.fbsj}
|
|
|
+ limit ${map.startPage},${map.limit}
|
|
|
+ </select>
|
|
|
+ <select id="selectExInfoByLocationCount" resultType="java.lang.Integer" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ count(*) as count
|
|
|
+ from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
|
|
|
+ left join t_examination e on e.exam_id_ = ex.id_
|
|
|
+ left join t_rypxcjb f on f.id_=ex.guan_lian_id_
|
|
|
+ <where>
|
|
|
+ ex.di_dian_ = #{map.locationId}
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
|
|
|
+ and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
|
|
|
+ AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
|
|
|
+ AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
|
|
|
+ AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJUp)">
|
|
|
+ AND ex.chuang_jian_shi_j >= #{map.chuangJianShiJUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.chuangJianShiJLower)">
|
|
|
+ AND ex.chuang_jian_shi_j <![CDATA[ <= ]]> #{map.chuangJianShiJLower}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianUp)">
|
|
|
+ AND ex.fa_bu_shi_jian_ >= #{map.faBuShiJianUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianLower)">
|
|
|
+ AND ex.fa_bu_shi_jian_ <![CDATA[ <= ]]> #{map.faBuShiJianLower}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="selectExInfoByLocationCountNull" resultType="java.lang.Integer" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ count(*) as count
|
|
|
+ from t_exams ex left join t_question_bank qb on ex.ti_ku_id_ = qb.id_
|
|
|
+ left join t_examination e on e.exam_id_ = ex.id_
|
|
|
+ left join t_rypxcjb f on f.id_=ex.guan_lian_id_
|
|
|
+ <where>
|
|
|
+ ex.di_dian_ = #{map.locationId}
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiMingChen)">
|
|
|
+ and ex.kao_shi_ming_chen like CONCAT('%', #{map.kaoShiMingChen}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.kaoShiLeiXing)">
|
|
|
+ AND FIND_IN_SET(ex.kao_shi_lei_xing_,#{map.kaoShiLeiXing})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.zhuangTai)">
|
|
|
+ AND FIND_IN_SET(ex.zhuang_tai_,#{map.zhuangTai})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.tiKuId)">
|
|
|
+ AND FIND_IN_SET(ex.ti_ku_id_,#{map.tiKuId})
|
|
|
+ </if>
|
|
|
+ and ex.chuang_jian_shi_j is null or ex.fa_bu_shi_jian_ is null
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="selectMobileInspection" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from t_fjjysqdjb a
|
|
|
+ <where>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.yangPinBianHao)">
|
|
|
+ a.yang_pin_bian_hao = #{map.yangPinBianHao}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.shenQingRenZh)">
|
|
|
+ and a.shen_qing_ren_zh like #{map.shenQingRenZh}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.keShiZh)">
|
|
|
+ and a.ke_shi_zh like #{map.keShiZh}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.bianZhiBuMen)">
|
|
|
+ and a.bian_zhi_bu_men_ = #{map.bianZhiBuMen}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by a.bian_zhi_bu_men_
|
|
|
+ limit ${map.startPage},${map.limit}
|
|
|
+ </select>
|
|
|
+ <select id="selectMobileInspectionCount" resultType="java.lang.Integer" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ count(*)
|
|
|
+ from t_fjjysqdjb a
|
|
|
+ <where>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.yangPinBianHao)">
|
|
|
+ a.yang_pin_bian_hao = #{map.yangPinBianHao}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.shenQingRenZh)">
|
|
|
+ and a.shen_qing_ren_zh like #{map.shenQingRenZh}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.keShiZh)">
|
|
|
+ and a.ke_shi_zh like #{map.keShiZh}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.bianZhiBuMen)">
|
|
|
+ and a.bian_zhi_bu_men_ = #{map.bianZhiBuMen}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="selectMobileExInfo" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from v_examination a
|
|
|
+ <where>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.examinee)">
|
|
|
+ AND a.examinee = #{map.examinee}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.examType)">
|
|
|
+ AND FIND_IN_SET(a.examType, #{map.examType})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.examName)">
|
|
|
+ AND a.examName like CONCAT('%', #{map.examName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.bankName)">
|
|
|
+ AND a.bankName like CONCAT('%', #{map.bankName}, '%')
|
|
|
+ </if>
|
|
|
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.startDateUp)">
|
|
|
+ AND date(a.startDate) >= date(#{map.startDateUp})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.startDateLower)">
|
|
|
+ AND a.startDate <![CDATA[ <= ]]> #{map.startDateLower}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianUp)">
|
|
|
+ AND a.limitDate >= #{map.limitDateUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianLower)">
|
|
|
+ AND a.limitDate <![CDATA[ <= ]]> #{map.limitDateLower}
|
|
|
+ </if>
|
|
|
+ AND paperState='未开始'
|
|
|
+ AND examState='已发布'
|
|
|
+ </where>
|
|
|
+ ORDER BY startDate
|
|
|
+ limit ${map.startPage},${map.limit}
|
|
|
+ </select>
|
|
|
+ <select id="selectMobileExInfoCount" resultType="java.lang.Integer" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ count(*)
|
|
|
+ from v_examination a
|
|
|
+ <where>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.examinee)">
|
|
|
+ AND a.examinee = #{map.examinee}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.examType)">
|
|
|
+ AND FIND_IN_SET(a.examType, #{map.examType})
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.examName)">
|
|
|
+ AND a.examName like CONCAT('%', #{map.examName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.bankName)">
|
|
|
+ AND a.bankName like CONCAT('%', #{map.bankName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.startDateUp)">
|
|
|
+ AND a.startDate >= #{map.startDateUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.startDateLower)">
|
|
|
+ AND a.startDate <![CDATA[ <= ]]> #{map.startDateLower}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianUp)">
|
|
|
+ AND a.limitDate >= #{map.limitDateUp}
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.faBuShiJianLower)">
|
|
|
+ AND a.limitDate <![CDATA[ <= ]]> #{map.limitDateLower}
|
|
|
+ </if>
|
|
|
+ AND paperState='未开始'
|
|
|
+ AND examState='已发布'
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|