Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
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
王飞
vehicle-quality-review
Commits
e8cfa4ca
Commit
e8cfa4ca
authored
Mar 26, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaoying' into 'dev'
Gaoying See merge request
!229
parents
508c8ae5
b3de2e52
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
199 additions
and
0 deletions
+199
-0
QuantityStatisticsVO.java
...c/main/java/com/ruoyi/domain/vo/QuantityStatisticsVO.java
+46
-0
StandardCategoryStatisticsVO.java
...ava/com/ruoyi/domain/vo/StandardCategoryStatisticsVO.java
+20
-0
StatisticsHomeMapper.java
.../src/main/java/com/ruoyi/mapper/StatisticsHomeMapper.java
+17
-0
StatisticsHomeService.java
...rc/main/java/com/ruoyi/service/StatisticsHomeService.java
+14
-0
StatisticsHomeServiceImpl.java
...ava/com/ruoyi/service/impl/StatisticsHomeServiceImpl.java
+28
-0
StatisticsHomeController.java
...src/main/java/com/ruoyi/web/StatisticsHomeController.java
+35
-0
StatisticsHomeMapper.xml
...review/src/main/resources/mapper/StatisticsHomeMapper.xml
+39
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/QuantityStatisticsVO.java
0 → 100644
View file @
e8cfa4ca
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
value
=
"首页数量统计"
)
public
class
QuantityStatisticsVO
{
@ApiModelProperty
(
"支持标准数量"
)
private
Long
standardQuantity
;
@ApiModelProperty
(
"测试用例数量"
)
private
Long
numberUseCases
;
@ApiModelProperty
(
"任务数量"
)
private
Long
numberTasks
;
@ApiModelProperty
(
"检验报告数量"
)
private
Long
numberReports
;
@ApiModelProperty
(
"检验员数量"
)
private
Long
numberInspectors
;
@ApiModelProperty
(
"车企数量"
)
private
Long
numberCompanies
;
@ApiModelProperty
(
"整车样品数量"
)
private
Long
numberVehicleSamples
;
@ApiModelProperty
(
"零部件样品数量"
)
private
Long
numberComponentSamples
;
@ApiModelProperty
(
"测试方法数量"
)
private
Long
numberMethods
;
@ApiModelProperty
(
"场景数量"
)
private
Long
numberScenes
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/StandardCategoryStatisticsVO.java
0 → 100644
View file @
e8cfa4ca
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
value
=
"首页标准类别统计"
)
public
class
StandardCategoryStatisticsVO
{
@ApiModelProperty
(
"类别数量"
)
private
Long
value
;
@ApiModelProperty
(
"类别名称"
)
private
String
name
;
}
quality-review/src/main/java/com/ruoyi/mapper/StatisticsHomeMapper.java
0 → 100644
View file @
e8cfa4ca
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.vo.QuantityStatisticsVO
;
import
com.ruoyi.domain.vo.StandardCategoryStatisticsVO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
StatisticsHomeMapper
{
// 数量统计
public
QuantityStatisticsVO
selectQuantityStatistics
(
QuantityStatisticsVO
quantityStatisticsHome
);
// 标准类别统计
public
List
<
StandardCategoryStatisticsVO
>
selectStandardCategoryStatistics
();
}
quality-review/src/main/java/com/ruoyi/service/StatisticsHomeService.java
0 → 100644
View file @
e8cfa4ca
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.vo.QuantityStatisticsVO
;
import
com.ruoyi.domain.vo.StandardCategoryStatisticsVO
;
import
java.util.List
;
public
interface
StatisticsHomeService
{
// 数量统计
public
QuantityStatisticsVO
selectQuantityStatistics
(
QuantityStatisticsVO
quantityStatisticsHome
);
// 标准类别统计
public
List
<
StandardCategoryStatisticsVO
>
selectStandardCategoryStatistics
();
}
quality-review/src/main/java/com/ruoyi/service/impl/StatisticsHomeServiceImpl.java
0 → 100644
View file @
e8cfa4ca
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.vo.QuantityStatisticsVO
;
import
com.ruoyi.domain.vo.StandardCategoryStatisticsVO
;
import
com.ruoyi.mapper.StatisticsHomeMapper
;
import
com.ruoyi.service.StatisticsHomeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Service
@Transactional
public
class
StatisticsHomeServiceImpl
implements
StatisticsHomeService
{
@Autowired
private
StatisticsHomeMapper
statisticsHomeMapper
;
@Override
public
QuantityStatisticsVO
selectQuantityStatistics
(
QuantityStatisticsVO
quantityStatisticsHome
){
return
statisticsHomeMapper
.
selectQuantityStatistics
(
quantityStatisticsHome
);
}
@Override
public
List
<
StandardCategoryStatisticsVO
>
selectStandardCategoryStatistics
(){
return
statisticsHomeMapper
.
selectStandardCategoryStatistics
();
}
}
quality-review/src/main/java/com/ruoyi/web/StatisticsHomeController.java
0 → 100644
View file @
e8cfa4ca
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.domain.vo.QuantityStatisticsVO
;
import
com.ruoyi.domain.vo.StandardCategoryStatisticsVO
;
import
com.ruoyi.service.StatisticsHomeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
@Api
(
tags
=
{
"首页统计"
})
@RestController
@RequestMapping
(
"/home/statistics"
)
public
class
StatisticsHomeController
{
@Autowired
private
StatisticsHomeService
statisticsHomeService
;
@ApiOperation
(
"首页数量统计"
)
@PostMapping
(
"/quantityStatistics"
)
public
R
<
QuantityStatisticsVO
>
selectQuantityStatistics
(
@Validated
@RequestBody
QuantityStatisticsVO
quantityStatisticsHome
){
return
R
.
ok
(
statisticsHomeService
.
selectQuantityStatistics
(
quantityStatisticsHome
));
}
@ApiOperation
(
"首页标准分类占比"
)
@PostMapping
(
"/standardCategory"
)
public
R
<
List
<
StandardCategoryStatisticsVO
>>
selectStandardCategoryStatistics
(){
return
R
.
ok
(
statisticsHomeService
.
selectStandardCategoryStatistics
());
}
}
quality-review/src/main/resources/mapper/StatisticsHomeMapper.xml
0 → 100644
View file @
e8cfa4ca
<?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.ruoyi.mapper.StatisticsHomeMapper"
>
<select
id=
"selectQuantityStatistics"
resultType=
"com.ruoyi.domain.vo.QuantityStatisticsVO"
parameterType=
"com.ruoyi.domain.vo.QuantityStatisticsVO"
>
SELECT
( SELECT count( id ) FROM t_standard ) AS standardQuantity,
( SELECT count( id ) FROM t_test_usecase ) AS numberUseCases,
( SELECT count( id ) FROM t_task ) AS numberTasks,
( SELECT count( id ) FROM t_automobile_enterprise WHERE deleted = 0 ) AS numberCompanies,
(
SELECT
count( su.user_id )
FROM
sys_user su
LEFT JOIN sys_user_role sur ON sur.user_id = su.user_id
WHERE
sur.role_id = 106
) AS numberInspectors,
( SELECT count( id ) FROM t_sample WHERE flag = '0' AND deleted = 0 ) AS numberVehicleSamples,
( SELECT count( id ) FROM t_sample WHERE flag = '1' AND deleted = 0 ) AS numberComponentSamples,
( SELECT count( id ) FROM t_test_scenario ) AS numberScenes,
( SELECT count( id ) FROM t_test_type ) AS numberMethods,
( SELECT count( id ) FROM t_task WHERE vehicle_information_url IS NOT NULL ) AS numberReports
</select>
<select
id=
"selectStandardCategoryStatistics"
resultType=
"com.ruoyi.domain.vo.StandardCategoryStatisticsVO"
>
SELECT
count( id ) AS value,
standard_type AS name
FROM
t_standard
GROUP BY
standard_type
</select>
</mapper>
\ No newline at end of file
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