Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data_management_system
Project
Project
Details
Activity
Releases
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
张伯涛
data_management_system
Commits
1b54cf30
Commit
1b54cf30
authored
Dec 03, 2022
by
王琮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页统计
parent
641d7e6f
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
258 additions
and
125 deletions
+258
-125
YxryController.java
.../java/com/ruoyi/web/controller/system/YxryController.java
+2
-2
Yxry.java
ruoyi-system/src/main/java/com/ruoyi/system/domain/Yxry.java
+45
-0
FcryMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/FcryMapper.java
+3
-2
FkqkMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/FkqkMapper.java
+4
-4
GldryMapper.java
...em/src/main/java/com/ruoyi/system/mapper/GldryMapper.java
+3
-2
HscjMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/HscjMapper.java
+2
-1
SysUserMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
+15
-13
YxryMapper.java
...tem/src/main/java/com/ruoyi/system/mapper/YxryMapper.java
+2
-2
IYxryService.java
.../src/main/java/com/ruoyi/system/service/IYxryService.java
+1
-1
YxryServiceImpl.java
...n/java/com/ruoyi/system/service/impl/YxryServiceImpl.java
+70
-31
FcryMapper.xml
ruoyi-system/src/main/resources/mapper/system/FcryMapper.xml
+20
-10
FkqkMapper.xml
ruoyi-system/src/main/resources/mapper/system/FkqkMapper.xml
+23
-14
GldryMapper.xml
...i-system/src/main/resources/mapper/system/GldryMapper.xml
+20
-10
HscjMapper.xml
ruoyi-system/src/main/resources/mapper/system/HscjMapper.xml
+10
-7
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+26
-22
YxryMapper.xml
ruoyi-system/src/main/resources/mapper/system/YxryMapper.xml
+12
-4
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/YxryController.java
View file @
1b54cf30
...
...
@@ -51,9 +51,9 @@ public class YxryController extends BaseController
* 获取首页数据
*/
@GetMapping
(
value
=
"/statistics"
)
public
AjaxResult
statistics
()
public
AjaxResult
statistics
(
Yxry
yxry
)
{
return
success
(
yxryService
.
statistics
());
return
success
(
yxryService
.
statistics
(
yxry
));
}
/**
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/Yxry.java
View file @
1b54cf30
package
com
.
ruoyi
.
system
.
domain
;
import
java.time.LocalDate
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
org.springframework.data.annotation.Transient
;
/**
* 阳性人员对象 yxry
...
...
@@ -148,6 +150,17 @@ public class Yxry extends BaseEntity
/** 身份证是否重复 */
private
String
isCf
;
@Transient
private
String
begin
;
@Transient
private
String
end
;
@Transient
private
String
value
;
@Transient
private
LocalDate
date
;
/** 采样时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
@@ -306,6 +319,14 @@ public class Yxry extends BaseEntity
this
.
committee
=
committee
;
}
public
LocalDate
getDate
()
{
return
date
;
}
public
void
setDate
(
LocalDate
date
)
{
this
.
date
=
date
;
}
public
String
getFcName
()
{
return
fcName
;
}
...
...
@@ -338,6 +359,30 @@ public class Yxry extends BaseEntity
this
.
cyTime
=
cyTime
;
}
public
String
getBegin
()
{
return
begin
;
}
public
void
setBegin
(
String
begin
)
{
this
.
begin
=
begin
;
}
public
String
getEnd
()
{
return
end
;
}
public
void
setEnd
(
String
end
)
{
this
.
end
=
end
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/FcryMapper.java
View file @
1b54cf30
...
...
@@ -4,6 +4,7 @@ import java.time.LocalDate;
import
java.util.List
;
import
com.ruoyi.system.domain.Fcry
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -70,9 +71,9 @@ public interface FcryMapper
List
<
Gldry
>
selectGldryByCard
(
@Param
(
"cardNo"
)
String
cardNo
,
@Param
(
"id"
)
Long
id
);
int
selectToday
(
@Param
(
"date"
)
LocalDate
date
);
int
selectToday
(
Yxry
yxry
);
int
selectCurrent
();
int
selectCurrent
(
Yxry
yxry
);
List
<
Fcry
>
selectAll
();
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/FkqkMapper.java
View file @
1b54cf30
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import
java.time.LocalDate
;
import
java.util.List
;
import
com.ruoyi.system.domain.Fkqk
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -71,19 +72,18 @@ public interface FkqkMapper
/**
* 查询小区封控情况列表
*
* @param today 当天日期
* @return 小区封控情况集合
*/
public
List
<
Fkqk
>
selectFkToday
(
@Param
(
"today"
)
LocalDate
toda
y
);
public
List
<
Fkqk
>
selectFkToday
(
Yxry
yxr
y
);
/**
* 查询小区封控情况列表
*
* @return 小区封控情况集合
*/
public
List
<
Fkqk
>
selectCurrent
();
public
List
<
Fkqk
>
selectCurrent
(
Yxry
yxry
);
// 根据小区分组
List
<
Fkqk
>
selectCumulativeData
();
List
<
Fkqk
>
selectCumulativeData
(
Yxry
yxry
);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/GldryMapper.java
View file @
1b54cf30
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import
java.time.LocalDate
;
import
java.util.List
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -69,9 +70,9 @@ public interface GldryMapper
*/
List
<
Gldry
>
selectGldryByCard
(
@Param
(
"cardNo"
)
String
cardNo
,
@Param
(
"id"
)
Long
id
);
int
selectToday
(
@Param
(
"date"
)
LocalDate
date
);
int
selectToday
(
Yxry
yxry
);
int
selectCurrent
();
int
selectCurrent
(
Yxry
yxry
);
List
<
Gldry
>
selectAll
();
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/HscjMapper.java
View file @
1b54cf30
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
com.ruoyi.system.domain.Hscj
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -62,7 +63,7 @@ public interface HscjMapper
List
<
Hscj
>
checkCard
(
Hscj
hscj
);
List
<
Hscj
>
selectToday
(
@Param
(
"begin"
)
String
begin
,
@Param
(
"end"
)
String
end
);
List
<
Hscj
>
selectToday
(
Yxry
yxry
);
List
<
Hscj
>
checkCardBatch
(
List
<
Hscj
>
hscjList
);
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
View file @
1b54cf30
...
...
@@ -126,4 +126,6 @@ public interface SysUserMapper
public
SysUser
checkEmailUnique
(
String
email
);
public
String
selectUserTypeById
(
Long
id
);
public
String
selectTypeById
(
Long
id
);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/YxryMapper.java
View file @
1b54cf30
...
...
@@ -67,9 +67,9 @@ public interface YxryMapper
int
updateBatchYxry
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
List
<
Yxry
>
statistics
(
@Param
(
"begin"
)
String
begin
,
@Param
(
"end"
)
String
end
);
List
<
Yxry
>
statistics
(
Yxry
yxry
);
int
selectNum
();
int
selectNum
(
Yxry
userType
);
int
updateBatch
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/IYxryService.java
View file @
1b54cf30
...
...
@@ -68,5 +68,5 @@ public interface IYxryService
Map
selectByCard
(
String
card
);
Map
statistics
();
Map
statistics
(
Yxry
yxry
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/YxryServiceImpl.java
View file @
1b54cf30
...
...
@@ -18,6 +18,7 @@ import com.ruoyi.system.mapper.FcryMapper;
import
com.ruoyi.system.mapper.FkqkMapper
;
import
com.ruoyi.system.mapper.GldryMapper
;
import
com.ruoyi.system.mapper.HscjMapper
;
import
com.ruoyi.system.mapper.SysUserMapper
;
import
io.netty.util.internal.ObjectUtil
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.math3.stat.descriptive.summary.Product
;
...
...
@@ -41,6 +42,9 @@ public class YxryServiceImpl implements IYxryService {
@Autowired
private
FcryMapper
fcryMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
@Autowired
private
YxryMapper
yxryMapper
;
...
...
@@ -298,7 +302,8 @@ public class YxryServiceImpl implements IYxryService {
}
@Override
public
Map
statistics
()
{
@DataScope
(
deptAlias
=
"d"
,
userAlias
=
"u"
)
public
Map
statistics
(
Yxry
yxry
)
{
Map
map
=
new
HashMap
();
List
<
Object
>
todayData
=
new
ArrayList
<>();
Map
today
=
new
HashMap
();
...
...
@@ -306,65 +311,99 @@ public class YxryServiceImpl implements IYxryService {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
begin
=
sdf
.
format
(
TimeUtils
.
getStartTime
());
String
end
=
sdf
.
format
(
TimeUtils
.
getEndTime
());
List
<
Yxry
>
yxryList
=
yxryMapper
.
statistics
(
begin
,
end
);
// 按照权限查询
String
type
=
sysUserMapper
.
selectTypeById
(
SecurityUtils
.
getUserId
());
String
userType
=
sysUserMapper
.
selectUserTypeById
(
SecurityUtils
.
getUserId
());
yxry
.
setBegin
(
begin
);
yxry
.
setEnd
(
end
);
yxry
.
setUserType
(
userType
);
if
(
userType
!=
null
&&
userType
.
equals
(
"00"
))
yxry
.
setUserType
(
"1"
);
if
(
"2"
.
equals
(
userType
))
yxry
.
setValue
(
DataUtils
.
getKey
(
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
,
null
));
else
if
(
"3"
.
equals
(
userType
))
yxry
.
setValue
(
DataUtils
.
getKey
(
null
,
null
,
String
.
valueOf
(
SecurityUtils
.
getUserId
()),
null
,
null
));
List
<
Yxry
>
yxryList
=
yxryMapper
.
statistics
(
yxry
);
today
.
put
(
"positiveNum"
,
yxryList
.
size
());
// 涉及小区数量
today
.
put
(
"PositiveAreaNum"
,
yxryList
.
stream
().
filter
(
y
->
ObjectUtils
.
isNotEmpty
(
y
.
getCommunity
())
)
.
distinct
().
map
(
Yxry:
:
getCommunity
).
collect
(
Collectors
.
toList
()).
size
());
today
.
put
(
"PositiveAreaNum"
,
yxryList
.
stream
().
filter
(
y
->
y
.
getCommunity
()
!=
null
)
.
map
(
Yxry:
:
getCommunity
).
distinct
(
).
collect
(
Collectors
.
toList
()).
size
());
// 涉及单元数量
Map
<
String
,
List
<
Yxry
>>
prodMap
=
yxryList
.
stream
().
filter
(
y
->
Object
Utils
.
isNotEmpty
(
y
.
getCommunity
())
&&
ObjectUtils
.
isNotEmpty
(
y
.
getBuilding
())
&&
Object
Utils
.
isNotEmpty
(
y
.
getUnit
()))
Map
<
String
,
List
<
Yxry
>>
prodMap
=
yxryList
.
stream
().
filter
(
y
->
String
Utils
.
isNotEmpty
(
y
.
getCommunity
())
&&
StringUtils
.
isNotEmpty
(
y
.
getBuilding
())
&&
String
Utils
.
isNotEmpty
(
y
.
getUnit
()))
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getBuilding
()
+
"_"
+
item
.
getUnit
()));
today
.
put
(
"unitBuildingInvolvedNum"
,
prodMap
.
keySet
().
size
());
// 查询当天采集异常数据(身份证不为空)
List
<
Hscj
>
hscjList
=
hscjMapper
.
selectToday
(
begin
,
end
);
today
.
put
(
"abnormalMixingNum"
,
hscjList
.
stream
().
filter
(
cj
->
ObjectUtils
.
isNotEmpty
(
cj
.
getCjgh
())).
distinct
(
)
.
map
(
Hscj:
:
getCjgh
).
collect
(
Collectors
.
toList
()).
size
());
today
.
put
(
"abnormalMixingOfPipesNum"
,
hscjList
.
stream
().
distinct
().
map
(
Hscj:
:
getCardNo
).
collect
(
Collectors
.
toList
()).
size
());
List
<
Hscj
>
hscjList
=
hscjMapper
.
selectToday
(
yxry
);
today
.
put
(
"abnormalMixingNum"
,
hscjList
.
stream
().
filter
(
cj
->
StringUtils
.
isNotEmpty
(
cj
.
getCjgh
())
)
.
map
(
Hscj:
:
getCjgh
).
distinct
().
collect
(
Collectors
.
toList
()).
size
());
today
.
put
(
"abnormalMixingOfPipesNum"
,
hscjList
.
stream
().
map
(
Hscj:
:
getCardNo
).
distinct
(
).
collect
(
Collectors
.
toList
()).
size
());
// 查询封控数据
LocalDate
date
=
LocalDate
.
now
(
);
List
<
Fkqk
>
fkqkList
=
fkqkMapper
.
selectFkToday
(
date
);
yxry
.
setDate
(
LocalDate
.
now
()
);
List
<
Fkqk
>
fkqkList
=
fkqkMapper
.
selectFkToday
(
yxry
);
// 获取真实时间是空的
today
.
put
(
"cellBlockingControlNum"
,
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isEmpty
(
f
.
getRealTime
())
&&
Object
Utils
.
isNotEmpty
(
f
.
getCommunity
()))
.
distinct
().
map
(
Fkqk:
:
getCommunity
).
collect
(
Collectors
.
toList
()).
size
());
&&
String
Utils
.
isNotEmpty
(
f
.
getCommunity
()))
.
map
(
Fkqk:
:
getCommunity
).
distinct
(
).
collect
(
Collectors
.
toList
()).
size
());
Map
<
String
,
List
<
Fkqk
>>
fkMap
=
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isEmpty
(
f
.
getRealTime
())
&&
ObjectUtils
.
isNotEmpty
(
f
.
getFloor
())
&&
Object
Utils
.
isNotEmpty
(
f
.
getUnit
()))
&&
StringUtils
.
isNotEmpty
(
f
.
getFloor
())
&&
String
Utils
.
isNotEmpty
(
f
.
getUnit
()))
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
today
.
put
(
"unitSealingControlNum"
,
fkMap
.
keySet
().
size
());
Map
<
String
,
List
<
Fkqk
>>
jfMap
=
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isNotEmpty
(
f
.
getRealTime
())
&&
ObjectUtils
.
isNotEmpty
(
f
.
getFloor
())
&&
Object
Utils
.
isNotEmpty
(
f
.
getUnit
()))
&&
StringUtils
.
isNotEmpty
(
f
.
getFloor
())
&&
String
Utils
.
isNotEmpty
(
f
.
getUnit
()))
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
today
.
put
(
"unpackingUnitNum"
,
jfMap
.
keySet
().
size
());
today
.
put
(
"transferToShelterNum"
,
fcryMapper
.
selectToday
(
date
));
today
.
put
(
"transferToIsolationPointNum"
,
gldryMapper
.
selectToday
(
date
));
Yxry
y
=
new
Yxry
();
y
.
setUserType
(
null
);
y
.
setParams
(
yxry
.
getParams
());
y
.
setDate
(
yxry
.
getDate
());
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"0"
))
{
yxry
.
setUserType
(
type
);
today
.
put
(
"transferToShelterNum"
,
fcryMapper
.
selectToday
(
yxry
)
+
"/"
+
fcryMapper
.
selectToday
(
y
));
}
else
today
.
put
(
"transferToShelterNum"
,
fcryMapper
.
selectToday
(
yxry
));
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"1"
))
{
yxry
.
setUserType
(
type
);
today
.
put
(
"transferToIsolationPointNum"
,
gldryMapper
.
selectToday
(
yxry
)
+
"/"
+
gldryMapper
.
selectToday
(
y
));
}
else
today
.
put
(
"transferToIsolationPointNum"
,
gldryMapper
.
selectToday
(
yxry
));
todayData
.
add
(
today
);
map
.
put
(
"todayData"
,
todayData
);
List
<
Object
>
currentData
=
new
ArrayList
<>();
Map
curr
=
new
HashMap
();
curr
.
put
(
"isolationPointNum"
,
gldryMapper
.
selectCurrent
());
curr
.
put
(
"sheltersNum"
,
fcryMapper
.
selectCurrent
());
List
<
Fkqk
>
fkqks
=
fkqkMapper
.
selectCurrent
();
List
<
String
>
j
=
fkqks
.
stream
().
distinct
().
map
(
Fkqk:
:
getCommunity
)
.
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
j
.
size
());
curr
.
put
(
"BlockedControlCellNum"
,
fkqks
.
stream
().
distinct
().
map
(
Fkqk:
:
getCommunity
).
collect
(
Collectors
.
toList
()).
size
());
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"1"
))
{
yxry
.
setUserType
(
type
);
curr
.
put
(
"isolationPointNum"
,
gldryMapper
.
selectCurrent
(
yxry
)
+
"/"
+
gldryMapper
.
selectCurrent
(
y
));
}
else
curr
.
put
(
"isolationPointNum"
,
gldryMapper
.
selectCurrent
(
yxry
));
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"0"
))
{
yxry
.
setUserType
(
type
);
curr
.
put
(
"sheltersNum"
,
fcryMapper
.
selectCurrent
(
yxry
)
+
"/"
+
fcryMapper
.
selectCurrent
(
y
));
}
else
curr
.
put
(
"sheltersNum"
,
fcryMapper
.
selectCurrent
(
yxry
));
yxry
.
setUserType
(
userType
);
if
(
userType
!=
null
&&
userType
.
equals
(
"00"
))
yxry
.
setUserType
(
"1"
);
List
<
Fkqk
>
fkqks
=
fkqkMapper
.
selectCurrent
(
yxry
);
curr
.
put
(
"BlockedControlCellNum"
,
fkqks
.
stream
().
map
(
Fkqk:
:
getCommunity
).
distinct
().
collect
(
Collectors
.
toList
()).
size
());
Map
<
String
,
List
<
Fkqk
>>
fk
=
fkqks
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
curr
.
put
(
"sealingControlUnitNum"
,
fk
.
keySet
().
size
());
List
<
Yxry
>
yxries
=
yxryMapper
.
statistics
(
null
,
null
);
yxry
.
setBegin
(
null
);
yxry
.
setEnd
(
null
);
List
<
Yxry
>
yxries
=
yxryMapper
.
statistics
(
yxry
);
curr
.
put
(
"positivePersonnelNum"
,
yxries
.
size
());
currentData
.
add
(
curr
);
map
.
put
(
"currentData"
,
currentData
);
List
<
Object
>
CumulativeData
=
new
ArrayList
<>();
Map
cum
=
new
HashMap
();
cum
.
put
(
"CumulativePositivePerNum"
,
yxryMapper
.
selectNum
());
List
<
Fkqk
>
fks
=
fkqkMapper
.
selectCumulativeData
();
cum
.
put
(
"CumulativePositivePerNum"
,
yxryMapper
.
selectNum
(
yxry
));
List
<
Fkqk
>
fks
=
fkqkMapper
.
selectCumulativeData
(
yxry
);
cum
.
put
(
"CumulativeSealingControlUnitNum"
,
fks
.
size
());
cum
.
put
(
"CumulativeBlockedControlCellNum"
,
fks
.
stream
().
distinct
().
map
(
Fkqk:
:
getCommunity
)
cum
.
put
(
"CumulativeBlockedControlCellNum"
,
fks
.
stream
().
map
(
Fkqk:
:
getCommunity
).
distinct
(
)
.
collect
(
Collectors
.
toList
()).
size
());
cum
.
put
(
"CumulativeUnpackingUnitNum"
,
fks
.
stream
().
filter
(
f
->
f
.
getRealTime
()
!=
null
)
.
distinct
().
map
(
Fkqk:
:
getCommunity
)
cum
.
put
(
"CumulativeUnpackingUnitNum"
,
fks
.
stream
().
filter
(
f
->
f
.
getRealTime
()
!=
null
)
.
map
(
Fkqk:
:
getCommunity
).
distinct
(
)
.
collect
(
Collectors
.
toList
()).
size
());
CumulativeData
.
add
(
cum
);
map
.
put
(
"CumulativeData"
,
CumulativeData
);
...
...
ruoyi-system/src/main/resources/mapper/system/FcryMapper.xml
View file @
1b54cf30
...
...
@@ -149,18 +149,28 @@
<if
test=
"id != null"
>
and id != #{id}
</if>
</select>
<select
id=
"selectToday"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
from fcry
where zr_time = #{date}
and del_flag = '0'
and card_no is not null
select count(DISTINCT f.card_no)
from fcry f
left join sys_user u on u.user_id = f.create_by
left join sys_dept d on u.dept_id = d.dept_id
where f.zr_time = #{date}
and f.del_flag = '0'
and f.card_no is not null
<if
test=
"userType != null and userType == '0'.toString()"
>
${params.dataScope}
</if>
<if
test=
"userType != null and userType == '2'.toString()"
>
and f.street = #{value}
</if>
<if
test=
"userType != null and userType == '3'.toString()"
>
and f.committee = #{value}
</if>
</select>
<select
id=
"selectCurrent"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
from fcry
where zc_time is null
and del_flag = '0'
and card_no is not null
select count(DISTINCT f.card_no)
from fcry f
left join sys_user u on u.user_id = f.create_by
left join sys_dept d on u.dept_id = d.dept_id
where f.zc_time is null
and f.del_flag = '0'
and f.card_no is not null
<if
test=
"userType != null and userType == '0'.toString()"
>
${params.dataScope}
</if>
<if
test=
"userType != null and userType == '2'.toString()"
>
and f.street = #{value}
</if>
<if
test=
"userType != null and userType == '3'.toString()"
>
and f.committee = #{value}
</if>
</select>
<insert
id=
"insertFcry"
parameterType=
"Fcry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
ruoyi-system/src/main/resources/mapper/system/FkqkMapper.xml
View file @
1b54cf30
...
...
@@ -73,24 +73,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE dict_type = 'shelter_name' AND status = '0'
</select>
<select
id=
"selectFkToday"
resultMap=
"FkqkResult"
>
select community, floor, unit, fk_time, real_time
from fkqk
where del_flag = '0' and (fk_time = #{today}
or real_time = #{today} )
select f.community, f.floor, f.unit, f.fk_time, f.real_time
from fkqk f
left join sys_user u on u.user_id = f.create_by
left join sys_dept d on u.dept_id = d.dept_id
where f.del_flag = '0' and (f.fk_time = #{date}
or f.real_time = #{date} )
<if
test=
"userType != null and userType != '1'.toString() "
>
${params.dataScope}
</if>
</select>
<select
id=
"selectCurrent"
resultMap=
"FkqkResult"
>
select community, floor, unit, fk_time, real_time
from fkqk
where del_flag = '0'
and real_time is null
and community is not null
select k.community, k.floor, k.unit, k.fk_time, k.real_time
from fkqk k
left join sys_user u on u.user_id = k.create_by
left join sys_dept d on u.dept_id = d.dept_id
where k.del_flag = '0'
and k.real_time is null
and k.community is not null
<if
test=
"userType != null and userType != '1'.toString() "
>
${params.dataScope}
</if>
</select>
<select
id=
"selectCumulativeData"
resultMap=
"FkqkResult"
>
<include
refid=
"selectFkqkVo"
/>
where del_flag = '0'
and community is not null
and floor is not null
and unit is not null
select k.community,k.floor, k.unit, k.fk_time, k.real_time from fkqk k
left join sys_user u on u.user_id = k.create_by
left join sys_dept d on u.dept_id = d.dept_id
where k.del_flag = '0'
and k.community is not null
and k.floor is not null
and k.unit is not null
<if
test=
"userType != null and userType != '1'.toString() "
>
${params.dataScope}
</if>
group by community,floor, unit
</select>
<insert
id=
"insertFkqk"
parameterType=
"Fkqk"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
ruoyi-system/src/main/resources/mapper/system/GldryMapper.xml
View file @
1b54cf30
...
...
@@ -82,19 +82,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"id != null"
>
and id != #{id}
</if>
</select>
<select
id=
"selectToday"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
from gldry
where zr_time = #{date}
and del_flag = '0'
and card_no is not null
select count(DISTINCT g.card_no)
from gldry g
left join sys_user u on u.user_id = g.create_by
left join sys_dept d on u.dept_id = d.dept_id
where g.zr_time = #{date}
and g.del_flag = '0'
and g.card_no is not null
<if
test=
"userType != null and userType == '1'.toString()"
>
${params.dataScope}
</if>
<if
test=
"userType != null and userType == '2'.toString()"
>
and g.street = #{value}
</if>
<if
test=
"userType != null and userType == '3'.toString()"
>
and g.committee = #{value}
</if>
</select>
<select
id=
"selectCurrent"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
from gldry
where zc_time is null
and del_flag = '0'
and card_no is not null
select count(DISTINCT g.card_no)
from gldry g
left join sys_user u on u.user_id = g.create_by
left join sys_dept d on u.dept_id = d.dept_id
where g.zc_time is null
and g.del_flag = '0'
and g.card_no is not null
<if
test=
"userType != null and userType == '1'.toString()"
>
${params.dataScope}
</if>
<if
test=
"userType != null and userType == '2'.toString()"
>
and g.street = #{value}
</if>
<if
test=
"userType != null and userType == '3'.toString()"
>
and g.committee = #{value}
</if>
</select>
<insert
id=
"insertGldry"
parameterType=
"Gldry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
ruoyi-system/src/main/resources/mapper/system/HscjMapper.xml
View file @
1b54cf30
...
...
@@ -133,13 +133,16 @@
</select>
<select
id=
"selectToday"
resultType=
"com.ruoyi.system.domain.Hscj"
>
select card_no, cjgh
from hscj
where cj_result = '0'
and del_flag = '0'
and is_hun = '1'
and cj_time BETWEEN #{begin} and #{end}
and card_no is not null
select j.card_no, j.cjgh
from hscj j
left join sys_user u on u.user_id = j.create_by
left join sys_dept d on u.dept_id = d.dept_id
where j.cj_result = '0'
and j.del_flag = '0'
and j.is_hun = '1'
and j.cj_time BETWEEN #{begin} and #{end}
and j.card_no is not null
<if
test=
"userType != null and userType != '1'.toString() "
>
${params.dataScope}
</if>
</select>
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
1b54cf30
...
...
@@ -146,6 +146,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select user_type from sys_user where user_id = #{id}
</select>
<select
id=
"selectTypeById"
parameterType=
"Long"
resultType=
"java.lang.String"
>
select type from sys_user where user_id = #{id}
</select>
<insert
id=
"insertUser"
parameterType=
"SysUser"
useGeneratedKeys=
"true"
keyProperty=
"userId"
>
insert into sys_user(
<if
test=
"userId != null and userId != 0"
>
user_id,
</if>
...
...
ruoyi-system/src/main/resources/mapper/system/YxryMapper.xml
View file @
1b54cf30
...
...
@@ -140,18 +140,26 @@
y.unit
FROM yxry y
LEFT JOIN jcglry j ON y.card_no = j.card_no and j.del_flag = '0'
left join sys_user u on u.user_id = y.create_by
left join sys_dept d on u.dept_id = d.dept_id
WHERE y.del_flag = '0'
<if
test=
"begin!=null and end!=null"
>
AND y.sb_date BETWEEN #{begin} and #{end}
</if>
AND y.card_no IS NOT NULL
and y.street is not null
AND (j.card_no IS NULL OR y.sb_date > j.jc_time)
<if
test=
"userType != null and userType != '1'.toString() "
>
${params.dataScope}
</if>
GROUP BY y.card_no
</select>
<select
id=
"selectNum"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no) from yxry
where del_flag='0'
and card_no is not null
select count(DISTINCT y.card_no)
from yxry y
left join sys_user u on u.user_id = y.create_by
left join sys_dept d on u.dept_id = d.dept_id
where y.del_flag = '0'
and y.card_no is not null
<if
test=
"userType != null and userType != '1'.toString() "
>
${params.dataScope}
</if>
</select>
<insert
id=
"insertYxry"
parameterType=
"Yxry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
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