123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.platform.dao.mapper.sb.SbInfoMeasureMapper">
- <sql id="Base_Column_List">
- id
- , no,
- financing_no,
- financing_no_two,
- financing_no_third,
- financing_no_four,
- financing_no_five,
- param_list,
- name, model_id,
- is_child,
- is_show,
- is_financing,
- type_id, level, initial_value, current_value, cut_value,
- producer_id, source_type, source_sb_id, parent_id, unit, position_id,
- use_area,
- check_id,
- rate,
- month,
- used_month,
- card_no,
- use_company,
- use_project,
- use_dept,
- use_group,
- use_user,
- save_dept,
- save_user,
- repair_user,
- buy_date, start_date, next_check_date, guarantee_date, work_year, retirement_date,
- depreciation_type, wb_file, use_file, check_file, sb_image, qr_code, status, remark,
- created_user_id, update_user_id, created_time, update_time,
- zzh,
- fdjxh,
- fdjh,
- cph,
- dph,
- zz,
- zaiz,
- last_repaire_time,
- repaire_times,
- last_baoyang_time,
- last_baoyang_hours,
- last_baoyang_miles,
- baoyang_times,
- rl_type,
- color,
- use_type,
- seat_number,
- zjm,
- sp_date,
- jbdh,
- sbdh,
- jbd_date,
- sbd_date,
- bxgs,
- sb_date,
- check_date,
- check_period,
- register_no,
- character_type,
- used_no,
- supplier,
- repair_user_second,
- batch_no,
- register_date,
- zbh,
- refuse_reason,
- apply_time,
- audit_time,
- submit_time,
- process_instance_id,
- audit_node,
- remark,
- apply_comment,
- scrap_user_id,
- scrap_user_name
- </sql>
- <sql id="Left_Column">
- sb
- .
- id
- , sb.no,
- sb.financing_no_two,
- sb.financing_no_third,
- sb.financing_no_four,
- sb.financing_no_five,
- sb.financing_no,
- sb.name, sb.initial_value,
- sb.current_value, sb.cut_value,
- sb.is_child,
- sb.is_financing,
- sb.parent_id,
- sb.param_list,
- sb.is_show,
- sb.unit, sb.position_id,
- sb.use_area,
- sb.rate,
- sb.month,
- sb.used_month,
- sb.card_no,
- sb.check_id,
- sb.use_company,
- sb.use_project,
- sb.use_dept,
- sb.use_group,
- sb.use_user,
- sb.save_dept,
- sb.save_user,
- sb.repair_user,
- sb.buy_date, sb.start_date, sb.next_check_date, sb.guarantee_date, sb.work_year,
- sb.retirement_date,
- sb.depreciation_type, sb.wb_file, sb.use_file, sb.check_file, sb.sb_image, sb.qr_code, sb.status, sb.remark,
- sb.created_user_id, sb.update_user_id, sb.created_time, sb.update_time,
- sb.model_id,
- sb.zzh,
- sb.fdjxh,
- sb.fdjh,
- sb.cph,
- sb.dph,
- sb.zz,
- sb.zaiz,
- sb.last_repaire_time,
- sb.repaire_times,
- sb.last_baoyang_time,
- sb.last_baoyang_hours,
- sb.last_baoyang_miles,
- sb.use_type,
- sb.baoyang_times,
- sb.rl_type,
- sb.color,
- sb.seat_number,
- sb.zjm,
- sb.sp_date,
- sb.jbdh,
- sb.sbdh,
- sb.total_hours,
- sb.total_miles,
- sb.jbd_date,
- sb.sbd_date,
- sb.bxgs,
- sb.sb_date,
- sb.type_id as typeId,
- sb.name_model as nameModel,
- sb.model,
- sb.producer_id as producerId,
- sb.level,
- sb.unit,
- sb.use_type as useType,
- sb.check_date,
- sb.check_period,
- sb.register_no,
- sb.character_type,
- sb.used_no,
- sb.zbh,
- sb.supplier,
- sb.repair_user_second,
- sb.batch_no,
- sb.register_date,
- sb.refuse_reason,
- sb.apply_time,
- sb.audit_time,
- sb.submit_time,
- sb.process_instance_id,
- sb.audit_node,
- sb.remark,
- sb.apply_comment,
- sb.scrap_user_id,
- sb.scrap_user_name
- </sql>
- <sql id="deptSql">
- <if test="saveDept != null and saveDept != ''">
- and sb.save_dept = #{saveDept}
- </if>
- </sql>
- <select id="selectVOList" parameterType="com.platform.dao.dto.sb.SbInfoMeasureDTO"
- resultType="com.platform.dao.vo.sb.SbInfoMeasureVO">
- select
- <include refid="Left_Column"/>
- from t_sb_info_measure sb
- where
- 1 = 1
- <if test="keyword != null and keyword != ''">
- and (
- sb.name like concat('%',#{keyword},'%')
- or
- sb.no like concat('%',#{keyword},'%')
- or
- sb.card_no like concat('%',#{keyword},'%')
- )
- </if>
- <if test="isFinancing != null">
- and sb.is_financing like concat('%',#{isFinancing},'%')
- </if>
- <if test="zzh != null">
- and sb.zzh like concat('%',#{zzh},'%')
- </if>
- <if test="model != null">
- and sb.model like concat('%',#{model},'%')
- </if>
- <if test="useDept != null">
- and sb.use_dept like concat('%',#{useDept},'%')
- </if>
- <if test="nextCheckDateStart != null">
- and sb.next_check_date <![CDATA[ >= ]]> #{nextCheckDateStart}
- </if>
- <if test="nextCheckDateEnd != null">
- and sb.next_check_date <![CDATA[ <= ]]> #{nextCheckDateEnd}
- </if>
- <if test="status != null">
- and sb.status = #{status}
- </if>
- <if test="cardNo != null">
- and sb.card_no like concat('%',#{cardNo},'%')
- </if>
- <if test="seatNumber != null">
- and TIMESTAMPDIFF( DAY, CURDATE( ), sb.next_check_date ) <![CDATA[ <= ]]> sb.seat_number
- </if>
- <if test="notStatusList != null and notStatusList.size > 0">
- AND sb.status not in
- <foreach item="item" index="index" collection="notStatusList" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="statusList != null and statusList.size > 0">
- AND sb.status in
- <foreach item="item" index="index" collection="statusList" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="sbIds != null and sbIds.size > 0">
- AND sb.id in
- <foreach item="item" index="index" collection="sbIds" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="selectPageInfoForWarn" parameterType="com.platform.dao.dto.sb.SbInfoMeasureDTO"
- resultType="com.platform.dao.vo.sb.SbInfoMeasureVO">
- select
- <include refid="Left_Column"/>
- from t_sb_info_measure sb
- where
- TIMESTAMPDIFF( DAY, CURDATE( ), sb.next_check_date ) <![CDATA[ <= ]]> sb.seat_number
- <if test="keyword != null and keyword != ''">
- and (
- sb.name like concat('%',#{keyword},'%')
- or
- sb.no like concat('%',#{keyword},'%')
- or
- sb.card_no like concat('%',#{keyword},'%')
- )
- </if>
- <if test="zzh != null">
- and sb.zzh = #{zzh}
- </if>
- <if test="isFinancing != null">
- and sb.is_financing = #{isFinancing}
- </if>
- <if test="useProject != null">
- and sb.use_project = #{useProject}
- </if>
- <if test="zzh != null">
- and sb.zzh like concat('%',#{zzh},'%')
- </if>
- <if test="model != null">
- and sb.model like concat('%',#{model},'%')
- </if>
- <if test="useDept != null">
- and sb.use_dept like concat('%',#{useDept},'%')
- </if>
- <if test="nextCheckDateStart != null">
- and sb.next_check_date <![CDATA[ >= ]]> #{nextCheckDateStart}
- </if>
- <if test="nextCheckDateEnd != null">
- and sb.next_check_date <![CDATA[ <= ]]> #{nextCheckDateEnd}
- </if>
- <if test="status != null">
- and sb.status = #{status}
- </if>
- <if test="cardNo != null">
- and sb.card_no like concat('%',#{cardNo},'%')
- </if>
- <if test="notStatusList != null and notStatusList.size > 0">
- AND sb.status not in
- <foreach item="item" index="index" collection="notStatusList" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="statusList != null and statusList.size > 0">
- AND sb.status in
- <foreach item="item" index="index" collection="statusList" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="getById" parameterType="java.lang.Object" resultType="com.platform.dao.vo.sb.SbInfoMeasureVO">
- select
- <include refid="Left_Column"/>
- from t_sb_info_measure sb
- where sb.id = #{value}
- </select>
- <select id="getByNo" parameterType="java.lang.Object" resultType="com.platform.dao.vo.sb.SbInfoMeasureVO">
- select
- <include refid="Left_Column"/>
- from t_sb_info_measure sb
- where sb.no = #{value}
- </select>
- <select id="getByIds" parameterType="java.util.List" resultType="com.platform.dao.vo.sb.SbInfoMeasureVO">
- select
- <include refid="Left_Column"/>
- from t_sb_info_measure sb
- where sb.id in
- <foreach item="item" index="index" collection="ids" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </select>
- </mapper>
|