|
|
@ -5,57 +5,58 @@ |
|
|
|
|
|
|
|
|
<select id="qcPQCInspectionSearch" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
<select id="qcPQCInspectionSearch" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
SELECT |
|
|
SELECT |
|
|
a.inspection_no, |
|
|
|
|
|
a.site, |
|
|
|
|
|
a.bu_no, |
|
|
|
|
|
dbo.get_bu_desc(a.site, a.bu_no) as buDesc, |
|
|
|
|
|
a.state, |
|
|
|
|
|
a.inspection_result, |
|
|
|
|
|
a.task_date, |
|
|
|
|
|
a.inspection_type_no, |
|
|
|
|
|
dbo.qc_get_inspection_type_name(a.site, a.inspection_type_no) as inspectionTypeName, |
|
|
|
|
|
a.inspection_cycle, |
|
|
|
|
|
a.order_no, |
|
|
|
|
|
a.operation_desc, |
|
|
|
|
|
a.resource_id, |
|
|
|
|
|
r.resource_desc, |
|
|
|
|
|
a.part_no, |
|
|
|
|
|
d.part_desc, |
|
|
|
|
|
d.cinv_source_code as cinvSourceCode, |
|
|
|
|
|
d.sku as sku, |
|
|
|
|
|
d.invdefinetype as invdefinetype, |
|
|
|
|
|
a.inspection_remark, |
|
|
|
|
|
a.roll_qty, |
|
|
|
|
|
a.sampling_qty, |
|
|
|
|
|
a.disposal_measures, |
|
|
|
|
|
a.disposal_remark, |
|
|
|
|
|
a.inspector_date, |
|
|
|
|
|
a.inspector_no, |
|
|
|
|
|
u.user_display as inspectorName, |
|
|
|
|
|
a.unqualified_qty, |
|
|
|
|
|
a.submit_flag, |
|
|
|
|
|
a.seq_no, |
|
|
|
|
|
a.batch_roll_no, |
|
|
|
|
|
a.special_requirements, |
|
|
|
|
|
a.work_center_no, |
|
|
|
|
|
a.roll_no, |
|
|
|
|
|
a.um_id, |
|
|
|
|
|
um.UMName as umName, |
|
|
|
|
|
a.action_date, |
|
|
|
|
|
a.action_by, |
|
|
|
|
|
isnull(dbo.joint_id(a.site, a.bu_no, a.inspection_no, 'coordination'), '') as operator, |
|
|
|
|
|
isnull(dbo.joint_name(a.site, a.bu_no, a.inspection_no, 'coordination'), '') as operatorName, |
|
|
|
|
|
isnull(dbo.joint_id(a.site, a.bu_no, a.inspection_no, 'responsible'), '') as responsiblePerson, |
|
|
|
|
|
isnull(dbo.joint_name2(a.site, a.bu_no, a.inspection_no, 'responsible'), '') as responsiblePersonName, |
|
|
|
|
|
a.pass_qty, |
|
|
|
|
|
a.not_pass_qty, |
|
|
|
|
|
a.batch_qualified_qty, |
|
|
|
|
|
a.sop_type, |
|
|
|
|
|
a.sop_url |
|
|
|
|
|
|
|
|
a.inspection_no, |
|
|
|
|
|
a.site, |
|
|
|
|
|
a.bu_no, |
|
|
|
|
|
dbo.get_bu_desc(a.site, a.bu_no) as buDesc, |
|
|
|
|
|
a.state, |
|
|
|
|
|
a.inspection_result, |
|
|
|
|
|
a.task_date, |
|
|
|
|
|
a.inspection_type_no, |
|
|
|
|
|
dbo.qc_get_inspection_type_name(a.site, a.inspection_type_no) as inspectionTypeName, |
|
|
|
|
|
a.inspection_cycle, |
|
|
|
|
|
a.order_no, |
|
|
|
|
|
a.operation_desc, |
|
|
|
|
|
a.resource_id, |
|
|
|
|
|
a.eam_object_id, |
|
|
|
|
|
eo.ObjectDesc as resource_desc, |
|
|
|
|
|
a.part_no, |
|
|
|
|
|
d.part_desc, |
|
|
|
|
|
d.cinv_source_code as cinvSourceCode, |
|
|
|
|
|
d.sku as sku, |
|
|
|
|
|
d.invdefinetype as invdefinetype, |
|
|
|
|
|
a.inspection_remark, |
|
|
|
|
|
a.roll_qty, |
|
|
|
|
|
a.sampling_qty, |
|
|
|
|
|
a.disposal_measures, |
|
|
|
|
|
a.disposal_remark, |
|
|
|
|
|
a.inspector_date, |
|
|
|
|
|
a.inspector_no, |
|
|
|
|
|
u.user_display as inspectorName, |
|
|
|
|
|
a.unqualified_qty, |
|
|
|
|
|
a.submit_flag, |
|
|
|
|
|
a.seq_no, |
|
|
|
|
|
a.batch_roll_no, |
|
|
|
|
|
a.special_requirements, |
|
|
|
|
|
a.work_center_no, |
|
|
|
|
|
a.roll_no, |
|
|
|
|
|
a.um_id, |
|
|
|
|
|
um.UMName as umName, |
|
|
|
|
|
a.action_date, |
|
|
|
|
|
a.action_by, |
|
|
|
|
|
isnull(dbo.joint_id(a.site, a.bu_no, a.inspection_no, 'coordination'), '') as operator, |
|
|
|
|
|
isnull(dbo.joint_name(a.site, a.bu_no, a.inspection_no, 'coordination'), '') as operatorName, |
|
|
|
|
|
isnull(dbo.joint_id(a.site, a.bu_no, a.inspection_no, 'responsible'), '') as responsiblePerson, |
|
|
|
|
|
isnull(dbo.joint_name2(a.site, a.bu_no, a.inspection_no, 'responsible'), '') as responsiblePersonName, |
|
|
|
|
|
a.pass_qty, |
|
|
|
|
|
a.not_pass_qty, |
|
|
|
|
|
a.batch_qualified_qty, |
|
|
|
|
|
a.sop_type, |
|
|
|
|
|
a.sop_url |
|
|
FROM qc_pqc_record as a |
|
|
FROM qc_pqc_record as a |
|
|
left join part as d on a.site = d.site and a.bu_no = d.sourceBu and a.part_no = d.part_no |
|
|
left join part as d on a.site = d.site and a.bu_no = d.sourceBu and a.part_no = d.part_no |
|
|
left join sys_user as u on a.inspector_no = u.username |
|
|
left join sys_user as u on a.inspector_no = u.username |
|
|
left join resource as r on a.site = r.site and a.resource_id = r.resource_id and a.work_center_no = r.work_center_no |
|
|
|
|
|
|
|
|
left join eam_object eo on a.site = eo.site and a.eam_object_id = eo.ObjectID |
|
|
left join UM as um on a.site = um.site and a.um_id = um.UMID |
|
|
left join UM as um on a.site = um.site and a.um_id = um.UMID |
|
|
<where> |
|
|
<where> |
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
|