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
fc4420fb
Commit
fc4420fb
authored
Jul 13, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
病组添加总例数字段
parent
921e6fd4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
31 deletions
+55
-31
bsoft-api/src/main/java/com/bsoft/api/mapper/SerDiseaseMapper.java
+3
-0
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/DiseaseLevel.java
+11
-1
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseServiceImpl.java
+7
-1
bsoft-api/src/main/resources/application-test.properties
+1
-4
bsoft-api/src/main/resources/application.properties
+4
-4
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
+29
-21
No files found.
bsoft-api/src/main/java/com/bsoft/api/mapper/SerDiseaseMapper.java
View file @
fc4420fb
...
...
@@ -35,6 +35,8 @@ public interface SerDiseaseMapper {
DiseaseLevel
selectParentById
(
@Param
(
"date"
)
String
date
,
@Param
(
"diseaseId"
)
Integer
diseaseId
);
DiseaseLevel
selectParentByIdNoZbz
(
@Param
(
"date"
)
String
date
,
@Param
(
"diseaseId"
)
Integer
diseaseId
);
List
<
DiseaseLevel
>
selectSonById
(
@Param
(
"date"
)
String
date
,
@Param
(
"diseaseId"
)
Integer
diseaseId
,
@Param
(
"docCode"
)
String
docCode
,
@Param
(
"deptCode"
)
String
deptCode
);
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/DiseaseLevel.java
View file @
fc4420fb
...
...
@@ -15,6 +15,7 @@ public class DiseaseLevel {
private
String
orgId
;
private
String
orgName
;
private
Integer
groupType
;
private
BigDecimal
zls
;
private
List
<
DiseaseLevel
>
diseaseLevelList
;
public
BigDecimal
getId
()
{
...
...
@@ -97,6 +98,14 @@ public class DiseaseLevel {
this
.
groupType
=
groupType
;
}
public
BigDecimal
getZls
()
{
return
zls
;
}
public
void
setZls
(
BigDecimal
zls
)
{
this
.
zls
=
zls
;
}
public
List
<
DiseaseLevel
>
getDiseaseLevelList
()
{
return
diseaseLevelList
;
}
...
...
@@ -117,7 +126,8 @@ public class DiseaseLevel {
", level="
+
level
+
", orgId='"
+
orgId
+
'\''
+
", orgName='"
+
orgName
+
'\''
+
", groupType='"
+
groupType
+
'\''
+
", groupType="
+
groupType
+
", zls="
+
zls
+
", diseaseLevelList="
+
diseaseLevelList
+
'}'
;
}
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseServiceImpl.java
View file @
fc4420fb
...
...
@@ -79,7 +79,12 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
Integer
diseaseId
=
disease
.
getId
().
intValue
();
//查询父级菜单对象(直到查询到顶级)
while
(
isParent
)
{
DiseaseLevel
diseaseLevel
=
serDiseaseMapper
.
selectParentById
(
date
,
diseaseId
);
DiseaseLevel
diseaseLevel
=
null
;
if
(
disease
.
getLevel
().
intValue
()
==
0
)
{
diseaseLevel
=
serDiseaseMapper
.
selectParentById
(
date
,
diseaseId
);
}
else
{
diseaseLevel
=
serDiseaseMapper
.
selectParentByIdNoZbz
(
date
,
diseaseId
);
}
if
(
diseaseLevel
!=
null
)
{
List
<
DiseaseLevel
>
sonList
=
new
ArrayList
<>();
if
(
diseaseLevelResult
!=
null
)
{
...
...
@@ -118,6 +123,7 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
diseaseLevel1
.
setOrgId
(
serDiseases
.
getOrgId
());
diseaseLevel1
.
setOrgName
(
serDiseases
.
getOrgName
());
diseaseLevel1
.
setParentId
(
serDiseases
.
getParentId
());
diseaseLevel1
.
setZls
(
serDiseases
.
getZls
());
diseaseLevelList
.
add
(
diseaseLevel1
);
}
if
(
diseaseLevelResult
!=
null
)
{
...
...
bsoft-api/src/main/resources/application-test.properties
View file @
fc4420fb
...
...
@@ -5,10 +5,7 @@ spring.datasource.password=Suvalue2016
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
project.path
=
sy_test/test
#spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
#spring.datasource.username=scml_zp_cs
#spring.datasource.password=123
#spring.datasource.url=jdbc:oracle:thin:@192.168.18.171:1521:his
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA40\uFF09
spring.redis.database
=
1
...
...
bsoft-api/src/main/resources/application.properties
View file @
fc4420fb
...
...
@@ -20,6 +20,6 @@ mybatis.configuration.call-setters-on-nulls=true
version.number
=
1.02.0710001
version.date
=
2020.07.10
version.remarks
=
\u
75C5
\u
7EC4
\u
6DFB
\u
52A0
\u5206\u
7EC4
\u
5B57
\u
6BB5
\ No newline at end of file
version.number
=
1.02.0713001
version.date
=
2020.07.13
version.remarks
=
\u
75C5
\u
7EC4
\u
6DFB
\u
52A0
\u
603B
\u
4F8B
\u6570\u
5B57
\u
6BB5
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
View file @
fc4420fb
...
...
@@ -28,6 +28,7 @@
<result
column=
"ORG_ID"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
<result
column=
"ORG_NAME"
jdbcType=
"VARCHAR"
property=
"orgName"
/>
<result
column=
"GROUP_TYPE"
jdbcType=
"VARCHAR"
property=
"groupType"
/>
<result
column=
"ZLS"
jdbcType=
"VARCHAR"
property=
"zls"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDisease"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
...
...
@@ -83,7 +84,7 @@
</select>
<select
id=
"selectByLevel"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
,val.ZLS
from SER_DISEASE d
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
...
...
@@ -116,7 +117,7 @@
</select>
<select
id=
"selectByParentId"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
,val.ZLS
from SER_DISEASE d
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
...
...
@@ -139,7 +140,7 @@
</select>
<select
id=
"selectByParentIdNoZbz"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
,val.ZLS
from SER_DISEASE d
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
...
...
@@ -161,30 +162,37 @@
order by val.ZLS desc
</select>
<select
id=
"selectParentById"
resultMap=
"DiseaseLevel"
>
select *
from SER_DISEASE
where 1 = 1 and STATE=1
select d.*,val.ZLS
from SER_DISEASE d
join (select ZBZBM,SUM(ZLS) as ZLS
from val_block_values_1_1_2
where TIME=#{date} and ZLS>0
group by ZBZBM) val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and d.STATE=1
<if
test=
"diseaseId!=null"
>
and d.id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} )
</if>
</select>
<select
id=
"selectParentByIdNoZbz"
resultMap=
"DiseaseLevel"
>
select d.*,val.ZLS
from SER_DISEASE d
join (select ZBZBM,SUM(ZLS) as ZLS
from val_block_values_1_3_2
where TIME=#{date}
group by ZBZBM) val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and d.STATE=1
<if
test=
"diseaseId!=null"
>
and id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} )
and
d.
id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} )
</if>
</select>
<!-- <select id="selectSonById" resultMap="DiseaseLevel">-->
<!-- select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,-->
<!-- d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME-->
<!-- from SER_DISEASE d,SER_DISEASE_DOC_RS rs-->
<!-- where 1 = 1 and STATE=1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE-->
<!-- <if test="diseaseId!=null">-->
<!-- and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test="deptCode!=null">-->
<!-- and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- order by d.MDC_NUM-->
<!-- </select> -->
<select
id=
"selectSonById"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME,d.GROUP_TYPE
,val.ZLS
from SER_DISEASE d
join (select ZBZBM,SUM(ZLS) as ZLS
from val_block_values_1_3_2
where TIME=#{date}
group by ZBZBM) val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and STATE=1 and STATE=1
<if
test=
"diseaseId!=null"
>
and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}
...
...
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