123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131 |
- <?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.dil.mapper.WmspInboundScanResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspInboundScanResult">
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
- <result column="INBOUND_RESULT_ID" jdbcType="DECIMAL" property="inboundResultId" />
- <result column="LOAD_ID" jdbcType="DECIMAL" property="loadId" />
- <result column="RESULT_MATERIAL" jdbcType="VARCHAR" property="resultMaterial" />
- <result column="INBOUND_GROUP_ID" jdbcType="DECIMAL" property="inboundGroupId" />
- <result column="RESULT_LOAD_TIME" jdbcType="TIMESTAMP" property="resultLoadTime" />
- <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
- <result column="INBOUND_ABNORMALIS" jdbcType="DECIMAL" property="inboundAbnormalis" />
- <result column="INBOUND_MATERIAL_NUMBER" jdbcType="DECIMAL" property="inboundMaterialNumber" />
- <result column="RESULT_STATUS_" jdbcType="DECIMAL" property="resultStatus" />
- <result column="RESULT_NUMBER" jdbcType="DECIMAL" property="resultNumber" />
- <result column="RESULT_DELETED" jdbcType="DECIMAL" property="resultDeleted" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="SHIFT_ORDER" jdbcType="VARCHAR" property="shiftOrder" />
- </resultMap>
- <sql id="columns">
- RESULT_ID, INBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL,INBOUND_GROUP_ID, RESULT_LOAD_TIME, MATERIAL_ID,
- INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER, RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
- </sql>
- <sql id="columns_alias">
- t.RESULT_ID, t.INBOUND_RESULT_ID, t.LOAD_ID, t.RESULT_MATERIAL,INBOUND_GROUP_ID, t.RESULT_LOAD_TIME,
- t.MATERIAL_ID, t.INBOUND_ABNORMALIS, t.INBOUND_MATERIAL_NUMBER, t.RESULT_STATUS_,
- t.RESULT_NUMBER, t.RESULT_DELETED, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM WMSP_INBOUND_SCAN_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM WMSP_INBOUND_SCAN_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="inboundResultId != null">
- and INBOUND_RESULT_ID = #{inboundResultId}
- </if>
- <if test="loadId != null">
- and LOAD_ID = #{loadId}
- </if>
- <if test="resultMaterial != null and resultMaterial != ''">
- and RESULT_MATERIAL = #{resultMaterial}
- </if>
-
- <if test="inboundGroupId != null and inboundGroupId != ''">
- and INBOUND_GROUP_ID = #{inboundGroupId}
- </if>
- <if test="resultLoadTime != null">
- and TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = #{resultLoadTime}
- </if>
- <if test="materialId != null">
- and MATERIAL_ID = #{materialId}
- </if>
- <if test="inboundAbnormalis != null">
- and INBOUND_ABNORMALIS = #{inboundAbnormalis}
- </if>
- <if test="inboundMaterialNumber != null">
- and INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber}
- </if>
- <if test="resultStatus != null">
- and RESULT_STATUS_ = #{resultStatus}
- </if>
- <if test="resultNumber != null">
- and RESULT_NUMBER = #{resultNumber}
- </if>
- <if test="resultDeleted != null">
- and RESULT_DELETED = #{resultDeleted}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="inboundResultId != null">
- and INBOUND_RESULT_ID = #{inboundResultId}
- </if>
- <if test="loadId != null">
- and LOAD_ID = #{loadId}
- </if>
- <if test="resultMaterial != null and resultMaterial != ''">
- and RESULT_MATERIAL LIKE '%${resultMaterial}%'
- </if>
- <if test="inboundGroupId != null and inboundGroupId != ''">
- and INBOUND_GROUP_ID LIKE '%${inboundGroupId}%'
- </if>
-
- <if test="resultLoadTime != null">
- and TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = #{resultLoadTime}
- </if>
- <if test="materialId != null">
- and MATERIAL_ID = #{materialId}
- </if>
- <if test="inboundAbnormalis != null">
- and INBOUND_ABNORMALIS = #{inboundAbnormalis}
- </if>
- <if test="inboundMaterialNumber != null">
- and INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber}
- </if>
- <if test="resultStatus != null">
- and RESULT_STATUS_ = #{resultStatus}
- </if>
- <if test="resultNumber != null">
- and RESULT_NUMBER = #{resultNumber}
- </if>
- <if test="resultDeleted != null">
- and RESULT_DELETED = #{resultDeleted}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from WMSP_INBOUND_SCAN_RESULT
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from WMSP_INBOUND_SCAN_RESULT
- where 1!=1
- <if test="inboundResultId != null">
- or INBOUND_RESULT_ID = #{inboundResultId}
- </if>
- <if test="loadId != null">
- or LOAD_ID = #{loadId}
- </if>
-
- <if test="resultMaterial != null and resultMaterial != ''">
- or RESULT_MATERIAL = #{resultMaterial}
- </if>
- <if test="inboundGroupId != null and inboundGroupId != ''">
- or INBOUND_GROUP_ID = #{inboundGroupId}
- </if>
- <if test="resultLoadTime != null">
- or TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = '#{resultLoadTime}'
- </if>
- <if test="materialId != null">
- or MATERIAL_ID = #{materialId}
- </if>
- <if test="inboundAbnormalis != null">
- or INBOUND_ABNORMALIS = #{inboundAbnormalis}
- </if>
- <if test="inboundMaterialNumber != null">
- or INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber}
- </if>
- <if test="resultStatus != null">
- or RESULT_STATUS_ = #{resultStatus}
- </if>
- <if test="resultNumber != null">
- or RESULT_NUMBER = #{resultNumber}
- </if>
- <if test="resultDeleted != null">
- or RESULT_DELETED = #{resultDeleted}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.WmspInboundScanResult">
- insert into WMSP_INBOUND_SCAN_RESULT (RESULT_ID, INBOUND_RESULT_ID, LOAD_ID,
- RESULT_MATERIAL,INBOUND_GROUP_ID, RESULT_LOAD_TIME, MATERIAL_ID,
- INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER,
- RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK)
- values (#{resultId,jdbcType=DECIMAL}, #{inboundResultId,jdbcType=DECIMAL}, #{loadId,jdbcType=DECIMAL},
- #{resultMaterial,jdbcType=VARCHAR},#{inboundGroupId,jdbcType=VARCHAR},, #{resultLoadTime,jdbcType=TIMESTAMP}, #{materialId,jdbcType=DECIMAL},
- #{inboundAbnormalis,jdbcType=DECIMAL}, #{inboundMaterialNumber,jdbcType=DECIMAL},
- #{resultStatus,jdbcType=DECIMAL}, #{resultNumber,jdbcType=DECIMAL}, #{resultDeleted,jdbcType=DECIMAL},
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspInboundScanResult">
- insert into WMSP_INBOUND_SCAN_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- RESULT_ID,
- </if>
- <if test="inboundResultId != null">
- INBOUND_RESULT_ID,
- </if>
- <if test="loadId != null">
- LOAD_ID,
- </if>
- <if test="resultMaterial != null">
- RESULT_MATERIAL,
- </if>
- <if test="resultLoadTime != null">
- RESULT_LOAD_TIME,
- </if>
- <if test="materialId != null">
- MATERIAL_ID,
- </if>
- <if test="inboundAbnormalis != null">
- INBOUND_ABNORMALIS,
- </if>
- <if test="inboundMaterialNumber != null">
- INBOUND_MATERIAL_NUMBER,
- </if>
- <if test="resultStatus != null">
- RESULT_STATUS_,
- </if>
- <if test="resultNumber != null">
- RESULT_NUMBER,
- </if>
- <if test="resultDeleted != null">
- RESULT_DELETED,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="inboundGroupId != null">
- INBOUND_GROUP_ID,
- </if>
- <if test="shiftOrder != null">
- SHIFT_ORDER,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- #{resultId,jdbcType=DECIMAL},
- </if>
- <if test="inboundResultId != null">
- #{inboundResultId,jdbcType=DECIMAL},
- </if>
- <if test="loadId != null">
- #{loadId,jdbcType=DECIMAL},
- </if>
- <if test="resultMaterial != null">
- #{resultMaterial,jdbcType=VARCHAR},
- </if>
- <if test="resultLoadTime != null">
- #{resultLoadTime,jdbcType=TIMESTAMP},
- </if>
- <if test="materialId != null">
- #{materialId,jdbcType=DECIMAL},
- </if>
- <if test="inboundAbnormalis != null">
- #{inboundAbnormalis,jdbcType=DECIMAL},
- </if>
- <if test="inboundMaterialNumber != null">
- #{inboundMaterialNumber,jdbcType=DECIMAL},
- </if>
- <if test="resultStatus != null">
- #{resultStatus,jdbcType=DECIMAL},
- </if>
- <if test="resultNumber != null">
- #{resultNumber,jdbcType=DECIMAL},
- </if>
- <if test="resultDeleted != null">
- #{resultDeleted,jdbcType=DECIMAL},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="inboundGroupId != null">
- #{inboundGroupId,jdbcType=DECIMAL},
- </if>
- <if test="shiftOrder != null">
- #{shiftOrder,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspInboundScanResult">
- update WMSP_INBOUND_SCAN_RESULT
- set INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL},
-
- LOAD_ID = #{loadId,jdbcType=DECIMAL},
- RESULT_MATERIAL = #{resultMaterial,jdbcType=VARCHAR},
- INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=VARCHAR},
- RESULT_LOAD_TIME = #{resultLoadTime,jdbcType=TIMESTAMP},
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
- INBOUND_ABNORMALIS = #{inboundAbnormalis,jdbcType=DECIMAL},
- INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber,jdbcType=DECIMAL},
- RESULT_STATUS_ = #{resultStatus,jdbcType=DECIMAL},
- RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
- RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspInboundScanResult">
- update WMSP_INBOUND_SCAN_RESULT
- <set>
- <if test="inboundResultId != null">
- INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL},
- </if>
- <if test="loadId != null">
- LOAD_ID = #{loadId,jdbcType=DECIMAL},
- </if>
-
- <if test="resultMaterial != null">
- RESULT_MATERIAL = #{resultMaterial,jdbcType=VARCHAR},
- </if>
- <if test="inboundGroupId != null">
- INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=VARCHAR},
- </if>
- <if test="resultLoadTime != null">
- RESULT_LOAD_TIME = #{resultLoadTime,jdbcType=TIMESTAMP},
- </if>
- <if test="materialId != null">
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
- </if>
- <if test="inboundAbnormalis != null">
- INBOUND_ABNORMALIS = #{inboundAbnormalis,jdbcType=DECIMAL},
- </if>
- <if test="inboundMaterialNumber != null">
- INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber,jdbcType=DECIMAL},
- </if>
- <if test="resultStatus != null">
- RESULT_STATUS_ = #{resultStatus,jdbcType=DECIMAL},
- </if>
- <if test="resultNumber != null">
- RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
- </if>
- <if test="resultDeleted != null">
- RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- </set>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select" />
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </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 WMSP_INBOUND_SCAN_RESULT
- (RESULT_ID,
- INBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL,INBOUND_GROUP_ID,
- RESULT_LOAD_TIME, MATERIAL_ID,
- INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER,
- RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.resultId,jdbcType=DECIMAL},
- #{item.inboundResultId,jdbcType=DECIMAL}, #{item.loadId,jdbcType=DECIMAL}, #{item.resultMaterial,jdbcType=VARCHAR},#{item.inboundGroupId,jdbcType=VARCHAR},
- #{item.resultLoadTime,jdbcType=TIMESTAMP}, #{item.materialId,jdbcType=DECIMAL},
- #{item.inboundAbnormalis,jdbcType=DECIMAL}, #{item.inboundMaterialNumber,jdbcType=DECIMAL},
- #{item.resultStatus,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=DECIMAL}, #{item.resultDeleted,jdbcType=DECIMAL},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update WMSP_INBOUND_SCAN_RESULT
- set
- RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundResultId,jdbcType=DECIMAL}
- </foreach>
- ,LOAD_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.loadId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_MATERIAL=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterial,jdbcType=VARCHAR}
- </foreach>
- ,INBOUND_GROUP_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_LOAD_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadTime,jdbcType=TIMESTAMP}
- </foreach>
- ,MATERIAL_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_ABNORMALIS=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundAbnormalis,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_MATERIAL_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundMaterialNumber,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_STATUS_=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultStatus,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeleted,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- where RESULT_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from WMSP_INBOUND_SCAN_RESULT
- where RESULT_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- <select id="getCount" resultType="java.math.BigDecimal">-->
- <!-- select Max(result_id) from wmsp_inbound_scan_result-->
- <!-- </select>-->
- <select id="getScanNumber" parameterType="java.util.Map" resultType="java.math.BigDecimal">
- select max(wisr.result_number)
- from wmsp_inbound_scan_result wisr
- where wisr.load_id = #{loadId}
- </select>
- <update id="updateInboundAbnormal">
- update wmsp_inbound_scan_result wisr
- set (wisr.inbound_abnormalis) =
- (select min(wisr.inbound_abnormalis)
- from wmsp_inbound_scan_result wisr
- join rms_personnel rp
- on rp.personnel_id = wisr.load_id
- where (wisr.load_id = #{loadId}
- or
- wisr.load_id = #{otherLoadId})
- and wisr.result_number = #{resultNumber})
- where wisr.result_number = #{resultNumber}
- </update>
- <update id="updateInboundScanResult">
- update wmsp_inbound_scan_result wisr
- set wisr.inbound_result_id=#{InbounId},
- wisr.result_number=0,
- wisr.result_status_=1
- where wisr.result_id = #{resultId}
- </update>
- <update id="updateReboundScanResult">
- update wmsp_inbound_scan_result wisr
- set wisr.result_number=0,
- wisr.result_status_=1
- where wisr.result_id = #{RESULTID}
- </update>
- <update id="updataStatus">
- update wmsp_inbound_stack_result wisr
- set wisr.stacking_status = 0
- where wisr.result_id = #{stackResultId}
- </update>
- <update id="updataStatusByResultId">
- update wmsp_inbound_scan_result wisr
- set wisr.result_number=0,
- wisr.result_status_=1,
- wisr.INBOUND_RESULT_ID =#{inboundId}
- where wisr.result_id = #{resultId}
- </update>
- <select id="selectScanTagResult" resultType="java.util.Map">
- select wmsp1.result_id "RESULTAID",
- wmsp2.result_id "RESULTBID",
- rp1.personnel_name "LOADA",
- rp2.personnel_name "LOADB",
- wmsp1.inbound_material_number "MATERIAL_NUMBER",
- wmsp1.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name",
- wmsp1.inbound_abnormalis "abnormalis"
- from wmsp_inbound_scan_result wmsp1
- join
- rms_material_steel rms
- on
- rms.material_steel_id = wmsp1.material_id
- join
- rms_material rm
- on
- rm.material_id = rms.material_id
- join
- rms_unit_of_measure ruom
- on
- ruom.unit_of_measure_id = rm.unit_of_measure_id
- join
- wmsp_inbound_scan_result wmsp2
- on
- wmsp1.result_number = wmsp2.result_number
- join
- rms_personnel rp1
- on
- rp1.personnel_id = wmsp1.load_id
- join
- rms_personnel rp2
- on
- rp2.personnel_id = wmsp2.load_id
- and
- rp1.personnel_department_id = rp2.personnel_department_id
- and
- rp1.personnel_workshopid = rp2.personnel_workshopid
- and
- rp1.personnel_shifts = rp2.personnel_shifts
- and
- rp1.personnel_team = rp2.personnel_team
- where rp1.personnel_id = 1
- and rp2.personnel_id = 2
- and wmsp1.result_status_ = 0
- and wmsp2.result_status_ = 0
- </select>
- <select id="selectRepeat" resultMap="BaseResultMap">
- select *
- from wmsp_inbound_scan_result wisr
- where wisr.load_id = #{loadId}
- and wisr.result_material = #{resultMaterial}
- </select>
- <select id="selectIssuedScanTagResult" resultType="java.util.Map">
- select wir.inbound_id "inboundId",
- wir.inbound_number "inbound_no",
- rp1.personnel_name "LOADA",
- rp2.personnel_name "LOADB",
- wmsp1.inbound_material_number "MATERIAL_NUMBER",
- wmsp1.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name",
- rw.warehouse_name "warehouse_name",
- rs.stacking_no "stacking_no",
- rpg.grid_gradation_number "gradation_number",
- rms.material_furnace_number "furnace_number",
- rms.material_theoretical_weight "theoretical_weight",
- wmsp1.inbound_abnormalis "abnormalis"
- from wmsp_inbound_scan_result wmsp1
- join rms_material_steel rms
- on rms.material_steel_id = wmsp1.material_id
- join rms_material rm
- on rm.material_id = rms.material_id
- join rms_unit_of_measure ruom
- on ruom.unit_of_measure_id = rm.unit_of_measure_id
- join wmsp_inbound_scan_result wmsp2
- on wmsp1.result_number = wmsp2.result_number
- join rms_personnel rp1
- on rp1.personnel_id = wmsp1.load_id
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp1.inbound_result_id
- and wir.inbound_id = wmsp2.inbound_result_id
- join rms_pwarehouse_grid rpg
- on rpg.grid_id = wir.grid_id
- join rms_warehouse rw
- on rw.warehouse_id = rpg.warehouse_id
- join wmsp_inbound_stack_result wisr
- on wisr.inbound_result_id = wir.inbound_id
- join rms_stacking rs
- on rs.stacking_id = wisr.stacking_id
- join rms_personnel rp2
- on rp2.personnel_id = wmsp2.load_id
- and rp1.personnel_department_id = rp2.personnel_department_id
- and rp1.personnel_workshopid = rp2.personnel_workshopid
- and rp1.personnel_shifts = rp2.personnel_shifts
- and rp1.personnel_team = rp2.personnel_team
- where rp1.personnel_id = 1
- and rp2.personnel_id = 2
- and wmsp1.result_status_ = 1
- and wmsp2.result_status_ = 1
- and wmsp1.inbound_abnormalis = 1
- and wmsp2.inbound_abnormalis = 1
- </select>
- <select id="checkScanResult" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from wmsp_inbound_scan_result wisr
- where wisr.result_material = #{resultMaterial}
- and wisr.load_id = #{loadId}
- </select>
- <select id="selectIssuedScanTagNoResult" resultType="java.util.Map">
- select wir.inbound_id "inboundId",
- wir.inbound_number "inbound_no",
- rp1.personnel_name "LOADA",
- rp2.personnel_name "LOADB",
- wmsp1.inbound_material_number "MATERIAL_NUMBER",
- wmsp1.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name",
- rw.warehouse_name "warehouse_name",
- rs.stacking_no "stacking_no",
- rpg.grid_gradation_number "gradation_number",
- wmsp1.inbound_abnormalis "abnormalis"
- from wmsp_inbound_scan_result wmsp1
- join rms_material_steel rms
- on rms.material_steel_id = wmsp1.material_id
- join rms_material rm
- on rm.material_id = rms.material_id
- join rms_unit_of_measure ruom
- on ruom.unit_of_measure_id = rm.unit_of_measure_id
- join wmsp_inbound_scan_result wmsp2
- on wmsp1.result_number = wmsp2.result_number
- join rms_personnel rp1
- on rp1.personnel_id = wmsp1.load_id
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp1.inbound_result_id
- and wir.inbound_id = wmsp2.inbound_result_id
- join rms_pwarehouse_grid rpg
- on rpg.grid_id = wir.grid_id
- join rms_warehouse rw
- on rw.warehouse_id = rpg.warehouse_id
- join wmsp_inbound_stack_result wisr
- on wisr.inbound_result_id = wir.inbound_id
- join rms_stacking rs
- on rs.stacking_id = wisr.stacking_id
- join rms_personnel rp2
- on rp2.personnel_id = wmsp2.load_id
- and rp1.personnel_department_id = rp2.personnel_department_id
- and rp1.personnel_workshopid = rp2.personnel_workshopid
- and rp1.personnel_shifts = rp2.personnel_shifts
- and rp1.personnel_team = rp2.personnel_team
- where rp1.personnel_id = 1
- and rp2.personnel_id = 2
- and wmsp1.result_status_ = 1
- and wmsp2.result_status_ = 1
- and wmsp1.inbound_abnormalis = 0
- and wmsp2.inbound_abnormalis = 0
- </select>
- <select id="selectReIssuedScanResult" resultType="java.util.Map">
- select wir.inbound_id "inboundId",
- wir.inbound_number "inbound_no",
- rp.personnel_name "LOADA",
- wmsp.inbound_material_number "MATERIAL_NUMBER",
- wmsp.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name",
- rw.warehouse_name "warehouse_name",
- rs.stacking_no "stacking_no",
- rpg.grid_gradation_number "gradation_number",
- rms.material_furnace_number "furnace_number",
- rms.material_theoretical_weight "theoretical_weight"
- from wmsp_inbound_scan_result wmsp
- join rms_material_steel rms
- on rms.material_steel_id = wmsp.material_id
- join rms_material rm
- on rm.material_id = rms.material_id
- join rms_unit_of_measure ruom
- on ruom.unit_of_measure_id = rm.unit_of_measure_id
- join rms_personnel rp
- on rp.personnel_id = wmsp.load_id
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp.inbound_result_id
- join rms_pwarehouse_grid rpg
- on rpg.grid_id = wir.grid_id
- join rms_warehouse rw
- on rw.warehouse_id = rpg.warehouse_id
- join wmsp_inbound_stack_result wisr
- on wisr.inbound_result_id = wir.inbound_id
- join rms_stacking rs
- on rs.stacking_id = wisr.stacking_id
- where rp.personnel_id = 4
- and wmsp.result_status_ = 1
- and wir.inbound_type = 1
- </select>
- <select id="selectReScanTagResult" resultType="java.util.Map">
- select wir.inbound_id "inboundId",
- wmsp.result_id "RESULTID",
- rp.personnel_name "LOADA",
- wmsp.inbound_material_number "MATERIAL_NUMBER",
- wmsp.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name"
- from wmsp_inbound_scan_result wmsp
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp.inbound_result_id
- join rms_material_steel rms
- on rms.material_steel_id = wmsp.material_id
- join rms_material rm
- on rm.material_id = rms.material_id
- join rms_unit_of_measure ruom
- on ruom.unit_of_measure_id = rm.unit_of_measure_id
- join rms_personnel rp
- on rp.personnel_id = wmsp.load_id
- where rp.personnel_id = 4
- and wmsp.result_status_ = 0
- and wir.inbound_type = 1
- </select>
- <select id="selectIvIssuedScanResult" resultType="java.util.Map">
- select wir.inbound_id "inboundId",
- wimr.result_no "result_no",
- rp.personnel_name "LOADA",
- wmsp.inbound_material_number "MATERIAL_NUMBER",
- wmsp.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name",
- rw.warehouse_name "warehouse_name",
- rs.stacking_no "stacking_no",
- rpg.grid_gradation_number "gradation_number",
- rms.material_furnace_number "furnace_number",
- rms.material_theoretical_weight "theoretical_weight"
- from wmsp_inbound_scan_result wmsp
- join rms_material_steel rms
- on rms.material_steel_id = wmsp.material_id
- join wmsp_ivbound_make_material wimm
- on wmsp.material_id = wimm.material_steel_id
- join wmsp_ivbound_make_result wimr
- on wimr.result_id = wimm.result_id
- join rms_material rm
- on rm.material_id = rms.material_id
- join rms_unit_of_measure ruom
- on ruom.unit_of_measure_id = rm.unit_of_measure_id
- join rms_personnel rp
- on rp.personnel_id = wmsp.load_id
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp.inbound_result_id
- join rms_pwarehouse_grid rpg
- on rpg.grid_id = wir.grid_id
- join rms_warehouse rw
- on rw.warehouse_id = rpg.warehouse_id
- join wmsp_inbound_stack_result wisr
- on wisr.inbound_result_id = wir.inbound_id
- join rms_stacking rs
- on rs.stacking_id = wisr.stacking_id
- where rp.personnel_id = 6
- and wmsp.result_status_ = 1
- and wir.inbound_type = 2
- </select>
- <select id="selectIvScanTagResult" resultType="java.util.Map">
- select wimr.result_no "resultno",
- wir.inbound_id "inboundId",
- wmsp.result_id "RESULTID",
- rp.personnel_name "LOADA",
- wmsp.inbound_material_number "MATERIAL_NUMBER",
- wmsp.result_load_time "scan_time",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- ruom.unit_of_measure_name "measure_name"
- from wmsp_inbound_scan_result wmsp
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp.inbound_result_id
- join rms_material_steel rms
- on rms.material_steel_id = wmsp.material_id
- join wmsp_ivbound_make_material wimm
- on wmsp.material_id = wimm.material_steel_id
- join wmsp_ivbound_make_result wimr
- on wimr.result_id = wimm.result_id
- join rms_material rm
- on rm.material_id = rms.material_id
- join rms_unit_of_measure ruom
- on ruom.unit_of_measure_id = rm.unit_of_measure_id
- join rms_personnel rp
- on rp.personnel_id = wmsp.load_id
- where rp.personnel_id = 6
- and wmsp.result_status_ = 0
- and wir.inbound_type = 2
- </select>
- <select id="getLoadId" parameterType="java.util.Map" resultType="java.math.BigDecimal">
- select rp.PERSONNEL_ID
- from RMS_PERSONNEL rp
- where rp.PERSONNEL_JOB_NUMBER = #{userName}
- </select>
- <select id="getScanResult" resultType="java.util.Map">
- select rp.PERSONNEL_WORKSHOPID "personnelWorkshopid",
- rp.PERSONNEL_SHIFTS "personnelShifts",
- rp.PERSONNEL_TEAM "personnelTeam",
- wir.inbound_number "inboundNo",
- rw.warehouse_name "warehouseName",
- rm.material_name "materialName",
- rm.material_specification "materialSpecification",
- rm.material_model "materialMode",
- rms.material_furnace_number "materialFurnaceNo",
- rms.material_production_date "materialProDate",
- wisr.RESULT_ID as "resultId",
- wisr.INBOUND_ABNORMALIS "abnormalis",
- wisr.material_id as "materialId"
- from wmsp_inbound_scan_result wisr
- left join rms_material_steel rms
- on rms.material_steel_id = wisr.material_id
- left join rms_material rm
- on rm.material_id = rms.material_id
- left join wmsp_inbound_result wir
- on wir.inbound_id = wisr.inbound_result_id
- left join rms_warehouse rw
- on rw.warehouse_id = wir.personnel_workshopid
- left join RMS_PERSONNEL rp
- on rp.PERSONNEL_ID = wisr.LOAD_ID
- where wisr.LOAD_ID = #{loadId}
- and wisr.RESULT_STATUS_ = 0
- </select>
- <!--返回结果-->
- <select id="getReScanresult" resultType="java.util.Map" parameterType="java.math.BigDecimal">
- select rp.PERSONNEL_DEPARTMENT_ID "personnelWorkshopid",
- rp.PERSONNEL_SHIFTS "personnelShifts",
- rp.PERSONNEL_TEAM "personnelTeam",
- wir.inbound_number "inboundNo",
- rw.warehouse_name "warehouseName",
- rm.material_name "materialName",
- rm.MATERIAL_SPECIFICATION || '(' || RM.MATERIAL_MODEL || ')' "specification",
- rms.material_furnace_number "materialFurnaceNo",
- rms.material_production_date "materialProDate",
- wisr.INBOUND_MATERIAL_NUMBER "materialNumber",
- wisr.RESULT_ID "resultId",
- rm.MATERIAL_CODE "materialCode",
- wisr.INBOUND_ABNORMALIS "abnormalis",
- wisr.INSERT_TIME "scanTime",
- RPG.GRID_GRADATION_NUMBER "grandationNumber",
- RS.STACKING_NO "stackingNo",
- rms.MATERIAL_PRODUCTION_DATE "productionDate",
- rms.MATERIAL_SINGLE_BUNDLE_WEIGHT "bondleWeight"
- from wmsp_inbound_scan_result wisr
- left join rms_material_steel rms
- on rms.material_steel_id = wisr.material_id
- left join rms_material rm
- on rm.material_id = rms.material_id
- left join wmsp_inbound_result wir
- on wir.inbound_id = wisr.inbound_result_id
- left join rms_warehouse rw
- on rw.warehouse_id = wir.personnel_workshopid
- left join RMS_PERSONNEL rp
- on rp.PERSONNEL_ID = wisr.LOAD_ID
- left join WMSP_GRID_MATERIAL WGM
- on WGM.MATERIAL_ID=wisr.MATERIAL_ID
- left join RMS_PWAREHOUSE_GRID RPG
- ON RPG.GRID_ID=WGM.GRID_ID
- LEFT JOIN RMS_STACKING RS
- ON RS.STACKING_ID=RPG.STACKING_ID
- where wisr.LOAD_ID = #{loadId}
- and wisr.RESULT_STATUS_ = 0
- </select>
- <select id="getOtherScanResultId" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT WISR.RESULT_ID AS "resultId"
- FROM WMSP_INBOUND_SCAN_RESULT WISR
- LEFT JOIN RMS_PERSONNEL RP
- ON RP.PERSONNEL_ID = WISR.LOAD_ID
- WHERE RP.PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
- AND RP.PERSONNEL_SHIFTS = #{personnelShifts}
- AND RP.PERSONNEL_TEAM = #{personnelTeam}
- AND WISR.RESULT_NUMBER != (SELECT WISRA.RESULT_NUMBER FROM WMSP_INBOUND_SCAN_RESULT WISRA WHERE WISRA.RESULT_ID = #{resultId})
- </select>
- <select id="getOtherLoadId" resultType="java.math.BigDecimal" parameterType="java.util.Map">
- select rp.personnel_id
- from rms_personnel rp
- where rp.PERSONNEL_DEPARTMENT_ID = #{personnelWorkshopid}
- and rp.personnel_shifts = #{personnelShifts}
- and rp.personnel_team = #{personnelTeam}
- and rp.personnel_post = '装卸工'
- and rp.personnel_id != #{loadId}
- </select>
- <select id="getOtherMaterialSteelId" resultType="java.lang.Integer" parameterType="java.util.Map">
- select wisr.material_id
- from wmsp_inbound_scan_result wisr
- where wisr.load_id = #{otherLoadId}
- and wisr.result_number = #{resultNumber}
- </select>
- <select id="selectStackNo" resultType="java.util.Map" parameterType="java.util.Map">
- select distinct
- wisr.result_id "stackResultId",
- widr.driving_id "drivingResultId",
- rs.stacking_no "stackingNo",
- rpg.warehouse_id "warehouseId",
- rs.stacking_id "stackingId",
- rs.stacking_arrival "stackingArrival"
- from wmsp_inbound_stack_result wisr
- left join rms_stacking rs
- on wisr.stacking_id = rs.stacking_id
- left join wmsp_inbound_driving_result widr
- on widr.inbound_result_id = wisr.inbound_result_id
- left join
- wmsp_inbound_result wir
- on
- wir.inbound_id = wisr.inbound_result_id
- left join
- rms_pwarehouse_grid rpg
- on
- rpg.grid_id = wir.grid_id
- where rpg.warehouse_id = #{warehouseId}
- and wisr.stacking_status = 0
- </select>
- <!-- 判断物资是否为线材 -->
- <select id="selectMaterialTypeByMaterialId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
- select RMS.MATERIAL_COUNT "materialCode"
- from RMS_MATERIAL_STEEL RMS
- where RMS.MATERIAL_STEEL_ID=#{materialId}
- </select>
- <!-- 查询是否已经扫描-->
- <select id="isExist" resultType="java.lang.Integer">
- select count(*) from WMSP_INBOUND_SCAN_RESULT wisr
- left join WMSP_INBOUND_GROUP wig
- on wisr.inbound_Group_Id=wig.inbound_Group_Id
- where ((wig.USER_NAME_ONE ='${userName}' or wig.USER_NAME_TWO ='${userName}') and wig.state=1 and wisr.INSERT_USERNAME=#{userName}
- and wisr.result_material=#{resultMaterial} )
- </select>
- <!--查询已经扫描但是没有下发的-->
- <select id="noIssueScanResult" resultMap="BaseResultMap">
- select * from WMSP_INBOUND_SCAN_RESULT wisr
- left join WMSP_INBOUND_GROUP wig
- on wisr.inbound_Group_Id=wig.inbound_Group_Id
- where wig.USER_NAME_ONE=#{userId} or wig.USER_NAME_TWO=#{userId} and wig.state=1
- and wisr.INBOUND_RESULT_ID is null
- </select>
- <!--查询已经扫描但是没有下发的物质数量-->
- <select id="getScanedNumber" resultType="java.math.BigDecimal">
- select count(*) from WMSP_INBOUND_SCAN_RESULT wisr
- left join WMSP_INBOUND_GROUP wig
- on wisr.inbound_Group_Id=wig.inbound_Group_Id
- where wig.USER_NAME_ONE=#{userId} or wig.USER_NAME_TWO=#{userId} and wig.state=1
- and wisr.INBOUND_RESULT_ID is null
- </select>
- <select id="noIssueScanResultList" resultType="java.util.Map">
- select
- rm.material_name "materialName",
- rm.material_specification "materialSpecification",
- rm.material_model "materialMode",
- rms.material_furnace_number "materialFurnaceNo",
- rms.material_production_date "materialProDate",
- wisr.RESULT_ID as "resultId",
- wisr.INBOUND_ABNORMALIS "abnormalis",
- wisr.material_id as "materialId"
- from wmsp_inbound_scan_result wisr
- left join rms_material_steel rms
- on rms.material_steel_id = wisr.material_id
- left join rms_material rm
- on rm.material_id = rms.material_id
- where wisr.INSERT_USERNAME = #{userName}
- and wisr.RESULT_STATUS_ = 0
- </select>
- <select id="getResultStatusByResultId" resultType="java.lang.Integer">
- SELECT RESULT_STATUS_ FROM WMSP_INBOUND_SCAN_RESULT WHERE RESULT_ID=#{resultId}
- </select>
- <select id="isExist2" resultType="java.lang.Integer">
- select * from WMSP_INBOUND_SCAN_RESULT wisr
- left join WMSP_INBOUND_RESULT wir
- on wisr.INBOUND_RESULT_ID=wir.INBOUND_ID
- where wisr.result_material=#{resultMaterial} and wisr.INSERT_USERNAME = #{userName} and wisr.inbound_Group_Id is null and wir.RESULT_DELETED ! =0
- </select>
- <select id="noIssueScanResultList2" resultType="java.util.Map">
- select
- rm.material_name "materialName",
- rm.material_specification "materialSpecification",
- rm.material_model "materialMode",
- rms.material_furnace_number "materialFurnaceNo",
- rms.material_production_date "materialProDate",
- wisr.RESULT_ID as "resultId",
- wisr.INBOUND_ABNORMALIS "abnormalis",
- wisr.material_id as "materialId"
- from wmsp_inbound_scan_result wisr
- left join rms_material_steel rms
- on rms.material_steel_id = wisr.material_id
- left join rms_material rm
- on rm.material_id = rms.material_id
- where wisr.INSERT_USERNAME = #{userName}
- and wisr.RESULT_STATUS_ = 0
- and wisr.inbound_Group_Id is null
- </select>
- <!-- 根据物资Id查询相对应的入库实绩ID-->
- <select id="getInboundResultIdByMaterial" resultType="java.util.LinkedHashMap">
- SELECT wisr.INBOUND_RESULT_ID "inboundResultId"
- from wmsp_inbound_scan_result wisr
- left join wmsp_grid_material wgm
- on wisr.material_id=wgm.material_id
- where wgm.deleted=0 and wisr.RESULT_MATERIAL = #{subResultMaterial}
- </select>
- <!--查询已经扫描但是没有下发的物质数量-->
- <select id="isExistInboundScanResult" resultType="java.lang.Integer">
- select count(*) from WMSP_INBOUND_SCAN_RESULT wisr
- where wisr.result_material=#{resultMaterial}
- </select>
- <select id="isExistInboundTwo" resultType="java.lang.Integer">
- select count(*) from WMSP_INBOUND_SCAN_RESULT wisr
- left join RMS_MATERIAL_STEEL rms
- on wisr.MATERIAL_ID=rms.MATERIAL_STEEL_ID
- left join WMSP_GRID_MATERIAL wgm
- on rms.MATERIAL_STEEL_ID=wgm.MATERIAL_ID
- where wisr.result_material=#{resultMaterial} and (wgm.DELETED is null or wgm.DELETED='0')
- </select>
- <select id="getOrderTypeByNum" resultType="java.lang.Integer">
- select ORDER_TYPE from OMSTRUCK_ORDER
- where ORDER_NUMBER=SUBSTR(#{orderNumber}, 0, 21)
- </select>
- <select id="findInboundScanResult" resultType="java.util.Map">
- --倒库根据出库实绩查询入库扫码数据
- select OO.ORDER_NUMBER "orderNumber",
- WISR.RESULT_MATERIAL "resultMaterial",
- WISR.SHIFT_ORDER "shiftOrder"
- from OMSTRUCK_ORDER OO
- left join WMSP_OUTBOUND_RESULT WOR
- on OO.ORDER_ID=WOR.BILL_LADING_ID
- LEFT JOIN WMSP_OUTBOUND_SCAN_RESULT WOSR
- ON WOR.RESULT_ID=WOSR.OUTBOUND_RESULT_ID
- LEFT JOIN WMSP_INBOUND_RESULT WIR
- ON WIR.INBOUND_ID=WOSR.INBOUND_RESULT_ID
- LEFT JOIN WMSP_INBOUND_SCAN_RESULT WISR
- ON WIR.INBOUND_ID=WISR.INBOUND_RESULT_ID
- WHERE OO.ORDER_NUMBER=SUBSTR(#{orderNumber}, 0, 21)
- </select>
- <select id="getOrderTypeByInboundId" resultType="java.util.Map">
- --查询入库实绩的订单类型
- select OO.ORDER_TYPE "orderType",
- OO.ORDER_ID "orderId"
- from OMSTRUCK_ORDER OO
- left join WMSP_OUTBOUND_RESULT WOR
- on OO.ORDER_ID=WOR.BILL_LADING_ID
- LEFT JOIN WMSP_OUTBOUND_SCAN_RESULT WOSR
- ON WOR.RESULT_ID=WOSR.OUTBOUND_RESULT_ID
- LEFT JOIN WMSP_INBOUND_RESULT WIR
- ON WIR.INBOUND_ID=WOSR.INBOUND_RESULT_ID
- LEFT JOIN WMSP_INBOUND_SCAN_RESULT WISR
- ON WIR.INBOUND_ID=WISR.INBOUND_RESULT_ID
- WHERE WISR.RESULT_ID=#{resultId}
- </select>
- </mapper>
|