Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王浩
zh-baseversion-project
Commits
bd2101c7
Commit
bd2101c7
authored
Aug 02, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 大屏端 气量监管 按照 企业 政府角色区分查询统计
parent
cee87591
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
TSupBalGasSupMapper.java
...in/java/com/zehong/system/mapper/TSupBalGasSupMapper.java
+3
-1
ITSupBalGasSupService.java
...java/com/zehong/system/service/ITSupBalGasSupService.java
+5
-0
TSupBalGasSupServiceImpl.java
.../zehong/system/service/impl/TSupBalGasSupServiceImpl.java
+17
-1
TSupBalGasSupMapper.xml
.../src/main/resources/mapper/system/TSupBalGasSupMapper.xml
+3
-0
No files found.
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TSupBalGasSupMapper.java
View file @
bd2101c7
...
...
@@ -5,6 +5,8 @@ import java.util.Map;
import
com.zehong.system.domain.Statistics
;
import
com.zehong.system.domain.TSupBalGasSup
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.security.core.parameters.P
;
/**
* 供需平衡-气量监管Mapper接口
...
...
@@ -30,7 +32,7 @@ public interface TSupBalGasSupMapper
*/
public
List
<
TSupBalGasSup
>
selectTSupBalGasSupList
(
TSupBalGasSup
tSupBalGasSup
);
public
List
<
Statistics
>
tSupBalGasSupStatistics
(
List
<
String
>
sevenDate
);
public
List
<
Statistics
>
tSupBalGasSupStatistics
(
@Param
(
"list"
)
List
<
String
>
sevenDate
,
@Param
(
"companyInfoId"
)
String
companyInfoId
);
/**
* 新增供需平衡-气量监管
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITSupBalGasSupService.java
View file @
bd2101c7
...
...
@@ -29,6 +29,11 @@ public interface ITSupBalGasSupService
*/
public
List
<
TSupBalGasSup
>
selectTSupBalGasSupList
(
TSupBalGasSup
tSupBalGasSup
);
/**
*
* @param sevenDate s
* @return
*/
public
List
<
Statistics
>
tSupBalGasSupStatistics
(
List
<
String
>
sevenDate
);
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TSupBalGasSupServiceImpl.java
View file @
bd2101c7
...
...
@@ -4,7 +4,9 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.zehong.common.core.domain.entity.SysRole
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.system.domain.Statistics
;
...
...
@@ -53,7 +55,12 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService
@Override
public
List
<
Statistics
>
tSupBalGasSupStatistics
(
List
<
String
>
sevenDate
)
{
return
tSupBalGasSupMapper
.
tSupBalGasSupStatistics
(
sevenDate
);
String
companyInfoId
=
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
();
if
(!
isQy
())
{
companyInfoId
=
null
;
}
return
tSupBalGasSupMapper
.
tSupBalGasSupStatistics
(
sevenDate
,
companyInfoId
);
}
/**
...
...
@@ -137,4 +144,13 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService
}
/**
* 判断是否为政府角色
* @return
*/
private
boolean
isQy
(){
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
List
<
String
>
roleKeys
=
roles
.
stream
().
map
(
item
->
item
.
getRoleKey
()).
collect
(
Collectors
.
toList
());
return
roleKeys
.
contains
(
"qy"
);
}
}
zh-baseversion-system/src/main/resources/mapper/system/TSupBalGasSupMapper.xml
View file @
bd2101c7
...
...
@@ -82,6 +82,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_sup_bal_gas_sup
WHERE
is_del='0'
<if
test=
"companyInfoId != null"
>
and f_company_info_id = #{companyInfoId}
</if>
and
DATE_FORMAT( f_calendar_date, '%Y-%m-%d' ) IN
<foreach
collection=
"list"
item=
"sevenDate"
separator=
","
open=
"("
close=
")"
>
...
...
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