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
be13e8c5
Commit
be13e8c5
authored
Mar 17, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:删除无效代码
parent
39bb6ca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
80 deletions
+1
-80
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+1
-3
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+0
-77
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
be13e8c5
...
...
@@ -261,13 +261,11 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
}
//先处理修改的
editList
.
forEach
(
syncSingleDealDTO
->
{
// TODO: 2020/4/9 需要优化
TabHaobanDepartment
department
=
departmentService
.
selectById
(
syncSingleDealDTO
.
getDepartmentId
());
if
(!
department
.
getParentDepartmentId
().
equals
(
syncSingleDealDTO
.
getParentDepartmentId
()))
{
department
.
setParentDepartmentId
(
syncSingleDealDTO
.
getParentDepartmentId
());
department
Api
Service
.
edit
(
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
department
));
departmentService
.
edit
(
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
department
));
}
});
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
be13e8c5
...
...
@@ -281,44 +281,7 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public
void
del
(
String
staffDepartmentStaffRelatedId
)
{
StaffDepartmentRelatedDTO
related
=
staffDepartmentRelatedService
.
getById
(
staffDepartmentStaffRelatedId
);
if
(
related
!=
null
)
{
List
<
TabHaobanStaffDepartmentRelated
>
relatedList
=
staffDepartmentRelatedService
.
listStaffDepartmentByStaffId
(
related
.
getStaffId
());
if
(
relatedList
==
null
||
relatedList
.
isEmpty
())
{
return
;
}
//只在当前门店
if
(
relatedList
.
size
()
==
1
)
{
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
if
(
enterpriseDTO
!=
null
)
{
ServiceResponse
delQywxStaff
=
delQywxStaff
(
staff
,
enterpriseDTO
);
logger
.
info
(
"【删除成员】{} ,jp={}"
,
staffDepartmentStaffRelatedId
,
JSON
.
toJSONString
(
delQywxStaff
));
if
(
delQywxStaff
.
getCode
()
!=
1
)
{
throw
new
RuntimeException
(
"企业微信删除失败"
);
}
}
staffDepartmentRelatedService
.
del
(
related
);
TabHaobanStaffDepartmentRelated
staffRelated
=
relatedList
.
get
(
0
);
if
(
StringUtils
.
isNotBlank
(
staffRelated
.
getClerkCode
()))
{
cleanGicClerk
(
staffRelated
.
getClerkCode
(),
related
.
getDepartmentId
());
}
//走修改流程
}
else
{
String
departmentIds
=
""
;
for
(
TabHaobanStaffDepartmentRelated
tabHaobanStaffDepartmentRelated
:
relatedList
)
{
if
(!
staffDepartmentStaffRelatedId
.
equals
(
tabHaobanStaffDepartmentRelated
.
getStaffDepartmentRelatedId
()))
{
departmentIds
+=
tabHaobanStaffDepartmentRelated
.
getDepartmentId
()
+
","
;
}
}
if
(
StringUtils
.
isNotBlank
(
departmentIds
))
{
departmentIds
=
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
);
}
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
staffEdit
(
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
),
departmentIds
);
}
}
}
@Override
...
...
@@ -1139,46 +1102,6 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
/**
* 删除企业微信
*
* @param staff
* @return
*/
private
ServiceResponse
delQywxStaff
(
TabHaobanStaff
staff
,
WxEnterpriseDTO
enterpriseDTO
)
{
ServiceResponse
ret
=
new
ServiceResponse
();
DepartmentDTO
tempFlagDepartment
=
departmentService
.
getTempFlagDepartment
(
enterpriseDTO
.
getWxEnterpriseId
());
if
(
null
==
tempFlagDepartment
)
{
DepartmentDTO
parentDepert
=
departmentService
.
getRootByEnterpriseId
(
enterpriseDTO
.
getWxEnterpriseId
());
tempFlagDepartment
=
new
DepartmentDTO
();
tempFlagDepartment
.
setTempFlag
(
1
);
tempFlagDepartment
.
setDepartmentName
(
"暂存部门"
);
tempFlagDepartment
.
setWxEnterpriseId
(
enterpriseDTO
.
getWxEnterpriseId
());
tempFlagDepartment
.
setHasSonNode
(
false
);
tempFlagDepartment
.
setIsStore
(
0
);
tempFlagDepartment
.
setParentDepartmentId
(
parentDepert
.
getDepartmentId
());
ServiceResponse
<
DepartmentDTO
>
response
=
departmentApiService
.
add
(
tempFlagDepartment
);
if
(
response
.
getCode
()
!=
1
)
{
ret
.
setCode
(
0
);
ret
.
setMessage
(
"暂存部门创建失败"
);
return
ret
;
}
tempFlagDepartment
=
response
.
getResult
();
}
try
{
staffEdit
(
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
),
tempFlagDepartment
.
getDepartmentId
());
}
catch
(
RuntimeException
ex
)
{
ret
.
setCode
(
0
);
ret
.
setMessage
(
ex
.
getMessage
());
}
catch
(
Exception
e
)
{
ret
.
setCode
(
0
);
ret
.
setMessage
(
"新增异常"
);
}
finally
{
return
ret
;
}
}
@Override
public
ServiceResponse
<
String
>
getStaffQrcode
(
String
clerkCode
,
String
storeId
)
{
ServiceResponse
<
String
>
resp
=
new
ServiceResponse
<>();
...
...
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