|
|
@@ -42,14 +42,11 @@
|
|
42
|
42
|
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
|
|
43
|
43
|
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
|
|
44
|
44
|
c.residen_affili,appli_agent_title,
|
|
45
|
|
- c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
|
|
|
45
|
+ c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email
|
|
46
|
46
|
from case_affiliate c
|
|
47
|
|
- left JOIN (
|
|
48
|
|
- SELECT phonenumber,user_id, ROW_NUMBER() OVER(PARTITION BY phonenumber ORDER BY user_id ASC) as rn
|
|
49
|
|
- FROM sys_user
|
|
50
|
|
- ) s ON c.contact_telphone = s.phonenumber
|
|
|
47
|
+
|
|
51
|
48
|
WHERE
|
|
52
|
|
- s.rn = 1
|
|
|
49
|
+
|
|
53
|
50
|
|
|
54
|
51
|
<if test="caseAppliId != null ">
|
|
55
|
52
|
AND c.case_appli_id = #{caseAppliId}
|
|
|
@@ -62,14 +59,10 @@
|
|
62
|
59
|
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
|
|
63
|
60
|
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
|
|
64
|
61
|
c.residen_affili,appli_agent_title,
|
|
65
|
|
- c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
|
|
|
62
|
+ c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email
|
|
66
|
63
|
from case_affiliate c
|
|
67
|
|
- left JOIN (
|
|
68
|
|
- SELECT phonenumber,user_id, ROW_NUMBER() OVER(PARTITION BY phonenumber ORDER BY user_id ASC) as rn
|
|
69
|
|
- FROM sys_user
|
|
70
|
|
- ) s ON c.contact_telphone = s.phonenumber
|
|
|
64
|
+
|
|
71
|
65
|
WHERE
|
|
72
|
|
- s.rn = 1
|
|
73
|
66
|
<if test="ids != null ">
|
|
74
|
67
|
and case_appli_id in
|
|
75
|
68
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|