Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
huatu_API
Project
Project
Details
Activity
Releases
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
liudong1993
huatu_API
Commits
9e1e83a4
Commit
9e1e83a4
authored
Aug 25, 2025
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e6735709
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
8 deletions
+69
-8
RB_Employee.cs
REBORN.Model/Entity/User/RB_Employee.cs
+5
-0
BranchModule.cs
REBORN.Module.PlatformModule/BranchModule.cs
+2
-2
EmployeeModule.cs
REBORN.Module.UserModule/EmployeeModule.cs
+24
-0
Rb_employeeRepository.cs
REBORN.Repository/User/Rb_employeeRepository.cs
+5
-2
FinancialService.cs
REBORN.Services.FinanceService/FinancialService.cs
+1
-1
BranchService.cs
REBORN.Services.PlatformService/BranchService.cs
+2
-1
EmployeeService.cs
REBORN.Services.UserService/EmployeeService.cs
+24
-2
adminsetting.json
REBORN.WebApi/AppStting/adminsetting.json
+6
-0
No files found.
REBORN.Model/Entity/User/RB_Employee.cs
View file @
9e1e83a4
...
@@ -333,5 +333,10 @@ namespace REBORN.Model.Entity
...
@@ -333,5 +333,10 @@ namespace REBORN.Model.Entity
/// 企业码生成的员工ID(支付宝员工id)
/// 企业码生成的员工ID(支付宝员工id)
/// </summary>
/// </summary>
public
string
AlipayId
{
get
;
set
;
}
public
string
AlipayId
{
get
;
set
;
}
/// <summary>
/// 是否集团共享账号 1是 (用于不同公司下拉 普通人员均可显示此账号)
/// </summary>
public
int
IsGroupShow
{
get
;
set
;
}
}
}
}
}
REBORN.Module.PlatformModule/BranchModule.cs
View file @
9e1e83a4
...
@@ -431,9 +431,9 @@ namespace REBORN.Module.PlatformModule
...
@@ -431,9 +431,9 @@ namespace REBORN.Module.PlatformModule
/// </summary>
/// </summary>
/// <param name="EmName"></param>
/// <param name="EmName"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Employee_Extend
>
GetEmpAndImByEmpName
(
string
EmName
,
int
RB_Group_id
,
int
EmpId
)
public
List
<
RB_Employee_Extend
>
GetEmpAndImByEmpName
(
string
EmName
,
int
RB_Group_id
,
int
EmpId
,
int
branchId
)
{
{
return
new
Rb_employeeRepository
().
GetEmpAndImByEmpName
(
EmName
,
RB_Group_id
,
Emp
Id
);
return
new
Rb_employeeRepository
().
GetEmpAndImByEmpName
(
EmName
,
RB_Group_id
,
EmpId
,
branch
Id
);
}
}
...
...
REBORN.Module.UserModule/EmployeeModule.cs
View file @
9e1e83a4
...
@@ -432,6 +432,30 @@ namespace REBORN.Module.UserModule
...
@@ -432,6 +432,30 @@ namespace REBORN.Module.UserModule
return
repository
.
UpdateBatch
(
query
);
return
repository
.
UpdateBatch
(
query
);
}
}
/// <summary>
/// 设置账号集团里显示
/// </summary>
/// <param name="id"></param>
/// <param name="rB_Group_id"></param>
/// <returns></returns>
public
string
SetEmployeeGroupShow
(
int
id
,
int
rB_Group_id
)
{
var
emodel
=
repository
.
GetEntity
(
id
);
if
(
emodel
.
RB_Group_id
!=
rB_Group_id
)
{
return
"账号有误"
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Employee
.
IsGroupShow
),
emodel
.
IsGroupShow
==
1
?
0
:
1
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Employee
.
EmployeeId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
repository
.
Update
(
keyValues
,
wheres
);
return
flag
?
""
:
"出错了,请联系管理员"
;
}
/// <summary>
/// <summary>
/// 修改员工密码或离职时间
/// 修改员工密码或离职时间
/// </summary>
/// </summary>
...
...
REBORN.Repository/User/Rb_employeeRepository.cs
View file @
9e1e83a4
...
@@ -897,7 +897,7 @@ where a.RB_Group_id={groupId} and ((b.DepartmentName like'%地接部%' or b.Depa
...
@@ -897,7 +897,7 @@ where a.RB_Group_id={groupId} and ((b.DepartmentName like'%地接部%' or b.Depa
/// <param name="RB_Group_id"></param>
/// <param name="RB_Group_id"></param>
/// <param name="EmpId"></param>
/// <param name="EmpId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Employee_Extend
>
GetEmpAndImByEmpName
(
string
EmName
,
int
RB_Group_id
,
int
EmpId
)
public
List
<
RB_Employee_Extend
>
GetEmpAndImByEmpName
(
string
EmName
,
int
RB_Group_id
,
int
EmpId
,
int
branchId
)
{
{
EmName
=
EmName
.
Replace
(
"'"
,
""
);
EmName
=
EmName
.
Replace
(
"'"
,
""
);
string
sql
=
$@"SELECT e.*,m.OpenAccount,d.DepartmentName,p.PostName,b.BName as CompanyName from rb_employee e
string
sql
=
$@"SELECT e.*,m.OpenAccount,d.DepartmentName,p.PostName,b.BName as CompanyName from rb_employee e
...
@@ -905,11 +905,14 @@ where a.RB_Group_id={groupId} and ((b.DepartmentName like'%地接部%' or b.Depa
...
@@ -905,11 +905,14 @@ where a.RB_Group_id={groupId} and ((b.DepartmentName like'%地接部%' or b.Depa
left join rb_department d on e.RB_Department_Id=d.DepartmentID
left join rb_department d on e.RB_Department_Id=d.DepartmentID
left join rb_post p on e.RB_Post_Id=p.PostId
left join rb_post p on e.RB_Post_Id=p.PostId
left join rb_branch b on e.RB_Branch_id=b.Id
left join rb_branch b on e.RB_Branch_id=b.Id
where e.EmName like '%
{
EmName
}
%' and e.RB_Group_id=
{
RB_Group_id
}
and e.IsLeave = 0"
;
where e.EmName like '%
{
EmName
}
%' and e.RB_Group_id=
{
RB_Group_id
}
and e.IsLeave = 0
"
;
if
(
EmpId
!=
0
)
if
(
EmpId
!=
0
)
{
{
sql
=
$"
{
sql
}
and e.EmployeeId=
{
EmpId
}
"
;
sql
=
$"
{
sql
}
and e.EmployeeId=
{
EmpId
}
"
;
}
}
if
(
branchId
>=
0
)
{
sql
+=
$" and (e.RB_Branch_id=
{
branchId
}
or e.IsGroupShow=1)"
;
}
return
Get
<
RB_Employee_Extend
>(
sql
).
ToList
();
return
Get
<
RB_Employee_Extend
>(
sql
).
ToList
();
}
}
...
...
REBORN.Services.FinanceService/FinancialService.cs
View file @
9e1e83a4
...
@@ -2277,7 +2277,7 @@ namespace REBORN.Services.FinanceService
...
@@ -2277,7 +2277,7 @@ namespace REBORN.Services.FinanceService
List
<
RB_ClientBankAccount
>
KingdeeClientBankAccountList
=
new
List
<
RB_ClientBankAccount
>();
List
<
RB_ClientBankAccount
>
KingdeeClientBankAccountList
=
new
List
<
RB_ClientBankAccount
>();
if
(
ID
==
0
)
if
(
ID
==
0
)
{
{
model
.
RB_GroupName
=
new
CacheManager
.
User
.
RbBranchMongoCache
().
GetBranch
(
model
.
RB_Branch_Id
.
Value
)?.
FinanceTitle
??
""
;
//集团使用配置的
model
.
RB_GroupName
=
new
CacheManager
.
User
.
RbBranchMongoCache
().
GetBranch
(
userInfo
.
RB_Branch_id
)?.
FinanceTitle
??
""
;
//集团使用配置的
if
(
string
.
IsNullOrEmpty
(
model
.
RB_GroupName
))
{
model
.
RB_GroupName
=
userInfo
.
GroupName
;
}
if
(
string
.
IsNullOrEmpty
(
model
.
RB_GroupName
))
{
model
.
RB_GroupName
=
userInfo
.
GroupName
;
}
obj
=
new
obj
=
new
{
{
...
...
REBORN.Services.PlatformService/BranchService.cs
View file @
9e1e83a4
...
@@ -256,11 +256,12 @@ namespace REBORN.Services.PlatformService
...
@@ -256,11 +256,12 @@ namespace REBORN.Services.PlatformService
JObject
parm
=
JObject
.
Parse
(
request
.
msg
.
ToString
());
JObject
parm
=
JObject
.
Parse
(
request
.
msg
.
ToString
());
string
EmNmae
=
parm
.
GetStringValue
(
"EmName"
);
string
EmNmae
=
parm
.
GetStringValue
(
"EmName"
);
int
EmpId
=
parm
.
GetInt
(
"EmpId"
,
0
);
int
EmpId
=
parm
.
GetInt
(
"EmpId"
,
0
);
int
BranchId
=
parm
.
GetInt
(
"BranchId"
,
-
1
);
if
(
string
.
IsNullOrWhiteSpace
(
EmNmae
))
if
(
string
.
IsNullOrWhiteSpace
(
EmNmae
))
{
{
return
ApiResult
.
Failed
(
"参数不能为空!"
);
return
ApiResult
.
Failed
(
"参数不能为空!"
);
}
}
var
EmList
=
branchmodule
.
GetEmpAndImByEmpName
(
EmNmae
,
userInfo
.
RB_Group_id
,
EmpId
).
Select
(
t
=>
new
{
name
=
t
.
EmName
,
empId
=
t
.
EmployeeId
,
icon
=
Config
.
GetFileUrl
(
t
.
EmPhoto
),
postName
=
t
.
PostName
,
departmentName
=
t
.
DepartmentName
,
companyName
=
t
.
CompanyName
,
imAccount
=
t
.
OpenAccount
});
var
EmList
=
branchmodule
.
GetEmpAndImByEmpName
(
EmNmae
,
userInfo
.
RB_Group_id
,
EmpId
,
BranchId
).
Select
(
t
=>
new
{
name
=
t
.
EmName
,
empId
=
t
.
EmployeeId
,
icon
=
Config
.
GetFileUrl
(
t
.
EmPhoto
),
postName
=
t
.
PostName
,
departmentName
=
t
.
DepartmentName
,
companyName
=
t
.
CompanyName
,
imAccount
=
t
.
OpenAccount
});
return
ApiResult
.
Success
(
""
,
EmList
);
return
ApiResult
.
Success
(
""
,
EmList
);
}
}
}
}
...
...
REBORN.Services.UserService/EmployeeService.cs
View file @
9e1e83a4
...
@@ -294,6 +294,7 @@ namespace REBORN.Services.UserService
...
@@ -294,6 +294,7 @@ namespace REBORN.Services.UserService
EmLeave
=
x
.
IsLeave
==
1
?
x
.
EmLeave
!=
null
?
Convert
.
ToDateTime
(
x
.
EmLeave
).
ToString
(
"yyyy-MM-dd"
)
:
""
:
""
,
EmLeave
=
x
.
IsLeave
==
1
?
x
.
EmLeave
!=
null
?
Convert
.
ToDateTime
(
x
.
EmLeave
).
ToString
(
"yyyy-MM-dd"
)
:
""
:
""
,
x
.
EmployeeId
,
x
.
EmployeeId
,
x
.
EnterpriseWeChatId
,
x
.
EnterpriseWeChatId
,
x
.
IsGroupShow
});
});
return
ApiResult
.
Success
(
data
:
data
);
return
ApiResult
.
Success
(
data
:
data
);
}
}
...
@@ -406,8 +407,29 @@ namespace REBORN.Services.UserService
...
@@ -406,8 +407,29 @@ namespace REBORN.Services.UserService
}));
}));
}
}
/// <summary>
/// 设置员工账号 集团下均可查询
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
virtual
ApiResult
SetEmployeeGroupShow
(
RequestParm
request
)
{
UserInfo
userInfo
=
CacheManager
.
User
.
RbUserCache
.
GetUserLoginInfo
(
request
.
uid
);
JObject
parm
=
JObject
.
Parse
(
request
.
msg
.
ToString
());
int
Id
=
parm
.
GetInt
(
"Id"
);
if
(
Id
==
0
)
{
return
ApiResult
.
ParamIsNull
();
}
string
msg
=
employeemodule
.
SetEmployeeGroupShow
(
Id
,
userInfo
.
RB_Group_id
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// <summary>
/// 集团下部门管理 树形结构
/// 集团下部门管理 树形结构
...
...
REBORN.WebApi/AppStting/adminsetting.json
View file @
9e1e83a4
...
@@ -157,6 +157,12 @@
...
@@ -157,6 +157,12 @@
"method"
:
"GetPageList"
,
"method"
:
"GetPageList"
,
"url"
:
""
"url"
:
""
},
},
{
"cmd"
:
"admin_post_SetEmployeeGroupShow"
,
//设置员工帐号
集团均可查询
"fullName"
:
"REBORN.Services.UserService.EmployeeService"
,
"method"
:
"SetEmployeeGroupShow"
,
"url"
:
""
},
{
{
"cmd"
:
"admin_get_GetGroupEmployeeNum"
,
//获取员工数量统计
"cmd"
:
"admin_get_GetGroupEmployeeNum"
,
//获取员工数量统计
"fullName"
:
"REBORN.Services.UserService.EmployeeService"
,
"fullName"
:
"REBORN.Services.UserService.EmployeeService"
,
...
...
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