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
a69c6a2b
Commit
a69c6a2b
authored
Jul 01, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室列表修改
parent
a361b5d1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
6 deletions
+34
-6
bsoft-api/src/main/java/com/bsoft/api/controller/DeptController.java
+4
-2
bsoft-api/src/main/java/com/bsoft/api/mapper/DicOrgMapper.java
+6
-1
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SysUserOrgRsServiceImpl.java
+7
-2
bsoft-api/src/main/java/com/bsoft/api/service/SysUserOrgRsService.java
+1
-1
bsoft-api/src/main/resources/mapper/DicOrgMapper.xml
+16
-0
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/DeptController.java
View file @
a69c6a2b
...
...
@@ -4,11 +4,13 @@ import com.bsoft.api.common.Result;
import
com.bsoft.api.common.annotations.CurrentUser
;
import
com.bsoft.api.common.annotations.Token
;
import
com.bsoft.api.model.SerDepartment
;
import
com.bsoft.api.model.reqmodel.Disease
;
import
com.bsoft.api.service.SysUserOrgRsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
springfox.documentation.annotations.ApiIgnore
;
...
...
@@ -28,8 +30,8 @@ public class DeptController {
@PostMapping
(
"/dept/list"
)
@Token
@ApiOperation
(
"查询科室列表"
)
public
Object
getList
(
@ApiIgnore
@CurrentUser
Long
userId
)
{
List
<
SerDepartment
>
sysMenuList
=
sysUserOrgRsService
.
getUserOrg
(
userId
);
public
Object
getList
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
Disease
.
DiseaseIDorLevel
disease
)
{
List
<
SerDepartment
>
sysMenuList
=
sysUserOrgRsService
.
getUserOrg
(
userId
,
disease
.
getDisease
(),
disease
.
getDate
()
);
return
Result
.
success
(
sysMenuList
);
}
}
bsoft-api/src/main/java/com/bsoft/api/mapper/DicOrgMapper.java
View file @
a69c6a2b
...
...
@@ -19,5 +19,9 @@ public interface DicOrgMapper {
List
<
DicOrg
>
selectByUser
(
@Param
(
"userId"
)
Long
userId
);
List
<
SerDepartment
>
selectDeptByUser
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"orgId"
)
Long
orgId
);
List
<
SerDepartment
>
selectDeptByUser
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"orgId"
)
Long
orgId
);
List
<
SerDepartment
>
selectDeptByDisease
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"orgId"
)
Long
orgId
,
@Param
(
"disease"
)
String
disease
,
@Param
(
"date"
)
String
date
);
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SysUserOrgRsServiceImpl.java
View file @
a69c6a2b
...
...
@@ -51,10 +51,15 @@ public class SysUserOrgRsServiceImpl implements SysUserOrgRsService {
}
@Override
public
List
<
SerDepartment
>
getUserOrg
(
Long
userId
)
{
public
List
<
SerDepartment
>
getUserOrg
(
Long
userId
,
String
disease
,
String
date
)
{
List
<
DicOrg
>
orgList
=
dicOrgMapper
.
selectByUser
(
userId
);
Long
orgId
=
orgList
!=
null
&&
orgList
.
size
()
>
0
?
orgList
.
get
(
0
).
getId
()
:
null
;
List
<
SerDepartment
>
list
=
orgMapper
.
selectDeptByUser
(
userId
,
orgId
);
List
<
SerDepartment
>
list
=
null
;
if
(
disease
!=
null
)
{
list
=
orgMapper
.
selectDeptByDisease
(
userId
,
orgId
,
disease
,
date
);
}
else
{
list
=
orgMapper
.
selectDeptByUser
(
userId
,
orgId
);
}
return
list
;
}
...
...
bsoft-api/src/main/java/com/bsoft/api/service/SysUserOrgRsService.java
View file @
a69c6a2b
...
...
@@ -6,5 +6,5 @@ import com.bsoft.api.model.SysUserOrgRs;
import
java.util.List
;
public
interface
SysUserOrgRsService
extends
ServiceBase
<
SysUserOrgRs
>
{
List
<
SerDepartment
>
getUserOrg
(
Long
userId
);
List
<
SerDepartment
>
getUserOrg
(
Long
userId
,
String
disease
,
String
date
);
}
bsoft-api/src/main/resources/mapper/DicOrgMapper.xml
View file @
a69c6a2b
...
...
@@ -109,4 +109,19 @@
</if>
and rs.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
<select
id=
"selectDeptByDisease"
resultMap=
"SummaryDept"
>
select DISTINCT o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC,o.ORG_SHORT_NAME as KSJC
from sys_user_sbj_rs rs
join sys_subject o on o.id = rs.ORG_ID and rs.STATE = 1
join val_block_values_1_5_2 v on v.KSBM=o.ORG_CODE
where o.STATE = 1
<if
test=
"orgId!=null"
>
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL}
</if>
<if
test=
"disease!=null and date!=null"
>
and v.zbzbm = #{disease}
and v.time = #{date}
</if>
and rs.USER_ID = #{userId,jdbcType=DECIMAL}
</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