|
|
@ -163,7 +163,10 @@ |
|
|
<if test="advancePayment != null and advancePayment != '' "> and c_advance_payment = #{advancePayment}</if> |
|
|
<if test="advancePayment != null and advancePayment != '' "> and c_advance_payment = #{advancePayment}</if> |
|
|
<if test="advancePaid != null and advancePaid != '' "> and c_advance_paid = #{advancePaid}</if> |
|
|
<if test="advancePaid != null and advancePaid != '' "> and c_advance_paid = #{advancePaid}</if> |
|
|
<if test="createTime != null and createTime != '' "> and create_time = #{createTime}</if> |
|
|
<if test="createTime != null and createTime != '' "> and create_time = #{createTime}</if> |
|
|
<if test="planner != null and planner != '' "> and c_planner = #{planner}</if> |
|
|
|
|
|
|
|
|
<if test="planner != null and planner != '' "> |
|
|
|
|
|
and (c_planner = #{planner} |
|
|
|
|
|
or ISNULL(dbo.plm_get_user_display(site, c_planner), '') = #{planner}) |
|
|
|
|
|
</if> |
|
|
<if test="edit != null and edit != '' "> and c_edit = #{edit}</if> |
|
|
<if test="edit != null and edit != '' "> and c_edit = #{edit}</if> |
|
|
<if test="endPlanner != null and endPlanner != '' "> and c_end_planner = #{endPlanner}</if> |
|
|
<if test="endPlanner != null and endPlanner != '' "> and c_end_planner = #{endPlanner}</if> |
|
|
<if test="remarkDelay != null and remarkDelay != '' "> and c_remark_delay = #{remarkDelay}</if> |
|
|
<if test="remarkDelay != null and remarkDelay != '' "> and c_remark_delay = #{remarkDelay}</if> |
|
|
@ -220,7 +223,7 @@ |
|
|
,pod.c_advance_payment as advancePayment |
|
|
,pod.c_advance_payment as advancePayment |
|
|
,pod.c_advance_paid as advancePaid |
|
|
,pod.c_advance_paid as advancePaid |
|
|
,pod.create_time as createTime |
|
|
,pod.create_time as createTime |
|
|
,pod.c_planner as planner |
|
|
|
|
|
|
|
|
,ISNULL(suPlanner.user_display, poh.c_planner) as planner |
|
|
,pod.c_edit as edit |
|
|
,pod.c_edit as edit |
|
|
,pod.c_end_planner as endPlanner |
|
|
,pod.c_end_planner as endPlanner |
|
|
,pod.c_remark_delay as remarkDelay |
|
|
,pod.c_remark_delay as remarkDelay |
|
|
@ -262,6 +265,7 @@ |
|
|
from PODetail pod |
|
|
from PODetail pod |
|
|
left join POHeader poh on poh.order_no = pod.order_no |
|
|
left join POHeader poh on poh.order_no = pod.order_no |
|
|
left join srm_supplier ss on ss.supplier_no = poh.supplier_no and ss.site = pod.site |
|
|
left join srm_supplier ss on ss.supplier_no = poh.supplier_no and ss.site = pod.site |
|
|
|
|
|
left join sys_user suPlanner on suPlanner.site = poh.site and suPlanner.username = poh.c_planner |
|
|
left join part p on p.part_no = pod.part_no and p.site = pod.site |
|
|
left join part p on p.part_no = pod.part_no and p.site = pod.site |
|
|
left join part_family pf1 on p.site = pf1.site and p.category = pf1.family_id |
|
|
left join part_family pf1 on p.site = pf1.site and p.category = pf1.family_id |
|
|
where pod.site = '${query.site}' |
|
|
where pod.site = '${query.site}' |
|
|
@ -328,7 +332,10 @@ |
|
|
<if test="query.advancePayment != null and query.advancePayment != '' "> and pod.c_advance_payment like '%${query.advancePayment}%'</if> |
|
|
<if test="query.advancePayment != null and query.advancePayment != '' "> and pod.c_advance_payment like '%${query.advancePayment}%'</if> |
|
|
<if test="query.advancePaid != null and query.advancePaid != '' "> and pod.c_advance_paid like '%${query.advancePaid}%'</if> |
|
|
<if test="query.advancePaid != null and query.advancePaid != '' "> and pod.c_advance_paid like '%${query.advancePaid}%'</if> |
|
|
<if test="query.createTime != null and query.createTime != '' "> and pod.create_time like '%${query.createTime}%'</if> |
|
|
<if test="query.createTime != null and query.createTime != '' "> and pod.create_time like '%${query.createTime}%'</if> |
|
|
<if test="query.planner != null and query.planner != '' "> and pod.c_planner like '%${query.planner}%'</if> |
|
|
|
|
|
|
|
|
<if test="query.planner != null and query.planner != '' "> |
|
|
|
|
|
and (poh.c_planner like '%${query.planner}%' |
|
|
|
|
|
or ISNULL(suPlanner.user_display, '') like '%${query.planner}%') |
|
|
|
|
|
</if> |
|
|
<if test="query.edit != null and query.edit != '' "> and pod.c_edit like '%${query.edit}%'</if> |
|
|
<if test="query.edit != null and query.edit != '' "> and pod.c_edit like '%${query.edit}%'</if> |
|
|
<if test="query.endPlanner != null and query.endPlanner != '' "> and pod.c_end_planner like '%${query.endPlanner}%'</if> |
|
|
<if test="query.endPlanner != null and query.endPlanner != '' "> and pod.c_end_planner like '%${query.endPlanner}%'</if> |
|
|
<if test="query.remarkDelay != null and query.remarkDelay != '' "> and pod.c_remark_delay like '%${query.remarkDelay}%'</if> |
|
|
<if test="query.remarkDelay != null and query.remarkDelay != '' "> and pod.c_remark_delay like '%${query.remarkDelay}%'</if> |
|
|
@ -388,7 +395,7 @@ |
|
|
,pod.c_advance_payment as advancePayment |
|
|
,pod.c_advance_payment as advancePayment |
|
|
,pod.c_advance_paid as advancePaid |
|
|
,pod.c_advance_paid as advancePaid |
|
|
,pod.create_time as createTime |
|
|
,pod.create_time as createTime |
|
|
,pod.c_planner as planner |
|
|
|
|
|
|
|
|
,ISNULL(suPlanner.user_display, poh.c_planner) as planner |
|
|
,pod.c_edit as edit |
|
|
,pod.c_edit as edit |
|
|
,pod.c_end_planner as endPlanner |
|
|
,pod.c_end_planner as endPlanner |
|
|
,pod.c_remark_delay as remarkDelay |
|
|
,pod.c_remark_delay as remarkDelay |
|
|
@ -434,6 +441,7 @@ |
|
|
and exv.order_no = pod.order_no |
|
|
and exv.order_no = pod.order_no |
|
|
and exv.item_no = pod.item_no |
|
|
and exv.item_no = pod.item_no |
|
|
left join srm_supplier ss on ss.supplier_no = poh.supplier_no and ss.site = pod.site |
|
|
left join srm_supplier ss on ss.supplier_no = poh.supplier_no and ss.site = pod.site |
|
|
|
|
|
left join sys_user suPlanner on suPlanner.site = poh.site and suPlanner.username = poh.c_planner |
|
|
left join part p on p.part_no = pod.part_no and p.site = pod.site |
|
|
left join part p on p.part_no = pod.part_no and p.site = pod.site |
|
|
left join part_family pf1 on p.site = pf1.site and p.category = pf1.family_id |
|
|
left join part_family pf1 on p.site = pf1.site and p.category = pf1.family_id |
|
|
where pod.site = #{query.site} |
|
|
where pod.site = #{query.site} |
|
|
|