|
@@ -0,0 +1,161 @@
|
|
|
+<?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.zkqy.amichi.mapper.QualityinspectioninformationMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.zkqy.amichi.domain.Qualityinspectioninformation" id="QualityinspectioninformationResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="manufacturingProcess" column="manufacturing_process" />
|
|
|
+ <result property="reportName" column="report_name" />
|
|
|
+ <result property="reportDate" column="report_date" />
|
|
|
+ <result property="inspector" column="inspector" />
|
|
|
+ <result property="examine" column="examine" />
|
|
|
+ <result property="examineDate" column="examine_date" />
|
|
|
+ <result property="inspectorDate" column="inspector_date" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="jlOneFailedBatch" column="jl_one_failed_batch" />
|
|
|
+ <result property="jlTotalBatchForInspection" column="jl_total_batch_for_inspection" />
|
|
|
+ <result property="jlQuantityOfRejectsReturns" column="jl_quantity_of_rejects_returns" />
|
|
|
+ <result property="jlQualifiedRateOfTheMonth" column="jl_qualified_rate_of_the_month" />
|
|
|
+ <result property="bpNumberOfFailures" column="bp_number_of_failures" />
|
|
|
+ <result property="bpScrapQuantity" column="bp_scrap_quantity" />
|
|
|
+ <result property="bpTotalForTheMonth" column="bp_total_for_the_month" />
|
|
|
+ <result property="bpPassRateThisMonth" column="bp_pass_rate_this_month" />
|
|
|
+ <result property="ccNumberOfFailures" column="cc_number_of_failures" />
|
|
|
+ <result property="ccScrapQuantity" column="cc_scrap_quantity" />
|
|
|
+ <result property="ccTotalForTheMonth" column="cc_total_for_the_month" />
|
|
|
+ <result property="ccPassRateThisMonth" column="cc_pass_rate_this_month" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectQualityinspectioninformationVo">
|
|
|
+ select id, manufacturing_process, report_name, report_date, inspector, examine, examine_date, inspector_date, create_time, create_by, type, jl_one_failed_batch, jl_total_batch_for_inspection, jl_quantity_of_rejects_returns, jl_qualified_rate_of_the_month, bp_number_of_failures, bp_scrap_quantity, bp_total_for_the_month, bp_pass_rate_this_month, cc_number_of_failures, cc_scrap_quantity, cc_total_for_the_month, cc_pass_rate_this_month from fjqydb.qualityinspectioninformation
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectQualityinspectioninformationList" parameterType="Qualityinspectioninformation" resultMap="QualityinspectioninformationResult">
|
|
|
+ <include refid="selectQualityinspectioninformationVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="manufacturingProcess != null and manufacturingProcess != '' and manufacturingProcess != '全部'"> and manufacturing_process = #{manufacturingProcess}</if>
|
|
|
+ <if test="reportName != null and reportName != ''"> and report_name like concat('%', #{reportName}, '%')</if>
|
|
|
+ <if test="reportDate != null and reportDate != ''"> and report_date = #{reportDate}</if>
|
|
|
+ <if test="inspector != null and inspector != ''"> and inspector = #{inspector}</if>
|
|
|
+ <if test="examine != null and examine != ''"> and examine = #{examine}</if>
|
|
|
+ <if test="examineDate != null and examineDate != ''"> and examine_date = #{examineDate}</if>
|
|
|
+ <if test="inspectorDate != null and inspectorDate != ''"> and inspector_date = #{inspectorDate}</if>
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
+ <if test="jlOneFailedBatch != null and jlOneFailedBatch != ''"> and jl_one_failed_batch = #{jlOneFailedBatch}</if>
|
|
|
+ <if test="jlTotalBatchForInspection != null and jlTotalBatchForInspection != ''"> and jl_total_batch_for_inspection = #{jlTotalBatchForInspection}</if>
|
|
|
+ <if test="jlQuantityOfRejectsReturns != null and jlQuantityOfRejectsReturns != ''"> and jl_quantity_of_rejects_returns = #{jlQuantityOfRejectsReturns}</if>
|
|
|
+ <if test="jlQualifiedRateOfTheMonth != null and jlQualifiedRateOfTheMonth != ''"> and jl_qualified_rate_of_the_month = #{jlQualifiedRateOfTheMonth}</if>
|
|
|
+ <if test="bpNumberOfFailures != null and bpNumberOfFailures != ''"> and bp_number_of_failures = #{bpNumberOfFailures}</if>
|
|
|
+ <if test="bpScrapQuantity != null and bpScrapQuantity != ''"> and bp_scrap_quantity = #{bpScrapQuantity}</if>
|
|
|
+ <if test="bpTotalForTheMonth != null and bpTotalForTheMonth != ''"> and bp_total_for_the_month = #{bpTotalForTheMonth}</if>
|
|
|
+ <if test="bpPassRateThisMonth != null and bpPassRateThisMonth != ''"> and bp_pass_rate_this_month = #{bpPassRateThisMonth}</if>
|
|
|
+ <if test="ccNumberOfFailures != null and ccNumberOfFailures != ''"> and cc_number_of_failures = #{ccNumberOfFailures}</if>
|
|
|
+ <if test="ccScrapQuantity != null and ccScrapQuantity != ''"> and cc_scrap_quantity = #{ccScrapQuantity}</if>
|
|
|
+ <if test="ccTotalForTheMonth != null and ccTotalForTheMonth != ''"> and cc_total_for_the_month = #{ccTotalForTheMonth}</if>
|
|
|
+ <if test="ccPassRateThisMonth != null and ccPassRateThisMonth != ''"> and cc_pass_rate_this_month = #{ccPassRateThisMonth}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectQualityinspectioninformationById" parameterType="Long" resultMap="QualityinspectioninformationResult">
|
|
|
+ <include refid="selectQualityinspectioninformationVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertQualityinspectioninformation" parameterType="Qualityinspectioninformation" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into fjqydb.qualityinspectioninformation
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="manufacturingProcess != null">manufacturing_process,</if>
|
|
|
+ <if test="reportName != null">report_name,</if>
|
|
|
+ <if test="reportDate != null">report_date,</if>
|
|
|
+ <if test="inspector != null">inspector,</if>
|
|
|
+ <if test="examine != null">examine,</if>
|
|
|
+ <if test="examineDate != null">examine_date,</if>
|
|
|
+ <if test="inspectorDate != null">inspector_date,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="jlOneFailedBatch != null">jl_one_failed_batch,</if>
|
|
|
+ <if test="jlTotalBatchForInspection != null">jl_total_batch_for_inspection,</if>
|
|
|
+ <if test="jlQuantityOfRejectsReturns != null">jl_quantity_of_rejects_returns,</if>
|
|
|
+ <if test="jlQualifiedRateOfTheMonth != null">jl_qualified_rate_of_the_month,</if>
|
|
|
+ <if test="bpNumberOfFailures != null">bp_number_of_failures,</if>
|
|
|
+ <if test="bpScrapQuantity != null">bp_scrap_quantity,</if>
|
|
|
+ <if test="bpTotalForTheMonth != null">bp_total_for_the_month,</if>
|
|
|
+ <if test="bpPassRateThisMonth != null">bp_pass_rate_this_month,</if>
|
|
|
+ <if test="ccNumberOfFailures != null">cc_number_of_failures,</if>
|
|
|
+ <if test="ccScrapQuantity != null">cc_scrap_quantity,</if>
|
|
|
+ <if test="ccTotalForTheMonth != null">cc_total_for_the_month,</if>
|
|
|
+ <if test="ccPassRateThisMonth != null">cc_pass_rate_this_month,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="manufacturingProcess != null">#{manufacturingProcess},</if>
|
|
|
+ <if test="reportName != null">#{reportName},</if>
|
|
|
+ <if test="reportDate != null">#{reportDate},</if>
|
|
|
+ <if test="inspector != null">#{inspector},</if>
|
|
|
+ <if test="examine != null">#{examine},</if>
|
|
|
+ <if test="examineDate != null">#{examineDate},</if>
|
|
|
+ <if test="inspectorDate != null">#{inspectorDate},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="jlOneFailedBatch != null">#{jlOneFailedBatch},</if>
|
|
|
+ <if test="jlTotalBatchForInspection != null">#{jlTotalBatchForInspection},</if>
|
|
|
+ <if test="jlQuantityOfRejectsReturns != null">#{jlQuantityOfRejectsReturns},</if>
|
|
|
+ <if test="jlQualifiedRateOfTheMonth != null">#{jlQualifiedRateOfTheMonth},</if>
|
|
|
+ <if test="bpNumberOfFailures != null">#{bpNumberOfFailures},</if>
|
|
|
+ <if test="bpScrapQuantity != null">#{bpScrapQuantity},</if>
|
|
|
+ <if test="bpTotalForTheMonth != null">#{bpTotalForTheMonth},</if>
|
|
|
+ <if test="bpPassRateThisMonth != null">#{bpPassRateThisMonth},</if>
|
|
|
+ <if test="ccNumberOfFailures != null">#{ccNumberOfFailures},</if>
|
|
|
+ <if test="ccScrapQuantity != null">#{ccScrapQuantity},</if>
|
|
|
+ <if test="ccTotalForTheMonth != null">#{ccTotalForTheMonth},</if>
|
|
|
+ <if test="ccPassRateThisMonth != null">#{ccPassRateThisMonth},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateQualityinspectioninformation" parameterType="Qualityinspectioninformation">
|
|
|
+ update fjqydb.qualityinspectioninformation
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="manufacturingProcess != null">manufacturing_process = #{manufacturingProcess},</if>
|
|
|
+ <if test="reportName != null">report_name = #{reportName},</if>
|
|
|
+ <if test="reportDate != null">report_date = #{reportDate},</if>
|
|
|
+ <if test="inspector != null">inspector = #{inspector},</if>
|
|
|
+ <if test="examine != null">examine = #{examine},</if>
|
|
|
+ <if test="examineDate != null">examine_date = #{examineDate},</if>
|
|
|
+ <if test="inspectorDate != null">inspector_date = #{inspectorDate},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="jlOneFailedBatch != null">jl_one_failed_batch = #{jlOneFailedBatch},</if>
|
|
|
+ <if test="jlTotalBatchForInspection != null">jl_total_batch_for_inspection = #{jlTotalBatchForInspection},</if>
|
|
|
+ <if test="jlQuantityOfRejectsReturns != null">jl_quantity_of_rejects_returns = #{jlQuantityOfRejectsReturns},</if>
|
|
|
+ <if test="jlQualifiedRateOfTheMonth != null">jl_qualified_rate_of_the_month = #{jlQualifiedRateOfTheMonth},</if>
|
|
|
+ <if test="bpNumberOfFailures != null">bp_number_of_failures = #{bpNumberOfFailures},</if>
|
|
|
+ <if test="bpScrapQuantity != null">bp_scrap_quantity = #{bpScrapQuantity},</if>
|
|
|
+ <if test="bpTotalForTheMonth != null">bp_total_for_the_month = #{bpTotalForTheMonth},</if>
|
|
|
+ <if test="bpPassRateThisMonth != null">bp_pass_rate_this_month = #{bpPassRateThisMonth},</if>
|
|
|
+ <if test="ccNumberOfFailures != null">cc_number_of_failures = #{ccNumberOfFailures},</if>
|
|
|
+ <if test="ccScrapQuantity != null">cc_scrap_quantity = #{ccScrapQuantity},</if>
|
|
|
+ <if test="ccTotalForTheMonth != null">cc_total_for_the_month = #{ccTotalForTheMonth},</if>
|
|
|
+ <if test="ccPassRateThisMonth != null">cc_pass_rate_this_month = #{ccPassRateThisMonth},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteQualityinspectioninformationById" parameterType="Long">
|
|
|
+ delete from fjqydb.qualityinspectioninformation where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteQualityinspectioninformationByIds" parameterType="String">
|
|
|
+ delete from fjqydb.qualityinspectioninformation where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|