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
4c6ab9b0
Commit
4c6ab9b0
authored
Jan 25, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
查询处理中总任务&处理完成总任务 See merge request
!58
parents
a16f6728
914ae58d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
88 additions
and
48 deletions
+88
-48
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+4
-0
SystemReviewTask.java
...view/src/main/java/com/ruoyi/domain/SystemReviewTask.java
+4
-0
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+4
-0
ReviewDetailsMapper.java
...w/src/main/java/com/ruoyi/mapper/ReviewDetailsMapper.java
+1
-1
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+3
-3
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+3
-4
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+6
-4
TaskCreateRequest.java
...rc/main/java/com/ruoyi/web/request/TaskCreateRequest.java
+3
-2
TaskFindFinishRequest.java
...ain/java/com/ruoyi/web/request/TaskFindFinishRequest.java
+2
-5
TaskFindPendingRequest.java
...in/java/com/ruoyi/web/request/TaskFindPendingRequest.java
+2
-5
TaskFindPendingResponse.java
.../java/com/ruoyi/web/response/TaskFindPendingResponse.java
+23
-6
TaskGetInfoResponse.java
...main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
+4
-0
ReviewDetailsMapper.xml
...-review/src/main/resources/mapper/ReviewDetailsMapper.xml
+5
-1
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+7
-4
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+17
-13
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
View file @
4c6ab9b0
...
...
@@ -31,6 +31,10 @@ public class CarReviewTask implements Serializable {
public
static
final
String
TASK_STATUS_FINISH
=
"FINISH"
;
@TableField
(
exist
=
false
)
public
static
final
String
TYPE
=
"car"
;
@TableField
(
exist
=
false
)
public
static
final
String
REVIEW_STATUS_NONE
=
"NONE"
;
...
...
quality-review/src/main/java/com/ruoyi/domain/SystemReviewTask.java
View file @
4c6ab9b0
...
...
@@ -36,6 +36,10 @@ public class SystemReviewTask {
public
static
final
String
STATUS_CLOSE
=
"CLOSE"
;
@TableField
(
exist
=
false
)
public
static
final
String
TYPE
=
"system"
;
/**
* 主键
*/
...
...
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
4c6ab9b0
...
...
@@ -89,6 +89,10 @@ public class Task {
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
productionId
;
@ApiModelProperty
(
"生产企业"
)
private
String
productionEnterprise
;
...
...
quality-review/src/main/java/com/ruoyi/mapper/ReviewDetailsMapper.java
View file @
4c6ab9b0
...
...
@@ -17,7 +17,7 @@ public interface ReviewDetailsMapper extends BaseMapper<ReviewDetails> {
* @param taskId
* @return
*/
List
<
ReviewDetails
>
findNoResult
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
ReviewDetails
>
findNoResult
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"type"
)
String
type
);
Long
count
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"type"
)
String
type
);
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
4c6ab9b0
...
...
@@ -90,11 +90,11 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Override
public
void
doConfirmReview
(
CarReviewTask
carReviewTask
)
{
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
carReviewTask
.
getId
());
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
carReviewTask
.
getId
()
,
CarReviewTask
.
TYPE
);
List
<
ReviewTaskInbox
>
inboxList
=
reviewTaskInboxMapper
.
findConfirmListByTaskId
(
carReviewTask
.
getId
());
if
(
detailsList
!=
null
)
{
if
(
detailsList
.
size
()
!=
0
&&
detailsList
!=
null
)
{
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
if
(
inboxList
!=
null
)
{
}
else
if
(
inboxList
.
size
()
!=
0
&&
inboxList
!=
null
)
{
throw
new
ServiceException
(
"存在未确认的场景变更信息,请确认"
,
HttpStatus
.
ERROR
);
}
else
{
// 1. 获取最新问卷
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
4c6ab9b0
...
...
@@ -72,12 +72,11 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Override
public
void
doConfirm
(
SystemReviewTask
systemReviewTask
)
{
// TODO
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
systemReviewTask
.
getId
());
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
systemReviewTask
.
getId
(),
SystemReviewTask
.
TYPE
);
List
<
ReviewTaskInbox
>
inboxList
=
reviewTaskInboxMapper
.
findConfirmListByTaskId
(
systemReviewTask
.
getId
());
if
(
detailsList
!=
null
)
{
if
(
detailsList
.
size
()
!=
0
&&
detailsList
!=
null
)
{
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
if
(
inboxList
!=
null
){
}
else
if
(
inboxList
.
size
()
!=
0
&&
inboxList
!=
null
){
throw
new
ServiceException
(
"存在未确认的场景变更信息,请确认"
,
HttpStatus
.
ERROR
);
}
else
{
// 1. 获取最新问卷
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
4c6ab9b0
...
...
@@ -8,10 +8,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.CarReviewTaskMapper
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.*
;
...
...
@@ -58,6 +55,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Autowired
private
AutomobileEnterpriseMapper
automobileEnterpriseMapper
;
@Override
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
return
taskMapper
.
findList
(
request
);
...
...
@@ -93,6 +93,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
task
.
setName
(
standard
.
getName
());
task
.
setStandardNo
(
standard
.
getStandardNo
());
task
.
setFile
(
standard
.
getFile
());
AutomobileEnterprise
automobileEnterprise
=
automobileEnterpriseMapper
.
selectById
(
request
.
getProductionId
());
task
.
setProductionEnterprise
(
automobileEnterprise
.
getEnterpriseName
());
BeanUtils
.
copyBeanProp
(
task
,
request
);
Long
systemReviewTaskId
=
null
;
...
...
quality-review/src/main/java/com/ruoyi/web/request/TaskCreateRequest.java
View file @
4c6ab9b0
package
com
.
ruoyi
.
web
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.domain.entity.SysDictData
;
import
com.ruoyi.domain.TaskUserRelation
;
import
io.swagger.annotations.Api
;
...
...
@@ -53,8 +54,8 @@ public class TaskCreateRequest {
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业"
)
private
String
productionEnterprise
;
@ApiModelProperty
(
"生产企业
id
"
)
private
Long
productionId
;
@ApiModelProperty
(
"送样者"
)
private
String
sampleSender
;
...
...
quality-review/src/main/java/com/ruoyi/web/request/TaskFindFinishRequest.java
View file @
4c6ab9b0
...
...
@@ -11,11 +11,8 @@ import java.util.Date;
@Data
public
class
TaskFindFinishRequest
extends
PageDomain
{
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
@ApiModelProperty
(
"名称关键词"
)
private
String
taskName
;
@ApiModelProperty
(
"任务编号或名称关键词"
)
private
String
taskNoOrName
;
@ApiModelProperty
(
"任务开始时间"
)
private
Date
taskBeginTime
;
...
...
quality-review/src/main/java/com/ruoyi/web/request/TaskFindPendingRequest.java
View file @
4c6ab9b0
...
...
@@ -11,11 +11,8 @@ import java.util.Date;
@Data
public
class
TaskFindPendingRequest
extends
PageDomain
{
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
@ApiModelProperty
(
"名称关键词"
)
private
String
taskName
;
@ApiModelProperty
(
"任务编号或名称关键词"
)
private
String
taskNoOrName
;
@ApiModelProperty
(
"任务开始时间"
)
private
Date
taskBeginTime
;
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindPendingResponse.java
View file @
4c6ab9b0
...
...
@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@ApiModel
(
value
=
"TaskFindPendingResponse"
,
description
=
"进行中的总任务"
)
@Data
public
class
TaskFindPendingResponse
{
...
...
@@ -30,6 +32,9 @@ public class TaskFindPendingResponse {
@ApiModelProperty
(
"任务状态(NEW、PENDING、FINISH)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"总任务开始时间"
)
private
Date
taskBeginTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审核组长id"
)
private
Long
leaderId
;
...
...
@@ -40,18 +45,30 @@ public class TaskFindPendingResponse {
@ApiModelProperty
(
"体系审查任务状态"
)
private
String
reviewStatus
;
@ApiModelProperty
(
"车型审查任务状态"
)
private
String
carReviewStatus
;
@ApiModelProperty
(
"测试任务状态"
)
private
String
carTestStatus
;
@ApiModelProperty
(
"体系审查任务进度"
)
private
Long
systemReview
;
@ApiModelProperty
(
"体系问卷任务开始时间"
)
private
Date
systemTaskBeginTime
;
@ApiModelProperty
(
"体系问卷任务开始时间"
)
private
Date
systemTaskEndTime
;
@ApiModelProperty
(
"车型审查任务状态"
)
private
String
carReviewStatus
;
@ApiModelProperty
(
"车型审查任务进度"
)
private
Long
carReview
;
@ApiModelProperty
(
"车辆问卷任务开始时间"
)
private
Date
carTaskBeginTime
;
@ApiModelProperty
(
"车辆问卷任务开始时间"
)
private
Date
carTaskEndTime
;
@ApiModelProperty
(
"测试任务状态"
)
private
String
carTestStatus
;
@ApiModelProperty
(
"测试任务进度"
)
private
Long
carTest
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
View file @
4c6ab9b0
...
...
@@ -66,6 +66,10 @@ public class TaskGetInfoResponse {
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
productionId
;
@ApiModelProperty
(
"生产企业"
)
private
String
productionEnterprise
;
...
...
quality-review/src/main/resources/mapper/ReviewDetailsMapper.xml
View file @
4c6ab9b0
...
...
@@ -15,7 +15,11 @@
</select>
<select
id=
"findNoResult"
resultType=
"com.ruoyi.domain.ReviewDetails"
>
SELECT * FROM t_review_details WHERE id NOT IN (SELECT review_details_id FROM t_review_details_result WHERE task_id = #{taskId})
SELECT * FROM t_review_details trd
LEFT JOIN t_review_keypoint trk ON trd.review_keypoint_id = trk.id
LEFT JOIN t_review_standard trs ON trk.review_standard_id = trs.id
WHERE trd.id NOT IN (SELECT review_details_id FROM t_review_details_result WHERE task_id = #{taskId})
AND trs.type = #{type}
</select>
<select
id=
"count"
resultType=
"long"
>
...
...
quality-review/src/main/resources/mapper/ReviewDetailsResultMapper.xml
View file @
4c6ab9b0
...
...
@@ -11,19 +11,22 @@
<result
property=
"imagesUrl"
column=
"images_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewDetailsId"
column=
"review_details_id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"userId"
column=
"user_id"
jdbcType=
"BIGINT"
/>
<result
property=
"userName"
column=
"user_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"lastModifyTime"
column=
"last_modify_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,passed,scene_id,
select
id,passed,scene_id,
scene,imagesUrl,review_details_id,
task_
no
task_
id from t_review_details_result
</sql>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id FROM t_review_details_result WHERE task_id = #{taskId}
SELECT id, passed, comment, images_url, review_details_id, task_id
, user_id, user_name, last_modify_time
FROM t_review_details_result WHERE task_id = #{taskId}
</select>
<select
id=
"findByTaskIdAndDetailsId"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id
SELECT id, passed, comment, images_url, review_details_id, task_id
, user_id, user_name, last_modify_time
FROM t_review_details_result
WHERE task_id = #{taskId} and review_details_id = #{reviewDetailsId}
</select>
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
4c6ab9b0
...
...
@@ -21,6 +21,7 @@
<result
property=
"carIdentificationCode"
column=
"car_identification_code"
jdbcType=
"VARCHAR"
/>
<result
property=
"confidentialityLevel"
column=
"confidentiality_level"
jdbcType=
"VARCHAR"
/>
<result
property=
"sampleName"
column=
"sample_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"productionId"
column=
"production_id"
jdbcType=
"BIGINT"
/>
<result
property=
"productionEnterprise"
column=
"production_enterprise"
jdbcType=
"VARCHAR"
/>
<result
property=
"sampleSender"
column=
"sample_sender"
jdbcType=
"VARCHAR"
/>
<result
property=
"sendDate"
column=
"send_date"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -48,6 +49,11 @@
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskName"
column=
"task_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemTaskBeginTime"
column=
"system_task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemTaskEndTime"
column=
"system_task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"carTaskBeginTime"
column=
"car_task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"carTaskEndTime"
column=
"car_task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"leaderId"
column=
"leader_id"
jdbcType=
"BIGINT"
/>
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStatus"
column=
"review_status"
jdbcType=
"VARCHAR"
/>
...
...
@@ -60,7 +66,7 @@
task_no,task_name,task_status,product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,car_type,car_identification_code,
confidentiality_level,sample_name,production_enterprise,
confidentiality_level,sample_name,production_
id,production_
enterprise,
sample_sender,send_date,sample_number,production_date,
trademark,inspection_basis,task_initiator,task_initiator_dept,
task_begin_time,task_end_time,create_time,
...
...
@@ -82,7 +88,11 @@
t.task_no,t.task_name,t.task_status,
t.leader_id,t.leader,
t.task_begin_time,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
crt.review_start_time car_task_begin_time,
crt.review_submit_time car_task_end_time,
crt.review_status car_review_status,
crt.test_status car_test_status
FROM t_task t
...
...
@@ -90,11 +100,8 @@
left join t_car_review_task crt on t.car_review_task_id = crt.id
<where>
t.task_status IN ("NEW","PENDING")
<if
test=
"taskNo != null and taskNo != ''"
>
and t.task_no = #{taskNo}
</if>
<if
test=
"taskName != null and taskName != ''"
>
and t.task_name like concat('%',#{taskName},'%')
<if
test=
"taskNoOrName != null and taskNoOrName != ''"
>
and (t.task_no = #{taskNoOrName} || t.task_name like concat('%',#{taskNoOrName},'%'))
</if>
<if
test=
"taskBeginTime != null and taskBeginTime != ''"
>
and t.task_begin_time = #{taskBeginTime}
...
...
@@ -112,17 +119,14 @@
FROM t_task t
<where>
t.task_status IN ("FINISH")
<if
test=
"taskNo != null and taskNo != ''"
>
and t.task_no = #{taskNo}
</if>
<if
test=
"taskName != null and taskName != ''"
>
and t.task_name like concat('%',#{taskName},'%')
<if
test=
"taskNoOrName != null and taskNoOrName != ''"
>
and (t.task_no = #{taskNoOrName} || t.task_name like concat('%',#{taskNoOrName},'%'))
</if>
<if
test=
"taskBeginTime != null and taskBeginTime != ''"
>
and t.task_begin_time = #{taskBeginTime}
and t.task_begin_time
>
= #{taskBeginTime}
</if>
<if
test=
"taskEndTime != null and taskEndTime != ''"
>
and t.task_end_time = #{taskEndTime}
and t.task_end_time
<
= #{taskEndTime}
</if>
</where>
</select>
...
...
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