Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
6a44ae04
Commit
6a44ae04
authored
Sep 23, 2021
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)新增更新巡检检查项接口
parent
8050892c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
6 deletions
+60
-6
LatentDangerController.java
...pervision/business/controller/LatentDangerController.java
+8
-6
CheckInputMapper.java
...mos/supervision/business/dao/mapper/CheckInputMapper.java
+3
-0
CheckInputDto.java
.../yeejoin/amos/supervision/business/dto/CheckInputDto.java
+20
-0
LatentDangerServiceImpl.java
...vision/business/service/impl/LatentDangerServiceImpl.java
+10
-0
ILatentDangerService.java
...ervision/business/service/intfc/ILatentDangerService.java
+8
-0
CheckInputMapper.xml
...rvision/src/main/resources/db/mapper/CheckInputMapper.xml
+11
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/LatentDangerController.java
View file @
6a44ae04
...
...
@@ -12,12 +12,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -307,4 +302,11 @@ public class LatentDangerController extends AbstractBaseController {
public
CommonResponse
getPatrolDangerInfo
(
@RequestBody
(
required
=
false
)
JSONObject
param
)
{
return
CommonResponseUtil
.
success
(
iLatentDangerService
.
getPatrolDangerInfo
(
param
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"修改巡检检查项"
,
notes
=
"修改巡检检查项"
)
@PutMapping
(
value
=
"/patrol/danger/check"
)
public
CommonResponse
getPatrolDangerCheck
(
@RequestBody
(
required
=
false
)
JSONObject
param
)
{
return
CommonResponseUtil
.
success
(
iLatentDangerService
.
getPatrolDangerCheck
(
param
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/CheckInputMapper.java
View file @
6a44ae04
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.supervision.business.dto.CheckInputDto
;
import
com.yeejoin.amos.supervision.business.dto.InputCheckDto
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -9,4 +10,6 @@ public interface CheckInputMapper extends BaseMapper {
InputCheckDto
getByCheckIdAndItemIdAndRoutePointItemId
(
@Param
(
value
=
"checkId"
)
Long
checkId
,
@Param
(
value
=
"itemId"
)
Long
itemId
,
@Param
(
value
=
"routePointItemId"
)
Long
routePointItemId
,
@Param
(
value
=
"checkInputId"
)
Long
checkInputId
);
void
updateCheckInput
(
@Param
(
value
=
"dto"
)
CheckInputDto
checkInputDto
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dto/CheckInputDto.java
0 → 100644
View file @
6a44ae04
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dto
;
import
lombok.Data
;
/**
* @Author: xl
* @Description:
* @Date: 2021/9/23 15:01
*/
@Data
public
class
CheckInputDto
{
private
Long
id
;
private
Integer
dangerHandleState
;
private
Integer
safetyDangerNum
;
private
Integer
majorDangerNum
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/LatentDangerServiceImpl.java
View file @
6a44ae04
...
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.supervision.business.dao.repository.ICheckDao;
import
com.yeejoin.amos.supervision.business.dao.repository.ICheckShotDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IInputItemDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointClassifyDao
;
import
com.yeejoin.amos.supervision.business.dto.CheckInputDto
;
import
com.yeejoin.amos.supervision.business.dto.DangerExecuteSubmitDto
;
import
com.yeejoin.amos.supervision.business.dto.InputCheckDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.DangerResultBo
;
...
...
@@ -1660,6 +1661,15 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
return
result
;
}
@Override
public
JSONObject
getPatrolDangerCheck
(
JSONObject
param
)
{
Long
checkInputId
=
param
.
getLong
(
"id"
);
Assert
.
notNull
(
checkInputId
,
"检查项ID不能为空"
);
CheckInputDto
checkInputDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
param
),
CheckInputDto
.
class
);
checkInputMapper
.
updateCheckInput
(
checkInputDto
);
return
null
;
}
private
Check
getCheck
(
Long
checkId
)
{
Assert
.
notNull
(
checkId
,
"巡检ID不能为空!"
);
Check
check
=
iCheckDao
.
getById
(
Long
.
valueOf
(
checkId
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/ILatentDangerService.java
View file @
6a44ae04
...
...
@@ -89,4 +89,12 @@ public interface ILatentDangerService {
* @return
*/
JSONObject
getPatrolDangerInfo
(
JSONObject
param
);
/**
* 根据参数修改巡检检查项
*
* @param param
* @return
*/
JSONObject
getPatrolDangerCheck
(
JSONObject
param
);
}
amos-boot-system-supervision/src/main/resources/db/mapper/CheckInputMapper.xml
View file @
6a44ae04
...
...
@@ -57,4 +57,14 @@
</where>
limit 1
</select>
<update
id=
"updateCheckInput"
parameterType=
"com.yeejoin.amos.supervision.business.dto.CheckInputDto"
>
update p_check_input
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"dto.dangerHandleState != null"
>
danger_handle_state = #{dto.dangerHandleState},
</if>
<if
test=
"dto.safetyDangerNum != null"
>
safety_danger_num = #{dto.safetyDangerNum},
</if>
<if
test=
"dto.majorDangerNum != null"
>
major_danger_num = #{dto.majorDangerNum},
</if>
</trim>
where id = #{dto.id}
</update>
</mapper>
\ No newline at end of file
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