123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188 |
- <!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.dm.RecordDeviceGetDao">
- <resultMap type="cn.ourwill.module.house.entity.dm.RecordDeviceGet" id="baseMap">
- <result column="id" property="id"/>
- <result column="uuid" property="uuid"/>
- <result column="grain_id" property="grainId"/>
- <result column="house_id" property="houseId"/>
- <result column="get_man" property="getMan"/>
- <result column="get_number" property="getNumber"/>
- <result column="back_number" property="backNumber"/>
- <result column="bookkeeper" property="bookkeeper"/>
- <result column="handler" property="handler"/>
- <result column="number" property="number"/>
- <result column="unit" property="unit"/>
- <result column="collator" property="collator"/>
- <result column="get_time" property="getTime"/>
- <result column="device_describe" property="deviceDescribe"/>
- <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="model_uuid" property="modelUuid"/>
- <result column="other_house" property="otherHouse"/>
- <result column="device_id_of" property="device_id_of"/>
- <result column="workingStatus" property="workingStatus"/>
- <result column="grain_type" property="grain_type"/>
- <result column="pro_num" property="pro_num"/>
- <result column="department_head" property="departmentHead"/>
- <result column="leaders_in_charge" property="leadersInCharge"/>
- <result column="employer" property="employer"/>
- <result column="responsible_department_head" property="responsibleDepartmentHead"/>
- <result column="retrieval_department" property="retrievalDepartment"/>
- <result column="amount" property="amount"/>
- <result column="unit_price" property="unitPrice"/>
- <result column="application_department" property="applicationDepartment"/>
- <result column="applicant" property="applicant"/>
- <result column="application_reason" property="applicationReason"/>
- <result column="department_heads" property="departmentHeads"/>
- <result column="leadership_opinions" property="leadershipOpinions"/>
- <result column="normal_boot" property="normalBoot"/>
- <result column="normal_operation" property="normalOperation"/>
- <result column="clean_and_tidy" property="cleanAndTidy"/>
- <result column="fixed_asset_number" property="fixedAssetNumber"/>
- </resultMap>
- <resultMap type="cn.ourwill.module.house.entity.dm.RecordDeviceGet" id="mapOfFind" extends="baseMap">
- <result column="name" property="grainName"/>
- <result column="namee" property="grainName1"/>
- <result column="house_name" property="houseName"/>
- <result column="device_name" property="deviceName"/>
- <result column="device_model" property="deviceModel"/>
- <result column="device_kind" property="device_kind"/>
- <result column="grain_get_id" property="grainGetId"/>
- <result column="house_name" property="houseName"/>
- <result column="device_no" property="deviceNo"/>
- <result column="model_uuid" property="modelUuid"/>
- <result column="status_repair" property="statusRepair"/>
- <result column="return_time" property="returnTime"/>
- </resultMap>
- <sql id="columns">
- a.id ,
- a.uuid ,
- a.grain_id ,
- a.house_id ,
- a.get_man ,
- a.get_number ,
- a.back_number ,
- a.bookkeeper ,
- a.handler ,
- a.`number` ,
- a.unit ,
- a.collator ,
- a.get_time ,
- a.device_describe ,
- a.unit_price ,
- a.remark ,
- a.c_id ,
- a.c_time ,
- a.u_id ,
- a.u_time ,
- a.model_uuid,
- a.grain_get_id,
- a.other_house,
- a.device_id_of,
- a.workingStatus,
- a.grain_type,
- a.pro_num,
- a.amount,
- a.department_head,
- a.leaders_in_charge
- </sql>
- <sql id="columnnew">
- a.uuid,
- a.other_house,
- a.grain_id ,
- a.house_id ,
- a.get_man ,
- a.get_number ,
- a.back_number ,
- a.bookkeeper ,
- a.handler ,
- a.`number` ,
- a.collator ,
- a.get_time ,
- a.model_uuid,
- /*ddm.device_model,*/
- a.grain_get_id,
- a.device_id_of
- </sql>
- <sql id="cnew">
- /*仓储设备使用单新加字段*/
- a.application_department,
- a.applicant,
- a.application_reason ,
- a.department_heads ,
- a.leadership_opinions ,
- a.normal_boot ,
- a.normal_operation ,
- a.clean_and_tidy ,
- a.fixed_asset_number,
- </sql>
- <sql id="columsOfFind">
- sg.name ,
- ddm.device_name ,
- ddm.device_model ,
- ddm.device_kind,
- </sql>
- <sql id="columsOfFindds">
- ddm.device_name ,
- ddm.device_model ,
- ddm.device_kind,
- </sql>
- <sql id="columsOfFinds">
- sg.name AS grain_name1,
- ddm.device_name ,
- ddm.device_model ,
- ddm.device_kind,
- </sql>
- <sql id="columnssnew">
- c.house_name,
- </sql>
- <sql id="columnss">
- d.name AS namee,
- c.house_name,
- </sql>
- <sql id="columndd">
- dd.device_no,
- dd.asset_number,
- </sql>
- <sql id="joinCols">
- </sql>
- <select id="get" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM record_device_get a
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="getDetailsById" resultMap="mapOfFind">
- SELECT
- house_name,
- a.other_house,
- a.employer,
- a.retrieval_department,
- a.responsible_department_head,
- <include refid="columsOfFind"/>
- <include refid="columns"/>
- FROM record_device_get a
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- left join sys_grain sg on sg.id = a.grain_id
- left join house_info hf on a.house_id=hf.id
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="getborrowList" resultMap="mapOfFind">
- SELECT
- hf.house_name,
- dd.device_no,
- a.other_house,
- <include refid="columsOfFind"/>
- <include refid="columns"/>
- FROM record_device_get a
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- left join sys_grain sg on sg.id = a.grain_id
- left join house_info hf on a.house_id=hf.id
- left join device_get_log dgl on dgl.get_uuid=a.uuid
- left JOIN dm_device dd on dd.uuid=dgl.device_uuid
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="getReturnList" resultMap="mapOfFind">
- SELECT
- hf.house_name,
- rdb.get_uuid,
- rdb.collator,
- rdb.bookkeeper,
- rdb.return_time,
- rdb.status_repair,
- rdb.device_no,
- a.other_house,
- <include refid="columsOfFind"/>
- <include refid="columns"/>
- FROM
- record_device_get a
- LEFT JOIN sys_grain sg ON sg.id = a.grain_id
- LEFT JOIN house_info hf ON a.house_id = hf.id
- LEFT JOIN dm_device_model ddm ON a.model_uuid = ddm.uuid
- LEFT JOIN record_device_back rdb ON rdb.get_uuid = a.uuid
- WHERE a.id = #{id} and a.back_number<![CDATA[ <> ]]>'0'
- </select>
- <!-- <select id="getReturnList" resultMap="mapOfFind">
- SELECT
- rdb.collator,
- rdb.bookkeeper,
- rdb.return_time
- FROM record_device_back rdb
- LEFT JOIN record_device_get a on rdb.get_uuid=a.uuid
- WHERE a.id = #{id}
- </select>
- <select id="getDeviceInfoList" resultMap="mapOfFind">
- SELECT
- sg.name,
- hf.house_name,
- dd.device_no,
- dd.status_repair,
- ddm.device_name,
- ddm.device_model
- FROM record_device_get a
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- left join sys_grain sg on sg.id = a.grain_id
- left join house_info hf on a.house_id=hf.id
- left join dm_device dd on dd.get_uuid=a.uuid
- WHERE a.id = #{id} AND dd.status_repair in (0,2)
- </select>-->
- <select id="getByUuid" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM record_device_get a
- <include refid="joinCols"/>
- WHERE a.uuid = #{uuid}
- </select>
- <select id="getModelUuid" resultMap="baseMap">
- SELECT
- <include refid="columsOfFindds"/>
- <include refid="columns"/>
- FROM record_device_get a
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- <include refid="joinCols"/>
- WHERE uuid=#{modelUuid}
- </select>
- <select id="getIdName" resultType="java.lang.String" parameterType="java.lang.String">
- SELECT name FROM sys_grain WHERE id=#{grainGetId}
- </select>
- <select id="getDeviceGetList" resultType="java.lang.Double" parameterType="java.lang.String">
- SELECT
- SUM(a.get_number)
- FROM record_device_get a
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- left join sys_grain sg on sg.id = a.grain_id
- WHERE a.grain_id = #{grainId}
- AND ddm.device_name = #{deviceName}
- AND ddm.device_model = #{deviceModel}
- </select>
- <select id="findList" resultMap="mapOfFind">
- SELECT
- DISTINCT a.id ,
- <include refid="columsOfFinds"/>
- <include refid="columnssnew"/>
- <include refid="columndd"/>
- <include refid="columnnew"/>
- FROM record_device_get a
- /* LEFT JOIN house_info c ON c.id = a.house_id
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- left join sys_grain sg on sg.id = a.grain_id
- LEFT JOIN sys_grain d ON d.id = (
- SELECT
- grain_id
- FROM
- dm_device_model
- WHERE
- uuid = a.model_uuid
- )*/
- LEFT JOIN house_info c ON c.id = a.house_id
- LEFT JOIN (select dm.uuid,dm.device_name,
- dm.device_model,
- dm.device_kind from dm_device_model dm) ddm ON a.model_uuid = ddm.uuid
- LEFT JOIN (
- SELECT
- d.device_no,
- d.model_uuid as mouuid,
- d.get_uuid,
- d.asset_number
- FROM
- dm_device d
- ) dd ON ddm.uuid = dd.mouuid AND dd.get_uuid=a.uuid
- LEFT JOIN (select s.`name`,s.id,s.parentId from sys_grain s) sg ON sg.id = a.grain_id
- <include refid="joinCols"/>
- <where>
- <if test="grainId !=null">
- and a.grain_id = #{grainId}
- </if>
- <if test="cityId !=null">
- and sg.parentId = #{cityId}
- </if>
- <if test="houseId !=null">
- and a.house_id = #{houseId}
- </if>
- <if test="deviceName !=null and deviceName!=''">
- and ddm.device_name = #{deviceName}
- </if>
- <if test="deviceModel !=null and deviceModel!=''">
- and ddm.device_model = #{deviceModel}
- </if>
- <if test="device_kind!=null and device_kind!=''">
- and ddm.device_kind=#{device_kind}
- </if>
- <if test="deviceNo!=null and deviceNo!=''">
- and dd.device_no=#{deviceNo}
- </if>
- <if test="grainGetId!=null and grainGetId!=''">
- and a.grain_get_id=#{grainGetId}
- </if>
- <if test="getTime !=null">
- and a.get_time like CONCAT('%',#{getTime},'%')
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- ORDER BY get_time desc
- </otherwise>
- </choose>
- </select>
- <select id="findDeviceList" resultMap="mapOfFind">
- SELECT DISTINCT
- a.id,
- sg. NAME AS grain_name1,
- ddm.device_name,
- ddm.device_model,
- ddm.device_kind,
- c.house_name,
- dd.device_no,
- dd.asset_number,
- a.uuid,
- a.other_house,
- a.grain_id,
- a.house_id,
- a.get_man,
- a.get_number,
- a.back_number,
- a.bookkeeper,
- a. HANDLER,
- a.`number`,
- a.collator,
- a.get_time,
- a.model_uuid,
- /*ddm.device_model,*/
- a.grain_get_id,
- a.device_id_of
- FROM
- record_device_get a
- LEFT JOIN
- house_info c ON c.id = a.house_id
- LEFT JOIN
- dm_device_model ddm ON a.model_uuid = ddm.uuid
- LEFT JOIN
- dm_device dd ON ddm.uuid = dd.model_uuid
- AND dd.get_uuid = a.uuid
- LEFT JOIN
- sys_grain sg ON sg.id = a.grain_id
- <include refid="joinCols"/>
- <where>
- <if test="grainId !=null">
- and a.grain_id = #{grainId}
- </if>
- <if test="cityId !=null">
- and sg.parentId = #{cityId}
- </if>
- <if test="houseId !=null">
- and a.house_id = #{houseId}
- </if>
- <if test="deviceName !=null and deviceName!=''">
- and ddm.device_name = #{deviceName}
- </if>
- <if test="deviceModel !=null and deviceModel!=''">
- and ddm.device_model = #{deviceModel}
- </if>
- <!--<if test="device_kind!=null and device_kind!=''">-->
- and ddm.device_kind=1
- <!-- </if>-->
- <if test="deviceNo!=null and deviceNo!=''">
- and dd.device_no=#{deviceNo}
- </if>
- <if test="grainGetId!=null and grainGetId!=''">
- and a.grain_get_id=#{grainGetId}
- </if>
- <if test="getTime !=null">
- and a.get_time like CONCAT('%',#{getTime},'%')
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- ORDER BY a.get_time desc
- </otherwise>
- </choose>
- </select>
- <select id="findMaterialList" resultMap="mapOfFind">
- SELECT DISTINCT
- a.id,
- sg. NAME AS grain_name1,
- ddm.device_name,
- ddm.device_model,
- ddm.device_kind,
- c.house_name,
- dd.device_no,
- dd.asset_number,
- a.uuid,
- a.other_house,
- a.grain_id,
- a.house_id,
- a.get_man,
- a.get_number,
- a.back_number,
- a.bookkeeper,
- a. HANDLER,
- a.`number`,
- a.collator,
- a.get_time,
- a.model_uuid,
- /*ddm.device_model,*/
- a.grain_get_id,
- a.device_id_of
- FROM
- record_device_get a
- LEFT JOIN
- house_info c ON c.id = a.house_id
- LEFT JOIN
- dm_device_model ddm ON a.model_uuid = ddm.uuid
- LEFT JOIN
- dm_device dd ON ddm.uuid = dd.model_uuid
- AND dd.get_uuid = a.uuid
- LEFT JOIN
- sys_grain sg ON sg.id = a.grain_id
- <include refid="joinCols"/>
- <where>
- <if test="grainId !=null">
- and a.grain_id = #{grainId}
- </if>
- <if test="cityId !=null">
- and sg.parentId = #{cityId}
- </if>
- <if test="houseId !=null">
- and a.house_id = #{houseId}
- </if>
- <if test="deviceName !=null and deviceName!=''">
- and ddm.device_name = #{deviceName}
- </if>
- <if test="deviceModel !=null and deviceModel!=''">
- and ddm.device_model = #{deviceModel}
- </if>
- <!--<if test="device_kind!=null and device_kind!=''">-->
- and ddm.device_kind!=1
- <!-- </if>-->
- <if test="deviceNo!=null and deviceNo!=''">
- and dd.device_no=#{deviceNo}
- </if>
- <if test="grainGetId!=null and grainGetId!=''">
- and a.grain_get_id=#{grainGetId}
- </if>
- <if test="getTime !=null">
- and a.get_time like CONCAT('%',#{getTime},'%')
- </if>
- </where>
- GROUP BY a.id
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- ORDER BY get_time desc
- </otherwise>
- </choose>
- </select>
- <select id="findAllList" resultMap="mapOfFind">
- SELECT
- <include refid="columsOfFind"/>
- <include refid="columns"/>
- FROM record_device_get a
- left join dm_device_model ddm on a.model_uuid = ddm.uuid
- left join sys_grain sg on sg.id = a.grain_id
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and a.id = #{id}
- </if>
- <if test="uuid !=null">
- and a.uuid = #{uuid}
- </if>
- <if test="grainId !=null">
- and a.grain_id = #{grainId}
- </if>
- <if test="houseId !=null">
- and a.house_id = #{houseId}
- </if>
- <if test="getMan !=null">
- and a.get_man = #{getMan}
- </if>
- <if test="deviceName !=null">
- and ddm.device_name = #{deviceName}
- </if>
- <if test="deviceModel !=null">
- and dm.device_model = #{deviceModel}
- </if>
- <if test="getNumber !=null">
- and a.get_number = #{getNumber}
- </if>
- <if test="backNumber !=null">
- and a.back_number = #{backNumber}
- </if>
- <if test="bookkeeper !=null">
- and a.bookkeeper = #{bookkeeper}
- </if>
- <if test="handler !=null">
- and a.handler = #{handler}
- </if>
- <if test="number !=null">
- and a.`number` = #{number}
- </if>
- <if test="unit !=null">
- and a.unit = #{unit}
- </if>
- <if test="collator !=null">
- and a.collator = #{collator}
- </if>
- <if test="getTime !=null">
- and a.get_time = #{getTime}
- </if>
- <if test="deviceDescribe !=null">
- and a.device_describe = #{deviceDescribe}
- </if>
- <if test="remark !=null">
- and a.remark = #{remark}
- </if>
- <if test="cId !=null">
- and a.c_id = #{cId}
- </if>
- <if test="cTime !=null">
- and a.c_time = #{cTime}
- </if>
- <if test="uId !=null">
- and a.u_id = #{uId}
- </if>
- <if test="uTime !=null">
- and a.u_time = #{uTime}
- </if>
- <if test="modelUuid !=null">
- and a.model_uuid = #{modelUuid}
- </if>
- <if test="departmentHead !=null">
- and a.department_head = #{departmentHead}
- </if>
- <if test="leadersInCharge !=null">
- and a.leaders_in_charge = #{leadersInCharge}
- </if>
- <if test="employer !=null">
- and a.employer = #{employer}
- </if>
- <if test="responsibleDepartmentHead !=null">
- and a.responsible_department_head = #{responsibleDepartmentHead}
- </if>
- <if test="retrievalDepartment !=null">
- and a.retrieval_department = #{retrievalDepartment}
- </if>
- <if test="amount !=null">
- and a.amount = #{amount}
- </if>
- <if test="unitPrice !=null">
- and a.unit_price = #{unitPrice}
- </if>
- <if test="applicationDepartment !=null">
- and a.application_department = #{applicationDepartment}
- </if>
- <if test="applicant !=null">
- and a.applicant = #{applicant}
- </if>
- <if test="applicationReason !=null">
- and a.application_reason = #{applicationReason}
- </if>
- <if test="departmentHeads !=null">
- and a.department_heads = #{departmentHeads}
- </if>
- <if test="leadershipOpinions !=null">
- and a.leadership_opinions = #{leadershipOpinions}
- </if>
- <if test="normalBoot !=null">
- and a.normal_boot = #{normalBoot}
- </if>
- <if test="normalOperation !=null">
- and a.normal_operation = #{normalOperation}
- </if>
- <if test="cleanAndTidy !=null">
- and a.clean_and_tidy = #{cleanAndTidy}
- </if>
- <if test="fixedAssetNumber !=null">
- and a.fixed_asset_number = #{fixedAssetNumber}
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <select id="selectSumGetNumber" resultType="java.lang.Double">
- SELECT sum(get_number) FROM record_device_get WHERE model_uuid=#{modelUuid} ORDER BY c_time ASC LIMIT 1
- </select>
- <select id="selectPaymentNumber" resultType="java.lang.Double">
- SELECT number from daily_record_payment ORDER BY id DESC LIMIT 1
- </select>
- <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="cn.ourwill.module.house.entity.dm.RecordDeviceGet">
- INSERT INTO record_device_get
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test=" id != null">
- id,
- </if>
- <if test="uuid !=null">
- uuid,
- </if>
- <if test=" grainId != null">
- grain_id,
- </if>
- <if test="houseId !=null">
- house_id,
- </if>
- <if test="getMan !=null">
- get_man,
- </if>
- <if test=" getNumber != null">
- get_number,
- </if>
- <if test=" backNumber != null">
- back_number,
- </if>
- <if test=" bookkeeper != null">
- bookkeeper,
- </if>
- <if test=" handler != null">
- handler,
- </if>
- <if test=" number != null">
- `number`,
- </if>
- <if test=" unit != null">
- unit,
- </if>
- <if test=" collator != null">
- collator,
- </if>
- <if test=" getTime != null">
- get_time,
- </if>
- <if test=" deviceDescribe != null">
- device_describe,
- </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="modelUuid !=null">
- model_uuid,
- </if>
- <if test="grainGetId!=null and grainGetId!=''">
- grain_get_id,
- </if>
- <if test="otherHouse !=null">
- other_house,
- </if>
- <if test="device_id_of !=null">
- device_id_of,
- </if>
- <if test="workingStatus !=null">
- workingStatus,
- </if>
- <if test="grain_type !=null">
- grain_type,
- </if>
- <if test="pro_num !=null and pro_num!=''">
- pro_num,
- </if>
- <if test="departmentHead !=null">
- department_head,
- </if>
- <if test="leadersInCharge !=null">
- leaders_in_charge,
- </if>
- <if test="employer !=null">
- employer,
- </if>
- <if test="responsibleDepartmentHead !=null">
- responsible_department_head,
- </if>
- <if test="retrievalDepartment !=null">
- retrieval_department,
- </if>
- <if test="amount !=null">
- amount,
- </if>
- <if test="unitPrice !=null">
- unit_price,
- </if>
- <if test="applicationDepartment !=null">
- application_department ,
- </if>
- <if test="applicant !=null">
- applicant,
- </if>
- <if test="applicationReason !=null">
- application_reason,
- </if>
- <if test="departmentHeads !=null">
- department_heads,
- </if>
- <if test="leadershipOpinions !=null">
- leadership_opinions ,
- </if>
- <if test="normalBoot !=null">
- normal_boot ,
- </if>
- <if test="normalOperation !=null">
- normal_operation ,
- </if>
- <if test="cleanAndTidy !=null">
- clean_and_tidy,
- </if>
- <if test="fixedAssetNumber !=null">
- fixed_asset_number
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test=" id != null">
- #{id},
- </if>
- <if test="uuid !=null">
- #{uuid},
- </if>
- <if test=" grainId != null">
- #{grainId},
- </if>
- <if test="houseId !=null">
- #{houseId},
- </if>
- <if test="getMan !=null">
- #{getMan},
- </if>
- <if test=" getNumber != null">
- #{getNumber},
- </if>
- <if test=" backNumber != null">
- #{backNumber},
- </if>
- <if test=" bookkeeper != null">
- #{bookkeeper},
- </if>
- <if test=" handler != null">
- #{handler},
- </if>
- <if test=" number != null">
- #{number},
- </if>
- <if test=" unit != null">
- #{unit},
- </if>
- <if test=" collator != null">
- #{collator},
- </if>
- <if test=" getTime != null">
- #{getTime},
- </if>
- <if test=" deviceDescribe != null">
- #{deviceDescribe},
- </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="modelUuid !=null">
- #{modelUuid},
- </if>
- <if test="grainGetId!=null and grainGetId!=''">
- #{grainGetId},
- </if>
- <if test="otherHouse !=null">
- #{otherHouse},
- </if>
- <if test="device_id_of !=null">
- #{device_id_of},
- </if>
- <if test="workingStatus !=null">
- #{workingStatus},
- </if>
- <if test="grain_type !=null">
- #{grain_type},
- </if>
- <if test="pro_num !=null and pro_num!=''">
- #{pro_num},
- </if>
- <if test="departmentHead !=null">
- #{departmentHead},
- </if>
- <if test="leadersInCharge !=null">
- #{leadersInCharge},
- </if>
- <if test="employer !=null">
- #{employer},
- </if>
- <if test="responsibleDepartmentHead !=null">
- #{responsibleDepartmentHead},
- </if>
- <if test="retrievalDepartment !=null">
- #{retrievalDepartment},
- </if>
- <if test="amount !=null">
- #{amount},
- </if>
- <if test="unitPrice !=null">
- #{unitPrice},
- </if>
- <if test="applicationDepartment !=null">
- #{applicationDepartment},
- </if>
- <if test="applicant !=null">
- #{applicant},
- </if>
- <if test="applicationReason !=null">
- #{applicationReason},
- </if>
- <if test="departmentHeads !=null">
- #{departmentHeads},
- </if>
- <if test="leadershipOpinions !=null">
- #{leadershipOpinions},
- </if>
- <if test="normalBoot !=null">
- #{normalBoot},
- </if>
- <if test="normalOperation !=null">
- #{normalOperation},
- </if>
- <if test="cleanAndTidy !=null">
- #{cleanAndTidy},
- </if>
- <if test="fixedAssetNumber !=null">
- #{fixedAssetNumber}
- </if>
- </trim>
- </insert>
- <update id="update" parameterType="cn.ourwill.module.house.entity.dm.RecordDeviceGet">
- UPDATE record_device_get
- <set>
- <if test="id != null">
- id= #{id} ,
- </if>
- <if test="uuid !=null">
- uuid = #{uuid} ,
- </if>
- <if test="grainId != null">
- grain_id= #{grainId} ,
- </if>
- <if test="houseId !=null">
- house_id = #{houseId} ,
- </if>
- <if test="getMan !=null">
- get_man = #{getMan} ,
- </if>
- <if test="deviceName != null">
- device_name= #{deviceName} ,
- </if>
- <if test="deviceModel != null">
- device_model= #{deviceModel} ,
- </if>
- <if test="getNumber != null">
- get_number= #{getNumber} ,
- </if>
- <if test="backNumber != null">
- back_number= #{backNumber} ,
- </if>
- <if test="bookkeeper != null">
- bookkeeper= #{bookkeeper} ,
- </if>
- <if test="handler != null">
- handler= #{handler} ,
- </if>
- <if test="number != null">
- `number`= #{number} ,
- </if>
- <if test="unit != null">
- unit= #{unit} ,
- </if>
- <if test="collator != null">
- collator= #{collator} ,
- </if>
- <if test="getTime != null">
- get_time= #{getTime} ,
- </if>
- <if test="deviceDescribe != null">
- device_describe= #{deviceDescribe} ,
- </if>
- <if test="remark != null">
- remark= #{remark} ,
- </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="modelUuid !=null">
- model_uuid = #{modelUuid},
- </if>
- <if test="device_id_of !=null">
- device_id_of = #{device_id_of},
- </if>
- <if test="workingStatus !=null">
- workingStatus = #{workingStatus},
- </if>
- <if test="grain_type !=null">
- grain_type = #{grain_type},
- </if>
- <if test="pro_num !=null and pro_num!=''">
- pro_num = #{pro_num},
- </if>
- <if test="departmentHead !=null">
- department_head = #{departmentHead},
- </if>
- <if test="leadersInCharge !=null">
- leaders_in_charge = #{leadersInCharge},
- </if>
- <if test="employer !=null">
- employer = #{employer},
- </if>
- <if test="responsibleDepartmentHead !=null">
- responsible_department_head = #{responsibleDepartmentHead},
- </if>
- <if test="retrievalDepartment !=null">
- retrieval_department = #{retrievalDepartment},
- </if>
- <if test="amount !=null">
- amount = #{amount},
- </if>
- <if test="unitPrice !=null">
- unit_price = #{unitPrice},
- </if>
- <if test="applicationDepartment !=null">
- application_department = #{applicationDepartment},
- </if>
- <if test="applicant !=null">
- applicant = #{applicant},
- </if>
- <if test="applicationReason !=null">
- application_reason = #{applicationReason},
- </if>
- <if test="departmentHeads !=null">
- department_heads = #{departmentHeads},
- </if>
- <if test="leadershipOpinions !=null">
- leadership_opinions = #{leadershipOpinions},
- </if>
- <if test="normalBoot !=null">
- normal_boot = #{normalBoot},
- </if>
- <if test="normalOperation !=null">
- normal_operation = #{normalOperation},
- </if>
- <if test="cleanAndTidy !=null">
- clean_and_tidy = #{cleanAndTidy},
- </if>
- <if test="fixedAssetNumber !=null">
- and a.fixed_asset_number = #{fixedAssetNumber}
- </if>
- </set>
- WHERE id = #{id}
- </update>
- <update id="updateByUuid" parameterType="cn.ourwill.module.house.entity.dm.RecordDeviceGet">
- UPDATE record_device_get
- <set>
- <if test="uuid !=null">
- uuid = #{uuid} ,
- </if>
- <if test="grainId != null">
- grain_id= #{grainId} ,
- </if>
- <if test="houseId !=null">
- house_id = #{houseId} ,
- </if>
- <if test="getMan !=null">
- get_man = #{getMan} ,
- </if>
- <if test="deviceName != null">
- device_name= #{deviceName} ,
- </if>
- <if test="deviceModel != null">
- device_model= #{deviceModel} ,
- </if>
- <if test="getNumber != null">
- get_number= #{getNumber} ,
- </if>
- <if test="backNumber != null">
- back_number= #{backNumber} ,
- </if>
- <if test="bookkeeper != null">
- bookkeeper= #{bookkeeper} ,
- </if>
- <if test="handler != null">
- handler= #{handler} ,
- </if>
- <if test="number != null">
- `number`= #{number} ,
- </if>
- <if test="unit != null">
- unit= #{unit} ,
- </if>
- <if test="collator != null">
- collator= #{collator} ,
- </if>
- <if test="getTime != null">
- get_time= #{getTime} ,
- </if>
- <if test="deviceDescribe != null">
- device_describe= #{deviceDescribe} ,
- </if>
- <if test="remark != null">
- remark= #{remark} ,
- </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="modelUuid !=null">
- model_uuid = #{modelUuid},
- </if>
- <if test="device_id_of !=null">
- device_id_of = #{device_id_of},
- </if>
- <if test="workingStatus !=null">
- workingStatus = #{workingStatus},
- </if>
- <if test="grain_type !=null">
- grain_type = #{grain_type},
- </if>
- <if test="pro_num !=null and pro_num!=''">
- pro_num = #{pro_num},
- </if>
- <if test="departmentHead !=null">
- department_head = #{departmentHead},
- </if>
- <if test="leadersInCharge !=null">
- leaders_in_charge = #{leadersInCharge},
- </if>
- <if test="employer !=null">
- employer = #{employer},
- </if>
- <if test="responsibleDepartmentHead !=null">
- responsible_department_head = #{responsibleDepartmentHead},
- </if>
- <if test="retrievalDepartment !=null">
- retrieval_department = #{retrievalDepartment},
- </if>
- <if test="amount !=null">
- amount = #{amount},
- </if>
- <if test="unitPrice !=null">
- unit_price = #{unitPrice},
- </if>
- <if test="applicationDepartment !=null">
- application_department = #{applicationDepartment},
- </if>
- <if test="applicant !=null">
- applicant = #{applicant},
- </if>
- <if test="applicationReason !=null">
- application_reason = #{applicationReason},
- </if>
- <if test="departmentHeads !=null">
- department_heads = #{departmentHeads},
- </if>
- <if test="leadershipOpinions !=null">
- leadership_opinions = #{leadershipOpinions},
- </if>
- <if test="normalBoot !=null">
- normal_boot = #{normalBoot},
- </if>
- <if test="normalOperation !=null">
- normal_operation = #{normalOperation},
- </if>
- <if test="cleanAndTidy !=null">
- </if>
- <if test="fixedAssetNumber !=null">
- and a.fixed_asset_number = #{fixedAssetNumber}
- </if>
- </set>
- WHERE uuid = #{uuid}
- </update>
- <delete id="deleteById" parameterType="java.lang.Long">
- DELETE FROM record_device_get WHERE id = #{id}
- </delete>
- <delete id="deleteByIds" parameterType="java.util.List">
- DELETE FROM record_device_get WHERE id IN
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </delete>
- </mapper>
|