Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
944a3458
Commit
944a3458
authored
Oct 09, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加机构端陪诊员权限查询
parent
caae136e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
5 deletions
+16
-5
pz-merchant/src/main/java/com/pz/merchant/controller/pc/EmployeesController.java
+6
-0
pz-system/src/main/java/com/pz/merchant/domain/bo/EmployeesBo.java
+2
-0
pz-system/src/main/java/com/pz/merchant/service/ICompanyService.java
+2
-0
pz-system/src/main/java/com/pz/merchant/service/impl/CompanyServiceImpl.java
+5
-0
pz-system/src/main/java/com/pz/merchant/service/impl/EmployeesServiceImpl.java
+1
-5
No files found.
pz-merchant/src/main/java/com/pz/merchant/controller/pc/EmployeesController.java
View file @
944a3458
...
@@ -3,6 +3,7 @@ package com.pz.merchant.controller.pc;
...
@@ -3,6 +3,7 @@ package com.pz.merchant.controller.pc;
import
java.util.List
;
import
java.util.List
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
com.pz.merchant.service.ICompanyService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.*
;
...
@@ -36,12 +37,17 @@ import com.pz.common.core.page.TableDataInfo;
...
@@ -36,12 +37,17 @@ import com.pz.common.core.page.TableDataInfo;
public
class
EmployeesController
extends
BaseController
{
public
class
EmployeesController
extends
BaseController
{
private
final
IEmployeesService
iEmployeesService
;
private
final
IEmployeesService
iEmployeesService
;
private
final
ICompanyService
iCompanyService
;
/**
/**
* 查询陪诊员列表
* 查询陪诊员列表
*/
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
<
EmployeesVo
>
list
(
EmployeesBo
bo
,
PageQuery
pageQuery
)
{
public
TableDataInfo
<
EmployeesVo
>
list
(
EmployeesBo
bo
,
PageQuery
pageQuery
)
{
Long
roleId
=
getLoginUser
().
getRoleId
();
if
(
null
!=
roleId
&&
roleId
==
2
){
bo
.
setCompanyId
(
iCompanyService
.
selectCompanyById
(
getUserId
()));
}
return
iEmployeesService
.
queryPageList
(
bo
,
pageQuery
);
return
iEmployeesService
.
queryPageList
(
bo
,
pageQuery
);
}
}
...
...
pz-system/src/main/java/com/pz/merchant/domain/bo/EmployeesBo.java
View file @
944a3458
...
@@ -124,4 +124,6 @@ public class EmployeesBo extends BaseEntity {
...
@@ -124,4 +124,6 @@ public class EmployeesBo extends BaseEntity {
*/
*/
private
String
phone
;
private
String
phone
;
private
Long
userId
;
}
}
pz-system/src/main/java/com/pz/merchant/service/ICompanyService.java
View file @
944a3458
...
@@ -108,4 +108,6 @@ public interface ICompanyService {
...
@@ -108,4 +108,6 @@ public interface ICompanyService {
* 新增机构统计
* 新增机构统计
*/
*/
DataViewVo
dataCompany
(
DataViewBo
dataViewBo
);
DataViewVo
dataCompany
(
DataViewBo
dataViewBo
);
int
selectCompanyById
(
Long
userId
);
}
}
pz-system/src/main/java/com/pz/merchant/service/impl/CompanyServiceImpl.java
View file @
944a3458
...
@@ -289,4 +289,9 @@ public class CompanyServiceImpl implements ICompanyService {
...
@@ -289,4 +289,9 @@ public class CompanyServiceImpl implements ICompanyService {
public
DataViewVo
dataCompany
(
DataViewBo
dataViewBo
)
{
public
DataViewVo
dataCompany
(
DataViewBo
dataViewBo
)
{
return
baseMapper
.
selectDataView
(
dataViewBo
);
return
baseMapper
.
selectDataView
(
dataViewBo
);
}
}
@Override
public
int
selectCompanyById
(
Long
userId
)
{
return
baseMapper
.
selectVoOne
(
new
LambdaQueryWrapper
<
Company
>().
eq
(
Company:
:
getUid
,
userId
)).
getId
();
}
}
}
pz-system/src/main/java/com/pz/merchant/service/impl/EmployeesServiceImpl.java
View file @
944a3458
...
@@ -136,6 +136,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
...
@@ -136,6 +136,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
lqw
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getName
()),
Employees:
:
getName
,
bo
.
getName
());
lqw
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getName
()),
Employees:
:
getName
,
bo
.
getName
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getStartYear
()),
Employees:
:
getStartYear
,
bo
.
getStartYear
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getStartYear
()),
Employees:
:
getStartYear
,
bo
.
getStartYear
());
lqw
.
eq
(
bo
.
getUid
()
!=
null
,
Employees:
:
getUid
,
bo
.
getUid
());
lqw
.
eq
(
bo
.
getUid
()
!=
null
,
Employees:
:
getUid
,
bo
.
getUid
());
lqw
.
eq
(
bo
.
getCompanyId
()
!=
null
,
Employees:
:
getCompanyId
,
bo
.
getCompanyId
());
lqw
.
eq
(
bo
.
getStatus
()
!=
null
,
Employees:
:
getStatus
,
bo
.
getStatus
());
lqw
.
eq
(
bo
.
getStatus
()
!=
null
,
Employees:
:
getStatus
,
bo
.
getStatus
());
lqw
.
eq
(
bo
.
getNowType
()
!=
null
,
Employees:
:
getNowType
,
bo
.
getNowType
());
lqw
.
eq
(
bo
.
getNowType
()
!=
null
,
Employees:
:
getNowType
,
bo
.
getNowType
());
lqw
.
orderByDesc
(
Employees:
:
getId
);
lqw
.
orderByDesc
(
Employees:
:
getId
);
...
@@ -149,11 +150,6 @@ public class EmployeesServiceImpl implements IEmployeesService {
...
@@ -149,11 +150,6 @@ public class EmployeesServiceImpl implements IEmployeesService {
public
Boolean
insertByBo
(
EmployeesBo
bo
)
{
public
Boolean
insertByBo
(
EmployeesBo
bo
)
{
Employees
add
=
BeanUtil
.
toBean
(
bo
,
Employees
.
class
);
Employees
add
=
BeanUtil
.
toBean
(
bo
,
Employees
.
class
);
add
.
setNowType
(
1
);
add
.
setNowType
(
1
);
/*Integer id = companyMapper.selectVoOne(new LambdaQueryWrapper<Company>().eq(Company::getUid, bo.getUid())).getId();
if(null != id && id != 0){
add.setCompanyId(1);
}*/
add
.
setCompanyId
(
1
);
validEntityBeforeSave
(
add
);
validEntityBeforeSave
(
add
);
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
if
(
flag
)
{
if
(
flag
)
{
...
...
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