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
1309e153
Commit
1309e153
authored
Feb 26, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into wangdingyi
parents
749451db
9c42a9e3
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
177 additions
and
11 deletions
+177
-11
pom.xml
quality-review/pom.xml
+0
-1
PhotoStorageVO.java
...iew/src/main/java/com/ruoyi/domain/vo/PhotoStorageVO.java
+32
-0
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+8
-0
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+8
-0
UserPhotoStorageService.java
.../main/java/com/ruoyi/service/UserPhotoStorageService.java
+2
-1
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+13
-1
UserPhotoStorageServiceImpl.java
...a/com/ruoyi/service/impl/UserPhotoStorageServiceImpl.java
+34
-3
ReviewStandardController.java
...src/main/java/com/ruoyi/web/ReviewStandardController.java
+14
-0
UserPhotoStorageController.java
...c/main/java/com/ruoyi/web/UserPhotoStorageController.java
+4
-5
ReviewStandardTestInspectionContentRequest.java
...b/request/ReviewStandardTestInspectionContentRequest.java
+21
-0
ReviewStandardTestInspectionContentResponse.java
...response/ReviewStandardTestInspectionContentResponse.java
+26
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+15
-0
No files found.
quality-review/pom.xml
View file @
1309e153
...
@@ -65,7 +65,6 @@
...
@@ -65,7 +65,6 @@
<groupId>
com.ruoyi
</groupId>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-framework
</artifactId>
<artifactId>
ruoyi-framework
</artifactId>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
quality-review/src/main/java/com/ruoyi/domain/vo/PhotoStorageVO.java
0 → 100644
View file @
1309e153
package
com
.
ruoyi
.
domain
.
vo
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
import
java.util.List
;
/**
* 照片存储VO类
* @author gxk
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
PhotoStorageVO
{
/**
* 图片的创建时间
*/
private
String
createTime
;
/**
* 图片数组
*/
private
List
<
UserPhotoStorage
>
userPhotoStorageList
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
1309e153
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -22,4 +23,11 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
...
@@ -22,4 +23,11 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* @return
* @return
*/
*/
List
<
ReviewStandardResponse
>
selectReviewStandardList
(
ReviewStandardListByPageRequest
request
);
List
<
ReviewStandardResponse
>
selectReviewStandardList
(
ReviewStandardListByPageRequest
request
);
/**
* 根据标准主键ID查询车型试验的检验内容
* @param id
* @return
*/
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
}
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
1309e153
...
@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewStandard;
...
@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewStandard;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
java.util.List
;
import
java.util.List
;
...
@@ -35,4 +36,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
...
@@ -35,4 +36,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return
* @return
*/
*/
ReviewStandardInspectionContentResponse
selectInspectionContent
(
Long
id
);
ReviewStandardInspectionContentResponse
selectInspectionContent
(
Long
id
);
/**
* 根据标准主键ID查询车型试验的检验内容
* @param id
* @return
*/
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
}
}
quality-review/src/main/java/com/ruoyi/service/UserPhotoStorageService.java
View file @
1309e153
...
@@ -4,6 +4,7 @@ import java.util.List;
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
com.ruoyi.domain.vo.PhotoStorageVO
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageListRequest
;
import
com.ruoyi.web.request.UserPhotoStorageListRequest
;
...
@@ -21,7 +22,7 @@ public interface UserPhotoStorageService extends IService<UserPhotoStorage>
...
@@ -21,7 +22,7 @@ public interface UserPhotoStorageService extends IService<UserPhotoStorage>
* @param request 用户照片存储
* @param request 用户照片存储
* @return 用户照片存储集合
* @return 用户照片存储集合
*/
*/
public
List
<
UserPhotoStorage
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
);
public
List
<
PhotoStorageVO
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
);
/**
/**
* 新增用户照片存储
* 新增用户照片存储
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
1309e153
...
@@ -8,6 +8,7 @@ import com.ruoyi.service.*;
...
@@ -8,6 +8,7 @@ import com.ruoyi.service.*;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
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
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -79,13 +80,24 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
...
@@ -79,13 +80,24 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
List
<
ReviewDetails
>
reivewDetailsList
=
reviewDetailsService
.
findByKeyPointsList
(
reviewKeyPointList
);
List
<
ReviewDetails
>
reivewDetailsList
=
reviewDetailsService
.
findByKeyPointsList
(
reviewKeyPointList
);
// 查询审查场景
// 查询审查场景
List
<
ReviewScene
>
reviewSceneList
=
reviewSceneService
.
findByDetailsList
(
reivewDetailsList
);
List
<
ReviewScene
>
reviewSceneList
=
reviewSceneService
.
findByDetailsList
(
reivewDetailsList
);
// 调用方法把数据变为树状结构
List
<
ReviewDetails
>
reviewDetails
=
buildDetails
(
reivewDetailsList
,
reviewSceneList
);
List
<
ReviewDetails
>
reviewDetails
=
buildDetails
(
reivewDetailsList
,
reviewSceneList
);
List
<
ReviewKeyPoint
>
keyPoints
=
buildKeyPoint
(
reviewKeyPointList
,
reviewDetails
);
List
<
ReviewKeyPoint
>
keyPoints
=
buildKeyPoint
(
reviewKeyPointList
,
reviewDetails
);
ReviewStandardInspectionContentResponse
response
=
ReviewStandardInspectionContentResponse
.
builder
().
keyPointList
(
keyPoints
).
build
();
ReviewStandardInspectionContentResponse
response
=
ReviewStandardInspectionContentResponse
.
builder
().
keyPointList
(
keyPoints
).
build
();
return
response
;
return
response
;
}
}
/**
* 根据标准主键ID查询车型试验的检验内容
* @param id
* @return
*/
@Override
public
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
)
{
List
<
ReviewStandardTestInspectionContentResponse
>
list
=
reviewStandardMapper
.
selectTestInspectionContent
(
id
);
return
list
;
}
/**
/**
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* @param reviewStandardList
* @param reviewStandardList
...
...
quality-review/src/main/java/com/ruoyi/service/impl/UserPhotoStorageServiceImpl.java
View file @
1309e153
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
java.util.
List
;
import
java.util.
*
;
import
cn.hutool.core.collection.CollUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
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.domain.vo.PhotoStorageVO
;
import
com.ruoyi.framework.websocket.WebSocketUsers
;
import
com.ruoyi.framework.websocket.WebSocketUsers
;
import
com.ruoyi.service.UserPhotoStorageService
;
import
com.ruoyi.service.UserPhotoStorageService
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
...
@@ -36,9 +38,38 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap
...
@@ -36,9 +38,38 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap
* @return 用户照片存储
* @return 用户照片存储
*/
*/
@Override
@Override
public
List
<
UserPhotoStorage
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
)
public
List
<
PhotoStorageVO
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
)
{
{
return
userPhotoStorageMapper
.
selectUserPhotoStorageList
(
request
);
List
<
UserPhotoStorage
>
userPhotoStorages
=
userPhotoStorageMapper
.
selectUserPhotoStorageList
(
request
);
// 创建一个VOList,用于返回数据
List
<
PhotoStorageVO
>
photoStorageVOList
=
new
ArrayList
<>();
// 创建一个hashMap,用于存储分类图片
HashMap
<
String
,
List
<
UserPhotoStorage
>>
photoStorageMap
=
new
HashMap
<>();
// 遍历userPhotoStorages,往photoStorageMap里添加数据
for
(
UserPhotoStorage
photoStorage
:
userPhotoStorages
)
{
// 计算出当前图片对象的创建时间: yyyy-MM-dd
String
createTime
=
DateUtils
.
dateTime
(
photoStorage
.
getCreateTime
());
// Map里存在则取出value然后添加新的对象;则直接添加新的key-value
if
(!
photoStorageMap
.
containsKey
(
createTime
))
{
List
<
UserPhotoStorage
>
photoStorageList
=
new
ArrayList
<>();
photoStorageList
.
add
(
photoStorage
);
photoStorageMap
.
put
(
createTime
,
photoStorageList
);
}
else
{
photoStorageMap
.
get
(
createTime
).
add
(
photoStorage
);
}
}
// 遍历photoStorageMap,将value赋值给photoStorageVOList
for
(
Map
.
Entry
<
String
,
List
<
UserPhotoStorage
>>
entry
:
photoStorageMap
.
entrySet
())
{
// entry.getValue()以时间降序排列
entry
.
getValue
().
sort
(
Comparator
.
comparing
(
UserPhotoStorage:
:
getCreateTime
).
reversed
());
PhotoStorageVO
photoStorageVO
=
PhotoStorageVO
.
builder
()
.
createTime
(
entry
.
getKey
())
.
userPhotoStorageList
(
entry
.
getValue
()).
build
();
photoStorageVOList
.
add
(
photoStorageVO
);
}
// photoStorageVOList以创建时间降序排列
photoStorageVOList
.
sort
(
Comparator
.
comparing
(
PhotoStorageVO:
:
getCreateTime
).
reversed
());
return
photoStorageVOList
;
}
}
/**
/**
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewStandardController.java
View file @
1309e153
...
@@ -9,8 +9,10 @@ import com.ruoyi.domain.ReviewStandard;
...
@@ -9,8 +9,10 @@ import com.ruoyi.domain.ReviewStandard;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.web.request.ReviewStandardInspectionContentRequest
;
import
com.ruoyi.web.request.ReviewStandardInspectionContentRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardTestInspectionContentRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -58,4 +60,16 @@ public class ReviewStandardController extends BaseController {
...
@@ -58,4 +60,16 @@ public class ReviewStandardController extends BaseController {
ReviewStandardInspectionContentResponse
response
=
reviewStandardService
.
selectInspectionContent
(
request
.
getId
());
ReviewStandardInspectionContentResponse
response
=
reviewStandardService
.
selectInspectionContent
(
request
.
getId
());
return
R
.
ok
(
response
);
return
R
.
ok
(
response
);
}
}
/**
* 根据标准主键ID查询车型试验的检验内容
* @param request
* @return
*/
@ApiOperation
(
"车型试验的检验内容详情"
)
@PostMapping
(
"/test/getInspectionContent"
)
public
R
<
List
<
ReviewStandardTestInspectionContentResponse
>>
getTestInspectionContent
(
@Validated
@RequestBody
ReviewStandardTestInspectionContentRequest
request
)
{
List
<
ReviewStandardTestInspectionContentResponse
>
response
=
reviewStandardService
.
selectTestInspectionContent
(
request
.
getId
());
return
R
.
ok
(
response
);
}
}
}
quality-review/src/main/java/com/ruoyi/web/UserPhotoStorageController.java
View file @
1309e153
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.ruoyi.common.annotation.Anonymous
;
import
com.ruoyi.common.annotation.Anonymous
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.domain.vo.PhotoStorageVO
;
import
com.ruoyi.service.UserPhotoStorageService
;
import
com.ruoyi.service.UserPhotoStorageService
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageEditRequest
;
import
com.ruoyi.web.request.UserPhotoStorageEditRequest
;
...
@@ -42,20 +43,18 @@ public class UserPhotoStorageController extends BaseController
...
@@ -42,20 +43,18 @@ public class UserPhotoStorageController extends BaseController
/**
/**
* 查询用户照片存储列表
* 查询用户照片存储列表
*/
*/
@Anonymous
@ApiOperation
(
"分页查询照片存储列表"
)
@ApiOperation
(
"分页查询照片存储列表"
)
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
TableDataInfo
<
UserPhotoStorage
>
list
(
@Validated
@RequestBody
UserPhotoStorageListRequest
request
)
public
TableDataInfo
<
PhotoStorageVO
>
list
(
@Validated
@RequestBody
UserPhotoStorageListRequest
request
)
{
{
startPage
();
//
startPage();
List
<
UserPhotoStorage
>
list
=
userPhotoStorageService
.
selectUserPhotoStorageList
(
request
);
List
<
PhotoStorageVO
>
list
=
userPhotoStorageService
.
selectUserPhotoStorageList
(
request
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
* 新增用户照片存储
* 新增用户照片存储
*/
*/
@Anonymous
@ApiOperation
(
"新增用户照片存储"
)
@ApiOperation
(
"新增用户照片存储"
)
@Log
(
title
=
"用户照片存储"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"用户照片存储"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewStandardTestInspectionContentRequest.java
0 → 100644
View file @
1309e153
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
/**
* 检验内容库-检验内容 DTO
* @author gxk
*/
@Data
@ApiModel
public
class
ReviewStandardTestInspectionContentRequest
{
@ApiModelProperty
(
"标准主键ID"
)
@NotNull
(
message
=
"标准主键ID不能为空"
)
private
Long
id
;
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewStandardTestInspectionContentResponse.java
0 → 100644
View file @
1309e153
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 检验内容库-检验内容 返回类
* @author gxk
*/
@Data
@ApiModel
public
class
ReviewStandardTestInspectionContentResponse
{
@ApiModelProperty
(
"测试场景"
)
private
String
testScenario
;
@ApiModelProperty
(
"测试类型"
)
private
String
testType
;
@ApiModelProperty
(
"用例编号"
)
private
String
useCaseNumber
;
@ApiModelProperty
(
"用例名称"
)
private
String
useCaseName
;
}
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
1309e153
...
@@ -48,5 +48,20 @@
...
@@ -48,5 +48,20 @@
chapter
chapter
</select>
</select>
<select
id=
"selectTestInspectionContent"
resultType=
"com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse"
>
SELECT
usecase.NAME useCaseName,
usecase.usecase_no useCaseNumber,
scenario.test_scenario,
type.test_type
FROM
t_test_usecase usecase
LEFT JOIN t_test_scenario scenario ON scenario.id = usecase.test_scenario_id
LEFT JOIN t_test_type type ON type.id = usecase.test_type_id
WHERE
usecase.review_standard_id = #{id}
</select>
</mapper>
</mapper>
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