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
aa6b8ae3
Commit
aa6b8ae3
authored
Mar 11, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
75199c8d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
10 deletions
+49
-10
StaffDepartmentRelatedDTO.java
.../gic/haoban/manage/api/dto/StaffDepartmentRelatedDTO.java
+11
-0
StaffDepartmentRelatedMapper.java
...nage/service/dao/mapper/StaffDepartmentRelatedMapper.java
+2
-1
TabHaobanStaffDepartmentRelated.java
...anage/service/entity/TabHaobanStaffDepartmentRelated.java
+11
-0
StaffDepartmentRelatedService.java
...manage/service/service/StaffDepartmentRelatedService.java
+1
-1
StaffDepartmentRelatedServiceImpl.java
...rvice/service/impl/StaffDepartmentRelatedServiceImpl.java
+2
-2
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+6
-1
StaffDepartmentRelatedMapper.xml
...rc/main/resources/mapper/StaffDepartmentRelatedMapper.xml
+16
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffDepartmentRelatedDTO.java
View file @
aa6b8ae3
...
...
@@ -21,6 +21,8 @@ public class StaffDepartmentRelatedDTO implements Serializable {
private
Integer
statusFlag
;
private
String
clerkCode
;
private
String
staffName
;
private
Date
createTime
;
...
...
@@ -115,6 +117,14 @@ public class StaffDepartmentRelatedDTO implements Serializable {
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffDepartmentRelatedMapper.java
View file @
aa6b8ae3
...
...
@@ -40,6 +40,6 @@ public interface StaffDepartmentRelatedMapper {
TabHaobanStaffDepartmentRelated
getDepartmentIdAndCode
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"clerkCode"
)
String
code
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdBy
ClerkCode
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"keyword"
)
String
keyword
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdBy
Keyword
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"keyword"
)
String
keyword
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanStaffDepartmentRelated.java
View file @
aa6b8ae3
...
...
@@ -26,6 +26,8 @@ public class TabHaobanStaffDepartmentRelated implements Serializable {
private
Date
updateTime
;
private
String
staffName
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -117,6 +119,14 @@ public class TabHaobanStaffDepartmentRelated implements Serializable {
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffDepartmentRelatedService.java
View file @
aa6b8ae3
...
...
@@ -24,5 +24,5 @@ public interface StaffDepartmentRelatedService {
int
countByDepartmentId
(
String
departmentId
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdBy
ClerkCode
(
String
departmentId
,
String
keyword
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdBy
Keyword
(
String
departmentId
,
String
keyword
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffDepartmentRelatedServiceImpl.java
View file @
aa6b8ae3
...
...
@@ -76,8 +76,8 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated
}
@Override
public
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdBy
ClerkCode
(
String
departmentId
,
String
keyword
)
{
return
mapper
.
listByDepartmentIdBy
ClerkCode
(
departmentId
,
keyword
);
public
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdBy
Keyword
(
String
departmentId
,
String
keyword
)
{
return
mapper
.
listByDepartmentIdBy
Keyword
(
departmentId
,
keyword
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
aa6b8ae3
...
...
@@ -159,6 +159,7 @@ public class StaffApiServiceImpl implements StaffApiService {
related
.
setPhoneNumber
(
staff
.
getPhoneNumber
());
related
.
setStaffId
(
staffId
);
related
.
setWxUserId
(
wxUserId
);
related
.
setStaffName
(
staff
.
getStaffName
());
related
.
setWxEnterpriseId
(
staff
.
getWxEnterpriseId
());
staffDepartmentRelatedService
.
add
(
related
);
}
...
...
@@ -178,7 +179,7 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public
Page
<
StaffDTO
>
pageStaff
(
String
departmentId
,
Integer
activeFlag
,
String
keyword
,
BasePageInfo
pageInfo
)
{
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listByDepartmentId
(
departmentI
d
);
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listByDepartmentId
ByKeyword
(
departmentId
,
keywor
d
);
Set
<
String
>
staffIds
=
new
HashSet
<
String
>();
for
(
TabHaobanStaffDepartmentRelated
tabHaobanStaffDepartmentRelated
:
list
)
{
staffIds
.
add
(
tabHaobanStaffDepartmentRelated
.
getStaffId
());
...
...
@@ -318,6 +319,7 @@ public class StaffApiServiceImpl implements StaffApiService {
dto
.
setStatusFlag
(
1
);
dto
.
setDepartmentId
(
tabDepartment
.
getDepartmentId
());
dto
.
setNationCode
(
"86"
);
dto
.
setStaffName
(
user
.
getName
());
staffDepartmentRelatedService
.
add
(
dto
);
}
}
...
...
@@ -335,6 +337,7 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"【员工修改】staffDTO={}"
,
JSON
.
toJSONString
(
staffDTO
));
TabHaobanStaff
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaff
.
class
,
staffDTO
);
staffService
.
updateByPrimaryKey
(
tab
);
String
staffName
=
tab
.
getStaffName
();
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listStaffDepartmentByStaffId
(
staffDTO
.
getStaffId
());
Map
<
String
,
TabHaobanStaffDepartmentRelated
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
list
,
"departmentId"
);
...
...
@@ -356,6 +359,7 @@ public class StaffApiServiceImpl implements StaffApiService {
related
.
setUpdateTime
(
new
Date
());
related
.
setWxUserId
(
oldStaff
.
getWxUserId
());
related
.
setWxEnterpriseId
(
staffDTO
.
getWxEnterpriseId
());
related
.
setStaffName
(
staffName
);
staffDepartmentRelatedService
.
add
(
related
);
}
else
{
//该员工部门没做改变(只更新手机号即可)
...
...
@@ -364,6 +368,7 @@ public class StaffApiServiceImpl implements StaffApiService {
related
.
setPhoneNumber
(
staffDTO
.
getPhoneNumber
());
related
.
setNationCode
(
staffDTO
.
getNationCode
());
related
.
setUpdateTime
(
new
Date
());
related
.
setStaffName
(
staffName
);
staffDepartmentRelatedMapper
.
updateByPrimaryKeySelective
(
related
);
}
...
...
haoban-manage3-service/src/main/resources/mapper/StaffDepartmentRelatedMapper.xml
View file @
aa6b8ae3
...
...
@@ -11,12 +11,13 @@
<result
column=
"department_id"
property=
"departmentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"clerk_code"
property=
"clerkCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"staff_name"
property=
"staffName"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
staff_department_related_id, staff_id, phone_number, nation_code, wx_user_id, department_id,
status_flag, clerk_code, create_time, update_time,wx_enterprise_id
status_flag, clerk_code, create_time, update_time,wx_enterprise_id
,staff_name
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -32,11 +33,11 @@
insert into tab_haoban_staff_department_related (staff_department_related_id, staff_id,
phone_number, nation_code, wx_user_id,
department_id, status_flag, clerk_code,
create_time, update_time,wx_enterprise_id)
create_time, update_time,wx_enterprise_id
,staff_name
)
values (#{staffDepartmentRelatedId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{nationCode,jdbcType=VARCHAR}, #{wxUserId,jdbcType=VARCHAR},
#{departmentId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{clerkCode,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{wxEnterpriseId})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{wxEnterpriseId}
,#{staffName}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated"
>
insert into tab_haoban_staff_department_related
...
...
@@ -68,6 +69,9 @@
<if
test=
"clerkCode != null"
>
clerk_code,
</if>
<if
test=
"staffName != null"
>
staff_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -104,6 +108,9 @@
<if
test=
"clerkCode != null"
>
#{clerkCode,jdbcType=VARCHAR},
</if>
<if
test=
"staffName != null"
>
#{staffName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -139,6 +146,9 @@
<if
test=
"clerkCode != null"
>
clerk_code = #{clerkCode,jdbcType=VARCHAR},
</if>
<if
test=
"staffName != null"
>
staff_name = #{staffName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -240,7 +250,7 @@
and status_flag = 1
</select>
<select
id=
"listByDepartmentIdBy
ClerkCode
"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listByDepartmentIdBy
Keyword
"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_department_related
...
...
@@ -248,7 +258,7 @@
and department_id = #{departmentId}
and status_flag = 1
<if
test=
"keyword != null and keyword != ''"
>
and
clerk_code like CONCAT('%',#{keyword},'%'
)
and
(clerk_code like CONCAT('%',#{keyword},'%') or phone_number like CONCAT('%',#{keyword},'%') or staff_name like CONCAT('%',#{keyword},'%')
)
</if>
</select>
</mapper>
\ No newline at end of file
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