1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030 |
- <?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.DailyRecordSupercheckDao">
- <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck" 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="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
- </sql>
- <sql id="joinCols">
- </sql>
- <select id="get" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_supercheck a
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="getcheckDate" resultType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
- SELECT
- DATE_FORMAT(a.check_time,'%Y-%m-%d') as check_time,
- a.type,
- a.audit,
- a.sync_flag,
- a.problems,
- a.improver_plan,
- a.grainId,
- hi.house_name,
- CONCAT(sg.NAME,if(hi.house_name <>'',hi.house_name,'其他仓'+a.other_house)) as checker2
- FROM daily_record_supercheck a
- LEFT JOIN sys_grain sg on sg.id=a.grainId
- LEFT JOIN house_info hi on hi.id=a.houseId
- <where>
- <if test="grainId !=null and grainId != ''">
- grainId = #{grainId}
- </if>
- </where>
- /* SELECT
- *
- FROM daily_record_supercheck a
- LEFT JOIN sys_grain sg on sg.id=a.grainId
- LEFT JOIN house_info hi on hi.id=a.houseId*/
- </select>
- <select id="getcheckDateAll" resultType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
- SELECT
- *
- FROM daily_record_supercheck a
- LEFT JOIN sys_grain sg on sg.id=a.grainId
- LEFT JOIN house_info hi on hi.id=a.houseId
- </select>
- <select id="getSearchDatePay" resultType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck" parameterType="java.lang.String" >
- SELECT
- DATE_FORMAT(a.check_time,'%Y-%m-%d') as check_time,
- a.type,
- a.audit,
- a.sync_flag,
- a.problems,
- a.improver_plan,
- a.grainId,
- CONCAT(sg.NAME,if(hi.house_name <>'',hi.house_name,'其他仓'+a.other_house)) as checker2
- FROM daily_record_supercheck a
- LEFT JOIN sys_grain sg on sg.id=a.grainId
- LEFT JOIN house_info hi on hi.id=a.houseId
- <where>
- <if test="searchStartDate !=null and searchStartDate != ''">
- and check_time <![CDATA[ >= ]]> #{searchStartDate}
- </if>
- <if test="searchEndDate !=null and searchEndDate != ''">
- and check_time <= #{searchEndDate}
- </if>
- <if test="grainId !=null and grainId != ''">
- and grainId = #{grainId}
- </if>
- <if test="houseId !=null and houseId != ''">
- and houseId = #{houseId}
- </if>
- </where>
- </select>
- <select id="getByUuid" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_supercheck a
- <include refid="joinCols"/>
- WHERE a.uuid = #{uuid}
- </select>
- <!--监督检查页面查询-->
- <select id="findList" resultMap="baseMap">
- SELECT
- check_time,
- a.type,
- audit,
- sync_flag,
- problems,
- problem_radio,
- improver_plan,
- improve_start_time ,
- improve_end_time ,
- grainId,
- a.id,
- code,
- houseId,
- checker,
- other_house,
- other_type,
- check_desc,
- advices,
- checker_head,
- checker_unit,
- checker_job
- FROM daily_record_supercheck a
- left join sys_grain sg on a.grainId = sg.id
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="type !=null">
- and a.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="cityId !=null and cityId !=''">
- and sg.parentId = #{cityId}
- </if>
- <if test="houseIds !=null">
- and houseId in
- <foreach item="item" index="index" collection="houseIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- order by check_time desc, id desc
- <!--<choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- order by check_time desc
- </otherwise>
- </choose>-->
- </select>
- <select id="findBookList" resultMap="baseMap">
- SELECT
- id,
- grainId,
- problems,
- checker_head,
- improve_result,
- improver,
- improve_start_time,
- improve_end_time,
- tick,
- code,
- operator,
- back_date
- FROM daily_record_supercheck a
- <include refid="joinCols"/>
- <where>
- code is not null
- <if test="code !=null">
- and code = #{code}
- </if>
- <if test="grainId !=null">
- and grainId = #{grainId}
- </if>
- <if test="searchStartDate !=null">
- and back_date <![CDATA[ >= ]]> #{searchStartDate}
- </if>
- <if test="searchEndDate !=null">
- and back_date <= #{searchEndDate}
- </if>
- </where>
- order by check_time desc, id desc
- </select>
- <select id="findAllList" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_supercheck a
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="type !=null">
- <if test="type ==1 ">
- and ( houseId is not null and houseId != '' )
- </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 grainId = #{checkTime}
- </if>
- <if test="code !=null">
- and code = #{code}
- </if>
- <if test="grainId !=null">
- and check_time = #{grainId}
- </if>
- <if test="checkDesc !=null">
- and check_desc = #{checkDesc}
- </if>
- <if test="problems !=null">
- and problems = #{problems}
- </if>
- <if test="advices !=null">
- and advices = #{advices}
- </if>
- <if test="remarks !=null">
- and remarks = #{remarks}
- </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="houseId !=null">
- and houseId = #{houseId}
- </if>
- <if test="version !=null">
- and version = #{version}
- </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>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- order by check_time desc
- </otherwise>
- </choose>
- </select>
- <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
- INSERT INTO daily_record_supercheck
- <trim prefix="(" 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">
- 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>
- </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>
- </trim>
- </insert>
- <update id="update" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
- UPDATE daily_record_supercheck <set>
- <if test="id != null">
- id= #{id} ,
- </if>
- <if test="uuid != null">
- uuid= #{uuid} ,
- </if>
- <if test="type != null">
- `type`= #{type} ,
- </if>
- <if test="checker != null">
- checker= #{checker} ,
- </if>
- <if test="checkTime != null">
- check_time= #{checkTime} ,
- </if>
- <if test="checkDesc != null">
- check_desc= #{checkDesc} ,
- </if>
- <if test="problems != null">
- problems= #{problems} ,
- </if>
- <if test="advices != null">
- advices= #{advices} ,
- </if>
- <if test="remarks != null">
- remarks= #{remarks} ,
- </if>
- <if test="capacity != null">
- capacity= #{capacity} ,
- </if>
- <if test="wheat != null">
- wheat= #{wheat} ,
- </if>
- <if test="rice != null">
- rice= #{rice} ,
- </if>
- <if test="corn != null">
- corn= #{corn} ,
- </if>
- <if test="bean != null">
- bean= #{bean} ,
- </if>
- <if test="improverPlan != null and improverPlan!=''">
- improver_plan= #{improverPlan} ,
- </if>
- <if test="improverStartPlan != null and improverStartPlan!=''">
- improver_start_plan= #{improverStartPlan} ,
- </if>
- <if test="improverEndPlan != null and improverEndPlan!=''">
- improver_end_plan= #{improverEndPlan} ,
- </if>
- <if test="improver != null">
- improver= #{improver} ,
- </if>
- <if test="improveStartTime != null">
- improve_start_time= #{improveStartTime} ,
- </if>
- <if test="improveEndTime != null">
- improve_end_time= #{improveEndTime} ,
- </if>
- <if test="improveWorks != null">
- improve_works= #{improveWorks} ,
- </if>
- <if test="improveResult != null">
- improve_result= #{improveResult} ,
- </if>
- <if test="houseId != null">
- houseId= #{houseId} ,
- </if>
- <if test="audit != null">
- audit= #{audit} ,
- </if>
- <if test="checkerPic != null">
- checker_pic= #{checkerPic} ,
- </if>
- <if test="cId != null">
- c_id= #{cId} ,
- </if>
- <if test="cTime != null">
- c_time= #{cTime} ,
- </if>
- <if test="uId != null">
- u_id= #{uId} ,
- </if>
- <if test="uTime != null">
- u_time= #{uTime} ,
- </if>
- <if test="version != null">
- version= #{version} ,
- </if>
- <if test=" pic != null">
- pic= #{pic},
- </if>
- <if test=" pics != null">
- pics= #{pics},
- </if>
- <if test="otherType !=null">
- other_type = #{otherType},
- </if>
- <if test="otherHouse !=null">
- other_house = #{otherHouse},
- </if>
- <if test="problemRadio !=null">
- problem_radio = #{problemRadio},
- </if>
- <if test="checker2 !=null">
- checker2 = #{checker2},
- </if>
- <if test="checkerHead !=null">
- checker_head =#{checkerHead},
- </if>
- <if test="checkerUnit !=null">
- checker_unit = #{checkerUnit},
- </if>
- <if test="checkerJob !=null">
- checker_job = #{checkerJob},
- </if>
- <if test="code !=null">
- code=#{code},
- </if>
- <if test="tick !=null">
- tick= #{tick},
- </if>
- <if test="operator !=null">
- operator = #{operator},
- </if>
- <if test="backDate !=null">
- back_date = #{backDate}
- </if>
- </set>
- WHERE id = #{id}
- </update>
- <update id="updateByUuid" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
- UPDATE daily_record_supercheck <set>
- <if test="uuid != null">
- uuid= #{uuid} ,
- </if>
- <if test="type != null">
- `type`= #{type} ,
- </if>
- <if test="checker != null">
- checker= #{checker} ,
- </if>
- <if test="checkTime != null">
- check_time= #{checkTime} ,
- </if>
- <if test="checkDesc != null">
- check_desc= #{checkDesc} ,
- </if>
- <if test="problems != null">
- problems= #{problems} ,
- </if>
- <if test="advices != null">
- advices= #{advices} ,
- </if>
- <if test="remarks != null">
- remarks= #{remarks} ,
- </if>
- <if test="capacity != null">
- capacity= #{capacity} ,
- </if>
- <if test="wheat != null">
- wheat= #{wheat} ,
- </if>
- <if test="rice != null">
- rice= #{rice} ,
- </if>
- <if test="corn != null">
- corn= #{corn} ,
- </if>
- <if test="bean != null">
- bean= #{bean} ,
- </if>
- <if test="improverPlan != null">
- improver_plan= #{improverPlan} ,
- </if>
- <if test="improverStartPlan != null">
- improver_start_plan= #{improverStartPlan} ,
- </if>
- <if test="improverEndPlan != null">
- improver_end_plan= #{improverEndPlan} ,
- </if>
- <if test="improver != null">
- improver= #{improver} ,
- </if>
- <if test="improveStartTime != null">
- improve_start_time= #{improveStartTime} ,
- </if>
- <if test="improveEndTime != null">
- improve_end_time= #{improveEndTime} ,
- </if>
- <if test="improveWorks != null">
- improve_works= #{improveWorks} ,
- </if>
- <if test="improveResult != null">
- improve_result= #{improveResult} ,
- </if>
- <if test="houseId != null">
- houseId= #{houseId} ,
- </if>
- <if test="audit != null">
- audit= #{audit} ,
- </if>
- <if test="checkerPic != null">
- checker_pic= #{checkerPic} ,
- </if>
- <if test="cId != null">
- c_id= #{cId} ,
- </if>
- <if test="cTime != null">
- c_time= #{cTime} ,
- </if>
- <if test="uId != null">
- u_id= #{uId} ,
- </if>
- <if test="uTime != null">
- u_time= #{uTime} ,
- </if>
- <if test="version != null">
- version= #{version} ,
- </if>
- <if test=" pic != null">
- pic= #{pic},
- </if>
- <if test=" pics != null">
- pics= #{pics},
- </if>
- <if test="otherType !=null">
- other_type = #{otherType},
- </if>
- <if test="otherHouse !=null">
- other_house = #{otherHouse},
- </if>
- <if test="problemRadio !=null">
- problem_radio = #{problemRadio},
- </if>
- <if test="checker2 !=null">
- checker2 = #{checker2},
- </if>
- <if test="checkerHead !=null">
- checker_head =#{checkerHead},
- </if>
- <if test="checkerUnit !=null">
- checker_unit = #{checkerUnit},
- </if>
- <if test="checkerJob !=null">
- checker_job = #{checkerJob},
- </if>
- <if test="code !=null">
- code=#{code},
- </if>
- <if test="tick !=null">
- tick= #{tick},
- </if>
- <if test="operator !=null">
- operator = #{operator},
- </if>
- <if test="backDate !=null">
- back_date = #{backDate}
- </if>
- </set>
- WHERE uuid = #{uuid}
- </update>
- <delete id="deleteById" parameterType="java.lang.Long">
- DELETE FROM daily_record_supercheck WHERE id = #{id}
- </delete>
- <delete id="deleteByIds" parameterType="java.util.List">
- DELETE FROM daily_record_supercheck WHERE id IN
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </delete>
- <select id="findByHouseId" resultMap="baseMap">
- SELECT *
- FROM daily_record_supercheck
- where houseId=#{houseId} /*AND other_type='日常查仓'*/
- <if test="cTime != null">
- AND check_time <![CDATA[ <= ]]> #{cTime}
- </if>
- </select>
- <select id="findByHouseIdNoPage" resultMap="baseMap">
- SELECT *
- FROM daily_record_supercheck
- where houseId=#{houseId} AND other_type='日常查仓'
- <if test="cTime != null">
- AND check_time <![CDATA[ <= ]]> #{cTime}
- </if>
- </select>
- <select id="findByHouseId1" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT checker
- FROM daily_record_supercheck
- where houseId=#{houseId}
- </select>
- <select id="findHouseId" resultMap="baseMap">
- SELECT *
- FROM daily_record_supercheck
- <where>
- <if test="houseId !=null">
- and houseId = #{houseId}
- </if>
- <if test="cTime !=null">
- and check_time like CONCAT(#{cTime},'%')
- </if>
- </where>
- order by check_time asc limit #{num},#{size}
- </select>
- <delete id="deleteSupercheckByHouseId" parameterType="java.lang.Long">
- DELETE FROM daily_record_supercheck
- WHERE houseId = #{houseId}
- <if test="cTime != null">
- AND check_time <![CDATA[ <= ]]> #{cTime}
- </if>
- </delete>
- </mapper>
|