12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646 |
- <?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.WmspInboundResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspInboundResult">
- <id column="INBOUND_ID" jdbcType="DECIMAL" property="inboundId" />
- <result column="INBOUND_TYPE" jdbcType="DECIMAL" property="inboundType" />
- <result column="INBOUND_NUMBER" jdbcType="VARCHAR" property="inboundNumber" />
- <result column="INBOUND_DISTRIBUTE_ID" jdbcType="DECIMAL" property="inboundDistributeId" />
- <result column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
- <result column="INBOUND_GROUP_ID" jdbcType="DECIMAL" property="inboundGroupId" />
- <result column="PERSONNEL_WORKSHOPID" jdbcType="DECIMAL" property="personnelWorkshopid" />
- <result column="RESULT_NUMBER" jdbcType="DECIMAL" property="resultNumber" />
- <result column="RESULT_STATUS" jdbcType="DECIMAL" property="resultStatus" />
- <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
- <result column="INBOUND_ISCOMPLETE" jdbcType="DECIMAL" property="inboundIscomplete" />
- <result column="RESULT_DELETED" jdbcType="DECIMAL" property="resultDeleted" />
- <result column="INBOUND_TIME" jdbcType="TIMESTAMP" property="inboundTime" />
- <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="PERSONNEL_TEAM" jdbcType="VARCHAR" property="personnelTeam" />
- <result column="PERSONNEL_SHIFTS" jdbcType="VARCHAR" property="personnelShifts" />
- </resultMap>
- <sql id="columns">
- INBOUND_ID, INBOUND_TYPE, INBOUND_NUMBER,INBOUND_DISTRIBUTE_ID, GRID_ID,INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID,RESULT_NUMBER, RESULT_STATUS, MATERIAL_ID, INBOUND_ISCOMPLETE,
- RESULT_DELETED, INBOUND_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, PERSONNEL_TEAM,, PERSONNEL_SHIFTS
- </sql>
- <sql id="columns_alias">
- t.INBOUND_ID, t.INBOUND_TYPE, t.INBOUND_NUMBER,t.INBOUND_DISTRIBUTE_ID, t.GRID_ID,INBOUND_GROUP_ID,t.PERSONNEL_WORKSHOPID,t.RESULT_NUMBER, t.RESULT_STATUS, t.MATERIAL_ID,
- t.INBOUND_ISCOMPLETE, t.RESULT_DELETED, t.INBOUND_TIME, t.INSERT_USERNAME, t.INSERT_TIME,
- t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.PERSONNEL_TEAM, ,
- t.PERSONNEL_SHIFTS
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM WMSP_INBOUND_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM WMSP_INBOUND_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="inboundId != null">
- and INBOUND_ID = #{inboundId}
- </if>
- <if test="inboundType != null">
- and INBOUND_TYPE = #{inboundType}
- </if>
- <if test="inboundNumber != null and inboundNumber != ''">
- and INBOUND_NUMBER = #{inboundNumber}
- </if>
-
- <if test="inboundDistributeId != null and inboundDistributeId != ''">
- and INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
- </if>
-
- <if test="gridId != null">
- and GRID_ID = #{gridId}
- </if>
-
- <if test="inboundGroupId != null">
- and INBOUND_GROUP_ID = #{inboundGroupId}
- </if>
-
- <if test="personnelWorkshopid != null">
- and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
- </if>
- <if test="resultNumber != null">
- and RESULT_NUMBER = #{resultNumber}
- </if>
- <if test="resultStatus != null">
- and RESULT_STATUS = #{resultStatus}
- </if>
- <if test="materialId != null">
- and MATERIAL_ID = #{materialId}
- </if>
- <if test="inboundIscomplete != null">
- and INBOUND_ISCOMPLETE = #{inboundIscomplete}
- </if>
- <if test="resultDeleted != null">
- and RESULT_DELETED = #{resultDeleted}
- </if>
- <if test="inboundTime != null">
- and TO_CHAR(INBOUND_TIME,'yyyy-MM-dd') = #{inboundTime}
- </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>
- <if test="personnelTeam != null and personnelTeam != ''">
- and PERSONNEL_TEAM = #{personnelTeam}
- </if>
- <if test="personnelShifts != null and personnelShifts != ''">
- and PERSONNEL_SHIFTS = #{personnelShifts}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="inboundId != null">
- and INBOUND_ID = #{inboundId}
- </if>
- <if test="inboundType != null">
- and INBOUND_TYPE = #{inboundType}
- </if>
-
- <if test="inboundNumber != null and inboundNumber != ''">
- and INBOUND_NUMBER LIKE '%${inboundNumber}%'
- </if>
- <if test="inboundDistributeId != null and inboundDistributeId != ''">
- and INBOUND_DISTRIBUTE_ID LIKE '%${inboundDistributeId}%'
- </if>
- <if test="gridId != null">
- and GRID_ID = #{gridId}
- </if>
- <if test="inboundGroupId != null">
- and INBOUND_GROUP_ID = #{inboundGroupId}
- </if>
-
- <if test="personnelWorkshopid != null">
- and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
- </if>
- <if test="resultNumber != null">
- and RESULT_NUMBER = #{resultNumber}
- </if>
- <if test="resultStatus != null">
- and RESULT_STATUS = #{resultStatus}
- </if>
- <if test="materialId != null">
- and MATERIAL_ID = #{materialId}
- </if>
- <if test="inboundIscomplete != null">
- and INBOUND_ISCOMPLETE = #{inboundIscomplete}
- </if>
- <if test="resultDeleted != null">
- and RESULT_DELETED = #{resultDeleted}
- </if>
- <if test="inboundTime != null">
- and TO_CHAR(INBOUND_TIME,'yyyy-MM-dd') = #{inboundTime}
- </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>
- <if test="personnelTeam != null and personnelTeam != ''">
- and PERSONNEL_TEAM LIKE '%${personnelTeam}%'
- </if>
- <if test="personnelShifts != null and personnelShifts != ''">
- and PERSONNEL_SHIFTS LIKE '%${personnelShifts}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from WMSP_INBOUND_RESULT
- where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from WMSP_INBOUND_RESULT
- where 1!=1
- <if test="inboundType != null">
- or INBOUND_TYPE = #{inboundType}
- </if>
-
- <if test="inboundNumber != null and inboundNumber != ''">
- or INBOUND_NUMBER = #{inboundNumber}
- </if>
- <if test="inboundDistributeId != null and inboundDistributeId != ''">
- or INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
- </if>
-
- <if test="gridId != null">
- or GRID_ID = #{gridId}
- </if>
-
- <if test="inboundGroupId != null">
- or INBOUND_GROUP_ID = #{inboundGroupId}
- </if>
-
- <if test="personnelWorkshopid != null">
- or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
- </if>
- <if test="resultNumber != null">
- or RESULT_NUMBER = #{resultNumber}
- </if>
- <if test="resultStatus != null">
- or RESULT_STATUS = #{resultStatus}
- </if>
- <if test="materialId != null">
- or MATERIAL_ID = #{materialId}
- </if>
- <if test="inboundIscomplete != null">
- or INBOUND_ISCOMPLETE = #{inboundIscomplete}
- </if>
- <if test="resultDeleted != null">
- or RESULT_DELETED = #{resultDeleted}
- </if>
- <if test="inboundTime != null">
- or TO_CHAR(INBOUND_TIME,'yyyy-MM-dd') = '#{inboundTime}'
- </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>
- <if test="personnelTeam != null and personnelTeam != ''">
- or PERSONNEL_TEAM = #{personnelTeam}
- </if>
- <if test="personnelShifts != null and personnelShifts != ''">
- or PERSONNEL_SHIFTS = #{personnelShifts}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.WmspInboundResult">
- insert into WMSP_INBOUND_RESULT (INBOUND_ID, INBOUND_TYPE, INBOUND_NUMBER, INBOUND_DISTRIBUTE_ID,
- GRID_ID,INBOUND_GROUP_ID, PERSONNEL_WORKSHOPID,RESULT_NUMBER,RESULT_STATUS, MATERIAL_ID,
- INBOUND_ISCOMPLETE, RESULT_DELETED, INBOUND_TIME,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, PERSONNEL_TEAM,
- PERSONNEL_SHIFTS)
- values (#{inboundId,jdbcType=DECIMAL}, #{inboundType,jdbcType=DECIMAL}, #{inboundNumber,jdbcType=VARCHAR},#{inboundDistributeId,jdbcType=DECIMAL},
- #{gridId,jdbcType=DECIMAL},#{inboundGroupId,jdbcType=DECIMAL},#{personnelWorkshopid,jdbcType=DECIMAL},#{resultNumber,jdbcType=DECIMAL}, #{resultStatus,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
- #{inboundIscomplete,jdbcType=DECIMAL}, #{resultDeleted,jdbcType=DECIMAL}, #{inboundTime,jdbcType=TIMESTAMP},
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR},
- #{personnelShifts,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspInboundResult">
- insert into WMSP_INBOUND_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="inboundId != null">
- INBOUND_ID,
- </if>
- <if test="inboundType != null">
- INBOUND_TYPE,
- </if>
- <if test="inboundNumber != null">
- INBOUND_NUMBER,
- </if>
- <if test="inboundDistributeId != null">
- INBOUND_DISTRIBUTE_ID,
- </if>
-
- <if test="gridId != null">
- GRID_ID,
- </if>
-
- <if test="inboundGroupId != null">
- INBOUND_GROUP_ID,
- </if>
- <if test="personnelWorkshopid != null">
- PERSONNEL_WORKSHOPID,
- </if>
- <if test="resultNumber != null">
- RESULT_NUMBER,
- </if>
-
- <if test="resultStatus != null">
- RESULT_STATUS,
- </if>
- <if test="materialId != null">
- MATERIAL_ID,
- </if>
- <if test="inboundIscomplete != null">
- INBOUND_ISCOMPLETE,
- </if>
- <if test="resultDeleted != null">
- RESULT_DELETED,
- </if>
- <if test="inboundTime != null">
- INBOUND_TIME,
- </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="personnelTeam != null">
- PERSONNEL_TEAM,
- </if>
- <if test="personnelShifts != null">
- PERSONNEL_SHIFTS,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="inboundId != null">
- #{inboundId,jdbcType=DECIMAL},
- </if>
- <if test="inboundType != null">
- #{inboundType,jdbcType=DECIMAL},
- </if>
- <if test="inboundNumber != null">
- #{inboundNumber,jdbcType=VARCHAR},
- </if>
- <if test="inboundDistributeId != null">
- #{inboundDistributeId,jdbcType=VARCHAR},
- </if>
-
- <if test="gridId != null">
- #{gridId,jdbcType=DECIMAL},
- </if>
-
- <if test="inboundGroupId != null">
- #{inboundGroupId,jdbcType=DECIMAL},
- </if>
- <if test="personnelWorkshopid != null">
- #{personnelWorkshopid,jdbcType=DECIMAL},
- </if>
- <if test="resultNumber != null">
- #{resultNumber,jdbcType=DECIMAL},
- </if>
-
- <if test="resultStatus != null">
- #{resultStatus,jdbcType=DECIMAL},
- </if>
- <if test="materialId != null">
- #{materialId,jdbcType=DECIMAL},
- </if>
- <if test="inboundIscomplete != null">
- #{inboundIscomplete,jdbcType=DECIMAL},
- </if>
- <if test="resultDeleted != null">
- #{resultDeleted,jdbcType=DECIMAL},
- </if>
- <if test="inboundTime != null">
- #{inboundTime,jdbcType=TIMESTAMP},
- </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="personnelTeam != null">
- #{personnelTeam,jdbcType=VARCHAR},
- </if>
- <if test="personnelShifts != null">
- #{personnelShifts,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspInboundResult">
- update WMSP_INBOUND_RESULT
- set INBOUND_TYPE = #{inboundType,jdbcType=DECIMAL},
- INBOUND_NUMBER = #{inboundNumber,jdbcType=VARCHAR},
- INBOUND_DISTRIBUTE_ID = #{inboundDistributeId,jdbcType=DECIMAL},
- GRID_ID = #{gridId,jdbcType=DECIMAL},
- PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
- RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
- INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
- RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
- INBOUND_ISCOMPLETE = #{inboundIscomplete,jdbcType=DECIMAL},
- RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL},
- INBOUND_TIME = #{inboundTime,jdbcType=TIMESTAMP},
- 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},
- PERSONNEL_TEAM = #{personnelTeam,jdbcType=VARCHAR},
-
- PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR}
- where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspInboundResult">
- update WMSP_INBOUND_RESULT
- <set>
- <if test="inboundType != null">
- INBOUND_TYPE = #{inboundType,jdbcType=DECIMAL},
- </if>
- <if test="inboundNumber != null">
- INBOUND_NUMBER = #{inboundNumber,jdbcType=VARCHAR},
- </if>
- <if test="inboundDistributeId != null">
- INBOUND_DISTRIBUTE_ID = #{inboundDistributeId,jdbcType=DECIMAL},
- </if>
-
- <if test="gridId != null">
- GRID_ID = #{gridId,jdbcType=DECIMAL},
- </if>
-
- <if test="inboundGroupId != null">
- INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
- </if>
- <if test="personnelWorkshopid != null">
- PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
- </if>
- <if test="resultNumber != null">
- RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
- </if>
- <if test="resultStatus != null">
- RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
- </if>
- <if test="materialId != null">
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
- </if>
- <if test="inboundIscomplete != null">
- INBOUND_ISCOMPLETE = #{inboundIscomplete,jdbcType=DECIMAL},
- </if>
- <if test="resultDeleted != null">
- RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL},
- </if>
- <if test="inboundTime != null">
- INBOUND_TIME = #{inboundTime,jdbcType=TIMESTAMP},
- </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>
- <if test="personnelTeam != null">
- PERSONNEL_TEAM = #{personnelTeam,jdbcType=VARCHAR},
- </if>
-
- <if test="personnelShifts != null">
- PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
- </if>
- </set>
- where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select" />
- where INBOUND_ID = #{inboundId,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_RESULT
- (INBOUND_ID,
- INBOUND_TYPE, INBOUND_NUMBER, GRID_ID,INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID,RESULT_NUMBER,INBOUND_DISTRIBUTE_ID,
- RESULT_STATUS, MATERIAL_ID, INBOUND_ISCOMPLETE,
- RESULT_DELETED, INBOUND_TIME,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, PERSONNEL_TEAM,
- PERSONNEL_SHIFTS
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.inboundId,jdbcType=DECIMAL},
- #{item.inboundType,jdbcType=DECIMAL}, #{item.inboundNumber,jdbcType=VARCHAR}, #{item.inboundGroupId,jdbcType=DECIMAL}, #{item.gridId,jdbcType=DECIMAL}, #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=DECIMAL}, #{item.inboundDistributeId,jdbcType=DECIMAL},
- #{item.resultStatus,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.inboundIscomplete,jdbcType=DECIMAL},
- #{item.resultDeleted,jdbcType=DECIMAL}, #{item.inboundTime,jdbcType=TIMESTAMP},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.personnelTeam,jdbcType=VARCHAR},
- #{item.personnelShifts,jdbcType=VARCHAR}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update WMSP_INBOUND_RESULT
- set
- INBOUND_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundId,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_TYPE=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundType,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundNumber,jdbcType=VARCHAR}
- </foreach>
- ,INBOUND_DISTRIBUTE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundDistributeId,jdbcType=VARCHAR}
- </foreach>
- ,GRID_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
- </foreach>
-
- ,INBOUND_GROUP_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=DECIMAL}
- </foreach>
- ,PERSONNEL_WORKSHOPID=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=DECIMAL}
- </foreach>
-
- ,RESULT_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.resultStatus,jdbcType=DECIMAL}
- </foreach>
- ,MATERIAL_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_ISCOMPLETE=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundIscomplete,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.resultDeleted,jdbcType=DECIMAL}
- </foreach>
- ,INBOUND_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_TEAM=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_SHIFTS=
- <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
- when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
- </foreach>
- where INBOUND_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.inboundId,jdbcType=DECIMAL}
- </foreach>
- </update>
-
- <delete id="batchDelete" parameterType="java.util.List">
- delete from WMSP_INBOUND_RESULT
- where INBOUND_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="selectWmsInboundResult" resultType="java.util.LinkedHashMap">
- select * from (
- SELECT
- wir.INBOUND_ID "inboundId",
- RM.MATERIAL_NAME || RM.MATERIAL_SPECIFICATION || '(' ||
- RM.MATERIAL_MODEL || ')' "materialName",
- wir.INBOUND_NUMBER "inboundNo",
- wir.INBOUND_TIME "inboundTime",
- wir.INBOUND_ISCOMPLETE "isComplete",
- RW.WAREHOUSE_NAME "warehouseName",
- RS.STACKING_NO "stackingNo",
- RPG.GRID_GRADATION_NUMBER "gridGradationNumber",
- -- 关联炉号
- rms.MATERIAL_FURNACE_NUMBER "furnaceNumber",
- -- 关联物资实际重量
- rms.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight"
- FROM wmsp_inbound_result wir
- LEFT JOIN WMSP_GRID_MATERIAL wgm
- ON wgm.MATERIAL_ID = wir.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL_STEEL rms
- ON rms.MATERIAL_STEEL_ID = wir.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL rm
- ON rm.MATERIAL_ID = rms.MATERIAL_ID
- LEFT JOIN RMS_PWAREHOUSE_GRID rpg
- ON RPG.GRID_ID = wir.GRID_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = rpg.WAREHOUSE_ID
- LEFT JOIN RMS_STACKING RS
- ON RS.STACKING_ID = RPG.STACKING_ID
- WHERE
- wir.inbound_type = 0
- AND wir.result_deleted = 0
- AND wir.INBOUND_ISCOMPLETE != 2
- AND rpg.WAREHOUSE_ID = #{warehouseId}
- AND wgm.UPDATE_TIME IS NULL
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= wir.inbound_time
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= wir.inbound_time
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= wir.inbound_time
- </if>
- ORDER BY wir.inbound_time DESC
- )
- <where>
- <if test="INBOUND_NUMBER != null">
- and "INBOUND_NUMBER" in
- <foreach collection="INBOUND_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="WAREHOUSE_NAME != null">
- and "WAREHOUSE_NAME" in
- <foreach collection="WAREHOUSE_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="STACKING_NO != null">
- and "STACKING_NO" in
- <foreach collection="STACKING_NO" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="GRID_GRADATION_NUMBER != null">
- and "GRID_GRADATION_NUMBER" in
- <foreach collection="GRID_GRADATION_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="FURNACE_NUMBER != null">
- and "FURNACE_NUMBER" in
- <foreach collection="FURNACE_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MATERIAL_CODE != null">
- and "MATERIAL_CODE" in
- <foreach collection="MATERIAL_CODE" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MATERIAL_NAME != null">
- and "MATERIAL_NAME" in
- <foreach collection="MATERIAL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="THEORETICAL_WEIGHT != null">
- and "THEORETICAL_WEIGHT" in
- <foreach collection="THEORETICAL_WEIGHT" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="BUNDLE_WEIGHT != null">
- and "BUNDLE_WEIGHT" in
- <foreach collection="BUNDLE_WEIGHT" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MEASURE_NAME != null">
- and "MEASURE_NAME" in
- <foreach collection="MEASURE_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="PRODUCTION_DATE != null">
- and "PRODUCTION_DATE" in
- <foreach collection="PRODUCTION_DATE" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd hh24:mi:ss')
- </foreach>
- </if>
- <if test="APERSONNEL_NAME != null">
- and "APERSONNEL_NAME" in
- <foreach collection="APERSONNEL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="BPERSONNEL_NAME != null">
- and "BPERSONNEL_NAME" in
- <foreach collection="BPERSONNEL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="DPERSONNEL_NAME != null">
- and "DPERSONNEL_NAME" in
- <foreach collection="DPERSONNEL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="SHIPPER_BRANCH_FACTORY != null">
- and "SHIPPER_BRANCH_FACTORY" in
- <foreach collection="SHIPPER_BRANCH_FACTORY" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="PERSONNEL_WORKSHOP != null">
- and "PERSONNEL_WORKSHOP" in
- <foreach collection="PERSONNEL_WORKSHOP" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="INBOUND_TIME != null">
- and "INBOUND_TIME" in
- <foreach collection="INBOUND_TIME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="selectWmsInboundResults" resultType="java.util.LinkedHashMap">
- select * from(
- SELECT
- wir.INBOUND_ID "inboundId",
- RM.MATERIAL_NAME || RM.MATERIAL_SPECIFICATION || '(' ||
- RM.MATERIAL_MODEL || ')' "materialName",
- wir.INBOUND_NUMBER "inboundNo",
- wir.INBOUND_TIME "inboundTime",
- wir.INBOUND_ISCOMPLETE "isComplete",
- RW.WAREHOUSE_NAME "warehouseName",
- RS.STACKING_NO "stackingNo",
- RPG.GRID_GRADATION_NUMBER "gridGradationNumber",
- -- 关联炉号
- rms.MATERIAL_FURNACE_NUMBER "furnaceNumber",
- -- 关联物资实际重量
- rms.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight"
- FROM wmsp_inbound_result wir
- LEFT JOIN WMSP_GRID_MATERIAL wgm
- ON wgm.MATERIAL_ID = wir.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL_STEEL rms
- ON rms.MATERIAL_STEEL_ID = wir.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL rm
- ON rm.MATERIAL_ID = rms.MATERIAL_ID
- LEFT JOIN RMS_PWAREHOUSE_GRID rpg
- ON RPG.GRID_ID = wir.GRID_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = rpg.WAREHOUSE_ID
- LEFT JOIN RMS_STACKING RS
- ON RS.STACKING_ID = RPG.STACKING_ID
- WHERE
- wir.inbound_type = 0
- AND wir.result_deleted = 0
- AND wir.INBOUND_ISCOMPLETE != 2
- AND rpg.WAREHOUSE_ID = #{warehouseId}
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= wir.inbound_time
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= wir.inbound_time
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= wir.inbound_time
- </if>
- ORDER BY wir.inbound_time DESC
- )
- <where>
- <if test="inboundId != null">
- and "inboundId" in
- <foreach collection="inboundId" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="materialName != null">
- and "materialName" in
- <foreach collection="materialName" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="inboundTime != null">
- and "inboundTime" in
- <foreach collection="inboundTime" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="isComplete != null">
- and "isComplete" in
- <foreach collection="isComplete" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="warehouseName != null">
- and "warehouseName" in
- <foreach collection="warehouseName" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="stackingNo != null">
- and "stackingNo" in
- <foreach collection="stackingNo" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="gridGradationNumber != null">
- and "gridGradationNumber" in
- <foreach collection="gridGradationNumber" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="furnaceNumber != null">
- and "furnaceNumber" in
- <foreach collection="furnaceNumber" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="theoreticalWeight != null">
- and "theoreticalWeight" in
- <foreach collection="theoreticalWeight" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="selectWmsReservedResult" resultType="java.util.LinkedHashMap">
- select * from (
- select
- wir.INBOUND_ID "inboundId",
- RM.MATERIAL_NAME || RM.MATERIAL_SPECIFICATION || '(' ||
- RM.MATERIAL_MODEL || ')' "materialName",
- wir.inbound_number "inboundNo",
- wir.inbound_time "inboundTime",
- wir.inbound_iscomplete "isComplete",
- RW.WAREHOUSE_NAME "warehouseName",
- RS.STACKING_NO "stackingNo",
- RPG.GRID_GRADATION_NUMBER "gridGradationNumber",
- -- 关联炉号
- rms.MATERIAL_FURNACE_NUMBER "furnaceNumber",
- -- 关联物资实际重量
- rms.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight"
- from wmsp_inbound_result wir
- LEFT JOIN RMS_MATERIAL_STEEL rms
- ON rms.MATERIAL_STEEL_ID = wir.MATERIAL_ID
- -- 关联实时库存
- LEFT JOIN WMSP_GRID_MATERIAL wgm
- ON wgm.MATERIAL_ID = wir.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL rm
- ON rm.MATERIAL_ID = rms.MATERIAL_ID
- LEFT JOIN RMS_PWAREHOUSE_GRID rpg
- ON RPG.GRID_ID = wir.GRID_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = rpg.WAREHOUSE_ID
- LEFT JOIN RMS_STACKING RS
- ON RS.STACKING_ID = RPG.STACKING_ID
- where wir.inbound_type = 0
- and wir.result_deleted = 0
- and wir.INBOUND_ISCOMPLETE = 2
- and wgm.UPDATE_TIME is null
- and rpg.WAREHOUSE_ID = #{warehouseId}
- order by wir.inbound_time desc
- )
- <where>
- <if test="INBOUND_NUMBER != null">
- and "INBOUND_NUMBER" in
- <foreach collection="INBOUND_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="WAREHOUSE_NAME != null">
- and "WAREHOUSE_NAME" in
- <foreach collection="WAREHOUSE_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="STACKING_NO != null">
- and "STACKING_NO" in
- <foreach collection="STACKING_NO" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="GRID_GRADATION_NUMBER != null">
- and "GRID_GRADATION_NUMBER" in
- <foreach collection="GRID_GRADATION_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="FURNACE_NUMBER != null">
- and "FURNACE_NUMBER" in
- <foreach collection="FURNACE_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MATERIAL_CODE != null">
- and "MATERIAL_CODE" in
- <foreach collection="MATERIAL_CODE" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MATERIAL_NAME != null">
- and "MATERIAL_NAME" in
- <foreach collection="MATERIAL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="THEORETICAL_WEIGHT != null">
- and "THEORETICAL_WEIGHT" in
- <foreach collection="THEORETICAL_WEIGHT" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="BUNDLE_WEIGHT != null">
- and "BUNDLE_WEIGHT" in
- <foreach collection="BUNDLE_WEIGHT" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MEASURE_NAME != null">
- and "MEASURE_NAME" in
- <foreach collection="MEASURE_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="PRODUCTION_DATE != null">
- and "PRODUCTION_DATE" in
- <foreach collection="PRODUCTION_DATE" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd hh24:mi:ss')
- </foreach>
- </if>
- <if test="APERSONNEL_NAME != null">
- and "APERSONNEL_NAME" in
- <foreach collection="APERSONNEL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="BPERSONNEL_NAME != null">
- and "BPERSONNEL_NAME" in
- <foreach collection="BPERSONNEL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="DPERSONNEL_NAME != null">
- and "DPERSONNEL_NAME" in
- <foreach collection="DPERSONNEL_NAME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="SHIPPER_BRANCH_FACTORY != null">
- and "SHIPPER_BRANCH_FACTORY" in
- <foreach collection="SHIPPER_BRANCH_FACTORY" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="PERSONNEL_WORKSHOP != null">
- and "PERSONNEL_WORKSHOP" in
- <foreach collection="PERSONNEL_WORKSHOP" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="INBOUND_TIME != null">
- and "INBOUND_TIME" in
- <foreach collection="INBOUND_TIME" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- </sql>
- <!-- <select id="getCount" resultType="java.math.BigDecimal">-->
- <!-- select MAX(INBOUND_ID) from wmsp_inbound_result-->
- <!-- </select>-->
- <select id="selectWmsReboundResult" resultType="java.util.LinkedHashMap">
- select * from (
- select wimr.result_no "result_no",
- rw.warehouse_name "warehouse_name",
- rs.stacking_no "stacking_no",
- rpg.grid_gradation_number "gradation_number",
- rms.material_furnace_number "furnace_number",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- rms.material_theoretical_weight "theoretical_weight",
- wmsp.inbound_material_number "MATERIAL_NUMBER",
- rms.material_production_date "production_date",
- rp1.personnel_name "LOADA",
- rp2.personnel_name "LOADD",
- wir.inbound_time "inbound_time"
- 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 rp1
- on rp1.personnel_id = wmsp.load_id
- join wmsp_inbound_result wir
- on wir.inbound_id = wmsp.inbound_result_id
- join wmsp_inbound_driving_result widr
- on widr.inbound_result_id = wir.inbound_id
- join rms_personnel rp2
- on rp2.personnel_id = widr.driver_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 rp1.personnel_id = 6
- and wmsp.result_status_ = 1
- and wir.inbound_type = 2
- )
- <where>
- <if test="result_no != null">
- and "result_no" in
- <foreach collection="result_no" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="warehouse_name != null">
- and "warehouse_name" in
- <foreach collection="warehouse_name" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="stacking_no != null">
- and "stacking_no" in
- <foreach collection="stacking_no" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="gradation_number != null">
- and "gradation_number" in
- <foreach collection="gradation_number" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="furnace_number != null">
- and "furnace_number" in
- <foreach collection="furnace_number" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="material_name != null">
- and "material_name" in
- <foreach collection="material_name" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="specification != null">
- and "specification" in
- <foreach collection="specification" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="theoretical_weight != null">
- and "theoretical_weight" in
- <foreach collection="theoretical_weight" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="MATERIAL_NUMBER != null">
- and "MATERIAL_NUMBER" in
- <foreach collection="MATERIAL_NUMBER" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="production_date != null">
- and "production_date" in
- <foreach collection="production_date" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd')
- </foreach>
- </if>
- <if test="LOADA != null">
- and "LOADA" in
- <foreach collection="LOADA" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="LOADD != null">
- and "LOADD" in
- <foreach collection="LOADD" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="inbound_time != null">
- and "inbound_time" in
- <foreach collection="inbound_time" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd')
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="selectWmsIvboundResult" resultType="java.util.Map">
- select * from(
- select wimr.result_id "resultId",
- wimr.result_no "result_no",
- rw1.warehouse_name "before_warehouse",
- rw2.warehouse_name "after_warehouse",
- wimr.insert_time "insert_time",
- (select count(*)
- from wmsp_ivbound_make_result wimr
- join rms_warehouse rw1
- on rw1.warehouse_id = wimr.result_before_warehouse_id
- join rms_warehouse rw2
- on rw2.warehouse_id = wimr.result_after_warehouse_id
- join wmsp_ivbound_make_material wimm
- on wimm.result_id = wimr.result_id) "material_number"
- from wmsp_ivbound_make_result wimr
- join rms_warehouse rw1
- on rw1.warehouse_id = wimr.result_before_warehouse_id
- join rms_warehouse rw2
- on rw2.warehouse_id = wimr.result_after_warehouse_id
- join wmsp_ivbound_make_material wimm
- on wimm.result_id = wimr.result_id
- order by wimr.insert_time desc
- )
- <where>
- <if test="result_no != null">
- and "result_no" in
- <foreach collection="result_no" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="before_warehouse != null">
- and "before_warehouse" in
- <foreach collection="before_warehouse" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="after_warehouse != null">
- and "after_warehouse" in
- <foreach collection="after_warehouse" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="insert_time != null">
- and "insert_time" in
- <foreach collection="insert_time" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd')
- </foreach>
- </if>
- <if test="material_number != null">
- and "material_number" in
- <foreach collection="material_number" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="selectWmsIvboundMaterialResult" resultType="java.util.LinkedHashMap">
- select * from(
- select
- wimr.result_no "result_no",
- rw1.warehouse_name "before_warehouse",
- rw2.warehouse_name "after_warehouse",
- rs1.stacking_no "before_stack",
- wimm.before_gradution_number "before_gradution_number",
- rm.material_code "material_code",
- rm.material_name "material_name",
- rm.material_specification || '(' || rm.material_model || ')' "specification",
- rms.material_furnace_number "furnace_number",
- rms.material_theoretical_weight "theoretical_weight",
- (select count(*) from wmsp_ivbound_make_material wimm
- join
- wmsp_ivbound_make_result wimr
- on
- wimr.result_id=wimm.result_id
- join
- rms_warehouse rw1
- on
- rw1.warehouse_id=wimr.result_before_warehouse_id
- join
- rms_warehouse rw2
- on
- rw2.warehouse_id=wimr.result_after_warehouse_id
- join rms_stacking rs1
- on
- rs1.stacking_id=wimm.before_stacking_id
- join
- rms_material_steel rms
- on
- rms.material_steel_id=wimm.material_steel_id
- join
- rms_material rm
- on
- rm.material_id=rms.material_id
- join
- wmsp_inbound_scan_result wisr
- on
- wisr.material_id=wimm.material_steel_id
- join
- rms_personnel rp2
- on
- rp2.personnel_id=wisr.load_id
- join
- wmsp_inbound_result wir
- on
- wir.inbound_id=wisr.inbound_result_id
- join
- wmsp_inbound_driving_result widr
- on
- widr.inbound_result_id=wir.inbound_id
- join
- rms_personnel rp3
- on
- rp3.personnel_id=widr.driver_id
- join
- rms_pwarehouse_grid rpg
- on
- rpg.grid_id=wir.inbound_id
- where wimm.result_id = #{resultId}) "material_number",
- rms.material_production_date "production_date",
- rp2.personnel_name "LOADA",
- rp3.personnel_name "LOADD",
- wir.inbound_time "inbound_time"
- from wmsp_ivbound_make_material wimm
- join
- wmsp_ivbound_make_result wimr
- on
- wimr.result_id=wimm.result_id
- join
- rms_warehouse rw1
- on
- rw1.warehouse_id=wimr.result_before_warehouse_id
- join
- rms_warehouse rw2
- on
- rw2.warehouse_id=wimr.result_after_warehouse_id
- join rms_stacking rs1
- on
- rs1.stacking_id=wimm.before_stacking_id
- join
- rms_material_steel rms
- on
- rms.material_steel_id=wimm.material_steel_id
- join
- rms_material rm
- on
- rm.material_id=rms.material_id
- join
- wmsp_inbound_scan_result wisr
- on
- wisr.material_id=wimm.material_steel_id
- join
- rms_personnel rp2
- on
- rp2.personnel_id=wisr.load_id
- join
- wmsp_inbound_result wir
- on
- wir.inbound_id=wisr.inbound_result_id
- join
- wmsp_inbound_driving_result widr
- on
- widr.inbound_result_id=wir.inbound_id
- join
- rms_personnel rp3
- on
- rp3.personnel_id=widr.driver_id
- join
- rms_pwarehouse_grid rpg
- on
- rpg.grid_id=wir.inbound_id
- where wimm.result_id = #{resultId}
- order by
- wir.inbound_time desc
- )
- <where>
- <if test="result_no != null">
- and "result_no" in
- <foreach collection="result_no" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="before_warehouse != null">
- and "before_warehouse" in
- <foreach collection="before_warehouse" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="after_warehouse != null">
- and "after_warehouse" in
- <foreach collection="after_warehouse" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="before_stack != null">
- and "before_stack" in
- <foreach collection="before_stack" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="before_gradution_number != null">
- and "before_gradution_number" in
- <foreach collection="before_gradution_number" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="material_code != null">
- and "material_code" in
- <foreach collection="material_code" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="material_name != null">
- and "material_name" in
- <foreach collection="material_name" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="furnace_number != null">
- and "furnace_number" in
- <foreach collection="furnace_number" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="theoretical_weight != null">
- and "theoretical_weight" in
- <foreach collection="theoretical_weight" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="material_number != null">
- and "material_number" in
- <foreach collection="material_number" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="production_date != null">
- and "production_date" in
- <foreach collection="production_date" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd')
- </foreach>
- </if>
- <if test="LOADA != null">
- and "LOADA" in
- <foreach collection="LOADA" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="LOADD != null">
- and "LOADD" in
- <foreach collection="LOADD" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="inbound_time != null">
- and "inbound_time" in
- <foreach collection="inbound_time" item="item" open="(" separator="," close=")">
- to_date('${item}','yyyy-mm-dd')
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="selectScanResultByIboundResultId" resultType="java.util.LinkedHashMap"
- parameterType="java.util.Map">
- SELECT DISTINCT RP.PERSONNEL_NAME "load",
- WISR.MATERIAL_ID "materialId",
- WISR.RESULT_LOAD_TIME "loadTime",
- RM.material_code "material_code",
- RM.material_name "material_name",
- RM.material_specification || '(' || rm.material_model || ')' "specification",
- RMS.material_furnace_number "furnace_number",
- RMS.material_theoretical_weight "theoretical_weight"
- FROM WMSP_INBOUND_RESULT WIR
- LEFT JOIN WMSP_INBOUND_SCAN_RESULT WISR ON WISR.INBOUND_RESULT_ID = WIR.INBOUND_ID
- 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 RMS_PERSONNEL RP ON RP.PERSONNEL_ID = WISR.LOAD_ID
- WHERE WIR.INBOUND_ID = #{inboundId,jdbcType=INTEGER}
- AND WIR.RESULT_DELETED = 0
- </select>
- <select id="selectWarehouseName" resultType="java.lang.String">
- select rw.warehouse_name
- from rms_warehouse rw
- where rw.warehouse_id =#{houseId}
- </select>
- <select id="selectInboundResultByGroupId" resultType="Map">
- SELECT * FROM
- (SELECT wid.DISTRIBUTE_ID "distributeId", wid.batch "batch",wir.INSERT_USERNAME "userName", wir.RESULT_STATUS "resultStatus" FROM WMSP_INBOUND_RESULT wir
- LEFT JOIN WMSP_INBOUND_DISTRIBUTE wid
- ON wir.inbound_distribute_id=wid.distribute_id
- WHERE wir.inbound_Group_Id=#{groupId} ORDER BY INBOUND_TIME DESC)
- where rownum=1
- </select>
- <select id="getGrid" resultType="java.math.BigDecimal">
- select "gridId",rownum rm from (select t.grid_Id "gridId" from WMSP_INBOUND_RESULT t where t.inbound_distribute_id=#{distributeId} and t.RESULT_NUMBER=#{resultNumber} ORDER BY inbound_time DESC )
- </select>
- <!-- 根据resultId查询出对应的物资Id-->
- <select id="getResultMaterialByResultId" resultType="java.util.LinkedHashMap">
- SELECT wosr.RESULT_MATERIAL "resultMaterial"
- FROM WMSP_OUTBOUND_SCAN_RESULT wosr
- WHERE wosr.RESULT_CHECK = 0
- AND wosr.OUTBOUND_RESULT_ID = #{resultId}
- </select>
- <select id="getInboundResult" resultType="java.util.LinkedHashMap"
- parameterType="java.util.Map">
- SELECT
- wir.INBOUND_ID "inboundId",
- wgm.GM_ID "gmId"
- FROM WMSP_INBOUND_RESULT wir
- JOIN WMSP_INBOUND_SCAN_RESULT wisr
- ON wisr.INBOUND_RESULT_ID = wir.INBOUND_ID
- JOIN WMSP_GRID_MATERIAL wgm
- ON wgm.GRID_ID = wir.GRID_ID
- WHERE wisr.RESULT_MATERIAL = #{resultMaterial}
- </select>
- <update id="updateInboundStatus">
- update WMSP_INBOUND_RESULT set RESULT_STATUS= 2 where INBOUND_DISTRIBUTE_ID = #{distributeId}
- </update>
- <update id="updateStatusByMaterilaId">
- update WMSP_INBOUND_RESULT set INBOUND_ISCOMPLETE = 1 where MATERIAL_ID=#{materialId}
- </update>
- <!-- and wir.insert_time between sysdate and trunc(sysdate + 1, 'dd')-->
- <update id="updateStatusByMaterialId">
- update wmsp_inbound_result set INBOUND_ISCOMPLETE=2 where inbound_id in
- (
- select * from(
- select inbound_id from WMSP_INBOUND_RESULT wir
- left join rms_material_steel rms
- on wir.material_id = rms.material_steel_id
- left join WMSP_GRID_MATERIAL wgm
- on wgm.MATERIAL_ID = rms.material_steel_id
- where rms.material_id=(
- select distinct rms2.material_id from rms_material_steel rms2
- where material_steel_id =#{materialId}
- ) and INBOUND_ISCOMPLETE='1' and wgm.deleted ='0' and to_char(wir.insert_time,'YYYY-MM-DD')=TO_CHAR(SYSDATE,'YYYY-MM-DD')
- order by wir.insert_time desc
- ) where Rownum='1'
- )
-
- </update>
-
- <select id="getInbountNumber" resultType="java.math.BigDecimal">
- select count(*) from WMSP_INBOUND_RESULT wir
- </select>
- <select id="getTypeMaterilaId" resultType="java.lang.Integer">
- select count(*) from WMSP_INBOUND_RESULT
- where MATERIAL_ID=#{materialId} and INBOUND_ISCOMPLETE='2'
- </select>
- <select id="getWmsInboundResultStatistics" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT DISTINCT
- -- 炉号生产总数量
- table1.count "count",
- -- 炉号生产总重量
- table2.weight "weight",
- -- 炉号生产的第一件钢材时间
- table3.onetime "onetime",
- -- 炉号生产的最新钢材时间
- table3.newtime "newtime",
- -- 生产物资型号
- RM.MATERIAL_NAME || RM.MATERIAL_SPECIFICATION || '(' ||
- RM.MATERIAL_MODEL || ')' "materialName",
- -- 炉号
- MATERIAL_FURNACE_NUMBER "furnaceNumber1"
- FROM
- WMSP_INBOUND_RESULT WIR
- LEFT JOIN RMS_MATERIAL_STEEL RMS
- ON RMS.MATERIAL_STEEL_ID = WIR.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = RMS.MATERIAL_ID
- LEFT JOIN WMSP_GRID_MATERIAL WGM
- ON WGM.MATERIAL_ID = WIR.MATERIAL_ID
- LEFT JOIN RMS_PWAREHOUSE_GRID RPG
- ON RPG.GRID_ID = WGM.GRID_ID
- LEFT JOIN (
- SELECT
- count(MATERIAL_FURNACE_NUMBER) count,
- MATERIAL_FURNACE_NUMBER "furnaceNumber1"
- FROM
- WMSP_INBOUND_RESULT WIR2
- LEFT JOIN RMS_MATERIAL_STEEL RMS2
- ON RMS2.MATERIAL_STEEL_ID = WIR2.MATERIAL_ID
- WHERE RMS2.DELETED IS NULL OR RMS2.DELETED = 0
- <if test="oneDate != null">
- AND to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR2.INBOUND_TIME
- </if>
- <if test="startDate != null">
- AND to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR2.INBOUND_TIME
- AND to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= WIR2.INBOUND_TIME
- </if>
- GROUP BY
- MATERIAL_FURNACE_NUMBER
- ) table1
- ON RMS.MATERIAL_FURNACE_NUMBER = table1."furnaceNumber1"
- LEFT JOIN (
- SELECT
- sum(MATERIAL_THEORETICAL_WEIGHT) weight,
- MATERIAL_FURNACE_NUMBER "furnaceNumber2"
- FROM
- WMSP_INBOUND_RESULT WIR3
- LEFT JOIN RMS_MATERIAL_STEEL RMS3
- ON RMS3.MATERIAL_STEEL_ID = WIR3.MATERIAL_ID
- WHERE RMS3.DELETED IS NULL OR RMS3.DELETED = 0
- <if test="oneDate != null">
- AND to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR3.INBOUND_TIME
- </if>
- <if test="startDate != null">
- AND to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR3.INBOUND_TIME
- AND to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= WIR3.INBOUND_TIME
- </if>
- GROUP BY
- MATERIAL_FURNACE_NUMBER
- ) table2
- ON table1."furnaceNumber1" = table2."furnaceNumber2"
- LEFT JOIN(
- SELECT
- MIN(WIR4.INSERT_TIME) onetime,
- MAX(WIR4.INSERT_TIME) newtime,
- MATERIAL_FURNACE_NUMBER "furnaceNumber3"
- FROM
- WMSP_INBOUND_RESULT WIR4
- LEFT JOIN RMS_MATERIAL_STEEL RMS4
- ON RMS4.MATERIAL_STEEL_ID = WIR4.MATERIAL_ID
- WHERE RMS4.DELETED IS NULL OR RMS4.DELETED = 0
- <if test="oneDate != null">
- AND to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR4.INBOUND_TIME
- </if>
- <if test="startDate != null">
- AND to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR4.INBOUND_TIME
- AND to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= WIR4.INBOUND_TIME
- </if>
- GROUP BY
- MATERIAL_FURNACE_NUMBER
- )table3
- ON table3."furnaceNumber3" = table2."furnaceNumber2"
- WHERE RPG.WAREHOUSE_ID = #{warehouseId}
- <if test="oneDate != null">
- AND to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR.INBOUND_TIME
- </if>
- <if test="startDate != null">
- AND to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= WIR.INBOUND_TIME
- AND to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= WIR.INBOUND_TIME
- </if>
- AND WIR.RESULT_DELETED = 0
- <where>
- <if test="count != null">
- and "count" in
- <foreach collection="count" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="weight != null">
- and "weight" in
- <foreach collection="weight" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="onetime != null">
- and "onetime" in
- <foreach collection="onetime" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="materialName != null">
- and "materialName" in
- <foreach collection="materialName" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="furnaceNumber1 != null">
- and "furnaceNumber1" in
- <foreach collection="furnaceNumber1" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- </mapper>
|