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
0862939b
Commit
0862939b
authored
Mar 18, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
子任务进度修改&查询标准表
parent
94b90764
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
13 deletions
+41
-13
StandardMapper.java
...review/src/main/java/com/ruoyi/mapper/StandardMapper.java
+1
-1
StandardService.java
...view/src/main/java/com/ruoyi/service/StandardService.java
+1
-1
StandardServiceImpl.java
...main/java/com/ruoyi/service/impl/StandardServiceImpl.java
+2
-2
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+28
-8
StandardController.java
...eview/src/main/java/com/ruoyi/web/StandardController.java
+1
-1
StandardListRequest.java
.../main/java/com/ruoyi/web/request/StandardListRequest.java
+3
-0
StandardMapper.xml
quality-review/src/main/resources/mapper/StandardMapper.xml
+5
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/StandardMapper.java
View file @
0862939b
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
public
interface
StandardMapper
extends
BaseMapper
<
Standard
>
{
public
interface
StandardMapper
extends
BaseMapper
<
Standard
>
{
// 分页查询
// 分页查询
List
<
Standard
>
findList
();
List
<
Standard
>
findList
(
StandardListRequest
request
);
// 根据id查询
// 根据id查询
Standard
findListById
(
@Param
(
"id"
)
Long
Id
);
Standard
findListById
(
@Param
(
"id"
)
Long
Id
);
...
...
quality-review/src/main/java/com/ruoyi/service/StandardService.java
View file @
0862939b
...
@@ -14,7 +14,7 @@ import java.util.List;
...
@@ -14,7 +14,7 @@ import java.util.List;
public
interface
StandardService
extends
IService
<
Standard
>
{
public
interface
StandardService
extends
IService
<
Standard
>
{
// 分页查询
// 分页查询
List
<
Standard
>
findList
();
List
<
Standard
>
findList
(
StandardListRequest
request
);
//根据id查询
//根据id查询
Standard
findListById
(
Long
id
);
Standard
findListById
(
Long
id
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StandardServiceImpl.java
View file @
0862939b
...
@@ -28,8 +28,8 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -28,8 +28,8 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
* @return
* @return
*/
*/
@Override
@Override
public
List
<
Standard
>
findList
()
{
public
List
<
Standard
>
findList
(
StandardListRequest
request
)
{
return
standardMapper
.
findList
();
return
standardMapper
.
findList
(
request
);
}
}
/**
/**
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
0862939b
...
@@ -177,12 +177,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -177,12 +177,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
,
userId
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
,
userId
);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
);
SystemReviewTask
systemReviewTask
=
systemReviewTaskMapper
.
selectById
(
response
.
getSystemReviewTaskId
());
response
.
setSystemReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
()
);
if
(
Objects
.
equals
(
systemReviewTask
.
getTaskStatus
(),
SystemReviewTask
.
STATUS_FINISH
))
{
response
.
setSystemReview
(
100.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
*
0.9
);
response
.
setSystemReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
}
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
))
*
100
);
CarReviewTask
carReviewTask
=
carReviewTaskMapper
.
selectById
(
response
.
getCarReviewTaskId
());
response
.
setCarReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
if
(
Objects
.
equals
(
carReviewTask
.
getTaskStatus
(),
CarReviewTask
.
TASK_STATUS_FINISH
))
{
response
.
setCarReview
(
100.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
))
*
100
*
0.9
);
response
.
setCarReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
}
}
}
return
responses
;
return
responses
;
...
@@ -259,12 +269,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -259,12 +269,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
);
SystemReviewTask
systemReviewTask
=
systemReviewTaskMapper
.
selectById
(
response
.
getSystemReviewTaskId
());
if
(
Objects
.
equals
(
systemReviewTask
.
getTaskStatus
(),
SystemReviewTask
.
STATUS_FINISH
))
{
response
.
setSystemReview
(
100.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
*
0.9
);
response
.
setSystemReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
response
.
setSystemReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
}
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
))
*
100
);
CarReviewTask
carReviewTask
=
carReviewTaskMapper
.
selectById
(
response
.
getCarReviewTaskId
());
response
.
setCarReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
if
(
Objects
.
equals
(
carReviewTask
.
getTaskStatus
(),
CarReviewTask
.
TASK_STATUS_FINISH
))
{
response
.
setCarReview
(
100.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
))
*
100
*
0.9
);
response
.
setCarReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
}
}
}
return
responses
;
return
responses
;
...
...
quality-review/src/main/java/com/ruoyi/web/StandardController.java
View file @
0862939b
...
@@ -41,7 +41,7 @@ public class StandardController extends BaseController {
...
@@ -41,7 +41,7 @@ public class StandardController extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findStandardList"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findStandardList"
)
public
TableDataInfo
<
Standard
>
findList
(
@Validated
@RequestBody
StandardListRequest
request
)
{
public
TableDataInfo
<
Standard
>
findList
(
@Validated
@RequestBody
StandardListRequest
request
)
{
startPage
(
request
);
startPage
(
request
);
return
getDataTable
(
standardService
.
findList
());
return
getDataTable
(
standardService
.
findList
(
request
));
}
}
@ApiOperation
(
"编辑标准库"
)
@ApiOperation
(
"编辑标准库"
)
...
...
quality-review/src/main/java/com/ruoyi/web/request/StandardListRequest.java
View file @
0862939b
...
@@ -8,4 +8,7 @@ import lombok.Data;
...
@@ -8,4 +8,7 @@ import lombok.Data;
@ApiModel
(
value
=
"StandardListRequest"
,
description
=
"查询标准"
)
@ApiModel
(
value
=
"StandardListRequest"
,
description
=
"查询标准"
)
@Data
@Data
public
class
StandardListRequest
extends
PageDomain
{
public
class
StandardListRequest
extends
PageDomain
{
@ApiModelProperty
(
"关键字"
)
private
String
keyWord
;
}
}
quality-review/src/main/resources/mapper/StandardMapper.xml
View file @
0862939b
...
@@ -18,6 +18,11 @@
...
@@ -18,6 +18,11 @@
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.StandardListRequest"
resultMap=
"BaseResultMap"
>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.StandardListRequest"
resultMap=
"BaseResultMap"
>
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date
FROM t_standard
FROM t_standard
<where>
<if
test=
"keyWord != null and keyWord != ''"
>
name like concat('%',#{keyWord},'%') OR standard_no like concat('%',#{keyWord},'%')
</if>
</where>
</select>
</select>
<select
id=
"findListById"
resultMap=
"BaseResultMap"
>
<select
id=
"findListById"
resultMap=
"BaseResultMap"
>
...
...
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