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
79b98a8b
Commit
79b98a8b
authored
Feb 06, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0.git
into developer
parents
df7c11a9
ac345f2e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
13 deletions
+71
-13
TransferActiveCodeDTO.java
.../com/gic/haoban/manage/api/dto/TransferActiveCodeDTO.java
+1
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+4
-2
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+2
-1
TargetController.java
...haoban/manage/web/controller/target/TargetController.java
+64
-9
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/TransferActiveCodeDTO.java
View file @
79b98a8b
...
@@ -72,7 +72,7 @@ public class TransferActiveCodeDTO implements Serializable {
...
@@ -72,7 +72,7 @@ public class TransferActiveCodeDTO implements Serializable {
log
.
append
(
"失败明细:"
);
log
.
append
(
"失败明细:"
);
for
(
int
i
=
1
;
i
<=
this
.
failedList
.
size
();
i
++){
for
(
int
i
=
1
;
i
<=
this
.
failedList
.
size
();
i
++){
Map
<
String
,
String
>
stringMap
=
this
.
failedList
.
get
(
i
-
1
);
Map
<
String
,
String
>
stringMap
=
this
.
failedList
.
get
(
i
-
1
);
log
.
append
(
i
+
".(转移成员:"
+
stringMap
.
get
(
"handoverStaffName"
)+
",接收成员:"
+
stringMap
.
get
(
"takeoverStaffName"
)+
");"
);
log
.
append
(
i
+
".(转移成员:"
+
stringMap
.
get
(
"handoverStaffName"
)+
",接收成员:"
+
stringMap
.
get
(
"takeoverStaffName"
)+
"
,errorCode:"
+
stringMap
.
get
(
"errorCode"
)+
"
);"
);
}
}
//去掉末尾的分号
//去掉末尾的分号
String
substring
=
log
.
substring
(
0
,
log
.
toString
().
length
()
-
1
);
String
substring
=
log
.
substring
(
0
,
log
.
toString
().
length
()
-
1
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
79b98a8b
...
@@ -976,7 +976,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -976,7 +976,7 @@ public class StaffApiServiceImpl implements StaffApiService {
List
<
AccountTransferUserDTO
>
resultList
=
listServiceResponse
.
getResult
();
List
<
AccountTransferUserDTO
>
resultList
=
listServiceResponse
.
getResult
();
result
.
setTotalNum
(
resultList
.
size
());
result
.
setTotalNum
(
resultList
.
size
());
for
(
AccountTransferUserDTO
dto
:
resultList
)
{
for
(
AccountTransferUserDTO
dto
:
resultList
)
{
if
(
Constant
.
SUCCESS
.
equals
(
dto
.
getErrcode
()
)){
if
(
0
==
dto
.
getErrcode
(
)){
//企微转移成功,好办staff表对应更新
//企微转移成功,好办staff表对应更新
successNum
++;
successNum
++;
TabHaobanStaff
handoverStaff
=
collect
.
get
(
map
.
get
(
dto
.
getHandover_userid
()));
TabHaobanStaff
handoverStaff
=
collect
.
get
(
map
.
get
(
dto
.
getHandover_userid
()));
...
@@ -984,7 +984,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -984,7 +984,7 @@ public class StaffApiServiceImpl implements StaffApiService {
//置空转移成员的许可信息
//置空转移成员的许可信息
staffMapper
.
updateStaffInfoByStaffId
(
handoverStaff
.
getStaffId
(),
null
,
null
,
null
,
0
);
staffMapper
.
updateStaffInfoByStaffId
(
handoverStaff
.
getStaffId
(),
null
,
null
,
null
,
0
);
//更新接收成员的许可信息
//更新接收成员的许可信息
staffMapper
.
updateStaffInfoByStaffId
(
takeOverStaff
.
getStaffId
(),
takeOverStaff
.
getActiveTime
(),
takeOverStaff
.
getExpireTime
(),
takeO
verStaff
.
getActiveCode
(),
1
);
staffMapper
.
updateStaffInfoByStaffId
(
takeOverStaff
.
getStaffId
(),
handoverStaff
.
getActiveTime
(),
handoverStaff
.
getExpireTime
(),
hando
verStaff
.
getActiveCode
(),
1
);
}
else
{
}
else
{
//企微转移失败,记录失败明细
//企微转移失败,记录失败明细
...
@@ -994,6 +994,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -994,6 +994,7 @@ public class StaffApiServiceImpl implements StaffApiService {
Map
<
String
,
String
>
stringMap
=
new
HashMap
<>(
8
);
Map
<
String
,
String
>
stringMap
=
new
HashMap
<>(
8
);
stringMap
.
put
(
"handoverStaffName"
,
handoverStaff
.
getStaffName
());
stringMap
.
put
(
"handoverStaffName"
,
handoverStaff
.
getStaffName
());
stringMap
.
put
(
"takeoverStaffName"
,
takeOverStaff
.
getStaffName
());
stringMap
.
put
(
"takeoverStaffName"
,
takeOverStaff
.
getStaffName
());
stringMap
.
put
(
"errorCode"
,
String
.
valueOf
(
dto
.
getErrcode
()));
failedList
.
add
(
stringMap
);
failedList
.
add
(
stringMap
);
}
}
}
}
...
@@ -1012,6 +1013,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -1012,6 +1013,7 @@ public class StaffApiServiceImpl implements StaffApiService {
Map
<
String
,
String
>
stringMap
=
new
HashMap
<>(
8
);
Map
<
String
,
String
>
stringMap
=
new
HashMap
<>(
8
);
stringMap
.
put
(
"handoverStaffName"
,
handoverStaff
.
getStaffName
());
stringMap
.
put
(
"handoverStaffName"
,
handoverStaff
.
getStaffName
());
stringMap
.
put
(
"takeoverStaffName"
,
takeOverStaff
.
getStaffName
());
stringMap
.
put
(
"takeoverStaffName"
,
takeOverStaff
.
getStaffName
());
stringMap
.
put
(
"errorCode"
,
listServiceResponse
.
getCode
());
failedList
.
add
(
stringMap
);
failedList
.
add
(
stringMap
);
});
});
result
.
setFailedList
(
failedList
);
result
.
setFailedList
(
failedList
);
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
79b98a8b
...
@@ -632,7 +632,7 @@
...
@@ -632,7 +632,7 @@
expire_time = #{expireTime},
expire_time = #{expireTime},
active_code = #{activeCode},
active_code = #{activeCode},
active_status = #{activeStatus}
active_status = #{activeStatus}
where
wx_open_user_id
= #{staffId}
where
staff_id
= #{staffId}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/target/TargetController.java
View file @
79b98a8b
...
@@ -50,7 +50,7 @@ public class TargetController {
...
@@ -50,7 +50,7 @@ public class TargetController {
@RequestMapping
(
value
=
"valid-target-store"
)
@RequestMapping
(
value
=
"valid-target-store"
)
@ResponseBody
@ResponseBody
public
RestResponse
<
Integer
>
validTargetStore
(
QueryDataStatisticsCommonQO
qo
)
{
public
RestResponse
<
Integer
>
validTargetStore
(
QueryDataStatisticsCommonQO
qo
)
{
List
<
String
>
storeIdList
=
getStoreIdList
(
qo
);
List
<
String
>
storeIdList
=
getStoreIdList
(
qo
,
false
);
QueryNewDataTargetConfigQDTO
param
=
new
QueryNewDataTargetConfigQDTO
();
QueryNewDataTargetConfigQDTO
param
=
new
QueryNewDataTargetConfigQDTO
();
param
.
setStoreIdList
(
storeIdList
);
param
.
setStoreIdList
(
storeIdList
);
param
.
setEnterpriseId
(
qo
.
getEnterpriseId
());
param
.
setEnterpriseId
(
qo
.
getEnterpriseId
());
...
@@ -232,23 +232,78 @@ public class TargetController {
...
@@ -232,23 +232,78 @@ public class TargetController {
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"entId"
,
qo
.
getEnterpriseId
());
jsonObject
.
put
(
"entId"
,
qo
.
getEnterpriseId
());
jsonObject
.
put
(
"enterpriseId"
,
qo
.
getEnterpriseId
());
jsonObject
.
put
(
"enterpriseId"
,
qo
.
getEnterpriseId
());
jsonObject
.
put
(
"year"
,
qo
.
getTime
());
jsonObject
.
put
(
"yearDate"
,
qo
.
getTime
());
jsonObject
.
put
(
"yearDate"
,
qo
.
getTime
());
if
(
qo
.
getTimeType
()
==
1
)
{
jsonObject
.
put
(
"month"
,
qo
.
getTime
());
jsonObject
.
put
(
"year"
,
qo
.
getTime
());
}
else
{
jsonObject
.
put
(
"month"
,
qo
.
getTime
());
}
jsonObject
.
put
(
"monthDate"
,
qo
.
getTime
());
jsonObject
.
put
(
"monthDate"
,
qo
.
getTime
());
jsonObject
.
put
(
"storeId"
,
getStoreIdList
(
qo
).
stream
().
collect
(
Collectors
.
joining
(
","
)));
jsonObject
.
put
(
"storeId"
,
getStoreIdList
(
qo
,
true
).
stream
().
collect
(
Collectors
.
joining
(
","
)));
return
jsonObject
;
return
jsonObject
;
}
}
private
List
<
String
>
getStoreIdList
(
QueryDataStatisticsCommonQO
qo
)
{
private
List
<
String
>
getStoreIdList
(
QueryDataStatisticsCommonQO
qo
,
boolean
isRelease
)
{
List
<
String
>
storeIdList
;
if
(
StringUtils
.
isBlank
(
qo
.
getStoreId
()))
{
if
(
StringUtils
.
isBlank
(
qo
.
getStoreId
()))
{
List
<
String
>
storeIdList
=
storeAuthUtils
.
queryClerkStoreIds
(
qo
.
getClerkId
(),
qo
.
getWxEnterpriseId
());
storeIdList
=
storeAuthUtils
.
queryClerkStoreIds
(
qo
.
getClerkId
(),
qo
.
getWxEnterpriseId
());
return
storeIdList
;
}
else
{
}
else
{
List
<
String
>
storeIdList
=
new
ArrayList
<>();
storeIdList
=
new
ArrayList
<>();
storeIdList
.
add
(
qo
.
getStoreId
());
storeIdList
.
add
(
qo
.
getStoreId
());
}
if
(!
isRelease
)
{
return
storeIdList
;
return
storeIdList
;
}
}
List
<
String
>
targetStoreIdList
=
getReleaseStore
(
qo
,
1
);
//交集 (已发布的门店数据统计过滤)
if
(
CollectionUtils
.
isEmpty
(
targetStoreIdList
))
{
targetStoreIdList
=
new
ArrayList
<>();
targetStoreIdList
.
add
(
"-123456789"
);
}
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
//全部权限,则给出发布门店数据
return
targetStoreIdList
;
}
else
{
storeIdList
.
retainAll
(
targetStoreIdList
);
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
storeIdList
.
add
(
"-1234567890"
);
}
}
return
storeIdList
;
}
public
List
<
String
>
getReleaseStore
(
QueryDataStatisticsCommonQO
params
,
Integer
releaseFlag
)
{
List
<
String
>
storeIdList
=
new
ArrayList
<>();
QueryNewDataTargetConfigQDTO
qdto
=
new
QueryNewDataTargetConfigQDTO
();
qdto
.
setEnterpriseId
(
params
.
getEnterpriseId
());
if
(
StringUtils
.
isNotBlank
(
params
.
getTime
()))
{
qdto
.
setTargetYear
(
params
.
getTime
().
substring
(
0
,
4
));
}
qdto
.
setReleaseFlag
(
releaseFlag
);
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageSize
(
1000
);
ServiceResponse
<
Page
<
NewDataTargetConfigDTO
>>
res
=
newDataTargetConfigApiService
.
queryNewDataTargetConfig
(
qdto
,
basePageInfo
);
Page
<
NewDataTargetConfigDTO
>
page
=
res
.
getResult
();
Integer
total
=
page
.
getTotalCount
();
if
(
total
<=
0
)
{
return
null
;
}
List
<
NewDataTargetConfigDTO
>
list
=
page
.
getResult
();
for
(
NewDataTargetConfigDTO
dto
:
list
)
{
storeIdList
.
add
(
dto
.
getStoreId
());
}
int
pageNum
=
total
/
1000
+
1
;
if
(
pageNum
>
1
)
{
for
(
int
i
=
2
;
i
<
pageNum
;
i
++)
{
basePageInfo
.
setPageNum
(
i
);
res
=
newDataTargetConfigApiService
.
queryNewDataTargetConfig
(
qdto
,
basePageInfo
);
List
<
NewDataTargetConfigDTO
>
temp
=
res
.
getResult
().
getResult
();
for
(
NewDataTargetConfigDTO
dto
:
temp
)
{
storeIdList
.
add
(
dto
.
getStoreId
());
}
}
}
return
storeIdList
;
}
}
}
}
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