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
1
Merge Requests
1
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
b0999bb8
Commit
b0999bb8
authored
Feb 26, 2020
by
蘑菇
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
90f4ea0e
b767cdb3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
5 deletions
+20
-5
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+13
-2
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+3
-1
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-0
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+2
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
b0999bb8
...
...
@@ -235,10 +235,10 @@ public class MessageApiServiceImpl implements MessageApiService {
String
[]
arr
=
parentChain
.
split
(
"_"
);
int
len
=
arr
.
length
;
int
startIndex
=
len
-
2
;
if
(
dataType
==
GicDataType
.
STORE
.
getCode
()){
if
(
dataType
==
GicDataType
.
STORE
.
getCode
()
||
dataType
==
GicDataType
.
DEPARTMENT
.
getCode
()
){
startIndex
=
len
-
1
;
}
for
(
int
i
=
startIndex
;
i
<
len
;
i
--){
for
(
int
i
=
startIndex
;
i
>=
0
&&
i
<
len
;
i
--){
DepartmentDTO
department
=
this
.
departmentService
.
getByRelatedId
(
arr
[
i
]);
if
(
department
!=
null
){
return
department
;
...
...
@@ -248,4 +248,15 @@ public class MessageApiServiceImpl implements MessageApiService {
DepartmentDTO
departmentDTO
=
this
.
departmentService
.
getRootByEnterpriseId
(
wxEnterpriseId
);
return
departmentDTO
;
}
public
static
void
main
(
String
[]
args
){
String
parentChain
=
"1_"
;
String
[]
arr
=
parentChain
.
split
(
"_"
);
int
len
=
arr
.
length
;
int
startIndex
=
len
-
1
;
System
.
out
.
println
(
len
);
for
(
int
i
=
startIndex
;
i
>=
0
&&
i
<
len
;
i
--){
System
.
out
.
println
(
i
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
b0999bb8
...
...
@@ -277,6 +277,7 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
)
{
TabHaobanStaff
oldStaff
=
staffMapper
.
selectByPrimaryKey
(
staffDTO
.
getStaffId
());
logger
.
info
(
"【员工修改】oldStaff={}"
,
JSON
.
toJSONString
(
oldStaff
));
//1、先更新staff
TabHaobanStaff
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaff
.
class
,
staffDTO
);
staffService
.
updateByPrimaryKey
(
tab
);
...
...
@@ -313,7 +314,8 @@ public class StaffApiServiceImpl implements StaffApiService {
}
logger
.
info
(
"【员工修改】related={}"
,
JSON
.
toJSONString
(
related
));
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNoneBlank
(
related
.
getClerkCode
())){
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
related
.
getClerkCode
())){
logger
.
info
(
"【员工修改】oldName={},name={}"
,
oldStaff
.
getStaffName
(),
staffDTO
.
getStaffName
());
if
(!
staffDTO
.
getPhoneNumber
().
equals
(
related
.
getPhoneNumber
())||!
staffDTO
.
getStaffName
().
equals
(
oldStaff
.
getStaffName
())){
TabHaobanDepartment
department
=
departmentService
.
selectById
(
addId
);
String
enterpriseId
=
""
;
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
b0999bb8
...
...
@@ -41,6 +41,7 @@
<dubbo:reference
interface=
"com.gic.member.api.service.MemberService"
id=
"memberService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreService"
id=
"storeService"
/>
</beans>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
b0999bb8
...
...
@@ -69,10 +69,10 @@ public class DepartmentContoller extends WebBaseController{
}
List
<
DepartmentDTO
>
result
=
page
.
getResult
();
for
(
DepartmentDTO
departmentDTO
:
result
)
{
String
chainId
=
departmentDTO
.
getChainId
();
String
chainId
=
departmentDTO
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentDTO
.
getDepartmentId
()
;
List
<
DepartmentDTO
>
sonList
=
departmentApiService
.
listByChainId
(
chainId
,
wxEnterpriseId
);
int
staffCount
=
0
;
for
(
DepartmentDTO
departmentDTO2
:
resul
t
)
{
for
(
DepartmentDTO
departmentDTO2
:
sonLis
t
)
{
staffCount
+=
staffApiService
.
countByDepartmentId
(
departmentDTO2
.
getDepartmentId
());
}
departmentDTO
.
setStaffCount
(
staffCount
);
...
...
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