|
|
|
@ -29,7 +29,7 @@ |
|
|
|
|
|
|
|
<!-- 通用查询结果列 --> |
|
|
|
<sql id="BaseColumnList"> |
|
|
|
h.site, h.request_no, h.request_date, h.need_inspect_date, h.supplier_no, h.planner, h.create_by, h.create_date, h.inspect_address, h.inspect_contract, h.remark, h.status, h.status_db, h.qc_operator, h.inspect_date, h.plan_start_date, h.plan_end_date, h.scheduled_date, h.scheduled_by, h.schedule_remark, s.supplier_name |
|
|
|
h.site, h.request_no, h.request_date, h.need_inspect_date, h.supplier_no, ISNULL(dbo.plm_get_user_display(h.site, h.planner), h.planner) AS planner, h.create_by, h.create_date, h.inspect_address, h.inspect_contract, h.remark, h.status, h.status_db, h.qc_operator, h.inspect_date, h.plan_start_date, h.plan_end_date, h.scheduled_date, h.scheduled_by, h.schedule_remark, s.supplier_name |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="myPage" resultType="com.xujie.modules.inspection.entity.InspectionRequestHeader"> |
|
|
|
@ -42,7 +42,10 @@ |
|
|
|
<if test="query.requestNo != null and query.requestNo != '' "> and h.request_no like '%${query.requestNo}%'</if> |
|
|
|
<if test="query.supplierNo != null and query.supplierNo != '' "> and h.supplier_no like '%${query.supplierNo}%'</if> |
|
|
|
<if test="query.supplierName != null and query.supplierName != '' "> and s.supplier_name like '%${query.supplierName}%'</if> |
|
|
|
<if test="query.planner != null and query.planner != '' "> and h.planner like '%${query.planner}%'</if> |
|
|
|
<if test="query.planner != null and query.planner != '' "> |
|
|
|
and (h.planner like '%${query.planner}%' |
|
|
|
or ISNULL(dbo.plm_get_user_display(h.site, h.planner), '') like '%${query.planner}%') |
|
|
|
</if> |
|
|
|
<if test="query.status == 'NON_DRAFT'"> and h.status_db != 'Draft'</if> |
|
|
|
<if test="query.status != null and query.status != '' and query.status != 'NON_DRAFT' "> and h.status_db = #{query.status}</if> |
|
|
|
<if test="query.qcOperator != null and query.qcOperator != '' "> and h.qc_operator like '%${query.qcOperator}%'</if> |
|
|
|
@ -80,7 +83,7 @@ |
|
|
|
poh.ship_via AS shipMethod, |
|
|
|
poh.supplier_no, |
|
|
|
ss.supplier_name, |
|
|
|
poh.c_planner AS planner |
|
|
|
ISNULL(dbo.plm_get_user_display(poh.site, poh.c_planner), poh.c_planner) AS planner |
|
|
|
FROM PODetail pod |
|
|
|
INNER JOIN POHeader poh |
|
|
|
ON poh.order_no = pod.order_no |
|
|
|
@ -121,7 +124,10 @@ |
|
|
|
AND ss.supplier_name like concat('%',#{query.supplierName},'%') |
|
|
|
</if> |
|
|
|
<if test="query.planner != null and query.planner != ''"> |
|
|
|
AND ISNULL(poh.c_planner, '') like concat('%',#{query.planner},'%') |
|
|
|
AND ( |
|
|
|
ISNULL(poh.c_planner, '') like concat('%',#{query.planner},'%') |
|
|
|
OR ISNULL(dbo.plm_get_user_display(poh.site, poh.c_planner), '') like concat('%',#{query.planner},'%') |
|
|
|
) |
|
|
|
</if> |
|
|
|
ORDER BY pod.id DESC |
|
|
|
</select> |
|
|
|
@ -150,7 +156,7 @@ |
|
|
|
poh.ship_via AS shipMethod, |
|
|
|
poh.supplier_no AS supplierNo, |
|
|
|
ss.supplier_name AS supplierName, |
|
|
|
poh.c_planner AS planner |
|
|
|
ISNULL(dbo.plm_get_user_display(poh.site, poh.c_planner), poh.c_planner) AS planner |
|
|
|
FROM PODetail pod |
|
|
|
INNER JOIN POHeader poh |
|
|
|
ON poh.order_no = pod.order_no |
|
|
|
@ -191,7 +197,10 @@ |
|
|
|
AND ss.supplier_name like concat('%',#{query.supplierName},'%') |
|
|
|
</if> |
|
|
|
<if test="query.planner != null and query.planner != ''"> |
|
|
|
AND ISNULL(poh.c_planner, '') like concat('%',#{query.planner},'%') |
|
|
|
AND ( |
|
|
|
ISNULL(poh.c_planner, '') like concat('%',#{query.planner},'%') |
|
|
|
OR ISNULL(dbo.plm_get_user_display(poh.site, poh.c_planner), '') like concat('%',#{query.planner},'%') |
|
|
|
) |
|
|
|
</if> |
|
|
|
ORDER BY ISNULL(pod.c_crd,pod.want_receive_date) DESC, pod.id DESC |
|
|
|
</select> |
|
|
|
|