Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
05914943
Commit
05914943
authored
Jun 23, 2022
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报聘后短信内容问题修复
parent
83ba01ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringServiceImpl.java
+21
-20
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringServiceImpl.java
View file @
05914943
...
@@ -821,49 +821,50 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
...
@@ -821,49 +821,50 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
List
<
String
>
mobileNoList
=
new
ArrayList
<>(
3
);
List
<
String
>
mobileNoList
=
new
ArrayList
<>(
3
);
mobileNoList
.
add
(
basicInfo
.
getMobileNo
());
mobileNoList
.
add
(
basicInfo
.
getMobileNo
());
// 发给报聘人的短信模板
String
name
=
basicInfo
.
getName
();
String
name
=
basicInfo
.
getName
();
Map
<
String
,
List
<
String
>>
smsParam
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
smsParam
=
new
HashMap
<>();
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
list
1
=
new
ArrayList
<>();
list
.
add
(
systemConfigService
.
getSingleConfigValue
(
"ALI_SMS_CONTRACT_3"
));
list
1
.
add
(
systemConfigService
.
getSingleConfigValue
(
"ALI_SMS_CONTRACT_3"
));
list
.
add
(
"{\"name\":\""
+
name
+
"\"}"
);
list
1
.
add
(
"{\"name\":\""
+
name
+
"\"}"
);
smsParam
.
put
(
basicInfo
.
getMobileNo
(),
list
);
smsParam
.
put
(
basicInfo
.
getMobileNo
(),
list
1
);
// 发给辅导人和体系负责人的短信模板
String
system
=
memberShip
.
getSubsystem
();
if
(
memberShip
.
getMentorPractitionerId
()
!=
null
)
{
if
(
memberShip
.
getMentorPractitionerId
()
!=
null
)
{
AclPractitioner
mentor
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getMentorPractitionerId
());
AclPractitioner
mentor
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getMentorPractitionerId
());
mobileNoList
.
add
(
mentor
.
getMobileNo
());
mobileNoList
.
add
(
mentor
.
getMobileNo
());
List
<
String
>
list2
=
new
ArrayList
<>();
list2
.
add
(
systemConfigService
.
getSingleConfigValue
(
"ALI_SMS_CONTRACT"
));
list2
.
add
(
"{\"system\":\""
+
system
+
"\",\"name\":\""
+
name
+
"\"}"
);
smsParam
.
put
(
mentor
.
getMobileNo
(),
list2
);
}
}
if
(
memberShip
.
getApprovedBy
()
!=
null
)
{
if
(
memberShip
.
getApprovedBy
()
!=
null
)
{
AclPractitioner
system
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getApprovedBy
());
AclPractitioner
systemLeader
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getApprovedBy
());
mobileNoList
.
add
(
system
.
getMobileNo
());
mobileNoList
.
add
(
systemLeader
.
getMobileNo
());
List
<
String
>
list3
=
new
ArrayList
<>();
list3
.
add
(
systemConfigService
.
getSingleConfigValue
(
"ALI_SMS_CONTRACT"
));
list3
.
add
(
"{\"system\":\""
+
system
+
"\",\"name\":\""
+
name
+
"\"}"
);
smsParam
.
put
(
systemLeader
.
getMobileNo
(),
list3
);
}
}
// 若辅导人和团队长为同一人,去重
// 若辅导人和团队长为同一人,去重
List
<
String
>
uniqueList
=
mobileNoList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
uniqueList
=
mobileNoList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
String
system
=
memberShip
.
getSubsystem
();
String
mobileNo
;
String
mobileNo
;
String
templateCode
;
String
templateCode
;
String
content
;
String
content
;
// S2的短信模板
if
(
Long
.
valueOf
(
"30"
).
equals
(
memberShip
.
getMdDropOptionId
()))
{
/* 短信提醒 */
templateCode
=
systemConfigService
.
getSingleConfigValue
(
"ALI_SMS_CONTRACT_S2"
);
content
=
"{\"name\":\""
+
name
+
"\"}"
;
}
else
{
/* 短信提醒 */
templateCode
=
systemConfigService
.
getSingleConfigValue
(
"ALI_SMS_CONTRACT"
);
content
=
"{\"system\":\""
+
system
+
"\",\"name\":\""
+
name
+
"\"}"
;
}
for
(
int
i
=
0
;
i
<
uniqueList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
uniqueList
.
size
();
i
++)
{
mobileNo
=
uniqueList
.
get
(
i
);
mobileNo
=
uniqueList
.
get
(
i
);
if
(
smsParam
.
get
(
mobileNo
)
!=
null
&&
smsParam
.
get
(
mobileNo
).
size
()
>
1
){
if
(
smsParam
.
get
(
mobileNo
)
!=
null
&&
smsParam
.
get
(
mobileNo
).
size
()
>
1
){
templateCode
=
smsParam
.
get
(
mobileNo
).
get
(
0
);
templateCode
=
smsParam
.
get
(
mobileNo
).
get
(
0
);
content
=
smsParam
.
get
(
mobileNo
).
get
(
1
);
content
=
smsParam
.
get
(
mobileNo
).
get
(
1
);
}
sendService
.
sendEmailOrSMS
(
"sms"
,
mobileNo
,
"0"
,
content
,
templateCode
,
null
,
null
,
"电子报聘合同生成提醒"
,
99
,
hiringBasicInfoId
);
sendService
.
sendEmailOrSMS
(
"sms"
,
mobileNo
,
"0"
,
content
,
templateCode
,
null
,
null
,
"电子报聘合同生成提醒"
,
99
,
hiringBasicInfoId
);
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment