Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
service-campaign
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Ha
service-campaign
Commits
ba5f20e1
Commit
ba5f20e1
authored
Sep 23, 2019
by
Vu Duy Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
anhvd change source scenario update
parent
d633103b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
src/main/java/com/viettel/campaign/service/ScenarioService.java
...in/java/com/viettel/campaign/service/ScenarioService.java
+1
-1
src/main/java/com/viettel/campaign/service/impl/ScenarioQuestionServiceImpl.java
...el/campaign/service/impl/ScenarioQuestionServiceImpl.java
+0
-1
src/main/java/com/viettel/campaign/service/impl/ScenarioServiceImpl.java
...om/viettel/campaign/service/impl/ScenarioServiceImpl.java
+2
-1
src/main/java/com/viettel/campaign/web/rest/ScenarioController.java
...ava/com/viettel/campaign/web/rest/ScenarioController.java
+1
-1
No files found.
src/main/java/com/viettel/campaign/service/ScenarioService.java
View file @
ba5f20e1
...
...
@@ -28,7 +28,7 @@ public interface ScenarioService {
XSSFWorkbook
buildTemplate
()
throws
IOException
;
Map
<
String
,
Object
>
readAndValidate
Customer
(
String
path
,
Long
scenarioId
,
Long
campaignId
,
Long
companySiteId
)
throws
IOException
;
Map
<
String
,
Object
>
readAndValidate
Scenario
(
String
path
,
Long
scenarioId
,
Long
campaignId
,
Long
companySiteId
)
throws
IOException
;
List
<
ContactQuestResult
>
getContactQuestResult
(
Long
companySiteId
,
Long
campaignId
,
Long
customerId
);
}
src/main/java/com/viettel/campaign/service/impl/ScenarioQuestionServiceImpl.java
View file @
ba5f20e1
...
...
@@ -80,7 +80,6 @@ public class ScenarioQuestionServiceImpl implements ScenarioQuestionService {
if
(
scenarioQuestionDTO
.
getLstAnswers
().
size
()
>
0
)
{
lstAnswers
=
scenarioQuestionDTO
.
getLstAnswers
();
lstAnswers
.
forEach
(
item
->
{
item
.
setCode
(
scenarioQuestion
.
getCode
()
+
"_"
+
item
.
getOrderIndex
());
item
.
setScenarioQuestionId
(
scenarioQuestion
.
getScenarioQuestionId
());
item
.
setCreateTime
(
new
Date
());
item
.
setStatus
((
short
)
1
);
...
...
src/main/java/com/viettel/campaign/service/impl/ScenarioServiceImpl.java
View file @
ba5f20e1
...
...
@@ -254,7 +254,7 @@ public class ScenarioServiceImpl implements ScenarioService {
@Override
@Transactional
(
DataSourceQualify
.
CCMS_FULL
)
public
Map
<
String
,
Object
>
readAndValidate
Customer
(
String
path
,
Long
scenarioId
,
Long
campaignId
,
Long
companySiteId
)
throws
IOException
{
public
Map
<
String
,
Object
>
readAndValidate
Scenario
(
String
path
,
Long
scenarioId
,
Long
campaignId
,
Long
companySiteId
)
throws
IOException
{
Locale
locale
=
new
Locale
(
"vi"
,
"VN"
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"dd/MM/yyyy HH:mm:ss"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
...
...
@@ -551,6 +551,7 @@ public class ScenarioServiceImpl implements ScenarioService {
lstQuestions
.
forEach
(
q2
->
{
List
<
ScenarioAnswerDTO
>
lstAnswers
=
q2
.
getLstAnswers
();
lstAnswers
.
forEach
(
a2
->
{
a2
.
setCode
(
q2
.
getCode
()
+
"_"
+
a2
.
getOrderIndex
());
ScenarioQuestionDTO
mappingQuestion
=
lstQuestions
.
stream
().
filter
(
mq
->
mq
.
getImportCode
().
equals
(
a2
.
getMappingQuestionCode
())).
findFirst
().
orElse
(
null
);
if
(
mappingQuestion
!=
null
)
{
a2
.
setMappingQuestionCode
(
mappingQuestion
.
getCode
());
...
...
src/main/java/com/viettel/campaign/web/rest/ScenarioController.java
View file @
ba5f20e1
...
...
@@ -118,7 +118,7 @@ public class ScenarioController {
return
new
ResponseEntity
<>(
BundleUtils
.
getLangString
(
"common.fileInvalidFormat"
,
locale
),
HttpStatus
.
OK
);
}
String
path
=
saveUploadFile
(
file
);
Map
<
String
,
Object
>
map
=
scenarioService
.
readAndValidate
Customer
(
path
,
scenarioId
,
campaignId
,
userSession
.
getCompanySiteId
());
Map
<
String
,
Object
>
map
=
scenarioService
.
readAndValidate
Scenario
(
path
,
scenarioId
,
campaignId
,
userSession
.
getCompanySiteId
());
String
code
=
(
String
)
map
.
get
(
"code"
);
byte
[]
content
=
(
byte
[])
map
.
get
(
"content"
);
return
ResponseEntity
.
ok
()
...
...
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