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
76af877d
Commit
76af877d
authored
Jul 11, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
任务状态分布 See merge request
!410
parents
cdb52718
46df3df7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
4 deletions
+71
-4
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+4
-4
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+8
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+10
-0
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+10
-0
TaskStateDistributionRequest.java
...a/com/ruoyi/web/request/TaskStateDistributionRequest.java
+13
-0
TaskStateDistributionResponse.java
...com/ruoyi/web/response/TaskStateDistributionResponse.java
+16
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+10
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
76af877d
...
...
@@ -7,12 +7,10 @@ import com.ruoyi.domain.vo.EnterpriseFilePdfVO;
import
com.ruoyi.domain.vo.InspectionPersonnelVO
;
import
com.ruoyi.domain.vo.InspectionReportPdfVO
;
import
com.ruoyi.domain.vo.TestConclusionVO
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskFindRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
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
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -82,4 +80,6 @@ public interface TaskMapper extends BaseMapper<Task> {
* @return
*/
InspectionPersonnelVO
selectInspectionPersonnelById
(
Long
taskId
);
List
<
TaskStateDistributionResponse
>
taskStateDistribution
(
@Param
(
"request"
)
TaskStateDistributionRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
76af877d
...
...
@@ -6,6 +6,7 @@ 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
java.io.IOException
;
import
java.util.List
;
...
...
@@ -70,4 +71,11 @@ public interface TaskService extends IService<Task> {
String
createProject
(
String
request
)
throws
IOException
;
String
getPicture
(
TaskPictureRequest
request
)
throws
IOException
;
/**
* 根据状态查看任务数据统计
* @param request
* @return
*/
List
<
TaskStateDistributionResponse
>
taskStateDistribution
(
TaskStateDistributionRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
76af877d
...
...
@@ -866,6 +866,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
/**
* 根据状态查看任务数据统计
* @param request
* @return
*/
@Override
public
List
<
TaskStateDistributionResponse
>
taskStateDistribution
(
TaskStateDistributionRequest
request
)
{
return
taskMapper
.
taskStateDistribution
(
request
);
}
/**
* pdf转图片
* @param urlStr
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
76af877d
...
...
@@ -16,6 +16,7 @@ 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
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
...
...
@@ -210,4 +211,13 @@ public class TaskController extends BaseController {
return
R
.
ok
(
taskService
.
getPicture
(
request
));
}
@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
)
{
return
getDataTable
(
taskService
.
taskStateDistribution
(
request
));
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskStateDistributionRequest.java
0 → 100644
View file @
76af877d
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"TaskStateDistributionRequest"
,
description
=
"任务状态分布"
)
@Data
public
class
TaskStateDistributionRequest
{
@ApiModelProperty
(
"标准id"
)
private
Long
standardId
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskStateDistributionResponse.java
0 → 100644
View file @
76af877d
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"TaskStateDistributionResponse"
,
description
=
"任务状态分布"
)
@Data
public
class
TaskStateDistributionResponse
{
@ApiModelProperty
(
"任务状态NEW(新建的)、PENDING(运行中的)、FINISH(已结束的)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"数量"
)
private
String
number
;
}
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
76af877d
...
...
@@ -423,6 +423,16 @@
t.id = #{taskId}
group by t.id
</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>
group by task_status
</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