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
d4fece7a
Commit
d4fece7a
authored
Apr 11, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev - master 5.0 See merge request
!283
parents
a7603471
9cba1ab3
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
277 additions
and
51 deletions
+277
-51
InspectionReportPdfVO.java
.../main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
+0
-4
QuantityStatisticsVO.java
...c/main/java/com/ruoyi/domain/vo/QuantityStatisticsVO.java
+3
-3
ScenarioVO.java
...-review/src/main/java/com/ruoyi/domain/vo/ScenarioVO.java
+15
-0
TestTypeVO.java
...-review/src/main/java/com/ruoyi/domain/vo/TestTypeVO.java
+15
-0
UseCaseVO.java
...y-review/src/main/java/com/ruoyi/domain/vo/UseCaseVO.java
+29
-0
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+1
-0
MatrixService.java
...review/src/main/java/com/ruoyi/service/MatrixService.java
+2
-0
PdfTemplateManagementService.java
.../java/com/ruoyi/service/PdfTemplateManagementService.java
+8
-0
MatrixServiceImpl.java
...c/main/java/com/ruoyi/service/impl/MatrixServiceImpl.java
+85
-4
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+34
-1
StrategyCarReviewTaskSigned.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
+0
-6
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+55
-6
MatrixController.java
...-review/src/main/java/com/ruoyi/web/MatrixController.java
+1
-1
PdfTemplateManagementController.java
...n/java/com/ruoyi/web/PdfTemplateManagementController.java
+4
-1
ReviewEnterpriseArchiveMapper.xml
...c/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
+1
-0
StatisticsHomeMapper.xml
...review/src/main/resources/mapper/StatisticsHomeMapper.xml
+6
-7
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+6
-6
receipt_template_04_02.pdf
...ew/src/main/resources/template/receipt_template_04_02.pdf
+0
-0
application-druid.yml
ruoyi-admin/src/main/resources/application-druid.yml
+6
-6
application-prod-druid.yml
ruoyi-admin/src/main/resources/application-prod-druid.yml
+6
-6
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
View file @
d4fece7a
package
com
.
ruoyi
.
domain
.
vo
;
package
com
.
ruoyi
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
/**
* 检验报告PDF VO类
* 检验报告PDF VO类
...
...
quality-review/src/main/java/com/ruoyi/domain/vo/QuantityStatisticsVO.java
View file @
d4fece7a
...
@@ -19,7 +19,7 @@ public class QuantityStatisticsVO {
...
@@ -19,7 +19,7 @@ public class QuantityStatisticsVO {
@ApiModelProperty
(
"支持标准数量"
)
@ApiModelProperty
(
"支持标准数量"
)
private
Long
standardQuantity
;
private
Long
standardQuantity
;
@ApiModelProperty
(
"测试用例数量"
)
@ApiModelProperty
(
"测试用例数量
科恩获取
"
)
private
Long
numberUseCases
;
private
Long
numberUseCases
;
@ApiModelProperty
(
"任务数量"
)
@ApiModelProperty
(
"任务数量"
)
...
@@ -40,10 +40,10 @@ public class QuantityStatisticsVO {
...
@@ -40,10 +40,10 @@ public class QuantityStatisticsVO {
@ApiModelProperty
(
"零部件样品数量"
)
@ApiModelProperty
(
"零部件样品数量"
)
private
Long
numberComponentSamples
;
private
Long
numberComponentSamples
;
@ApiModelProperty
(
"测试方法数量"
)
@ApiModelProperty
(
"测试方法数量
科恩获取
"
)
private
Long
numberMethods
;
private
Long
numberMethods
;
@ApiModelProperty
(
"场景数量"
)
@ApiModelProperty
(
"场景数量
科恩获取
"
)
private
Long
numberScenes
;
private
Long
numberScenes
;
@ApiModelProperty
(
"已完成任务数量"
)
@ApiModelProperty
(
"已完成任务数量"
)
...
...
quality-review/src/main/java/com/ruoyi/domain/vo/ScenarioVO.java
0 → 100644
View file @
d4fece7a
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@ApiModel
(
description
=
"测试场景VO"
)
@Data
public
class
ScenarioVO
{
private
Long
id
;
private
String
name
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/TestTypeVO.java
0 → 100644
View file @
d4fece7a
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@ApiModel
(
description
=
"测试方法(类型)VO"
)
@Data
public
class
TestTypeVO
{
private
Long
id
;
private
String
name
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/UseCaseVO.java
0 → 100644
View file @
d4fece7a
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@ApiModel
(
description
=
"测试用例VO"
)
@Data
public
class
UseCaseVO
{
private
String
id
;
private
String
name
;
// 测试场景
private
String
scenario
;
// 测试方法
private
String
test_type
;
/**
* 返回用例在矩阵中的坐标
* @return
*/
public
String
getCoordinates
()
{
return
scenario
+
test_type
;
}
}
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
d4fece7a
...
@@ -66,4 +66,5 @@ public interface TaskMapper extends BaseMapper<Task> {
...
@@ -66,4 +66,5 @@ public interface TaskMapper extends BaseMapper<Task> {
List
<
UserNameResponse
>
findByRelation
(
@Param
(
"relation"
)
List
<
TaskUserRelation
>
relation
);
List
<
UserNameResponse
>
findByRelation
(
@Param
(
"relation"
)
List
<
TaskUserRelation
>
relation
);
List
<
UserNameResponse
>
findByFinishTaskList
(
@Param
(
"taskList"
)
List
<
Task
>
taskList
);
List
<
UserNameResponse
>
findByFinishTaskList
(
@Param
(
"taskList"
)
List
<
Task
>
taskList
);
}
}
quality-review/src/main/java/com/ruoyi/service/MatrixService.java
View file @
d4fece7a
...
@@ -6,4 +6,6 @@ public interface MatrixService {
...
@@ -6,4 +6,6 @@ public interface MatrixService {
MatrixResponse
getMatrix
();
MatrixResponse
getMatrix
();
MatrixResponse
getMatrixForUrl
();
}
}
quality-review/src/main/java/com/ruoyi/service/PdfTemplateManagementService.java
View file @
d4fece7a
...
@@ -22,4 +22,12 @@ public interface PdfTemplateManagementService {
...
@@ -22,4 +22,12 @@ public interface PdfTemplateManagementService {
* @throws Exception
* @throws Exception
*/
*/
String
generateRetentionFile
(
Long
taskId
)
throws
Exception
;
String
generateRetentionFile
(
Long
taskId
)
throws
Exception
;
/**
* 原始记录PDF下载
* @param taskId
* @return
*/
String
generateOriginalRecord
(
Long
taskId
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/MatrixServiceImpl.java
View file @
d4fece7a
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.ruoyi.domain.TestScenario
;
import
com.ruoyi.domain.TestScenario
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.vo.MatrixColumnVO
;
import
com.ruoyi.domain.vo.*
;
import
com.ruoyi.domain.vo.MatrixRowVO
;
import
com.ruoyi.service.ITestScenarioService
;
import
com.ruoyi.service.ITestScenarioService
;
import
com.ruoyi.service.ITestTypeService
;
import
com.ruoyi.service.ITestTypeService
;
import
com.ruoyi.service.MatrixService
;
import
com.ruoyi.service.MatrixService
;
...
@@ -13,8 +14,6 @@ import com.ruoyi.web.response.MatrixResponse;
...
@@ -13,8 +14,6 @@ import com.ruoyi.web.response.MatrixResponse;
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
;
import
java.time.format.TextStyle
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -47,6 +46,88 @@ public class MatrixServiceImpl implements MatrixService {
...
@@ -47,6 +46,88 @@ public class MatrixServiceImpl implements MatrixService {
return
response
;
return
response
;
}
}
@Override
public
MatrixResponse
getMatrixForUrl
()
{
//以post形式请求接口
String
result
=
HttpUtil
.
post
(
"https://10.12.48.78:8090/DescribeScenarioTestTypeList"
,
""
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
// 获取测试场景列表
List
<
ScenarioVO
>
scenarioList
=
jsonObject
.
getList
(
"scenario_list"
,
ScenarioVO
.
class
);
if
(
scenarioList
!=
null
&&
scenarioList
.
size
()
!=
0
)
{
for
(
int
i
=
0
;
i
<
scenarioList
.
size
();
i
++)
{
scenarioList
.
get
(
i
).
setId
((
long
)
i
);
}
}
// 获取测试方法列表
List
<
TestTypeVO
>
testTypeList
=
jsonObject
.
getList
(
"test_type_list"
,
TestTypeVO
.
class
);
if
(
testTypeList
!=
null
&&
testTypeList
.
size
()
!=
0
)
{
for
(
int
i
=
0
;
i
<
testTypeList
.
size
();
i
++)
{
testTypeList
.
get
(
i
).
setId
((
long
)
i
);
}
}
String
caseResult
=
HttpUtil
.
post
(
"https://10.12.48.78:8090/DescribeCaseList"
,
""
);
JSONObject
object
=
JSONObject
.
parseObject
(
caseResult
);
// 获取测试用例列表
List
<
UseCaseVO
>
caseList
=
object
.
getList
(
"case_list"
,
UseCaseVO
.
class
);
MatrixResponse
response
=
new
MatrixResponse
();
setHeaderName
(
response
,
testTypeList
);
setRowsName
(
response
,
scenarioList
,
testTypeList
,
caseList
);
return
response
;
}
private
void
setRowsName
(
MatrixResponse
response
,
List
<
ScenarioVO
>
scenarioList
,
List
<
TestTypeVO
>
testTypeList
,
List
<
UseCaseVO
>
caseList
)
{
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
();
for
(
ScenarioVO
scenario
:
scenarioList
)
{
Map
<
String
,
Object
>
row
=
new
HashMap
();
row
.
put
(
"name"
,
scenario
.
getName
());
for
(
TestTypeVO
type
:
testTypeList
)
{
String
column
=
type
.
getName
();
String
columnId
=
String
.
valueOf
(
type
.
getId
());
String
coordinates
=
scenario
.
getName
()
+
column
;
String
useCase
=
getUseCaseIdByCoordinatesName
(
caseList
,
coordinates
);
row
.
put
(
columnId
,
useCase
==
null
?
""
:
useCase
);
}
rows
.
add
(
row
);
}
response
.
setRows
(
rows
);
}
public
String
getUseCaseIdByCoordinatesName
(
List
<
UseCaseVO
>
caseList
,
String
coordinates
)
{
for
(
UseCaseVO
useCase
:
caseList
)
{
if
(
useCase
.
getCoordinates
().
equals
(
coordinates
))
{
return
useCase
.
getId
();
}
}
return
null
;
}
private
void
setHeaderName
(
MatrixResponse
response
,
List
<
TestTypeVO
>
testTypeList
)
{
List
<
MatrixColumnVO
>
columns
=
new
ArrayList
();
for
(
TestTypeVO
type
:
testTypeList
)
{
MatrixColumnVO
column
=
new
MatrixColumnVO
(
String
.
valueOf
(
type
.
getId
()),
type
.
getName
());
columns
.
add
(
column
);
}
response
.
setHeader
(
columns
);
}
private
void
setHeader
(
MatrixResponse
response
,
List
<
TestType
>
types
)
{
private
void
setHeader
(
MatrixResponse
response
,
List
<
TestType
>
types
)
{
List
<
MatrixColumnVO
>
columns
=
new
ArrayList
();
List
<
MatrixColumnVO
>
columns
=
new
ArrayList
();
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
d4fece7a
...
@@ -158,7 +158,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -158,7 +158,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
?
Optional
.
of
(
pictureList
.
get
(
i
))
?
Optional
.
of
(
pictureList
.
get
(
i
))
:
Optional
.
empty
();
:
Optional
.
empty
();
if
(
optionalElement
.
isPresent
()
&&
StrUtil
.
isNotEmpty
(
optionalElement
.
get
()))
{
if
(
optionalElement
.
isPresent
()
&&
StrUtil
.
isNotEmpty
(
optionalElement
.
get
()))
{
Image
image
=
Image
.
getInstance
(
new
URL
(
minioEndpoint
+
optionalElement
.
get
(
)));
Image
image
=
Image
.
getInstance
(
new
URL
(
(
minioEndpoint
+
optionalElement
.
get
()).
replace
(
" "
,
"%20"
)));
image
.
scaleAbsolute
(
100
,
100
);
image
.
scaleAbsolute
(
100
,
100
);
cell
.
addElement
(
image
);
cell
.
addElement
(
image
);
}
else
{
}
else
{
...
@@ -259,6 +259,39 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -259,6 +259,39 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return
uploadMinio
(
outputStream
,
"企业留档文件-"
+
getReportName
());
return
uploadMinio
(
outputStream
,
"企业留档文件-"
+
getReportName
());
}
}
/**
* 原始记录PDF下载
* @param taskId
* @return
*/
@Override
public
String
generateOriginalRecord
(
Long
taskId
)
{
return
null
;
}
public
static
class
OriginalRecordHeaderFooter
extends
PdfPageEventHelper
{
// 一页加载完成触发,写入页眉和页脚
@Override
public
void
onEndPage
(
PdfWriter
writer
,
Document
document
)
{
PdfPTable
table
=
new
PdfPTable
(
2
);
try
{
table
.
setTotalWidth
(
PageSize
.
A4
.
getWidth
()
-
80
);
table
.
setWidths
(
new
int
[]
{
40
,
40
});
table
.
setLockedWidth
(
true
);
table
.
getDefaultCell
().
setFixedHeight
(-
10
);
table
.
getDefaultCell
().
setBorder
(
Rectangle
.
BOTTOM
);
table
.
getDefaultCell
().
setBorderWidth
(
0.6f
);
BaseFont
font
=
BaseFont
.
createFont
(
"/fonts/STSong.TTF"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
EMBEDDED
);
table
.
addCell
(
new
Paragraph
(
headerText
,
new
Font
(
font
)));
// 可以直接使用addCell(str),不过不能指定字体,中文无法显示
// 将页眉写到document中,位置可以指定,指定到下面就是页脚
table
.
writeSelectedRows
(
0
,
-
1
,
40
,
PageSize
.
A4
.
getHeight
()
-
20
,
writer
.
getDirectContent
());
}
catch
(
Exception
de
)
{
throw
new
ExceptionConverter
(
de
);
}
}
}
private
static
String
headerText
;
private
static
String
headerText
;
public
static
class
MyHeaderFooter
extends
PdfPageEventHelper
{
public
static
class
MyHeaderFooter
extends
PdfPageEventHelper
{
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
View file @
d4fece7a
...
@@ -85,12 +85,6 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
...
@@ -85,12 +85,6 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
response
.
setCarReviewTask
(
carReviewTask
);
response
.
setCarReviewTask
(
carReviewTask
);
Task
task
=
taskMapper
.
getBySubtaskId
(
carReviewTask
.
getId
());
if
(
task
.
getModelTestTaskId
()
!=
null
)
{
response
.
setTestScenarioList
(
testScenarioMapper
.
selectAll
());
}
return
response
;
return
response
;
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
d4fece7a
...
@@ -239,12 +239,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -239,12 +239,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
setCarProgress
(
carReviewTaskList
,
responses
);
setCarProgress
(
carReviewTaskList
,
responses
);
// 车型试验子任务列表
// 车型试验子任务列表
List
<
ModelTestTask
>
modelTestTaskList
=
modelTestTaskMapper
.
findByTaskList
(
responses
);
// List<ModelTestTask> modelTestTaskList = modelTestTaskMapper.findByTaskList(responses);
setModelProgress
(
modelTestTaskList
,
responses
);
// setModelProgress(modelTestTaskList,responses);
// 设置车型试验进度
setModelSchedule
(
responses
);
// 任务是否有选择场景
// 任务是否有选择场景
List
<
TaskScenarioResponse
>
scenarioResponseList
=
taskMapper
.
findByTaskList
(
responses
);
//
List<TaskScenarioResponse> scenarioResponseList = taskMapper.findByTaskList(responses);
setTaskScenario
(
scenarioResponseList
,
responses
);
//
setTaskScenario(scenarioResponseList,responses);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
...
@@ -390,8 +392,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -390,8 +392,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
setCarProgress
(
carReviewTaskList
,
responses
);
setCarProgress
(
carReviewTaskList
,
responses
);
// 车型试验子任务列表
// 车型试验子任务列表
List
<
ModelTestTask
>
modelTestTaskList
=
modelTestTaskMapper
.
findByTaskList
(
responses
);
// List<ModelTestTask> modelTestTaskList = modelTestTaskMapper.findByTaskList(responses);
setModelProgress
(
modelTestTaskList
,
responses
);
// setModelProgress(modelTestTaskList,responses);
// 设置车型试验进度
setModelSchedule
(
responses
);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
...
@@ -762,6 +766,51 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -762,6 +766,51 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
}
}
private
void
setModelSchedule
(
List
<
TaskFindResponse
>
responses
)
{
if
(
responses
!=
null
&&
responses
.
size
()
!=
0
)
{
for
(
TaskFindResponse
response
:
responses
)
{
if
(
response
.
getTestSchemeId
()
!=
null
)
{
// 获取任务的用例数量
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
response
.
getTestSchemeId
());
map
.
put
(
"verbose"
,
"BASIC"
);
//以post形式请求接口
String
result
=
HttpUtil
.
post
(
"https://10.12.48.78:8090/DescribeProjectTestResult"
,
JSONObject
.
toJSONString
(
map
));
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
// 获取项目id
Integer
useCaseNum
=
(
Integer
)
jsonObject
.
get
(
"case_count"
);
// 任务是否有选择用例
response
.
setTaskScenario
(
useCaseNum
>
0
);
// 任务用例结果数量
Long
resultNum
=
testRecordsMapper
.
countResult
(
response
.
getTestSchemeId
());
if
(
Objects
.
equals
(
response
.
getTestStatus
(),
ModelTestTask
.
TASK_STATUS_FINISH
))
{
response
.
setTest
(
100.0
);
}
else
if
(
Objects
.
equals
(
response
.
getTestStatus
(),
ModelTestTask
.
TASK_STATUS_SIGNED
))
{
response
.
setTest
(
90.0
);
}
else
if
(
resultNum
==
null
)
{
response
.
setTest
(
0.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
((
resultNum
/
useCaseNum
)
*
90
);
response
.
setTest
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
else
{
// 任务是否有选择用例
response
.
setTaskScenario
(
false
);
}
}
}
}
private
void
setModelProgress
(
List
<
ModelTestTask
>
modelTestTaskList
,
List
<
TaskFindResponse
>
responses
)
{
private
void
setModelProgress
(
List
<
ModelTestTask
>
modelTestTaskList
,
List
<
TaskFindResponse
>
responses
)
{
if
(
modelTestTaskList
!=
null
&&
modelTestTaskList
.
size
()
!=
0
)
{
if
(
modelTestTaskList
!=
null
&&
modelTestTaskList
.
size
()
!=
0
)
{
...
...
quality-review/src/main/java/com/ruoyi/web/MatrixController.java
View file @
d4fece7a
...
@@ -25,7 +25,7 @@ public class MatrixController {
...
@@ -25,7 +25,7 @@ public class MatrixController {
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getInfo"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getInfo"
)
public
R
<
MatrixResponse
>
getInfo
()
{
public
R
<
MatrixResponse
>
getInfo
()
{
return
R
.
ok
(
matrixService
.
getMatrix
());
return
R
.
ok
(
matrixService
.
getMatrix
ForUrl
());
}
}
}
}
quality-review/src/main/java/com/ruoyi/web/PdfTemplateManagementController.java
View file @
d4fece7a
...
@@ -100,6 +100,8 @@ public class PdfTemplateManagementController {
...
@@ -100,6 +100,8 @@ public class PdfTemplateManagementController {
url
=
task
.
getModelTestUrl
();
url
=
task
.
getModelTestUrl
();
if
(
StrUtil
.
isBlank
(
url
))
{
if
(
StrUtil
.
isBlank
(
url
))
{
// TODO 生成车型
// TODO 生成车型
url
=
pdfTemplateManagementService
.
generateOriginalRecord
(
request
.
getTaskId
());
taskService
.
update
(
new
UpdateWrapper
<
Task
>().
lambda
().
eq
(
Task:
:
getId
,
request
.
getTaskId
()).
set
(
Task:
:
getModelTestTaskId
,
url
));
}
}
break
;
break
;
default
:
default
:
...
@@ -136,7 +138,8 @@ public class PdfTemplateManagementController {
...
@@ -136,7 +138,8 @@ public class PdfTemplateManagementController {
break
;
break
;
case
2
:
case
2
:
// 更新
// 更新
// TODO 更新车型
url
=
pdfTemplateManagementService
.
generateOriginalRecord
(
request
.
getTaskId
());
taskService
.
update
(
new
UpdateWrapper
<
Task
>().
lambda
().
eq
(
Task:
:
getId
,
request
.
getTaskId
()).
set
(
Task:
:
getModelTestTaskId
,
url
));
break
;
break
;
default
:
default
:
break
;
break
;
...
...
quality-review/src/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
View file @
d4fece7a
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewEnterpriseArchive"
>
SELECT id, enterprise_name, file_name, version, publish_date, status, identify_number, storage, photo, task_id, create_by, create_time 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, create_by, create_time FROM t_review_enterprise_archive WHERE task_id = #{taskId}
</select>
</select>
...
...
quality-review/src/main/resources/mapper/StatisticsHomeMapper.xml
View file @
d4fece7a
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
<select
id=
"selectQuantityStatistics"
resultType=
"com.ruoyi.domain.vo.QuantityStatisticsVO"
parameterType=
"com.ruoyi.domain.vo.QuantityStatisticsVO"
>
<select
id=
"selectQuantityStatistics"
resultType=
"com.ruoyi.domain.vo.QuantityStatisticsVO"
parameterType=
"com.ruoyi.domain.vo.QuantityStatisticsVO"
>
SELECT
SELECT
( SELECT count( id ) FROM t_standard ) AS standardQuantity,
( SELECT count( id ) FROM t_standard ) AS standardQuantity,
( SELECT count( id ) FROM t_test_usecase ) AS numberUseCases,
( SELECT count( id ) FROM t_task WHERE task_status != 'TEMPORARILY' ) AS numberTasks,
( SELECT count( id ) FROM t_task WHERE task_status != 'TEMPORARILY' ) AS numberTasks,
( SELECT count( id ) FROM t_automobile_enterprise WHERE deleted = 0 ) AS numberCompanies,
( SELECT count( id ) FROM t_automobile_enterprise WHERE deleted = 0 ) AS numberCompanies,
(
(
...
@@ -22,8 +21,6 @@
...
@@ -22,8 +21,6 @@
) AS numberInspectors,
) AS numberInspectors,
( SELECT count( id ) FROM t_sample WHERE flag = '0' AND deleted = 0 ) AS numberVehicleSamples,
( SELECT count( id ) FROM t_sample WHERE flag = '0' AND deleted = 0 ) AS numberVehicleSamples,
( SELECT count( id ) FROM t_sample WHERE flag = '1' AND deleted = 0 ) AS numberComponentSamples,
( SELECT count( id ) FROM t_sample WHERE flag = '1' AND deleted = 0 ) AS numberComponentSamples,
( SELECT count( id ) FROM t_test_scenario ) AS numberScenes,
( SELECT count( id ) FROM t_test_type ) AS numberMethods,
( SELECT count( id ) FROM t_task WHERE vehicle_information_url IS NOT NULL ) AS numberReports,
( SELECT count( id ) FROM t_task WHERE vehicle_information_url IS NOT NULL ) AS numberReports,
( SELECT count( id ) FROM t_task WHERE task_status = 'FINISH' ) AS completedTaskNumber,
( SELECT count( id ) FROM t_task WHERE task_status = 'FINISH' ) AS completedTaskNumber,
( SELECT count( id ) FROM t_task WHERE task_status = 'NEW' OR task_status = 'PENDING' OR task_status = 'SIGNED') AS executeTasksNumber
( SELECT count( id ) FROM t_task WHERE task_status = 'NEW' OR task_status = 'PENDING' OR task_status = 'SIGNED') AS executeTasksNumber
...
@@ -45,6 +42,8 @@
...
@@ -45,6 +42,8 @@
confidentiality_level AS name
confidentiality_level AS name
FROM
FROM
t_task
t_task
WHERE
confidentiality_level IS NOT NULL AND confidentiality_level != ''
GROUP BY
GROUP BY
confidentiality_level
confidentiality_level
</select>
</select>
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
d4fece7a
...
@@ -307,16 +307,16 @@
...
@@ -307,16 +307,16 @@
t.entrusted_unit_address AS clientAddress,
t.entrusted_unit_address AS clientAddress,
t.entrusted_unit_phone AS entrustedUnitTelephone,
t.entrusted_unit_phone AS entrustedUnitTelephone,
t.entrusted_unit_code AS clientPostalCode,
t.entrusted_unit_code AS clientPostalCode,
GROUP_CONCAT(s.sample_name
) AS sampleName,
SUBSTRING_INDEX(GROUP_CONCAT(s.sample_name), ',', 1
) AS sampleName,
t.product_model AS typeSpecification,
t.product_model AS typeSpecification,
DATE_FORMAT(t.task_begin_time, '%Y年%m月%d日') AS taskBeginTime,
DATE_FORMAT(t.task_begin_time, '%Y年%m月%d日') AS taskBeginTime,
DATE_FORMAT(t.task_end_time, '%Y年%m月%d日') AS taskEndTime,
DATE_FORMAT(t.task_end_time, '%Y年%m月%d日') AS taskEndTime,
concat(st.standard_no, ' ', st.name) AS inspectionBasis,
concat(st.standard_no, ' ', st.name) AS inspectionBasis,
GROUP_CONCAT(distinct ae.enterprise_name
) AS productionEnterprise,
SUBSTRING_INDEX(GROUP_CONCAT(distinct ae.enterprise_name), ',', 1
) AS productionEnterprise,
GROUP_CONCAT(s.sample_sender
) AS sampleSender,
SUBSTRING_INDEX(GROUP_CONCAT(s.sample_sender), ',', 1
) AS sampleSender,
GROUP_CONCAT(distinct DATE_FORMAT(s.delivery_date, '%Y-%m-%d')
) AS sampleDeliveryDate,
SUBSTRING_INDEX(GROUP_CONCAT(distinct DATE_FORMAT(s.delivery_date, '%Y-%m-%d')), ',', 1
) AS sampleDeliveryDate,
count(s.id
) AS sampleQuantity,
sum(CASE WHEN s.flag = '0' THEN 1 ELSE 0 END
) AS sampleQuantity,
CONVERT(sum(
s.number_of_samples
), UNSIGNED) AS sampleSum,
CONVERT(sum(
CASE WHEN s.flag = '0' THEN s.number_of_samples ELSE 0 END
), UNSIGNED) AS sampleSum,
GROUP_CONCAT(distinct DATE_FORMAT(s.manufacture_date, '%Y-%m-%d')) AS sampleDeliveryDate,
GROUP_CONCAT(distinct DATE_FORMAT(s.manufacture_date, '%Y-%m-%d')) AS sampleDeliveryDate,
t.product_model AS vehicleModel,
t.product_model AS vehicleModel,
t.id AS taskNumber,
t.id AS taskNumber,
...
...
quality-review/src/main/resources/template/receipt_template_04_02.pdf
View file @
d4fece7a
No preview for this file type
ruoyi-admin/src/main/resources/application-druid.yml
View file @
d4fece7a
...
@@ -6,7 +6,7 @@ spring:
...
@@ -6,7 +6,7 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://49.232.167.247:22030/vehicle-quality-review?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://49.232.167.247:22030/vehicle-quality-review?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
&sessionVariables=group_concat_max_len=3000
username
:
root
username
:
root
password
:
1qaz@WSX
password
:
1qaz@WSX
# 从库数据源
# 从库数据源
...
...
ruoyi-admin/src/main/resources/application-prod-druid.yml
View file @
d4fece7a
...
@@ -6,7 +6,7 @@ spring:
...
@@ -6,7 +6,7 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://${MYSQL_IP}:${MYSQL_PORT}/vehicle-quality-review?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://${MYSQL_IP}:${MYSQL_PORT}/vehicle-quality-review?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
&sessionVariables=group_concat_max_len=3000
username
:
${MYSQL_USERNAME}
username
:
${MYSQL_USERNAME}
password
:
${MYSQL_PASSWORD}
password
:
${MYSQL_PASSWORD}
# 从库数据源
# 从库数据源
...
...
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