|
|
|
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="factoryCode" column="factory_code" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="checkType" column="check_type" />
|
|
|
|
|
<result property="nookQuality" column="noOk_quality" />
|
|
|
|
|
<result property="noOkQuality" column="noOk_quality" />
|
|
|
|
|
<result property="sampleQuality" column="sample_quality" />
|
|
|
|
|
<result property="aNoOkquality" column="aNoOkquality" />
|
|
|
|
|
<result property="bNoOkquality" column="bNoOkquality" />
|
|
|
|
@ -47,42 +47,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select record_id, check_no, income_batch_no, order_no, material_code, material_name, quality, unit, supplier_code,
|
|
|
|
|
supplier_name, income_time, check_loc, check_status, check_man_code, check_man_name, check_time, check_result,
|
|
|
|
|
status, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag,
|
|
|
|
|
check_type, noOk_quality, sample_quality, aNoOkquality, bNoOkquality, cNoOkquality, type_code, order_type from qc_check_task
|
|
|
|
|
check_type, noOk_quality, sample_quality, aNoOkquality, bNoOkquality, cNoOkquality, type_code, order_type
|
|
|
|
|
from qc_check_task
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckTaskInventoryList" parameterType="QcCheckTaskInventory" resultMap="QcCheckTaskInventoryResult">
|
|
|
|
|
<include refid="selectQcCheckTaskInventoryVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="checkNo != null and checkNo != ''"> and check_no = #{checkNo}</if>
|
|
|
|
|
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and income_batch_no = #{incomeBatchNo}</if>
|
|
|
|
|
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
|
|
|
|
<if test="quality != null "> and quality = #{quality}</if>
|
|
|
|
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
|
|
|
|
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
|
|
|
<if test="incomeTime != null "> and income_time = #{incomeTime}</if>
|
|
|
|
|
<if test="checkLoc != null and checkLoc != ''"> and check_loc = #{checkLoc}</if>
|
|
|
|
|
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
|
|
|
|
|
<if test="checkManCode != null and checkManCode != ''"> and check_man_code = #{checkManCode}</if>
|
|
|
|
|
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
|
|
|
|
|
<if test="checkTime != null "> and check_time = #{checkTime}</if>
|
|
|
|
|
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
|
|
|
|
<if test="nookQuality != null "> and noOk_quality = #{nookQuality}</if>
|
|
|
|
|
<if test="sampleQuality != null "> and sample_quality = #{sampleQuality}</if>
|
|
|
|
|
<if test="aNoOkquality != null "> and aNoOkquality = #{aNoOkquality}</if>
|
|
|
|
|
<if test="bNoOkquality != null "> and bNoOkquality = #{bNoOkquality}</if>
|
|
|
|
|
<if test="cNoOkquality != null "> and cNoOkquality = #{cNoOkquality}</if>
|
|
|
|
|
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
|
|
|
|
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
|
|
|
|
|
select qct.record_id, qct.check_no, qct.income_batch_no,
|
|
|
|
|
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
|
|
|
|
|
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
|
|
|
|
|
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
|
|
|
|
|
qct.create_by,qct.create_time, qct.update_by, qct.update_time,
|
|
|
|
|
qct.check_type,qct.sample_quality,qct.noOk_quality,
|
|
|
|
|
q.type_code
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join qc_check_type q on q.id = qct.check_type
|
|
|
|
|
<where>
|
|
|
|
|
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
|
|
|
|
|
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
|
|
|
|
|
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
|
|
|
|
|
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
|
|
|
<if test="incomeTime != null "> and qct.income_time = #{incomeTime}</if>
|
|
|
|
|
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
|
|
|
|
|
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
|
|
|
|
|
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
|
|
|
|
|
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
|
|
|
|
|
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and qct.status = #{status}</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''"> and qct.del_flag = #{delFlag}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and qct.factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
|
|
|
|
|
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
|
|
|
|
|
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
|
|
|
|
|
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
|
|
|
|
|
<if test="checkType != null "> and qct.check_type = #{checkType} </if>
|
|
|
|
|
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -123,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
|
|
<if test="checkType != null">check_type,</if>
|
|
|
|
|
<if test="nookQuality != null">noOk_quality,</if>
|
|
|
|
|
<if test="noOkQuality != null">noOk_quality,</if>
|
|
|
|
|
<if test="sampleQuality != null">sample_quality,</if>
|
|
|
|
|
<if test="aNoOkquality != null">aNoOkquality,</if>
|
|
|
|
|
<if test="bNoOkquality != null">bNoOkquality,</if>
|
|
|
|
@ -161,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
<if test="checkType != null">#{checkType},</if>
|
|
|
|
|
<if test="nookQuality != null">#{nookQuality},</if>
|
|
|
|
|
<if test="noOkQuality != null">#{noOkQuality},</if>
|
|
|
|
|
<if test="sampleQuality != null">#{sampleQuality},</if>
|
|
|
|
|
<if test="aNoOkquality != null">#{aNoOkquality},</if>
|
|
|
|
|
<if test="bNoOkquality != null">#{bNoOkquality},</if>
|
|
|
|
@ -202,7 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
|
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="checkType != null">check_type = #{checkType},</if>
|
|
|
|
|
<if test="nookQuality != null">noOk_quality = #{nookQuality},</if>
|
|
|
|
|
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
|
|
|
|
|
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
|
|
|
|
|
<if test="aNoOkquality != null">aNoOkquality = #{aNoOkquality},</if>
|
|
|
|
|
<if test="bNoOkquality != null">bNoOkquality = #{bNoOkquality},</if>
|
|
|
|
|