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
ffd36c26
Commit
ffd36c26
authored
Apr 02, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into gaoying
parents
33b2c5da
a6e4473f
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
220 additions
and
89 deletions
+220
-89
TaskUserRelation.java
...view/src/main/java/com/ruoyi/domain/TaskUserRelation.java
+9
-0
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+4
-0
TaskUserRelationMapper.java
...rc/main/java/com/ruoyi/mapper/TaskUserRelationMapper.java
+3
-0
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+20
-18
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+15
-5
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+2
-2
StrategyModelTestTaskNew.java
...java/com/ruoyi/service/impl/StrategyModelTestTaskNew.java
+16
-12
StrategyModelTestTaskPending.java
.../com/ruoyi/service/impl/StrategyModelTestTaskPending.java
+2
-0
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+2
-2
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+34
-4
ReviewStandardListByPageRequest.java
...om/ruoyi/web/request/ReviewStandardListByPageRequest.java
+3
-0
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+3
-0
TaskScenarioResponse.java
...ain/java/com/ruoyi/web/response/TaskScenarioResponse.java
+23
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+5
-1
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+8
-0
TaskUserRelationMapper.xml
...view/src/main/resources/mapper/TaskUserRelationMapper.xml
+9
-0
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+25
-26
receipt_template_04_02.pdf
...ew/src/main/resources/template/receipt_template_04_02.pdf
+0
-0
SysLogininforController.java
...ruoyi/web/controller/monitor/SysLogininforController.java
+1
-6
SysOperlogController.java
...om/ruoyi/web/controller/monitor/SysOperlogController.java
+1
-5
SysNoticeController.java
.../com/ruoyi/web/controller/system/SysNoticeController.java
+1
-6
SysDept.java
...ain/java/com/ruoyi/common/core/domain/entity/SysDept.java
+25
-1
SysDeptMapper.xml
...system/src/main/resources/mapper/system/SysDeptMapper.xml
+9
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/TaskUserRelation.java
View file @
ffd36c26
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
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -19,6 +20,10 @@ import lombok.experimental.Accessors;
@Data
public
class
TaskUserRelation
{
// 用户状态禁用
@TableField
(
exist
=
false
)
public
static
final
String
USER_STATUS_PROHIBIT
=
"1"
;
/**
* 任务id
*/
...
...
@@ -52,4 +57,8 @@ public class TaskUserRelation {
@ApiModelProperty
(
"部门名称"
)
private
String
deptName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"用户状态"
)
private
String
status
;
}
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
ffd36c26
...
...
@@ -9,6 +9,7 @@ import com.ruoyi.web.request.TaskFindPendingRequest;
import
com.ruoyi.web.request.TaskFindRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskScenarioResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -52,4 +53,7 @@ public interface TaskMapper extends BaseMapper<Task> {
* @return
*/
InspectionReportPdfVO
selectInspectionReportData
(
Long
taskId
);
// 根据任务列表查询对应的场景数量
List
<
TaskScenarioResponse
>
findByTaskList
(
@Param
(
"responses"
)
List
<
TaskFindResponse
>
responses
);
}
quality-review/src/main/java/com/ruoyi/mapper/TaskUserRelationMapper.java
View file @
ffd36c26
...
...
@@ -23,6 +23,9 @@ public interface TaskUserRelationMapper extends BaseMapper<TaskUserRelation> {
*/
List
<
TaskUserRelation
>
selectQTeamMembers
(
@Param
(
"taskId"
)
Long
taskId
);
// 根据小组成员id列表查询状态
List
<
TaskUserRelation
>
findByIdList
(
@Param
(
"idList"
)
List
<
TaskUserRelation
>
idList
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
ffd36c26
...
...
@@ -73,7 +73,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
PdfStamper
ps
=
null
;
ByteArrayOutputStream
bos
=
null
;
// 模板绝对路径--服务器
String
fileName
=
"/template/receipt_template_0
3_27
.pdf"
;
String
fileName
=
"/template/receipt_template_0
4_02
.pdf"
;
// 读取现有模板内容
reader
=
new
PdfReader
(
fileName
);
// 创建输出流
...
...
@@ -140,8 +140,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
document
.
writeBottomCell
(
"共 10 页"
,
Element
.
ALIGN_RIGHT
,
1
,
1
,
signTable
).
setRightIndent
(
30
f
);
document
.
writeBottomCell
(
"第 10 页"
,
Element
.
ALIGN_RIGHT
,
1
,
1
,
signTable
);
document
.
addContent
(
signTable
);
document
.
setParagraph
(
"7.附录"
,
10.5f
,
Element
.
ALIGN_LEFT
,
45
,
1
f
,
0
f
);
document
.
setParagraph
(
"图 1 样品照片"
,
10.5f
,
Element
.
ALIGN_CENTER
,
0
,
20
f
,
0
f
);
document
.
setParagraph
(
"7.附录"
,
10.5f
,
Element
.
ALIGN_LEFT
,
45
,
1
f
,
10
f
);
// 添加内容到新页面
PdfPTable
pictureTable
=
new
PdfPTable
(
new
float
[]{
25
,
25
,
25
,
25
});
pictureTable
.
setWidthPercentage
(
90
);
...
...
@@ -157,7 +156,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
Optional
<
String
>
optionalElement
=
i
<
pictureList
.
size
()
?
Optional
.
of
(
pictureList
.
get
(
i
))
:
Optional
.
empty
();
if
(
optionalElement
.
isPresent
())
{
if
(
optionalElement
.
isPresent
()
&&
StrUtil
.
isNotEmpty
(
optionalElement
.
get
())
)
{
Image
image
=
Image
.
getInstance
(
new
URL
(
minioEndpoint
+
optionalElement
.
get
()));
image
.
scaleAbsolute
(
100
,
100
);
cell
.
addElement
(
image
);
...
...
@@ -168,6 +167,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
pictureTable
.
addCell
(
cell
);
}
document
.
addContent
(
pictureTable
);
document
.
setParagraph
(
"图 1 样品照片"
,
10.5f
,
Element
.
ALIGN_CENTER
,
0
,
20
f
,
0
f
);
document
.
setParagraph
(
"图 2 试验照片"
,
10.5f
,
Element
.
ALIGN_CENTER
,
0
,
20
f
,
0
f
);
// 关闭PDF
document
.
close
();
...
...
@@ -229,13 +229,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
// 查询数据
List
<
ReviewEnterpriseArchiveViewVO
>
viewList
=
reviewEnterpriseArchiveService
.
view
(
taskId
);
for
(
ReviewEnterpriseArchiveViewVO
view
:
viewList
)
{
document
.
writeCell
(
view
.
getFileName
(),
Element
.
ALIGN_LEFT
,
1
,
view
.
getItems
().
size
(),
table
);
view
.
getItems
().
forEach
(
item
->
{
document
.
writeCell
(
item
.
getCatalogue
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getChapter
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getStandard
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getKeyPoint
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
});
if
(
view
.
getItems
().
size
()
>
0
)
{
document
.
writeCell
(
view
.
getFileName
(),
Element
.
ALIGN_LEFT
,
1
,
view
.
getItems
().
size
(),
table
);
view
.
getItems
().
forEach
(
item
->
{
document
.
writeCell
(
item
.
getCatalogue
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getChapter
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getStandard
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getKeyPoint
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
});
}
}
document
.
addContent
(
table
);
// 最后结尾签字
...
...
@@ -346,13 +348,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
}
// 图片域
// 样品
String
url
=
inspectionReportPdfVO
.
getBrandImage
();
if
(
StrUtil
.
isNotBlank
(
url
))
{
if
(
url
.
startsWith
(
","
))
{
url
=
inspectionReportPdfVO
.
getBrandImage
().
substring
(
1
);
}
addImageToPdf
(
"brand"
,
fields
,
ps
,
"http://49.232.167.247:22038"
+
url
.
split
(
","
)[
0
]);
}
//
String url = inspectionReportPdfVO.getBrandImage();
//
if (StrUtil.isNotBlank(url)) {
//
if (url.startsWith(",")) {
//
url = inspectionReportPdfVO.getBrandImage().substring(1);
//
}
//
addImageToPdf("brand", fields, ps, "http://49.232.167.247:22038" + url.split(",")[0]);
//
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
ffd36c26
package
com
.
ruoyi
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -156,9 +157,9 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
// 查看此标准下所有的测试用例
List
<
TestUseCase
>
usecaseRelationList
=
testUseCaseMapper
.
selectList
(
new
QueryWrapper
<
TestUseCase
>().
eq
(
"review_standard_id"
,
standardId
));
// 此标准还可以选择的用例
List
<
OptionalUseCasesVO
>
optionalUseCasesVOList
=
testUseCases
.
stream
().
filter
(
a
->
!
a
.
getStandardId
().
equals
(
standardId
)).
collect
(
Collectors
.
toList
());
optionalUseCasesVOList
.
stream
().
forEach
(
obj
->
obj
.
setDisabled
(
false
));
response
.
setOptionalUseCasesList
(
optionalUseCasesVOList
);
//
List<OptionalUseCasesVO> optionalUseCasesVOList = testUseCases.stream().filter(a -> !a.getStandardId().equals(standardId)).collect(Collectors.toList());
testUseCases
.
stream
().
forEach
(
obj
->
obj
.
setDisabled
(
false
));
response
.
setOptionalUseCasesList
(
testUseCases
);
response
.
setSelectedUseCaseList
(
usecaseRelationList
.
stream
().
map
(
TestUseCase:
:
getId
).
collect
(
Collectors
.
toList
()));
return
response
;
}
...
...
@@ -169,9 +170,18 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
*/
@Override
public
void
saveStandardUsecase
(
ReviewStandardSaveStandardUsecaseRequest
request
)
{
// 删除之前绑定关系
testUseCaseMapper
.
update
(
TestUseCase
.
builder
().
reviewStandardId
(
request
.
getStandardId
()).
build
(),
new
UpdateWrapper
<
TestUseCase
>().
in
(
"id"
,
request
.
getUsecaseIdList
()));
null
,
new
UpdateWrapper
<
TestUseCase
>()
.
set
(
"review_standard_id"
,
null
)
.
in
(
"review_standard_id"
,
request
.
getStandardId
()));
if
(
CollUtil
.
isNotEmpty
(
request
.
getUsecaseIdList
()))
{
// 绑定现在的
testUseCaseMapper
.
update
(
TestUseCase
.
builder
().
reviewStandardId
(
request
.
getStandardId
()).
build
(),
new
UpdateWrapper
<
TestUseCase
>().
in
(
"id"
,
request
.
getUsecaseIdList
()));
}
}
/**
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
ffd36c26
...
...
@@ -127,9 +127,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
public
void
doConfirmReview
(
CarReviewTask
carReviewTask
)
{
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
carReviewTask
.
getId
(),
CarReviewTask
.
TYPE
);
List
<
ReviewTaskInbox
>
inboxList
=
reviewTaskInboxMapper
.
findConfirmListByTaskId
(
carReviewTask
.
getId
());
if
(
detailsList
.
size
()
!=
0
&&
detailsList
!=
null
)
{
if
(
detailsList
!=
null
&&
detailsList
.
size
()
!=
0
)
{
throw
new
ServiceException
(
"存在未填写的表单,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
if
(
inboxList
.
size
()
!=
0
&&
inboxList
!=
null
){
}
else
if
(
inboxList
!=
null
&&
inboxList
.
size
()
!=
0
){
throw
new
ServiceException
(
"存在未确认的场景变更信息,请确认"
,
HttpStatus
.
ERROR
);
}
else
{
// 1. 获取最新问卷
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyModelTestTaskNew.java
View file @
ffd36c26
package
com
.
ruoyi
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
...
...
@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
// 创建一个HashMap, 用于存放数据。用例条款ID作为key
HashMap
<
Long
,
List
<
TestCaseVO
>>
map
=
new
HashMap
<>();
for
(
TestUsecaseVO
testUsecaseVO
:
testCaseList
)
{
// map不存在此key,添加; 则,存数据
if
(!
map
.
containsKey
(
testUsecaseVO
.
getReviewStandardId
()))
{
TestCaseVO
caseVO
=
new
TestCaseVO
();
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
List
<
TestCaseVO
>
caseList
=
new
ArrayList
<>();
caseList
.
add
(
caseVO
);
map
.
put
(
testUsecaseVO
.
getReviewStandardId
(),
caseList
);
}
else
{
TestCaseVO
caseVO
=
new
TestCaseVO
();
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
map
.
get
(
testUsecaseVO
.
getReviewStandardId
()).
add
(
caseVO
);
if
(
ObjectUtil
.
isNotEmpty
(
testUsecaseVO
.
getReviewStandardId
()))
{
// map不存在此key,添加; 则,存数据
if
(!
map
.
containsKey
(
testUsecaseVO
.
getReviewStandardId
()))
{
TestCaseVO
caseVO
=
new
TestCaseVO
();
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
List
<
TestCaseVO
>
caseList
=
new
ArrayList
<>();
caseList
.
add
(
caseVO
);
map
.
put
(
testUsecaseVO
.
getReviewStandardId
(),
caseList
);
}
else
{
TestCaseVO
caseVO
=
new
TestCaseVO
();
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
map
.
get
(
testUsecaseVO
.
getReviewStandardId
()).
add
(
caseVO
);
}
}
}
// 循环map, 给list赋值
for
(
Map
.
Entry
<
Long
,
List
<
TestCaseVO
>>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
Long
,
List
<
TestCaseVO
>>
entry
:
map
.
entrySet
())
{
List
<
TestUsecaseVO
>
collect
=
testCaseList
.
stream
().
filter
(
testCaseVO
->
entry
.
getKey
().
equals
(
testCaseVO
.
getReviewStandardId
())).
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()
>
0
){
TestUsecaseVO
testUsecaseVO
=
collect
.
get
(
0
);
...
...
@@ -104,6 +107,7 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
public
void
doStartTest
(
ModelTestTask
modelTestTask
)
{
modelTestTaskMapper
.
update
(
new
ModelTestTask
(),
new
LambdaUpdateWrapper
<
ModelTestTask
>()
.
set
(
ModelTestTask:
:
getTaskBeginTime
,
new
Date
())
.
set
(
ModelTestTask:
:
getTaskStatus
,
ModelTestTask
.
TASK_STATUS_PENDING
)
.
eq
(
ModelTestTask:
:
getId
,
modelTestTask
.
getId
()));
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyModelTestTaskPending.java
View file @
ffd36c26
...
...
@@ -13,6 +13,7 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
@Service
...
...
@@ -47,6 +48,7 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init
// 进行中的任务, 点击确认后, 状态改为待签字
modelTestTaskMapper
.
update
(
new
ModelTestTask
(),
new
LambdaUpdateWrapper
<
ModelTestTask
>()
.
set
(
ModelTestTask:
:
getTaskEndTime
,
new
Date
())
.
set
(
ModelTestTask:
:
getTaskStatus
,
ModelTestTask
.
TASK_STATUS_SIGNED
)
.
eq
(
ModelTestTask:
:
getId
,
modelTestTask
.
getId
()));
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
ffd36c26
...
...
@@ -88,9 +88,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
public
void
doConfirm
(
SystemReviewTask
systemReviewTask
)
{
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
systemReviewTask
.
getId
(),
SystemReviewTask
.
TYPE
);
List
<
ReviewTaskInbox
>
inboxList
=
reviewTaskInboxMapper
.
findConfirmListByTaskId
(
systemReviewTask
.
getId
());
if
(
detailsList
.
size
()
!=
0
&&
detailsList
!=
null
)
{
if
(
detailsList
!=
null
&&
detailsList
.
size
()
!=
0
)
{
throw
new
ServiceException
(
"存在未填写的表单,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
if
(
inboxList
.
size
()
!=
0
&&
inboxList
!=
null
){
}
else
if
(
inboxList
!=
null
&&
inboxList
.
size
()
!=
0
){
throw
new
ServiceException
(
"存在未确认的场景变更信息,请确认"
,
HttpStatus
.
ERROR
);
}
else
{
// 1. 获取最新问卷
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
ffd36c26
...
...
@@ -18,10 +18,7 @@ import com.ruoyi.mapper.*;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.DataStatisticsResponse
;
import
com.ruoyi.web.response.ResultCountResponse
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
com.ruoyi.web.response.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -104,6 +101,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
@Autowired
private
ModelTestTaskMapper
modelTestTaskMapper
;
@Autowired
private
TaskUserRelationMapper
taskUserRelationMapper
;
@Override
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
return
taskMapper
.
findList
(
request
);
...
...
@@ -232,6 +232,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
ModelTestTask
>
modelTestTaskList
=
modelTestTaskMapper
.
findByTaskList
(
responses
);
setModelProgress
(
modelTestTaskList
,
responses
);
// 任务是否有选择场景
List
<
TaskScenarioResponse
>
scenarioResponseList
=
taskMapper
.
findByTaskList
(
responses
);
setTaskScenario
(
scenarioResponseList
,
responses
);
for
(
TaskFindResponse
response
:
responses
)
{
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
...
...
@@ -667,6 +671,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
private
void
setTaskScenario
(
List
<
TaskScenarioResponse
>
scenarioResponseList
,
List
<
TaskFindResponse
>
responses
)
{
if
(
scenarioResponseList
!=
null
&&
scenarioResponseList
.
size
()
!=
0
)
{
for
(
TaskScenarioResponse
response
:
scenarioResponseList
)
{
for
(
TaskFindResponse
findResponse
:
responses
)
{
if
(
Objects
.
equals
(
findResponse
.
getId
(),
response
.
getTaskId
()))
{
if
(
response
.
getNum
()
>
0
)
{
findResponse
.
setTaskScenario
(
true
);
}
}
}
}
}
}
private
void
setModelProgress
(
List
<
ModelTestTask
>
modelTestTaskList
,
List
<
TaskFindResponse
>
responses
)
{
if
(
modelTestTaskList
!=
null
&&
modelTestTaskList
.
size
()
!=
0
)
{
...
...
@@ -992,6 +1011,17 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
id
);
// 小组成员状态
List
<
TaskUserRelation
>
relationList
=
taskUserRelationMapper
.
findByIdList
(
relation
);
for
(
TaskUserRelation
userRelation
:
relationList
)
{
for
(
TaskUserRelation
taskUserRelation
:
relation
)
{
if
(
Objects
.
equals
(
userRelation
.
getUserId
(),
taskUserRelation
.
getUserId
()))
{
taskUserRelation
.
setStatus
(
userRelation
.
getStatus
());
}
}
}
return
relation
;
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewStandardListByPageRequest.java
View file @
ffd36c26
...
...
@@ -42,4 +42,7 @@ public class ReviewStandardListByPageRequest extends PageDomain {
*/
@ApiModelProperty
(
"文本内容"
)
private
String
text
;
@ApiModelProperty
(
"测试方法"
)
private
String
testMethod
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
ffd36c26
...
...
@@ -121,4 +121,7 @@ public class TaskFindResponse {
@ApiModelProperty
(
"试验方案ID"
)
private
String
testSchemeId
;
@ApiModelProperty
(
"是否选择场景"
)
private
Boolean
taskScenario
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskScenarioResponse.java
0 → 100644
View file @
ffd36c26
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"任务场景VO"
)
public
class
TaskScenarioResponse
{
@ApiModelProperty
(
"任务id"
)
private
Long
taskId
;
@ApiModelProperty
(
"场景数量"
)
private
Long
num
;
}
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
ffd36c26
...
...
@@ -41,7 +41,10 @@
<select
id=
"selectReviewStandardList"
parameterType=
"com.ruoyi.web.request.ReviewStandardListByPageRequest"
resultType=
"com.ruoyi.web.response.ReviewStandardResponse"
>
select
id, chapter, text
id,
chapter,
text,
test_method AS testMethod
from
t_review_standard
<where>
...
...
@@ -49,6 +52,7 @@
<if
test=
"type != null and type != ''"
>
and `type` = #{type}
</if>
<if
test=
"chapter != null and chapter != ''"
>
and chapter like concat('%', #{chapter}, '%')
</if>
<if
test=
"text != null and text != ''"
>
and text like concat('%', #{text}, '%')
</if>
<if
test=
"testMethod != null and testMethod != ''"
>
and test_method like concat('%', #{testMethod}, '%')
</if>
</where>
ORDER BY
chapter
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
ffd36c26
...
...
@@ -343,6 +343,14 @@
FROM t_task
WHERE task_name = #{taskName}
</select>
<select
id=
"findByTaskList"
resultType=
"com.ruoyi.web.response.TaskScenarioResponse"
>
SELECT COUNT(*) num, task_id as taskId FROM t_task_scenario_relation
WHERE task_id IN
<foreach
item=
"item"
collection=
"responses"
open=
"("
separator=
","
close=
")"
>
#{item.id}
</foreach>
GROUP BY task_id
</select>
</mapper>
quality-review/src/main/resources/mapper/TaskUserRelationMapper.xml
View file @
ffd36c26
...
...
@@ -23,4 +23,13 @@
task_id = #{taskId}
</if>
</select>
<select
id=
"findByIdList"
resultType=
"com.ruoyi.domain.TaskUserRelation"
>
select user_id as userId,
status
from sys_user
WHERE sys_user.user_id IN
<foreach
item=
"item"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item.userId}
</foreach>
</select>
</mapper>
\ No newline at end of file
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
ffd36c26
...
...
@@ -49,32 +49,31 @@
</select>
<select
id=
"selectListByTaskId"
resultType=
"com.ruoyi.domain.vo.TestUsecaseVO"
>
select
tu.id,
tu.case_id caseId,
ts.test_scenario testScenario,
tt.test_type testType,
tu.usecase_no usecaseNo,
tu.name,
tu.tools,
tu.input,
tu.description,
tu.review_standard_id,
rs.chapter,
rs.text,
rs.test_method testMethod,
tr.test_result testResult
from
t_test_usecase tu
left join t_test_scenario ts on tu.test_scenario_id = ts.id
left join t_test_type tt on tu.test_type_id = tt.id
left join t_review_standard rs on tu.review_standard_id = rs.id
left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id
left join t_task t on tsr.task_id = t.id
left join t_model_test_task mtt on mtt.id = t.model_test_task_id
left join t_test_records tr on tu.case_id = tr.usecase_id
where
mtt.id = #{id}
select tu.id,
tu.case_id caseId,
ts.test_scenario testScenario,
tt.test_type testType,
tu.usecase_no usecaseNo,
tu.name,
tu.tools,
tu.input,
tu.description,
tu.review_standard_id,
rs.chapter,
rs.text,
rs.test_method testMethod,
tr.test_result testResult
from t_test_usecase tu
left join t_test_scenario ts on tu.test_scenario_id = ts.id
left join t_test_type tt on tu.test_type_id = tt.id
left join t_review_standard rs on tu.review_standard_id = rs.id
left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id
left join t_task t on tsr.task_id = t.id
left join t_model_test_task mtt on mtt.id = t.model_test_task_id
left join t_test_records tr on tu.case_id = tr.usecase_id
where mtt.id = #{id}
group by tu.id, tu.case_id, ts.test_scenario, tt.test_type, tu.usecase_no, tu.name, tu.tools, tu.input,
tu.description, tu.review_standard_id, rs.chapter, rs.text, rs.test_method, tr.test_result
</select>
<select
id=
"selectOptionalUsecase"
resultType=
"com.ruoyi.domain.vo.OptionalUseCasesVO"
>
...
...
quality-review/src/main/resources/template/receipt_template_0
3_27
.pdf
→
quality-review/src/main/resources/template/receipt_template_0
4_02
.pdf
View file @
ffd36c26
No preview for this file type
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
View file @
ffd36c26
...
...
@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysLogininforService;
/**
* 系统访问记录
*
*
* @author ruoyi
*/
@RestController
...
...
@@ -35,7 +35,6 @@ public class SysLogininforController extends BaseController
@Autowired
private
SysPasswordService
passwordService
;
@PreAuthorize
(
"@ss.hasPermi('monitor:logininfor:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SysLogininfor
logininfor
)
{
...
...
@@ -45,7 +44,6 @@ public class SysLogininforController extends BaseController
}
@Log
(
title
=
"登录日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PreAuthorize
(
"@ss.hasPermi('monitor:logininfor:export')"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SysLogininfor
logininfor
)
{
...
...
@@ -54,7 +52,6 @@ public class SysLogininforController extends BaseController
util
.
exportExcel
(
response
,
list
,
"登录日志"
);
}
@PreAuthorize
(
"@ss.hasPermi('monitor:logininfor:remove')"
)
@Log
(
title
=
"登录日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{infoIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
infoIds
)
...
...
@@ -62,7 +59,6 @@ public class SysLogininforController extends BaseController
return
toAjax
(
logininforService
.
deleteLogininforByIds
(
infoIds
));
}
@PreAuthorize
(
"@ss.hasPermi('monitor:logininfor:remove')"
)
@Log
(
title
=
"登录日志"
,
businessType
=
BusinessType
.
CLEAN
)
@DeleteMapping
(
"/clean"
)
public
AjaxResult
clean
()
...
...
@@ -71,7 +67,6 @@ public class SysLogininforController extends BaseController
return
success
();
}
@PreAuthorize
(
"@ss.hasPermi('monitor:logininfor:unlock')"
)
@Log
(
title
=
"账户解锁"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/unlock/{userName}"
)
public
AjaxResult
unlock
(
@PathVariable
(
"userName"
)
String
userName
)
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
View file @
ffd36c26
...
...
@@ -21,7 +21,7 @@ import com.ruoyi.system.service.ISysOperLogService;
/**
* 操作日志记录
*
*
* @author ruoyi
*/
@RestController
...
...
@@ -31,7 +31,6 @@ public class SysOperlogController extends BaseController
@Autowired
private
ISysOperLogService
operLogService
;
@PreAuthorize
(
"@ss.hasPermi('monitor:operlog:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SysOperLog
operLog
)
{
...
...
@@ -41,7 +40,6 @@ public class SysOperlogController extends BaseController
}
@Log
(
title
=
"操作日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PreAuthorize
(
"@ss.hasPermi('monitor:operlog:export')"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SysOperLog
operLog
)
{
...
...
@@ -51,7 +49,6 @@ public class SysOperlogController extends BaseController
}
@Log
(
title
=
"操作日志"
,
businessType
=
BusinessType
.
DELETE
)
@PreAuthorize
(
"@ss.hasPermi('monitor:operlog:remove')"
)
@DeleteMapping
(
"/{operIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
operIds
)
{
...
...
@@ -59,7 +56,6 @@ public class SysOperlogController extends BaseController
}
@Log
(
title
=
"操作日志"
,
businessType
=
BusinessType
.
CLEAN
)
@PreAuthorize
(
"@ss.hasPermi('monitor:operlog:remove')"
)
@DeleteMapping
(
"/clean"
)
public
AjaxResult
clean
()
{
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
View file @
ffd36c26
...
...
@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysNoticeService;
/**
* 公告 信息操作处理
*
*
* @author ruoyi
*/
@RestController
...
...
@@ -35,7 +35,6 @@ public class SysNoticeController extends BaseController
/**
* 获取通知公告列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:notice:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SysNotice
notice
)
{
...
...
@@ -47,7 +46,6 @@ public class SysNoticeController extends BaseController
/**
* 根据通知公告编号获取详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:notice:query')"
)
@GetMapping
(
value
=
"/{noticeId}"
)
public
AjaxResult
getInfo
(
@PathVariable
Long
noticeId
)
{
...
...
@@ -57,7 +55,6 @@ public class SysNoticeController extends BaseController
/**
* 新增通知公告
*/
@PreAuthorize
(
"@ss.hasPermi('system:notice:add')"
)
@Log
(
title
=
"通知公告"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@Validated
@RequestBody
SysNotice
notice
)
...
...
@@ -69,7 +66,6 @@ public class SysNoticeController extends BaseController
/**
* 修改通知公告
*/
@PreAuthorize
(
"@ss.hasPermi('system:notice:edit')"
)
@Log
(
title
=
"通知公告"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@Validated
@RequestBody
SysNotice
notice
)
...
...
@@ -81,7 +77,6 @@ public class SysNoticeController extends BaseController
/**
* 删除通知公告
*/
@PreAuthorize
(
"@ss.hasPermi('system:notice:remove')"
)
@Log
(
title
=
"通知公告"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{noticeIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
noticeIds
)
...
...
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
View file @
ffd36c26
...
...
@@ -51,7 +51,13 @@ public class SysDept extends BaseEntity
/** 父部门名称 */
private
String
parentName
;
/** 地址 */
private
String
address
;
/** 邮编 */
private
String
postcode
;
/** 子部门 */
private
List
<
SysDept
>
children
=
new
ArrayList
<
SysDept
>();
...
...
@@ -181,6 +187,22 @@ public class SysDept extends BaseEntity
this
.
children
=
children
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getPostcode
()
{
return
postcode
;
}
public
void
setPostcode
(
String
postcode
)
{
this
.
postcode
=
postcode
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
@@ -198,6 +220,8 @@ public class SysDept extends BaseEntity
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"address"
,
getAddress
())
.
append
(
"postcode"
,
getPostcode
())
.
toString
();
}
}
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
View file @
ffd36c26
...
...
@@ -20,10 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"postcode"
column=
"postcode"
/>
</resultMap>
<sql
id=
"selectDeptVo"
>
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
, d.address, d.postcode
from sys_dept d
</sql>
...
...
@@ -99,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"email != null and email != ''"
>
email,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
<if
test=
"address != null and address != ''"
>
address,
</if>
<if
test=
"postcode != null and postcode != ''"
>
postcode,
</if>
create_time
)values(
<if
test=
"deptId != null and deptId != 0"
>
#{deptId},
</if>
...
...
@@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"email != null and email != ''"
>
#{email},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createBy != null and createBy != ''"
>
#{createBy},
</if>
<if
test=
"address != null and address != ''"
>
#{address},
</if>
<if
test=
"postcode != null and postcode != ''"
>
#{postcode},
</if>
sysdate()
)
</insert>
...
...
@@ -127,6 +133,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"email != null"
>
email = #{email},
</if>
<if
test=
"status != null and status != ''"
>
status = #{status},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
update_by = #{updateBy},
</if>
<if
test=
"address != null and address != ''"
>
address = #{address},
</if>
<if
test=
"postcode != null and postcode != ''"
>
postcode = #{postcode},
</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}
...
...
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