123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- <?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.emsprodplanround.mapper.EmsProdplanRoundMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
- <id column="ID" jdbcType="VARCHAR" property="id" />
- <result column="MAY" jdbcType="DATE" property="may" />
- <result column="SQNO" jdbcType="DECIMAL" property="sqno" />
- <result column="UNITID" jdbcType="VARCHAR" property="unitid" />
- <result column="DESCRIBE" jdbcType="VARCHAR" property="describe" />
- <result column="STATE" jdbcType="VARCHAR" property="state" />
- <result column="GRADES" jdbcType="VARCHAR" property="grades" />
- <result column="PLAN_WEIGHT" jdbcType="DECIMAL" property="planWeight" />
- <result column="SPECIFICATIONS" jdbcType="VARCHAR" property="specifications" />
- <result column="LENGTHS" jdbcType="VARCHAR" property="lengths" />
- <result column="CHEMICAL_STANDARD" jdbcType="VARCHAR" property="chemicalStandard" />
- <result column="SURFACE_STANDARD" jdbcType="VARCHAR" property="surfaceStandard" />
- <result column="MEMO" jdbcType="VARCHAR" property="memo" />
- <result column="ISSUED_TIME" jdbcType="TIMESTAMP" property="issuedTime" />
- <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
- <result column="CREATETIME" jdbcType="TIMESTAMP" property="createtime" />
- <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
- <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
- <result column="TRANSPORT_TYPE" jdbcType="VARCHAR" property="transportType" />
- <result column="PURPOSE" jdbcType="VARCHAR" property="purpose" />
- <result column="WORKPROC_TYPE" jdbcType="VARCHAR" property="workprocType" />
- <result column="MSG_FLAG" jdbcType="VARCHAR" property="msgFlag" />
- <result column="READ_FLAG" jdbcType="VARCHAR" property="readFlag" />
- <result column="PARENTID" jdbcType="VARCHAR" property="parentid"/>
- <result column="IATERAL_AREA" jdbcType="VARCHAR" property="iateralArea"/>
- <result column="LENGTH_TIMES_WIDTH" jdbcType="VARCHAR" property="lengthTimesWidth"/>
- <result column="DIMENSION" jdbcType="VARCHAR" property="dimension"/>
- <result column="STATUS" jdbcType="VARCHAR" property="status"/>
- <result column="ERR_MSG" jdbcType="VARCHAR" property="err_msg"/>
- <result column="DELIVERY_DATE" jdbcType="TIMESTAMP" property="deliveryDate"/>
- <result column="AUDITSTATE" jdbcType="VARCHAR" property="auditState"/>
- <result column="GOINFO" jdbcType="VARCHAR" property="goinfo"/>
- <result column="FETCH_PLAN_WEIGHT" jdbcType="DECIMAL" property="fetchPlanWeight"/>
- <result column="ASCRIPTION" jdbcType="VARCHAR" property="ascription"/>
- <result column="TAG" jdbcType="VARCHAR" property="tag"/>
- </resultMap>
- <sql id="columns">
- ID, MAY, SQNO, UNITID, DESCRIBE, STATE, GRADES, PLAN_WEIGHT, SPECIFICATIONS, LENGTHS,
- CHEMICAL_STANDARD, SURFACE_STANDARD, MEMO, ISSUED_TIME, CREATEMAN, CREATETIME, UPDATEMAN,
- UPDATETIME, TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,STATUS,ERR_MSG,GOINFO,FETCH_PLAN_WEIGHT,DELIVERY_DATE,AUDITSTATE,ASCRIPTION,TAG
- </sql>
- <sql id="columns_alias">
- t.ID, t.MAY, t.SQNO, t.UNITID, t.DESCRIBE, t.STATE, t.GRADES, t.PLAN_WEIGHT, t.SPECIFICATIONS,
- t.LENGTHS, t.CHEMICAL_STANDARD, t.SURFACE_STANDARD, t.MEMO, t.ISSUED_TIME, t.CREATEMAN,
- t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.TRANSPORT_TYPE, t.PURPOSE, t.WORKPROC_TYPE,
- t.MSG_FLAG, t.READ_FLAG,t.PARENTID,GOINFO,FETCH_PLAN_WEIGHT,t.TAG
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM EMS_PRODPLAN_ROUND
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM EMS_PRODPLAN_ROUND t
- </sql>
- <sql id="where">
- <where>
- <if test="id != null and id != ''">
- and ID = #{id}
- </if>
- <if test="may != null">
- and trunc(MAY) = to_date(#{may},'yyyy-mm-dd')
- </if>
- <if test="sqno != null and sqno != ''">
- and SQNO = #{sqno}
- </if>
- <if test="unitid != null and unitid != ''">
- and UNITID = #{unitid}
- </if>
- <if test="describe != null and describe != ''">
- and DESCRIBE = #{describe}
- </if>
- <if test="state != null and state != ''">
- and STATE = #{state}
- </if>
- <if test="grades != null and grades != ''">
- and GRADES = #{grades}
- </if>
- <if test="planWeight != null">
- and PLAN_WEIGHT = #{planWeight}
- </if>
- <if test="specifications != null and specifications != ''">
- and SPECIFICATIONS = #{specifications}
- </if>
- <if test="lengths != null and lengths != ''">
- 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="memo != null and memo != ''">
- and MEMO = #{memo}
- </if>
- <if test="issuedTime != null">
- and TO_CHAR(ISSUED_TIME,'yyyy-MM-dd') = #{issuedTime}
- </if>
- <if test="createman != null and createman != ''">
- and CREATEMAN = #{createman}
- </if>
- <if test="createtime != null">
- and TO_CHAR(CREATETIME,'yyyy-MM-dd') = #{createtime}
- </if>
- <if test="updateman != null and updateman != ''">
- and UPDATEMAN = #{updateman}
- </if>
- <if test="updatetime != null">
- and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
- </if>
- <if test="transportType != null and transportType != ''">
- and TRANSPORT_TYPE = #{transportType}
- </if>
- <if test="purpose != null and purpose != ''">
- and PURPOSE = #{purpose}
- </if>
- <if test="workprocType != null and workprocType != ''">
- and WORKPROC_TYPE = #{workprocType}
- </if>
- <if test="msgFlag != null and msgFlag != ''">
- and MSG_FLAG = #{msgFlag}
- </if>
- <if test="readFlag != null and readFlag != ''">
- and READ_FLAG = #{readFlag}
- </if>
- <if test="parentid != null and parentid != '' ">
- and PARENTID = #{parentid}
- </if>
- <if test="tag != null and tag != '' ">
- and TAG = #{tag}
- </if>
- ORDER BY CREATETIME DESC
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="id != null and id != ''">
- and ID LIKE '%${id}%'
- </if>
- <if test="may != null">
- and TO_CHAR(MAY,'yyyy-MM-dd') = #{may}
- </if>
- <if test="sqno != null and sqno != ''">
- and SQNO LIKE '%${sqno}%'
- </if>
- <if test="unitid != null and unitid != ''">
- and UNITID LIKE '%${unitid}%'
- </if>
- <if test="describe != null and describe != ''">
- and DESCRIBE LIKE '%${describe}%'
- </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="planWeight != null">
- and PLAN_WEIGHT = #{planWeight}
- </if>
- <if test="specifications != null and specifications != ''">
- and SPECIFICATIONS LIKE '%${specifications}%'
- </if>
- <if test="lengths != null and lengths != ''">
- and LENGTHS LIKE '%${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="memo != null and memo != ''">
- and MEMO LIKE '%${memo}%'
- </if>
- <if test="issuedTime != null">
- and TO_CHAR(ISSUED_TIME,'yyyy-MM-dd') = #{issuedTime}
- </if>
- <if test="createman != null and createman != ''">
- and CREATEMAN LIKE '%${createman}%'
- </if>
- <if test="createtime != null">
- and TO_CHAR(CREATETIME,'yyyy-MM-dd') = #{createtime}
- </if>
- <if test="updateman != null and updateman != ''">
- and UPDATEMAN LIKE '%${updateman}%'
- </if>
- <if test="updatetime != null">
- and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
- </if>
- <if test="transportType != null and transportType != ''">
- and TRANSPORT_TYPE LIKE '%${transportType}%'
- </if>
- <if test="purpose != null and purpose != ''">
- and PURPOSE LIKE '%${purpose}%'
- </if>
- <if test="workprocType != null and workprocType != ''">
- and WORKPROC_TYPE LIKE '%${workprocType}%'
- </if>
- <if test="msgFlag != null and msgFlag != ''">
- and MSG_FLAG LIKE '%${msgFlag}%'
- </if>
- <if test="readFlag != null and readFlag != ''">
- and READ_FLAG LIKE '%${readFlag}%'
- </if>
- <if test="tag != null and tag != ''">
- and TAG LIKE '%${tag}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from EMS_PRODPLAN_ROUND
- where ID = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from EMS_PRODPLAN_ROUND
- where 1!=1
- <if test="may != null">
- or TO_CHAR(MAY,'yyyy-MM-dd') = '#{may}'
- </if>
- <if test="sqno != null and sqno != ''">
- or SQNO = #{sqno}
- </if>
- <if test="unitid != null and unitid != ''">
- or UNITID = #{unitid}
- </if>
- <if test="describe != null and describe != ''">
- or DESCRIBE = #{describe}
- </if>
- <if test="state != null and state != ''">
- or STATE = #{state}
- </if>
- <if test="grades != null and grades != ''">
- or GRADES = #{grades}
- </if>
- <if test="planWeight != null">
- or PLAN_WEIGHT = #{planWeight}
- </if>
- <if test="specifications != null and specifications != ''">
- or SPECIFICATIONS = #{specifications}
- </if>
- <if test="lengths != null and lengths != ''">
- 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="memo != null and memo != ''">
- or MEMO = #{memo}
- </if>
- <if test="issuedTime != null">
- or TO_CHAR(ISSUED_TIME,'yyyy-MM-dd') = '#{issuedTime}'
- </if>
- <if test="createman != null and createman != ''">
- or CREATEMAN = #{createman}
- </if>
- <if test="createtime != null">
- or TO_CHAR(CREATETIME,'yyyy-MM-dd') = '#{createtime}'
- </if>
- <if test="updateman != null and updateman != ''">
- or UPDATEMAN = #{updateman}
- </if>
- <if test="updatetime != null">
- or TO_CHAR(UPDATETIME,'yyyy-MM-dd') = '#{updatetime}'
- </if>
- <if test="transportType != null and transportType != ''">
- or TRANSPORT_TYPE = #{transportType}
- </if>
- <if test="purpose != null and purpose != ''">
- or PURPOSE = #{purpose}
- </if>
- <if test="workprocType != null and workprocType != ''">
- or WORKPROC_TYPE = #{workprocType}
- </if>
- <if test="msgFlag != null and msgFlag != ''">
- or MSG_FLAG = #{msgFlag}
- </if>
- <if test="readFlag != null and readFlag != ''">
- or READ_FLAG = #{readFlag}
- </if>
- <if test="tag != null and tag != ''">
- or TAG = #{tag}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
- insert into EMS_PRODPLAN_ROUND (ID, MAY, SQNO,
- UNITID, DESCRIBE, STATE,
- GRADES, PLAN_WEIGHT, SPECIFICATIONS,
- LENGTHS, CHEMICAL_STANDARD, SURFACE_STANDARD,
- MEMO, ISSUED_TIME, CREATEMAN,
- CREATETIME, UPDATEMAN, UPDATETIME,
- TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE,
- MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,GOINFO,DELIVERY_DATE,AUDITSTATE,ASCRIPTION,TAG)
- values (#{id,jdbcType=VARCHAR}, #{may,jdbcType=TIMESTAMP}, #{sqno,jdbcType=DECIMAL},
- #{unitid,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR},
- #{grades,jdbcType=VARCHAR}, #{planWeight,jdbcType=DECIMAL}, #{specifications,jdbcType=VARCHAR},
- #{lengths,jdbcType=VARCHAR}, #{chemicalStandard,jdbcType=VARCHAR}, #{surfaceStandard,jdbcType=VARCHAR},
- #{memo,jdbcType=VARCHAR}, #{issuedTime,jdbcType=TIMESTAMP}, #{createman,jdbcType=VARCHAR},
- #{createtime,jdbcType=TIMESTAMP}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
- #{transportType,jdbcType=VARCHAR}, #{purpose,jdbcType=VARCHAR}, #{workprocType,jdbcType=VARCHAR},
- #{msgFlag,jdbcType=VARCHAR}, #{readFlag,jdbcType=VARCHAR},#{parentid,jdbcType=VARCHAR},
- #{iateralArea,jdbcType=VARCHAR},#{lengthTimesWidth,jdbcType=VARCHAR},
- #{dimension,jdbcType=VARCHAR},#{goinfo,jdbcType=VARCHAR},
- #{deliveryDate,jdbcType=TIMESTAMP},#{auditState,jdbcType=VARCHAR},#{ascription,jdbcType=VARCHAR},#{tag,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
- insert into EMS_PRODPLAN_ROUND
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- ID,
- </if>
- <if test="may != null">
- MAY,
- </if>
- <if test="sqno != null">
- SQNO,
- </if>
- <if test="unitid != null">
- UNITID,
- </if>
- <if test="describe != null">
- DESCRIBE,
- </if>
- <if test="state != null">
- STATE,
- </if>
- <if test="grades != null">
- GRADES,
- </if>
- <if test="planWeight != null">
- PLAN_WEIGHT,
- </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="memo != null">
- MEMO,
- </if>
- <if test="issuedTime != null">
- ISSUED_TIME,
- </if>
- <if test="createman != null">
- CREATEMAN,
- </if>
- <if test="createtime != null">
- CREATETIME,
- </if>
- <if test="updateman != null">
- UPDATEMAN,
- </if>
- <if test="updatetime != null">
- UPDATETIME,
- </if>
- <if test="transportType != null">
- TRANSPORT_TYPE,
- </if>
- <if test="purpose != null">
- PURPOSE,
- </if>
- <if test="workprocType != null">
- WORKPROC_TYPE,
- </if>
- <if test="msgFlag != null">
- MSG_FLAG,
- </if>
- <if test="readFlag != null">
- READ_FLAG,
- </if>
- <if test="tag != null">
- TAG,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="may != null">
- #{may,jdbcType=TIMESTAMP},
- </if>
- <if test="sqno != null">
- #{sqno,jdbcType=DECIMAL},
- </if>
- <if test="unitid != null">
- #{unitid,jdbcType=VARCHAR},
- </if>
- <if test="describe != null">
- #{describe,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- #{state,jdbcType=VARCHAR},
- </if>
- <if test="grades != null">
- #{grades,jdbcType=VARCHAR},
- </if>
- <if test="planWeight != null">
- #{planWeight,jdbcType=DECIMAL},
- </if>
- <if test="specifications != null">
- #{specifications,jdbcType=VARCHAR},
- </if>
- <if test="lengths != null">
- #{lengths,jdbcType=VARCHAR},
- </if>
- <if test="chemicalStandard != null">
- #{chemicalStandard,jdbcType=VARCHAR},
- </if>
- <if test="surfaceStandard != null">
- #{surfaceStandard,jdbcType=VARCHAR},
- </if>
- <if test="memo != null">
- #{memo,jdbcType=VARCHAR},
- </if>
- <if test="issuedTime != null">
- #{issuedTime,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="transportType != null">
- #{transportType,jdbcType=VARCHAR},
- </if>
- <if test="purpose != null">
- #{purpose,jdbcType=VARCHAR},
- </if>
- <if test="workprocType != null">
- #{workprocType,jdbcType=VARCHAR},
- </if>
- <if test="msgFlag != null">
- #{msgFlag,jdbcType=VARCHAR},
- </if>
- <if test="readFlag != null">
- #{readFlag,jdbcType=VARCHAR},
- </if>
- <if test="goinfo != null and goinfo ! = ''">
- #{goinfo,jdbcType=VARCHAR}
- </if>
- <if test="fetchPlanWeight != null ">
- #{fetchPlanWeight,jdbcType=DECIMAL}
- </if>
- <if test="tag != null ">
- #{tag,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
- update EMS_PRODPLAN_ROUND
- set MAY = #{may,jdbcType=TIMESTAMP},
- SQNO = #{sqno,jdbcType=DECIMAL},
- UNITID = #{unitid,jdbcType=VARCHAR},
- DESCRIBE = #{describe,jdbcType=VARCHAR},
- STATE = #{state,jdbcType=VARCHAR},
- GRADES = #{grades,jdbcType=VARCHAR},
- PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
- SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
- LENGTHS = #{lengths,jdbcType=VARCHAR},
- CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
- SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
- MEMO = #{memo,jdbcType=VARCHAR},
- ISSUED_TIME = #{issuedTime,jdbcType=TIMESTAMP},
- CREATEMAN = #{createman,jdbcType=VARCHAR},
- CREATETIME = #{createtime,jdbcType=TIMESTAMP},
- UPDATEMAN = #{updateman,jdbcType=VARCHAR},
- UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
- TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
- PURPOSE = #{purpose,jdbcType=VARCHAR},
- WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
- PARENTID = #{parentid,jdbcType=VARCHAR},
- IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
- LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
- DIMENSION = #{dimension,jdbcType=VARCHAR},
- GOINFO = #{goinfo,jdbcType=VARCHAR},
- TAG = #{tag,jdbcType=VARCHAR}
- where ID = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
- update EMS_PRODPLAN_ROUND
- <set>
- <if test="may != null">
- MAY = #{may,jdbcType=TIMESTAMP},
- </if>
- <if test="sqno != null">
- SQNO = #{sqno,jdbcType=DECIMAL},
- </if>
- <if test="unitid != null">
- UNITID = #{unitid,jdbcType=VARCHAR},
- </if>
- <if test="describe != null">
- DESCRIBE = #{describe,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- STATE = #{state,jdbcType=VARCHAR},
- </if>
- <if test="grades != null">
- GRADES = #{grades,jdbcType=VARCHAR},
- </if>
- <if test="planWeight != null">
- PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
- </if>
- <if test="specifications != null">
- SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
- </if>
- <if test="lengths != null">
- LENGTHS = #{lengths,jdbcType=VARCHAR},
- </if>
- <if test="chemicalStandard != null">
- CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
- </if>
- <if test="surfaceStandard != null">
- SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
- </if>
- <if test="memo != null">
- MEMO = #{memo,jdbcType=VARCHAR},
- </if>
- <if test="issuedTime != null">
- ISSUED_TIME = #{issuedTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createman != null">
- CREATEMAN = #{createman,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- CREATETIME = #{createtime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateman != null">
- UPDATEMAN = #{updateman,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null">
- UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="transportType != null">
- TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
- </if>
- <if test="purpose != null">
- PURPOSE = #{purpose,jdbcType=VARCHAR},
- </if>
- <if test="workprocType != null">
- WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
- </if>
- <if test="msgFlag != null">
- MSG_FLAG = #{msgFlag,jdbcType=VARCHAR},
- </if>
- <if test="readFlag != null">
- READ_FLAG = #{readFlag,jdbcType=VARCHAR},
- </if>
- <if test="parentid != null and parentid != ''">
- PARENTID = #{parentid,jdbcType=VARCHAR},
- </if>
- <if test="iateralArea != null and iateralArea != ''">
- IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
- </if>
- <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
- LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
- </if>
- <if test="dimension != null and dimension != ''">
- DIMENSION = #{dimension,jdbcType=VARCHAR},
- </if>
- <if test="goinfo != null and goinfo != ''">
- GOINFO = #{goinfo,jdbcType=VARCHAR},
- </if>
- <if test="tag != null and tag != ''">
- TAG = #{tag,jdbcType=VARCHAR},
- </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_PRODPLAN_ROUND
- (ID,
- MAY, SQNO, UNITID,
- DESCRIBE, STATE, GRADES,
- PLAN_WEIGHT, SPECIFICATIONS, LENGTHS,
- CHEMICAL_STANDARD, SURFACE_STANDARD,
- MEMO, ISSUED_TIME, CREATEMAN,
- CREATETIME, UPDATEMAN, UPDATETIME,
- TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE,
- MSG_FLAG, READ_FLAG,TAG)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.id,jdbcType=VARCHAR},
- #{item.may,jdbcType=TIMESTAMP}, #{item.sqno,jdbcType=DECIMAL}, #{item.unitid,jdbcType=VARCHAR},
- #{item.describe,jdbcType=VARCHAR}, #{item.state,jdbcType=VARCHAR}, #{item.grades,jdbcType=VARCHAR},
- #{item.planWeight,jdbcType=DECIMAL}, #{item.specifications,jdbcType=VARCHAR}, #{item.lengths,jdbcType=VARCHAR},
- #{item.chemicalStandard,jdbcType=VARCHAR}, #{item.surfaceStandard,jdbcType=VARCHAR},
- #{item.memo,jdbcType=VARCHAR}, #{item.issuedTime,jdbcType=TIMESTAMP}, #{item.createman,jdbcType=VARCHAR},
- #{item.createtime,jdbcType=TIMESTAMP}, #{item.updateman,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP},
- #{item.transportType,jdbcType=VARCHAR}, #{item.purpose,jdbcType=VARCHAR}, #{item.workprocType,jdbcType=VARCHAR},
- #{item.msgFlag,jdbcType=VARCHAR}, #{item.readFlag,jdbcType=VARCHAR}, #{item.tag,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update EMS_PRODPLAN_ROUND
- 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>
- ,MAY=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.may,jdbcType=TIMESTAMP}
- </foreach>
- ,SQNO=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.sqno,jdbcType=DECIMAL}
- </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>
- ,DESCRIBE=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.describe,jdbcType=VARCHAR}
- </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>
- ,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>
- ,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=VARCHAR}
- </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>
- ,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>
- ,ISSUED_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.issuedTime,jdbcType=TIMESTAMP}
- </foreach>
- ,CREATEMAN=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.createman,jdbcType=VARCHAR}
- </foreach>
- ,CREATETIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.createtime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATEMAN=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
- </foreach>
- ,UPDATETIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=TIMESTAMP}
- </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>
- ,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>
- ,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>
- ,MSG_FLAG=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.msgFlag,jdbcType=VARCHAR}
- </foreach>
- ,READ_FLAG=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.readFlag,jdbcType=VARCHAR}
- </foreach>
- ,TAG=
- <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
- when #{item.id,jdbcType=VARCHAR} then #{item.tag,jdbcType=VARCHAR}
- </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_PRODPLAN_ROUND
- where ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!--获取超出重量-->
- <!--获取超出重量-->
- <select id="getbeyondWeight" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select nvl(sum(t.plan_weight),0) plan_weight from EMS_PRODPLAN_ROUND t
- <where>
- <if test="parentid != null and parentid !='' ">
- and t.parentid = #{parentid}
- </if>
- <if test="may != null ">
- and trunc(t.may) = to_date(#{may},'yyyy-mm-dd')
- </if>
- </where>
- </select>
- <select id="getSumPlanWeight" parameterType="java.lang.String" resultMap="BaseResultMap">
- select nvl(sum(t.plan_weight),0) plan_weight from EMS_PRODPLAN_ROUND t where id = #{id}
- <!-- parameterType="java.util.List" t.id in-->
- <!-- <foreach collection="list" item="id" open="(" close=")" separator=",">-->
- <!-- #{id}-->
- <!-- </foreach>-->
- </select>
- <select id="getMaxidAsGm" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound" resultType="java.lang.String">
- select #{parentid} || '-' || to_char(nvl(max(substr(ID, 18, 2) + 1), 1),'fm00') as id
- from ems_prodplan_round
- where
- parentid = #{parentid}
- AND ID like
- '%'||(SELECT 'G-' || substr(#{parentid}, 3) FROM dual)||'%'
- </select>
- <select id="getMaxidAsSC" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound" resultType="java.lang.String">
- SELECT 'N-' || substr(#{parentid}, 3) ||'-'||
- to_char(nvl(max(substr(ID, 18, 2) + 1), 1),'fm00') AS ID
- FROM ems_prodplan_round
- where
- ID LIKE
- '%'||(SELECT 'N-' || substr(#{parentid}, 3) FROM dual )||'%'
- </select>
- <select id="getbasespecbillet" resultMap="BaseResultMap">
- select distinct SPECIFICATIONS from ems_gm_pc_jh
- where SPECIFICATIONS not like '%null%'
- and WORKPROC_TYPE = 'AT2007'
- </select>
- <!---->
- <select id="getiateralArea" resultMap="BaseResultMap">
- select distinct IATERAL_AREA from ems_prodplan_round
- where IATERAL_AREA not like '%null%'
- </select>
- <!---->
- <select id="getdimension" resultMap="BaseResultMap">
- select distinct dimension from ems_prodplan_round
- where dimension not like '%null%'
- </select>
- <!---->
- <select id="getsurfaceStandard" resultMap="BaseResultMap">
- select distinct SURFACE_STANDARD
- from ems_prodplan_round
- where SURFACE_STANDARD not like '%null%'
- </select>
- <!---->
- <select id="getAuditDate" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <where>
- <if test="workprocType != null and workprocType != '' ">
- and WORKPROC_TYPE = #{workprocType}
- </if>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != '' ">
- and MAY BETWEEN to_date(#{startTime},'yyyy-mm-dd') and to_date(#{endTime},'yyyy-mm-dd')
- </if>
- and AUDITSTATE in ('1','2','3')
- </where>
- </select>
- <!---->
- <select id="updateAuditState" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound" resultType="Integer">
- UPDATE ems_prodplan_round
- <set>
- <if test="auditState != null and auditState != '' ">
- AUDITSTATE = #{auditState}
- </if>
- </set>
- <where>
- <if test="id != null and id != '' ">
- ID = #{id}
- </if>
- </where>
- </select>
- <!---->
- <select id="getRounds" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound" resultMap="BaseResultMap">
- <include refid="select"/>
- <where>
- <if test="parentid != null and parentid != '' ">
- and parentid =#{parentid}
- </if>
- and id like '%G-%'
- </where>
- </select>
- <select id="getchemicalStandard" resultMap="BaseResultMap">
- select distinct CHEMICAL_STANDARD
- from ems_prodplan_round
- where CHEMICAL_STANDARD not like '%null%'
- </select>
- <select id="getTableDetailAsRadio" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <where>
- <if test="id != null and id != '' ">
- and PARENTID in (${id})
- </if>
- <if test="state != null and state != '' ">
- and STATE != #{state}
- </if>
- </where>
- order by state
- </select>
- <select id="getLastIssuedData" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- SELECT * FROM (<include refid="select"/>
- WHERE ISSUED_TIME is not null AND STATE IN ('1','2') AND WORKPROC_TYPE=#{workprocType} AND ID LIKE '${id}%' ORDER BY ISSUED_TIME desc)
- WHERE rownum=1
- </select>
- <select id="getPlanCount" resultType="java.math.BigDecimal">
- select case when sum(ABS(PLAN_WEIGHT)) is null then 0 else sum(ABS(PLAN_WEIGHT)) end heji from ems_prodplan_round
- <where>
- <if test="parentid != null and parentid != '' ">
- and PARENTID = #{parentid}
- </if>
- </where>
- </select>
- </mapper>
|