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
8a856380
Commit
8a856380
authored
Mar 08, 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
a859bbfb
ff4e5d3e
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
309 additions
and
60 deletions
+309
-60
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+4
-0
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+9
-0
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+1
-1
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+7
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+46
-45
AutomobileEnterpriseController.java
...in/java/com/ruoyi/web/AutomobileEnterpriseController.java
+1
-1
ReviewKeyPointController.java
...src/main/java/com/ruoyi/web/ReviewKeyPointController.java
+38
-0
ReviewStandardController.java
...src/main/java/com/ruoyi/web/ReviewStandardController.java
+14
-7
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+1
-1
KeyPointFindListRequest.java
...n/java/com/ruoyi/web/request/KeyPointFindListRequest.java
+25
-0
ReviewStandardListRequest.java
...java/com/ruoyi/web/request/ReviewStandardListRequest.java
+22
-0
ReviewStandardListResponse.java
...va/com/ruoyi/web/response/ReviewStandardListResponse.java
+23
-0
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+3
-0
AutomobileEnterpriseMapper.xml
.../src/main/resources/mapper/AutomobileEnterpriseMapper.xml
+17
-1
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+18
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+3
-0
logback.xml
ruoyi-admin/src/main/resources/logback.xml
+4
-4
MybatisPlusConfig.java
...in/java/com/ruoyi/framework/config/MybatisPlusConfig.java
+13
-0
PercentEscapeInterceptor.java
.../com/ruoyi/framework/config/PercentEscapeInterceptor.java
+60
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
8a856380
...
@@ -3,6 +3,8 @@ package com.ruoyi.mapper;
...
@@ -3,6 +3,8 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardListResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -30,4 +32,6 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
...
@@ -30,4 +32,6 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* @return
* @return
*/
*/
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
List
<
ReviewStandardListResponse
>
findReviewStandardList
(
ReviewStandardListRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
8a856380
...
@@ -3,7 +3,9 @@ package com.ruoyi.service;
...
@@ -3,7 +3,9 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
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.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardListResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
...
@@ -43,4 +45,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
...
@@ -43,4 +45,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return
* @return
*/
*/
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
/**
* 查询标准要求
* @param request
* @return
*/
List
<
ReviewStandardListResponse
>
findReviewStandardList
(
ReviewStandardListRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
8a856380
...
@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> {
...
@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> {
*/
*/
List
<
Task
>
findList
(
TaskListRequest
request
);
List
<
Task
>
findList
(
TaskListRequest
request
);
void
createTask
(
TaskCreateRequest
request
,
Long
userId
);
void
createTask
(
TaskCreateRequest
request
);
/**
/**
* 查询进行中的任务
* 查询进行中的任务
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
8a856380
...
@@ -6,7 +6,9 @@ import com.ruoyi.domain.*;
...
@@ -6,7 +6,9 @@ import com.ruoyi.domain.*;
import
com.ruoyi.mapper.ReviewStandardMapper
;
import
com.ruoyi.mapper.ReviewStandardMapper
;
import
com.ruoyi.service.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardListResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -98,6 +100,11 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
...
@@ -98,6 +100,11 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return
list
;
return
list
;
}
}
@Override
public
List
<
ReviewStandardListResponse
>
findReviewStandardList
(
ReviewStandardListRequest
request
)
{
return
reviewStandardMapper
.
findReviewStandardList
(
request
);
}
/**
/**
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* @param reviewStandardList
* @param reviewStandardList
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
8a856380
...
@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
@Override
@Override
public
void
createTask
(
TaskCreateRequest
request
,
Long
userId
)
{
public
void
createTask
(
TaskCreateRequest
request
)
{
// 构建任务创建者
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
...
@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
TaskGetInfoResponse
temporaryStorageTask
=
taskService
.
getByUserId
(
userId
);
TaskGetInfoResponse
temporaryStorageTask
=
taskService
.
getByUserId
(
loginUser
.
getUserId
());
taskMapper
.
deleteById
(
temporaryStorageTask
.
getId
());
if
(
temporaryStorageTask
!=
null
)
{
taskMapper
.
deleteById
(
temporaryStorageTask
.
getId
());
}
}
}
@Override
@Override
...
@@ -219,24 +220,26 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -219,24 +220,26 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
BeanUtils
.
copyBeanProp
(
task
,
request
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
Task
oldTask
=
taskMapper
.
selectById
(
request
.
getId
());
Task
oldTask
=
taskMapper
.
selectById
(
request
.
getId
());
if
(
task
.
getTaskStatus
()
==
Task
.
TASK_STATUS_NEW
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldTask
.
getCarReviewTaskId
()
==
null
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldTask
.
getCarReviewTaskId
()
==
null
)
{
// 保存车型审查问卷任务
// 保存车型审查问卷任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setCarReviewTaskId
(
saveCarReview
(
createRequest
,
initiator
,
standard
,
leader
));
task
.
setCarReviewTaskId
(
saveCarReview
(
createRequest
,
initiator
,
standard
,
leader
));
}
}
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldTask
.
getCarReviewTaskId
()
!=
null
)
{
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldTask
.
getCarReviewTaskId
()
!=
null
)
{
carReviewTaskMapper
.
deleteById
(
oldTask
.
getCarReviewTaskId
());
carReviewTaskMapper
.
deleteById
(
oldTask
.
getCarReviewTaskId
());
}
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
==
null
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
==
null
)
{
// 保存体系审查任务
// 保存体系审查任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setSystemReviewTaskId
(
saveSystemReview
(
createRequest
,
initiator
,
standard
,
leader
));
task
.
setSystemReviewTaskId
(
saveSystemReview
(
createRequest
,
initiator
,
standard
,
leader
));
}
}
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
!=
null
)
{
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
!=
null
)
{
systemReviewTaskMapper
.
deleteById
(
oldTask
.
getSystemReviewTaskId
());
systemReviewTaskMapper
.
deleteById
(
oldTask
.
getSystemReviewTaskId
());
}
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
}
}
taskService
.
updateById
(
task
);
taskService
.
updateById
(
task
);
...
@@ -280,31 +283,25 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -280,31 +283,25 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
// 获取之前的第一个企业名称
// 获取之前的第一个企业名称
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
s
ample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
Sample
oldS
ample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
// 获取编辑任务后的第一个企业名称
// 获取编辑任务后的第一个企业名称
TaskSampleRelation
taskSampleRelation1
=
relations
.
get
(
0
);
TaskSampleRelation
newTaskSampleRelation
=
relations
.
get
(
0
);
Sample
sample1
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation1
.
getSampleId
());
Sample
newSample
=
sampleManagementMapper
.
selectSampleManagementById
(
newTaskSampleRelation
.
getSampleId
());
// 第一个企业名称不相同则修改
// 第一个企业名称不相同则修改
if
(!
Objects
.
equals
(
sample
.
getManufacturingEnterprise
(),
sample1
.
getManufacturingEnterprise
())){
if
(!
Objects
.
equals
(
oldSample
.
getManufacturingEnterprise
(),
newSample
.
getManufacturingEnterprise
())){
Task
task1
=
taskMapper
.
selectById
(
request
.
getId
());
// 留档文件
// 体系审查对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
request
.
getId
());
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getSystemReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
:
reviewEnterpriseArchiveList
)
{
reviewEnterpriseArchive
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList
);
if
(
reviewEnterpriseArchiveList
.
size
()
!=
0
&&
reviewEnterpriseArchiveList
!=
null
)
{
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
:
reviewEnterpriseArchiveList
)
{
reviewEnterpriseArchive
.
setEnterpriseName
(
newSample
.
getManufacturingEnterprise
());
}
// 车辆对应的留档文件
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList
);
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList1
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getCarReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive1
:
reviewEnterpriseArchiveList1
)
{
reviewEnterpriseArchive1
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
}
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList1
);
}
}
}
}
}
}
...
@@ -405,20 +402,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -405,20 +402,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
}
}
// 任务组长
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
}
// 暂存
taskService
.
save
(
task
);
if
(
auditors
.
size
()
!=
0
&&
auditors
!=
null
)
{
// 构建并保存该任务所关联的审核组信息
// 构建并保存该任务所关联的审核组信息
for
(
TaskUserRelation
auditor
:
auditors
)
{
for
(
TaskUserRelation
auditor
:
auditors
)
{
auditor
.
setTaskId
(
task
.
getId
());
auditor
.
setTaskId
(
task
.
getId
());
}
}
taskUserRelationService
.
saveBatch
(
auditors
);
taskUserRelationService
.
saveBatch
(
auditors
);
// 任务组长
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
}
}
// 暂存
taskService
.
save
(
task
);
// 保存关联的整车样品信息
// 保存关联的整车样品信息
...
...
quality-review/src/main/java/com/ruoyi/web/AutomobileEnterpriseController.java
View file @
8a856380
...
@@ -46,7 +46,7 @@ public class AutomobileEnterpriseController extends BaseController
...
@@ -46,7 +46,7 @@ public class AutomobileEnterpriseController extends BaseController
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
TableDataInfo
<
AutomobileEnterprise
>
list
(
@Validated
@RequestBody
AutomobileEnterpriseListRequest
request
)
public
TableDataInfo
<
AutomobileEnterprise
>
list
(
@Validated
@RequestBody
AutomobileEnterpriseListRequest
request
)
{
{
startPage
();
startPage
(
request
);
List
<
AutomobileEnterprise
>
list
=
automobileEnterpriseService
.
selectAutomobileEnterpriseList
(
request
);
List
<
AutomobileEnterprise
>
list
=
automobileEnterpriseService
.
selectAutomobileEnterpriseList
(
request
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewKeyPointController.java
0 → 100644
View file @
8a856380
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.web.request.KeyPointFindListRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
(
tags
=
"审查要点"
)
@RestController
@RequestMapping
(
"/review/keypoint"
)
public
class
ReviewKeyPointController
extends
BaseController
{
@Autowired
private
ReviewKeyPointService
reviewKeyPointService
;
@ApiOperation
(
"查询审查要点"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findKeyPointList"
)
public
TableDataInfo
<
ReviewStandard
>
findKeyPointList
(
@Validated
@RequestBody
KeyPointFindListRequest
request
)
{
// return getDataTable(reviewKeyPointService.findKeyPointList(request));
return
null
;
}
}
quality-review/src/main/java/com/ruoyi/web/ReviewStandardController.java
View file @
8a856380
...
@@ -7,20 +7,19 @@ import com.ruoyi.common.core.domain.R;
...
@@ -7,20 +7,19 @@ import com.ruoyi.common.core.domain.R;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.domain.ReviewStandard
;
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.*
;
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.ReviewStandardListResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
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.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
...
@@ -72,4 +71,12 @@ public class ReviewStandardController extends BaseController {
...
@@ -72,4 +71,12 @@ public class ReviewStandardController extends BaseController {
List
<
ReviewStandardTestInspectionContentResponse
>
response
=
reviewStandardService
.
selectTestInspectionContent
(
request
.
getId
());
List
<
ReviewStandardTestInspectionContentResponse
>
response
=
reviewStandardService
.
selectTestInspectionContent
(
request
.
getId
());
return
R
.
ok
(
response
);
return
R
.
ok
(
response
);
}
}
@ApiOperation
(
"查询标注要求列表"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findReviewStandardList"
)
public
TableDataInfo
<
ReviewStandardListResponse
>
findReviewStandardList
(
@Validated
@RequestBody
ReviewStandardListRequest
request
)
{
return
getDataTable
(
reviewStandardService
.
findReviewStandardList
(
request
));
}
}
}
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
8a856380
...
@@ -58,7 +58,7 @@ public class TaskController extends BaseController {
...
@@ -58,7 +58,7 @@ public class TaskController extends BaseController {
@Log
(
title
=
"总任务"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"总任务"
,
businessType
=
BusinessType
.
INSERT
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
public
R
<
String
>
createTask
(
@Validated
@RequestBody
TaskCreateRequest
request
)
{
public
R
<
String
>
createTask
(
@Validated
@RequestBody
TaskCreateRequest
request
)
{
taskService
.
createTask
(
request
,
getUserId
()
);
taskService
.
createTask
(
request
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/KeyPointFindListRequest.java
0 → 100644
View file @
8a856380
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
@ApiModel
(
value
=
"KeyPointFindListRequest"
,
description
=
"查询审查要点"
)
@Data
public
class
KeyPointFindListRequest
{
@ApiModelProperty
(
"审查要点"
)
private
String
text
;
@ApiModelProperty
(
"总标准ID"
)
@NotNull
(
message
=
"总标准ID不能为空"
)
private
Long
standardId
;
@ApiModelProperty
(
"标准类型[system、car、test]"
)
@NotNull
(
message
=
"标准类型不能为空"
)
@NotEmpty
(
message
=
"标准类型不能为空"
)
private
String
type
;
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewStandardListRequest.java
0 → 100644
View file @
8a856380
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@ApiModel
(
value
=
"ReviewStandardListRequest"
,
description
=
"查询标准要求"
)
@Data
public
class
ReviewStandardListRequest
{
@ApiModelProperty
(
"章节"
)
private
String
chapter
;
@ApiModelProperty
(
"要求"
)
private
String
text
;
@ApiModelProperty
(
"分类要求[system、car、test]"
)
private
String
type
;
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewStandardListResponse.java
0 → 100644
View file @
8a856380
package
com
.
ruoyi
.
web
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"ReviewStandardListResponse"
,
description
=
"查询标准要求"
)
public
class
ReviewStandardListResponse
{
@ApiModelProperty
(
"ID"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@ApiModelProperty
(
"章节"
)
private
String
chapter
;
@ApiModelProperty
(
"文本内容"
)
private
String
text
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
8a856380
...
@@ -27,6 +27,9 @@ public class TaskFindResponse {
...
@@ -27,6 +27,9 @@ public class TaskFindResponse {
@ApiModelProperty
(
"标准名称(检验依据)"
)
@ApiModelProperty
(
"标准名称(检验依据)"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
@ApiModelProperty
(
"任务编号"
)
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
private
String
taskNo
;
...
...
quality-review/src/main/resources/mapper/AutomobileEnterpriseMapper.xml
View file @
8a856380
...
@@ -33,9 +33,25 @@
...
@@ -33,9 +33,25 @@
from t_automobile_enterprise
from t_automobile_enterprise
</sql>
</sql>
<sql
id=
"selectAutomobileEnterpriseListSQL"
>
select ae.id,
ae.enterprise_name,
ae.address,
ae.postcode,
ae.enterprise_contact,
ae.contact_number,
su.nick_name create_by,
ae.create_time,
ae.update_by,
ae.update_time,
ae.deleted
from t_automobile_enterprise ae
left join sys_user su on ae.create_by = su.user_id
</sql>
<select
id=
"selectAutomobileEnterpriseList"
parameterType=
"com.ruoyi.domain.AutomobileEnterprise"
<select
id=
"selectAutomobileEnterpriseList"
parameterType=
"com.ruoyi.domain.AutomobileEnterprise"
resultMap=
"AutomobileEnterpriseResult"
>
resultMap=
"AutomobileEnterpriseResult"
>
<include
refid=
"selectAutomobileEnterprise
Vo
"
/>
<include
refid=
"selectAutomobileEnterprise
ListSQL
"
/>
<where>
<where>
deleted = 0
deleted = 0
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and enterprise_name like concat('%',
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and enterprise_name like concat('%',
...
...
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
8a856380
...
@@ -25,6 +25,12 @@
...
@@ -25,6 +25,12 @@
</resultMap>
</resultMap>
<resultMap
id=
"StandardListResultMap"
type=
"com.ruoyi.web.response.ReviewStandardListResponse"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"chapter"
column=
"chapter"
jdbcType=
"VARCHAR"
/>
<result
property=
"text"
column=
"text"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"findTree"
resultMap=
"StandardTreeResultMap"
>
<select
id=
"findTree"
resultMap=
"StandardTreeResultMap"
>
SELECT id, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard;
SELECT id, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard;
</select>
</select>
...
@@ -62,6 +68,18 @@
...
@@ -62,6 +68,18 @@
WHERE
WHERE
usecase.review_standard_id = #{id}
usecase.review_standard_id = #{id}
</select>
</select>
<select
id=
"findReviewStandardList"
resultType=
"com.ruoyi.web.response.ReviewStandardListResponse"
>
SELECT id,chapter,text FROM t_review_standard
<where>
type = #{type}
<if
test=
"chapter != null and chapter != ''"
>
and chapter like concat('%', #{chapter}, '%')
</if>
<if
test=
"text != null and text != ''"
>
and text like concat('%', #{text}, '%')
</if>
</where>
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
8a856380
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStatus"
column=
"review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStatus"
column=
"review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"carReviewStatus"
column=
"car_review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"carReviewStatus"
column=
"car_review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"BIGINT"
/>
</resultMap>
</resultMap>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.TaskListRequest"
resultMap=
"BaseResultMap"
>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.TaskListRequest"
resultMap=
"BaseResultMap"
>
...
@@ -87,6 +88,7 @@
...
@@ -87,6 +88,7 @@
t.leader_id,t.leader,
t.leader_id,t.leader,
t.task_begin_time,
t.task_begin_time,
t.product_model,
t.product_model,
t.standard_no,
srt.task_begin_time system_task_begin_time,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
srt.task_status review_status,
...
@@ -167,6 +169,7 @@
...
@@ -167,6 +169,7 @@
t.leader_id,t.leader,
t.leader_id,t.leader,
t.task_begin_time,
t.task_begin_time,
t.task_end_time,
t.task_end_time,
t.standard_no,
srt.task_begin_time system_task_begin_time,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
srt.task_status review_status,
...
...
ruoyi-admin/src/main/resources/logback.xml
View file @
8a856380
...
@@ -89,16 +89,16 @@
...
@@ -89,16 +89,16 @@
</appender>
</appender>
<!-- 系统模块日志级别控制 -->
<!-- 系统模块日志级别控制 -->
<logger
name=
"com.ruoyi"
level=
"
debug
"
/>
<logger
name=
"com.ruoyi"
level=
"
INFO
"
/>
<!-- Spring日志级别控制 -->
<!-- Spring日志级别控制 -->
<logger
name=
"org.springframework"
level=
"warn"
/>
<logger
name=
"org.springframework"
level=
"warn"
/>
<root
level=
"
debug
"
>
<root
level=
"
INFO
"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
</root>
</root>
<!--系统操作日志-->
<!--系统操作日志-->
<root
level=
"
debug
"
>
<root
level=
"
INFO
"
>
<appender-ref
ref=
"file_info"
/>
<appender-ref
ref=
"file_info"
/>
<appender-ref
ref=
"file_error"
/>
<appender-ref
ref=
"file_error"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
</root>
</root>
<!--系统用户操作日志-->
<!--系统用户操作日志-->
<logger
name=
"sys-user"
level=
"
debug
"
>
<logger
name=
"sys-user"
level=
"
INFO
"
>
<appender-ref
ref=
"sys-user"
/>
<appender-ref
ref=
"sys-user"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
</logger>
</logger>
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
View file @
8a856380
...
@@ -26,6 +26,9 @@ public class MybatisPlusConfig
...
@@ -26,6 +26,9 @@ public class MybatisPlusConfig
interceptor
.
addInnerInterceptor
(
optimisticLockerInnerInterceptor
());
interceptor
.
addInnerInterceptor
(
optimisticLockerInnerInterceptor
());
// 阻断插件
// 阻断插件
interceptor
.
addInnerInterceptor
(
blockAttackInnerInterceptor
());
interceptor
.
addInnerInterceptor
(
blockAttackInnerInterceptor
());
// %转意
interceptor
.
addInnerInterceptor
(
percentEscapeInterceptor
());
return
interceptor
;
return
interceptor
;
}
}
...
@@ -57,4 +60,14 @@ public class MybatisPlusConfig
...
@@ -57,4 +60,14 @@ public class MybatisPlusConfig
{
{
return
new
BlockAttackInnerInterceptor
();
return
new
BlockAttackInnerInterceptor
();
}
}
/**
* %转意
* @return
*/
public
PercentEscapeInterceptor
percentEscapeInterceptor
()
{
return
new
PercentEscapeInterceptor
();
}
}
}
\ No newline at end of file
ruoyi-framework/src/main/java/com/ruoyi/framework/config/PercentEscapeInterceptor.java
0 → 100644
View file @
8a856380
package
com
.
ruoyi
.
framework
.
config
;
import
com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.apache.ibatis.executor.Executor
;
import
org.apache.ibatis.mapping.BoundSql
;
import
org.apache.ibatis.mapping.MappedStatement
;
import
org.apache.ibatis.reflection.MetaObject
;
import
org.apache.ibatis.session.ResultHandler
;
import
org.apache.ibatis.session.RowBounds
;
import
java.sql.SQLException
;
import
java.util.HashSet
;
import
java.util.Set
;
public
class
PercentEscapeInterceptor
implements
InnerInterceptor
{
@Override
public
void
beforeQuery
(
Executor
executor
,
MappedStatement
ms
,
Object
parameter
,
RowBounds
rowBounds
,
ResultHandler
resultHandler
,
BoundSql
boundSql
)
throws
SQLException
{
String
sql
=
boundSql
.
getSql
().
toLowerCase
();
// 判断是否包含 参数 及 like 查询
if
(!
sql
.
contains
(
" like "
)
||
!
sql
.
contains
(
"?"
))
{
return
;
}
// 获取关键字的个数(去重),获取 到 like 查询 的 key
String
[]
strList
=
sql
.
split
(
"\\?"
);
Set
<
String
>
keyNames
=
new
HashSet
<>();
for
(
int
i
=
0
;
i
<
strList
.
length
;
i
++)
{
if
(
strList
[
i
].
toLowerCase
().
contains
(
" like "
))
{
String
keyName
=
boundSql
.
getParameterMappings
().
get
(
i
).
getProperty
();
keyNames
.
add
(
keyName
);
}
}
MetaObject
metaObject
=
ms
.
getConfiguration
().
newMetaObject
(
parameter
);
for
(
String
keyName
:
keyNames
)
{
Object
value
=
metaObject
.
getValue
(
keyName
);
if
(
value
instanceof
String
)
{
if
(
isconvert
((
String
)
value
))
{
metaObject
.
setValue
(
keyName
,
convert
((
String
)
value
));
}
}
}
}
private
String
convert
(
String
before
)
{
if
(
StringUtils
.
isNotBlank
(
before
))
{
before
=
before
.
replaceAll
(
"\\\\"
,
""
);
before
=
before
.
replaceAll
(
"_"
,
"\\\\_"
);
before
=
before
.
replaceAll
(
"%"
,
"\\\\%"
);
}
return
before
;
}
private
boolean
isconvert
(
String
str
)
{
return
str
.
contains
(
"\\"
)
||
str
.
contains
(
"_"
)
||
str
.
contains
(
"%"
);
}
}
\ No newline at end of file
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