Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽研标准应用数据库
car-database-api
Commits
d46b8c12
Commit
d46b8c12
authored
Aug 30, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查记录
parent
1208e99e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
12 deletions
+94
-12
TTestPlanRecord.java
...eview/src/main/java/com/ruoyi/domain/TTestPlanRecord.java
+12
-8
TTestPlanRecordMapper.java
...src/main/java/com/ruoyi/mapper/TTestPlanRecordMapper.java
+5
-1
TTestPlanRecordService.java
...c/main/java/com/ruoyi/service/TTestPlanRecordService.java
+5
-0
TTestPlanRecordServiceImpl.java
...va/com/ruoyi/service/impl/TTestPlanRecordServiceImpl.java
+7
-1
TestPlanRecordController.java
...src/main/java/com/ruoyi/web/TestPlanRecordController.java
+15
-1
TestPlanRecordPageRequest.java
...java/com/ruoyi/web/request/TestPlanRecordPageRequest.java
+41
-0
TTestPlanRecordMapper.xml
...eview/src/main/resources/mapper/TTestPlanRecordMapper.xml
+9
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/TTestPlanRecord.java
View file @
d46b8c12
package
com
.
ruoyi
.
domain
;
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
/**
/**
*
*
* @TableName t_test_plan_record
* @TableName t_test_plan_record
*/
*/
@TableName
(
value
=
"t_test_plan_record"
)
@TableName
(
value
=
"t_test_plan_record"
)
@Data
@Data
public
class
TTestPlanRecord
extends
BaseEntity
{
public
class
TTestPlanRecord
{
/**
/**
* 主键
* 主键
*/
*/
...
@@ -35,6 +33,7 @@ public class TTestPlanRecord extends BaseEntity {
...
@@ -35,6 +33,7 @@ public class TTestPlanRecord extends BaseEntity {
* 被检车企名称
* 被检车企名称
*/
*/
@ApiModelProperty
(
"被检车企名称"
)
@ApiModelProperty
(
"被检车企名称"
)
@TableField
(
exist
=
false
)
private
String
inspectCarCompanyName
;
private
String
inspectCarCompanyName
;
/**
/**
...
@@ -47,7 +46,7 @@ public class TTestPlanRecord extends BaseEntity {
...
@@ -47,7 +46,7 @@ public class TTestPlanRecord extends BaseEntity {
/**
/**
* 文件路径
* 文件路径
*/
*/
@ApiModelProperty
(
"
车辆型号
"
)
@ApiModelProperty
(
"
文件路径
"
)
private
String
fileUrl
;
private
String
fileUrl
;
/**
/**
...
@@ -67,6 +66,7 @@ public class TTestPlanRecord extends BaseEntity {
...
@@ -67,6 +66,7 @@ public class TTestPlanRecord extends BaseEntity {
* 检测机构名称
* 检测机构名称
*/
*/
@ApiModelProperty
(
"检测机构名称"
)
@ApiModelProperty
(
"检测机构名称"
)
@TableField
(
exist
=
false
)
private
String
testOrganizationName
;
private
String
testOrganizationName
;
/**
/**
...
@@ -91,9 +91,13 @@ public class TTestPlanRecord extends BaseEntity {
...
@@ -91,9 +91,13 @@ public class TTestPlanRecord extends BaseEntity {
* 标准名称
* 标准名称
*/
*/
@ApiModelProperty
(
"标准名称"
)
@ApiModelProperty
(
"标准名称"
)
@TableField
(
exist
=
false
)
private
String
inspectionStandardName
;
private
String
inspectionStandardName
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
quality-review/src/main/java/com/ruoyi/mapper/TTestPlanRecordMapper.java
View file @
d46b8c12
...
@@ -2,9 +2,11 @@ package com.ruoyi.mapper;
...
@@ -2,9 +2,11 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.TTestPlanRecord
;
import
com.ruoyi.domain.TTestPlanRecord
;
import
com.ruoyi.web.request.TestPlanRecord
GetInfo
Request
;
import
com.ruoyi.web.request.TestPlanRecord
Page
Request
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* @author W_YI
* @author W_YI
* @description 针对表【t_test_plan_record】的数据库操作Mapper
* @description 针对表【t_test_plan_record】的数据库操作Mapper
...
@@ -18,6 +20,8 @@ public interface TTestPlanRecordMapper extends BaseMapper<TTestPlanRecord> {
...
@@ -18,6 +20,8 @@ public interface TTestPlanRecordMapper extends BaseMapper<TTestPlanRecord> {
public
TTestPlanRecord
selectTestPlanRecordDetails
(
Long
id
);
public
TTestPlanRecord
selectTestPlanRecordDetails
(
Long
id
);
public
List
<
TTestPlanRecord
>
selectTestPlanRecordPage
(
TestPlanRecordPageRequest
testPlanRecordPageRequest
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/TTestPlanRecordService.java
View file @
d46b8c12
...
@@ -3,6 +3,9 @@ package com.ruoyi.service;
...
@@ -3,6 +3,9 @@ package com.ruoyi.service;
import
com.ruoyi.domain.TTestPlanRecord
;
import
com.ruoyi.domain.TTestPlanRecord
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.TestPlanRecordGetInfoRequest
;
import
com.ruoyi.web.request.TestPlanRecordGetInfoRequest
;
import
com.ruoyi.web.request.TestPlanRecordPageRequest
;
import
java.util.List
;
/**
/**
* @author W_YI
* @author W_YI
...
@@ -15,4 +18,6 @@ public interface TTestPlanRecordService extends IService<TTestPlanRecord> {
...
@@ -15,4 +18,6 @@ public interface TTestPlanRecordService extends IService<TTestPlanRecord> {
public
TTestPlanRecord
selectTestPlanRecordDetails
(
Long
id
);
public
TTestPlanRecord
selectTestPlanRecordDetails
(
Long
id
);
public
List
<
TTestPlanRecord
>
selectTestPlanRecordPage
(
TestPlanRecordPageRequest
testPlanRecordPageRequest
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TTestPlanRecordServiceImpl.java
View file @
d46b8c12
...
@@ -6,10 +6,12 @@ import com.ruoyi.domain.TTestPlanRecord;
...
@@ -6,10 +6,12 @@ import com.ruoyi.domain.TTestPlanRecord;
import
com.ruoyi.service.TTestPlanRecordService
;
import
com.ruoyi.service.TTestPlanRecordService
;
import
com.ruoyi.mapper.TTestPlanRecordMapper
;
import
com.ruoyi.mapper.TTestPlanRecordMapper
;
import
com.ruoyi.web.request.TestPlanRecordGetInfoRequest
;
import
com.ruoyi.web.request.TestPlanRecordGetInfoRequest
;
import
com.ruoyi.web.request.TestPlanRecordPageRequest
;
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
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @author W_YI
* @author W_YI
...
@@ -27,7 +29,7 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
...
@@ -27,7 +29,7 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
public
int
insertTestPlanRecord
(
TTestPlanRecord
tTestPlanRecord
){
public
int
insertTestPlanRecord
(
TTestPlanRecord
tTestPlanRecord
){
tTestPlanRecord
.
setInspectCarCompanyId
(
SecurityUtils
.
getDeptId
());
tTestPlanRecord
.
setInspectCarCompanyId
(
SecurityUtils
.
getDeptId
());
tTestPlanRecord
.
setCreateTime
(
new
Date
());
tTestPlanRecord
.
setCreateTime
(
new
Date
());
return
tTestPlanRecordMapper
.
insert
TestPlanRecord
(
tTestPlanRecord
);
return
tTestPlanRecordMapper
.
insert
(
tTestPlanRecord
);
}
}
@Override
@Override
...
@@ -35,6 +37,10 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
...
@@ -35,6 +37,10 @@ public class TTestPlanRecordServiceImpl extends ServiceImpl<TTestPlanRecordMappe
return
tTestPlanRecordMapper
.
selectTestPlanRecordDetails
(
id
);
return
tTestPlanRecordMapper
.
selectTestPlanRecordDetails
(
id
);
}
}
@Override
public
List
<
TTestPlanRecord
>
selectTestPlanRecordPage
(
TestPlanRecordPageRequest
testPlanRecordPageRequest
){
return
tTestPlanRecordMapper
.
selectTestPlanRecordPage
(
testPlanRecordPageRequest
);
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/TestPlanRecordController.java
View file @
d46b8c12
...
@@ -3,6 +3,7 @@ package com.ruoyi.web;
...
@@ -3,6 +3,7 @@ package com.ruoyi.web;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.domain.TTestPlanRecord
;
import
com.ruoyi.domain.TTestPlanRecord
;
...
@@ -10,6 +11,7 @@ import com.ruoyi.service.TTestPlanRecordService;
...
@@ -10,6 +11,7 @@ import com.ruoyi.service.TTestPlanRecordService;
import
com.ruoyi.service.impl.ReviewStandardServiceImpl
;
import
com.ruoyi.service.impl.ReviewStandardServiceImpl
;
import
com.ruoyi.web.request.PlanDetailStandardRequest
;
import
com.ruoyi.web.request.PlanDetailStandardRequest
;
import
com.ruoyi.web.request.TestPlanRecordGetInfoRequest
;
import
com.ruoyi.web.request.TestPlanRecordGetInfoRequest
;
import
com.ruoyi.web.request.TestPlanRecordPageRequest
;
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.Tag
;
...
@@ -21,13 +23,15 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -21,13 +23,15 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.core.controller.BaseController
;
import
java.util.List
;
import
java.util.List
;
@Api
(
tags
=
"检测方案记录"
)
@Api
(
tags
=
"检测方案记录"
)
@RestController
@RestController
@RequestMapping
(
"/Plan/Record"
)
@RequestMapping
(
"/Plan/Record"
)
public
class
TestPlanRecordController
{
public
class
TestPlanRecordController
extends
BaseController
{
@Autowired
@Autowired
private
TTestPlanRecordService
tTestPlanRecordService
;
private
TTestPlanRecordService
tTestPlanRecordService
;
...
@@ -61,4 +65,14 @@ public class TestPlanRecordController {
...
@@ -61,4 +65,14 @@ public class TestPlanRecordController {
List
<
ReviewStandard
>
tree
=
reviewStandardService
.
findTree
(
planDetailStandardRequest
.
getInspectionStandardId
(),
planDetailStandardRequest
.
getType
());
List
<
ReviewStandard
>
tree
=
reviewStandardService
.
findTree
(
planDetailStandardRequest
.
getInspectionStandardId
(),
planDetailStandardRequest
.
getType
());
return
R
.
ok
(
tree
);
return
R
.
ok
(
tree
);
}
}
@ApiOperation
(
"查询检验记录"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/page"
)
public
TableDataInfo
<
TTestPlanRecord
>
selectTestPlanRecordPage
(
@Validated
@RequestBody
TestPlanRecordPageRequest
testPlanRecordPageRequest
){
startPage
(
testPlanRecordPageRequest
);
List
<
TTestPlanRecord
>
list
=
tTestPlanRecordService
.
selectTestPlanRecordPage
(
testPlanRecordPageRequest
);
return
getDataTable
(
list
);
}
}
}
quality-review/src/main/java/com/ruoyi/web/request/TestPlanRecordPageRequest.java
0 → 100644
View file @
d46b8c12
package
com
.
ruoyi
.
web
.
request
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author GaoYing
*/
@Data
@ApiModel
public
class
TestPlanRecordPageRequest
extends
PageDomain
{
/**
* 主键
*/
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
id
;
/**
* 车辆型号
*/
@ApiModelProperty
(
"车辆型号"
)
private
String
carModel
;
/**
* 被检车企ID
*/
@ApiModelProperty
(
"被检车企ID"
)
private
Long
inspectCarCompanyId
;
/**
* 文件路径
*/
@ApiModelProperty
(
"文件路径"
)
private
String
fileUrl
;
}
quality-review/src/main/resources/mapper/TTestPlanRecordMapper.xml
View file @
d46b8c12
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
insert into t_test_plan_record
insert into t_test_plan_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"carModel != null"
>
car_model,
</if>
<if
test=
"carModel != null"
>
car_model,
</if>
<if
test=
"fileUrl != null"
>
file
U
rl,
</if>
<if
test=
"fileUrl != null"
>
file
_u
rl,
</if>
<if
test=
"testResult != null"
>
test_result,
</if>
<if
test=
"testResult != null"
>
test_result,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"testOrganizationId != null"
>
test_organization_id,
</if>
<if
test=
"testOrganizationId != null"
>
test_organization_id,
</if>
...
@@ -60,4 +60,12 @@
...
@@ -60,4 +60,12 @@
<include
refid=
"selectTestPlanRecordVo"
/>
<include
refid=
"selectTestPlanRecordVo"
/>
where sm.id = #{id}
where sm.id = #{id}
</select>
</select>
<select
id=
"selectTestPlanRecordPage"
parameterType=
"com.ruoyi.web.request.TestPlanRecordPageRequest"
resultMap=
"BaseResultMap"
>
<include
refid=
"selectTestPlanRecordVo"
/>
<where>
<if
test=
"carModel != null and carModel != ''"
>
and pr.car_model like concat('%', #{carModel}, '%')
</if>
<if
test=
"inspectCarCompanyId != null and inspectCarCompanyId != ''"
>
and pr.inspectCarCompanyId= #{inspectCarCompanyId}
</if>
</where>
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment