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
fa7253aa
Commit
fa7253aa
authored
Jul 12, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务状态分布&委托单位任务分布
parent
46df3df7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
26 deletions
+73
-26
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+12
-5
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+8
-6
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+11
-3
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+15
-6
EntrustedUnitResponse.java
...in/java/com/ruoyi/web/response/EntrustedUnitResponse.java
+16
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+11
-6
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
fa7253aa
...
...
@@ -8,10 +8,7 @@ import com.ruoyi.domain.vo.InspectionPersonnelVO;
import
com.ruoyi.domain.vo.InspectionReportPdfVO
;
import
com.ruoyi.domain.vo.TestConclusionVO
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskScenarioResponse
;
import
com.ruoyi.web.response.TaskStateDistributionResponse
;
import
com.ruoyi.web.response.UserNameResponse
;
import
com.ruoyi.web.response.*
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -81,5 +78,15 @@ public interface TaskMapper extends BaseMapper<Task> {
*/
InspectionPersonnelVO
selectInspectionPersonnelById
(
Long
taskId
);
List
<
TaskStateDistributionResponse
>
taskStateDistribution
(
@Param
(
"request"
)
TaskStateDistributionRequest
request
);
/**
* 根据状态查看任务数据统计
* @return
*/
List
<
TaskStateDistributionResponse
>
taskStateDistribution
();
/**
* 委托单位任务分布
* @return
*/
List
<
EntrustedUnitResponse
>
entrustedUnitDistribution
();
}
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
fa7253aa
...
...
@@ -3,10 +3,7 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.DataStatisticsResponse
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
com.ruoyi.web.response.TaskStateDistributionResponse
;
import
com.ruoyi.web.response.*
;
import
java.io.IOException
;
import
java.util.List
;
...
...
@@ -74,8 +71,13 @@ public interface TaskService extends IService<Task> {
/**
* 根据状态查看任务数据统计
* @param request
* @return
*/
List
<
TaskStateDistributionResponse
>
taskStateDistribution
(
TaskStateDistributionRequest
request
);
List
<
TaskStateDistributionResponse
>
taskStateDistribution
();
/**
* 委托单位任务分布
* @return
*/
List
<
EntrustedUnitResponse
>
entrustedUnitDistribution
();
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
fa7253aa
...
...
@@ -868,12 +868,20 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
/**
* 根据状态查看任务数据统计
* @param request
* @return
*/
@Override
public
List
<
TaskStateDistributionResponse
>
taskStateDistribution
(
TaskStateDistributionRequest
request
)
{
return
taskMapper
.
taskStateDistribution
(
request
);
public
List
<
TaskStateDistributionResponse
>
taskStateDistribution
()
{
return
taskMapper
.
taskStateDistribution
();
}
/**
* 委托单位任务分布
* @return
*/
@Override
public
List
<
EntrustedUnitResponse
>
entrustedUnitDistribution
()
{
return
taskMapper
.
entrustedUnitDistribution
();
}
/**
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
fa7253aa
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.annotation.Anonymous
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.R
;
...
...
@@ -13,10 +14,7 @@ import com.ruoyi.service.TaskSampleRelationService;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskUserRelationService
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.DataStatisticsResponse
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
com.ruoyi.web.response.TaskStateDistributionResponse
;
import
com.ruoyi.web.response.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
...
...
@@ -211,13 +209,24 @@ public class TaskController extends BaseController {
return
R
.
ok
(
taskService
.
getPicture
(
request
));
}
@Anonymous
@ApiOperation
(
"根据状态查看任务数据统计"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/taskStateDistribution"
)
public
TableDataInfo
<
TaskStateDistributionResponse
>
taskStateDistribution
(
@Validated
@RequestBody
TaskStateDistributionRequest
request
)
{
public
TableDataInfo
<
TaskStateDistributionResponse
>
taskStateDistribution
()
{
return
getDataTable
(
taskService
.
taskStateDistribution
(
request
));
return
getDataTable
(
taskService
.
taskStateDistribution
());
}
@Anonymous
@ApiOperation
(
"委托单位任务分布"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/entrustedUnitDistribution"
)
public
TableDataInfo
<
EntrustedUnitResponse
>
entrustedUnitDistribution
()
{
return
getDataTable
(
taskService
.
entrustedUnitDistribution
());
}
}
quality-review/src/main/java/com/ruoyi/web/response/EntrustedUnitResponse.java
0 → 100644
View file @
fa7253aa
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"EntrustedUnitResponse"
,
description
=
"委托单位任务分布"
)
@Data
public
class
EntrustedUnitResponse
{
@ApiModelProperty
(
"委托单位"
)
private
String
entrustedUnit
;
@ApiModelProperty
(
"数量"
)
private
String
number
;
}
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
fa7253aa
...
...
@@ -425,14 +425,19 @@
</select>
<select
id=
"taskStateDistribution"
resultType=
"com.ruoyi.web.response.TaskStateDistributionResponse"
>
select task_status, count(*) number from t_task
<where>
and task_status not in ("TEMPORARILY")
<if
test=
"request.standardId != null and request.standardId != ''"
>
and standard_id = #{request.standardId}
</if>
</where>
where task_status not in ("TEMPORARILY")
group by task_status
</select>
<select
id=
"entrustedUnitDistribution"
resultType=
"com.ruoyi.web.response.EntrustedUnitResponse"
>
select
entrusted_unit,
count(*) number
from
t_task
where
task_status not in ("TEMPORARILY")
group by entrusted_unit
</select>
</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