|
|
|
@ -29,29 +29,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
from qc_check_unqualified
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckUnqualifiedList" parameterType="QcCheckUnqualified" resultMap="QcCheckUnqualifiedResult">
|
|
|
|
|
select id, task_id, status, next_node_code, next_node_name, remark,
|
|
|
|
|
attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag
|
|
|
|
|
from qc_check_unqualified
|
|
|
|
|
<select id="selectQcCheckUnqualifiedList" parameterType="QcCheckUnqualified" resultType="com.op.quality.domain.QcCheckUnqualified">
|
|
|
|
|
select qcu.id,qcu.task_id taskId,qcu.status,qcu.next_node_code nextNodeCode,qcu.next_node_name nextNodeName,qcu.remark,
|
|
|
|
|
qcu.create_time createTime,
|
|
|
|
|
qct.check_type checkType,qtn.check_name checkName,qct.check_no checkNo,qct.income_batch_no incomeBatchNo,qct.order_no orderNo,
|
|
|
|
|
qct.material_code materialCode,qct.material_name materialName,qct.quality,qct.unit,qct.supplier_code supplierCode,
|
|
|
|
|
qct.supplier_name supplierName,qct.income_time incomeTime,qct.check_loc checkLoc,qct.check_status checkStatus,qct.check_man_code checkManCode,
|
|
|
|
|
qct.check_man_name checkManName,qct.check_time checkTime,qct.check_result checkResult
|
|
|
|
|
from qc_check_unqualified qcu
|
|
|
|
|
left join qc_check_task qct on qcu.task_id = qct.record_id
|
|
|
|
|
left join qc_check_type qtn on qtn.id = qct.check_type
|
|
|
|
|
<where>
|
|
|
|
|
<if test="taskId != null and taskId != ''"> and task_id like concat('%', #{taskId}, '%')</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
|
<if test="orderNo != null and orderNo != ''"> and qct.order_no like concat('%', #{orderNo}, '%')</if>
|
|
|
|
|
<if test="checkNo != null and checkNo != ''"> and qct.check_no like concat('%', #{checkNo}, '%')</if>
|
|
|
|
|
<if test="nextNodeCode != null and nextNodeCode != ''"> and next_node_code = #{nextNodeCode}</if>
|
|
|
|
|
<if test="nextNodeName != null and nextNodeName != ''"> and next_node_name like concat('%', #{nextNodeName}, '%')</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>
|
|
|
|
|
and del_flag = #{delFlag}
|
|
|
|
|
<if test="checkTimeStart != null "> and CONVERT(varchar(30),create_time, 120) >= #{checkTimeStart}</if>
|
|
|
|
|
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),create_time, 120)</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and qct.material_code like concat('%', #{materialCode}, '%')</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
|
|
|
|
|
and qcu.del_flag = '0'
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckUnqualifiedById" parameterType="String" resultMap="QcCheckUnqualifiedResult">
|
|
|
|
|
<include refid="selectQcCheckUnqualifiedVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
<select id="selectQcCheckUnqualifiedById" parameterType="String" resultType="com.op.quality.domain.QcCheckUnqualified">
|
|
|
|
|
select qcu.id,qcu.task_id taskId,qcu.status,qcu.next_node_code nextNodeCode,qcu.next_node_name nextNodeName,qcu.remark,
|
|
|
|
|
qcu.create_time createTime,
|
|
|
|
|
qct.check_type checkType,qtn.check_name checkName,qct.check_no checkNo,qct.income_batch_no incomeBatchNo,qct.order_no orderNo,
|
|
|
|
|
qct.material_code materialCode,qct.material_name materialName,qct.quality,qct.unit,qct.supplier_code supplierCode,
|
|
|
|
|
qct.supplier_name supplierName,qct.income_time incomeTime,qct.check_loc checkLoc,qct.check_status checkStatus,qct.check_man_code checkManCode,
|
|
|
|
|
qct.check_man_name checkManName,qct.check_time checkTime,qct.check_result checkResult
|
|
|
|
|
from qc_check_unqualified qcu
|
|
|
|
|
left join qc_check_task qct on qcu.task_id = qct.record_id
|
|
|
|
|
left join qc_check_type qtn on qtn.id = qct.check_type
|
|
|
|
|
where qcu.id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcCheckUnqualified" parameterType="QcCheckUnqualified">
|
|
|
|
|