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
093845b5
Commit
093845b5
authored
Feb 22, 2024
by
王飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、实现预览企业留档文件功能。
parent
31fd4081
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
14 deletions
+87
-14
ReviewEnterpriseArchive.java
...c/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
+1
-3
ReviewEnterpriseArchiveViewItemVO.java
...om/ruoyi/domain/vo/ReviewEnterpriseArchiveViewItemVO.java
+5
-0
ReviewEnterpriseArchiveViewVO.java
...va/com/ruoyi/domain/vo/ReviewEnterpriseArchiveViewVO.java
+4
-1
ReviewEnterpriseArchiveMapper.java
.../java/com/ruoyi/mapper/ReviewEnterpriseArchiveMapper.java
+3
-0
ReviewEnterpriseArchiveServiceImpl.java
...uoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
+34
-2
ReviewEnterpriseArchiveMapper.xml
...c/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
+16
-8
ReviewEnterpriseArchiveTest.java
.../src/test/java/com/ruoyi/ReviewEnterpriseArchiveTest.java
+24
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
View file @
093845b5
...
@@ -27,7 +27,7 @@ public class ReviewEnterpriseArchive implements Serializable {
...
@@ -27,7 +27,7 @@ public class ReviewEnterpriseArchive implements Serializable {
/**
/**
* 企业名称
* 企业名称
*/
*/
private
String
enterpri
c
eName
;
private
String
enterpri
s
eName
;
/**
/**
* 文件名称
* 文件名称
...
@@ -69,6 +69,4 @@ public class ReviewEnterpriseArchive implements Serializable {
...
@@ -69,6 +69,4 @@ public class ReviewEnterpriseArchive implements Serializable {
*/
*/
private
Long
taskId
;
private
Long
taskId
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/domain/vo/ReviewEnterpriseArchiveViewItemVO.java
View file @
093845b5
package
com
.
ruoyi
.
domain
.
vo
;
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Accessors
(
chain
=
true
)
@Data
@Data
public
class
ReviewEnterpriseArchiveViewItemVO
{
public
class
ReviewEnterpriseArchiveViewItemVO
{
...
@@ -16,4 +18,7 @@ public class ReviewEnterpriseArchiveViewItemVO {
...
@@ -16,4 +18,7 @@ public class ReviewEnterpriseArchiveViewItemVO {
// 要点要求
// 要点要求
private
String
keyPoint
;
private
String
keyPoint
;
// 企业留档文件id
private
Long
archiveId
;
}
}
quality-review/src/main/java/com/ruoyi/domain/vo/ReviewEnterpriseArchiveViewVO.java
View file @
093845b5
...
@@ -7,7 +7,10 @@ import java.util.List;
...
@@ -7,7 +7,10 @@ import java.util.List;
@Data
@Data
public
class
ReviewEnterpriseArchiveViewVO
{
public
class
ReviewEnterpriseArchiveViewVO
{
// 文件名称
// 企业留档文件id
private
Long
id
;
// 企业留档文件名称
private
String
fileName
;
private
String
fileName
;
// 条目
// 条目
...
...
quality-review/src/main/java/com/ruoyi/mapper/ReviewEnterpriseArchiveMapper.java
View file @
093845b5
...
@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
...
@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -17,6 +18,8 @@ import java.util.List;
...
@@ -17,6 +18,8 @@ import java.util.List;
public
interface
ReviewEnterpriseArchiveMapper
extends
BaseMapper
<
ReviewEnterpriseArchive
>
{
public
interface
ReviewEnterpriseArchiveMapper
extends
BaseMapper
<
ReviewEnterpriseArchive
>
{
List
<
ReviewEnterpriseArchive
>
findByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
ReviewEnterpriseArchive
>
findByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
ReviewEnterpriseArchiveViewItemVO
>
findViewItemVOByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
View file @
093845b5
...
@@ -2,12 +2,14 @@ package com.ruoyi.service.impl;
...
@@ -2,12 +2,14 @@ package com.ruoyi.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
com.ruoyi.mapper.ReviewEnterpriseArchiveMapper
;
import
com.ruoyi.mapper.ReviewEnterpriseArchiveMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -17,18 +19,48 @@ import java.util.List;
...
@@ -17,18 +19,48 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
ReviewEnterpriseArchiveServiceImpl
extends
ServiceImpl
<
ReviewEnterpriseArchiveMapper
,
ReviewEnterpriseArchive
>
public
class
ReviewEnterpriseArchiveServiceImpl
extends
ServiceImpl
<
ReviewEnterpriseArchiveMapper
,
ReviewEnterpriseArchive
>
implements
ReviewEnterpriseArchiveService
{
implements
ReviewEnterpriseArchiveService
{
@Autowired
@Autowired
private
ReviewEnterpriseArchiveMapper
reviewEnterpriseArchiveMapper
;
private
ReviewEnterpriseArchiveMapper
reviewEnterpriseArchiveMapper
;
@Override
@Override
public
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
taskId
)
{
public
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
taskId
)
{
List
<
ReviewEnterpriseArchive
>
archives
=
reviewEnterpriseArchiveMapper
.
findByTaskId
(
taskId
);
List
<
ReviewEnterpriseArchive
>
archives
=
reviewEnterpriseArchiveMapper
.
findByTaskId
(
taskId
);
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
=
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
taskId
);
return
buildReviewEnterpriseArchiveViewVO
(
archives
,
viewItems
);
}
private
List
<
ReviewEnterpriseArchiveViewVO
>
buildReviewEnterpriseArchiveViewVO
(
List
<
ReviewEnterpriseArchive
>
archives
,
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
)
{
List
<
ReviewEnterpriseArchiveViewVO
>
viewList
=
new
ArrayList
();
for
(
ReviewEnterpriseArchive
archive
:
archives
)
{
ReviewEnterpriseArchiveViewVO
view
=
new
ReviewEnterpriseArchiveViewVO
();
view
.
setId
(
archive
.
getId
());
view
.
setFileName
(
archive
.
getFileName
());
setReviewEnterpriseArchiveViewItemVO
(
view
,
viewItems
);
viewList
.
add
(
view
);
}
return
viewList
;
}
private
void
setReviewEnterpriseArchiveViewItemVO
(
ReviewEnterpriseArchiveViewVO
view
,
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
)
{
List
<
ReviewEnterpriseArchiveViewItemVO
>
subList
=
new
ArrayList
();
Long
archiveId
=
view
.
getId
();
for
(
ReviewEnterpriseArchiveViewItemVO
item
:
viewItems
)
{
if
(
item
.
getArchiveId
().
equals
(
archiveId
))
{
subList
.
add
(
item
);
}
}
return
null
;
view
.
setItems
(
subList
)
;
}
}
}
}
...
...
quality-review/src/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
View file @
093845b5
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"enterpri
c
eName"
column=
"enterprice_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"enterpri
s
eName"
column=
"enterprice_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileName"
column=
"file_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileName"
column=
"file_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"version"
column=
"version"
jdbcType=
"VARCHAR"
/>
<result
property=
"version"
column=
"version"
jdbcType=
"VARCHAR"
/>
<result
property=
"publishDate"
column=
"publish_date"
jdbcType=
"DATE"
/>
<result
property=
"publishDate"
column=
"publish_date"
jdbcType=
"DATE"
/>
...
@@ -17,13 +17,21 @@
...
@@ -17,13 +17,21 @@
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,enterprice_name,file_name,
version,publish_date,status,
identify_number,storage,photo,
task_id
</sql>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
SELECT id, enterpriceName, fileName, version, publishDate, status, identifyNumber, storage, photo, taskId FROM t_review_enterprise_archive WHERE task_id = #{taskId}
SELECT id, enterprise_name, file_name, version, publish_date, status, identify_number, storage, photo, task_id FROM t_review_enterprise_archive WHERE task_id = #{taskId}
</select>
<select
id=
"findViewItemVOByTaskId"
resultType=
"com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO"
>
SELECT
result.catalogue AS catalogue,
standard.chapter AS chapter,
standard.text AS standard,
keypoint.text AS keyPoint,
archive.id AS archiveId
FROM t_review_details_result result
LEFT JOIN t_review_details details ON result.review_details_id = details.id
LEFT JOIN t_review_keypoint keypoint ON details.review_keypoint_id = keypoint.id
LEFT JOIN t_review_standard standard ON keypoint.review_standard_id = standard.id
LEFT JOIN t_review_enterprise_archive archive ON result.review_enterprise_archive_id = archive.id
WHERE result.task_id = #{taskId};
</select>
</select>
</mapper>
</mapper>
ruoyi-admin/src/test/java/com/ruoyi/ReviewEnterpriseArchiveTest.java
0 → 100644
View file @
093845b5
package
com
.
ruoyi
;
import
cn.hutool.json.JSONUtil
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
java.util.List
;
@SpringBootTest
public
class
ReviewEnterpriseArchiveTest
{
@Autowired
private
ReviewEnterpriseArchiveService
reviewEnterpriseArchiveService
;
@Test
public
void
viewTest
()
{
List
<
ReviewEnterpriseArchiveViewVO
>
view
=
reviewEnterpriseArchiveService
.
view
(
1744255874929094658L
);
JSONUtil
.
toJsonPrettyStr
(
view
);
}
}
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