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
80dd72df
Commit
80dd72df
authored
Sep 27, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导购任务
parent
f9a5cf83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
8 deletions
+50
-8
ClerkTaskController.java
.../manage/web/controller/clerktask/ClerkTaskController.java
+38
-8
TaskPlanDetailVO.java
.../gic/haoban/manage/web/vo/clerktask/TaskPlanDetailVO.java
+12
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/clerktask/ClerkTaskController.java
View file @
80dd72df
...
@@ -6,6 +6,8 @@ import com.gic.commons.util.DateUtil;
...
@@ -6,6 +6,8 @@ import com.gic.commons.util.DateUtil;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.enums.PlatformChannelEnum
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.manage.web.qo.clerktask.*
;
import
com.gic.haoban.manage.web.qo.clerktask.*
;
import
com.gic.haoban.manage.web.vo.clerktask.*
;
import
com.gic.haoban.manage.web.vo.clerktask.*
;
import
com.gic.marketing.pro.api.dto.clerktask.*
;
import
com.gic.marketing.pro.api.dto.clerktask.*
;
...
@@ -15,17 +17,15 @@ import com.gic.marketing.pro.api.qdto.clerktask.ClerkTaskContentPageQDTO;
...
@@ -15,17 +17,15 @@ import com.gic.marketing.pro.api.qdto.clerktask.ClerkTaskContentPageQDTO;
import
com.gic.marketing.pro.api.qdto.clerktask.ClerkTaskPageQDTO
;
import
com.gic.marketing.pro.api.qdto.clerktask.ClerkTaskPageQDTO
;
import
com.gic.marketing.pro.api.service.clerktask.ClerkTaskApiService
;
import
com.gic.marketing.pro.api.service.clerktask.ClerkTaskApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.lang.reflect.Array
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.stream.Collectors
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 导购任务-好办小程序
* 导购任务-好办小程序
...
@@ -37,6 +37,8 @@ public class ClerkTaskController {
...
@@ -37,6 +37,8 @@ public class ClerkTaskController {
@Autowired
@Autowired
private
ClerkTaskApiService
clerkTaskApiService
;
private
ClerkTaskApiService
clerkTaskApiService
;
@Autowired
private
EnterpriseService
enterpriseService
;
/**
/**
* 导购进行中任务数
* 导购进行中任务数
...
@@ -101,18 +103,46 @@ public class ClerkTaskController {
...
@@ -101,18 +103,46 @@ public class ClerkTaskController {
*/
*/
@RequestMapping
(
"task-detail"
)
@RequestMapping
(
"task-detail"
)
@ResponseBody
@ResponseBody
public
RestResponse
<
TaskPlanDetailVO
>
taskDetail
(
String
enterprsieId
,
Long
planId
,
String
clerkId
)
{
public
RestResponse
<
TaskPlanDetailVO
>
taskDetail
(
String
enterpriseId
,
Long
planId
,
String
clerkId
)
{
TaskPlanDetailVO
vo
=
new
TaskPlanDetailVO
()
;
ServiceResponse
<
ClerkTaskPlanDTO
>
resp
=
this
.
clerkTaskApiService
.
getDetail
(
enterpriseId
,
planId
,
0
)
;
ServiceResponse
<
ClerkTaskPlanDTO
>
resp
=
this
.
clerkTaskApiService
.
getDetail
(
enterprsieId
,
planId
,
0
)
;
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
TaskPlanDetailVO
vo
=
new
TaskPlanDetailVO
()
;
Map
<
Long
,
Integer
>
map
=
this
.
statusMap
(
Arrays
.
asList
(
resp
.
getResult
()))
;
Map
<
Long
,
Integer
>
map
=
this
.
statusMap
(
Arrays
.
asList
(
resp
.
getResult
()))
;
vo
=
EntityUtil
.
changeEntityByJSON
(
TaskPlanDetailVO
.
class
,
resp
.
getResult
());
vo
=
EntityUtil
.
changeEntityByJSON
(
TaskPlanDetailVO
.
class
,
resp
.
getResult
());
vo
.
setStatus
(
map
.
get
(
vo
.
getPlanId
()));
vo
.
setStatus
(
map
.
get
(
vo
.
getPlanId
()));
vo
.
setOrderChannelNames
(
this
.
channelName
(
enterpriseId
,
vo
.
getOrderChannels
()));
return
RestResponse
.
successResult
(
vo
)
;
return
RestResponse
.
successResult
(
vo
)
;
}
}
private
String
channelName
(
String
enterpriseId
,
String
channelCodes
)
{
if
(
StringUtils
.
isBlank
(
channelCodes
))
{
return
""
;
}
else
{
ServiceResponse
<
List
<
PlatformChannelEnum
>>
resp
=
this
.
enterpriseService
.
getEnabledMemberChannel
(
enterpriseId
)
;
Map
<
String
,
String
>
map
=
new
HashMap
<>()
;
map
.
put
(
"c_pos"
,
"线下"
)
;
if
(
resp
.
isSuccess
())
{
List
<
PlatformChannelEnum
>
channelEnumList
=
resp
.
getResult
()
;
for
(
PlatformChannelEnum
o
:
channelEnumList
)
{
map
.
put
(
o
.
getChannelCode
(),
o
.
getChannelNameOrder
())
;
}
}
String
[]
arr
=
channelCodes
.
split
(
","
)
;
List
<
String
>
list
=
new
ArrayList
<>()
;
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
String
s
=
arr
[
i
]
;
if
(
StringUtils
.
isNotBlank
(
s
))
{
if
(
null
!=
map
.
get
(
s
))
{
list
.
add
(
map
.
get
(
s
))
;
}
}
}
return
list
.
stream
().
collect
(
Collectors
.
joining
(
","
));
}
}
/**
/**
* 排名
* 排名
*/
*/
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/clerktask/TaskPlanDetailVO.java
View file @
80dd72df
...
@@ -38,6 +38,10 @@ public class TaskPlanDetailVO implements Serializable {
...
@@ -38,6 +38,10 @@ public class TaskPlanDetailVO implements Serializable {
private
int
qwNotMemberFlag
;
private
int
qwNotMemberFlag
;
/** 1定额 2阶梯 3排名 */
/** 1定额 2阶梯 3排名 */
private
Integer
awardMode
;
private
Integer
awardMode
;
/**
* 渠道名称
*/
private
String
orderChannelNames
;
/**
/**
* 导购完成/奖品信息
* 导购完成/奖品信息
...
@@ -53,6 +57,14 @@ public class TaskPlanDetailVO implements Serializable {
...
@@ -53,6 +57,14 @@ public class TaskPlanDetailVO implements Serializable {
*/
*/
private
List
<
TaskPlanDetailAwardVO
>
awardList
;
private
List
<
TaskPlanDetailAwardVO
>
awardList
;
public
String
getOrderChannelNames
()
{
return
orderChannelNames
;
}
public
void
setOrderChannelNames
(
String
orderChannelNames
)
{
this
.
orderChannelNames
=
orderChannelNames
;
}
public
Long
getPlanId
()
{
public
Long
getPlanId
()
{
return
planId
;
return
planId
;
}
}
...
...
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