|
@@ -291,8 +291,7 @@
|
|
pt.acreage,
|
|
pt.acreage,
|
|
pt.amount,
|
|
pt.amount,
|
|
pt.price,
|
|
pt.price,
|
|
- pt.is_online,
|
|
|
|
- c.comments
|
|
|
|
|
|
+ pt.is_online
|
|
FROM
|
|
FROM
|
|
work_task_record wtr
|
|
work_task_record wtr
|
|
LEFT JOIN work_node_task wnt ON wnt.id = wtr.task_id
|
|
LEFT JOIN work_node_task wnt ON wnt.id = wtr.task_id
|
|
@@ -325,11 +324,7 @@
|
|
LEFT JOIN user u3 ON u3.id = p.inward_staff
|
|
LEFT JOIN user u3 ON u3.id = p.inward_staff
|
|
LEFT JOIN user u4 ON u4.id = p.pricing_staff
|
|
LEFT JOIN user u4 ON u4.id = p.pricing_staff
|
|
LEFT JOIN personal_target pt ON pt.personal_id = p.id
|
|
LEFT JOIN personal_target pt ON pt.personal_id = p.id
|
|
- left join (
|
|
|
|
- select business_id,comments from work_flow_log where concat(business_id,created) in (
|
|
|
|
- select concat(business_id,max(created)) from work_flow_log where business_type = 'PERSONAL_BUSINESS' and comments is not null group BY business_id
|
|
|
|
- )
|
|
|
|
- ) c on c.business_id = p.id
|
|
|
|
|
|
+
|
|
WHERE
|
|
WHERE
|
|
wtr.handler_id = #{personal.handlerId}
|
|
wtr.handler_id = #{personal.handlerId}
|
|
AND u.deleted = 0
|
|
AND u.deleted = 0
|