|
|
@@ -0,0 +1,182 @@
|
|
|
+<?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.LeanCapabilityAnalysisMapper">
|
|
|
+
|
|
|
+ <resultMap type="LeanCapabilityAnalysis" id="LeanCapabilityAnalysisResult">
|
|
|
+ <result property="bwId" column="BW_ID"/>
|
|
|
+ <result property="dataTime" column="DATA_TIME"/>
|
|
|
+ <result property="dataType" column="DATA_TYPE"/>
|
|
|
+ <result property="targetValue" column="TARGET_VALUE"/>
|
|
|
+ <result property="toleranceRange" column="TOLERANCE_RANGE"/>
|
|
|
+ <result property="toleranceValue" column="TOLERANCE_VALUE"/>
|
|
|
+ <result property="measuredValue" column="MEASURED_VALUE"/>
|
|
|
+ <result property="cpuValue" column="CPU_VALUE"/>
|
|
|
+ <result property="cplValue" column="CPL_VALUE"/>
|
|
|
+ <result property="cpkValue" column="CPK_VALUE"/>
|
|
|
+ <result property="stdDeviation" column="STD_DEVIATION"/>
|
|
|
+ <result property="meanValue" column="MEAN_VALUE"/>
|
|
|
+ <result property="maxValue" column="MAX_VALUE"/>
|
|
|
+ <result property="minValue" column="MIN_VALUE"/>
|
|
|
+ <result property="usl" column="USL"/>
|
|
|
+ <result property="lsl" column="LSL"/>
|
|
|
+ <result property="createBy" column="CREATE_BY"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
+ <result property="updateBy" column="UPDATE_BY"/>
|
|
|
+ <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectLeanCapabilityAnalysisVo">
|
|
|
+ select BW_ID,
|
|
|
+ DATA_TIME,
|
|
|
+ DATA_TYPE,
|
|
|
+ TARGET_VALUE,
|
|
|
+ TOLERANCE_RANGE,
|
|
|
+ TOLERANCE_VALUE,
|
|
|
+ MEASURED_VALUE,
|
|
|
+ CPU_VALUE,
|
|
|
+ CPL_VALUE,
|
|
|
+ CPK_VALUE,
|
|
|
+ STD_DEVIATION,
|
|
|
+ MEAN_VALUE,
|
|
|
+ MAX_VALUE,
|
|
|
+ MIN_VALUE,
|
|
|
+ USL,
|
|
|
+ LSL,
|
|
|
+ CREATE_BY,
|
|
|
+ CREATE_TIME,
|
|
|
+ UPDATE_BY,
|
|
|
+ UPDATE_TIME,
|
|
|
+ REMARK
|
|
|
+ from LEAN_CAPABILITY_ANALYSIS
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectLeanCapabilityAnalysisList" parameterType="LeanCapabilityAnalysis"
|
|
|
+ resultMap="LeanCapabilityAnalysisResult">
|
|
|
+ <include refid="selectLeanCapabilityAnalysisVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="dataTime != null ">and DATA_TIME = #{dataTime}</if>
|
|
|
+ <if test="targetValue != null ">and TARGET_VALUE = #{targetValue}</if>
|
|
|
+ <if test="toleranceRange != null ">and TOLERANCE_RANGE = #{toleranceRange}</if>
|
|
|
+ <if test="toleranceValue != null ">and TOLERANCE_VALUE = #{toleranceValue}</if>
|
|
|
+ <if test="measuredValue != null and measuredValue != ''">and MEASURED_VALUE = #{measuredValue}</if>
|
|
|
+ <if test="cpuValue != null ">and CPU_VALUE = #{cpuValue}</if>
|
|
|
+ <if test="cplValue != null ">and CPL_VALUE = #{cplValue}</if>
|
|
|
+ <if test="cpkValue != null ">and CPK_VALUE = #{cpkValue}</if>
|
|
|
+ <if test="stdDeviation != null ">and STD_DEVIATION = #{stdDeviation}</if>
|
|
|
+ <if test="meanValue != null and meanValue != ''">and MEAN_VALUE = #{meanValue}</if>
|
|
|
+ <if test="maxValue != null and maxValue != ''">and MAX_VALUE = #{maxValue}</if>
|
|
|
+ <if test="minValue != null and minValue != ''">and MIN_VALUE = #{minValue}</if>
|
|
|
+ <if test="usl != null and usl != ''">and USL = #{usl}</if>
|
|
|
+ <if test="lsl != null and lsl != ''">and LSL = #{lsl}</if>
|
|
|
+ <if test="createBy != null and createBy != ''">and CREATE_BY = #{createBy}</if>
|
|
|
+ <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">and UPDATE_BY = #{updateBy}</if>
|
|
|
+ <if test="updateTime != null ">and UPDATE_TIME = #{updateTime}</if>
|
|
|
+ <if test="remark != null and remark != ''">and REMARK = #{remark}</if>
|
|
|
+ </where>
|
|
|
+ order by data_time
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="checkDuplicateDataTime" parameterType="LeanCapabilityAnalysis" resultType="int">
|
|
|
+ select count(1) from LEAN_CAPABILITY_ANALYSIS
|
|
|
+ where DATA_TIME = #{dataTime}
|
|
|
+ <if test="bwId != null">and BW_ID != #{bwId}</if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectLeanCapabilityAnalysisByBwId" parameterType="Long" resultMap="LeanCapabilityAnalysisResult">
|
|
|
+ <include refid="selectLeanCapabilityAnalysisVo"/>
|
|
|
+ where BW_ID = #{bwId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertLeanCapabilityAnalysis" parameterType="LeanCapabilityAnalysis" useGeneratedKeys="true"
|
|
|
+ keyProperty="bwId">
|
|
|
+ insert into LEAN_CAPABILITY_ANALYSIS
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="dataTime != null">DATA_TIME,</if>
|
|
|
+ <if test="dataType != null">DATA_TYPE,</if>
|
|
|
+ <if test="targetValue != null">TARGET_VALUE,</if>
|
|
|
+ <if test="toleranceRange != null">TOLERANCE_RANGE,</if>
|
|
|
+ <if test="toleranceValue != null">TOLERANCE_VALUE,</if>
|
|
|
+ <if test="measuredValue != null">MEASURED_VALUE,</if>
|
|
|
+ <if test="cpuValue != null">CPU_VALUE,</if>
|
|
|
+ <if test="cplValue != null">CPL_VALUE,</if>
|
|
|
+ <if test="cpkValue != null">CPK_VALUE,</if>
|
|
|
+ <if test="stdDeviation != null">STD_DEVIATION,</if>
|
|
|
+ <if test="meanValue != null">MEAN_VALUE,</if>
|
|
|
+ <if test="maxValue != null">MAX_VALUE,</if>
|
|
|
+ <if test="minValue != null">MIN_VALUE,</if>
|
|
|
+ <if test="usl != null">USL,</if>
|
|
|
+ <if test="lsl != null">LSL,</if>
|
|
|
+ <if test="createBy != null">CREATE_BY,</if>
|
|
|
+ <if test="createTime != null">CREATE_TIME,</if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY,</if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME,</if>
|
|
|
+ <if test="remark != null">REMARK,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="dataTime != null">#{dataTime},</if>
|
|
|
+ <if test="dataType != null">#{dataType},</if>
|
|
|
+ <if test="targetValue != null">#{targetValue},</if>
|
|
|
+ <if test="toleranceRange != null">#{toleranceRange},</if>
|
|
|
+ <if test="toleranceValue != null">#{toleranceValue},</if>
|
|
|
+ <if test="measuredValue != null">#{measuredValue},</if>
|
|
|
+ <if test="cpuValue != null">#{cpuValue},</if>
|
|
|
+ <if test="cplValue != null">#{cplValue},</if>
|
|
|
+ <if test="cpkValue != null">#{cpkValue},</if>
|
|
|
+ <if test="stdDeviation != null">#{stdDeviation},</if>
|
|
|
+ <if test="meanValue != null">#{meanValue},</if>
|
|
|
+ <if test="maxValue != null">#{maxValue},</if>
|
|
|
+ <if test="minValue != null">#{minValue},</if>
|
|
|
+ <if test="usl != null">#{usl},</if>
|
|
|
+ <if test="lsl != null">#{lsl},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateLeanCapabilityAnalysis" parameterType="LeanCapabilityAnalysis">
|
|
|
+ update LEAN_CAPABILITY_ANALYSIS
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="dataTime != null">DATA_TIME = #{dataTime},</if>
|
|
|
+ <if test="dataType != null">DATA_TYPE = #{dataType},</if>
|
|
|
+ <if test="targetValue != null">TARGET_VALUE = #{targetValue},</if>
|
|
|
+ <if test="toleranceRange != null">TOLERANCE_RANGE = #{toleranceRange},</if>
|
|
|
+ <if test="toleranceValue != null">TOLERANCE_VALUE = #{toleranceValue},</if>
|
|
|
+ <if test="measuredValue != null">MEASURED_VALUE = #{measuredValue},</if>
|
|
|
+ <if test="cpuValue != null">CPU_VALUE = #{cpuValue},</if>
|
|
|
+ <if test="cplValue != null">CPL_VALUE = #{cplValue},</if>
|
|
|
+ <if test="cpkValue != null">CPK_VALUE = #{cpkValue},</if>
|
|
|
+ <if test="stdDeviation != null">STD_DEVIATION = #{stdDeviation},</if>
|
|
|
+ <if test="meanValue != null">MEAN_VALUE = #{meanValue},</if>
|
|
|
+ <if test="maxValue != null">MAX_VALUE = #{maxValue},</if>
|
|
|
+ <if test="minValue != null">MIN_VALUE = #{minValue},</if>
|
|
|
+ <if test="usl != null">USL = #{usl},</if>
|
|
|
+ <if test="lsl != null">LSL = #{lsl},</if>
|
|
|
+ <if test="createBy != null">CREATE_BY = #{createBy},</if>
|
|
|
+ <if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
|
|
+ <if test="remark != null">REMARK = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where BW_ID = #{bwId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteLeanCapabilityAnalysisByBwId" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from LEAN_CAPABILITY_ANALYSIS
|
|
|
+ where BW_ID = #{bwId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteLeanCapabilityAnalysisByBwIds" parameterType="String">
|
|
|
+ delete from LEAN_CAPABILITY_ANALYSIS where BW_ID in
|
|
|
+ <foreach item="bwId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{bwId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|