Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
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
中汽研标准应用数据库
car-database-api
Commits
384683d6
Commit
384683d6
authored
Dec 13, 2024
by
宋源硕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'songyuanshuo' into 'master'
2024/12/13接口修改 See merge request
!28
parents
4277ef03
f2767c51
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
92 additions
and
13 deletions
+92
-13
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+2
-1
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+22
-7
StrategyReviewSceneChangeAdd.java
.../com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
+16
-4
StrategyReviewSceneChangeDelete.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
+7
-0
StrategyReviewSceneChangeUpdate.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeUpdate.java
+12
-0
ReviewSceneChangeTaskCreateRequest.java
...ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
+2
-1
SysUserMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
+2
-0
SysUserServiceImpl.java
...ava/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+3
-0
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+26
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
384683d6
...
...
@@ -234,8 +234,9 @@ public class ReviewSceneChangeTask {
@ApiModelProperty
(
"用例描述"
)
private
String
usecaseDescribe
;
//要改成Long打包的时候显示String
@ApiModelProperty
(
"评审用例id"
)
private
Stri
ng
reviewUsecaseId
;
private
Lo
ng
reviewUsecaseId
;
@TableField
(
exist
=
false
)
private
String
name
;
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
View file @
384683d6
...
...
@@ -13,11 +13,8 @@ import com.ruoyi.domain.ReviewSceneChangeTask;
import
com.ruoyi.domain.ReviewSceneChangeTaskUserRelation
;
import
com.ruoyi.domain.Standard
;
import
com.ruoyi.framework.web.domain.server.Sys
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewSceneChangeTaskUserRelationMapper
;
import
com.ruoyi.mapper.StandardMapper
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.mapper.ReviewSceneChangeTaskMapper
;
import
com.ruoyi.system.mapper.SysUserRoleMapper
;
import
com.ruoyi.system.service.ISysDeptService
;
import
com.ruoyi.system.service.ISysUserService
;
...
...
@@ -72,6 +69,9 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
@Autowired
private
StandardMapper
standardMapper
;
@Autowired
private
TestUseCaseMapper
testUseCaseMapper
;
@Autowired
ReviewSceneChangeTaskUserRelationMapper
reviewSceneChangeTaskUserRelationMapper
;
@Override
...
...
@@ -89,12 +89,19 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
String
s
=
JSONUtil
.
toJsonStr
(
getSerialNumberRequest
);
List
<
SerialNumberResponse
>
list
=
testUseCaseService
.
getSerialNumberList
(
s
);
/*
List<SerialNumberResponse> list = testUseCaseService.getSerialNumberList(s);
for (SerialNumberResponse serialNumberResponse : list){
if (Objects.equals(serialNumberResponse.getSerialNumber(), reviewSceneChangeTask.getUsecaseId())){
throw new ServiceException("用例编号重复", HttpStatus.ERROR);
}
}*/
//改成丛本地获取数据后
List
<
SerialNumberResponseNew
>
list
=
testUseCaseMapper
.
selectSerialNumberList
();
for
(
SerialNumberResponseNew
serialNumberResponseNew
:
list
){
if
(
Objects
.
equals
(
serialNumberResponseNew
.
getSerialNumber
(),
reviewSceneChangeTask
.
getUsecaseId
())){
throw
new
ServiceException
(
"用例编号重复"
,
HttpStatus
.
ERROR
);
}
}
}
...
...
@@ -110,15 +117,23 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
String
s
=
JSONUtil
.
toJsonStr
(
getSerialNumberRequest
);
List
<
SerialNumberResponse
>
list
=
testUseCaseService
.
getSerialNumberList
(
s
);
//
List<SerialNumberResponse> list = testUseCaseService.getSerialNumberList(s);
//先判断用例编号是否有
for
(
SerialNumberResponse
serialNumberResponse
:
list
){
/*
for (SerialNumberResponse serialNumberResponse : list){
if (Objects.equals(serialNumberResponse.getSerialNumber(),reviewSceneChangeTask.getUsecaseId())){
if (!Objects.equals(serialNumberResponse.getId(),reviewSceneChangeTask.getReviewUsecaseId())){
throw new ServiceException("当前用例编号对象已存在", HttpStatus.ERROR);
}
}
}*/
List
<
SerialNumberResponseNew
>
list
=
testUseCaseMapper
.
selectSerialNumberList
();
for
(
SerialNumberResponseNew
serialNumberResponseNew
:
list
){
if
(
Objects
.
equals
(
serialNumberResponseNew
.
getSerialNumber
(),
reviewSceneChangeTask
.
getUsecaseId
())){
if
(!
Objects
.
equals
(
serialNumberResponseNew
.
getId
(),
reviewSceneChangeTask
.
getReviewUsecaseId
())){
throw
new
ServiceException
(
"当前用例编号对象已存在"
,
HttpStatus
.
ERROR
);
}
}
}
}
// 获取当前登陆人
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
View file @
384683d6
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.mapper.ReviewUsecaseMapper
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -39,6 +36,9 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
@Autowired
private
UsecaseDetailsMapper
usecaseDetailsMapper
;
/**
* 新增审查场景
* @param reviewSceneChangeTask
...
...
@@ -98,7 +98,19 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
reviewSceneChangeTaskService
.
updateById
(
reviewSceneChangeTask
);
}
// 保存新增的用例
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"ADD_USECASE"
))
{
//测试用例
UsecaseDetails
usecaseDetails
=
new
UsecaseDetails
();
usecaseDetails
.
setCustomizedId
(
reviewSceneChangeTask
.
getUsecaseId
());
usecaseDetails
.
setDescription
(
reviewSceneChangeTask
.
getUsecaseDescribe
());
usecaseDetails
.
setTestScenarioId
(
reviewSceneChangeTask
.
getKeypointId
());
usecaseDetailsMapper
.
insert
(
usecaseDetails
);
reviewSceneChangeTask
.
setReviewUsecaseId
(
usecaseDetails
.
getId
());
reviewSceneChangeTaskService
.
updateById
(
reviewSceneChangeTask
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
View file @
384683d6
...
...
@@ -45,6 +45,8 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
@Autowired
private
UsecaseDetailsMapper
usecaseDetailsMapper
;
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
...
...
@@ -98,6 +100,11 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
}
}
//删除用例
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"DELETE_USECASE"
)){
// 删除用例
usecaseDetailsMapper
.
deleteById
(
reviewSceneChangeTask
.
getReviewUsecaseId
());
}
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeUpdate.java
View file @
384683d6
...
...
@@ -3,7 +3,9 @@ package com.ruoyi.service.impl;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.domain.ReviewUsecase
;
import
com.ruoyi.domain.UsecaseDetails
;
import
com.ruoyi.mapper.ReviewUsecaseMapper
;
import
com.ruoyi.mapper.UsecaseDetailsMapper
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneService
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -26,6 +28,9 @@ public class StrategyReviewSceneChangeUpdate implements StrategyReviewSceneChang
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
@Autowired
private
UsecaseDetailsMapper
usecaseDetailsMapper
;
@Autowired
private
ReviewSceneService
reviewSceneService
;
@Override
...
...
@@ -37,6 +42,13 @@ public class StrategyReviewSceneChangeUpdate implements StrategyReviewSceneChang
reviewSceneService
.
updateById
(
reviewScene
);
}
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"UPDATE_USECASE"
)){
UsecaseDetails
usecaseDetails
=
usecaseDetailsMapper
.
selectById
(
reviewSceneChangeTask
.
getReviewUsecaseId
());
usecaseDetails
.
setCustomizedId
(
reviewSceneChangeTask
.
getUsecaseId
());
usecaseDetails
.
setDescription
(
reviewSceneChangeTask
.
getUsecaseDescribe
());
usecaseDetailsMapper
.
updateById
(
usecaseDetails
);
}
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
View file @
384683d6
...
...
@@ -109,8 +109,9 @@ public class ReviewSceneChangeTaskCreateRequest {
@ApiModelProperty
(
"用例描述"
)
private
String
usecaseDescribe
;
//要改成Long打包的时候显示String
@ApiModelProperty
(
"评审用例id"
)
private
Stri
ng
reviewUsecaseId
;
private
Lo
ng
reviewUsecaseId
;
@ApiModelProperty
private
String
name
;
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
View file @
384683d6
...
...
@@ -165,4 +165,6 @@ public interface SysUserMapper
List
<
SysUserVO
>
getInspection
();
List
<
SysUser
>
selectUserListByIdsNew
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
List
<
SysUser
>
selectUserListNew
(
SysUser
user
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
View file @
384683d6
...
...
@@ -80,6 +80,9 @@ public class SysUserServiceImpl implements ISysUserService
@DataScope
(
deptAlias
=
"d"
,
userAlias
=
"u"
)
public
List
<
SysUser
>
selectUserList
(
SysUser
user
)
{
if
(
user
.
getDeptId
()
==
100
){
return
userMapper
.
selectUserListNew
(
user
);
}
return
userMapper
.
selectUserList
(
user
);
}
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
384683d6
...
...
@@ -268,5 +268,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sr.role_id IN (106, 112)
and u.del_flag = '0'
</select>
<select
id=
"selectUserListNew"
resultType=
"com.ruoyi.common.core.domain.entity.SysUser"
>
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
<if
test=
"userId != null and userId != 0"
>
AND u.user_id = #{userId}
</if>
<if
test=
"userName != null and userName != ''"
>
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if
test=
"status != null and status != ''"
>
AND u.status = #{status}
</if>
<if
test=
"phonenumber != null and phonenumber != ''"
>
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if
test=
"params.beginTime != null and params.beginTime != ''"
>
<!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d')
>
= date_format(#{params.beginTime},'%y%m%d')
</if>
<if
test=
"params.endTime != null and params.endTime != ''"
>
<!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d')
<
= date_format(#{params.endTime},'%y%m%d')
</if>
<!--<if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
</if>-->
</select>
</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