|
|
|
@ -39,6 +39,10 @@ |
|
|
|
a.action_by, |
|
|
|
a.submission_remark, |
|
|
|
a.submission_type, |
|
|
|
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, |
|
|
|
b.item_no, |
|
|
|
b.item_desc, |
|
|
|
b.default_value, |
|
|
|
@ -46,6 +50,10 @@ |
|
|
|
b.min_value, |
|
|
|
b.sampling_qty as itemSamplingQty, |
|
|
|
b.unqualified_quantity, |
|
|
|
b.item_result, |
|
|
|
CASE WHEN b.item_result = 'Y' THEN '合格' |
|
|
|
WHEN b.item_result = 'N' THEN '不合格' |
|
|
|
END as itemResultDesc, |
|
|
|
CASE WHEN b.value_type_db = 'T' THEN b.text_value |
|
|
|
WHEN b.value_type_db = 'N' THEN CONVERT(varchar, b.number_value, 126) |
|
|
|
END as textValue |
|
|
|
@ -111,6 +119,18 @@ |
|
|
|
<if test = "query.submissionType != null and query.submissionType != ''"> |
|
|
|
AND a.submission_type = #{query.submissionType} |
|
|
|
</if> |
|
|
|
<if test = "query.submissionType != null and query.submissionType != ''"> |
|
|
|
AND a.submission_type = #{query.submissionType} |
|
|
|
</if> |
|
|
|
<if test = "query.operatorName != null and query.operatorName != ''"> |
|
|
|
AND dbo.joint_name(a.site, a.bu_no, a.inspection_no, 'coordination') like '%' + #{query.operatorName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.responsiblePersonName != null and query.responsiblePersonName != ''"> |
|
|
|
AND dbo.joint_name2(a.site, a.bu_no, a.inspection_no, 'responsible') like '%' + #{query.responsiblePersonName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.itemResult != null and query.itemResult != ''"> |
|
|
|
AND b.item_result = #{query.itemResult} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY |
|
|
|
CASE WHEN a.state = '待检验' THEN 1 |
|
|
|
@ -157,6 +177,10 @@ |
|
|
|
dbo.qc_get_um_name(a.site, a.um_id) 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, |
|
|
|
b.item_no, |
|
|
|
b.item_desc, |
|
|
|
b.default_value, |
|
|
|
@ -164,6 +188,10 @@ |
|
|
|
b.min_value, |
|
|
|
b.sampling_qty as itemSamplingQty, |
|
|
|
b.unqualified_quantity, |
|
|
|
b.item_result, |
|
|
|
CASE WHEN b.item_result = 'Y' THEN '合格' |
|
|
|
WHEN b.item_result = 'N' THEN '不合格' |
|
|
|
END as itemResultDesc, |
|
|
|
CASE WHEN b.value_type_db = 'T' THEN b.text_value |
|
|
|
WHEN b.value_type_db = 'N' THEN CONVERT(varchar, b.number_value, 126) |
|
|
|
END as textValue |
|
|
|
@ -226,6 +254,15 @@ |
|
|
|
<if test="query.endDate2 != null"> |
|
|
|
AND #{query.endDate2} >= a.task_date |
|
|
|
</if> |
|
|
|
<if test = "query.operatorName != null and query.operatorName != ''"> |
|
|
|
AND dbo.joint_name(a.site, a.bu_no, a.inspection_no, 'coordination') like '%' + #{query.operatorName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.responsiblePersonName != null and query.responsiblePersonName != ''"> |
|
|
|
AND dbo.joint_name2(a.site, a.bu_no, a.inspection_no, 'responsible') like '%' + #{query.responsiblePersonName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.itemResult != null and query.itemResult != ''"> |
|
|
|
AND b.item_result = #{query.itemResult} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY |
|
|
|
CASE WHEN a.state = '待检验' THEN 1 |
|
|
|
@ -273,6 +310,10 @@ |
|
|
|
dbo.qc_get_um_name(a.site, a.um_id) 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, |
|
|
|
b.item_no, |
|
|
|
b.item_desc, |
|
|
|
b.default_value, |
|
|
|
@ -280,6 +321,10 @@ |
|
|
|
b.min_value, |
|
|
|
b.sampling_qty as itemSamplingQty, |
|
|
|
b.unqualified_quantity, |
|
|
|
b.item_result, |
|
|
|
CASE WHEN b.item_result = 'Y' THEN '合格' |
|
|
|
WHEN b.item_result = 'N' THEN '不合格' |
|
|
|
END as itemResultDesc, |
|
|
|
CASE WHEN b.value_type_db = 'T' THEN b.text_value |
|
|
|
WHEN b.value_type_db = 'N' THEN CONVERT(varchar, b.number_value, 126) |
|
|
|
END as textValue |
|
|
|
@ -339,6 +384,15 @@ |
|
|
|
<if test="query.endDate2 != null"> |
|
|
|
AND #{query.endDate2} >= a.task_date |
|
|
|
</if> |
|
|
|
<if test = "query.operatorName != null and query.operatorName != ''"> |
|
|
|
AND dbo.joint_name(a.site, a.bu_no, a.inspection_no, 'coordination') like '%' + #{query.operatorName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.responsiblePersonName != null and query.responsiblePersonName != ''"> |
|
|
|
AND dbo.joint_name2(a.site, a.bu_no, a.inspection_no, 'responsible') like '%' + #{query.responsiblePersonName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.itemResult != null and query.itemResult != ''"> |
|
|
|
AND b.item_result = #{query.itemResult} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY |
|
|
|
CASE WHEN a.state = '待检验' THEN 1 |
|
|
|
@ -386,6 +440,10 @@ |
|
|
|
dbo.qc_get_um_name(a.site, a.um_id) 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, |
|
|
|
b.item_no, |
|
|
|
b.item_desc, |
|
|
|
b.default_value, |
|
|
|
@ -393,6 +451,10 @@ |
|
|
|
b.min_value, |
|
|
|
b.sampling_qty as itemSamplingQty, |
|
|
|
b.unqualified_quantity, |
|
|
|
b.item_result, |
|
|
|
CASE WHEN b.item_result = 'Y' THEN '合格' |
|
|
|
WHEN b.item_result = 'N' THEN '不合格' |
|
|
|
END as itemResultDesc, |
|
|
|
CASE WHEN b.value_type_db = 'T' THEN b.text_value |
|
|
|
WHEN b.value_type_db = 'N' THEN CONVERT(varchar, b.number_value, 126) |
|
|
|
END as textValue |
|
|
|
@ -452,6 +514,15 @@ |
|
|
|
<if test="query.endDate2 != null"> |
|
|
|
AND #{query.endDate2} >= a.task_date |
|
|
|
</if> |
|
|
|
<if test = "query.operatorName != null and query.operatorName != ''"> |
|
|
|
AND dbo.joint_name(a.site, a.bu_no, a.inspection_no, 'coordination') like '%' + #{query.operatorName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.responsiblePersonName != null and query.responsiblePersonName != ''"> |
|
|
|
AND dbo.joint_name2(a.site, a.bu_no, a.inspection_no, 'responsible') like '%' + #{query.responsiblePersonName} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.itemResult != null and query.itemResult != ''"> |
|
|
|
AND b.item_result = #{query.itemResult} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY |
|
|
|
CASE WHEN a.state = '待检验' THEN 1 |
|
|
|
|