Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
1ba5bc1f
提交
1ba5bc1f
authored
1月 23, 2024
作者:
刘明祎-运维用途
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
00d378c2
c5ba6285
流水线
#8114
已通过 于阶段
in 2 分 29 秒
变更
8
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
25 行增加
和
5 行删除
+25
-5
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
IndustryTypeController.java
...mmc/pms/controller/inspection/IndustryTypeController.java
+2
-2
IndustryTypeDao.java
...main/java/com/mmc/pms/dao/inspection/IndustryTypeDao.java
+7
-0
IndustryTypeDO.java
...in/java/com/mmc/pms/entity/inspection/IndustryTypeDO.java
+4
-0
IndustryTypeDTO.java
...ava/com/mmc/pms/model/inspection/dto/IndustryTypeDTO.java
+2
-0
IndustryTypeService.java
...a/com/mmc/pms/service/inspection/IndustryTypeService.java
+1
-1
IndustryTypeServiceImpl.java
.../pms/service/inspection/impl/IndustryTypeServiceImpl.java
+5
-1
IndustryTypeDao.xml
src/main/resources/mapper/inspection/IndustryTypeDao.xml
+3
-0
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
1ba5bc1f
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag
:
5046aa4b5db1f77c123165dfc3ea7bb0adabe47d
newTag
:
a9bfdfcaf347c83aca6b0d3adba953e1913aaec0
src/main/java/com/mmc/pms/controller/inspection/IndustryTypeController.java
浏览文件 @
1ba5bc1f
...
...
@@ -65,8 +65,8 @@ public class IndustryTypeController {
@ApiOperation
(
value
=
"一级行业详情-全部"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
IndustryTypeDTO
.
class
)})
@GetMapping
(
"getIndustryTypeById"
)
public
IndustryTypeDTO
getIndustryTypeById
(
@RequestParam
Integer
id
)
{
return
industryTypeService
.
getIndustryTypeById
(
id
);
public
IndustryTypeDTO
getIndustryTypeById
(
@RequestParam
Integer
id
,
@RequestParam
Integer
inspectionId
)
{
return
industryTypeService
.
getIndustryTypeById
(
id
,
inspectionId
);
}
@ApiOperation
(
value
=
"一级行业列表-全部"
)
...
...
src/main/java/com/mmc/pms/dao/inspection/IndustryTypeDao.java
浏览文件 @
1ba5bc1f
...
...
@@ -30,4 +30,11 @@ public interface IndustryTypeDao {
List
<
InspectionDO
>
listInspectionsByIndustryTypeIdId
(
Integer
industryTypeId
);
IndustryTypeDO
getIndustryTypeById
(
Integer
id
);
/**
* 获取二级分类的服务名称
* @param inspectionId 二级服务的id
* @return {@link String}
*/
String
getInspectionNameById
(
Integer
inspectionId
);
}
src/main/java/com/mmc/pms/entity/inspection/IndustryTypeDO.java
浏览文件 @
1ba5bc1f
...
...
@@ -2,6 +2,7 @@ package com.mmc.pms.entity.inspection;
import
com.mmc.pms.model.inspection.dto.IndustryTypeDTO
;
import
com.mmc.pms.model.inspection.vo.IndustryTypeVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -46,6 +47,8 @@ public class IndustryTypeDO implements Serializable {
* 服务列表
*/
private
List
<
InspectionDO
>
inspectionDOS
;
@ApiModelProperty
(
value
=
"二级服务分类名称"
)
private
String
inspectionName
;
public
IndustryTypeDO
(
IndustryTypeVO
industryTypeVO
)
{
this
.
id
=
industryTypeVO
.
getId
();
...
...
@@ -60,6 +63,7 @@ public class IndustryTypeDO implements Serializable {
.
description
(
this
.
description
).
saleState
(
this
.
saleState
).
createTime
(
this
.
createTime
)
.
inspectionDTOS
(
CollectionUtils
.
isNotEmpty
(
this
.
inspectionDOS
)
?
this
.
inspectionDOS
.
stream
().
map
(
InspectionDO:
:
buildInspectionDTO
).
collect
(
Collectors
.
toList
())
:
null
)
.
inspectionName
(
this
.
inspectionName
)
.
build
();
}
...
...
src/main/java/com/mmc/pms/model/inspection/dto/IndustryTypeDTO.java
浏览文件 @
1ba5bc1f
...
...
@@ -34,4 +34,6 @@ public class IndustryTypeDTO implements Serializable {
private
Date
createTime
;
@ApiModelProperty
(
value
=
"服务列表"
)
private
List
<
InspectionDTO
>
inspectionDTOS
;
@ApiModelProperty
(
value
=
"二级服务分类名称"
)
private
String
inspectionName
;
}
src/main/java/com/mmc/pms/service/inspection/IndustryTypeService.java
浏览文件 @
1ba5bc1f
...
...
@@ -22,7 +22,7 @@ public interface IndustryTypeService {
ResultBody
<
IndustryTypeDTO
>
listInspectionsByIndustryTypeId
(
Integer
id
);
IndustryTypeDTO
getIndustryTypeById
(
Integer
id
);
IndustryTypeDTO
getIndustryTypeById
(
Integer
id
,
Integer
inspectionId
);
List
<
IndustryTypeDTO
>
listIndustry
();
}
src/main/java/com/mmc/pms/service/inspection/impl/IndustryTypeServiceImpl.java
浏览文件 @
1ba5bc1f
...
...
@@ -14,6 +14,7 @@ import com.mmc.pms.service.inspection.IndustryTypeService;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -23,6 +24,7 @@ import java.util.stream.Collectors;
* @Date: 2023/8/3 18:01
*/
@Service
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
IndustryTypeServiceImpl
implements
IndustryTypeService
{
@Autowired
private
IndustryTypeDao
industryTypeDao
;
...
...
@@ -84,8 +86,10 @@ public class IndustryTypeServiceImpl implements IndustryTypeService {
}
@Override
public
IndustryTypeDTO
getIndustryTypeById
(
Integer
id
)
{
public
IndustryTypeDTO
getIndustryTypeById
(
Integer
id
,
Integer
inspectionId
)
{
IndustryTypeDO
industryTypeDO
=
industryTypeDao
.
getIndustryTypeById
(
id
);
String
inspectionNameById
=
industryTypeDao
.
getInspectionNameById
(
inspectionId
);
industryTypeDO
.
setInspectionName
(
inspectionNameById
);
return
industryTypeDO
.
buildIndustryTypeDTO
();
}
...
...
src/main/resources/mapper/inspection/IndustryTypeDao.xml
浏览文件 @
1ba5bc1f
...
...
@@ -119,4 +119,7 @@
from industry_type it
where it.id = #{id}
</select>
<select
id=
"getInspectionNameById"
resultType=
"java.lang.String"
>
select inspection_name from inspection where id = #{inspectionId}
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论