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
...
@@ -51,9 +51,9 @@ public class YxryController extends BaseController
* 获取首页数据
* 获取首页数据
*/
*/
@GetMapping
(
value
=
"/statistics"
)
@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
;
package
com
.
ruoyi
.
system
.
domain
;
import
java.time.LocalDate
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
org.springframework.data.annotation.Transient
;
/**
/**
* 阳性人员对象 yxry
* 阳性人员对象 yxry
...
@@ -148,6 +150,17 @@ public class Yxry extends BaseEntity
...
@@ -148,6 +150,17 @@ public class Yxry extends BaseEntity
/** 身份证是否重复 */
/** 身份证是否重复 */
private
String
isCf
;
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"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
...
@@ -306,6 +319,14 @@ public class Yxry extends BaseEntity
...
@@ -306,6 +319,14 @@ public class Yxry extends BaseEntity
this
.
committee
=
committee
;
this
.
committee
=
committee
;
}
}
public
LocalDate
getDate
()
{
return
date
;
}
public
void
setDate
(
LocalDate
date
)
{
this
.
date
=
date
;
}
public
String
getFcName
()
{
public
String
getFcName
()
{
return
fcName
;
return
fcName
;
}
}
...
@@ -338,6 +359,30 @@ public class Yxry extends BaseEntity
...
@@ -338,6 +359,30 @@ public class Yxry extends BaseEntity
this
.
cyTime
=
cyTime
;
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
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
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;
...
@@ -4,6 +4,7 @@ import java.time.LocalDate;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.system.domain.Fcry
;
import
com.ruoyi.system.domain.Fcry
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
...
@@ -70,9 +71,9 @@ public interface FcryMapper
...
@@ -70,9 +71,9 @@ public interface FcryMapper
List
<
Gldry
>
selectGldryByCard
(
@Param
(
"cardNo"
)
String
cardNo
,
@Param
(
"id"
)
Long
id
);
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
();
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;
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.system.domain.Fkqk
;
import
com.ruoyi.system.domain.Fkqk
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
...
@@ -71,19 +72,18 @@ public interface FkqkMapper
...
@@ -71,19 +72,18 @@ public interface FkqkMapper
/**
/**
* 查询小区封控情况列表
* 查询小区封控情况列表
*
*
* @param today 当天日期
* @return 小区封控情况集合
* @return 小区封控情况集合
*/
*/
public
List
<
Fkqk
>
selectFkToday
(
@Param
(
"today"
)
LocalDate
toda
y
);
public
List
<
Fkqk
>
selectFkToday
(
Yxry
yxr
y
);
/**
/**
* 查询小区封控情况列表
* 查询小区封控情况列表
*
*
* @return 小区封控情况集合
* @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;
...
@@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Gldry
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
...
@@ -69,9 +70,9 @@ public interface GldryMapper
...
@@ -69,9 +70,9 @@ public interface GldryMapper
*/
*/
List
<
Gldry
>
selectGldryByCard
(
@Param
(
"cardNo"
)
String
cardNo
,
@Param
(
"id"
)
Long
id
);
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
();
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;
...
@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.system.domain.Hscj
;
import
com.ruoyi.system.domain.Hscj
;
import
com.ruoyi.system.domain.Yxry
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
...
@@ -62,7 +63,7 @@ public interface HscjMapper
...
@@ -62,7 +63,7 @@ public interface HscjMapper
List
<
Hscj
>
checkCard
(
Hscj
hscj
);
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
);
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
...
@@ -126,4 +126,6 @@ public interface SysUserMapper
public
SysUser
checkEmailUnique
(
String
email
);
public
SysUser
checkEmailUnique
(
String
email
);
public
String
selectUserTypeById
(
Long
id
);
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
...
@@ -67,9 +67,9 @@ public interface YxryMapper
int
updateBatchYxry
(
@Param
(
"list"
)
List
<
Yxry
>
list
);
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
);
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
...
@@ -68,5 +68,5 @@ public interface IYxryService
Map
selectByCard
(
String
card
);
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;
...
@@ -18,6 +18,7 @@ import com.ruoyi.system.mapper.FcryMapper;
import
com.ruoyi.system.mapper.FkqkMapper
;
import
com.ruoyi.system.mapper.FkqkMapper
;
import
com.ruoyi.system.mapper.GldryMapper
;
import
com.ruoyi.system.mapper.GldryMapper
;
import
com.ruoyi.system.mapper.HscjMapper
;
import
com.ruoyi.system.mapper.HscjMapper
;
import
com.ruoyi.system.mapper.SysUserMapper
;
import
io.netty.util.internal.ObjectUtil
;
import
io.netty.util.internal.ObjectUtil
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.math3.stat.descriptive.summary.Product
;
import
org.apache.commons.math3.stat.descriptive.summary.Product
;
...
@@ -41,6 +42,9 @@ public class YxryServiceImpl implements IYxryService {
...
@@ -41,6 +42,9 @@ public class YxryServiceImpl implements IYxryService {
@Autowired
@Autowired
private
FcryMapper
fcryMapper
;
private
FcryMapper
fcryMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
@Autowired
@Autowired
private
YxryMapper
yxryMapper
;
private
YxryMapper
yxryMapper
;
...
@@ -298,7 +302,8 @@ public class YxryServiceImpl implements IYxryService {
...
@@ -298,7 +302,8 @@ public class YxryServiceImpl implements IYxryService {
}
}
@Override
@Override
public
Map
statistics
()
{
@DataScope
(
deptAlias
=
"d"
,
userAlias
=
"u"
)
public
Map
statistics
(
Yxry
yxry
)
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
List
<
Object
>
todayData
=
new
ArrayList
<>();
List
<
Object
>
todayData
=
new
ArrayList
<>();
Map
today
=
new
HashMap
();
Map
today
=
new
HashMap
();
...
@@ -306,65 +311,99 @@ public class YxryServiceImpl implements IYxryService {
...
@@ -306,65 +311,99 @@ public class YxryServiceImpl implements IYxryService {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
begin
=
sdf
.
format
(
TimeUtils
.
getStartTime
());
String
begin
=
sdf
.
format
(
TimeUtils
.
getStartTime
());
String
end
=
sdf
.
format
(
TimeUtils
.
getEndTime
());
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
(
"positiveNum"
,
yxryList
.
size
());
// 涉及小区数量
// 涉及小区数量
today
.
put
(
"PositiveAreaNum"
,
yxryList
.
stream
().
filter
(
y
->
ObjectUtils
.
isNotEmpty
(
y
.
getCommunity
())
)
today
.
put
(
"PositiveAreaNum"
,
yxryList
.
stream
().
filter
(
y
->
y
.
getCommunity
()
!=
null
)
.
distinct
().
map
(
Yxry:
:
getCommunity
).
collect
(
Collectors
.
toList
()).
size
());
.
map
(
Yxry:
:
getCommunity
).
distinct
(
).
collect
(
Collectors
.
toList
()).
size
());
// 涉及单元数量
// 涉及单元数量
Map
<
String
,
List
<
Yxry
>>
prodMap
=
yxryList
.
stream
().
filter
(
y
->
Object
Utils
.
isNotEmpty
(
y
.
getCommunity
())
Map
<
String
,
List
<
Yxry
>>
prodMap
=
yxryList
.
stream
().
filter
(
y
->
String
Utils
.
isNotEmpty
(
y
.
getCommunity
())
&&
ObjectUtils
.
isNotEmpty
(
y
.
getBuilding
())
&&
Object
Utils
.
isNotEmpty
(
y
.
getUnit
()))
&&
StringUtils
.
isNotEmpty
(
y
.
getBuilding
())
&&
String
Utils
.
isNotEmpty
(
y
.
getUnit
()))
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getBuilding
()
+
"_"
+
item
.
getUnit
()));
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getBuilding
()
+
"_"
+
item
.
getUnit
()));
today
.
put
(
"unitBuildingInvolvedNum"
,
prodMap
.
keySet
().
size
());
today
.
put
(
"unitBuildingInvolvedNum"
,
prodMap
.
keySet
().
size
());
// 查询当天采集异常数据(身份证不为空)
// 查询当天采集异常数据(身份证不为空)
List
<
Hscj
>
hscjList
=
hscjMapper
.
selectToday
(
begin
,
end
);
List
<
Hscj
>
hscjList
=
hscjMapper
.
selectToday
(
yxry
);
today
.
put
(
"abnormalMixingNum"
,
hscjList
.
stream
().
filter
(
cj
->
ObjectUtils
.
isNotEmpty
(
cj
.
getCjgh
())).
distinct
(
)
today
.
put
(
"abnormalMixingNum"
,
hscjList
.
stream
().
filter
(
cj
->
StringUtils
.
isNotEmpty
(
cj
.
getCjgh
())
)
.
map
(
Hscj:
:
getCjgh
).
collect
(
Collectors
.
toList
()).
size
());
.
map
(
Hscj:
:
getCjgh
).
distinct
().
collect
(
Collectors
.
toList
()).
size
());
today
.
put
(
"abnormalMixingOfPipesNum"
,
hscjList
.
stream
().
distinct
().
map
(
Hscj:
:
getCardNo
).
collect
(
Collectors
.
toList
()).
size
());
today
.
put
(
"abnormalMixingOfPipesNum"
,
hscjList
.
stream
().
map
(
Hscj:
:
getCardNo
).
distinct
(
).
collect
(
Collectors
.
toList
()).
size
());
// 查询封控数据
// 查询封控数据
LocalDate
date
=
LocalDate
.
now
(
);
yxry
.
setDate
(
LocalDate
.
now
()
);
List
<
Fkqk
>
fkqkList
=
fkqkMapper
.
selectFkToday
(
date
);
List
<
Fkqk
>
fkqkList
=
fkqkMapper
.
selectFkToday
(
yxry
);
// 获取真实时间是空的
// 获取真实时间是空的
today
.
put
(
"cellBlockingControlNum"
,
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isEmpty
(
f
.
getRealTime
())
today
.
put
(
"cellBlockingControlNum"
,
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isEmpty
(
f
.
getRealTime
())
&&
Object
Utils
.
isNotEmpty
(
f
.
getCommunity
()))
&&
String
Utils
.
isNotEmpty
(
f
.
getCommunity
()))
.
distinct
().
map
(
Fkqk:
:
getCommunity
).
collect
(
Collectors
.
toList
()).
size
());
.
map
(
Fkqk:
:
getCommunity
).
distinct
(
).
collect
(
Collectors
.
toList
()).
size
());
Map
<
String
,
List
<
Fkqk
>>
fkMap
=
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isEmpty
(
f
.
getRealTime
())
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
()));
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
today
.
put
(
"unitSealingControlNum"
,
fkMap
.
keySet
().
size
());
today
.
put
(
"unitSealingControlNum"
,
fkMap
.
keySet
().
size
());
Map
<
String
,
List
<
Fkqk
>>
jfMap
=
fkqkList
.
stream
().
filter
(
f
->
ObjectUtils
.
isNotEmpty
(
f
.
getRealTime
())
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
()));
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
today
.
put
(
"unpackingUnitNum"
,
jfMap
.
keySet
().
size
());
today
.
put
(
"unpackingUnitNum"
,
jfMap
.
keySet
().
size
());
today
.
put
(
"transferToShelterNum"
,
fcryMapper
.
selectToday
(
date
));
Yxry
y
=
new
Yxry
();
today
.
put
(
"transferToIsolationPointNum"
,
gldryMapper
.
selectToday
(
date
));
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
);
todayData
.
add
(
today
);
map
.
put
(
"todayData"
,
todayData
);
map
.
put
(
"todayData"
,
todayData
);
List
<
Object
>
currentData
=
new
ArrayList
<>();
List
<
Object
>
currentData
=
new
ArrayList
<>();
Map
curr
=
new
HashMap
();
Map
curr
=
new
HashMap
();
curr
.
put
(
"isolationPointNum"
,
gldryMapper
.
selectCurrent
());
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"1"
))
{
curr
.
put
(
"sheltersNum"
,
fcryMapper
.
selectCurrent
());
yxry
.
setUserType
(
type
);
List
<
Fkqk
>
fkqks
=
fkqkMapper
.
selectCurrent
();
curr
.
put
(
"isolationPointNum"
,
gldryMapper
.
selectCurrent
(
yxry
)
+
"/"
+
gldryMapper
.
selectCurrent
(
y
));
List
<
String
>
j
=
fkqks
.
stream
().
distinct
().
map
(
Fkqk:
:
getCommunity
)
}
else
.
collect
(
Collectors
.
toList
());
curr
.
put
(
"isolationPointNum"
,
gldryMapper
.
selectCurrent
(
yxry
));
System
.
out
.
println
(
j
.
size
());
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"0"
))
{
curr
.
put
(
"BlockedControlCellNum"
,
fkqks
.
stream
().
distinct
().
map
(
Fkqk:
:
getCommunity
).
collect
(
Collectors
.
toList
()).
size
());
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
()
Map
<
String
,
List
<
Fkqk
>>
fk
=
fkqks
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
.
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getCommunity
()
+
"_"
+
item
.
getFloor
()
+
"_"
+
item
.
getUnit
()));
curr
.
put
(
"sealingControlUnitNum"
,
fk
.
keySet
().
size
());
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
());
curr
.
put
(
"positivePersonnelNum"
,
yxries
.
size
());
currentData
.
add
(
curr
);
currentData
.
add
(
curr
);
map
.
put
(
"currentData"
,
currentData
);
map
.
put
(
"currentData"
,
currentData
);
List
<
Object
>
CumulativeData
=
new
ArrayList
<>();
List
<
Object
>
CumulativeData
=
new
ArrayList
<>();
Map
cum
=
new
HashMap
();
Map
cum
=
new
HashMap
();
cum
.
put
(
"CumulativePositivePerNum"
,
yxryMapper
.
selectNum
());
cum
.
put
(
"CumulativePositivePerNum"
,
yxryMapper
.
selectNum
(
yxry
));
List
<
Fkqk
>
fks
=
fkqkMapper
.
selectCumulativeData
();
List
<
Fkqk
>
fks
=
fkqkMapper
.
selectCumulativeData
(
yxry
);
cum
.
put
(
"CumulativeSealingControlUnitNum"
,
fks
.
size
());
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
());
.
collect
(
Collectors
.
toList
()).
size
());
cum
.
put
(
"CumulativeUnpackingUnitNum"
,
fks
.
stream
().
filter
(
f
->
f
.
getRealTime
()
!=
null
)
cum
.
put
(
"CumulativeUnpackingUnitNum"
,
fks
.
stream
().
filter
(
f
->
f
.
getRealTime
()
!=
null
)
.
distinct
().
map
(
Fkqk:
:
getCommunity
)
.
map
(
Fkqk:
:
getCommunity
).
distinct
(
)
.
collect
(
Collectors
.
toList
()).
size
());
.
collect
(
Collectors
.
toList
()).
size
());
CumulativeData
.
add
(
cum
);
CumulativeData
.
add
(
cum
);
map
.
put
(
"CumulativeData"
,
CumulativeData
);
map
.
put
(
"CumulativeData"
,
CumulativeData
);
...
...
ruoyi-system/src/main/resources/mapper/system/FcryMapper.xml
View file @
1b54cf30
...
@@ -149,18 +149,28 @@
...
@@ -149,18 +149,28 @@
<if
test=
"id != null"
>
and id != #{id}
</if>
<if
test=
"id != null"
>
and id != #{id}
</if>
</select>
</select>
<select
id=
"selectToday"
resultType=
"java.lang.Integer"
>
<select
id=
"selectToday"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
select count(DISTINCT f.card_no)
from fcry
from fcry f
where zr_time = #{date}
left join sys_user u on u.user_id = f.create_by
and del_flag = '0'
left join sys_dept d on u.dept_id = d.dept_id
and card_no is not null
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>
<select
id=
"selectCurrent"
resultType=
"java.lang.Integer"
>
<select
id=
"selectCurrent"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
select count(DISTINCT f.card_no)
from fcry
from fcry f
where zc_time is null
left join sys_user u on u.user_id = f.create_by
and del_flag = '0'
left join sys_dept d on u.dept_id = d.dept_id
and card_no is not null
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>
</select>
<insert
id=
"insertFcry"
parameterType=
"Fcry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<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"
...
@@ -73,24 +73,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE dict_type = 'shelter_name' AND status = '0'
WHERE dict_type = 'shelter_name' AND status = '0'
</select>
</select>
<select
id=
"selectFkToday"
resultMap=
"FkqkResult"
>
<select
id=
"selectFkToday"
resultMap=
"FkqkResult"
>
select community, floor, unit, fk_time, real_time
select f.community, f.floor, f.unit, f.fk_time, f.real_time
from fkqk
from fkqk f
where del_flag = '0' and (fk_time = #{today}
left join sys_user u on u.user_id = f.create_by
or real_time = #{today} )
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>
<select
id=
"selectCurrent"
resultMap=
"FkqkResult"
>
<select
id=
"selectCurrent"
resultMap=
"FkqkResult"
>
select community, floor, unit, fk_time, real_time
select k.community, k.floor, k.unit, k.fk_time, k.real_time
from fkqk
from fkqk k
where del_flag = '0'
left join sys_user u on u.user_id = k.create_by
and real_time is null
left join sys_dept d on u.dept_id = d.dept_id
and community is not null
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>
<select
id=
"selectCumulativeData"
resultMap=
"FkqkResult"
>
<select
id=
"selectCumulativeData"
resultMap=
"FkqkResult"
>
<include
refid=
"selectFkqkVo"
/>
select k.community,k.floor, k.unit, k.fk_time, k.real_time from fkqk k
where del_flag = '0'
left join sys_user u on u.user_id = k.create_by
and community is not null
left join sys_dept d on u.dept_id = d.dept_id
and floor is not null
where k.del_flag = '0'
and unit is not null
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
group by community,floor, unit
</select>
</select>
<insert
id=
"insertFkqk"
parameterType=
"Fkqk"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<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"
...
@@ -82,19 +82,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"id != null"
>
and id != #{id}
</if>
<if
test=
"id != null"
>
and id != #{id}
</if>
</select>
</select>
<select
id=
"selectToday"
resultType=
"java.lang.Integer"
>
<select
id=
"selectToday"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
select count(DISTINCT g.card_no)
from gldry
from gldry g
where zr_time = #{date}
left join sys_user u on u.user_id = g.create_by
and del_flag = '0'
left join sys_dept d on u.dept_id = d.dept_id
and card_no is not null
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>
<select
id=
"selectCurrent"
resultType=
"java.lang.Integer"
>
<select
id=
"selectCurrent"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no)
select count(DISTINCT g.card_no)
from gldry
from gldry g
where zc_time is null
left join sys_user u on u.user_id = g.create_by
and del_flag = '0'
left join sys_dept d on u.dept_id = d.dept_id
and card_no is not null
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>
</select>
<insert
id=
"insertGldry"
parameterType=
"Gldry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<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 @@
...
@@ -133,13 +133,16 @@
</select>
</select>
<select
id=
"selectToday"
resultType=
"com.ruoyi.system.domain.Hscj"
>
<select
id=
"selectToday"
resultType=
"com.ruoyi.system.domain.Hscj"
>
select card_no, cjgh
select j.card_no, j.cjgh
from hscj
from hscj j
where cj_result = '0'
left join sys_user u on u.user_id = j.create_by
and del_flag = '0'
left join sys_dept d on u.dept_id = d.dept_id
and is_hun = '1'
where j.cj_result = '0'
and cj_time BETWEEN #{begin} and #{end}
and j.del_flag = '0'
and card_no is not null
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>
</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"
...
@@ -146,6 +146,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select user_type from sys_user where user_id = #{id}
select user_type from sys_user where user_id = #{id}
</select>
</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
id=
"insertUser"
parameterType=
"SysUser"
useGeneratedKeys=
"true"
keyProperty=
"userId"
>
insert into sys_user(
insert into sys_user(
<if
test=
"userId != null and userId != 0"
>
user_id,
</if>
<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 @@
...
@@ -140,18 +140,26 @@
y.unit
y.unit
FROM yxry y
FROM yxry y
LEFT JOIN jcglry j ON y.card_no = j.card_no and j.del_flag = '0'
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'
WHERE y.del_flag = '0'
<if
test=
"begin!=null and end!=null"
>
<if
test=
"begin!=null and end!=null"
>
AND y.sb_date BETWEEN #{begin} and #{end}
AND y.sb_date BETWEEN #{begin} and #{end}
</if>
</if>
AND y.card_no IS NOT NULL
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)
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
GROUP BY y.card_no
</select>
</select>
<select
id=
"selectNum"
resultType=
"java.lang.Integer"
>
<select
id=
"selectNum"
resultType=
"java.lang.Integer"
>
select count(DISTINCT card_no) from yxry
select count(DISTINCT y.card_no)
where del_flag='0'
from yxry y
and card_no is not null
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>
</select>
<insert
id=
"insertYxry"
parameterType=
"Yxry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<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