123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857 |
- <?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="com.steerinfo.ems.emsgmpcjh.mapper.EmsGmPcJhMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
- <id column="ID" jdbcType="VARCHAR" property="id" />
- <result column="JH_TIME" jdbcType="DATE" property="jhTime" />
- <result column="STATE" jdbcType="VARCHAR" property="state" />
- <result column="GRADES" jdbcType="VARCHAR" property="grades" />
- <result column="SPECIFICATIONS" jdbcType="VARCHAR" property="specifications" />
- <result column="LENGTHS" jdbcType="DECIMAL" property="lengths" />
- <result column="CHEMICAL_STANDARD" jdbcType="VARCHAR" property="chemicalStandard" />
- <result column="SURFACE_STANDARD" jdbcType="VARCHAR" property="surfaceStandard" />
- <result column="WORKPROC_TYPE" jdbcType="VARCHAR" property="workprocType" />
- <result column="IATERAL_AREA" jdbcType="VARCHAR" property="iateralArea" />
- <result column="LENGTH_TIMES_WIDTH" jdbcType="VARCHAR" property="lengthTimesWidth" />
- <result column="TRANSPORT_TYPE" jdbcType="VARCHAR" property="transportType" />
- <result column="RECEIVE_TIME" jdbcType="TIMESTAMP" property="receiveTime" />
- <result column="CREATE_MAN" jdbcType="VARCHAR" property="createMan" />
- <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
- <result column="GM_REVIEWER" jdbcType="VARCHAR" property="gmReviewer"/>
- <result column="GM_REVIEWER_TIME" jdbcType="TIMESTAMP" property="gmReviewerTime"/>
- <result column="UPDATE_MAN" jdbcType="VARCHAR" property="updateMan" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="MEMO" jdbcType="VARCHAR" property="memo" />
- <result column="PURPOSE" jdbcType="VARCHAR" property="purpose" />
- <result column="UNITID" jdbcType="VARCHAR" property="unitid" />
- <result column="DIMENSION" jdbcType="VARCHAR" property="dimension" />
- <result column="KXF_WEIGHT" jdbcType="DECIMAL" property="kxfWeight" />
- <result column="YXF_WEIGHT" jdbcType="DECIMAL" property="yxfWeight" />
- <result column="DELIVERY_DATE" jdbcType="TIMESTAMP" property="deliveryDate"/>
- <result column="PLAN_WEIGHT" jdbcType="DECIMAL" property="planWeight" />
- </resultMap>
- <sql id="columns">
- ID, JH_TIME, STATE, GRADES, SPECIFICATIONS, LENGTHS, CHEMICAL_STANDARD, SURFACE_STANDARD,
- WORKPROC_TYPE, IATERAL_AREA, LENGTH_TIMES_WIDTH, TRANSPORT_TYPE, RECEIVE_TIME, CREATE_MAN,
- CREATE_TIME, UPDATE_MAN, UPDATE_TIME, MEMO, PURPOSE, UNITID, DIMENSION, KXF_WEIGHT, DELIVERY_DATE,
- YXF_WEIGHT, PLAN_WEIGHT,GM_REVIEWER,GM_REVIEWER_TIME
- </sql>
- <sql id="columns_alias">
- t.ID, t.JH_TIME, t.STATE, t.GRADES, t.SPECIFICATIONS, t.LENGTHS, t.CHEMICAL_STANDARD,
- t.SURFACE_STANDARD, t.WORKPROC_TYPE, t.IATERAL_AREA, t.LENGTH_TIMES_WIDTH, t.TRANSPORT_TYPE,
- t.RECEIVE_TIME, t.CREATE_MAN, t.CREATE_TIME, t.UPDATE_MAN, t.UPDATE_TIME, t.MEMO,
- t.PURPOSE, t.UNITID, t.DIMENSION, t.KXF_WEIGHT, t.YXF_WEIGHT, t.PLAN_WEIGHT
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM EMS_GM_PC_JH
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM EMS_GM_PC_JH t
- </sql>
- <sql id="where">
- <where>
- <if test="state != null and state != ''">
- and STATE = #{state}
- </if>
- <if test="grades != null and grades != ''">
- and GRADES in (${grades})
- </if>
- <if test="specifications != null and specifications != ''">
- and SPECIFICATIONS in (${specifications})
- </if>
- <if test="lengths != null">
- and LENGTHS = #{lengths}
- </if>
- <if test="chemicalStandard != null and chemicalStandard != ''">
- and CHEMICAL_STANDARD = #{chemicalStandard}
- </if>
- <if test="surfaceStandard != null and surfaceStandard != ''">
- and SURFACE_STANDARD = #{surfaceStandard}
- </if>
- <if test="workprocType != null and workprocType != ''">
- and WORKPROC_TYPE = #{workprocType}
- </if>
- <if test="iateralArea != null and iateralArea != ''">
- and IATERAL_AREA = #{iateralArea}
- </if>
- <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
- and LENGTH_TIMES_WIDTH in (${lengthTimesWidth})
- </if>
- <if test="transportType != null and transportType != ''">
- and TRANSPORT_TYPE = #{transportType}
- </if>
- <if test="receiveTime != null">
- and TO_CHAR(RECEIVE_TIME,'yyyy-MM-dd') = #{receiveTime}
- </if>
- <if test="createMan != null and createMan != ''">
- and CREATE_MAN = #{createMan}
- </if>
- <if test="createTime != null">
- and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
- </if>
- <if test="updateMan != null and updateMan != ''">
- and UPDATE_MAN = #{updateMan}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="memo != null and memo != ''">
- and MEMO = #{memo}
- </if>
- <if test="purpose != null and purpose != ''">
- and PURPOSE = #{purpose}
- </if>
- <if test="unitid != null and unitid != ''">
- and UNITID = #{unitid}
- </if>
- <if test="dimension != null and dimension != ''">
- and DIMENSION = #{dimension}
- </if>
- <if test="kxfWeight != null">
- and KXF_WEIGHT = #{kxfWeight}
- </if>
- <if test="yxfWeight != null">
- and YXF_WEIGHT = #{yxfWeight}
- </if>
- <if test="planWeight != null">
- and PLAN_WEIGHT = #{planWeight}
- </if>
- <if test="startTime != null and startTime !='' and endTime != null and endTime != ''">
- and JH_TIME BETWEEN TO_DATE(#{startTime},'yyyy-mm-dd') AND TO_DATE(#{endTime},'yyyy-mm-dd')
- </if>
- AND ID like '%G-%'
- order by JH_TIME desc, ID asc
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="id != null and id != ''">
- and ID LIKE '%${id}%'
- </if>
- <if test="jhTime != null">
- and TO_CHAR(JH_TIME,'yyyy-MM-dd') = #{jhTime}
- </if>
- <if test="state != null and state != ''">
- and STATE LIKE '%${state}%'
- </if>
- <if test="grades != null and grades != ''">
- and GRADES LIKE '%${grades}%'
- </if>
- <if test="specifications != null and specifications != ''">
- and SPECIFICATIONS LIKE '%${specifications}%'
- </if>
- <if test="lengths != null">
- and LENGTHS = #{lengths}
- </if>
- <if test="chemicalStandard != null and chemicalStandard != ''">
- and CHEMICAL_STANDARD LIKE '%${chemicalStandard}%'
- </if>
- <if test="surfaceStandard != null and surfaceStandard != ''">
- and SURFACE_STANDARD LIKE '%${surfaceStandard}%'
- </if>
- <if test="workprocType != null and workprocType != ''">
- and WORKPROC_TYPE LIKE '%${workprocType}%'
- </if>
- <if test="iateralArea != null and iateralArea != ''">
- and IATERAL_AREA LIKE '%${iateralArea}%'
- </if>
- <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
- and LENGTH_TIMES_WIDTH LIKE '%${lengthTimesWidth}%'
- </if>
- <if test="transportType != null and transportType != ''">
- and TRANSPORT_TYPE LIKE '%${transportType}%'
- </if>
- <if test="receiveTime != null">
- and TO_CHAR(RECEIVE_TIME,'yyyy-MM-dd') = #{receiveTime}
- </if>
- <if test="createMan != null and createMan != ''">
- and CREATE_MAN LIKE '%${createMan}%'
- </if>
- <if test="createTime != null">
- and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
- </if>
- <if test="updateMan != null and updateMan != ''">
- and UPDATE_MAN LIKE '%${updateMan}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="memo != null and memo != ''">
- and MEMO LIKE '%${memo}%'
- </if>
- <if test="purpose != null and purpose != ''">
- and PURPOSE LIKE '%${purpose}%'
- </if>
- <if test="unitid != null and unitid != ''">
- and UNITID LIKE '%${unitid}%'
- </if>
- <if test="dimension != null and dimension != ''">
- and DIMENSION LIKE '%${dimension}%'
- </if>
- <if test="kxfWeight != null">
- and KXF_WEIGHT = #{kxfWeight}
- </if>
- <if test="yxfWeight != null">
- and YXF_WEIGHT = #{yxfWeight}
- </if>
- <if test="planWeight != null">
- and PLAN_WEIGHT = #{planWeight}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from EMS_GM_PC_JH
- where ID = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from EMS_GM_PC_JH
- where 1!=1
- <if test="jhTime != null">
- or TO_CHAR(JH_TIME,'yyyy-MM-dd') = '#{jhTime}'
- </if>
- <if test="state != null and state != ''">
- or STATE = #{state}
- </if>
- <if test="grades != null and grades != ''">
- or GRADES = #{grades}
- </if>
- <if test="specifications != null and specifications != ''">
- or SPECIFICATIONS = #{specifications}
- </if>
- <if test="lengths != null">
- or LENGTHS = #{lengths}
- </if>
- <if test="chemicalStandard != null and chemicalStandard != ''">
- or CHEMICAL_STANDARD = #{chemicalStandard}
- </if>
- <if test="surfaceStandard != null and surfaceStandard != ''">
- or SURFACE_STANDARD = #{surfaceStandard}
- </if>
- <if test="workprocType != null and workprocType != ''">
- or WORKPROC_TYPE = #{workprocType}
- </if>
- <if test="iateralArea != null and iateralArea != ''">
- or IATERAL_AREA = #{iateralArea}
- </if>
- <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
- or LENGTH_TIMES_WIDTH = #{lengthTimesWidth}
- </if>
- <if test="transportType != null and transportType != ''">
- or TRANSPORT_TYPE = #{transportType}
- </if>
- <if test="receiveTime != null">
- or TO_CHAR(RECEIVE_TIME,'yyyy-MM-dd') = '#{receiveTime}'
- </if>
- <if test="createMan != null and createMan != ''">
- or CREATE_MAN = #{createMan}
- </if>
- <if test="createTime != null">
- or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
- </if>
- <if test="updateMan != null and updateMan != ''">
- or UPDATE_MAN = #{updateMan}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="memo != null and memo != ''">
- or MEMO = #{memo}
- </if>
- <if test="purpose != null and purpose != ''">
- or PURPOSE = #{purpose}
- </if>
- <if test="unitid != null and unitid != ''">
- or UNITID = #{unitid}
- </if>
- <if test="dimension != null and dimension != ''">
- or DIMENSION = #{dimension}
- </if>
- <if test="kxfWeight != null">
- or KXF_WEIGHT = #{kxfWeight}
- </if>
- <if test="yxfWeight != null">
- or YXF_WEIGHT = #{yxfWeight}
- </if>
- <if test="planWeight != null">
- or PLAN_WEIGHT = #{planWeight}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
- insert into EMS_GM_PC_JH (ID, JH_TIME, STATE,
- GRADES, SPECIFICATIONS, LENGTHS,
- CHEMICAL_STANDARD, SURFACE_STANDARD, WORKPROC_TYPE,
- IATERAL_AREA, LENGTH_TIMES_WIDTH, TRANSPORT_TYPE,
- RECEIVE_TIME, CREATE_MAN, CREATE_TIME,
- UPDATE_MAN, UPDATE_TIME, MEMO,
- PURPOSE, UNITID, DIMENSION,
- KXF_WEIGHT, YXF_WEIGHT, PLAN_WEIGHT,DELIVERY_DATE,GM_REVIEWER,GM_REVIEWER_TIME
- )
- values (#{id,jdbcType=VARCHAR}, #{jhTime,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR},
- #{grades,jdbcType=VARCHAR}, #{specifications,jdbcType=VARCHAR}, #{lengths,jdbcType=DECIMAL},
- #{chemicalStandard,jdbcType=VARCHAR}, #{surfaceStandard,jdbcType=VARCHAR}, #{workprocType,jdbcType=VARCHAR},
- #{iateralArea,jdbcType=VARCHAR}, #{lengthTimesWidth,jdbcType=VARCHAR}, #{transportType,jdbcType=VARCHAR},
- #{receiveTime,jdbcType=TIMESTAMP}, #{createMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{updateMan,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{memo,jdbcType=VARCHAR},
- #{purpose,jdbcType=VARCHAR}, #{unitid,jdbcType=VARCHAR}, #{dimension,jdbcType=VARCHAR},
- #{kxfWeight,jdbcType=DECIMAL}, #{yxfWeight,jdbcType=DECIMAL}, #{planWeight,jdbcType=DECIMAL},
- #{deliveryDate,jdbcType=TIMESTAMP},#{gmReviewer,jdbcType=VARCHAR},#{gmReviewerTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
- insert into EMS_GM_PC_JH
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- ID,
- </if>
- <if test="jhTime != null">
- JH_TIME,
- </if>
- <if test="state != null">
- STATE,
- </if>
- <if test="grades != null">
- GRADES,
- </if>
- <if test="specifications != null">
- SPECIFICATIONS,
- </if>
- <if test="lengths != null">
- LENGTHS,
- </if>
- <if test="chemicalStandard != null">
- CHEMICAL_STANDARD,
- </if>
- <if test="surfaceStandard != null">
- SURFACE_STANDARD,
- </if>
- <if test="workprocType != null">
- WORKPROC_TYPE,
- </if>
- <if test="iateralArea != null">
- IATERAL_AREA,
- </if>
- <if test="lengthTimesWidth != null">
- LENGTH_TIMES_WIDTH,
- </if>
- <if test="transportType != null">
- TRANSPORT_TYPE,
- </if>
- <if test="receiveTime != null">
- RECEIVE_TIME,
- </if>
- <if test="createMan != null">
- CREATE_MAN,
- </if>
- <if test="createTime != null">
- CREATE_TIME,
- </if>
- <if test="updateMan != null">
- UPDATE_MAN,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="memo != null">
- MEMO,
- </if>
- <if test="purpose != null">
- PURPOSE,
- </if>
- <if test="unitid != null">
- UNITID,
- </if>
- <if test="dimension != null">
- DIMENSION,
- </if>
- <if test="kxfWeight != null">
- KXF_WEIGHT,
- </if>
- <if test="yxfWeight != null">
- YXF_WEIGHT,
- </if>
- <if test="planWeight != null">
- PLAN_WEIGHT,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="jhTime != null">
- #{jhTime,jdbcType=TIMESTAMP},
- </if>
- <if test="state != null">
- #{state,jdbcType=VARCHAR},
- </if>
- <if test="grades != null">
- #{grades,jdbcType=VARCHAR},
- </if>
- <if test="specifications != null">
- #{specifications,jdbcType=VARCHAR},
- </if>
- <if test="lengths != null">
- #{lengths,jdbcType=DECIMAL},
- </if>
- <if test="chemicalStandard != null">
- #{chemicalStandard,jdbcType=VARCHAR},
- </if>
- <if test="surfaceStandard != null">
- #{surfaceStandard,jdbcType=VARCHAR},
- </if>
- <if test="workprocType != null">
- #{workprocType,jdbcType=VARCHAR},
- </if>
- <if test="iateralArea != null">
- #{iateralArea,jdbcType=VARCHAR},
- </if>
- <if test="lengthTimesWidth != null">
- #{lengthTimesWidth,jdbcType=VARCHAR},
- </if>
- <if test="transportType != null">
- #{transportType,jdbcType=VARCHAR},
- </if>
- <if test="receiveTime != null">
- #{receiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createMan != null">
- #{createMan,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateMan != null">
- #{updateMan,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="memo != null">
- #{memo,jdbcType=VARCHAR},
- </if>
- <if test="purpose != null">
- #{purpose,jdbcType=VARCHAR},
- </if>
- <if test="unitid != null">
- #{unitid,jdbcType=VARCHAR},
- </if>
- <if test="dimension != null">
- #{dimension,jdbcType=VARCHAR},
- </if>
- <if test="kxfWeight != null">
- #{kxfWeight,jdbcType=DECIMAL},
- </if>
- <if test="yxfWeight != null">
- #{yxfWeight,jdbcType=DECIMAL},
- </if>
- <if test="planWeight != null">
- #{planWeight,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
- update EMS_GM_PC_JH
- set JH_TIME = #{jhTime,jdbcType=TIMESTAMP},
- STATE = #{state,jdbcType=VARCHAR},
- GRADES = #{grades,jdbcType=VARCHAR},
- SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
- LENGTHS = #{lengths,jdbcType=DECIMAL},
- CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
- SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
- WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
- IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
- LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
- TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
- RECEIVE_TIME = #{receiveTime,jdbcType=TIMESTAMP},
- CREATE_MAN = #{createMan,jdbcType=VARCHAR},
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
- UPDATE_MAN = #{updateMan,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- MEMO = #{memo,jdbcType=VARCHAR},
- PURPOSE = #{purpose,jdbcType=VARCHAR},
- UNITID = #{unitid,jdbcType=VARCHAR},
- DIMENSION = #{dimension,jdbcType=VARCHAR},
- KXF_WEIGHT = #{kxfWeight,jdbcType=DECIMAL},
- YXF_WEIGHT = #{yxfWeight,jdbcType=DECIMAL},
- PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
- DELIVERY_DATE = #{deliveryDate,jdbcType=TIMESTAMP},
- GM_REVIEWER = #{gmReviewer,jdbcType=TIMESTAMP},
- GM_REVIEWER_TIME = #{gmReviewerTime,jdbcType=TIMESTAMP}
- where ID = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
- update EMS_GM_PC_JH
- <set>
- <if test="jhTime != null">
- JH_TIME = #{jhTime,jdbcType=TIMESTAMP},
- </if>
- <if test="state != null">
- STATE = #{state,jdbcType=VARCHAR},
- </if>
- <if test="grades != null">
- GRADES = #{grades,jdbcType=VARCHAR},
- </if>
- <if test="specifications != null">
- SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
- </if>
- <if test="lengths != null">
- LENGTHS = #{lengths,jdbcType=DECIMAL},
- </if>
- <if test="chemicalStandard != null">
- CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
- </if>
- <if test="surfaceStandard != null">
- SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
- </if>
- <if test="workprocType != null">
- WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
- </if>
- <if test="iateralArea != null">
- IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
- </if>
- <if test="lengthTimesWidth != null">
- LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
- </if>
- <if test="transportType != null">
- TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
- </if>
- <if test="receiveTime != null">
- RECEIVE_TIME = #{receiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createMan != null">
- CREATE_MAN = #{createMan,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateMan != null">
- UPDATE_MAN = #{updateMan,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="memo != null">
- MEMO = #{memo,jdbcType=VARCHAR},
- </if>
- <if test="purpose != null">
- PURPOSE = #{purpose,jdbcType=VARCHAR},
- </if>
- <if test="unitid != null">
- UNITID = #{unitid,jdbcType=VARCHAR},
- </if>
- <if test="dimension != null">
- DIMENSION = #{dimension,jdbcType=VARCHAR},
- </if>
- <if test="kxfWeight != null">
- KXF_WEIGHT = #{kxfWeight,jdbcType=DECIMAL},
- </if>
- <if test="yxfWeight != null">
- YXF_WEIGHT = #{yxfWeight,jdbcType=DECIMAL},
- </if>
- <if test="planWeight != null">
- PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
- </if>
- </set>
- where ID = #{id,jdbcType=VARCHAR}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- <include refid="select"/>
- where ID = #{id,jdbcType=VARCHAR}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="where"/>
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="whereLike"/>
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into EMS_GM_PC_JH
- (ID,
- JH_TIME, STATE, GRADES,
- SPECIFICATIONS, LENGTHS, CHEMICAL_STANDARD,
- SURFACE_STANDARD, WORKPROC_TYPE,
- IATERAL_AREA, LENGTH_TIMES_WIDTH,
- TRANSPORT_TYPE, RECEIVE_TIME,
- CREATE_MAN, CREATE_TIME, UPDATE_MAN,
- UPDATE_TIME, MEMO, PURPOSE,
- UNITID, DIMENSION, KXF_WEIGHT,
- YXF_WEIGHT, PLAN_WEIGHT,DELIVERY_DATE)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.id,jdbcType=VARCHAR},
- #{item.jhTime,jdbcType=TIMESTAMP}, #{item.state,jdbcType=VARCHAR}, #{item.grades,jdbcType=VARCHAR},
- #{item.specifications,jdbcType=VARCHAR}, #{item.lengths,jdbcType=DECIMAL}, #{item.chemicalStandard,jdbcType=VARCHAR},
- #{item.surfaceStandard,jdbcType=VARCHAR}, #{item.workprocType,jdbcType=VARCHAR},
- #{item.iateralArea,jdbcType=VARCHAR}, #{item.lengthTimesWidth,jdbcType=VARCHAR},
- #{item.transportType,jdbcType=VARCHAR}, #{item.receiveTime,jdbcType=TIMESTAMP},
- #{item.createMan,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateMan,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR}, #{item.purpose,jdbcType=VARCHAR},
- #{item.unitid,jdbcType=VARCHAR}, #{item.dimension,jdbcType=VARCHAR}, #{item.kxfWeight,jdbcType=DECIMAL},
- #{item.yxfWeight,jdbcType=DECIMAL}, #{item.planWeight,jdbcType=DECIMAL}, #{item.deliveryDate,jdbcType=DECIMAL} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update EMS_GM_PC_JH
- set
- ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
- </foreach>
- ,JH_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.jhTime,jdbcType=TIMESTAMP}
- </foreach>
- ,STATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.state,jdbcType=VARCHAR}
- </foreach>
- ,GRADES=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.grades,jdbcType=VARCHAR}
- </foreach>
- ,SPECIFICATIONS=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.specifications,jdbcType=VARCHAR}
- </foreach>
- ,LENGTHS=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.lengths,jdbcType=DECIMAL}
- </foreach>
- ,CHEMICAL_STANDARD=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.chemicalStandard,jdbcType=VARCHAR}
- </foreach>
- ,SURFACE_STANDARD=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.surfaceStandard,jdbcType=VARCHAR}
- </foreach>
- ,WORKPROC_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.workprocType,jdbcType=VARCHAR}
- </foreach>
- ,IATERAL_AREA=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.iateralArea,jdbcType=VARCHAR}
- </foreach>
- ,LENGTH_TIMES_WIDTH=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.lengthTimesWidth,jdbcType=VARCHAR}
- </foreach>
- ,TRANSPORT_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.transportType,jdbcType=VARCHAR}
- </foreach>
- ,RECEIVE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.receiveTime,jdbcType=TIMESTAMP}
- </foreach>
- ,CREATE_MAN=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.createMan,jdbcType=VARCHAR}
- </foreach>
- ,CREATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_MAN=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.updateMan,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,MEMO=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
- </foreach>
- ,PURPOSE=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.purpose,jdbcType=VARCHAR}
- </foreach>
- ,UNITID=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.unitid,jdbcType=VARCHAR}
- </foreach>
- ,DIMENSION=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.dimension,jdbcType=VARCHAR}
- </foreach>
- ,KXF_WEIGHT=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.kxfWeight,jdbcType=DECIMAL}
- </foreach>
- ,YXF_WEIGHT=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.yxfWeight,jdbcType=DECIMAL}
- </foreach>
- ,PLAN_WEIGHT=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.planWeight,jdbcType=DECIMAL}
- </foreach>
- where ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.id,jdbcType=VARCHAR}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from EMS_GM_PC_JH
- where ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="getMaxid" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh" resultType="java.lang.String">
- select #{type} || #{startTime} || '-' ||
- to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID
- from ems_gm_pc_jh
- where WORKPROC_TYPE = #{workprocType}
- and ID like '%' || #{type} || '%'
- and JH_TIME = #{jhTime}
- </select>
- <update id="updateState" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
- update ems_gm_pc_jh
- <set>
- <if test="state != null and state != ''">
- STATE = #{state},
- </if>
- <!-- <if test="grades != null and grades!= ''">-->
- <!-- GRADES = #{grades},-->
- <!-- </if>-->
- <!-- <if test="specifications != null and specifications != '' ">-->
- <!-- SPECIFICATIONS = #{specifications},-->
- <!-- </if>-->
- <!-- <if test="lengths != null and lengths != '' ">-->
- <!-- LENGTHS = #{lengths},-->
- <!-- </if>-->
- <if test="gmReviewer != null and gmReviewer != '' ">
- GM_REVIEWER = #{gmReviewer},
- </if>
- <if test="gmReviewerTime != null ">
- GM_REVIEWER_TIME = #{gmReviewerTime}
- </if>
- </set>
- <where>
- <if test="workprocType != null and workprocType!= ''">
- and WORKPROC_TYPE = #{workprocType}
- </if>
- <if test="id != null and id !=''">
- and ID = #{id}
- </if>
- </where>
- </update>
- <!--轮次计划页面查询-->
- <select id="getGmPcJhData" parameterType="java.util.HashMap" resultType="Map">
- select ID as id , to_char(JH_TIME,'yyyy-mm-dd') as jhTime, STATE as state, GRADES as grades, SPECIFICATIONS as specifications, LENGTHS as lengths, CHEMICAL_STANDARD as chemicalstandard, SURFACE_STANDARD as surfacestandard,
- WORKPROC_TYPE as workprocType, IATERAL_AREA as iateralArea, LENGTH_TIMES_WIDTH as lengthtimeswidth, TRANSPORT_TYPE as transportType , RECEIVE_TIME as receivetime, CREATE_MAN as createman,
- CREATE_TIME as createtime, UPDATE_MAN as updateman, UPDATE_TIME as updatime , MEMO as memo , PURPOSE as purpose, UNITID as unitid, DIMENSION as dimension, PLAN_WEIGHT as planweight,KXF_WEIGHT,YXF_WEIGHT,TO_CHAR(DELIVERY_DATE,'yyyy-mm-dd') as deliveryDate
- from (select *
- from ems_gm_pc_jh t
- <where>
- <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
- and JH_TIME between to_date(#{startTime},'yyyy-mm-dd') and to_date(#{endTime},'yyyy-mm-dd')
- </if>
- </where>
- union
- select *
- from ems_gm_pc_jh
- <where>
- <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
- and JH_TIME between to_date(substr(#{startTime}, 0, 7) || '-01','yyyy-mm-dd') and to_date(substr(#{endTime}, 0, 7) || '-01','yyyy-mm-dd')
- </if>
- and ID like 'N%'
- </where>) t1
- <where>
- <if test="workprocType != null and workprocType!= ''">
- and WORKPROC_TYPE in (${workprocType})
- </if>
- <if test="id != null and id != ''">
- and id = #{id}
- </if>
- and state in ('2','3')
- </where>
- order by t1.id desc
- </select>
- <!--国贸计划查询-->
- <select id="getXsDdDate" parameterType="java.util.HashMap" resultType="Map">
- select t.id,
- to_char(t.jh_time,'yyyy-mm-dd') jh_time,
- t.WORKPROC_TYPE,
- to_char(t.DELIVERY_DATE,'yyyy-mm-dd') DELIVERY_DATE,
- t.state,
- t.grades,
- t.specifications,
- t.lengths,
- t2.plan_weight,
- t2.plan_weight_old,
- t2.submitter,
- t2.submit_time,
- t2.reviewer,
- t2.reviewer_time,
- t2.AUDIT_STATUS,
- t2.GM_REVIEWER,
- t2.GM_REVIEWER_TIME,
- t2.PLAN_WEIGHT - t2.PLAN_WEIGHT_OLD TZL
- from ems_gm_pc_jh t
- left join ems_prodplan_weight_adjustment t2
- on t.id = t2.id
- <where>
- <if test="id != null and id != '' ">
- and t.id = #{id}
- </if>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != '' ">
- and t.jh_time between to_date(#{startTime}, 'yyyy-mm-dd') and to_date(#{endTime}, 'yyyy-mm-dd')
- </if>
- <if test="auditStatus != null and auditStatus != '' ">
- and t2.AUDIT_STATUS in (${auditStatus})
- </if>
- <if test="workprocType != null and workprocType!= '' ">
- and WORKPROC_TYPE in (${workprocType})
- </if>
- and t.id like '%G-%'
- and t.state = '3'
- </where>
- order by t.jh_time desc,t.id asc
- </select>
- <!--审核页面查询-->
- <select id="getShData" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select t.id,
- t.jh_time,
- t.state,
- t.workproc_type,
- t.Delivery_Date,
- t.grades,
- t.specifications,
- t.lengths,
- t.length_times_width,
- t.plan_weight,
- t.transport_type,
- t.purpose,
- t.create_man,
- t.create_time,
- t.GM_REVIEWER,
- t.GM_REVIEWER_TIME
- from ems_gm_pc_jh t
- <where>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != '' ">
- and t.jh_time between to_date(#{startTime},'yyyy-mm-dd') and to_date(#{endTime},'yyyy-mm-dd')
- </if>
- <if test="workprocType != null and workprocType != ''">
- and t.workproc_type in (${workprocType})
- </if>
- <if test="id != null and id != '' ">
- and t.id = #{id}
- </if>
- <if test="state != null and state != ''">
- and t.state in (${state})
- </if>
- and t.id like '%G-%'
- </where>
- order by t.jh_time desc,t.id asc
- </select>
- </mapper>
|