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
74356169
Commit
74356169
authored
Mar 21, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
填写问卷
parent
5fbc5eb3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
153 additions
and
23 deletions
+153
-23
ReviewDetailsResult.java
...w/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
+7
-2
ReviewEnterpriseArchiveFileVO.java
...va/com/ruoyi/domain/vo/ReviewEnterpriseArchiveFileVO.java
+25
-0
ReviewDetailsResultServiceImpl.java
...om/ruoyi/service/impl/ReviewDetailsResultServiceImpl.java
+41
-4
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+33
-2
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+33
-5
ReviewDetailsResultSaveRequest.java
...com/ruoyi/web/request/ReviewDetailsResultSaveRequest.java
+7
-4
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+7
-6
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
View file @
74356169
...
...
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -85,11 +87,14 @@ public class ReviewDetailsResult implements Serializable {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联到车企留档文件"
)
private
Lo
ng
reviewEnterpriseArchiveId
;
private
Stri
ng
reviewEnterpriseArchiveId
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"文件名称"
)
private
String
fileName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"文件列表"
)
List
<
ReviewEnterpriseArchiveFileVO
>
fileList
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/ReviewEnterpriseArchiveFileVO.java
0 → 100644
View file @
74356169
package
com
.
ruoyi
.
domain
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@ApiModel
(
value
=
"ReviewEnterpriseArchiveFileVO"
,
description
=
"细则关联车企文件列表"
)
@Accessors
(
chain
=
true
)
@Data
public
class
ReviewEnterpriseArchiveFileVO
{
@ApiModelProperty
(
"文件id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@ApiModelProperty
(
"文件名称"
)
private
String
fileName
;
@ApiModelProperty
(
"文件目录"
)
private
String
catalogue
;
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewDetailsResultServiceImpl.java
View file @
74356169
...
...
@@ -3,7 +3,9 @@ package com.ruoyi.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO
;
import
com.ruoyi.service.ReviewDetailsResultService
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.web.request.ReviewDetailsResultSaveRequest
;
...
...
@@ -11,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -48,8 +51,25 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes
result
.
setUserId
(
loginUser
.
getUserId
());
result
.
setUserName
(
loginUser
.
getNickName
());
result
.
setLastModifyTime
(
new
Date
());
result
.
setCatalogue
(
request
.
getCatalogue
());
result
.
setReviewEnterpriseArchiveId
(
request
.
getReviewEnterpriseArchiveId
());
// 获取文件列表
List
<
ReviewEnterpriseArchiveFileVO
>
fileList
=
request
.
getFileList
();
List
<
Long
>
idList
=
new
ArrayList
<>();
List
<
String
>
fileNameList
=
new
ArrayList
<>();
List
<
String
>
catalogueList
=
new
ArrayList
<>();
// 遍历fileList
for
(
ReviewEnterpriseArchiveFileVO
fileVO
:
fileList
)
{
// 将字段逗号分隔后存入对应的集合中
idList
.
add
(
fileVO
.
getId
());
fileNameList
.
add
(
fileVO
.
getFileName
());
catalogueList
.
add
(
fileVO
.
getCatalogue
());
}
result
.
setReviewEnterpriseArchiveId
(
StringUtils
.
join
(
idList
,
","
));
result
.
setFileName
(
StringUtils
.
join
(
fileNameList
,
","
));
result
.
setCatalogue
(
StringUtils
.
join
(
catalogueList
,
","
));
this
.
baseMapper
.
updateById
(
result
);
}
else
{
...
...
@@ -57,13 +77,30 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes
ReviewDetailsResult
reviewDetailsResult
=
new
ReviewDetailsResult
();
reviewDetailsResult
.
setTaskId
(
request
.
getTaskId
());
reviewDetailsResult
.
setReviewDetailsId
(
request
.
getReviewDetailsId
());
reviewDetailsResult
.
setReviewEnterpriseArchiveId
(
request
.
getReviewEnterpriseArchiveId
());
reviewDetailsResult
.
setCatalogue
(
request
.
getCatalogue
());
reviewDetailsResult
.
setPassed
(
request
.
getPassed
());
reviewDetailsResult
.
setUserId
(
loginUser
.
getUserId
());
reviewDetailsResult
.
setUserName
(
loginUser
.
getNickName
());
reviewDetailsResult
.
setLastModifyTime
(
new
Date
());
// 获取文件列表
List
<
ReviewEnterpriseArchiveFileVO
>
fileList
=
request
.
getFileList
();
List
<
Long
>
idList
=
new
ArrayList
<>();
List
<
String
>
fileNameList
=
new
ArrayList
<>();
List
<
String
>
catalogueList
=
new
ArrayList
<>();
// 遍历fileList
for
(
ReviewEnterpriseArchiveFileVO
fileVO
:
fileList
)
{
// 将字段逗号分隔后存入对应的集合中
idList
.
add
(
fileVO
.
getId
());
fileNameList
.
add
(
fileVO
.
getFileName
());
catalogueList
.
add
(
fileVO
.
getCatalogue
());
}
reviewDetailsResult
.
setReviewEnterpriseArchiveId
(
StringUtils
.
join
(
idList
,
","
));
reviewDetailsResult
.
setFileName
(
StringUtils
.
join
(
fileNameList
,
","
));
reviewDetailsResult
.
setCatalogue
(
StringUtils
.
join
(
catalogueList
,
","
));
this
.
baseMapper
.
insert
(
reviewDetailsResult
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
74356169
...
...
@@ -4,6 +4,7 @@ import com.ruoyi.common.DataStatisticsUtils;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
...
...
@@ -181,8 +182,8 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
standard
.
setPassed
(
null
);
}
if
(
reviewDetailsResult
!=
null
&&
reviewDetailsResult
.
getReviewEnterpriseArchiveId
()
!=
null
)
{
ReviewEnterpriseArchive
reviewEnterpriseArchive
=
reviewEnterpriseArchiveMapper
.
selectById
(
reviewDetailsResult
.
getReviewEnterpriseArchiveId
());
reviewDetailsResult
.
setFile
Name
(
reviewEnterpriseArchive
.
getFileName
(
));
reviewDetailsResult
.
setFile
List
(
setFileList
(
reviewDetailsResult
));
}
details
.
setResult
(
reviewDetailsResult
);
}
...
...
@@ -204,6 +205,36 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
}
// 设置文件列表
private
List
<
ReviewEnterpriseArchiveFileVO
>
setFileList
(
ReviewDetailsResult
reviewDetailsResult
)
{
// 拆分字段值,得到对应的数组
String
[]
idArray
=
reviewDetailsResult
.
getReviewEnterpriseArchiveId
().
split
(
","
);
String
[]
catalogueArray
=
reviewDetailsResult
.
getCatalogue
().
split
(
","
);
String
[]
fileNameArray
=
reviewDetailsResult
.
getFileName
().
split
(
","
);
// 获取数组的最大长度
int
maxLength
=
Math
.
max
(
Math
.
max
(
idArray
.
length
,
catalogueArray
.
length
),
fileNameArray
.
length
);
// 创建列表,用于存储合成对象
List
<
ReviewEnterpriseArchiveFileVO
>
fileList
=
new
ArrayList
<>();
// 合成对象
for
(
int
i
=
0
;
i
<
maxLength
;
i
++)
{
Long
id
=
(
i
<
idArray
.
length
&&
!
idArray
[
i
].
isEmpty
())
?
Long
.
parseLong
(
idArray
[
i
])
:
null
;
String
catalogue
=
(
i
<
catalogueArray
.
length
)
?
catalogueArray
[
i
]
:
null
;
String
fileName
=
(
i
<
fileNameArray
.
length
)
?
fileNameArray
[
i
]
:
null
;
ReviewEnterpriseArchiveFileVO
fileVO
=
new
ReviewEnterpriseArchiveFileVO
();
fileVO
.
setId
(
id
);
fileVO
.
setCatalogue
(
catalogue
);
fileVO
.
setFileName
(
fileName
);
fileList
.
add
(
fileVO
);
}
return
fileList
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
74356169
...
...
@@ -2,10 +2,9 @@ package com.ruoyi.service.impl;
import
com.ruoyi.common.DataStatisticsUtils
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
...
...
@@ -16,7 +15,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -180,8 +178,8 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
standard
.
setPassed
(
null
);
}
if
(
reviewDetailsResult
!=
null
&&
reviewDetailsResult
.
getReviewEnterpriseArchiveId
()
!=
null
)
{
ReviewEnterpriseArchive
reviewEnterpriseArchive
=
reviewEnterpriseArchiveMapper
.
selectById
(
reviewDetailsResult
.
getReviewEnterpriseArchiveId
());
reviewDetailsResult
.
setFile
Name
(
reviewEnterpriseArchive
.
getFileName
(
));
reviewDetailsResult
.
setFile
List
(
setFileList
(
reviewDetailsResult
));
}
details
.
setResult
(
reviewDetailsResult
);
}
...
...
@@ -201,6 +199,36 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
systemReviewTaskMapper
.
updateById
(
systemReviewTask
);
}
// 设置文件列表
private
List
<
ReviewEnterpriseArchiveFileVO
>
setFileList
(
ReviewDetailsResult
reviewDetailsResult
)
{
// 拆分字段值,得到对应的数组
String
[]
idArray
=
reviewDetailsResult
.
getReviewEnterpriseArchiveId
().
split
(
","
);
String
[]
catalogueArray
=
reviewDetailsResult
.
getCatalogue
().
split
(
","
);
String
[]
fileNameArray
=
reviewDetailsResult
.
getFileName
().
split
(
","
);
// 获取数组的最大长度
int
maxLength
=
Math
.
max
(
Math
.
max
(
idArray
.
length
,
catalogueArray
.
length
),
fileNameArray
.
length
);
// 创建列表,用于存储合成对象
List
<
ReviewEnterpriseArchiveFileVO
>
fileList
=
new
ArrayList
<>();
// 合成对象
for
(
int
i
=
0
;
i
<
maxLength
;
i
++)
{
Long
id
=
(
i
<
idArray
.
length
&&
!
idArray
[
i
].
isEmpty
())
?
Long
.
parseLong
(
idArray
[
i
])
:
null
;
String
catalogue
=
(
i
<
catalogueArray
.
length
)
?
catalogueArray
[
i
]
:
null
;
String
fileName
=
(
i
<
fileNameArray
.
length
)
?
fileNameArray
[
i
]
:
null
;
ReviewEnterpriseArchiveFileVO
fileVO
=
new
ReviewEnterpriseArchiveFileVO
();
fileVO
.
setId
(
id
);
fileVO
.
setCatalogue
(
catalogue
);
fileVO
.
setFileName
(
fileName
);
fileList
.
add
(
fileVO
);
}
return
fileList
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewDetailsResultSaveRequest.java
View file @
74356169
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"ReviewDetailsResultSaveRequest"
,
description
=
"保存审查细则的审查结果"
)
@Data
public
class
ReviewDetailsResultSaveRequest
{
...
...
@@ -26,9 +29,9 @@ public class ReviewDetailsResultSaveRequest {
@ApiModelProperty
(
"审核是否通过(0未通过、1通过)"
)
private
Integer
passed
;
@ApiModelProperty
(
"
关联到车企留档文件
"
)
private
Long
reviewEnterpriseArchiveId
;
@ApiModelProperty
(
"
评论
"
)
private
String
comment
;
@ApiModelProperty
(
"
章节条目或范围
"
)
private
String
catalogue
;
@ApiModelProperty
(
"
关联文件列表
"
)
List
<
ReviewEnterpriseArchiveFileVO
>
fileList
;
}
quality-review/src/main/resources/mapper/ReviewDetailsResultMapper.xml
View file @
74356169
...
...
@@ -7,7 +7,7 @@
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.ReviewDetailsResult"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"passed"
column=
"passed"
jdbcType=
"TINYINT"
/>
<result
property=
"comment"
column=
"comment"
jdbcType=
"VARCHAR"
/>
<result
property=
"comment"
column=
"comment"
jdbcType=
"
LONG
VARCHAR"
/>
<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"
/>
...
...
@@ -15,7 +15,8 @@
<result
property=
"userName"
column=
"user_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"lastModifyTime"
column=
"last_modify_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"catalogue"
column=
"catalogue"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewEnterpriseArchiveId"
column=
"review_enterprise_archive_id"
jdbcType=
"BIGINT"
/>
<result
property=
"reviewEnterpriseArchiveId"
column=
"review_enterprise_archive_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileName"
column=
"file_name"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
...
...
@@ -25,11 +26,11 @@
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, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_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, catalogue, review_enterprise_archive_id
, file_name
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, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
, file_name
FROM t_review_details_result
WHERE task_id = #{taskId} and review_details_id = #{reviewDetailsId}
</select>
...
...
@@ -39,7 +40,7 @@
WHERE passed = 0 AND task_id = #{taskId}
</select>
<select
id=
"findByDetailsList"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT tr.id, tr.passed, tr.comment, tr.images_url, tr.review_details_id, tr.task_id, tr.user_id, tr.user_name, tr.last_modify_time, tr.catalogue, tr.review_enterprise_archive_id
SELECT tr.id, tr.passed, tr.comment, tr.images_url, tr.review_details_id, tr.task_id, tr.user_id, tr.user_name, tr.last_modify_time, tr.catalogue, tr.review_enterprise_archive_id
, tr.file_name
FROM t_review_details_result tr
LEFT JOIN t_system_review_task ts ON ts.id = tr.task_id
LEFT JOIN t_car_review_task tc ON tc.id = tr.task_id
...
...
@@ -50,7 +51,7 @@
</foreach>
</select>
<select
id=
"findByDetailsId"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
, file_name
FROM t_review_details_result WHERE review_details_id = #{detailsId}
</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