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
9f8adfff
Commit
9f8adfff
authored
May 10, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看标准详情&编辑标准
parent
625c2463
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
196 additions
and
11 deletions
+196
-11
StandardInspectionItemRelation.java
...java/com/ruoyi/domain/StandardInspectionItemRelation.java
+34
-0
DictDataVO.java
...-review/src/main/java/com/ruoyi/domain/vo/DictDataVO.java
+9
-0
StandardInspectionItemRelationMapper.java
...om/ruoyi/mapper/StandardInspectionItemRelationMapper.java
+21
-0
StandardInspectionItemRelationService.java
.../ruoyi/service/StandardInspectionItemRelationService.java
+9
-0
StandardService.java
...view/src/main/java/com/ruoyi/service/StandardService.java
+2
-1
StandardInspectionItemRelationServiceImpl.java
...rvice/impl/StandardInspectionItemRelationServiceImpl.java
+16
-0
StandardServiceImpl.java
...main/java/com/ruoyi/service/impl/StandardServiceImpl.java
+31
-2
StandardController.java
...eview/src/main/java/com/ruoyi/web/StandardController.java
+4
-5
StandardEditRequest.java
.../main/java/com/ruoyi/web/request/StandardEditRequest.java
+3
-3
StandardResponse.java
...rc/main/java/com/ruoyi/web/response/StandardResponse.java
+45
-0
StandardInspectionItemRelationMapper.xml
...resources/mapper/StandardInspectionItemRelationMapper.xml
+22
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/StandardInspectionItemRelation.java
0 → 100644
View file @
9f8adfff
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@ApiModel
(
value
=
"StandardInspectionItemRelation"
,
description
=
"标准-检验项关系"
)
@TableName
(
value
=
"t_standard_inspection_item_relation"
,
autoResultMap
=
true
)
@Accessors
(
chain
=
true
)
@Data
public
class
StandardInspectionItemRelation
{
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
/**
* 标准id
*/
@ApiModelProperty
(
"标准id"
)
private
Long
standardId
;
/**
* 检验项id
*/
@ApiModelProperty
(
"检验项id"
)
private
Long
dictCode
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/DictDataVO.java
0 → 100644
View file @
9f8adfff
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.Data
;
@Data
public
class
DictDataVO
{
private
Long
dictCode
;
}
quality-review/src/main/java/com/ruoyi/mapper/StandardInspectionItemRelationMapper.java
0 → 100644
View file @
9f8adfff
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.StandardInspectionItemRelation
;
import
com.ruoyi.domain.vo.DictDataVO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
StandardInspectionItemRelationMapper
extends
BaseMapper
<
StandardInspectionItemRelation
>
{
List
<
DictDataVO
>
getListByStandardId
(
Long
standardId
);
/**
* 根据标准id获取列表
* @param standardId
* @return
*/
List
<
StandardInspectionItemRelation
>
getListByStandard
(
Long
standardId
);
}
quality-review/src/main/java/com/ruoyi/service/StandardInspectionItemRelationService.java
0 → 100644
View file @
9f8adfff
package
com
.
ruoyi
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.StandardInspectionItemRelation
;
public
interface
StandardInspectionItemRelationService
extends
IService
<
StandardInspectionItemRelation
>
{
}
quality-review/src/main/java/com/ruoyi/service/StandardService.java
View file @
9f8adfff
...
...
@@ -5,6 +5,7 @@ import com.ruoyi.domain.Standard;
import
com.ruoyi.web.request.StandardEditRequest
;
import
com.ruoyi.web.request.StandardGetInfoRequest
;
import
com.ruoyi.web.request.StandardListRequest
;
import
com.ruoyi.web.response.StandardResponse
;
import
java.util.List
;
...
...
@@ -21,5 +22,5 @@ public interface StandardService extends IService<Standard> {
void
editStandard
(
StandardEditRequest
request
);
Standard
getInfo
(
StandardGetInfoRequest
request
);
Standard
Response
getInfo
(
StandardGetInfoRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/StandardInspectionItemRelationServiceImpl.java
0 → 100644
View file @
9f8adfff
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.StandardInspectionItemRelation
;
import
com.ruoyi.mapper.StandardInspectionItemRelationMapper
;
import
com.ruoyi.service.StandardInspectionItemRelationService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
public
class
StandardInspectionItemRelationServiceImpl
extends
ServiceImpl
<
StandardInspectionItemRelationMapper
,
StandardInspectionItemRelation
>
implements
StandardInspectionItemRelationService
{
}
quality-review/src/main/java/com/ruoyi/service/impl/StandardServiceImpl.java
View file @
9f8adfff
...
...
@@ -3,13 +3,18 @@ package com.ruoyi.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.Standard
;
import
com.ruoyi.domain.StandardInspectionItemRelation
;
import
com.ruoyi.domain.vo.DictDataVO
;
import
com.ruoyi.mapper.StandardInspectionItemRelationMapper
;
import
com.ruoyi.mapper.StandardMapper
;
import
com.ruoyi.service.StandardInspectionItemRelationService
;
import
com.ruoyi.service.StandardService
;
import
com.ruoyi.web.request.StandardEditRequest
;
import
com.ruoyi.web.request.StandardGetInfoRequest
;
import
com.ruoyi.web.request.StandardListRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.web.response.StandardResponse
;
import
java.util.List
;
...
...
@@ -22,6 +27,12 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
@Autowired
private
StandardService
standardService
;
@Autowired
private
StandardInspectionItemRelationMapper
standardInspectionItemRelationMapper
;
@Autowired
private
StandardInspectionItemRelationService
standardInspectionItemRelationService
;
/**
* 分页查询
* @param
...
...
@@ -47,11 +58,29 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
Standard
standard
=
new
Standard
();
BeanUtils
.
copyBeanProp
(
standard
,
request
);
List
<
StandardInspectionItemRelation
>
list
=
standardInspectionItemRelationMapper
.
getListByStandard
(
request
.
getId
());
if
(
list
!=
null
&&
list
.
size
()
!=
0
)
{
standardInspectionItemRelationMapper
.
deleteBatchIds
(
list
);
}
List
<
StandardInspectionItemRelation
>
relations
=
request
.
getDictList
();
if
(
relations
!=
null
&&
relations
.
size
()
!=
0
)
{
standardInspectionItemRelationService
.
saveBatch
(
relations
);
}
standardService
.
updateById
(
standard
);
}
@Override
public
Standard
getInfo
(
StandardGetInfoRequest
request
)
{
return
standardMapper
.
selectById
(
request
.
getId
());
public
StandardResponse
getInfo
(
StandardGetInfoRequest
request
)
{
StandardResponse
response
=
new
StandardResponse
();
Standard
standard
=
standardMapper
.
selectById
(
request
.
getId
());
List
<
DictDataVO
>
list
=
standardInspectionItemRelationMapper
.
getListByStandardId
(
request
.
getId
());
BeanUtils
.
copyBeanProp
(
response
,
standard
);
response
.
setDictList
(
list
);
return
response
;
}
}
quality-review/src/main/java/com/ruoyi/web/StandardController.java
View file @
9f8adfff
...
...
@@ -9,8 +9,7 @@ import com.ruoyi.common.enums.BusinessType;
import
com.ruoyi.domain.Standard
;
import
com.ruoyi.service.StandardService
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.ReviewSceneChangeTaskResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
com.ruoyi.web.response.StandardResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
...
...
@@ -58,9 +57,9 @@ public class StandardController extends BaseController {
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getById"
)
public
R
<
Standard
>
getInfo
(
@Validated
@RequestBody
StandardGetInfoRequest
request
)
{
public
R
<
Standard
Response
>
getInfo
(
@Validated
@RequestBody
StandardGetInfoRequest
request
)
{
Standard
standard
=
standardService
.
getInfo
(
request
);
return
R
.
ok
(
standard
);
Standard
Response
response
=
standardService
.
getInfo
(
request
);
return
R
.
ok
(
response
);
}
}
quality-review/src/main/java/com/ruoyi/web/request/StandardEditRequest.java
View file @
9f8adfff
package
com
.
ruoyi
.
web
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.
common.core.page.PageDomai
n
;
import
com.ruoyi.
domain.StandardInspectionItemRelatio
n
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -38,6 +38,6 @@ public class StandardEditRequest {
@ApiModelProperty
(
"实施日期"
)
private
Date
implementationDate
;
@ApiModelProperty
(
"
实施日期
"
)
List
<
Long
>
dictList
;
@ApiModelProperty
(
"
检验项id
"
)
List
<
StandardInspectionItemRelation
>
dictList
;
}
quality-review/src/main/java/com/ruoyi/web/response/StandardResponse.java
0 → 100644
View file @
9f8adfff
package
com
.
ruoyi
.
web
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.domain.vo.DictDataVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@ApiModel
(
value
=
"StandardResponse"
,
description
=
"标准库详情"
)
@Data
public
class
StandardResponse
{
@ApiModelProperty
(
"主键"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@ApiModelProperty
(
"标准名称"
)
private
String
name
;
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
@ApiModelProperty
(
"文件路径"
)
private
String
file
;
@ApiModelProperty
(
"标准分类"
)
private
String
standardType
;
@ApiModelProperty
(
"标准状态"
)
private
String
standardStatus
;
@ApiModelProperty
(
"发布日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
releaseDate
;
@ApiModelProperty
(
"实施日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
implementationDate
;
@ApiModelProperty
(
"检验项"
)
private
List
<
DictDataVO
>
dictList
;
}
quality-review/src/main/resources/mapper/StandardInspectionItemRelationMapper.xml
0 → 100644
View file @
9f8adfff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.StandardInspectionItemRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.StandardInspectionItemRelation"
>
<result
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"standardId"
column=
"standard_id"
jdbcType=
"BIGINT"
/>
<result
property=
"dictCode"
column=
"dict_code"
jdbcType=
"BIGINT"
/>
</resultMap>
<select
id=
"getListByStandardId"
resultType=
"com.ruoyi.domain.vo.DictDataVO"
>
SELECT dict_code FROM t_standard_inspection_item_relation
WHERE standard_id = #{standardId}
</select>
<select
id=
"getListByStandard"
resultType=
"com.ruoyi.domain.StandardInspectionItemRelation"
>
SELECT id, standard_id, dict_code FROM t_standard_inspection_item_relation
WHERE standard_id = #{standardId}
</select>
</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