1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132 |
- <?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_TYPE=1
- AND 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>
|