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
e74f684b
Commit
e74f684b
authored
Sep 13, 2019
by
Tu Bach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tubn campaign execute update
parent
9a9fed56
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
16 deletions
+21
-16
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignExecuteRepositoryImp.java
...pository/ccms_full/impl/CampaignExecuteRepositoryImp.java
+10
-11
src/main/java/com/viettel/campaign/service/impl/CampaignExecuteServiceImp.java
...ttel/campaign/service/impl/CampaignExecuteServiceImp.java
+10
-2
src/main/java/com/viettel/campaign/web/dto/BaseDTO.java
src/main/java/com/viettel/campaign/web/dto/BaseDTO.java
+1
-0
src/main/java/com/viettel/campaign/web/dto/CampaignDTO.java
src/main/java/com/viettel/campaign/web/dto/CampaignDTO.java
+0
-3
No files found.
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignExecuteRepositoryImp.java
View file @
e74f684b
...
...
@@ -5,9 +5,7 @@ import com.viettel.campaign.repository.ccms_full.CampaignExecuteRepository;
import
com.viettel.campaign.repository.ccms_full.ContactQuestResultRepository
;
import
com.viettel.campaign.repository.ccms_full.TimeRangeDialModeRepository
;
import
com.viettel.campaign.repository.ccms_full.TimeZoneDialModeRepository
;
import
com.viettel.campaign.utils.Constants
;
import
com.viettel.campaign.utils.DataUtil
;
import
com.viettel.campaign.utils.HibernateUtil
;
import
com.viettel.campaign.utils.*
;
import
com.viettel.campaign.web.dto.*
;
import
com.viettel.campaign.web.dto.request_dto.CampaignRequestDTO
;
import
org.hibernate.SQLQuery
;
...
...
@@ -460,6 +458,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
@Transactional
(
DataSourceQualify
.
CCMS_FULL
)
public
List
<
CampaignDTO
>
searchCampaignExecute
(
CampaignRequestDTO
campaignRequestDto
,
Pageable
pageable
)
{
List
<
CampaignDTO
>
result
=
new
ArrayList
<>();
TimeZone
tzClient
=
TimeZoneUtils
.
getZoneMinutes
(
campaignRequestDto
.
getTimezone
());
SessionFactory
sessionFactory
=
HibernateUtil
.
getSessionFactory
();
Session
session
=
null
;
...
...
@@ -485,19 +484,19 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getFromDateFr
()))
{
expression
.
append
(
" AND
TRUNC(C.START_TIME) >= TRUNC(:pStartTimeFr
) "
);
expression
.
append
(
" AND
C.START_TIME >= TO_DATE(:pStartTimeFr, 'DD/MM/YYYY HH24:MI:SS'
) "
);
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getFromDateTo
()))
{
expression
.
append
(
" AND
TRUNC(C.START_TIME) <= TRUNC(:pStartTimeTo
) "
);
expression
.
append
(
" AND
C.START_TIME <= TO_DATE(:pStartTimeTo, 'DD/MM/YYYY HH24:MI:SS'
) "
);
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getToDateFr
()))
{
expression
.
append
(
" AND
TRUNC(C.END_TIME) >= TRUNC(:pEndTimeFr
) "
);
expression
.
append
(
" AND
C.END_TIME >= TO_DATE(:pEndTimeFr, 'DD/MM/YYYY HH24:MI:SS'
) "
);
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getToDateTo
()))
{
expression
.
append
(
" AND
TRUNC(C.END_TIME) <= TRUNC(:pEndTimeTo
) "
);
expression
.
append
(
" AND
C.END_TIME <= TO_DATE(:pEndTimeTo, 'DD/MM/YYYY HH24:MI:SS'
) "
);
}
if
(!
DataUtil
.
isNullOrZero
(
campaignRequestDto
.
getNumOfCusFr
()))
{
...
...
@@ -535,19 +534,19 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getFromDateFr
()))
{
query
.
setParameter
(
"pStartTimeFr"
,
campaignRequestDto
.
getFromDateFr
(
));
query
.
setParameter
(
"pStartTimeFr"
,
TimeZoneUtils
.
toDateStringWithTimeZone
(
DateTimeUtil
.
parseDate
(
"dd/MM/yyyy"
,
campaignRequestDto
.
getFromDateFr
()),
tzClient
));
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getFromDateTo
()))
{
query
.
setParameter
(
"pStartTimeTo"
,
campaignRequestDto
.
getFromDateTo
(
));
query
.
setParameter
(
"pStartTimeTo"
,
TimeZoneUtils
.
toDateStringWithTimeZone
(
DateTimeUtil
.
parseDate
(
"dd/MM/yyyy"
,
campaignRequestDto
.
getFromDateTo
()),
tzClient
));
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getToDateFr
()))
{
query
.
setParameter
(
"pEndTimeFr"
,
campaignRequestDto
.
getToDateFr
(
));
query
.
setParameter
(
"pEndTimeFr"
,
TimeZoneUtils
.
toDateStringWithTimeZone
(
DateTimeUtil
.
parseDate
(
"dd/MM/yyyy"
,
campaignRequestDto
.
getToDateFr
()),
tzClient
));
}
if
(!
DataUtil
.
isNullOrEmpty
(
campaignRequestDto
.
getToDateTo
()))
{
query
.
setParameter
(
"pEndTimeTo"
,
campaignRequestDto
.
getToDateTo
(
));
query
.
setParameter
(
"pEndTimeTo"
,
TimeZoneUtils
.
toDateStringWithTimeZone
(
DateTimeUtil
.
parseDate
(
"dd/MM/yyyy"
,
campaignRequestDto
.
getToDateTo
()),
tzClient
));
}
if
(!
DataUtil
.
isNullOrZero
(
campaignRequestDto
.
getNumOfCusFr
()))
{
...
...
src/main/java/com/viettel/campaign/service/impl/CampaignExecuteServiceImp.java
View file @
e74f684b
...
...
@@ -314,8 +314,16 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
VSAUsers
vsa
=
vsaUsersRepository
.
findByUserId
(
Long
.
parseLong
(
requestDto
.
getAgentId
()));
List
<
AgentStatusStat
>
ass
=
agentStatusStatRepository
.
getStatusByKzUserId
(
vsa
.
getUserKazooId
());
if
(
ass
!=
null
)
{
result
.
setErrorCode
(
"02"
);
result
.
setDescription
(
"campaign-agents-err-callout"
);
if
(
ass
.
get
(
0
).
getCurrentStatus
().
equalsIgnoreCase
(
"logged_out"
))
{
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
}
else
if
(
ass
.
get
(
0
).
getCurrentStatus
().
equalsIgnoreCase
(
"campaign"
))
{
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
}
else
{
result
.
setErrorCode
(
"02"
);
result
.
setDescription
(
"campaign-agents-err-callout"
);
}
}
else
if
(
dialMode
.
equalsIgnoreCase
(
"-1"
))
{
result
.
setErrorCode
(
"03"
);
result
.
setDescription
(
"campaign-agents-err-dial-mode"
);
...
...
src/main/java/com/viettel/campaign/web/dto/BaseDTO.java
View file @
e74f684b
...
...
@@ -14,4 +14,5 @@ public class BaseDTO implements Serializable {
protected
Integer
page
;
protected
String
sort
;
protected
String
langKey
;
protected
Long
timezone
;
}
src/main/java/com/viettel/campaign/web/dto/CampaignDTO.java
View file @
e74f684b
...
...
@@ -66,7 +66,4 @@ public class CampaignDTO extends BaseDTO {
private
String
sessionId
;
private
Long
numOfInteractedCus
;
private
Long
numOfNotInteractedCus
;
//timezone to get true date
private
Double
timezone
;
}
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