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
048c3c81
Commit
048c3c81
authored
Apr 17, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
住院门诊数据接口修改
parent
33d05fde
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
23 deletions
+33
-23
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/SerProjValueResp.java
+5
-16
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+21
-3
bsoft-api/src/main/java/com/bsoft/api/service/SerProjValueService.java
+3
-0
bsoft-api/src/main/resources/application-test.properties
+1
-1
bsoft-api/src/main/resources/mapper/SerPageBlockRsMapper.xml
+0
-1
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
+3
-2
No files found.
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/SerProjValueResp.java
View file @
048c3c81
package
com
.
bsoft
.
api
.
model
.
respmodel
;
import
com.bsoft.api.model.SerProjValue
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
public
class
SerProjValueResp
extends
SerProjValue
{
private
String
projName
;
private
BigDecimal
isBudget
;
public
String
getProjName
()
{
return
projName
;
}
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
public
BigDecimal
getIsBudget
()
{
return
isBudget
;
}
public
void
setIsBudget
(
BigDecimal
isBudget
)
{
this
.
isBudget
=
isBudget
;
}
private
BigDecimal
parent
;
private
List
<
SerProjValueResp
>
childs
;
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
View file @
048c3c81
...
...
@@ -9,6 +9,7 @@ import com.bsoft.api.mapper.SerProjMapper;
import
com.bsoft.api.mapper.SerProjValueMapper
;
import
com.bsoft.api.model.SerPageValueConfig
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.SysMenu
;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.BudgetValue
;
import
com.bsoft.api.model.respmodel.*
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
SerProjValueServiceImpl
implements
SerProjValueService
{
...
...
@@ -39,6 +41,8 @@ public class SerProjValueServiceImpl implements SerProjValueService {
if
(
enumList
!=
null
&&
enumList
.
size
()
>
0
){
ProjectValue
projectValue
=
null
;
List
<
ProjectInfo
>
projectInfo
=
null
;
List
<
SerProjValueResp
>
values
=
null
;
List
<
SerProjValueResp
>
resultValues
=
null
;
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
){
projectValue
=
new
ProjectValue
();
projectValue
.
setTypeId
((
Integer
)
enumInfo
.
get
(
"value"
));
...
...
@@ -46,10 +50,11 @@ public class SerProjValueServiceImpl implements SerProjValueService {
projectInfo
=
serProjMapper
.
selectState
(
projectType
,(
Integer
)
enumInfo
.
get
(
"value"
));
if
(
projectInfo
!=
null
&&
projectInfo
.
size
()
>
0
){
for
(
ProjectInfo
projInfo
:
projectInfo
){
List
<
SerProjValueResp
>
values
=
serProjValueMapper
.
selectValue
(
projectType
,(
Integer
)
enumInfo
.
get
(
"value"
),
values
=
serProjValueMapper
.
selectValue
(
projectType
,(
Integer
)
enumInfo
.
get
(
"value"
),
projInfo
.
getExponentId
(),
deptCode
,
date
,
null
);
if
(
values
!=
null
&&
values
.
size
()
>
0
)
projInfo
.
setProjectValues
(
values
);
resultValues
=
getLevelData
(
values
,
BigDecimal
.
valueOf
(
PROJ_TOP_PARENT_ID
));
if
(
resultValues
!=
null
&&
resultValues
.
size
()
>
0
)
projInfo
.
setProjectValues
(
resultValues
);
}
}
projectValue
.
setProject
(
projectInfo
);
...
...
@@ -135,4 +140,17 @@ public class SerProjValueServiceImpl implements SerProjValueService {
}
private
List
<
SerProjValueResp
>
getLevelData
(
List
<
SerProjValueResp
>
list
,
BigDecimal
parentcode
)
{
List
<
SerProjValueResp
>
resultList
=
new
ArrayList
<>();
for
(
SerProjValueResp
data
:
list
){
if
(
data
.
getParent
().
equals
(
parentcode
)){
List
<
SerProjValueResp
>
childList
=
getLevelData
(
list
,
data
.
getProjId
());
childList
=
childList
.
stream
().
sorted
(
Comparator
.
comparing
(
SerProjValueResp:
:
getSort
)).
collect
(
Collectors
.
toList
());
data
.
setChilds
(
childList
);
resultList
.
add
(
data
);
}
}
return
resultList
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/SerProjValueService.java
View file @
048c3c81
...
...
@@ -5,6 +5,9 @@ import com.bsoft.api.model.reqmodel.AddBudgetValue;
import
java.util.Map
;
public
interface
SerProjValueService
{
//顶级项目的父级id
final
static
Integer
PROJ_TOP_PARENT_ID
=
0
;
Object
getValue
(
Integer
projectType
,
Integer
date
,
String
deptCode
)
throws
Throwable
;
boolean
save
(
AddBudgetValue
request
);
...
...
bsoft-api/src/main/resources/application-test.properties
View file @
048c3c81
...
...
@@ -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_zp
spring.datasource.username
=
scml_zp
_cs
spring.datasource.password
=
123
spring.datasource.url
=
jdbc:oracle:thin:@192.168.18.171:1521:his
...
...
bsoft-api/src/main/resources/mapper/SerPageBlockRsMapper.xml
View file @
048c3c81
...
...
@@ -39,7 +39,6 @@
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/SerProjValueMapper.xml
View file @
048c3c81
...
...
@@ -29,6 +29,7 @@
<resultMap
id=
"SerProjValueResp"
extends=
"BaseResultMap"
type=
"com.bsoft.api.model.respmodel.SerProjValueResp"
>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"IS_BUDGET"
jdbcType=
"DECIMAL"
property=
"isBudget"
/>
<result
column=
"PARENT"
jdbcType=
"DECIMAL"
property=
"parent"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PROJ_VALUE
...
...
@@ -93,7 +94,7 @@
from SER_PROJ_VALUE
</select>
<select
id=
"selectValue"
resultMap=
"SerProjValueResp"
>
SELECT v.*,p.PROJ_NAME,p.IS_BUDGET
SELECT v.*,p.PROJ_NAME,p.IS_BUDGET
,p.PARENT
FROM SER_PROJ p
LEFT JOIN
(
...
...
@@ -115,7 +116,7 @@
<if
test=
"date!=null"
>
AND v."DATE" = #{date,jdbcType=DECIMAL}
</if>
WHERE 1 = 1
WHERE 1 = 1
and p."STATE" = 1
<if
test=
"projType!=null"
>
AND p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
</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