Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
94ee5511
Commit
94ee5511
authored
Aug 29, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问题处理
parent
7f99da62
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
108 additions
and
24 deletions
+108
-24
PersonBasicMapper.java
.../amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
+6
-2
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+15
-2
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+38
-10
SjglZsjZsbtzMapper.java
...mos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
+13
-5
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+28
-2
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+8
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
View file @
94ee5511
...
...
@@ -53,9 +53,13 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
List
<
Map
<
String
,
Object
>>
getPersonYardByPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
);
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
Integer
getPersonYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
);
Integer
getPersonYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
List
<
StationQrCodeStatistics
>
getPersonStatistics
();
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
94ee5511
...
...
@@ -212,7 +212,8 @@
SELECT
ifnull(b.name, '') as objectName ,
ifnull(a.qrcode_color, '') AS qrCodeColor,
ifnull(c.station_name, '') AS stationName
ifnull(c.station_name, '') AS stationName,
ifnull(a.rec_date, '') as recDate
FROM
person_basic a
LEFT JOIN person_account b ON a.sequence_nbr = b.person_id
...
...
@@ -221,8 +222,14 @@
<if
test=
"parentCode != null and parentCode != ''"
>
AND a.project_org_code like concat(#{parentCode},'%')
</if>
<if
test=
"date != null and date != ''"
>
AND a.rec_date like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.qrcode_color like concat(#{qrCodeColor},'%')
</if>
</where>
ORDER BY
a.rec_date DESC
ORDER BY a.rec_date DESC
limit #{current},#{size}
</select>
...
...
@@ -237,6 +244,12 @@
<if
test=
"parentCode != null and parentCode != ''"
>
AND a.project_org_code like concat(#{parentCode},'%')
</if>
<if
test=
"date != null and date != ''"
>
AND a.rec_date like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.qrcode_color like concat(#{qrCodeColor},'%')
</if>
</where>
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonQrCodeController.java
View file @
94ee5511
...
...
@@ -75,6 +75,7 @@ public class PersonQrCodeController extends BaseController {
List
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
Arrays
.
stream
(
QrcodeColorEnum
.
values
()).
forEach
(
item
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"qrCodeColor"
,
item
.
getCode
());
map
.
put
(
"name"
,
item
.
getName
());
map
.
put
(
"value"
,
collect
.
getOrDefault
(
"qrCodeColor"
,
0
));
maps
.
add
(
map
);
...
...
@@ -93,14 +94,16 @@ public class PersonQrCodeController extends BaseController {
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPersonYardByPage
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
,
@RequestParam
(
required
=
false
)
String
date
,
@RequestParam
(
required
=
false
)
String
qrCodeColor
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
if
(
"person"
.
equals
(
dataType
))
{
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
);
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
qrCodeColor
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
);
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
equipYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
...
...
@@ -110,8 +113,8 @@ public class PersonQrCodeController extends BaseController {
resultList
.
setSize
(
size
);
resultList
.
setTotal
(
equipYardByPageCount
);
}
else
if
(
"job"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
jobYardByPage
=
sjglZsjZsbtzMapper
.
getJobYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
);
Integer
jobYardByPageCount
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
);
List
<
Map
<
String
,
Object
>>
jobYardByPage
=
sjglZsjZsbtzMapper
.
getJobYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
jobYardByPageCount
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
jobYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
...
...
@@ -137,7 +140,7 @@ public class PersonQrCodeController extends BaseController {
FeignClientResult
<
Map
<
String
,
Object
>>
sevenEntity
=
null
;
try
{
sevenEntity
=
mcbWarningFeign
.
getQrCodeCount
(
parentCode
,
"RYFM"
);
sevenEntity
=
mcbWarningFeign
.
getQrCodeCount
(
parentCode
,
dataType
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -147,7 +150,14 @@ public class PersonQrCodeController extends BaseController {
String
yellow
=
result
.
get
(
"yellow"
).
toString
();
String
redToGreen
=
result
.
get
(
"redToGreen"
).
toString
();
String
yellowToGreen
=
result
.
get
(
"yellowToGreen"
).
toString
();
Integer
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
);
Integer
countAll
=
0
;
if
(
"RYFM"
.
equals
(
dataType
)
||
"person"
.
equals
(
dataType
))
{
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
null
,
null
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
countAll
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
null
,
null
);
}
else
if
(
"job"
.
equals
(
dataType
))
{
countAll
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
null
,
null
);
}
result
.
put
(
"redToGreenPercent"
,
getPercent
(
new
BigDecimal
(
red
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"redPercent"
,
getPercent
(
new
BigDecimal
(
redToGreen
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellowToGreenPercent"
,
getPercent
(
new
BigDecimal
(
yellow
),
new
BigDecimal
(
countAll
)));
...
...
@@ -167,10 +177,28 @@ public class PersonQrCodeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getQrCodeCountByStation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 场站 人员赋码数量等统计 【折线图】"
,
notes
=
"评估大屏 - 场站 人员赋码数量等统计 【折线图】"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>
>>
getQrCodeCountByStation
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getQrCodeCountByStation
(
@RequestParam
(
required
=
false
,
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"dataType"
)
String
dataType
)
{
List
<
Map
<
String
,
Object
>>
qrCodeCountByStation
=
stationQrCodeStatisticsMapper
.
getQrCodeCountByStation
(
parentCode
,
dataType
);
return
ResponseHelper
.
buildResponse
(
qrCodeCountByStation
);
List
<
Object
>
redNum
=
qrCodeCountByStation
.
stream
().
map
(
t
->
t
.
get
(
"redNum"
)).
collect
(
Collectors
.
toList
());
List
<
Object
>
yellowNum
=
qrCodeCountByStation
.
stream
().
map
(
t
->
t
.
get
(
"yellowNum"
)).
collect
(
Collectors
.
toList
());
List
<
Object
>
date
=
qrCodeCountByStation
.
stream
().
map
(
t
->
t
.
get
(
"date"
)).
collect
(
Collectors
.
toList
());
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"data"
,
redNum
);
map
.
put
(
"name"
,
"红码"
);
maps
.
add
(
map
);
HashMap
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"data"
,
yellowNum
);
map1
.
put
(
"name"
,
"黄码"
);
maps
.
add
(
map1
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"seriesData"
,
maps
);
resultMap
.
put
(
"axisData"
,
date
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
View file @
94ee5511
...
...
@@ -54,12 +54,16 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
*/
List
<
Map
<
String
,
Object
>>
getEquipYardByPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
);
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
/**
* 设备赋码列表
*/
Integer
getEquipYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
);
Integer
getEquipYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
...
...
@@ -68,11 +72,15 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
* 任务赋码列表
*/
List
<
Map
<
String
,
Object
>>
getJobYardByPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
);
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
/**
* 任务赋码列表数量统计
*/
Integer
getJobYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
);
Integer
getJobYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
94ee5511
...
...
@@ -101,7 +101,8 @@
SELECT
ifnull(a.SBMC, '') as objectName ,
ifnull(a.QRCODE_COLOR, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName
ifnull(b.COMPANY_NAME, '') AS stationName,
ifnull(a.UPDATE_TIME, '') as recDate
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
...
...
@@ -109,6 +110,12 @@
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
<if
test=
"date != null and date != ''"
>
AND a.UPDATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
</if>
</where>
ORDER BY a.CREATE_TIME DESC
limit #{current},#{size}
...
...
@@ -124,6 +131,12 @@
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
<if
test=
"date != null and date != ''"
>
AND a.UPDATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
</if>
</where>
</select>
...
...
@@ -131,7 +144,8 @@
SELECT
ifnull(a.JOB_DESCRIPTION, '') as objectName ,
ifnull(a.qrcode_color, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName
ifnull(b.COMPANY_NAME, '') AS stationName,
ifnull(a.CREATE_TIME, '') as recDate
FROM
fdgl_job_main a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
...
...
@@ -139,6 +153,12 @@
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
<if
test=
"date != null and date != ''"
>
AND a.CREATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
</if>
</where>
ORDER BY a.CREATE_TIME DESC
limit #{current},#{size}
...
...
@@ -154,6 +174,12 @@
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
<if
test=
"date != null and date != ''"
>
AND a.CREATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
94ee5511
...
...
@@ -36,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
...
...
@@ -714,9 +715,13 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}
public
Page
<
Map
<
String
,
Object
>>
getPersonYardByPage
(
String
parentCode
,
Integer
current
,
Integer
size
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
);
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
);
public
Page
<
Map
<
String
,
Object
>>
getPersonYardByPage
(
String
parentCode
,
Integer
current
,
Integer
size
,
String
date
,
String
qrCodeColor
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
...
...
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