Browse Source

个贷列表暂时最新备注信息

wucl 11 months ago
parent
commit
09e1979247

+ 13 - 7
dao/src/main/resources/mapper/PersonalMapper.xml

@@ -81,7 +81,8 @@
             u3.NAME AS pricingStaffName,
             u4.name as handlerName,
             u4.id as handlerId,
-            p.created
+            p.created,
+            c.comments
         FROM
             work_flow_node_instance wf
                 LEFT JOIN work_node wn ON wn.id = wf.node_id
@@ -96,15 +97,20 @@
                 LEFT JOIN user u1 ON u1.id = p.outward_staff
                 LEFT JOIN user u2 ON u2.id = p.inward_staff
                 LEFT JOIN user u3 ON u3.id = p.pricing_staff
+                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 p.id = c.business_id
+        WHERE
+            wf.business_type = "PERSONAL_BUSINESS"
+          AND wf.state = 'PENDING'
+          AND wf.deleted = 0
+          AND wn.deleted = 0
+          AND p.deleted = 0
     </sql>
     <select id="xSelectPage" parameterType="com.dayou.vo.PersonalVO" resultType="com.dayou.vo.PersonalVO">
         <include refid="Common_query_sql" />
-        WHERE
-            wf.business_type = "PERSONAL_BUSINESS"
-            AND wf.state = 'PENDING'
-            AND wf.deleted = 0
-            AND wn.deleted = 0
-            AND p.deleted = 0
         <if test="keyword!=null and keyword!='' ">
             and (
             p.location like concat ('%',#{keyword},'%')

+ 7 - 1
dao/src/main/resources/mapper/WorkTaskRecordMapper.xml

@@ -274,7 +274,8 @@
         pt.acreage,
         pt.amount,
         pt.price,
-        pt.is_online
+        pt.is_online,
+        c.comments
         FROM
         work_task_record wtr
         LEFT JOIN work_node_task wnt ON wnt.id = wtr.task_id
@@ -305,6 +306,11 @@
         LEFT JOIN user u3 ON u3.id = p.inward_staff
         LEFT JOIN user u4 ON u4.id = p.pricing_staff
         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
         wtr.handler_id = #{personal.handlerId}
         AND u.deleted = 0

+ 4 - 2
domain/src/main/java/com/dayou/vo/PersonalTodoVO.java

@@ -40,7 +40,7 @@ public class PersonalTodoVO {
 
     private Boolean taskFinished;
 
-    private LocalDateTime created;
+    private Date created;
 
     private String clientName;
 
@@ -66,7 +66,7 @@ public class PersonalTodoVO {
 
     private String pricingStaffName;
 
-    private LocalDateTime nodeCreated;
+    private Date nodeCreated;
 
     private BigDecimal acreage;
 
@@ -82,4 +82,6 @@ public class PersonalTodoVO {
 
     private Boolean isOnline;
 
+    private String comments;
+
 }

+ 1 - 0
domain/src/main/java/com/dayou/vo/PersonalVO.java

@@ -142,4 +142,5 @@ public class PersonalVO extends Personal {
 
     private String nodeCode;
 
+    private String comments;
 }