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
445c569b
Commit
445c569b
authored
Jun 23, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预算编制修改
parent
a6c18b8b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
41 deletions
+74
-41
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseServiceImpl.java
+22
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+12
-12
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
+40
-29
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
+0
-0
No files found.
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerDiseaseServiceImpl.java
View file @
445c569b
package
com
.
bsoft
.
api
.
service
.
Impl
;
import
com.bsoft.api.common.exceptions.DBConfigurationError
;
import
com.bsoft.api.mapper.DicOrgMapper
;
import
com.bsoft.api.mapper.SerDiseaseMapper
;
import
com.bsoft.api.mapper.SysRoleMapper
;
import
com.bsoft.api.model.SerDepartment
;
import
com.bsoft.api.model.SerDisease
;
import
com.bsoft.api.model.SysRole
;
import
com.bsoft.api.model.respmodel.DiseaseLevel
;
import
com.bsoft.api.service.SerDiseaseService
;
import
com.bsoft.common.utils.StringUtil
;
...
...
@@ -15,12 +20,29 @@ import java.util.List;
public
class
SerDiseaseServiceImpl
implements
SerDiseaseService
{
@Resource
private
SerDiseaseMapper
serDiseaseMapper
;
@Resource
private
SysRoleMapper
sysRoleMapper
;
@Resource
private
DicOrgMapper
dicOrgMapper
;
@Override
public
List
<
DiseaseLevel
>
selectListByIdorLevel
(
String
date
,
String
diseaseCode
,
Integer
level
,
String
docCode
,
String
deptCode
,
Long
userId
)
{
List
<
DiseaseLevel
>
list
=
new
ArrayList
<>();
docCode
=
StringUtil
.
isNullOrEmpty
(
docCode
)
?
null
:
docCode
;
deptCode
=
StringUtil
.
isNullOrEmpty
(
deptCode
)
?
null
:
deptCode
;
//判断用户角色
SysRole
role
=
sysRoleMapper
.
selectByUser
(
userId
);
if
(
role
!=
null
)
{
if
(
role
.
getRoleCode
().
equals
(
2
)
&&
StringUtil
.
isNullOrBlank
(
deptCode
))
{
//科室账号科室入参为空时自动分配科室
List
<
SerDepartment
>
deptList
=
dicOrgMapper
.
selectDeptByUser
(
userId
,
null
);
if
(
deptList
!=
null
&&
deptList
.
size
()
>
0
)
deptCode
=
deptList
.
get
(
0
).
getKsbm
();
}
}
else
{
throw
new
DBConfigurationError
(
"用户未分配角色!"
);
}
if
(
diseaseCode
!=
null
&&
diseaseCode
!=
""
)
{
list
=
selectByCode
(
date
,
diseaseCode
,
docCode
,
deptCode
,
userId
);
}
else
{
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
View file @
445c569b
...
...
@@ -130,19 +130,19 @@ public class SerProjValueServiceImpl implements SerProjValueService {
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
)
{
projType
=
new
SummaryProjType
();
projType
.
setProjTypeName
(
String
.
valueOf
(
enumInfo
.
get
(
"description"
)));
values
=
serProjValueMapper
.
selectValue
((
Integer
)
enumInfo
.
get
(
"value"
),
null
,
values
=
serProjValueMapper
.
selectValue
((
Integer
)
enumInfo
.
get
(
"value"
),
null
,
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
if
(
values
!=
null
&&
values
.
size
()
>
0
)
{
for
(
SerProjValueResp
value
:
values
)
{
valueSz
=
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
summary
.
getDeptCode
(),
orgCode
);
if
(
valueSz
!=
null
)
{
value
.
setSz
(
valueSz
.
getSz
());
value
.
setZxpl
(
valueSz
.
getZxpl
());
valueSz
=
null
;
}
}
projType
.
setProject
(
values
);
}
//
if (values != null && values.size() > 0) {
//
for (SerProjValueResp value : values) {
//
valueSz = projValueSzMapper.selectByProj(value.getProjId(), date, summary.getDeptCode(), orgCode);
//
if (valueSz != null) {
//
value.setSz(valueSz.getSz());
//
value.setZxpl(valueSz.getZxpl());
//
valueSz = null;
//
}
//
}
projType
.
setProject
(
values
);
//
}
summary
.
getProjTypeList
().
add
(
projType
);
}
}
else
{
...
...
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
View file @
445c569b
...
...
@@ -86,12 +86,18 @@
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2
where TIME=#{date} and ZLS>0
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
<if
test=
"deptCode!=null"
>
and val.KSBM=#{deptCode,jdbcType=VARCHAR}
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2
where TIME=#{date} and ZLS>0
and KSBM=#{deptCode,jdbcType=VARCHAR}
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
</if>
<if
test=
"deptCode==null"
>
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
</if>
where 1 = 1 and STATE=1
<if
test=
"level!=null"
>
...
...
@@ -100,15 +106,6 @@
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if
test=
"deptCode==null"
>
and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE
)
</if>
order by val.ZLS desc
</select>
<select
id=
"selectByLevelNoZBZ"
resultMap=
"DiseaseLevel"
>
...
...
@@ -138,12 +135,18 @@
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2
where TIME=#{date} and ZLS>0
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
<if
test=
"deptCode!=null"
>
and val.KSBM=#{deptCode,jdbcType=VARCHAR}
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2
where TIME=#{date} and ZLS>0
and KSBM=#{deptCode,jdbcType=VARCHAR}
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
</if>
<if
test=
"deptCode==null"
>
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
</if>
where 1 = 1 and STATE=1 and STATE=1
<if
test=
"parentId!=null"
>
...
...
@@ -152,26 +155,34 @@
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
<if
test=
"deptCode==null"
>
and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE
)
</if>
order by val.ZLS desc
</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
from SER_DISEASE d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2
where TIME=#{date}
and KSBM=#{deptCode,jdbcType=VARCHAR}
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
</if>
<if
test=
"deptCode==null"
>
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
</if>
where 1 = 1 and STATE=1 and STATE=1
<if
test=
"parentId!=null"
>
and d.PARENT_ID = #{parentId,jdbcType=DECIMAL}
</if>
order by d.MDC_NUM
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by val.ZLS desc
</select>
<select
id=
"selectParentById"
resultMap=
"DiseaseLevel"
>
select *
...
...
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
View file @
445c569b
This diff is collapsed.
Click to expand it.
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