123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <?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.DailyRecordHouseIncDecFileDao">
- <resultMap id="baseMap" type="cn.ourwill.module.house.entity.daily.DailyRecordHouseIncDecFile">
- <result column="id" property="id"/>
- <result column="report_organ" property="reportOrgan"/>
- <result column="house_no" property="houseNo"/>
- <result column="grain_id" property="grainId"/>
- <result column="table_no" property="tableNo"/>
- <result column="in_count" property="inCount"/>
- <result column="in_water" property="inWater"/>
- <result column="in_sub" property="inSub"/>
- <result column="in_date" property="inDate"/>
- <result column="out_count" property="outCount"/>
- <result column="out_water" property="outWater"/>
- <result column="out_sub" property="outSub"/>
- <result column="out_date" property="outDate"/>
- <result column="real_consum" property="realConsum"/>
- <result column="nature_consum" property="natureConsum"/>
- <result column="sub_consum" property="subConsum"/>
- <result column="tran_consum" property="tranConsum"/>
- <result column="deal_solu" property="dealSolu"/>
- <result column="leader_solu" property="leaderSolu"/>
- <result column="above_count" property="aboveCount"/>
- <result column="excess_quantity" property="excessQuantity"/>
- <result column="uuid" property="uuid"/>
- <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="house_name" property="houseName"/>
- <result column="file_uuid" property="fileUuid"/>
- </resultMap>
- <sql id="columns">
- a.id,
- a.report_organ,
- a.house_no,
- a.grain_id,
- a.table_no,
- a.in_count,
- a.in_water,
- a.in_sub,
- a.in_date,
- a.out_count,
- a.out_water,
- a.out_sub,
- a.out_date,
- a.real_consum,
- a.nature_consum,
- a.sub_consum,
- a.tran_consum,
- a.deal_solu,
- a.leader_solu,
- above_count,
- excess_quantity,
- a.uuid,
- a.c_id,
- a.c_time,
- a.u_id,
- a.u_time,
- a.version,
- a.file_uuid
- </sql>
- <select id="get" resultMap="baseMap">
- SELECT b.house_name,<include refid="columns"/>
- FROM outhouse_inc_dec_file a LEFT JOIN house_info b ON a.house_no=b.id
- WHERE a.id=#{id}
- </select>
- <select id="getByHouseNo" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM outhouse_inc_dec_file a
- <where>
- <if test="houseNo !=null">
- and house_no = #{houseNo}
- </if>
- <if test="fileUuid !=null">
- and file_uuid = #{fileUuid}
- </if>
- limit 1
- </where>
- </select>
- <insert id="insert" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordHouseIncDecFile">
- INSERT INTO outhouse_inc_dec_file
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <!-- <if test=" id != null">
- id,
- </if>-->
- <if test=" reportOrgan != null">
- report_organ,
- </if>
- <if test=" houseNo != null">
- house_no,
- </if>
- <if test=" grainId != null">
- grain_id,
- </if>
- <if test=" tableNo != null">
- table_no,
- </if>
- <if test=" inCount != null">
- in_count,
- </if>
- <if test=" inWater != null">
- in_water,
- </if>
- <if test=" inSub != null">
- in_sub,
- </if>
- <if test=" inDate != null">
- in_date,
- </if>
- <if test=" outCount != null">
- out_count,
- </if>
- <if test=" outWater != null">
- out_water,
- </if>
- <if test=" outSub != null">
- out_sub,
- </if>
- <if test=" outDate != null">
- out_date,
- </if>
- <if test=" realConsum != null">
- real_consum,
- </if>
- <if test=" natureConsum != null">
- nature_consum,
- </if>
- <if test=" subConsum != null">
- sub_consum,
- </if>
- <if test=" tranConsum != null">
- tran_consum,
- </if>
- <if test=" dealSolu != null">
- deal_solu,
- </if>
- <if test=" leaderSolu != null">
- leader_solu,
- </if>
- <if test=" aboveCount != null">
- above_count,
- </if>
- <if test=" excessQuantity != null">
- excess_quantity,
- </if>
- <if test="uuid != null">
- uuid,
- </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="fileUuid !=null">
- file_uuid
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <!--<if test="id !=null">
- #{id},
- </if>-->
- <if test=" reportOrgan != null">
- #{reportOrgan},
- </if>
- <if test=" houseNo != null">
- #{houseNo},
- </if>
- <if test=" grainId != null">
- #{grainId},
- </if>
- <if test=" tableNo != null">
- #{tableNo},
- </if>
- <if test=" inCount != null">
- #{inCount},
- </if>
- <if test=" inWater != null">
- #{inWater},
- </if>
- <if test=" inSub != null">
- #{inSub},
- </if>
- <if test=" inDate != null">
- #{inDate},
- </if>
- <if test=" outCount != null">
- #{outCount},
- </if>
- <if test=" outWater != null">
- #{outWater},
- </if>
- <if test=" outSub != null">
- #{outSub},
- </if>
- <if test=" outDate != null">
- #{ outDate},
- </if>
- <if test=" realConsum != null">
- #{ realConsum},
- </if>
- <if test=" natureConsum != null">
- #{ natureConsum},
- </if>
- <if test=" subConsum != null">
- #{ subConsum},
- </if>
- <if test=" tranConsum != null">
- #{tranConsum},
- </if>
- <if test=" dealSolu != null">
- #{dealSolu},
- </if>
- <if test=" leaderSolu != null">
- #{leaderSolu},
- </if>
- <if test=" aboveCount != null">
- #{aboveCount},
- </if>
- <if test=" excessQuantity != null">
- #{excessQuantity},
- </if>
- <if test="uuid != null">
- #{uuid},
- </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="fileUuid !=null">
- #{fileUuid}
- </if>
- </trim>
- </insert>
- </mapper>
|