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
97e33c96
Commit
97e33c96
authored
Aug 28, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问题处理
parent
636aa187
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
319 additions
and
4 deletions
+319
-4
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+11
-4
AlarmEventMapper.xml
...creen-biz/src/main/resources/cluster/AlarmEventMapper.xml
+52
-0
SjglZsjZsbtzMapper.xml
...een-biz/src/main/resources/cluster/SjglZsjZsbtzMapper.xml
+159
-0
SwitchPictureMapper.xml
...en-biz/src/main/resources/cluster/SwitchPictureMapper.xml
+16
-0
SystemEnumMapper.xml
...creen-biz/src/main/resources/cluster/SystemEnumMapper.xml
+10
-0
TemporaryDataMapper.xml
...en-biz/src/main/resources/cluster/TemporaryDataMapper.xml
+61
-0
TestMapper.xml
...p-bigscreen-biz/src/main/resources/cluster/TestMapper.xml
+5
-0
TpriDmpDatabookMapper.xml
...-biz/src/main/resources/cluster/TpriDmpDatabookMapper.xml
+5
-0
No files found.
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 @
97e33c96
...
...
@@ -23,9 +23,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@Api
(
tags
=
"人员人员赋码基本信息 评估大屏Api"
)
...
...
@@ -67,12 +66,20 @@ public class PersonQrCodeController extends BaseController {
}
else
if
(
StringUtils
.
isNotEmpty
(
dataType
)
&&
dataType
.
equals
(
"job"
))
{
resultList
=
sjglZsjZsbtzMapper
.
getJobYardStatistics
(
parentCode
);
}
Map
<
Object
,
Object
>
collect
=
resultList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"qrCodeColor"
),
t
->
t
.
get
(
"value"
)));
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
item
.
put
(
"value"
,
Integer
.
parseInt
(
item
.
get
(
"value"
).
toString
()));
});
return
ResponseHelper
.
buildResponse
(
resultList
);
List
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
Arrays
.
stream
(
QrcodeColorEnum
.
values
()).
forEach
(
item
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
item
.
getName
());
map
.
put
(
"value"
,
collect
.
getOrDefault
(
"qrCodeColor"
,
0
));
maps
.
add
(
map
);
});
return
ResponseHelper
.
buildResponse
(
maps
);
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/AlarmEventMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.AlarmEventMapper"
>
<select
id=
"getAlarmEventList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.AlarmEventDto"
>
select
station_name as stationName,
event_desc as eventDesc,
alarm_group_name as alarmGroupName,
event_time as eventTime,
(case event_movement
WHEN 'true' then '告警'
WHEN 'false' then '恢复'
ELSE event_movement end ) as eventMovement
from
fault_alarm_event
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
gateway_id = #{gatewayId}
</if>
<if
test=
"stationId != null and stationId != ''"
>
station_id = #{stationId}
</if>
</where>
order by sort desc limit #{current},#{size}
</select>
<select
id=
"getLastDataBySort"
resultType=
"java.lang.String"
>
select
sort
from
fault_alarm_event
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
gateway_id = #{gatewayId}
</if>
</where>
order by sort desc limit 1
</select>
<select
id=
"getOldAlarmsBySort"
resultType=
"java.lang.String"
>
select
event_desc
from
fault_alarm_event
where
gateway_id = #{gatewayId} and sort = #{sort}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/SjglZsjZsbtzMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper"
>
<select
id=
"getStationCapactityByStationWerks"
resultType=
"Double"
>
select SUM(CAPACITYL) from sjgl_zsj_zsbtz where WERKS = #{WERKS}
</select>
<select
id=
"getStationInfoMapByStationWerks"
resultType=
"map"
>
SELECT LEFT
( SBMC, 4 ) AS NAME,
GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum
FROM
`sjgl_zsj_zsbtz`
WHERE
MACHGENRE = #{DATAID} and WERKS = #{WERKS}
GROUP BY
FSB
</select>
<select
id=
"getStationInfoMapByStationGFWerks"
resultType=
"map"
>
SELECT LEFT
( b.SBMC, 4 ) AS NAME,
GROUP_CONCAT( REPLACE ( SUBSTRING_INDEX( b.SBMC, "#",- 1 ), '光伏阵区系统', '' ) ) AS equipNum
FROM
(
SELECT
*
FROM
sjgl_zsj_zsbtz
WHERE
FSB IN ( SELECT DBID FROM `sjgl_zsj_zsbtz` WHERE MACHGENRE = ( SELECT DATAID FROM `tpri_dmp_databook` WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
) B
GROUP BY
B.FSB
</select>
<select
id=
"getEquipQrcodeInfo"
resultType=
"com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"
>
SELECT
WERKS AS `code`,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
'equip' AS type,
CURRENT_DATE AS recordDate
FROM
sjgl_zsj_zsbtz
GROUP BY
WERKS
</select>
<select
id=
"getTaskQrcodeInfo"
resultType=
"com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"
>
SELECT
WERKS AS `code`,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
'job' AS type,
CURRENT_DATE AS recordDate
FROM
fdgl_job_main
GROUP BY
WERKS
</select>
<select
id=
"getEquipYardStatistics"
resultType=
"java.util.Map"
>
SELECT
a.QRCODE_COLOR as qrCodeColor,
count( 1 ) as value
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
GROUP BY
QRCODE_COLOR
</select>
<select
id=
"getJobYardStatistics"
resultType=
"java.util.Map"
>
SELECT
a.QRCODE_COLOR as qrCodeColor,
count( 1 ) as value
FROM
fdgl_job_main a
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
GROUP BY
QRCODE_COLOR
</select>
<select
id=
"getEquipYardByPage"
resultType=
"java.util.Map"
>
SELECT
ifnull(a.SBMC, '') as objectName ,
ifnull(a.QRCODE_COLOR, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
ORDER BY a.CREATE_TIME DESC
limit #{current},#{size}
</select>
<select
id=
"getEquipYardByPageCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
sjgl_zsj_zsbtz a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
</select>
<select
id=
"getJobYardByPage"
resultType=
"java.util.Map"
>
SELECT
ifnull(a.JOB_DESCRIPTION, '') as objectName ,
ifnull(a.qrcode_color, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName
FROM
fdgl_job_main a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
ORDER BY a.CREATE_TIME DESC
limit #{current},#{size}
</select>
<select
id=
"getJobYardByPageCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
fdgl_job_main a
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE
<where>
<if
test=
"parentCode != null and parentCode != ''"
>
AND b.COMPANY_CODE like concat(#{parentCode},'%')
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/SwitchPictureMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SwitchPictureMapper"
>
<select
id=
"getSwitchUrl"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.SwitchPicture"
>
select
*
from
switch_picture_url
where
station_id = #{stationId} and switch_num = #{switchNum}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/SystemEnumMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SystemEnumMapper"
>
<select
id=
"getStatusMonitoring"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto"
>
SELECT * FROM `system_enum` WHERE type = #{type} and system_name = #{systemName}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/TemporaryDataMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TemporaryDataMapper"
>
<select
id=
"timingTemporarysSorageData"
resultType=
"map"
>
SELECT avg(value) as value ,
created_time as createdTime ,
equipmentIndexName
FROM
`temporary_data`
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
gatewayId = #{gatewayId}
</if>
<if
test=
"gatewayId == null or gatewayId == ''"
>
equipmentNumber is not null and equipmentIndexName is not null
</if>
</where>
GROUP BY batch_no ,equipmentIndexName;
</select>
<select
id=
"getStatisticsInfo"
resultType=
"map"
>
SELECT
avg( VALUE ) AS mean,
( SELECT created_time FROM temporary_data WHERE
equipmentIndexName =#{equipmentIndexName}
<if
test=
"gatewayId != null and gatewayId != ''"
>
and gatewayId = #{gatewayId}
</if>
ORDER BY `value` LIMIT 1 ) AS minTime,
max( `value` ) AS max,
( SELECT created_time FROM temporary_data WHERE
equipmentIndexName =#{equipmentIndexName}
<if
test=
"gatewayId != null and gatewayId != ''"
>
and gatewayId = #{gatewayId}
</if>
ORDER BY `value` DESC LIMIT 1 ) AS maxTime,
min( `value` ) AS min
FROM
`temporary_data`
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName}
</if>
<if
test=
"gatewayId == null or gatewayId == ''"
>
equipmentNumber is not null and equipmentIndexName is not null and equipmentIndexName =#{equipmentIndexName}
</if>
</where>
</select>
<select
id=
"getAllData"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESWindSpeed"
>
SELECT
*
FROM
`temporary_data`
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/TestMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TestMapper"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/cluster/TpriDmpDatabookMapper.xml
0 → 100644
View file @
97e33c96
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TpriDmpDatabookMapper"
>
</mapper>
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