123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- <?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.DailyRecordFoodinfoFileDao">
- <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordFoodinfoFile" id="baseMap">
- <result column="id" property="id"/>
- <result column="uuid" property="uuid"/>
- <result column="house_id" property="houseId"/>
- <result column="type" property="type"/>
- <result column="content" property="content"/>
- <result column="htype" property="htype"/>
- <result column="check_date" property="checkDate"/>
- <result column="food_color" property="foodColor"/>
- <result column="pest_position" property="pestPosition"/>
- <result column="pest_type" property="pestType"/>
- <result column="pest_volum" property="pestVolum"/>
- <result column="pest_level" property="pestLevel"/>
- <result column="water_position" property="waterPosition"/>
- <result column="water_area" property="waterArea"/>
- <result column="water_depth" property="waterDepth"/>
- <result column="water_heightest" property="waterHeightest"/>
- <result column="in_temp" property="inTemp"/>
- <result column="out_temp" property="outTemp"/>
- <result column="in_water" property="inWater"/>
- <result column="out_water" property="outWater"/>
- <result column="max_temp" property="maxTemp"/>
- <result column="maxtemp_position" property="maxtempPosition"/>
- <result column="check_situation" property="checkSituation"/>
- <result column="treatment_advice" property="treatmentAdvice"/>
- <result column="check_sign" property="checkSign"/>
- <result column="custodian_sign" property="custodianSign"/>
- <result column="remark" property="remark"/>
- <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="xzflag" property="xzflag"/>
- <!--以下二期新增字段-->
- <result column="nonormal_type" property="nonormalType"/>
- <result column="nonormal_position" property="nonormalPosition"/>
- <result column="nonormal_domain" property="nonormalDomain"/>
- <result column="nonormal_temp" property="nonormalTemp"/>
- <result column="nonormal_water" property="nonormalWater"/>
- <result column="mouse_record" property="mouseRecord"/>
- <result column="sect_record" property="sectRecord"/>
- <result column="bad_record" property="badRecord"/>
- <result column="accident_record" property="accidentRecord"/>
- <result column="min_temp" property="minTemp"/>
- <result column="avg_temp" property="avgTemp"/>
- <result column="file_uuid" property="fileUuid"/>
- </resultMap>
- <sql id="columns">
- id ,
- uuid ,
- house_id ,
- `type` ,
- content ,
- htype ,
- check_date ,
- food_color ,
- pest_position ,
- pest_type ,
- pest_volum ,
- pest_level ,
- water_position ,
- water_area ,
- water_depth ,
- water_heightest ,
- in_temp ,
- out_temp ,
- in_water ,
- out_water ,
- max_temp ,
- maxtemp_position ,
- check_situation ,
- treatment_advice ,
- check_sign ,
- custodian_sign ,
- remark ,
- c_id ,
- c_time ,
- u_id ,
- u_time ,
- version,
- xzflag,
- nonormal_type,
- nonormal_position,
- nonormal_domain,
- nonormal_temp,
- nonormal_water,
- mouse_record,
- sect_record,
- bad_record,
- accident_record,
- min_temp,
- avg_temp,
- file_uuid
- </sql>
- <sql id="joinCols">
- </sql>
- <select id="getByUuid" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_foodcheckinfo_file a
- <include refid="joinCols"/>
- WHERE a.uuid = #{uuid}
- </select>
- <select id="get" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_foodcheckinfo_file a
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="findList" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_foodcheckinfo_file a
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="searchStartDate !=null">
- and STR_TO_DATE(check_date, '%Y-%m-%d') <![CDATA[ >= ]]> #{searchStartDate}
- </if>
- <if test="searchEndDate !=null">
- and STR_TO_DATE(check_date, '%Y-%m-%d') <= #{searchEndDate}
- </if>
- <if test="uuid !=null">
- and uuid = #{uuid}
- </if>
- <if test="houseId !=null">
- and house_id = #{houseId}
- </if>
- <if test="type !=null">
- and `type` = #{type}
- </if>
- <if test="content !=null">
- and content = #{content}
- </if>
- <if test="htype !=null">
- and htype = #{htype}
- </if>
- <if test="checkDate !=null">
- and check_date = #{checkDate}
- </if>
- <if test="foodColor !=null">
- and food_color = #{foodColor}
- </if>
- <if test="pestPosition !=null">
- and pest_position = #{pestPosition}
- </if>
- <if test="pestType !=null">
- and pest_type = #{pestType}
- </if>
- <if test="pestVolum !=null">
- and pest_volum = #{pestVolum}
- </if>
- <if test="pestLevel !=null">
- and pest_level = #{pestLevel}
- </if>
- <if test="waterPosition !=null">
- and water_position = #{waterPosition}
- </if>
- <if test="waterArea !=null">
- and water_area = #{waterArea}
- </if>
- <if test="waterDepth !=null">
- and water_depth = #{waterDepth}
- </if>
- <if test="waterHeightest !=null">
- and water_heightest = #{waterHeightest}
- </if>
- <if test="inTemp !=null">
- and in_temp = #{inTemp}
- </if>
- <if test="outTemp !=null">
- and out_temp = #{outTemp}
- </if>
- <if test="inWater !=null">
- and in_water = #{inWater}
- </if>
- <if test="outWater !=null">
- and out_water = #{outWater}
- </if>
- <if test="maxTemp !=null">
- and max_temp = #{maxTemp}
- </if>
- <if test="maxtempPosition !=null">
- and maxtemp_position = #{maxtempPosition}
- </if>
- <if test="checkSituation !=null">
- and check_situation = #{checkSituation}
- </if>
- <if test="treatmentAdvice !=null">
- and treatment_advice = #{treatmentAdvice}
- </if>
- <if test="checkSign !=null">
- and check_sign = #{checkSign}
- </if>
- <if test="custodianSign !=null">
- and custodian_sign = #{custodianSign}
- </if>
- <if test="remark !=null">
- and remark = #{remark}
- </if>
- <if test="cId !=null">
- and c_id = #{cId}
- </if>
- <if test="cTime !=null">
- and c_time = #{cTime}
- </if>
- <if test="uId !=null">
- and u_id = #{uId}
- </if>
- <if test="uTime !=null">
- and u_time = #{uTime}
- </if>
- <if test="version !=null">
- and version = #{version}
- </if>
- <if test="xzflag !=null">
- and xzflag = #{xzflag}
- </if>
- <if test="fileUuid !=null">
- and file_uuid = #{fileUuid}
- </if>
- </where>
- <choose>
- <when test="checkOrder !=null and checkOrder = 'true'">
- order by STR_TO_DATE(check_date, '%Y-%m-%d') desc,id desc
- </when>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- </choose>
- </select>
- <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="cn.ourwill.module.house.entity.daily.DailyRecordFoodinfoFile">
- INSERT INTO daily_record_foodcheckinfo_file
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <!-- <if test=" id != null">
- id,
- </if>-->
- <if test=" uuid != null">
- uuid,
- </if>
- <if test=" houseId != null">
- house_id,
- </if>
- <if test=" type != null">
- `type`,
- </if>
- <if test=" content != null">
- content,
- </if>
- <if test=" htype != null">
- htype,
- </if>
- <if test=" checkDate != null">
- check_date,
- </if>
- <if test=" foodColor != null">
- food_color,
- </if>
- <if test=" pestPosition != null">
- pest_position,
- </if>
- <if test=" pestType != null">
- pest_type,
- </if>
- <if test=" pestVolum != null">
- pest_volum,
- </if>
- <if test="pestLevel !=null">
- pest_level,
- </if>
- <if test=" waterPosition != null">
- water_position,
- </if>
- <if test=" waterArea != null">
- water_area,
- </if>
- <if test=" waterDepth != null">
- water_depth,
- </if>
- <if test=" waterHeightest != null">
- water_heightest,
- </if>
- <if test="inTemp !=null">
- in_temp,
- </if>
- <if test="outTemp !=null">
- out_temp,
- </if>
- <if test="inWater !=null">
- in_water,
- </if>
- <if test="outWater !=null">
- out_water,
- </if>
- <if test="maxTemp !=null">
- max_temp,
- </if>
- <if test="maxtempPosition !=null">
- maxtemp_position,
- </if>
- <if test=" checkSituation != null">
- check_situation,
- </if>
- <if test=" treatmentAdvice != null">
- treatment_advice,
- </if>
- <if test=" checkSign != null">
- check_sign,
- </if>
- <if test=" custodianSign != null">
- custodian_sign,
- </if>
- <if test=" remark != null">
- remark,
- </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="xzflag !=null">
- xzflag,
- </if>
- <if test="nonormalType !=null">
- nonormal_type,
- </if>
- <if test="nonormalPosition !=null">
- nonormal_position,
- </if>
- <if test="nonormalDomain !=null">
- nonormal_domain,
- </if>
- <if test="nonormalTemp !=null">
- nonormal_temp,
- </if>
- <if test="nonormalWater !=null">
- nonormal_water,
- </if>
- <if test="mouseRecord !=null">
- mouse_record,
- </if>
- <if test="sectRecord !=null">
- sect_record,
- </if>
- <if test="badRecord !=null">
- bad_record,
- </if>
- <if test="accidentRecord !=null">
- accident_record,
- </if>
- <if test="minTemp !=null">
- min_temp,
- </if>
- <if test="avgTemp !=null">
- avg_temp,
- </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=" houseId != null">
- #{houseId}, </if>
- <if test=" type != null">
- #{type}, </if>
- <if test=" content != null">
- #{content}, </if>
- <if test=" htype != null">
- #{htype}, </if>
- <if test=" checkDate != null">
- #{checkDate}, </if>
- <if test=" foodColor != null">
- #{foodColor}, </if>
- <if test=" pestPosition != null">
- #{pestPosition}, </if>
- <if test=" pestType != null">
- #{pestType}, </if>
- <if test=" pestVolum != null">
- #{pestVolum}, </if>
- <if test="pestLevel !=null">
- #{pestLevel}, </if>
- <if test=" waterPosition != null">
- #{waterPosition}, </if>
- <if test=" waterArea != null">
- #{waterArea}, </if>
- <if test=" waterDepth != null">
- #{waterDepth}, </if>
- <if test=" waterHeightest != null">
- #{waterHeightest}, </if>
- <if test="inTemp !=null">
- #{inTemp}, </if>
- <if test="outTemp !=null">
- #{outTemp}, </if>
- <if test="inWater !=null">
- #{inWater}, </if>
- <if test="outWater !=null">
- #{outWater}, </if>
- <if test="maxTemp !=null">
- #{maxTemp}, </if>
- <if test="maxtempPosition !=null">
- #{maxtempPosition}, </if>
- <if test=" checkSituation != null">
- #{checkSituation}, </if>
- <if test=" treatmentAdvice != null">
- #{treatmentAdvice}, </if>
- <if test=" checkSign != null">
- #{checkSign}, </if>
- <if test=" custodianSign != null">
- #{custodianSign}, </if>
- <if test=" remark != null">
- #{remark}, </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=" xzflag != null">
- #{xzflag}, </if>
- <if test=" nonormalType != null">
- #{nonormalType},
- </if>
- <if test=" nonormalPosition != null">
- #{nonormalPosition},
- </if>
- <if test=" nonormalDomain != null">
- #{nonormalDomain},
- </if>
- <if test=" nonormalTemp != null">
- #{nonormalTemp},
- </if>
- <if test=" nonormalWater != null">
- #{nonormalWater},
- </if>
- <if test=" mouseRecord != null">
- #{mouseRecord},
- </if>
- <if test=" sectRecord != null">
- #{sectRecord},
- </if>
- <if test=" badRecord != null">
- #{badRecord},
- </if>
- <if test=" accidentRecord != null">
- #{accidentRecord},
- </if>
- <if test=" minTemp != null">
- #{minTemp},
- </if>
- <if test=" avgTemp != null">
- #{avgTemp},
- </if>
- <if test="fileUuid !=null">
- #{fileUuid}
- </if>
- </trim>
- </insert>
- </mapper>
|