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
b3fcc2ad
Commit
b3fcc2ad
authored
Jul 01, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
dev - master 31 See merge request
!382
parents
faa1c2f8
3f776bfc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
5 deletions
+56
-5
ReviewEnterpriseArchive.java
...c/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
+5
-0
ReviewEnterpriseArchiveService.java
...ava/com/ruoyi/service/ReviewEnterpriseArchiveService.java
+5
-0
ReviewEnterpriseArchiveServiceImpl.java
...uoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
+21
-1
StandardInspectionItemRelationServiceImpl.java
...rvice/impl/StandardInspectionItemRelationServiceImpl.java
+22
-1
TestRecordsServiceImpl.java
...n/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
+2
-2
ReviewEnterpriseArchiveController.java
...java/com/ruoyi/web/ReviewEnterpriseArchiveController.java
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
View file @
b3fcc2ad
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -87,4 +88,8 @@ public class ReviewEnterpriseArchive implements Serializable {
...
@@ -87,4 +88,8 @@ public class ReviewEnterpriseArchive implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
private
Date
createTime
;
@ApiModelProperty
(
"附件"
)
@TableField
(
exist
=
false
)
private
String
[]
url
;
}
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/service/ReviewEnterpriseArchiveService.java
View file @
b3fcc2ad
...
@@ -45,4 +45,9 @@ public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpris
...
@@ -45,4 +45,9 @@ public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpris
// 导入车企文件
// 导入车企文件
void
importEnterprise
(
List
<
EnterpriseImportFileVO
>
list
,
Long
taskId
,
HttpServletResponse
response
);
void
importEnterprise
(
List
<
EnterpriseImportFileVO
>
list
,
Long
taskId
,
HttpServletResponse
response
);
/**
* 编辑车企文件
* @param reviewEnterpriseArchive
*/
void
editEnterpriseArchive
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
View file @
b3fcc2ad
...
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.model.LoginUser;
...
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.model.LoginUser;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.vo.EnterpriseImportFileVO
;
import
com.ruoyi.domain.vo.EnterpriseImportFileVO
;
...
@@ -149,13 +150,20 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
...
@@ -149,13 +150,20 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
if
(
sum
>
0
)
{
if
(
sum
>
0
)
{
throw
new
ServiceException
(
"新增文件名称重复,请检查"
,
HttpStatus
.
ERROR
);
throw
new
ServiceException
(
"新增文件名称重复,请检查"
,
HttpStatus
.
ERROR
);
}
else
{
}
else
{
// 将附件地址存入photo字段中
if
(
reviewEnterpriseArchive
.
getUrl
()
!=
null
&&
reviewEnterpriseArchive
.
getUrl
().
length
!=
0
)
{
String
joinUrl
=
StringUtils
.
join
(
reviewEnterpriseArchive
.
getUrl
(),
","
);
reviewEnterpriseArchive
.
setPhoto
(
joinUrl
);
}
reviewEnterpriseArchiveService
.
save
(
reviewEnterpriseArchive
);
reviewEnterpriseArchiveService
.
save
(
reviewEnterpriseArchive
);
ReviewEnterpriseArchiveFindByTaskIdRequest
request
=
new
ReviewEnterpriseArchiveFindByTaskIdRequest
();
ReviewEnterpriseArchiveFindByTaskIdRequest
request
=
new
ReviewEnterpriseArchiveFindByTaskIdRequest
();
request
.
setTaskId
(
reviewEnterpriseArchive
.
getTaskId
());
request
.
setTaskId
(
reviewEnterpriseArchive
.
getTaskId
());
// 根据任务id查询任务底下的所有车企文件
List
<
ReviewEnterpriseArchive
>
list
=
reviewEnterpriseArchiveMapper
.
findEnterpriseArchiveByTaskId
(
request
);
List
<
ReviewEnterpriseArchive
>
list
=
reviewEnterpriseArchiveMapper
.
findEnterpriseArchiveByTaskId
(
request
);
if
(
list
!=
null
&&
list
.
size
()
!=
0
)
{
if
(
list
!=
null
&&
list
.
size
()
!=
0
)
{
for
(
ReviewEnterpriseArchive
archive
:
list
)
{
for
(
ReviewEnterpriseArchive
archive
:
list
)
{
// 如果库里的企业名称不是新增时传入的企业名称则修改
if
(!
Objects
.
equals
(
archive
.
getEnterpriseName
(),
reviewEnterpriseArchive
.
getEnterpriseName
()))
{
if
(!
Objects
.
equals
(
archive
.
getEnterpriseName
(),
reviewEnterpriseArchive
.
getEnterpriseName
()))
{
archive
.
setEnterpriseName
(
reviewEnterpriseArchive
.
getEnterpriseName
());
archive
.
setEnterpriseName
(
reviewEnterpriseArchive
.
getEnterpriseName
());
}
}
...
@@ -176,7 +184,9 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
...
@@ -176,7 +184,9 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Override
@Override
public
ReviewEnterpriseArchive
getInfo
(
ReviewEnterpriseArchiveGetInfoRequest
request
)
{
public
ReviewEnterpriseArchive
getInfo
(
ReviewEnterpriseArchiveGetInfoRequest
request
)
{
return
reviewEnterpriseArchiveMapper
.
selectById
(
request
.
getId
());
ReviewEnterpriseArchive
reviewEnterpriseArchive
=
reviewEnterpriseArchiveMapper
.
selectById
(
request
.
getId
());
reviewEnterpriseArchive
.
setUrl
(
reviewEnterpriseArchive
.
getPhoto
().
split
(
","
));
return
reviewEnterpriseArchive
;
}
}
...
@@ -237,6 +247,16 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
...
@@ -237,6 +247,16 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
}
}
reviewEnterpriseArchiveMapper
.
insertEnterprise
(
list
);
reviewEnterpriseArchiveMapper
.
insertEnterprise
(
list
);
}
}
@Override
public
void
editEnterpriseArchive
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
)
{
// 将附件地址存入photo字段中
if
(
reviewEnterpriseArchive
.
getUrl
()
!=
null
&&
reviewEnterpriseArchive
.
getUrl
().
length
!=
0
)
{
String
joinUrl
=
StringUtils
.
join
(
reviewEnterpriseArchive
.
getUrl
(),
","
);
reviewEnterpriseArchive
.
setPhoto
(
joinUrl
);
}
reviewEnterpriseArchiveService
.
updateById
(
reviewEnterpriseArchive
);
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StandardInspectionItemRelationServiceImpl.java
View file @
b3fcc2ad
...
@@ -9,7 +9,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -9,7 +9,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Transactional
@Transactional
...
@@ -21,6 +25,23 @@ public class StandardInspectionItemRelationServiceImpl extends ServiceImpl<Stand
...
@@ -21,6 +25,23 @@ public class StandardInspectionItemRelationServiceImpl extends ServiceImpl<Stand
@Override
@Override
public
List
<
DictDataVO
>
getByStandardId
(
Long
standardId
)
{
public
List
<
DictDataVO
>
getByStandardId
(
Long
standardId
)
{
return
standardInspectionItemRelationMapper
.
getListByStandardId
(
standardId
);
List
<
DictDataVO
>
list
=
standardInspectionItemRelationMapper
.
getListByStandardId
(
standardId
);
// 定义期望的排序关键字
List
<
String
>
desiredOrder
=
Arrays
.
asList
(
"sraif"
,
"grfis"
,
"trfis"
);
// 使用流API对list进行排序
List
<
DictDataVO
>
sortedList
=
new
ArrayList
<>();
// 首先,创建一个映射表,键为dictValue,值为DictDataVO对象
Map
<
String
,
DictDataVO
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
DictDataVO:
:
getDictValue
,
vo
->
vo
));
// 然后,根据desiredOrder中的顺序从映射表中提取元素
for
(
String
order
:
desiredOrder
)
{
if
(
map
.
containsKey
(
order
))
{
sortedList
.
add
(
map
.
get
(
order
));
}
}
return
sortedList
;
}
}
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
b3fcc2ad
...
@@ -83,7 +83,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -83,7 +83,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
testRecords
.
setUsecase
(
caseResultVO
.
getName
());
testRecords
.
setUsecase
(
caseResultVO
.
getName
());
testRecords
.
setUsecaseId
(
caseResultVO
.
getId
());
testRecords
.
setUsecaseId
(
caseResultVO
.
getId
());
testRecords
.
setDescription
(
caseResultVO
.
getDescription
());
testRecords
.
setDescription
(
caseResultVO
.
getDescription
());
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
()
+
" risk"
);
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
...
@@ -169,7 +169,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -169,7 +169,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
testRecords
.
setUsecase
(
caseResultVO
.
getName
());
testRecords
.
setUsecase
(
caseResultVO
.
getName
());
testRecords
.
setUsecaseId
(
caseResultVO
.
getId
());
testRecords
.
setUsecaseId
(
caseResultVO
.
getId
());
testRecords
.
setDescription
(
caseResultVO
.
getDescription
());
testRecords
.
setDescription
(
caseResultVO
.
getDescription
());
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
()
+
" risk"
);
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewEnterpriseArchiveController.java
View file @
b3fcc2ad
...
@@ -93,7 +93,7 @@ public class ReviewEnterpriseArchiveController extends BaseController {
...
@@ -93,7 +93,7 @@ public class ReviewEnterpriseArchiveController extends BaseController {
@Log
(
title
=
"编辑车企文件"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"编辑车企文件"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
public
R
<
String
>
editEnterpriseArchive
(
@Validated
@RequestBody
ReviewEnterpriseArchive
reviewEnterpriseArchive
)
{
public
R
<
String
>
editEnterpriseArchive
(
@Validated
@RequestBody
ReviewEnterpriseArchive
reviewEnterpriseArchive
)
{
reviewEnterpriseArchiveService
.
updateById
(
reviewEnterpriseArchive
);
reviewEnterpriseArchiveService
.
editEnterpriseArchive
(
reviewEnterpriseArchive
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
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