Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
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
bsoft
sv-springboot
Commits
0bacb9d7
Commit
0bacb9d7
authored
Jul 02, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室查询
parent
4994743b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
bsoft-api/src/main/java/com/bsoft/api/controller/UserController.java
+4
-6
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+7
-6
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
+9
-7
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/UserController.java
View file @
0bacb9d7
...
@@ -6,6 +6,7 @@ import com.bsoft.api.common.annotations.Token;
...
@@ -6,6 +6,7 @@ import com.bsoft.api.common.annotations.Token;
import
com.bsoft.api.model.SerDepartment
;
import
com.bsoft.api.model.SerDepartment
;
import
com.bsoft.api.model.SysRole
;
import
com.bsoft.api.model.SysRole
;
import
com.bsoft.api.model.SysUser
;
import
com.bsoft.api.model.SysUser
;
import
com.bsoft.api.model.reqmodel.Disease
;
import
com.bsoft.api.model.respmodel.SysMenuList
;
import
com.bsoft.api.model.respmodel.SysMenuList
;
import
com.bsoft.api.service.SysMenuService
;
import
com.bsoft.api.service.SysMenuService
;
import
com.bsoft.api.service.SysUserOrgRsService
;
import
com.bsoft.api.service.SysUserOrgRsService
;
...
@@ -13,10 +14,7 @@ import com.bsoft.api.service.SysUserRoleRsService;
...
@@ -13,10 +14,7 @@ import com.bsoft.api.service.SysUserRoleRsService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.List
;
import
java.util.List
;
...
@@ -78,8 +76,8 @@ public class UserController {
...
@@ -78,8 +76,8 @@ public class UserController {
@PostMapping
(
"dept"
)
@PostMapping
(
"dept"
)
@Token
@Token
@ApiOperation
(
"查询用户科室"
)
@ApiOperation
(
"查询用户科室"
)
public
Object
getOrgByUser
(
@ApiIgnore
@CurrentUser
Long
userId
)
throws
Exception
{
public
Object
getOrgByUser
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
Disease
.
DiseaseIDorLevel
disease
)
throws
Exception
{
List
<
SerDepartment
>
sysMenuList
=
sysUserOrgRsService
.
getUserOrg
(
userId
);
List
<
SerDepartment
>
sysMenuList
=
sysUserOrgRsService
.
getUserOrg
(
userId
,
disease
.
getDisease
(),
disease
.
getDate
()
);
return
Result
.
success
(
sysMenuList
);
return
Result
.
success
(
sysMenuList
);
}
}
}
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
View file @
0bacb9d7
...
@@ -5,10 +5,7 @@ import com.bsoft.api.common.enums.ProjectType;
...
@@ -5,10 +5,7 @@ import com.bsoft.api.common.enums.ProjectType;
import
com.bsoft.api.common.enums.StateType
;
import
com.bsoft.api.common.enums.StateType
;
import
com.bsoft.api.common.enums.TypeState
;
import
com.bsoft.api.common.enums.TypeState
;
import
com.bsoft.api.mapper.*
;
import
com.bsoft.api.mapper.*
;
import
com.bsoft.api.model.DicOrg
;
import
com.bsoft.api.model.*
;
import
com.bsoft.api.model.SerPageValueConfig
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.SerProjValueSz
;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.BudgetValue
;
import
com.bsoft.api.model.reqmodel.BudgetValue
;
import
com.bsoft.api.model.respmodel.*
;
import
com.bsoft.api.model.respmodel.*
;
...
@@ -35,6 +32,8 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -35,6 +32,8 @@ public class SerProjValueServiceImpl implements SerProjValueService {
private
DicOrgMapper
dicOrgMapper
;
private
DicOrgMapper
dicOrgMapper
;
@Resource
@Resource
private
SerProjValueSzMapper
projValueSzMapper
;
private
SerProjValueSzMapper
projValueSzMapper
;
@Resource
private
SysRoleMapper
roleMapper
;
//查询项目数值
//查询项目数值
@Override
@Override
...
@@ -117,7 +116,9 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -117,7 +116,9 @@ public class SerProjValueServiceImpl implements SerProjValueService {
List
<
DicOrg
>
orgList
=
dicOrgMapper
.
selectByUser
(
userId
);
List
<
DicOrg
>
orgList
=
dicOrgMapper
.
selectByUser
(
userId
);
String
orgCode
=
orgList
.
get
(
0
).
getOrgCode
();
String
orgCode
=
orgList
.
get
(
0
).
getOrgCode
();
List
<
Summary
>
result
=
serProjMapper
.
selectDept
(
date
,
budgetType
,
userId
);
SysRole
role
=
roleMapper
.
selectByUser
(
userId
);
List
<
Summary
>
result
=
serProjMapper
.
selectDept
(
date
,
budgetType
,
!
role
.
getRoleCode
().
equals
(
1L
)
?
userId
:
null
);
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
if
(
result
!=
null
&&
result
.
size
()
>
0
)
{
for
(
Summary
summary
:
result
)
{
for
(
Summary
summary
:
result
)
{
summary
.
setProjTypeList
(
new
ArrayList
<>());
summary
.
setProjTypeList
(
new
ArrayList
<>());
...
@@ -130,7 +131,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -130,7 +131,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
)
{
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
)
{
projType
=
new
SummaryProjType
();
projType
=
new
SummaryProjType
();
projType
.
setProjTypeName
(
String
.
valueOf
(
enumInfo
.
get
(
"description"
)));
projType
.
setProjTypeName
(
String
.
valueOf
(
enumInfo
.
get
(
"description"
)));
values
=
serProjValueMapper
.
selectValue
((
Integer
)
enumInfo
.
get
(
"value"
),
null
,
values
=
serProjValueMapper
.
selectValue
((
Integer
)
enumInfo
.
get
(
"value"
),
null
,
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
// if (values != null && values.size() > 0) {
// if (values != null && values.size() > 0) {
// for (SerProjValueResp value : values) {
// for (SerProjValueResp value : values) {
...
...
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
View file @
0bacb9d7
...
@@ -97,13 +97,15 @@
...
@@ -97,13 +97,15 @@
from SER_PROJ_VALUE v
from SER_PROJ_VALUE v
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
where 1=1
where 1=1
and EXISTS(select o2.ORG_CODE as DEPT_CODE
<if
test=
"userId!=null"
>
from SYS_USER_ORG_RS rs2
and EXISTS(select o2.ORG_CODE as DEPT_CODE
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
from SYS_USER_ORG_RS rs2
where o2.STATE = 1
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
where o2.STATE = 1
and o2.ORG_CODE = v.DEPT_CODE
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
)
and o2.ORG_CODE = v.DEPT_CODE
)
</if>
<if
test=
"date!=null"
>
<if
test=
"date!=null"
>
and v.`DATE`= LEFT(#{date,jdbcType=DECIMAL},4)
and v.`DATE`= LEFT(#{date,jdbcType=DECIMAL},4)
</if>
</if>
...
...
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