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
33d05fde
Commit
33d05fde
authored
Apr 16, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室接口修改
parent
61bb4a96
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
34 deletions
+57
-34
bsoft-api/src/main/java/com/bsoft/api/controller/DeptController.java
+4
-2
bsoft-api/src/main/java/com/bsoft/api/mapper/SerDepartmentMapper.java
+5
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDeptServiceImpl.java
+2
-2
bsoft-api/src/main/java/com/bsoft/api/service/SerDeptService.java
+1
-1
bsoft-api/src/main/resources/application-test.properties
+1
-1
bsoft-api/src/main/resources/mapper/SerDepartmentMapper.xml
+11
-0
bsoft-api/src/main/resources/mapper/SerPageBlockRsMapper.xml
+1
-0
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
+4
-2
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
+28
-26
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/DeptController.java
View file @
33d05fde
...
...
@@ -3,11 +3,13 @@ package com.bsoft.api.controller;
import
com.bsoft.api.common.Result
;
import
com.bsoft.api.common.annotations.Token
;
import
com.bsoft.api.model.SerDepartment
;
import
com.bsoft.api.model.reqmodel.QuerySummary
;
import
com.bsoft.api.service.SerDeptService
;
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
java.util.List
;
...
...
@@ -26,8 +28,8 @@ public class DeptController {
@PostMapping
(
"/dept/list"
)
@Token
@ApiOperation
(
"查询科室列表"
)
public
Object
getList
(
)
throws
InterruptedException
{
List
<
SerDepartment
>
list
=
serDeptService
.
getList
();
public
Object
getList
(
@RequestBody
QuerySummary
req
)
{
List
<
SerDepartment
>
list
=
serDeptService
.
getList
(
req
.
getDate
()
);
return
Result
.
success
(
list
);
}
}
bsoft-api/src/main/java/com/bsoft/api/mapper/SerDepartmentMapper.java
View file @
33d05fde
package
com
.
bsoft
.
api
.
mapper
;
import
com.bsoft.api.model.SerDepartment
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
...
...
@@ -14,4 +16,6 @@ public interface SerDepartmentMapper {
List
<
SerDepartment
>
selectAll
();
int
updateByPrimaryKey
(
SerDepartment
record
);
List
<
SerDepartment
>
selectSummaryDept
(
@Param
(
"date"
)
Integer
date
);
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDeptServiceImpl.java
View file @
33d05fde
...
...
@@ -14,8 +14,8 @@ public class SerDeptServiceImpl implements SerDeptService {
private
SerDepartmentMapper
serDepartmentMapper
;
@Override
public
List
<
SerDepartment
>
getList
()
{
List
<
SerDepartment
>
list
=
serDepartmentMapper
.
select
All
(
);
public
List
<
SerDepartment
>
getList
(
Integer
date
)
{
List
<
SerDepartment
>
list
=
serDepartmentMapper
.
select
SummaryDept
(
date
);
return
list
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/SerDeptService.java
View file @
33d05fde
...
...
@@ -5,5 +5,5 @@ import com.bsoft.api.model.SerDepartment;
import
java.util.List
;
public
interface
SerDeptService
{
List
<
SerDepartment
>
getList
();
List
<
SerDepartment
>
getList
(
Integer
date
);
}
bsoft-api/src/main/resources/application-test.properties
View file @
33d05fde
...
...
@@ -5,7 +5,7 @@ jdbc.password=123456
jdbc.driverClass
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
oracle.jdbc.driver.OracleDriver
spring.datasource.username
=
scml_
pd
spring.datasource.username
=
scml_
zp
spring.datasource.password
=
123
spring.datasource.url
=
jdbc:oracle:thin:@192.168.18.171:1521:his
...
...
bsoft-api/src/main/resources/mapper/SerDepartmentMapper.xml
View file @
33d05fde
...
...
@@ -43,4 +43,14 @@
from SER_DEPARTMENT
where "STATE" = 1
</select>
<select
id=
"selectSummaryDept"
resultMap=
"BaseResultMap"
>
select DEPT_CODE as KSBM,DEPT_NAME as KSMC
from SER_PROJ_VALUE
where 1=1
<if
test=
"date!=null"
>
and "DATE"=#{date}
</if>
GROUP BY DEPT_CODE,DEPT_NAME,SORT
order by SORT
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageBlockRsMapper.xml
View file @
33d05fde
...
...
@@ -39,6 +39,7 @@
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_ID, PAGE_ID,WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
</select>
...
...
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
View file @
33d05fde
...
...
@@ -78,8 +78,9 @@
select DEPT_CODE from SER_PROJ_VALUE
where 1=1
<if
test=
"date!=null"
>
and "DATE"=
2020
and "DATE"=
#{date}
</if>
GROUP BY DEPT_CODE
GROUP BY DEPT_CODE,SORT
order by SORT
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
View file @
33d05fde
...
...
@@ -92,41 +92,42 @@
YSZ_UNIT, SZ_UNIT
from SER_PROJ_VALUE
</select>
<select
id=
"selectValue"
resultMap=
"SerProjValueResp"
>
SELECT v.*,p.PROJ_NAME,p.IS_BUDGET
FROM (
SELECT v.PROJ_ID,MAX(v.VERSION) AS VERSION
FROM SER_PROJ_VALUE v
WHERE v.STATE = 1
<if
test=
"dept!=null"
>
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if>
<if
test=
"date!=null"
>
AND v."DATE" = #{date,jdbcType=DECIMAL}
</if>
GROUP BY v.PROJ_ID
)m
JOIN SER_PROJ_VALUE v ON v.PROJ_ID = m.PROJ_ID AND v.VERSION = m.VERSION
JOIN SER_PROJ p ON p.ID = m.PROJ_ID AND p.STATE = 1
WHERE 1 = 1
<if
test=
"projType!=null"
>
AND p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
</if>
<if
test=
"typeState!=null"
>
AND p.TYPE_STATE = #{typeState,jdbcType=DECIMAL}
<select
id=
"selectValue"
resultMap=
"SerProjValueResp"
>
SELECT v.*,p.PROJ_NAME,p.IS_BUDGET
FROM SER_PROJ p
LEFT JOIN
(
SELECT v.PROJ_ID,MAX(v.VERSION) AS VERSION
FROM SER_PROJ_VALUE v
WHERE v.STATE = 1
<if
test=
"dept!=null"
>
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if>
<if
test=
"
exponentId
!=null"
>
AND
p.TYPE = #{exponentId
,jdbcType=DECIMAL}
<if
test=
"
date
!=null"
>
AND
v."DATE" = #{date
,jdbcType=DECIMAL}
</if>
GROUP BY v.PROJ_ID
)m on m.PROJ_ID = p.ID
left JOIN SER_PROJ_VALUE v ON v.PROJ_ID = m.PROJ_ID AND v.VERSION = m.VERSION
<if
test=
"dept!=null"
>
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if>
<if
test=
"date!=null"
>
AND v."DATE" = #{date,jdbcType=DECIMAL}
</if>
WHERE 1 = 1
<if
test=
"projType!=null"
>
AND p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
</if>
<if
test=
"typeState!=null"
>
AND p.TYPE_STATE = #{typeState,jdbcType=DECIMAL}
</if>
<if
test=
"exponentId!=null"
>
AND p.TYPE = #{exponentId,jdbcType=DECIMAL}
</if>
<if
test=
"isBudget!=null"
>
AND p.IS_BUDGET = #{isBudget,jdbcType=DECIMAL}
</if>
ORDER BY p.SORT
</select>
ORDER BY p.SORT
</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