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
a5eb960a
Commit
a5eb960a
authored
Mar 03, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f191f456
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
16 deletions
+28
-16
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+2
-0
StaffDepartmentRelatedMapper.java
...nage/service/dao/mapper/StaffDepartmentRelatedMapper.java
+3
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+9
-14
StaffDepartmentRelatedMapper.xml
...rc/main/resources/mapper/StaffDepartmentRelatedMapper.xml
+10
-0
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+4
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
a5eb960a
...
...
@@ -41,4 +41,6 @@ public interface StaffApiService {
public
void
syncGicClerk
(
String
fieldListString
);
StaffDepartmentRelatedDTO
getDepartmentIdAndCode
(
String
departmentId
,
String
code
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffDepartmentRelatedMapper.java
View file @
a5eb960a
...
...
@@ -38,4 +38,6 @@ public interface StaffDepartmentRelatedMapper {
int
countByDepartmentId
(
@Param
(
"departmentId"
)
String
departmentId
);
TabHaobanStaffDepartmentRelated
getDepartmentIdAndCode
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"clerkCode"
)
String
code
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
a5eb960a
...
...
@@ -422,9 +422,7 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
fieldList
.
isEmpty
()){
return
;
}
String
gicEnterpriseId
=
""
;
String
gicStoreId
=
""
;
String
gicClerkId
=
""
;
String
code
=
""
;
String
staffName
=
""
;
String
phoneNumber
=
""
;
...
...
@@ -438,16 +436,6 @@ public class StaffApiServiceImpl implements StaffApiService {
String
name
=
StringUtil
.
camelName
(
syncJsonColumnDTO
.
getName
());
String
value
=
syncJsonColumnDTO
.
getValue
();
if
(
"clerkId"
.
equals
(
name
)){
gicClerkId
=
value
;
continue
;
}
if
(
"enterpriseId"
.
equals
(
name
)){
gicEnterpriseId
=
value
;
continue
;
}
if
(
"storeId"
.
equals
(
name
)){
gicStoreId
=
value
;
if
(
StringUtils
.
isBlank
(
gicStoreId
)){
...
...
@@ -535,7 +523,8 @@ public class StaffApiServiceImpl implements StaffApiService {
HaobanResponse
hr
=
this
.
add
(
staff
,
department
.
getDepartmentId
());
if
(
hr
.
getErrorCode
()
==
1
){
StaffDepartmentRelatedDTO
staffRelated
=
this
.
getDepartmentIdAndStaffId
(
departmentId
,
hr
.
getResult
().
toString
());
if
(
staffRelated
!=
null
){
StaffDepartmentRelatedDTO
isCodeExist
=
this
.
getDepartmentIdAndCode
(
departmentId
,
code
);
if
(
staffRelated
!=
null
&&
isCodeExist
==
null
){
staffRelated
.
setClerkCode
(
code
);
staffDepartmentRelatedMapper
.
updateByPrimaryKey
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffDepartmentRelated
.
class
,
staffRelated
));
}
...
...
@@ -569,8 +558,9 @@ public class StaffApiServiceImpl implements StaffApiService {
this
.
staffEdit
(
staff
,
departmentIds
);
}
StaffDepartmentRelatedDTO
staffRelated
=
this
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
StaffDepartmentRelatedDTO
isCodeExist
=
this
.
getDepartmentIdAndCode
(
departmentId
,
code
);
//如果这个人是未绑定的 则绑定clerk
if
(
StringUtils
.
isBlank
(
staffRelated
.
getClerkCode
())){
if
(
StringUtils
.
isBlank
(
staffRelated
.
getClerkCode
())
&&
isCodeExist
==
null
){
staffRelated
.
setClerkCode
(
code
);
staffDepartmentRelatedMapper
.
updateByPrimaryKey
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffDepartmentRelated
.
class
,
staffRelated
));
}
...
...
@@ -580,4 +570,9 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
public
StaffDepartmentRelatedDTO
getDepartmentIdAndCode
(
String
departmentId
,
String
code
)
{
return
EntityUtil
.
changeEntityByJSON
(
StaffDepartmentRelatedDTO
.
class
,
staffDepartmentRelatedMapper
.
getDepartmentIdAndCode
(
departmentId
,
code
));
}
}
haoban-manage3-service/src/main/resources/mapper/StaffDepartmentRelatedMapper.xml
View file @
a5eb960a
...
...
@@ -229,4 +229,13 @@
where department_id = #{departmentId,jdbcType=VARCHAR}
and status_flag = 1
</select>
<select
id=
"getDepartmentIdAndCode"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_department_related
where clerk_code = #{clerkCode,jdbcType=VARCHAR}
and department_id = #{departmentId}
and status_flag = 1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
a5eb960a
...
...
@@ -540,7 +540,8 @@ public class DepartmentContoller extends WebBaseController{
HaobanResponse
hr
=
staffApiService
.
add
(
staff
,
departmentId
);
if
(
hr
.
getErrorCode
()
==
1
){
StaffDepartmentRelatedDTO
staffRelated
=
staffApiService
.
getDepartmentIdAndStaffId
(
departmentId
,
hr
.
getResult
().
toString
());
if
(
staffRelated
!=
null
){
StaffDepartmentRelatedDTO
isCodeExist
=
staffApiService
.
getDepartmentIdAndCode
(
departmentId
,
clerkCode
);
if
(
staffRelated
!=
null
&&
isCodeExist
==
null
){
staffRelated
.
setClerkCode
(
clerkCode
);
staffDepartmentRelatedApiService
.
updateById
(
staffRelated
);
}
...
...
@@ -558,7 +559,8 @@ public class DepartmentContoller extends WebBaseController{
}
StaffDepartmentRelatedDTO
staffRelated
=
staffApiService
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
//如果这个人是未绑定的 则绑定clerk
if
(
StringUtils
.
isBlank
(
staffRelated
.
getClerkCode
())){
StaffDepartmentRelatedDTO
isCodeExist
=
staffApiService
.
getDepartmentIdAndCode
(
departmentId
,
clerkCode
);
if
(
StringUtils
.
isBlank
(
staffRelated
.
getClerkCode
())
&&
isCodeExist
==
null
){
staffRelated
.
setClerkCode
(
clerkCode
);
staffDepartmentRelatedApiService
.
updateById
(
staffRelated
);
}
...
...
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