Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
02063651
Commit
02063651
authored
Sep 13, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/九月迭代'
parents
9711a535
eac0551a
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
754 additions
and
12 deletions
+754
-12
GroupChatPlanApiServiceImpl.java
...ce/service/out/impl/chat/GroupChatPlanApiServiceImpl.java
+1
-0
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+33
-6
GroupChatPlanController.java
...n/manage/web/controller/chat/GroupChatPlanController.java
+127
-6
ExcelSheet.java
...rc/main/java/com/gic/haoban/manage/web/qo/ExcelSheet.java
+49
-0
ExportSheetUtil.java
...java/com/gic/haoban/manage/web/utils/ExportSheetUtil.java
+81
-0
GroupChatPlanExcelVO.java
...m/gic/haoban/manage/web/vo/chat/GroupChatPlanExcelVO.java
+155
-0
ReceiveExcelVO.java
...ava/com/gic/haoban/manage/web/vo/chat/ReceiveExcelVO.java
+158
-0
SendExcelVO.java
...n/java/com/gic/haoban/manage/web/vo/chat/SendExcelVO.java
+150
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/chat/GroupChatPlanApiServiceImpl.java
View file @
02063651
...
...
@@ -118,6 +118,7 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
if
(
null
!=
qdto
.
getEndDate
())
{
qdto
.
setEndDate
(
DateUtil
.
getEndTimeOfDay
(
qdto
.
getEndDate
()));
}
qdto
.
setPlanId
(
planId
);
Page
<
GroupChatPlanLogDTO
>
page
=
this
.
groupChatPlanService
.
listLogPage
(
qdto
,
basePageInfo
);
return
ServiceResponse
.
success
(
page
);
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
02063651
...
...
@@ -37,12 +37,14 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -153,11 +155,35 @@ public class GroupChatController {
@RequestMapping
(
"user/quit/excel"
)
public
RestResponse
<
Boolean
>
excel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
GroupChatUserSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Boolean
>
excel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
searchParams
,
Integer
userType
,
Date
startDate
,
Date
endDate
,
@RequestParam
(
defaultValue
=
"2"
)
Integer
status
)
{
GroupChatUserSearchQDTO
qdto
=
new
GroupChatUserSearchQDTO
();
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
int
pageNum
=
1
;
int
pageSize
=
1000
;
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
qdto
.
setSearchParams
(
searchParams
);
qdto
.
setUserType
(
userType
);
qdto
.
setStartDate
(
startDate
);
qdto
.
setEndDate
(
endDate
);
qdto
.
setStatus
(
status
);
basePageInfo
.
setPageSize
(
pageSize
);
List
<
GroupChatUserDTO
>
result
=
new
ArrayList
<>();
while
(
true
)
{
basePageInfo
.
setPageNum
(
pageNum
);
ServiceResponse
<
Page
<
GroupChatUserDTO
>>
page
=
this
.
groupChatApiService
.
listUserPage
(
qdto
,
basePageInfo
);
if
(
page
.
isSuccess
()
&&
CollUtil
.
isNotEmpty
(
page
.
getResult
().
getResult
())){
List
<
GroupChatUserDTO
>
list
=
page
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
break
;
}
result
.
addAll
(
list
);
pageNum
++;
}
if
(
CollUtil
.
isNotEmpty
(
result
)){
List
<
GroupChatUserQuitVO
>
voList
=
new
ArrayList
<>()
;
for
(
GroupChatUserDTO
dto
:
page
.
getResult
().
getResult
()
)
{
for
(
GroupChatUserDTO
dto
:
result
)
{
GroupChatUserQuitVO
vo
=
EntityUtil
.
changeEntityByJSON
(
GroupChatUserQuitVO
.
class
,
dto
)
;
vo
.
setUserQuitTimeExcel
(
DateUtil
.
dateToStr
(
dto
.
getUserQuitTime
(),
"yyyy-MM-dd HH:mm:ss"
));
if
(
dto
.
getUserType
()==
1
)
{
...
...
@@ -169,9 +195,10 @@ public class GroupChatController {
}
voList
.
add
(
vo
)
;
}
String
fileName
=
"退群记录"
;
List
<
String
>
titleList
=
Arrays
.
asList
(
"群成员"
,
"身份"
,
"群名称"
,
"群主"
,
"退群时间"
);
List
<
String
>
fileList
=
Arrays
.
asList
(
"userName"
,
"userTypeExcel"
,
"chatName"
,
"staffName"
,
"userQuitTimeExcel"
);
String
s
=
DateUtil
.
formatString
(
new
Date
(),
DateUtil
.
FORMAT_DATE_10
);
String
fileName
=
"退群记录"
+
s
;
List
<
String
>
titleList
=
Arrays
.
asList
(
"群成员姓名"
,
"群成员昵称"
,
"身份"
,
"群名称"
,
"群主"
,
"退群时间"
);
List
<
String
>
fileList
=
Arrays
.
asList
(
"userName"
,
"nickName"
,
"userTypeExcel"
,
"chatName"
,
"staffName"
,
"userQuitTimeExcel"
);
try
{
ExcelUtils
.
xls
(
response
,
request
,
fileName
,
voList
,
fileList
,
titleList
);
}
catch
(
Exception
e
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatPlanController.java
View file @
02063651
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
chat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.gic.haoban.manage.api.dto.chat.ChatContentDTO
;
import
com.gic.haoban.manage.web.qo.ExcelSheet
;
import
com.gic.haoban.manage.web.utils.ExportSheetUtil
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
import
com.gic.haoban.manage.web.vo.chat.*
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -38,13 +39,13 @@ import com.gic.haoban.manage.api.service.StaffApiService;
import
com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.utils.CreatorUtils
;
import
com.gic.haoban.manage.web.vo.chat.ChatOwnerVO
;
import
com.gic.haoban.manage.web.vo.chat.GroupChatPlanVO
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
javax.servlet.http.HttpServletResponse
;
/**
*
* @ClassName: GroupChatPlanController
...
...
@@ -381,4 +382,124 @@ public class GroupChatPlanController {
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
/**
* 群发记录导出(多个sheet)
* @param qdto
* @param response
* @return
*/
@RequestMapping
(
"export-group-chat"
)
public
RestResponse
<
Void
>
exportGroupChat
(
GroupChatPlanSearchQDTO
qdto
,
HttpServletResponse
response
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
List
<
String
>
creatorIdList
=
CreatorUtils
.
getCreatorIdList
(
0
);
if
(
CollectionUtils
.
isNotEmpty
(
creatorIdList
))
{
qdto
.
setCreatorIdList
(
creatorIdList
);
}
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageSize
(
99999
);
ServiceResponse
<
Page
<
GroupChatPlanDTO
>>
page
=
this
.
groupChatPlanApiService
.
listPage
(
qdto
,
basePageInfo
);
List
<
GroupChatPlanDTO
>
result
=
page
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
)){
return
RestResponse
.
failure
(
"-9999"
,
"导出的数据为空"
);
}
List
<
GroupChatPlanExcelVO
>
groupChatPlanExcelVOList
=
EntityUtil
.
changeEntityListByJSON
(
GroupChatPlanExcelVO
.
class
,
result
);
List
<
SendExcelVO
>
sendExcelVOList
=
new
ArrayList
<>();
List
<
ReceiveExcelVO
>
receiveExcelVOList
=
new
ArrayList
<>();
List
<
Long
>
planIdList
=
result
.
stream
().
map
(
a
->
a
.
getPlanId
()).
collect
(
Collectors
.
toList
());
Map
<
Long
,
GroupChatPlanDTO
>
map
=
result
.
stream
().
collect
(
Collectors
.
toMap
(
GroupChatPlanDTO:
:
getPlanId
,
a
->
a
));
//按计划维度 查询群发详情和客户接收详情
GroupChatPlanSearchQDTO
searchQDTO
=
new
GroupChatPlanSearchQDTO
();
searchQDTO
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
searchQDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
for
(
Long
planId
:
planIdList
){
GroupChatPlanDTO
groupChatPlanDTO
=
map
.
get
(
planId
);
ServiceResponse
<
Page
<
GroupChatPlanOwnerLogDTO
>>
resp
=
this
.
groupChatPlanApiService
.
listOwnerLogPage
(
planId
,
searchQDTO
,
basePageInfo
);
List
<
GroupChatPlanOwnerLogDTO
>
planOwnerLogDTOS
=
resp
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
planOwnerLogDTOS
)){
List
<
SendExcelVO
>
sendExcelVOList1
=
EntityUtil
.
changeEntityListByJSON
(
SendExcelVO
.
class
,
planOwnerLogDTOS
);
sendExcelVOList1
.
forEach
(
a
->{
a
.
setName
(
groupChatPlanDTO
.
getName
());
a
.
setStartTime
(
groupChatPlanDTO
.
getStartTime
());
a
.
setEndTime
(
groupChatPlanDTO
.
getEndTime
());
});
sendExcelVOList
.
addAll
(
sendExcelVOList1
);
}
ServiceResponse
<
Page
<
GroupChatPlanLogDTO
>>
resp1
=
this
.
groupChatPlanApiService
.
listLogPage
(
planId
,
searchQDTO
,
basePageInfo
);
List
<
GroupChatPlanLogDTO
>
planLogDTOS
=
resp1
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
planLogDTOS
)){
List
<
ReceiveExcelVO
>
receiveExcelVOList1
=
EntityUtil
.
changeEntityListByJSON
(
ReceiveExcelVO
.
class
,
planLogDTOS
);
receiveExcelVOList1
.
forEach
(
a
->{
a
.
setName
(
groupChatPlanDTO
.
getName
());
a
.
setStartTime
(
groupChatPlanDTO
.
getStartTime
());
a
.
setEndTime
(
groupChatPlanDTO
.
getEndTime
());
});
receiveExcelVOList
.
addAll
(
receiveExcelVOList1
);
}
}
//设置sheet的表头与表名
String
[]
groupChatListSheetHead
=
{
"任务名称"
,
"任务状态"
,
"已完成群主数"
,
"未完成群主数"
,
"完成率"
,
"已送达群数"
,
"任务开始时间"
,
"任务结束时间"
,
"创建人"
,
"创建时间"
};
String
[]
sendSheetHead
=
{
"任务名称"
,
"发送人"
,
"关联导购"
,
"关联门店"
,
"完成状态"
,
"已送达客户群数"
,
"发送时间"
,
"任务开始时间"
,
"任务结束时间"
};
String
[]
receiveSheetHead
=
{
"任务名称"
,
"群名称"
,
"群人数"
,
"发送人"
,
"关联导购"
,
"关联门店"
,
"发送状态"
,
"发送时间"
,
"任务开始时间"
,
"任务结束时间"
};
List
<
ExcelSheet
>
mysheet
=
new
ArrayList
<>();
ExcelSheet
groupChatListExcel
=
new
ExcelSheet
(
"客户群发列表"
,
groupChatListSheetHead
,
changeGroupChatPlanExcelVOList
(
groupChatPlanExcelVOList
));
mysheet
.
add
(
groupChatListExcel
);
ExcelSheet
sendExcel
=
new
ExcelSheet
(
"发送人群发详情"
,
sendSheetHead
,
changeSendExcelVOList
(
sendExcelVOList
));
mysheet
.
add
(
sendExcel
);
ExcelSheet
receiveExcel
=
new
ExcelSheet
(
"客户群接收详情"
,
receiveSheetHead
,
changeReceiveExcelVOList
(
receiveExcelVOList
));
mysheet
.
add
(
receiveExcel
);
String
s
=
DateUtil
.
formatString
(
new
Date
(),
DateUtil
.
FORMAT_DATE_10
);
String
fileName
=
"客户群群发"
+
s
;
ExportSheetUtil
.
exportManySheetExcel
(
fileName
,
mysheet
,
response
);
return
RestResponse
.
successResult
(
null
);
}
private
List
<
String
[]>
changeGroupChatPlanExcelVOList
(
List
<
GroupChatPlanExcelVO
>
groupChatPlanExcelVOList
){
List
<
String
[]>
result
=
new
ArrayList
<>();
for
(
GroupChatPlanExcelVO
vo
:
groupChatPlanExcelVOList
){
String
startTime
=
DateUtil
.
formatString
(
vo
.
getStartTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
endTime
=
DateUtil
.
formatString
(
vo
.
getEndTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
createTime
=
DateUtil
.
formatString
(
vo
.
getCreateTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
[]
a
=
{
vo
.
getName
(),
vo
.
getStatus
(),
vo
.
getSendCount
()==
null
?
""
:
vo
.
getSendCount
().
toString
(),
vo
.
getStaffCount
()==
null
?
""
:
vo
.
getStaffCount
().
toString
(),
vo
.
getCompletionRate
(),
vo
.
getSuccessChatCount
()==
null
?
""
:
vo
.
getSuccessChatCount
().
toString
(),
startTime
,
endTime
,
vo
.
getCreatorName
(),
createTime
};
result
.
add
(
a
);
}
return
result
;
}
private
List
<
String
[]>
changeSendExcelVOList
(
List
<
SendExcelVO
>
sendExcelVOList
){
List
<
String
[]>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
sendExcelVOList
)){
return
result
;
}
for
(
SendExcelVO
vo
:
sendExcelVOList
){
String
sendTime
=
DateUtil
.
formatString
(
vo
.
getSendTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
startTime
=
DateUtil
.
formatString
(
vo
.
getStartTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
endTime
=
DateUtil
.
formatString
(
vo
.
getEndTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
[]
a
=
{
vo
.
getName
(),
vo
.
getStaffName
(),
vo
.
getClerkName
(),
vo
.
getStoreName
(),
vo
.
getSendStatusExcel
(),
vo
.
getSendCount
()==
null
?
""
:
vo
.
getSendCount
().
toString
(),
sendTime
,
startTime
,
endTime
};
result
.
add
(
a
);
}
return
result
;
}
private
List
<
String
[]>
changeReceiveExcelVOList
(
List
<
ReceiveExcelVO
>
receiveExcelVOList
){
List
<
String
[]>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
receiveExcelVOList
)){
return
result
;
}
for
(
ReceiveExcelVO
vo
:
receiveExcelVOList
){
String
sendTime
=
DateUtil
.
formatString
(
vo
.
getSendTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
startTime
=
DateUtil
.
formatString
(
vo
.
getStartTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
endTime
=
DateUtil
.
formatString
(
vo
.
getEndTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
[]
a
=
{
vo
.
getName
(),
vo
.
getChatName
(),
vo
.
getChatTotalCount
()==
null
?
""
:
vo
.
getChatTotalCount
().
toString
(),
vo
.
getStaffName
(),
vo
.
getClerkName
(),
vo
.
getStoreName
(),
vo
.
getSendStatusExcel
(),
sendTime
,
startTime
,
endTime
};
result
.
add
(
a
);
}
return
result
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/ExcelSheet.java
0 → 100644
View file @
02063651
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
;
import
java.util.List
;
/**
* @description:
* @Author: wenhua
* @Date: 2023/9/12 11:19
*/
public
class
ExcelSheet
{
/*** sheet的名称*/
private
String
fileName
;
/*** sheet里的标题*/
private
String
[]
handers
;
/*** sheet里的数据集*/
private
List
<
String
[]>
dataset
;
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
String
[]
getHanders
()
{
return
handers
;
}
public
void
setHanders
(
String
[]
handers
)
{
this
.
handers
=
handers
;
}
public
List
<
String
[]>
getDataset
()
{
return
dataset
;
}
public
void
setDataset
(
List
<
String
[]>
dataset
)
{
this
.
dataset
=
dataset
;
}
public
ExcelSheet
(
String
fileName
,
String
[]
handers
,
List
<
String
[]>
dataset
)
{
this
.
fileName
=
fileName
;
this
.
handers
=
handers
;
this
.
dataset
=
dataset
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/utils/ExportSheetUtil.java
0 → 100644
View file @
02063651
package
com
.
gic
.
haoban
.
manage
.
web
.
utils
;
import
com.gic.haoban.manage.web.qo.ExcelSheet
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.apache.poi.ss.usermodel.CellStyle
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.usermodel.VerticalAlignment
;
import
org.springframework.http.MediaType
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.util.List
;
/**
* @description:
* @Author: wenhua
* @Date: 2023/9/12 11:14
*/
public
class
ExportSheetUtil
{
/**
* 拆解并导出多重Excel
*/
public
static
void
exportManySheetExcel
(
String
fileName
,
List
<
ExcelSheet
>
mysheets
,
HttpServletResponse
response
)
{
//创建工作薄
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
//表头样式
HSSFCellStyle
style
=
wb
.
createCellStyle
();
// 垂直
style
.
setVerticalAlignment
(
CellStyle
.
ALIGN_CENTER
);
// 水平
style
.
setAlignment
(
CellStyle
.
VERTICAL_CENTER
);
//字体样式
HSSFFont
fontStyle
=
wb
.
createFont
();
fontStyle
.
setFontName
(
"微软雅黑"
);
fontStyle
.
setFontHeightInPoints
((
short
)
12
);
style
.
setFont
(
fontStyle
);
for
(
ExcelSheet
excel
:
mysheets
)
{
//新建一个sheet
//获取该sheet名称
HSSFSheet
sheet
=
wb
.
createSheet
(
excel
.
getFileName
());
//获取sheet的标题名
String
[]
handers
=
excel
.
getHanders
();
//第一个sheet的第一行为标题
HSSFRow
rowFirst
=
sheet
.
createRow
(
0
);
//写标题
for
(
int
i
=
0
;
i
<
handers
.
length
;
i
++)
{
//获取第一行的每个单元格
HSSFCell
cell
=
rowFirst
.
createCell
(
i
);
//往单元格里写数据
cell
.
setCellValue
(
handers
[
i
]);
//加样式
cell
.
setCellStyle
(
style
);
//设置每列的列宽
sheet
.
setColumnWidth
(
i
,
4000
);
}
//写数据集
List
<
String
[]>
dataset
=
excel
.
getDataset
();
for
(
int
i
=
0
;
i
<
dataset
.
size
();
i
++)
{
//获取该对象
String
[]
data
=
dataset
.
get
(
i
);
//创建数据行
HSSFRow
row
=
sheet
.
createRow
(
i
+
1
);
for
(
int
j
=
0
;
j
<
data
.
length
;
j
++)
{
//设置对应单元格的值
row
.
createCell
(
j
).
setCellValue
(
data
[
j
]);
}
}
}
// 下载文件谷歌文件名会乱码,用IE
try
{
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
+
".xls"
,
"utf-8"
));
response
.
setHeader
(
"Cache-Control"
,
"No-cache"
);
response
.
flushBuffer
();
wb
.
write
(
response
.
getOutputStream
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/GroupChatPlanExcelVO.java
0 → 100644
View file @
02063651
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
/**
*
* @ClassName: TabHaobanGroupChatPlan
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:28:49
* @Modify
* @CopyRight
*/
public
class
GroupChatPlanExcelVO
extends
Object
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21576537277600L
;
/**
* 任务名称
*/
private
String
name
;
/**
* 任务状态
*/
private
String
status
;
/**
* 已完成任务的群主数量
*/
private
Integer
sendCount
;
/**
* 群主数量
*/
private
Integer
staffCount
;
/**
* 完成率
*/
private
String
completionRate
;
/**
* 已送达数的群数
*/
private
Integer
successChatCount
;
/**
* 任务开始时间
*/
private
Date
startTime
;
/**
* 任务结束时间
*/
private
Date
endTime
;
/**
* 创建人
*/
private
String
creatorName
;
/**
* 创建时间
*/
private
Date
createTime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getStatus
()
{
Date
now
=
new
Date
();
if
(
now
.
before
(
this
.
startTime
)){
status
=
"未开始"
;
}
else
if
(
now
.
before
(
this
.
endTime
)){
status
=
"进行中"
;
}
else
if
(
now
.
after
(
this
.
endTime
)){
status
=
"已结束"
;
}
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
Integer
getSendCount
()
{
return
sendCount
;
}
public
void
setSendCount
(
Integer
sendCount
)
{
this
.
sendCount
=
sendCount
;
}
public
Integer
getStaffCount
()
{
return
staffCount
;
}
public
void
setStaffCount
(
Integer
staffCount
)
{
this
.
staffCount
=
staffCount
;
}
public
String
getCompletionRate
()
{
Double
i
=
100.0
*
this
.
sendCount
/
this
.
staffCount
;
BigDecimal
bd
=
new
BigDecimal
(
i
);
bd
=
bd
.
setScale
(
2
,
RoundingMode
.
HALF_UP
);
completionRate
=
bd
+
"%"
;
return
completionRate
;
}
public
void
setCompletionRate
(
String
completionRate
)
{
this
.
completionRate
=
completionRate
;
}
public
Integer
getSuccessChatCount
()
{
return
successChatCount
;
}
public
void
setSuccessChatCount
(
Integer
successChatCount
)
{
this
.
successChatCount
=
successChatCount
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
public
String
getCreatorName
()
{
return
creatorName
;
}
public
void
setCreatorName
(
String
creatorName
)
{
this
.
creatorName
=
creatorName
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
}
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/ReceiveExcelVO.java
0 → 100644
View file @
02063651
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @ClassName: TabHaobanGroupChatPlanLog
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:17:50
* @Modify
* @CopyRight
*/
public
class
ReceiveExcelVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21625366526300L
;
/**
* 任务名称
*/
private
String
name
;
/**
* 群名称
*/
private
String
chatName
;
/**
* 群人数
*/
private
Integer
chatTotalCount
;
/**
* 发送人
*/
private
String
staffName
;
/**
* 关联导购
*/
private
String
clerkName
;
/**
* 关联门店
*/
private
String
storeName
;
/**
* 发送状态
*/
private
Integer
sendStatus
;
/**
* 发送状态
*/
private
String
sendStatusExcel
;
/**
* 发送时间
*/
private
Date
sendTime
;
/**
* 任务开始时间
*/
private
Date
startTime
;
/**
* 任务结束时间
*/
private
Date
endTime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getChatName
()
{
return
chatName
;
}
public
void
setChatName
(
String
chatName
)
{
this
.
chatName
=
chatName
;
}
public
Integer
getChatTotalCount
()
{
return
chatTotalCount
;
}
public
void
setChatTotalCount
(
Integer
chatTotalCount
)
{
this
.
chatTotalCount
=
chatTotalCount
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
Integer
getSendStatus
()
{
return
sendStatus
;
}
public
void
setSendStatus
(
Integer
sendStatus
)
{
this
.
sendStatus
=
sendStatus
;
}
public
String
getSendStatusExcel
()
{
sendStatusExcel
=
"发送失败"
;
if
(
this
.
sendStatus
==
0
){
sendStatusExcel
=
"发送失败"
;
}
else
if
(
this
.
sendStatus
==
2
){
sendStatusExcel
=
"已发送"
;
}
return
sendStatusExcel
;
}
public
void
setSendStatusExcel
(
String
sendStatusExcel
)
{
this
.
sendStatusExcel
=
sendStatusExcel
;
}
public
Date
getSendTime
()
{
return
sendTime
;
}
public
void
setSendTime
(
Date
sendTime
)
{
this
.
sendTime
=
sendTime
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
}
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/SendExcelVO.java
0 → 100644
View file @
02063651
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @ClassName: TabHaobanGroupChatPlanOwnerLog
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:29:51
* @Modify
* @CopyRight
*/
public
class
SendExcelVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21697825515700L
;
/**
* 任务名称
*/
private
String
name
;
/**
* 发送人
*/
private
String
staffName
;
/**
* 关联导购
*/
private
String
clerkName
;
/**
* 关联门店
*/
private
String
storeName
;
/**
* 完成状态
*/
private
Integer
sendStatus
;
/**
* 完成状态
*/
private
String
sendStatusExcel
;
/**
* 已送达客户群数
*/
private
Integer
sendCount
;
/**
* 发送时间
*/
private
Date
sendTime
;
/**
* 任务开始时间
*/
private
Date
startTime
;
/**
* 任务结束时间
*/
private
Date
endTime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
Integer
getSendStatus
()
{
return
sendStatus
;
}
public
void
setSendStatus
(
Integer
sendStatus
)
{
this
.
sendStatus
=
sendStatus
;
}
public
String
getSendStatusExcel
()
{
sendStatusExcel
=
"待发送"
;
if
(
this
.
sendStatus
==
null
){
return
sendStatusExcel
;
}
if
(
this
.
sendStatus
==
0
){
sendStatusExcel
=
"任务创建失败"
;
}
else
if
(
this
.
sendStatus
==
1
){
sendStatusExcel
=
"待发送"
;
}
else
if
(
this
.
sendStatus
==
2
){
sendStatusExcel
=
"已发送"
;
}
return
sendStatusExcel
;
}
public
void
setSendStatusExcel
(
String
sendStatusExcel
)
{
this
.
sendStatusExcel
=
sendStatusExcel
;
}
public
Integer
getSendCount
()
{
return
sendCount
;
}
public
void
setSendCount
(
Integer
sendCount
)
{
this
.
sendCount
=
sendCount
;
}
public
Date
getSendTime
()
{
return
sendTime
;
}
public
void
setSendTime
(
Date
sendTime
)
{
this
.
sendTime
=
sendTime
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
}
\ No newline at end of file
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