Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
10565fcb
提交
10565fcb
authored
8月 15, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加服务详情接口
上级
f4097232
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
37 行增加
和
3 行删除
+37
-3
InspectionController.java
...m/mmc/pms/controller/inspection/InspectionController.java
+8
-0
InspectionDao.java
src/main/java/com/mmc/pms/dao/inspection/InspectionDao.java
+2
-0
InspectionTagDao.java
...ain/java/com/mmc/pms/dao/inspection/InspectionTagDao.java
+1
-1
InspectionService.java
...ava/com/mmc/pms/service/inspection/InspectionService.java
+3
-0
InspectionServiceImpl.java
...mc/pms/service/inspection/impl/InspectionServiceImpl.java
+10
-0
InspectionTagServiceImpl.java
...pms/service/inspection/impl/InspectionTagServiceImpl.java
+2
-2
InspectionDao.xml
src/main/resources/mapper/inspection/InspectionDao.xml
+8
-0
InspectionTagDao.xml
src/main/resources/mapper/inspection/InspectionTagDao.xml
+3
-0
没有找到文件。
src/main/java/com/mmc/pms/controller/inspection/InspectionController.java
浏览文件 @
10565fcb
package
com
.
mmc
.
pms
.
controller
.
inspection
;
package
com
.
mmc
.
pms
.
controller
.
inspection
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.inspection.dto.InspectionDTO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.service.inspection.InspectionService
;
import
com.mmc.pms.service.inspection.InspectionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -41,4 +42,11 @@ public class InspectionController {
...
@@ -41,4 +42,11 @@ public class InspectionController {
public
ResultBody
remove
(
@RequestParam
Integer
id
){
public
ResultBody
remove
(
@RequestParam
Integer
id
){
return
inspectionService
.
remove
(
id
);
return
inspectionService
.
remove
(
id
);
}
}
@ApiOperation
(
value
=
"服务详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
InspectionDTO
.
class
)})
@GetMapping
(
"detail"
)
public
ResultBody
<
InspectionDTO
>
detail
(
@RequestParam
Integer
id
){
return
inspectionService
.
detail
(
id
);
}
}
}
src/main/java/com/mmc/pms/dao/inspection/InspectionDao.java
浏览文件 @
10565fcb
...
@@ -16,4 +16,6 @@ public interface InspectionDao {
...
@@ -16,4 +16,6 @@ public interface InspectionDao {
void
update
(
InspectionDO
inspectionDO
);
void
update
(
InspectionDO
inspectionDO
);
void
remove
(
Integer
id
);
void
remove
(
Integer
id
);
InspectionDO
getInspectionById
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/dao/inspection/InspectionTagDao.java
浏览文件 @
10565fcb
...
@@ -11,7 +11,7 @@ import java.util.List;
...
@@ -11,7 +11,7 @@ import java.util.List;
*/
*/
@Mapper
@Mapper
public
interface
InspectionTagDao
{
public
interface
InspectionTagDao
{
int
countSameName
(
String
tagName
);
int
countSameName
(
Integer
id
,
String
tagName
,
Integer
inspectionId
);
void
insert
(
InspectionTagDO
inspectionTagDO
);
void
insert
(
InspectionTagDO
inspectionTagDO
);
...
...
src/main/java/com/mmc/pms/service/inspection/InspectionService.java
浏览文件 @
10565fcb
package
com
.
mmc
.
pms
.
service
.
inspection
;
package
com
.
mmc
.
pms
.
service
.
inspection
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.inspection.dto.InspectionDTO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
/**
/**
...
@@ -13,4 +14,6 @@ public interface InspectionService {
...
@@ -13,4 +14,6 @@ public interface InspectionService {
ResultBody
update
(
InspectionVO
inspectionVO
);
ResultBody
update
(
InspectionVO
inspectionVO
);
ResultBody
remove
(
Integer
id
);
ResultBody
remove
(
Integer
id
);
ResultBody
<
InspectionDTO
>
detail
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/service/inspection/impl/InspectionServiceImpl.java
浏览文件 @
10565fcb
...
@@ -4,6 +4,7 @@ import com.mmc.pms.common.ResultBody;
...
@@ -4,6 +4,7 @@ import com.mmc.pms.common.ResultBody;
import
com.mmc.pms.common.ResultEnum
;
import
com.mmc.pms.common.ResultEnum
;
import
com.mmc.pms.dao.inspection.InspectionDao
;
import
com.mmc.pms.dao.inspection.InspectionDao
;
import
com.mmc.pms.entity.inspection.InspectionDO
;
import
com.mmc.pms.entity.inspection.InspectionDO
;
import
com.mmc.pms.model.inspection.dto.InspectionDTO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.service.inspection.InspectionService
;
import
com.mmc.pms.service.inspection.InspectionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -45,4 +46,13 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -45,4 +46,13 @@ public class InspectionServiceImpl implements InspectionService {
inspectionDao
.
remove
(
id
);
inspectionDao
.
remove
(
id
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
@Override
public
ResultBody
<
InspectionDTO
>
detail
(
Integer
id
)
{
InspectionDO
inspectionDO
=
inspectionDao
.
getInspectionById
(
id
);
if
(
inspectionDO
==
null
)
{
return
ResultBody
.
success
();
}
return
ResultBody
.
success
(
inspectionDO
.
buildInspectionDTO
());
}
}
}
src/main/java/com/mmc/pms/service/inspection/impl/InspectionTagServiceImpl.java
浏览文件 @
10565fcb
...
@@ -25,7 +25,7 @@ public class InspectionTagServiceImpl implements InspectionTagService {
...
@@ -25,7 +25,7 @@ public class InspectionTagServiceImpl implements InspectionTagService {
@Override
@Override
public
ResultBody
insert
(
InspectionTagVO
inspectionTagVO
)
{
public
ResultBody
insert
(
InspectionTagVO
inspectionTagVO
)
{
int
count
=
inspectionTagDao
.
countSameName
(
inspectionTagVO
.
get
TagName
());
int
count
=
inspectionTagDao
.
countSameName
(
inspectionTagVO
.
get
Id
(),
inspectionTagVO
.
getTagName
(),
inspectionTagVO
.
getInspectionId
());
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
NAME_DUPLICATION_ERROR
);
return
ResultBody
.
error
(
ResultEnum
.
NAME_DUPLICATION_ERROR
);
}
}
...
@@ -36,7 +36,7 @@ public class InspectionTagServiceImpl implements InspectionTagService {
...
@@ -36,7 +36,7 @@ public class InspectionTagServiceImpl implements InspectionTagService {
@Override
@Override
public
ResultBody
update
(
InspectionTagVO
inspectionTagVO
)
{
public
ResultBody
update
(
InspectionTagVO
inspectionTagVO
)
{
int
count
=
inspectionTagDao
.
countSameName
(
inspectionTagVO
.
get
TagName
());
int
count
=
inspectionTagDao
.
countSameName
(
inspectionTagVO
.
get
Id
(),
inspectionTagVO
.
getTagName
(),
inspectionTagVO
.
getInspectionId
());
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
NAME_DUPLICATION_ERROR
);
return
ResultBody
.
error
(
ResultEnum
.
NAME_DUPLICATION_ERROR
);
}
}
...
...
src/main/resources/mapper/inspection/InspectionDao.xml
浏览文件 @
10565fcb
...
@@ -52,4 +52,11 @@
...
@@ -52,4 +52,11 @@
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"getInspectionById"
resultType=
"com.mmc.pms.entity.inspection.InspectionDO"
>
select ins.id , ins.inspection_no, ins.inspection_name, ins.industry_type_id, ins.inspection_img,
ins.inspection_description, ins.sale_state as ins_sale_state, ins.case_img, ins.case_video, ins.create_time
from inspection ins
where ins.is_deleted = 0 and ins.id = #{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/inspection/InspectionTagDao.xml
浏览文件 @
10565fcb
...
@@ -22,6 +22,9 @@
...
@@ -22,6 +22,9 @@
<if
test=
"id != null"
>
<if
test=
"id != null"
>
and id != #{id}
and id != #{id}
</if>
</if>
<if
test=
"inspectionId != null"
>
and inspection_id = #{inspectionId}
</if>
</select>
</select>
<select
id=
"listByInspectionId"
resultType=
"com.mmc.pms.entity.inspection.InspectionTagDO"
>
<select
id=
"listByInspectionId"
resultType=
"com.mmc.pms.entity.inspection.InspectionTagDO"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论