123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507 |
- <?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="cn.ourwill.module.house.dao.daily.DailyRecordSupercheckFileDao">
- <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordSupercheckFile" id="baseMap">
- <result column="id" property="id"/>
- <result column="uuid" property="uuid"/>
- <result column="type" property="type"/>
- <result column="checker" property="checker"/>
- <result column="check_time" property="checkTime"/>
- <result column="check_desc" property="checkDesc"/>
- <result column="problems" property="problems"/>
- <result column="advices" property="advices"/>
- <result column="remarks" property="remarks"/>
- <result column="capacity" property="capacity"/>
- <result column="wheat" property="wheat"/>
- <result column="rice" property="rice"/>
- <result column="corn" property="corn"/>
- <result column="bean" property="bean"/>
- <result column="improver_plan" property="improverPlan"/>
- <result column="improver_start_plan" property="improverStartPlan"/>
- <result column="improver_end_plan" property="improverEndPlan"/>
- <result column="improver" property="improver"/>
- <result column="improve_start_time" property="improveStartTime"/>
- <result column="improve_end_time" property="improveEndTime"/>
- <result column="improve_works" property="improveWorks"/>
- <result column="improve_result" property="improveResult"/>
- <!--<result column="house_id" property="houseId"/>-->
- <result column="c_id" property="cId"/>
- <result column="c_time" property="cTime"/>
- <result column="u_id" property="uId"/>
- <result column="u_time" property="uTime"/>
- <result column="version" property="version"/>
- <result column="provinceId" property="provinceId"/>
- <result column="cityId" property="cityId"/>
- <result column="grainId" property="grainId"/>
- <result column="houseId" property="houseId"/>
- <result column="pic" property="pic"/>
- <result column="audit" property="audit"/>
- <result column="checker_pic" property="checkerPic"/>
- <result column="pics" property="pics"/>
- <result column="other_type" property="otherType"/>
- <result column="other_house" property="otherHouse"/>
- <result column="problem_radio" property="problemRadio"/>
- <result column="checker2" property="checker2"/>
- <result column="file_uuid" property="fileUuid"/>
- <result column="checker_unit" property="checkerUnit"/>
- <result column="checker_job" property="checkerJob"/>
- <result column="checker_head" property="checkerHead"/>
- <result column="operator" property="operator"/>
- <result column="code" property="code"/>
- <result column="tick" property="tick"/>
- <result column="back_date" property="backDate"/>
- </resultMap>
- <sql id="columns">
- id ,
- uuid ,
- `type`,
- checker ,
- check_time ,
- check_desc ,
- problems ,
- advices ,
- remarks ,
- capacity ,
- wheat ,
- rice ,
- corn ,
- bean ,
- improver_plan ,
- improver_start_plan ,
- improver_end_plan ,
- improver ,
- improve_start_time ,
- improve_end_time ,
- improve_works ,
- improve_result ,
- c_id ,
- c_time ,
- u_id ,
- u_time ,
- version,
- provinceId,
- cityId,
- houseId,
- grainId,
- pic,
- checker_pic,
- pics,
- audit,
- other_type,
- other_house,
- problem_radio,
- checker2,
- checker_head,
- checker_unit,
- checker_job,
- tick,
- code,
- operator,
- back_date,
- file_uuid
- </sql>
- <sql id="joinCols">
- </sql>
- <select id="get" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_supercheck_file a
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="findList" resultMap="baseMap">
- SELECT
- check_time,
- type,
- audit,
- sync_flag,
- problems,
- problem_radio,
- improver_plan,
- improve_start_time,
- grainId,
- id,
- houseId,
- checker,
- other_house,
- other_type,
- check_desc,
- advices,
- checker_head,
- checker_unit,
- checker_job,
- file_uuid
- FROM daily_record_supercheck_file a
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="type !=null">
- and type = #{type}
- <!--><if test="type ==1 ">
- and ( houseId is not null and houseId != '' )
- </if>
- <if test="type ==2 ">
- and `type`=#{type}
- </if>
- <-->
- </if>
- <if test="searchStartDate !=null">
- and check_time <![CDATA[ >= ]]> #{searchStartDate}
- </if>
- <if test="searchEndDate !=null">
- and check_time <= #{searchEndDate}
- </if>
- <if test="uuid !=null">
- and uuid = #{uuid}
- </if>
- <if test="checker !=null">
- and checker = #{checker}
- </if>
- <if test="checkTime !=null">
- and check_time = #{checkTime}
- </if>
- <if test="advices !=null">
- and advices = #{advices}
- </if>
- <if test="capacity !=null">
- and capacity = #{capacity}
- </if>
- <if test="wheat !=null">
- and wheat = #{wheat}
- </if>
- <if test="rice !=null">
- and rice = #{rice}
- </if>
- <if test="corn !=null">
- and corn = #{corn}
- </if>
- <if test="bean !=null">
- and bean = #{bean}
- </if>
- <if test="improverPlan !=null">
- and improver_plan = #{improverPlan}
- </if>
- <if test="improverStartPlan !=null">
- and improver_start_plan = #{improverStartPlan}
- </if>
- <if test="improverEndPlan !=null">
- and improver_end_plan = #{improverEndPlan}
- </if>
- <if test="improver !=null">
- and improver = #{improver}
- </if>
- <if test="improveStartTime !=null">
- and improve_start_time = #{improveStartTime}
- </if>
- <if test="houseId !=null">
- and houseId = #{houseId}
- </if>
- <if test="grainId !=null">
- and grainId = #{grainId}
- </if>
- <if test="audit !=null">
- and audit = #{audit}
- </if>
- <if test="otherType !=null">
- and other_type = #{otherType}
- </if>
- <if test="otherHouse !=null">
- and other_house = #{otherHouse}
- </if>
- <if test="problemRadio !=null">
- and problem_radio = #{problemRadio}
- </if>
- <if test="houseIds !=null">
- and houseId in
- <foreach item="item" index="index" collection="houseIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="fileUuid !=null">
- and file_uuid = #{fileUuid}
- </if>
- </where>
- order by check_time desc, id desc
- </select>
- <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheckFile">
- INSERT INTO daily_record_supercheck_file
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test=" uuid != null">
- uuid,
- </if>
- <if test=" type != null">
- `type`,
- </if>
- <if test=" checker != null">
- checker,
- </if>
- <if test=" checkTime != null">
- check_time,
- </if>
- <if test=" checkDesc != null">
- check_desc,
- </if>
- <if test=" problems != null">
- problems,
- </if>
- <if test=" advices != null">
- advices,
- </if>
- <if test=" remarks != null">
- remarks,
- </if>
- <if test=" capacity != null">
- capacity,
- </if>
- <if test=" wheat != null">
- wheat,
- </if>
- <if test=" rice != null">
- rice,
- </if>
- <if test=" corn != null">
- corn,
- </if>
- <if test=" bean != null">
- bean,
- </if>
- <if test="improverPlan != null and improverPlan!=''">
- improver_plan ,
- </if>
- <if test="improverStartPlan != null and improverStartPlan!=''">
- improver_start_plan ,
- </if>
- <if test="improverEndPlan != null and improverEndPlan!=''">
- improver_end_plan ,
- </if>
- <if test=" improver != null">
- improver,
- </if>
- <if test=" improveStartTime != null">
- improve_start_time,
- </if>
- <if test=" improveEndTime != null">
- improve_end_time,
- </if>
- <if test=" improveWorks != null">
- improve_works,
- </if>
- <if test=" improveResult != null">
- improve_result,
- </if>
- <if test=" provinceId != null">
- provinceId,
- </if>
- <if test=" cityId != null">
- cityId,
- </if>
- <if test=" grainId != null">
- grainId,
- </if>
- <if test=" houseId != null">
- houseId,
- </if>
- <if test=" pic != null">
- pic,
- </if>
- <if test=" pics != null">
- pics,
- </if>
- <if test=" audit != null">
- audit,
- </if>
- <if test=" checkerPic != null">
- checker_pic,
- </if>
- <if test=" cId != null">
- c_id,
- </if>
- <if test=" cTime != null">
- c_time,
- </if>
- <if test=" uId != null">
- u_id,
- </if>
- <if test=" uTime != null">
- u_time,
- </if>
- <if test=" version != null">
- version,
- </if>
- <if test="otherType !=null">
- other_type,
- </if>
- <if test="otherHouse !=null">
- other_house,
- </if>
- <if test="problemRadio !=null">
- problem_radio,
- </if>
- <if test="checker2 !=null">
- checker2,
- </if>
- <if test="checkerHead !=null">
- checker_head,
- </if>
- <if test="checkerUnit !=null">
- checker_unit,
- </if>
- <if test="checkerJob !=null">
- checker_job,
- </if>
- <if test="code !=null">
- code,
- </if>
- <if test="tick !=null">
- tick,
- </if>
- <if test="operator !=null">
- operator,
- </if>
- <if test="backDate !=null">
- back_date,
- </if>
- <if test="fileUuid !=null">
- file_uuid
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <!--<if test="id !=null">
- #{id},
- </if>-->
- <if test=" uuid != null">
- #{uuid}, </if>
- <if test=" type != null">
- #{type}, </if>
- <if test=" checker != null">
- #{checker}, </if>
- <if test=" checkTime != null">
- #{checkTime}, </if>
- <if test=" checkDesc != null">
- #{checkDesc}, </if>
- <if test=" problems != null">
- #{problems}, </if>
- <if test=" advices != null">
- #{advices}, </if>
- <if test=" remarks != null">
- #{remarks}, </if>
- <if test=" capacity != null">
- #{capacity}, </if>
- <if test=" wheat != null">
- #{wheat}, </if>
- <if test=" rice != null">
- #{rice}, </if>
- <if test=" corn != null">
- #{corn}, </if>
- <if test=" bean != null">
- #{bean}, </if>
- <if test="improverPlan != null and improverPlan!=''">
- #{improverPlan} ,</if>
- <if test="improverStartPlan != null and improverStartPlan!=''">
- #{improverStartPlan} ,</if>
- <if test="improverEndPlan != null and improverEndPlan!=''">
- #{improverEndPlan} ,</if>
- <if test=" improver != null">
- #{improver}, </if>
- <if test=" improveStartTime != null">
- #{improveStartTime}, </if>
- <if test=" improveEndTime != null">
- #{improveEndTime}, </if>
- <if test=" improveWorks != null">
- #{improveWorks}, </if>
- <if test=" improveResult != null">
- #{improveResult}, </if>
- <if test=" provinceId != null">
- #{provinceId},
- </if>
- <if test=" cityId != null">
- #{cityId},
- </if>
- <if test=" grainId != null">
- #{grainId},
- </if>
- <if test=" houseId != null">
- #{houseId},
- </if>
- <if test=" pic != null">
- #{pic},
- </if>
- <if test=" pics != null">
- #{pics},
- </if>
- <if test=" audit != null">
- #{audit},
- </if>
- <if test=" checkerPic != null">
- #{checkerPic},
- </if>
- <if test=" cId != null">
- #{cId}, </if>
- <if test=" cTime != null">
- #{cTime}, </if>
- <if test=" uId != null">
- #{uId}, </if>
- <if test=" uTime != null">
- #{uTime}, </if>
- <if test=" version != null">
- #{version}, </if>
- <if test="otherType !=null">
- #{otherType}, </if>
- <if test="otherHouse !=null">
- #{otherHouse}, </if>
- <if test="problemRadio !=null">
- #{problemRadio},
- </if>
- <if test="checker2 !=null">
- #{checker2},
- </if>
- <if test="checkerHead !=null">
- #{checkerHead},
- </if>
- <if test="checkerUnit !=null">
- #{checkerUnit},
- </if>
- <if test="checkerJob !=null">
- #{checkerJob},
- </if>
- <if test="code !=null">
- #{code},
- </if>
- <if test="tick !=null">
- #{tick},
- </if>
- <if test="operator !=null">
- #{operator},
- </if>
- <if test="backDate !=null">
- #{backDate},
- </if>
- <if test="fileUuid !=null">
- #{fileUuid}
- </if>
- </trim>
- </insert>
- </mapper>
|