|
|
@@ -0,0 +1,192 @@
|
|
|
+<?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.jjt.lean.mapper.LeanGykcMapper">
|
|
|
+
|
|
|
+ <resultMap type="LeanGykc" id="LeanGykcResult">
|
|
|
+ <result property="gykcId" column="GYKC_ID"/>
|
|
|
+ <result property="storageTime" column="STORAGE_TIME"/>
|
|
|
+ <result property="silkCarNo" column="SILK_CAR_NO"/>
|
|
|
+ <result property="locationAddress" column="LOCATION_ADDRESS"/>
|
|
|
+ <result property="locationStatus" column="LOCATION_STATUS"/>
|
|
|
+ <result property="batchNo" column="BATCH_NO"/>
|
|
|
+ <result property="silkCarGrade" column="SILK_CAR_GRADE"/>
|
|
|
+ <result property="specification" column="SPECIFICATION"/>
|
|
|
+ <result property="spinningArea" column="SPINNING_AREA"/>
|
|
|
+ <result property="spinningDetail" column="SPINNING_DETAIL"/>
|
|
|
+ <result property="tagInfo" column="TAG_INFO"/>
|
|
|
+ <result property="documentNo" column="DOCUMENT_NO"/>
|
|
|
+ <result property="maxFullRollTime" column="MAX_FULL_ROLL_TIME"/>
|
|
|
+ <result property="silkSpindleCount" column="SILK_SPINDLE_COUNT"/>
|
|
|
+ <result property="totalWeight" column="TOTAL_WEIGHT"/>
|
|
|
+ <result property="balanceTime" column="BALANCE_TIME"/>
|
|
|
+ <result property="batchBalanceTimeLower" column="BATCH_BALANCE_TIME_LOWER"/>
|
|
|
+ <result property="lowerDifference" column="LOWER_DIFFERENCE"/>
|
|
|
+ <result property="batchBalanceTimeUpper" column="BATCH_BALANCE_TIME_UPPER"/>
|
|
|
+ <result property="upperDifference" column="UPPER_DIFFERENCE"/>
|
|
|
+ <result property="silkCarId" column="SILK_CAR_ID"/>
|
|
|
+ <result property="locationIndex" column="LOCATION_INDEX"/>
|
|
|
+ <result property="locationStatusCode" column="LOCATION_STATUS_CODE"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectLeanGykcVo">
|
|
|
+ select GYKC_ID,
|
|
|
+ STORAGE_TIME,
|
|
|
+ SILK_CAR_NO,
|
|
|
+ LOCATION_ADDRESS,
|
|
|
+ LOCATION_STATUS,
|
|
|
+ BATCH_NO,
|
|
|
+ SILK_CAR_GRADE,
|
|
|
+ SPECIFICATION,
|
|
|
+ SPINNING_AREA,
|
|
|
+ SPINNING_DETAIL,
|
|
|
+ TAG_INFO,
|
|
|
+ DOCUMENT_NO,
|
|
|
+ MAX_FULL_ROLL_TIME,
|
|
|
+ SILK_SPINDLE_COUNT,
|
|
|
+ TOTAL_WEIGHT,
|
|
|
+ BALANCE_TIME,
|
|
|
+ BATCH_BALANCE_TIME_LOWER,
|
|
|
+ LOWER_DIFFERENCE,
|
|
|
+ BATCH_BALANCE_TIME_UPPER,
|
|
|
+ UPPER_DIFFERENCE,
|
|
|
+ SILK_CAR_ID,
|
|
|
+ LOCATION_INDEX,
|
|
|
+ LOCATION_STATUS_CODE
|
|
|
+ from LEAN_GYKC
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectLeanGykcList" parameterType="LeanGykc" resultMap="LeanGykcResult">
|
|
|
+ <include refid="selectLeanGykcVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="storageTime != null ">and STORAGE_TIME = #{storageTime}</if>
|
|
|
+ <if test="silkCarNo != null and silkCarNo != ''">and SILK_CAR_NO = #{silkCarNo}</if>
|
|
|
+ <if test="locationAddress != null and locationAddress != ''">and LOCATION_ADDRESS = #{locationAddress}</if>
|
|
|
+ <if test="locationStatus != null and locationStatus != ''">and LOCATION_STATUS = #{locationStatus}</if>
|
|
|
+ <if test="batchNo != null and batchNo != ''">and BATCH_NO = #{batchNo}</if>
|
|
|
+ <if test="silkCarGrade != null and silkCarGrade != ''">and SILK_CAR_GRADE = #{silkCarGrade}</if>
|
|
|
+ <if test="specification != null and specification != ''">and SPECIFICATION = #{specification}</if>
|
|
|
+ <if test="spinningArea != null and spinningArea != ''">and SPINNING_AREA = #{spinningArea}</if>
|
|
|
+ <if test="spinningDetail != null and spinningDetail != ''">and SPINNING_DETAIL = #{spinningDetail}</if>
|
|
|
+ <if test="tagInfo != null and tagInfo != ''">and TAG_INFO = #{tagInfo}</if>
|
|
|
+ <if test="documentNo != null and documentNo != ''">and DOCUMENT_NO = #{documentNo}</if>
|
|
|
+ <if test="maxFullRollTime != null ">and MAX_FULL_ROLL_TIME = #{maxFullRollTime}</if>
|
|
|
+ <if test="silkSpindleCount != null ">and SILK_SPINDLE_COUNT = #{silkSpindleCount}</if>
|
|
|
+ <if test="totalWeight != null ">and TOTAL_WEIGHT = #{totalWeight}</if>
|
|
|
+ <if test="balanceTime != null ">and BALANCE_TIME = #{balanceTime}</if>
|
|
|
+ <if test="batchBalanceTimeLower != null ">and BATCH_BALANCE_TIME_LOWER = #{batchBalanceTimeLower}</if>
|
|
|
+ <if test="lowerDifference != null ">and LOWER_DIFFERENCE = #{lowerDifference}</if>
|
|
|
+ <if test="batchBalanceTimeUpper != null ">and BATCH_BALANCE_TIME_UPPER = #{batchBalanceTimeUpper}</if>
|
|
|
+ <if test="upperDifference != null ">and UPPER_DIFFERENCE = #{upperDifference}</if>
|
|
|
+ <if test="silkCarId != null ">and SILK_CAR_ID = #{silkCarId}</if>
|
|
|
+ <if test="locationIndex != null ">and LOCATION_INDEX = #{locationIndex}</if>
|
|
|
+ <if test="locationStatusCode != null and locationStatusCode != ''">and LOCATION_STATUS_CODE =
|
|
|
+ #{locationStatusCode}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectLeanGykcByGykcId" parameterType="Long" resultMap="LeanGykcResult">
|
|
|
+ <include refid="selectLeanGykcVo"/>
|
|
|
+ where GYKC_ID = #{gykcId}
|
|
|
+ </select>
|
|
|
+ <select id="selectPoyWeight" resultType="java.math.BigDecimal">
|
|
|
+ select sum(TOTAL_WEIGHT)
|
|
|
+ from LEAN_GYKC
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertLeanGykc" parameterType="LeanGykc" useGeneratedKeys="true" keyProperty="gykcId">
|
|
|
+ insert into LEAN_GYKC
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="storageTime != null">STORAGE_TIME,</if>
|
|
|
+ <if test="silkCarNo != null">SILK_CAR_NO,</if>
|
|
|
+ <if test="locationAddress != null">LOCATION_ADDRESS,</if>
|
|
|
+ <if test="locationStatus != null">LOCATION_STATUS,</if>
|
|
|
+ <if test="batchNo != null">BATCH_NO,</if>
|
|
|
+ <if test="silkCarGrade != null">SILK_CAR_GRADE,</if>
|
|
|
+ <if test="specification != null">SPECIFICATION,</if>
|
|
|
+ <if test="spinningArea != null">SPINNING_AREA,</if>
|
|
|
+ <if test="spinningDetail != null">SPINNING_DETAIL,</if>
|
|
|
+ <if test="tagInfo != null">TAG_INFO,</if>
|
|
|
+ <if test="documentNo != null">DOCUMENT_NO,</if>
|
|
|
+ <if test="maxFullRollTime != null">MAX_FULL_ROLL_TIME,</if>
|
|
|
+ <if test="silkSpindleCount != null">SILK_SPINDLE_COUNT,</if>
|
|
|
+ <if test="totalWeight != null">TOTAL_WEIGHT,</if>
|
|
|
+ <if test="balanceTime != null">BALANCE_TIME,</if>
|
|
|
+ <if test="batchBalanceTimeLower != null">BATCH_BALANCE_TIME_LOWER,</if>
|
|
|
+ <if test="lowerDifference != null">LOWER_DIFFERENCE,</if>
|
|
|
+ <if test="batchBalanceTimeUpper != null">BATCH_BALANCE_TIME_UPPER,</if>
|
|
|
+ <if test="upperDifference != null">UPPER_DIFFERENCE,</if>
|
|
|
+ <if test="silkCarId != null">SILK_CAR_ID,</if>
|
|
|
+ <if test="locationIndex != null">LOCATION_INDEX,</if>
|
|
|
+ <if test="locationStatusCode != null">LOCATION_STATUS_CODE,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="storageTime != null">#{storageTime},</if>
|
|
|
+ <if test="silkCarNo != null">#{silkCarNo},</if>
|
|
|
+ <if test="locationAddress != null">#{locationAddress},</if>
|
|
|
+ <if test="locationStatus != null">#{locationStatus},</if>
|
|
|
+ <if test="batchNo != null">#{batchNo},</if>
|
|
|
+ <if test="silkCarGrade != null">#{silkCarGrade},</if>
|
|
|
+ <if test="specification != null">#{specification},</if>
|
|
|
+ <if test="spinningArea != null">#{spinningArea},</if>
|
|
|
+ <if test="spinningDetail != null">#{spinningDetail},</if>
|
|
|
+ <if test="tagInfo != null">#{tagInfo},</if>
|
|
|
+ <if test="documentNo != null">#{documentNo},</if>
|
|
|
+ <if test="maxFullRollTime != null">#{maxFullRollTime},</if>
|
|
|
+ <if test="silkSpindleCount != null">#{silkSpindleCount},</if>
|
|
|
+ <if test="totalWeight != null">#{totalWeight},</if>
|
|
|
+ <if test="balanceTime != null">#{balanceTime},</if>
|
|
|
+ <if test="batchBalanceTimeLower != null">#{batchBalanceTimeLower},</if>
|
|
|
+ <if test="lowerDifference != null">#{lowerDifference},</if>
|
|
|
+ <if test="batchBalanceTimeUpper != null">#{batchBalanceTimeUpper},</if>
|
|
|
+ <if test="upperDifference != null">#{upperDifference},</if>
|
|
|
+ <if test="silkCarId != null">#{silkCarId},</if>
|
|
|
+ <if test="locationIndex != null">#{locationIndex},</if>
|
|
|
+ <if test="locationStatusCode != null">#{locationStatusCode},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateLeanGykc" parameterType="LeanGykc">
|
|
|
+ update LEAN_GYKC
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="storageTime != null">STORAGE_TIME = #{storageTime},</if>
|
|
|
+ <if test="silkCarNo != null">SILK_CAR_NO = #{silkCarNo},</if>
|
|
|
+ <if test="locationAddress != null">LOCATION_ADDRESS = #{locationAddress},</if>
|
|
|
+ <if test="locationStatus != null">LOCATION_STATUS = #{locationStatus},</if>
|
|
|
+ <if test="batchNo != null">BATCH_NO = #{batchNo},</if>
|
|
|
+ <if test="silkCarGrade != null">SILK_CAR_GRADE = #{silkCarGrade},</if>
|
|
|
+ <if test="specification != null">SPECIFICATION = #{specification},</if>
|
|
|
+ <if test="spinningArea != null">SPINNING_AREA = #{spinningArea},</if>
|
|
|
+ <if test="spinningDetail != null">SPINNING_DETAIL = #{spinningDetail},</if>
|
|
|
+ <if test="tagInfo != null">TAG_INFO = #{tagInfo},</if>
|
|
|
+ <if test="documentNo != null">DOCUMENT_NO = #{documentNo},</if>
|
|
|
+ <if test="maxFullRollTime != null">MAX_FULL_ROLL_TIME = #{maxFullRollTime},</if>
|
|
|
+ <if test="silkSpindleCount != null">SILK_SPINDLE_COUNT = #{silkSpindleCount},</if>
|
|
|
+ <if test="totalWeight != null">TOTAL_WEIGHT = #{totalWeight},</if>
|
|
|
+ <if test="balanceTime != null">BALANCE_TIME = #{balanceTime},</if>
|
|
|
+ <if test="batchBalanceTimeLower != null">BATCH_BALANCE_TIME_LOWER = #{batchBalanceTimeLower},</if>
|
|
|
+ <if test="lowerDifference != null">LOWER_DIFFERENCE = #{lowerDifference},</if>
|
|
|
+ <if test="batchBalanceTimeUpper != null">BATCH_BALANCE_TIME_UPPER = #{batchBalanceTimeUpper},</if>
|
|
|
+ <if test="upperDifference != null">UPPER_DIFFERENCE = #{upperDifference},</if>
|
|
|
+ <if test="silkCarId != null">SILK_CAR_ID = #{silkCarId},</if>
|
|
|
+ <if test="locationIndex != null">LOCATION_INDEX = #{locationIndex},</if>
|
|
|
+ <if test="locationStatusCode != null">LOCATION_STATUS_CODE = #{locationStatusCode},</if>
|
|
|
+ </trim>
|
|
|
+ where GYKC_ID = #{gykcId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteLeanGykcByGykcId" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from LEAN_GYKC
|
|
|
+ where GYKC_ID = #{gykcId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteLeanGykcByGykcIds" parameterType="String">
|
|
|
+ delete from LEAN_GYKC where GYKC_ID in
|
|
|
+ <foreach item="gykcId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{gykcId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|