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
03708105
Commit
03708105
authored
Jul 17, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏概览接口mockdata
parent
ca4cd513
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
146 additions
and
0 deletions
+146
-0
FourColorCountDataDto.java
...in/amos/boot/module/jg/api/dto/FourColorCountDataDto.java
+20
-0
DPStatisticsController.java
...boot/module/jg/biz/controller/DPStatisticsController.java
+34
-0
DPStatisticsServiceImpl.java
...t/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
+92
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/FourColorCountDataDto.java
0 → 100644
View file @
03708105
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* 四色数字统计
* @author Administrator
*/
@Data
public
class
FourColorCountDataDto
{
private
String
label
;
private
String
img
;
private
String
key
;
private
List
<
FourColorCountDataDto
>
children
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DPStatisticsController.java
View file @
03708105
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.DPStatisticsServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -81,4 +82,37 @@ public class DPStatisticsController {
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
useRegisterCount
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏总览-左侧-安全指数"
,
notes
=
"大屏总览-一码知风险-安全指数"
)
@PostMapping
(
value
=
"/zl/left/safetyIndex"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
querySafetyIndex
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
querySafetyIndex
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏总览-左侧-四色管安全"
,
notes
=
"大屏总览-左侧-四色管安全"
)
@PostMapping
(
value
=
"/zl/left/fourColorManager"
)
public
ResponseModel
<
List
<
FourColorCountDataDto
>>
fourColorManagerSafety
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
queryFourColorManagerSafetyData
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏总览-右侧-业务全过程"
,
notes
=
"大屏总览-右侧-业务全过程"
)
@PostMapping
(
value
=
"/zl/right/bizCycle"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryBizCycleData
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
queryBizCycleData
(
dpFilterParamDto
));
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
View file @
03708105
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper
;
...
...
@@ -439,4 +441,94 @@ public class DPStatisticsServiceImpl {
});
}
}
public
Map
<
String
,
Object
>
querySafetyIndex
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"riskScore"
,
89.2
);
return
result
;
}
public
List
<
FourColorCountDataDto
>
queryFourColorManagerSafetyData
(
DPFilterParamDto
dpFilterParamDto
)
{
String
mockData
=
"[{\n"
+
"\t\t\"label\": \"设备\",\n"
+
"\t\t\"img\": \"/upload/tzs/dqscreen/images/设备.png\",\n"
+
"\t\t\"children\": [{\n"
+
"\t\t\t\t\"label\": \"正常在用\",\n"
+
"\t\t\t\t\"value\": 112372,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeFour.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"超期末检\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeThree.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"临期告警\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeTwo.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"未注册、停用或注销\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeOne.png\"\n"
+
"\t\t\t}\n"
+
"\t\t]\n"
+
"\t},\n"
+
"\t{\n"
+
"\t\t\"label\": \"企业\",\n"
+
"\t\t\"img\": \"/upload/tzs/dqscreen/images/企业.png\",\n"
+
"\t\t\"children\": [{\n"
+
"\t\t\t\t\"label\": \"正常在业\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeFour.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"超期未检\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeThree.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"临期告警\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeTwo.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"停业\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeOne.png\"\n"
+
"\t\t\t}\n"
+
"\t\t]\n"
+
"\t},\n"
+
"\t{\n"
+
"\t\t\"label\": \"人员\",\n"
+
"\t\t\"img\": \"/upload/tzs/dqscreen/images/人员.png\",\n"
+
"\t\t\"children\": [{\n"
+
"\t\t\t\t\"label\": \"许可正常\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeFour.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"许可超期\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeThree.png\"\n"
+
"\t\t\t},\n"
+
"\t\t\t{\n"
+
"\t\t\t\t\"label\": \"许可临期\",\n"
+
"\t\t\t\t\"value\": 72,\n"
+
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeTwo.png\"\n"
+
"\t\t\t}\n"
+
"\t\t]\n"
+
"\t}\n"
+
"]"
;
return
JSONArray
.
parseArray
(
mockData
,
FourColorCountDataDto
.
class
);
}
public
Map
<
String
,
Object
>
queryBizCycleData
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"xdata"
,
Arrays
.
asList
(
"安装告知"
,
"监督检验"
,
"使用登记"
,
"定期检验"
,
"变更登录"
,
"注销报废"
));
result
.
put
(
"ydata"
,
Arrays
.
asList
(
35
,
13
,
19
,
18
,
87
,
71
));
result
.
put
(
"allCount"
,
1021
);
result
.
put
(
"completionRate"
,
90.2
);
return
result
;
}
}
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