You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
5.6 KiB
XML
79 lines
5.6 KiB
XML
<?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="org.dromara.qms.mapper.QcInspectionMainMapper">
|
|
|
|
<resultMap type="QcInspectionMain" id="QcInspectionMainResult">
|
|
<result property="inspectionId" column="inspection_id" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
<result property="inspectionNo" column="inspection_no" />
|
|
<result property="materialCode" column="material_code" />
|
|
<result property="materialType" column="material_type" />
|
|
<result property="materialName" column="material_name" />
|
|
<result property="processName" column="process_name" />
|
|
<result property="stationName" column="station_name" />
|
|
<result property="inspectionQty" column="inspection_qty" />
|
|
<result property="qualifiedQty" column="qualified_qty" />
|
|
<result property="unqualifiedQty" column="unqualified_qty" />
|
|
<result property="result" column="result" />
|
|
<result property="workshop" column="workshop" />
|
|
<result property="typeId" column="type_id" />
|
|
<result property="status" column="status" />
|
|
<result property="inspector" column="inspector" />
|
|
<result property="shift" column="shift" />
|
|
<result property="team" column="team" />
|
|
<result property="inspectionTime" column="inspection_time" />
|
|
<result property="productionOrder" column="production_order" />
|
|
<result property="batchNo" column="batch_no" />
|
|
<result property="barcode" column="barcode" />
|
|
<result property="supplierName" column="supplier_name" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createDept" column="create_dept" />
|
|
<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="delFlag" column="del_flag" />
|
|
</resultMap>
|
|
|
|
<sql id="selectQcInspectionMainVo">
|
|
select inspection_id, tenant_id, inspection_no, material_code, material_type, material_name, process_name, station_name, inspection_qty, qualified_qty, unqualified_qty, result, workshop, type_id, status, inspector, shift, team, inspection_time, production_order, batch_no, barcode, supplier_name, remark, create_dept, create_by, create_time, update_by, update_time, del_flag
|
|
from qc_inspection_main
|
|
</sql>
|
|
|
|
<select id="selectQcInspectionMainList" parameterType="QcInspectionMain" resultMap="QcInspectionMainResult">
|
|
<include refid="selectQcInspectionMainVo"/>
|
|
<where>
|
|
<if test="inspectionId != null "> and inspection_id = #{inspectionId}</if>
|
|
<if test="inspectionNo != null and inspectionNo != ''"> and inspection_no = #{inspectionNo}</if>
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
|
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
|
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
<if test="inspectionQty != null "> and inspection_qty = #{inspectionQty}</if>
|
|
<if test="qualifiedQty != null "> and qualified_qty = #{qualifiedQty}</if>
|
|
<if test="unqualifiedQty != null "> and unqualified_qty = #{unqualifiedQty}</if>
|
|
<if test="result != null "> and result = #{result}</if>
|
|
<if test="workshop != null and workshop != ''"> and workshop = #{workshop}</if>
|
|
<if test="typeId != null "> and type_id = #{typeId}</if>
|
|
<if test="status != null "> and status = #{status}</if>
|
|
<if test="inspector != null and inspector != ''"> and inspector = #{inspector}</if>
|
|
<if test="shift != null and shift != ''"> and shift = #{shift}</if>
|
|
<if test="team != null and team != ''"> and team = #{team}</if>
|
|
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
|
|
<if test="productionOrder != null and productionOrder != ''"> and production_order = #{productionOrder}</if>
|
|
<if test="batchNo != null and batchNo != ''"> and batch_no = #{batchNo}</if>
|
|
<if test="barcode != null and barcode != ''"> and barcode = #{barcode}</if>
|
|
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectQcInspectionMainByInspectionId" parameterType="Long" resultMap="QcInspectionMainResult">
|
|
<include refid="selectQcInspectionMainVo"/>
|
|
where inspection_id = #{inspectionId}
|
|
</select>
|
|
|
|
</mapper>
|