Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
2a2ddf90
Commit
2a2ddf90
authored
Dec 26, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改短信通知接口,将两个通知表数据合为一个,更改表中存入content字段信息未替换的问题
parent
57b497a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
43 deletions
+62
-43
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+62
-43
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
View file @
2a2ddf90
...
@@ -304,8 +304,8 @@ public class ProblemInitiationServiceImpl {
...
@@ -304,8 +304,8 @@ public class ProblemInitiationServiceImpl {
continue
;
continue
;
}
}
if
(
SMSEnum
.
项目安装告知申请
.
getCode
().
equals
(
smsCode
)
||
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
)){
if
(
SMSEnum
.
项目安装告知申请
.
getCode
().
equals
(
smsCode
)
||
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
)){
saveProjectSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
,
object
,
smsCode
);
//
saveProjectSmsLog(smsRecordModel,sequenceNbr,noticeUnitId,agencyUserModel,object,smsCode);
}
else
{
//
}else {
saveProblemSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
,
object
,
smsCode
);
saveProblemSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
,
object
,
smsCode
);
}
}
...
@@ -313,8 +313,50 @@ public class ProblemInitiationServiceImpl {
...
@@ -313,8 +313,50 @@ public class ProblemInitiationServiceImpl {
}
}
}
}
// /**
// * 存 项目立项流程中 发送的短信信息
// * @param smsRecordModel
// * @param sequenceNbr
// * @param noticeUnitId
// * @param agencyUserModel
// * @param object
// * @param smsCode
// */
// public void saveProjectSmsLog(SmsRecordModel smsRecordModel,Long sequenceNbr,String noticeUnitId,AgencyUserModel agencyUserModel,JSONObject object,String smsCode){
// String content = Systemctl.smsTemplateClient.seleteOne(smsCode).getResult().getSmsContent();
// String projectName = object.getString("projectName");
// String companyName = object.getString("companyName");
// String reviewInfo = object.getString("reviewInfo");
//
// if(!ValidationUtil.isEmpty(projectName)){
// if(content.contains("${projectName}")) {
// content = content.replace("${projectName}", projectName);
// }
// }
// if(!ValidationUtil.isEmpty(companyName)){
// if(content.contains("${companyName}")){
// content = content.replace("${companyName}",companyName);
// }
// }
// if(!ValidationUtil.isEmpty(reviewInfo)){
// if(content.contains("${reviewInfo}")) {
// content = content.replace("${reviewInfo}", reviewInfo);
// }
// }
//
// LambdaQueryWrapper<OrgUsr> wrapperQueryWrapper = new LambdaQueryWrapper<>();
// wrapperQueryWrapper.eq(OrgUsr::getAmosOrgId,agencyUserModel.getSequenceNbr());
// InstallNoticeMsg installNoticeMsg = new InstallNoticeMsg();
// installNoticeMsg.setContent(content);
// installNoticeMsg.setInstallNoticeId(object.getLong("sequenceNbr"));
// installNoticeMsg.setTargetUnitId(Long.valueOf(noticeUnitId));
// installNoticeMsg.setTargetPersonId(orgUsrServiceImpl.getOne(wrapperQueryWrapper).getSequenceNbr());
// installNoticeMsg.setSendTime(smsRecordModel.getSendTime());
// installNoticeMsgService.save(installNoticeMsg);
// }
/**
/**
* 存
项目立项流程中 发送的短信信息
* 存
质量问题以及告知申请通知短信
* @param smsRecordModel
* @param smsRecordModel
* @param sequenceNbr
* @param sequenceNbr
* @param noticeUnitId
* @param noticeUnitId
...
@@ -322,21 +364,35 @@ public class ProblemInitiationServiceImpl {
...
@@ -322,21 +364,35 @@ public class ProblemInitiationServiceImpl {
* @param object
* @param object
* @param smsCode
* @param smsCode
*/
*/
public
void
savePro
ject
SmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
,
JSONObject
object
,
String
smsCode
){
public
void
savePro
blem
SmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
,
JSONObject
object
,
String
smsCode
){
String
content
=
Systemctl
.
smsTemplateClient
.
seleteOne
(
smsCode
).
getResult
().
getSmsContent
();
String
content
=
Systemctl
.
smsTemplateClient
.
seleteOne
(
smsCode
).
getResult
().
getSmsContent
();
String
projectName
=
object
.
getString
(
"projectName"
);
String
projectName
=
object
.
getString
(
"projectName"
);
String
problemDescribe
=
object
.
getString
(
"problemDescribe"
);
String
companyName
=
object
.
getString
(
"companyName"
);
String
companyName
=
object
.
getString
(
"companyName"
);
String
reviewInfo
=
object
.
getString
(
"reviewInfo"
);
String
reviewInfo
=
object
.
getString
(
"reviewInfo"
);
String
licenseCompany
=
object
.
getString
(
"licenseCompany"
);
RectifyMsg
rectifyMsg
=
new
RectifyMsg
();
if
(!
ValidationUtil
.
isEmpty
(
projectName
)){
if
(!
ValidationUtil
.
isEmpty
(
projectName
)){
if
(
content
.
contains
(
"${projectName}"
))
{
if
(
content
.
contains
(
"${projectName}"
))
{
content
=
content
.
replace
(
"${projectName}"
,
projectName
);
content
=
content
.
replace
(
"${projectName}"
,
projectName
);
}
}
}
}
if
(!
ValidationUtil
.
isEmpty
(
companyName
)){
if
(!
ValidationUtil
.
isEmpty
(
problemDescribe
)){
if
(
content
.
contains
(
"${problemDescribe}"
)){
content
=
content
.
replace
(
"${problemDescribe}"
,
problemDescribe
);
}
if
(
content
.
contains
(
"${problemDesc}"
)){
content
=
content
.
replace
(
"${problemDesc}"
,
problemDescribe
);
}
rectifyMsg
.
setProblemId
(
sequenceNbr
);
rectifyMsg
.
setIsProblem
(
true
);
}
if
(!
ValidationUtil
.
isEmpty
(
companyName
)
||
!
ValidationUtil
.
isEmpty
(
licenseCompany
)){
if
(
content
.
contains
(
"${companyName}"
)){
if
(
content
.
contains
(
"${companyName}"
)){
content
=
content
.
replace
(
"${companyName}"
,
companyName
);
content
=
content
.
replace
(
"${companyName}"
,
companyName
);
}
}
rectifyMsg
.
setInstallNoticeId
(
object
.
getLong
(
"sequenceNbr"
));
rectifyMsg
.
setIsProblem
(
false
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
reviewInfo
)){
if
(!
ValidationUtil
.
isEmpty
(
reviewInfo
)){
if
(
content
.
contains
(
"${reviewInfo}"
))
{
if
(
content
.
contains
(
"${reviewInfo}"
))
{
...
@@ -346,45 +402,8 @@ public class ProblemInitiationServiceImpl {
...
@@ -346,45 +402,8 @@ public class ProblemInitiationServiceImpl {
LambdaQueryWrapper
<
OrgUsr
>
wrapperQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
wrapperQueryWrapper
=
new
LambdaQueryWrapper
<>();
wrapperQueryWrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
agencyUserModel
.
getSequenceNbr
());
wrapperQueryWrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
agencyUserModel
.
getSequenceNbr
());
InstallNoticeMsg
installNoticeMsg
=
new
InstallNoticeMsg
();
installNoticeMsg
.
setContent
(
content
);
installNoticeMsg
.
setInstallNoticeId
(
object
.
getLong
(
"sequenceNbr"
));
installNoticeMsg
.
setTargetUnitId
(
Long
.
valueOf
(
noticeUnitId
));
installNoticeMsg
.
setTargetPersonId
(
orgUsrServiceImpl
.
getOne
(
wrapperQueryWrapper
).
getSequenceNbr
());
installNoticeMsg
.
setSendTime
(
smsRecordModel
.
getSendTime
());
installNoticeMsgService
.
save
(
installNoticeMsg
);
}
/**
* 存 质量问题闭环处理流程中 发送的短信信息
* @param smsRecordModel
* @param sequenceNbr
* @param noticeUnitId
* @param agencyUserModel
* @param object
* @param smsCode
*/
public
void
saveProblemSmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
,
JSONObject
object
,
String
smsCode
){
String
content
=
Systemctl
.
smsTemplateClient
.
seleteOne
(
smsCode
).
getResult
().
getSmsContent
();
String
projectName
=
object
.
getString
(
"projectName"
);
String
problemDescribe
=
object
.
getString
(
"problemDescribe"
);
if
(!
ValidationUtil
.
isEmpty
(
projectName
)){
if
(
content
.
contains
(
"${projectName}"
))
{
content
=
content
.
replace
(
"${projectName}"
,
projectName
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
problemDescribe
)){
if
(
content
.
contains
(
"${problemDescribe}"
)){
content
=
content
.
replace
(
"${problemDescribe}"
,
problemDescribe
);
}
}
LambdaQueryWrapper
<
OrgUsr
>
wrapperQueryWrapper
=
new
LambdaQueryWrapper
<>();
wrapperQueryWrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
agencyUserModel
.
getSequenceNbr
());
RectifyMsg
rectifyMsg
=
new
RectifyMsg
();
rectifyMsg
.
setContent
(
content
);
rectifyMsg
.
setContent
(
content
);
rectifyMsg
.
setProblemId
(
sequenceNbr
);
rectifyMsg
.
setNoticeUnitId
(
Long
.
valueOf
(
noticeUnitId
));
rectifyMsg
.
setNoticeUnitId
(
Long
.
valueOf
(
noticeUnitId
));
rectifyMsg
.
setMsgReceiver
(
orgUsrServiceImpl
.
getOne
(
wrapperQueryWrapper
).
getSequenceNbr
());
rectifyMsg
.
setMsgReceiver
(
orgUsrServiceImpl
.
getOne
(
wrapperQueryWrapper
).
getSequenceNbr
());
rectifyMsg
.
setSendTime
(
smsRecordModel
.
getSendTime
());
rectifyMsg
.
setSendTime
(
smsRecordModel
.
getSendTime
());
...
...
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