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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
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
+6
-5
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
+2
-0
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
<>());
...
...
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
View file @
0bacb9d7
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
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
<if
test=
"userId!=null"
>
and EXISTS(select o2.ORG_CODE as DEPT_CODE
and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2
from SYS_USER_ORG_RS rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
...
@@ -104,6 +105,7 @@
...
@@ -104,6 +105,7 @@
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = v.DEPT_CODE
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