|
@@ -0,0 +1,900 @@
|
|
|
+<?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.OyeInboundResultMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OyeInboundResult">
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="INVENTORY_ID" jdbcType="DECIMAL" property="inventoryId" />
|
|
|
+ <result column="SALE_NO" jdbcType="VARCHAR" property="saleNo" />
|
|
|
+ <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
|
|
|
+ <result column="SALE_MATERIAL_ID" jdbcType="DECIMAL" property="saleMaterialId" />
|
|
|
+ <result column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
|
|
|
+ <result column="CAPACITY_NUMBHER" jdbcType="VARCHAR" property="capacityNumbher" />
|
|
|
+ <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
|
|
|
+ <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
|
+ <result column="METER" jdbcType="DECIMAL" property="meter" />
|
|
|
+ <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />
|
|
|
+ <result column="THEORY_WEIGHT" jdbcType="DECIMAL" property="theoryWeight" />
|
|
|
+ <result column="SINGLE_WEIGHT" jdbcType="DECIMAL" property="singleWeight" />
|
|
|
+ <result column="SALE_AREA" jdbcType="VARCHAR" property="saleArea" />
|
|
|
+ <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
|
|
|
+ <result column="INBOUND_WAREHOUSE" jdbcType="VARCHAR" property="inboundWarehouse" />
|
|
|
+ <result column="INBOUND_AREA" jdbcType="VARCHAR" property="inboundArea" />
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
+ <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
|
|
|
+ <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
|
|
|
+ <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
|
|
|
+ <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
|
|
|
+ <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
|
|
|
+ <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
|
|
|
+ <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
|
|
|
+ <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ RESULT_ID, INVENTORY_ID, SALE_NO, ORDER_ID, SALE_MATERIAL_ID, CONSIGNEE_ID, CAPACITY_NUMBHER,
|
|
|
+ CAPACITY_ID, MATERIAL_ID, METER, MATERIAL_NUMBER, THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA,
|
|
|
+ NET_WEIGHT, INBOUND_WAREHOUSE, INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, UPDATE_TIME,
|
|
|
+ UPDATE_USERNAME, DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, ALTERNATE_FIELDS4,
|
|
|
+ ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.RESULT_ID, t.INVENTORY_ID, t.SALE_NO, t.ORDER_ID, t.SALE_MATERIAL_ID, t.CONSIGNEE_ID,
|
|
|
+ t.CAPACITY_NUMBHER, t.CAPACITY_ID, t.MATERIAL_ID, t.METER, t.MATERIAL_NUMBER, t.THEORY_WEIGHT,
|
|
|
+ t.SINGLE_WEIGHT, t.SALE_AREA, t.NET_WEIGHT, t.INBOUND_WAREHOUSE, t.INBOUND_AREA,
|
|
|
+ t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.ALTERNATE_FIELDS2,
|
|
|
+ t.ALTERNATE_FIELDS3, t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6,
|
|
|
+ t.ALTERNATE_FIELDS7, t.ALTERNATE_FIELDS8
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM OYE_INBOUND_RESULT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM OYE_INBOUND_RESULT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryId != null">
|
|
|
+ and INVENTORY_ID = #{inventoryId}
|
|
|
+ </if>
|
|
|
+ <if test="saleNo != null and saleNo != ''">
|
|
|
+ and SALE_NO = #{saleNo}
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ and ORDER_ID = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="saleMaterialId != null">
|
|
|
+ and SALE_MATERIAL_ID = #{saleMaterialId}
|
|
|
+ </if>
|
|
|
+ <if test="consigneeId != null">
|
|
|
+ and CONSIGNEE_ID = #{consigneeId}
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumbher != null and capacityNumbher != ''">
|
|
|
+ and CAPACITY_NUMBHER = #{capacityNumbher}
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ and CAPACITY_ID = #{capacityId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ and MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="meter != null">
|
|
|
+ and METER = #{meter}
|
|
|
+ </if>
|
|
|
+ <if test="materialNumber != null">
|
|
|
+ and MATERIAL_NUMBER = #{materialNumber}
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight != null">
|
|
|
+ and THEORY_WEIGHT = #{theoryWeight}
|
|
|
+ </if>
|
|
|
+ <if test="singleWeight != null">
|
|
|
+ and SINGLE_WEIGHT = #{singleWeight}
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null and saleArea != ''">
|
|
|
+ and SALE_AREA = #{saleArea}
|
|
|
+ </if>
|
|
|
+ <if test="netWeight != null">
|
|
|
+ and NET_WEIGHT = #{netWeight}
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null and inboundWarehouse != ''">
|
|
|
+ and INBOUND_WAREHOUSE = #{inboundWarehouse}
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null and inboundArea != ''">
|
|
|
+ and INBOUND_AREA = #{inboundArea}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null and deleted != ''">
|
|
|
+ and DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null and alternateFields2 != ''">
|
|
|
+ and ALTERNATE_FIELDS2 = #{alternateFields2}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null and alternateFields3 != ''">
|
|
|
+ and ALTERNATE_FIELDS3 = #{alternateFields3}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null and alternateFields4 != ''">
|
|
|
+ and ALTERNATE_FIELDS4 = #{alternateFields4}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null and alternateFields5 != ''">
|
|
|
+ and ALTERNATE_FIELDS5 = #{alternateFields5}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null and alternateFields6 != ''">
|
|
|
+ and ALTERNATE_FIELDS6 = #{alternateFields6}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null and alternateFields7 != ''">
|
|
|
+ and ALTERNATE_FIELDS7 = #{alternateFields7}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null and alternateFields8 != ''">
|
|
|
+ and ALTERNATE_FIELDS8 = #{alternateFields8}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryId != null">
|
|
|
+ and INVENTORY_ID = #{inventoryId}
|
|
|
+ </if>
|
|
|
+ <if test="saleNo != null and saleNo != ''">
|
|
|
+ and SALE_NO LIKE '%${saleNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ and ORDER_ID = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="saleMaterialId != null">
|
|
|
+ and SALE_MATERIAL_ID = #{saleMaterialId}
|
|
|
+ </if>
|
|
|
+ <if test="consigneeId != null">
|
|
|
+ and CONSIGNEE_ID = #{consigneeId}
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumbher != null and capacityNumbher != ''">
|
|
|
+ and CAPACITY_NUMBHER LIKE '%${capacityNumbher}%'
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ and CAPACITY_ID = #{capacityId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ and MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="meter != null">
|
|
|
+ and METER = #{meter}
|
|
|
+ </if>
|
|
|
+ <if test="materialNumber != null">
|
|
|
+ and MATERIAL_NUMBER = #{materialNumber}
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight != null">
|
|
|
+ and THEORY_WEIGHT = #{theoryWeight}
|
|
|
+ </if>
|
|
|
+ <if test="singleWeight != null">
|
|
|
+ and SINGLE_WEIGHT = #{singleWeight}
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null and saleArea != ''">
|
|
|
+ and SALE_AREA LIKE '%${saleArea}%'
|
|
|
+ </if>
|
|
|
+ <if test="netWeight != null">
|
|
|
+ and NET_WEIGHT = #{netWeight}
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null and inboundWarehouse != ''">
|
|
|
+ and INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null and inboundArea != ''">
|
|
|
+ and INBOUND_AREA LIKE '%${inboundArea}%'
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null and deleted != ''">
|
|
|
+ and DELETED LIKE '%${deleted}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null and alternateFields2 != ''">
|
|
|
+ and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null and alternateFields3 != ''">
|
|
|
+ and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null and alternateFields4 != ''">
|
|
|
+ and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null and alternateFields5 != ''">
|
|
|
+ and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null and alternateFields6 != ''">
|
|
|
+ and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null and alternateFields7 != ''">
|
|
|
+ and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null and alternateFields8 != ''">
|
|
|
+ and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from OYE_INBOUND_RESULT
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from OYE_INBOUND_RESULT
|
|
|
+ where 1!=1
|
|
|
+ <if test="inventoryId != null">
|
|
|
+ or INVENTORY_ID = #{inventoryId}
|
|
|
+ </if>
|
|
|
+ <if test="saleNo != null and saleNo != ''">
|
|
|
+ or SALE_NO = #{saleNo}
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ or ORDER_ID = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="saleMaterialId != null">
|
|
|
+ or SALE_MATERIAL_ID = #{saleMaterialId}
|
|
|
+ </if>
|
|
|
+ <if test="consigneeId != null">
|
|
|
+ or CONSIGNEE_ID = #{consigneeId}
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumbher != null and capacityNumbher != ''">
|
|
|
+ or CAPACITY_NUMBHER = #{capacityNumbher}
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ or CAPACITY_ID = #{capacityId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ or MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="meter != null">
|
|
|
+ or METER = #{meter}
|
|
|
+ </if>
|
|
|
+ <if test="materialNumber != null">
|
|
|
+ or MATERIAL_NUMBER = #{materialNumber}
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight != null">
|
|
|
+ or THEORY_WEIGHT = #{theoryWeight}
|
|
|
+ </if>
|
|
|
+ <if test="singleWeight != null">
|
|
|
+ or SINGLE_WEIGHT = #{singleWeight}
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null and saleArea != ''">
|
|
|
+ or SALE_AREA = #{saleArea}
|
|
|
+ </if>
|
|
|
+ <if test="netWeight != null">
|
|
|
+ or NET_WEIGHT = #{netWeight}
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null and inboundWarehouse != ''">
|
|
|
+ or INBOUND_WAREHOUSE = #{inboundWarehouse}
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null and inboundArea != ''">
|
|
|
+ or INBOUND_AREA = #{inboundArea}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ or INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ or UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null and deleted != ''">
|
|
|
+ or DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null and alternateFields2 != ''">
|
|
|
+ or ALTERNATE_FIELDS2 = #{alternateFields2}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null and alternateFields3 != ''">
|
|
|
+ or ALTERNATE_FIELDS3 = #{alternateFields3}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null and alternateFields4 != ''">
|
|
|
+ or ALTERNATE_FIELDS4 = #{alternateFields4}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null and alternateFields5 != ''">
|
|
|
+ or ALTERNATE_FIELDS5 = #{alternateFields5}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null and alternateFields6 != ''">
|
|
|
+ or ALTERNATE_FIELDS6 = #{alternateFields6}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null and alternateFields7 != ''">
|
|
|
+ or ALTERNATE_FIELDS7 = #{alternateFields7}
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null and alternateFields8 != ''">
|
|
|
+ or ALTERNATE_FIELDS8 = #{alternateFields8}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.OyeInboundResult">
|
|
|
+ insert into OYE_INBOUND_RESULT (RESULT_ID, INVENTORY_ID, SALE_NO,
|
|
|
+ ORDER_ID, SALE_MATERIAL_ID, CONSIGNEE_ID,
|
|
|
+ CAPACITY_NUMBHER, CAPACITY_ID, MATERIAL_ID,
|
|
|
+ METER, MATERIAL_NUMBER, THEORY_WEIGHT,
|
|
|
+ SINGLE_WEIGHT, SALE_AREA, NET_WEIGHT,
|
|
|
+ INBOUND_WAREHOUSE, INBOUND_AREA, INSERT_TIME,
|
|
|
+ INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME,
|
|
|
+ DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3,
|
|
|
+ ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6,
|
|
|
+ ALTERNATE_FIELDS7, ALTERNATE_FIELDS8)
|
|
|
+ values (#{resultId,jdbcType=DECIMAL}, #{inventoryId,jdbcType=DECIMAL}, #{saleNo,jdbcType=VARCHAR},
|
|
|
+ #{orderId,jdbcType=DECIMAL}, #{saleMaterialId,jdbcType=DECIMAL}, #{consigneeId,jdbcType=DECIMAL},
|
|
|
+ #{capacityNumbher,jdbcType=VARCHAR}, #{capacityId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
|
|
|
+ #{meter,jdbcType=DECIMAL}, #{materialNumber,jdbcType=DECIMAL}, #{theoryWeight,jdbcType=DECIMAL},
|
|
|
+ #{singleWeight,jdbcType=DECIMAL}, #{saleArea,jdbcType=VARCHAR}, #{netWeight,jdbcType=DECIMAL},
|
|
|
+ #{inboundWarehouse,jdbcType=VARCHAR}, #{inboundArea,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{deleted,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR}, #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR}, #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OyeInboundResult">
|
|
|
+ insert into OYE_INBOUND_RESULT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="inventoryId != null">
|
|
|
+ INVENTORY_ID,
|
|
|
+ </if>
|
|
|
+ <if test="saleNo != null">
|
|
|
+ SALE_NO,
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ ORDER_ID,
|
|
|
+ </if>
|
|
|
+ <if test="saleMaterialId != null">
|
|
|
+ SALE_MATERIAL_ID,
|
|
|
+ </if>
|
|
|
+ <if test="consigneeId != null">
|
|
|
+ CONSIGNEE_ID,
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumbher != null">
|
|
|
+ CAPACITY_NUMBHER,
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ CAPACITY_ID,
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ MATERIAL_ID,
|
|
|
+ </if>
|
|
|
+ <if test="meter != null">
|
|
|
+ METER,
|
|
|
+ </if>
|
|
|
+ <if test="materialNumber != null">
|
|
|
+ MATERIAL_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight != null">
|
|
|
+ THEORY_WEIGHT,
|
|
|
+ </if>
|
|
|
+ <if test="singleWeight != null">
|
|
|
+ SINGLE_WEIGHT,
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null">
|
|
|
+ SALE_AREA,
|
|
|
+ </if>
|
|
|
+ <if test="netWeight != null">
|
|
|
+ NET_WEIGHT,
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null">
|
|
|
+ INBOUND_WAREHOUSE,
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null">
|
|
|
+ INBOUND_AREA,
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ DELETED,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null">
|
|
|
+ ALTERNATE_FIELDS2,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null">
|
|
|
+ ALTERNATE_FIELDS3,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null">
|
|
|
+ ALTERNATE_FIELDS4,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null">
|
|
|
+ ALTERNATE_FIELDS5,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null">
|
|
|
+ ALTERNATE_FIELDS6,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null">
|
|
|
+ ALTERNATE_FIELDS7,
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null">
|
|
|
+ ALTERNATE_FIELDS8,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ #{resultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryId != null">
|
|
|
+ #{inventoryId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="saleNo != null">
|
|
|
+ #{saleNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ #{orderId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="saleMaterialId != null">
|
|
|
+ #{saleMaterialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="consigneeId != null">
|
|
|
+ #{consigneeId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumbher != null">
|
|
|
+ #{capacityNumbher,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ #{capacityId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ #{materialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="meter != null">
|
|
|
+ #{meter,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialNumber != null">
|
|
|
+ #{materialNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight != null">
|
|
|
+ #{theoryWeight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="singleWeight != null">
|
|
|
+ #{singleWeight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null">
|
|
|
+ #{saleArea,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="netWeight != null">
|
|
|
+ #{netWeight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null">
|
|
|
+ #{inboundWarehouse,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null">
|
|
|
+ #{inboundArea,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ #{deleted,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null">
|
|
|
+ #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null">
|
|
|
+ #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null">
|
|
|
+ #{alternateFields4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null">
|
|
|
+ #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null">
|
|
|
+ #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null">
|
|
|
+ #{alternateFields7,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null">
|
|
|
+ #{alternateFields8,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OyeInboundResult">
|
|
|
+ update OYE_INBOUND_RESULT
|
|
|
+ set INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
|
|
|
+ SALE_NO = #{saleNo,jdbcType=VARCHAR},
|
|
|
+ ORDER_ID = #{orderId,jdbcType=DECIMAL},
|
|
|
+ SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL},
|
|
|
+ CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
|
|
|
+ CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
|
|
|
+ CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
+ METER = #{meter,jdbcType=DECIMAL},
|
|
|
+ MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
|
|
|
+ THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
|
|
|
+ SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
|
|
|
+ SALE_AREA = #{saleArea,jdbcType=VARCHAR},
|
|
|
+ NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
|
|
|
+ INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
|
|
|
+ INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ DELETED = #{deleted,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
|
|
|
+ ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR}
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OyeInboundResult">
|
|
|
+ update OYE_INBOUND_RESULT
|
|
|
+ <set>
|
|
|
+ <if test="inventoryId != null">
|
|
|
+ INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="saleNo != null">
|
|
|
+ SALE_NO = #{saleNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ ORDER_ID = #{orderId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="saleMaterialId != null">
|
|
|
+ SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="consigneeId != null">
|
|
|
+ CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumbher != null">
|
|
|
+ CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="meter != null">
|
|
|
+ METER = #{meter,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialNumber != null">
|
|
|
+ MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight != null">
|
|
|
+ THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="singleWeight != null">
|
|
|
+ SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null">
|
|
|
+ SALE_AREA = #{saleArea,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="netWeight != null">
|
|
|
+ NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null">
|
|
|
+ INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null">
|
|
|
+ INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ DELETED = #{deleted,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields2 != null">
|
|
|
+ ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields3 != null">
|
|
|
+ ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields4 != null">
|
|
|
+ ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields5 != null">
|
|
|
+ ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields6 != null">
|
|
|
+ ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields7 != null">
|
|
|
+ ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="alternateFields8 != null">
|
|
|
+ ALTERNATE_FIELDS8 = #{alternateFields8,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 OYE_INBOUND_RESULT
|
|
|
+ (RESULT_ID,
|
|
|
+ INVENTORY_ID, SALE_NO, ORDER_ID,
|
|
|
+ SALE_MATERIAL_ID, CONSIGNEE_ID,
|
|
|
+ CAPACITY_NUMBHER, CAPACITY_ID,
|
|
|
+ MATERIAL_ID, METER, MATERIAL_NUMBER,
|
|
|
+ THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA,
|
|
|
+ NET_WEIGHT, INBOUND_WAREHOUSE,
|
|
|
+ INBOUND_AREA, INSERT_TIME, INSERT_USERNAME,
|
|
|
+ UPDATE_TIME, UPDATE_USERNAME,
|
|
|
+ DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3,
|
|
|
+ ALTERNATE_FIELDS4, ALTERNATE_FIELDS5,
|
|
|
+ ALTERNATE_FIELDS6, ALTERNATE_FIELDS7,
|
|
|
+ ALTERNATE_FIELDS8)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultId,jdbcType=DECIMAL},
|
|
|
+ #{item.inventoryId,jdbcType=DECIMAL}, #{item.saleNo,jdbcType=VARCHAR}, #{item.orderId,jdbcType=DECIMAL},
|
|
|
+ #{item.saleMaterialId,jdbcType=DECIMAL}, #{item.consigneeId,jdbcType=DECIMAL},
|
|
|
+ #{item.capacityNumbher,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
|
|
|
+ #{item.materialId,jdbcType=DECIMAL}, #{item.meter,jdbcType=DECIMAL}, #{item.materialNumber,jdbcType=DECIMAL},
|
|
|
+ #{item.theoryWeight,jdbcType=DECIMAL}, #{item.singleWeight,jdbcType=DECIMAL}, #{item.saleArea,jdbcType=VARCHAR},
|
|
|
+ #{item.netWeight,jdbcType=DECIMAL}, #{item.inboundWarehouse,jdbcType=VARCHAR},
|
|
|
+ #{item.inboundArea,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.deleted,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR}, #{item.alternateFields3,jdbcType=VARCHAR},
|
|
|
+ #{item.alternateFields4,jdbcType=VARCHAR}, #{item.alternateFields5,jdbcType=VARCHAR},
|
|
|
+ #{item.alternateFields6,jdbcType=VARCHAR}, #{item.alternateFields7,jdbcType=VARCHAR},
|
|
|
+ #{item.alternateFields8,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update OYE_INBOUND_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INVENTORY_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.inventoryId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SALE_NO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.saleNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ORDER_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SALE_MATERIAL_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.saleMaterialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,CONSIGNEE_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,CAPACITY_NUMBHER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityNumbher,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CAPACITY_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,METER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.meter,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_NUMBER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,THEORY_WEIGHT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.theoryWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SINGLE_WEIGHT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.singleWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SALE_AREA=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.saleArea,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,NET_WEIGHT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INBOUND_WAREHOUSE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundWarehouse,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INBOUND_AREA=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundArea,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS2=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS3=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS4=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS5=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS6=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS7=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ALTERNATE_FIELDS8=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from OYE_INBOUND_RESULT
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <select id="getOyeInboundResult" resultType="java.util.Map">
|
|
|
+ SELECT OIR.SINGLE_WEIGHT "singleWeight",
|
|
|
+ OIR.METER "meter",
|
|
|
+ OIR.MATERIAL_ID "materialId",
|
|
|
+ OIR.CAPACITY_NUMBHER "capacityNumber",
|
|
|
+ OIR.MATERIAL_NUMBER "materialNumber",
|
|
|
+ OIR.THEORY_WEIGHT "theoryWeight",
|
|
|
+ OIR.NET_WEIGHT "netWeight",
|
|
|
+ OIR.SALE_NO "saleNo",
|
|
|
+ OIR.SALE_AREA "saleArea",
|
|
|
+ OIR.INVENTORY_ID "inventoryId",
|
|
|
+ OIR.INBOUND_WAREHOUSE "inboundWarehouse",
|
|
|
+ OIR.INBOUND_AREA "inboundArea",
|
|
|
+ OIR.SALE_MATERIAL_ID "saleMaterialId",
|
|
|
+ OIR.INSERT_TIME "insertTime",
|
|
|
+ RC.CONSIGNEE_ID "consigneeId",
|
|
|
+ RC.CONSIGNEE_COMPANY_NAME "consigneeName",
|
|
|
+ RM.MATERIAL_NAME "materialName",
|
|
|
+ RM.MATERIAL_SPECIFICATION "materialSpe",
|
|
|
+ RM.MATERIAL_MODEL "materialModel",
|
|
|
+ OO.ORDER_ID "orderId",
|
|
|
+ OO.ORDER_NUMBER "orderNumber",
|
|
|
+ OO.CAPACITY_ID "capacityId"
|
|
|
+ FROM OYE_INBOUND_RESULT OIR
|
|
|
+ LEFT JOIN RMS_MATERIAL RM on OIR.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
+ LEFT JOIN RMS_CONSIGNEE RC on OIR.CONSIGNEE_ID = RC.CONSIGNEE_ID
|
|
|
+ LEFT JOIN OMSTRUCK_ORDER OO on OIR.ORDER_ID = OO.ORDER_ID
|
|
|
+ <where>
|
|
|
+ <if test="oneDate != null">
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= OIR.INSERT_TIME
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and isEnFactoryFlag == 5">
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= OIR.INSERT_TIME
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= OIR.INSERT_TIME
|
|
|
+ </if>
|
|
|
+ <if test="consigneeName != null and consigneeName != ''">
|
|
|
+ AND RC.CONSIGNEE_COMPANY_NAME LIKE '%${consigneeName}%'
|
|
|
+ </if>
|
|
|
+ <if test="capacityNumber != null and capacityNumber != ''">
|
|
|
+ AND OIR.CAPACITY_NUMBHER LIKE '%${capacityNumber}%'
|
|
|
+ </if>
|
|
|
+ <if test="saleArea != null and saleArea != ''">
|
|
|
+ AND OIR.SALE_AREA LIKE '%${saleArea}%'
|
|
|
+ </if>
|
|
|
+ <if test="inboundWarehouse != null and inboundWarehouse != ''">
|
|
|
+ AND OIR.INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
|
|
|
+ </if>
|
|
|
+ <if test="inboundArea != null and inboundArea != ''">
|
|
|
+ AND OIR.inbound_Area LIKE '%${inboundArea}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
+ AND RM.material_Name LIKE '%${materialName}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialSpe != null and materialSpe != ''">
|
|
|
+ AND RM.MATERIAL_SPECIFICATION LIKE '%${materialSpe}%'
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY OIR.INSERT_TIME DESC
|
|
|
+ </select>
|
|
|
+ <select id="selectSaleMaterialID" resultType="java.lang.Integer">
|
|
|
+ SELECT OIR.SALE_MATERIAL_ID FROM OYE_INBOUND_RESULT OIR
|
|
|
+ WHERE OIR.SALE_MATERIAL_ID = #{saleMaterialId}
|
|
|
+ </select>
|
|
|
+ <update id="updateOrderStatus">
|
|
|
+ UPDATE TMSTRUCK_TOTAL_RESULT
|
|
|
+ SET ORDER_STATUS = '已入库'
|
|
|
+ WHERE ORDER_ID = #{orderId}
|
|
|
+ </update>
|
|
|
+</mapper>
|