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
ce10da5e
Commit
ce10da5e
authored
Feb 22, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangfei' into 'dev'
Wangfei See merge request
!99
parents
f7c66002
093845b5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
299 additions
and
0 deletions
+299
-0
ReviewEnterpriseArchive.java
...c/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
+72
-0
ReviewEnterpriseArchiveViewItemVO.java
...om/ruoyi/domain/vo/ReviewEnterpriseArchiveViewItemVO.java
+24
-0
ReviewEnterpriseArchiveViewVO.java
...va/com/ruoyi/domain/vo/ReviewEnterpriseArchiveViewVO.java
+19
-0
ReviewEnterpriseArchiveMapper.java
.../java/com/ruoyi/mapper/ReviewEnterpriseArchiveMapper.java
+27
-0
ReviewEnterpriseArchiveService.java
...ava/com/ruoyi/service/ReviewEnterpriseArchiveService.java
+18
-0
ReviewEnterpriseArchiveServiceImpl.java
...uoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
+69
-0
ReviewEnterpriseArchiveViewResponse.java
...oyi/web/response/ReviewEnterpriseArchiveViewResponse.java
+9
-0
ReviewEnterpriseArchiveMapper.xml
...c/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
+37
-0
ReviewEnterpriseArchiveTest.java
.../src/test/java/com/ruoyi/ReviewEnterpriseArchiveTest.java
+24
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 车企留档文件
* @TableName t_review_enterprise_archive
*/
@TableName
(
value
=
"t_review_enterprise_archive"
)
@Data
public
class
ReviewEnterpriseArchive
implements
Serializable
{
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
/**
* 企业名称
*/
private
String
enterpriseName
;
/**
* 文件名称
*/
private
String
fileName
;
/**
* 文件版本
*/
private
String
version
;
/**
* 发布日期
*/
private
Date
publishDate
;
/**
* 文件状态
*/
private
String
status
;
/**
* 文件识别号
*/
private
String
identifyNumber
;
/**
* 存储位置
*/
private
String
storage
;
/**
* 图片地址
*/
private
String
photo
;
/**
* 关联到任务id
*/
private
Long
taskId
;
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/domain/vo/ReviewEnterpriseArchiveViewItemVO.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Accessors
(
chain
=
true
)
@Data
public
class
ReviewEnterpriseArchiveViewItemVO
{
// 文件目录
private
String
catalogue
;
// 标准章节
private
String
chapter
;
// 标准要求
private
String
standard
;
// 要点要求
private
String
keyPoint
;
// 企业留档文件id
private
Long
archiveId
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/ReviewEnterpriseArchiveViewVO.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ReviewEnterpriseArchiveViewVO
{
// 企业留档文件id
private
Long
id
;
// 企业留档文件名称
private
String
fileName
;
// 条目
private
List
<
ReviewEnterpriseArchiveViewItemVO
>
items
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewEnterpriseArchiveMapper.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_review_enterprise_archive(车企留档文件)】的数据库操作Mapper
* @createDate 2024-02-22 15:32:57
* @Entity com.ruoyi.domain.ReviewEnterpriseArchive
*/
@Repository
public
interface
ReviewEnterpriseArchiveMapper
extends
BaseMapper
<
ReviewEnterpriseArchive
>
{
List
<
ReviewEnterpriseArchive
>
findByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
ReviewEnterpriseArchiveViewItemVO
>
findViewItemVOByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewEnterpriseArchiveService.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_review_enterprise_archive(车企留档文件)】的数据库操作Service
* @createDate 2024-02-22 15:32:57
*/
public
interface
ReviewEnterpriseArchiveService
extends
IService
<
ReviewEnterpriseArchive
>
{
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
taskId
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
com.ruoyi.mapper.ReviewEnterpriseArchiveMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_review_enterprise_archive(车企留档文件)】的数据库操作Service实现
* @createDate 2024-02-22 15:32:57
*/
@Service
public
class
ReviewEnterpriseArchiveServiceImpl
extends
ServiceImpl
<
ReviewEnterpriseArchiveMapper
,
ReviewEnterpriseArchive
>
implements
ReviewEnterpriseArchiveService
{
@Autowired
private
ReviewEnterpriseArchiveMapper
reviewEnterpriseArchiveMapper
;
@Override
public
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
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
);
}
}
view
.
setItems
(
subList
);
}
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewEnterpriseArchiveViewResponse.java
0 → 100644
View file @
ce10da5e
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@ApiModel
(
value
=
"ReviewEnterpriseArchiveViewResponse"
,
description
=
"预览企业留档文件"
)
@Data
public
class
ReviewEnterpriseArchiveViewResponse
{
}
quality-review/src/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
0 → 100644
View file @
ce10da5e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.ReviewEnterpriseArchiveMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"enterpriseName"
column=
"enterprice_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"fileName"
column=
"file_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"version"
column=
"version"
jdbcType=
"VARCHAR"
/>
<result
property=
"publishDate"
column=
"publish_date"
jdbcType=
"DATE"
/>
<result
property=
"status"
column=
"status"
jdbcType=
"VARCHAR"
/>
<result
property=
"identifyNumber"
column=
"identify_number"
jdbcType=
"VARCHAR"
/>
<result
property=
"storage"
column=
"storage"
jdbcType=
"VARCHAR"
/>
<result
property=
"photo"
column=
"photo"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
</resultMap>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
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>
</mapper>
ruoyi-admin/src/test/java/com/ruoyi/ReviewEnterpriseArchiveTest.java
0 → 100644
View file @
ce10da5e
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