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
f3aaa468
Commit
f3aaa468
authored
Dec 31, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警情结案短信模板修改
parent
8aba8b52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
AlertSubmittedController.java
...t/module/jcs/biz/controller/AlertSubmittedController.java
+12
-1
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+18
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertSubmittedController.java
View file @
f3aaa468
...
...
@@ -51,6 +51,7 @@ import java.io.UnsupportedEncodingException;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -270,7 +271,7 @@ public class AlertSubmittedController extends BaseController {
definitions
.
put
(
"$callTime"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
definitions
.
put
(
"$replaceContent"
,
replaceContent
);
definitions
.
put
(
"$address"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
())
?
""
:
alertCalled
.
getAddress
());
definitions
.
put
(
"$recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getRecDat
e
(),
DateUtils
.
DATE_TIME_PATTERN
));
// definitions.put("$recDate",DateUtils.convertDateToString(alertCalled.getUpdateTim
e(),DateUtils.DATE_TIME_PATTERN));
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"$trappedNum"
,
ValidationUtil
.
isEmpty
(
alertCalledRo
.
getTrappedNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getTrappedNum
()));
...
...
@@ -279,6 +280,12 @@ public class AlertSubmittedController extends BaseController {
String
companyName
=
JSONObject
.
parseObject
(
schedulingContent
.
getSubmissionContent
()).
getString
(
"companyName"
)
;
JSONObject
jsonObject
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
jsonObject
=
JSONObject
.
parseObject
(
schedulingContent
.
getSubmissionContent
());
jsonObject
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
definitions
.
put
(
"$companyName"
,
null
==
companyName
?
""
:
companyName
);
String
content
=
""
;
...
...
@@ -289,6 +296,10 @@ public class AlertSubmittedController extends BaseController {
content
=
getTaskInformation
(
schedulingContent
.
getSubmissionTemplate
(),
definitions
);
}
if
(
jsonObject
!=
null
)
{
schedulingContent
.
setSubmissionContent
(
jsonObject
.
toJSONString
());
}
schedulingContent
.
setSubmissionTemplate
(
content
);
if
(!
ValidationUtil
.
isEmpty
(
schedulingContent
.
getSubmissionContent
()))
{
try
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
f3aaa468
...
...
@@ -271,7 +271,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions
.
put
(
"$callTime"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
definitions
.
put
(
"$replaceContent"
,
replaceContent
);
definitions
.
put
(
"$address"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
())
?
""
:
alertCalled
.
getAddress
());
definitions
.
put
(
"$recDate"
,
DateUtils
.
dateTimeToDateString
(
alertCalled
.
getRecDat
e
()));
// definitions.put("$recDate",DateUtils.dateTimeToDateString(alertCalled.getUpdateTim
e()));
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"$trappedNum"
,
ValidationUtil
.
isEmpty
(
alertCalledRo
.
getTrappedNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getTrappedNum
()));
...
...
@@ -280,6 +280,17 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String
companyName
=
JSONObject
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()).
getString
(
"$companyName"
)
;
JSONObject
jsonObject
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
jsonObject
=
JSONObject
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
());
jsonObject
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
if
(
jsonObject
!=
null
)
{
alertSubmittedExtDto
.
setSubmissionContent
(
jsonObject
.
toJSONString
());
}
definitions
.
put
(
"$companyName"
,
null
==
companyName
?
""
:
companyName
);
String
content
=
getTaskInformation
(
template
.
getRichContent
(),
definitions
);
...
...
@@ -289,8 +300,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
catch
(
JSONException
e
)
{
alertSubmittedExtDto
.
setSubmissionContentValue
(
alertSubmittedExtDto
.
getSubmitContent
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
});
schedulingReportingDto
.
setSchedulingReportingList
(
alertSubmittedExtDtoList
);
...
...
@@ -529,7 +538,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
smsParams
.
put
(
"callTimeStr"
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
"address"
,
calledRo
.
getAddress
());
smsParams
.
put
(
"fireLocation"
,
calledRo
.
getFireLocation
());
smsParams
.
put
(
"endTimeStr"
,
DateUtils
.
convertDateToString
(
alertCalled
.
get
RecDat
e
(),
DateUtils
.
DATE_TIME_PATTERN
));
smsParams
.
put
(
"endTimeStr"
,
DateUtils
.
convertDateToString
(
alertCalled
.
get
UpdateTim
e
(),
DateUtils
.
DATE_TIME_PATTERN
));
smsParams
.
put
(
"burningMaterial"
,
calledRo
.
getBurningMaterial
());
smsParams
.
put
(
"fireSituation"
,
calledRo
.
getFireSituation
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
...
...
@@ -591,6 +600,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
public
Map
<
String
,
String
>
saveAlertSubmitted
(
AlertSubmittedDto
alertSubmittedDto
,
String
userName
)
{
try
{
Long
alertSubmittedId
=
alertSubmittedDto
.
getSequenceNbr
();
String
alertWay
=
""
;
Date
endDate
=
null
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
List
<
Long
>
userIds
=
new
ArrayList
<>();
...
...
@@ -620,6 +630,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
();
endDate
=
DateUtils
.
dateParse
(
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
(),
DateUtils
.
HOUR_PATTERN
);
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
alertSubmitted
.
setSender
(
userName
);
...
...
@@ -1189,7 +1202,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
()
);
// definitions.put("$recDate", DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN));
if
(
alertCalled
.
getAlertStatus
())
{
map
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
get
RecDat
e
(),
DateUtils
.
DATE_TIME_PATTERN
));
map
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
get
UpdateTim
e
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
else
{
map
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
...
...
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