Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
55aa5f11
Commit
55aa5f11
authored
Oct 19, 2022
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加预案信息相关接口
parent
2bbe46f8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
177 additions
and
92 deletions
+177
-92
ContingencyInstanceInfoController.java
...usiness/controller/ContingencyInstanceInfoController.java
+70
-0
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+17
-42
ContingencyInstanceInfoServiceImpl.java
...ness/service/impl/ContingencyInstanceInfoServiceImpl.java
+57
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+2
-38
ContingencyInstanceInfoService.java
...usiness/service/intfc/ContingencyInstanceInfoService.java
+17
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+2
-10
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+12
-2
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyInstanceInfoController.java
0 → 100644
View file @
55aa5f11
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.ContingencyInstanceInfoService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
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
;
@RestController
@RequestMapping
(
value
=
"/plan/record"
)
@Api
(
tags
=
"应急预案执行记录实例"
)
public
class
ContingencyInstanceInfoController
extends
BaseController
{
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Permission
@ApiOperation
(
value
=
"应急预案执行记录信息"
,
notes
=
"应急预案执行记录信息"
)
@GetMapping
(
value
=
"/selectDisposalDetails"
)
public
ResponseModel
selectDisposalDetails
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
return
CommonResponseUtil
.
successNew
(
contingencyInstanceInfoService
.
selectDisposalDetails
(
batchNo
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询应急预案执行记录信息"
,
notes
=
"分页查询应急预案执行记录信息"
)
@GetMapping
(
value
=
"/selectDisposalListPage"
)
public
ResponseModel
selectDisposalListPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil2
.
success
(
contingencyInstanceInfoService
.
selectDisposalListPage
(
current
,
size
,
orgCode
));
}
@Permission
@ApiOperation
(
value
=
"新增应急预案执行记录"
,
notes
=
"新增应急预案执行记录"
)
@PostMapping
(
value
=
"/addDisposalDetails"
)
public
ResponseModel
addDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
contingencyInstanceInfo
.
setOrgCode
(
orgCode
);
return
CommonResponseUtil
.
successNew
(
contingencyInstanceInfoService
.
addDisposalDetails
(
contingencyInstanceInfo
));
}
@Permission
@ApiOperation
(
value
=
"修改应急预案执行记录信息"
,
notes
=
"修改应急预案执行记录信息"
)
@PostMapping
(
value
=
"/updateDisposalDetails"
)
public
ResponseModel
updateDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
CommonResponseUtil
.
successNew
(
contingencyInstanceInfoService
.
updateDisposalDetails
(
contingencyInstanceInfo
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
55aa5f11
...
...
@@ -201,45 +201,6 @@ public class PlanVisual3dController extends BaseController {
}
@Permission
@ApiOperation
(
value
=
"处置详情信息"
,
notes
=
"处置详情信息"
)
@GetMapping
(
value
=
"/plan/selectDisposalDetails"
)
public
ResponseModel
selectDisposalDetails
(
@RequestParam
(
"disposalId"
)
String
disposalId
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
selectDisposalDetails
(
disposalId
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询处置详情信息"
,
notes
=
"分页查询处置详情信息"
)
@GetMapping
(
value
=
"/plan/selectDisposalListPage"
)
public
ResponseModel
selectDisposalListPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalListPage
(
current
,
size
,
orgCode
));
}
@Permission
@ApiOperation
(
value
=
"新增处置信息"
,
notes
=
"新增处置信息"
)
@PostMapping
(
value
=
"/plan/addDisposalDetails"
)
public
ResponseModel
addDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
contingencyInstanceInfo
.
setOrgCode
(
orgCode
);
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
addDisposalDetails
(
contingencyInstanceInfo
));
}
@Permission
@ApiOperation
(
value
=
"修改处置信息"
,
notes
=
"修改处置信息"
)
@PostMapping
(
value
=
"/plan/updateDisposalDetails"
)
public
ResponseModel
updateDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateDisposalDetails
(
contingencyInstanceInfo
));
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的消息等记录"
,
notes
=
"根据批次号获取预案的消息等记录"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordByNew"
)
public
ResponseModel
getPlaneRecordByNew
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
size
,
@RequestParam
(
required
=
false
)
String
batchNo
)
{
...
...
@@ -265,8 +226,8 @@ public class PlanVisual3dController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询处置详情信息"
,
notes
=
"分页查询处置详情信息"
)
@GetMapping
(
value
=
"/plan/selectDisposalActionPage"
)
public
ResponseModel
selectDisposalActionPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"
disposalId"
)
String
disposalId
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"
batchNo"
)
String
batchNo
,
@RequestParam
(
value
=
"dataType"
)
int
dataType
)
{
if
(
current
<
1
||
size
<
1
)
{
...
...
@@ -278,6 +239,20 @@ public class PlanVisual3dController extends BaseController {
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalActionPage
(
current
,
size
,
disposalId
,
roleModelList
,
dataType
));
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalActionPage
(
current
,
size
,
batchNo
,
roleModelList
,
dataType
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询处置详情信息"
,
notes
=
"分页查询处置详情信息"
)
@GetMapping
(
value
=
"/plan/selectDisposalActionList"
)
public
ResponseModel
selectDisposalActionList
(
@RequestParam
(
value
=
"batchNo"
)
String
batchNo
,
@RequestParam
(
value
=
"dataType"
)
int
dataType
)
{
AgencyUserModel
user
=
getUserInfo
();
List
<
RoleModel
>
roleModelList
=
new
ArrayList
<>();
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalActionList
(
batchNo
,
roleModelList
,
dataType
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceInfoServiceImpl.java
0 → 100644
View file @
55aa5f11
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.dao.mapper.ContingencyInstanceInfoMapper
;
import
com.yeejoin.amos.fas.business.service.intfc.ContingencyInstanceInfoService
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"contingencyInstanceInfoService"
)
public
class
ContingencyInstanceInfoServiceImpl
implements
ContingencyInstanceInfoService
{
@Autowired
private
ContingencyInstanceInfoMapper
contingencyInstanceInfoMapper
;
@Override
public
ContingencyInstanceInfo
selectDisposalDetails
(
String
disposalId
)
{
return
contingencyInstanceInfoMapper
.
selectDisposalDetails
(
disposalId
);
}
@Override
public
Page
<
ContingencyInstanceInfo
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
)
{
Page
<
ContingencyInstanceInfo
>
page
=
new
Page
<>(
current
,
size
);
int
total
=
contingencyInstanceInfoMapper
.
selectCount
(
orgCode
);
page
.
setTotal
(
total
);
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
if
(
total
==
0
)
{
page
.
setCurrent
(
1
);
}
else
{
if
(
total
<
start
)
{
page
.
setCurrent
(
1
);
start
=
0
;
}
List
<
ContingencyInstanceInfo
>
infoList
=
contingencyInstanceInfoMapper
.
selectDisposalListPage
((
int
)
start
,
size
,
orgCode
);
page
.
setRecords
(
infoList
);
}
return
page
;
}
@Override
public
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
contingencyInstanceInfo
.
setIsDelete
(
false
);
contingencyInstanceInfo
.
setCreateDate
(
DateUtil
.
getDateNow
());
return
contingencyInstanceInfoMapper
.
addDisposalDetails
(
contingencyInstanceInfo
);
}
@Override
public
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
contingencyInstanceInfoMapper
.
updateDisposalDetails
(
contingencyInstanceInfo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
55aa5f11
...
...
@@ -373,42 +373,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
@Override
public
ContingencyInstanceInfo
selectDisposalDetails
(
String
disposalId
)
{
return
contingencyInstanceInfoMapper
.
selectDisposalDetails
(
disposalId
);
}
@Override
public
Page
<
ContingencyInstanceInfo
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
)
{
Page
<
ContingencyInstanceInfo
>
page
=
new
Page
<>(
current
,
size
);
int
total
=
contingencyInstanceInfoMapper
.
selectCount
(
orgCode
);
page
.
setTotal
(
total
);
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
if
(
total
==
0
)
{
page
.
setCurrent
(
1
);
}
else
{
if
(
total
<
start
)
{
page
.
setCurrent
(
1
);
start
=
0
;
}
List
<
ContingencyInstanceInfo
>
infoList
=
contingencyInstanceInfoMapper
.
selectDisposalListPage
((
int
)
start
,
size
,
orgCode
);
page
.
setRecords
(
infoList
);
}
return
page
;
}
@Override
public
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
contingencyInstanceInfo
.
setIsDelete
(
false
);
contingencyInstanceInfo
.
setCreateDate
(
DateUtil
.
getDateNow
());
return
contingencyInstanceInfoMapper
.
addDisposalDetails
(
contingencyInstanceInfo
);
}
@Override
public
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
contingencyInstanceInfoMapper
.
updateDisposalDetails
(
contingencyInstanceInfo
);
}
@Override
public
Page
<
ContingencyPlanInstance
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
)
{
Integer
planInstanceCount
=
contingencyPlanInstanceMapper
.
getPlanInstanceCount
(
batchNo
);
// 根据批次号获取预案记录
...
...
@@ -509,7 +473,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
@Override
public
List
<
ContingencyPlanInstance
>
selectDisposalActionList
(
String
disposalId
,
List
<
RoleModel
>
roleModelList
,
int
dataType
)
{
public
List
<
ContingencyPlanInstance
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
)
{
List
<
String
>
roles
=
new
ArrayList
<>();
String
type
=
"OPERATE"
;
String
status
=
""
;
...
...
@@ -525,7 +489,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
roles
.
add
(
roleModel
.
getRoleName
());
}
}
return
contingencyInstanceInfoMapper
.
selectDisposalActionList
(
type
,
status
,
roles
,
disposalId
);
return
contingencyInstanceInfoMapper
.
selectDisposalActionList
(
type
,
status
,
roles
,
batchNo
);
}
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/ContingencyInstanceInfoService.java
0 → 100644
View file @
55aa5f11
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
public
interface
ContingencyInstanceInfoService
{
ContingencyInstanceInfo
selectDisposalDetails
(
String
batchNo
);
Page
<
ContingencyInstanceInfo
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
);
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
55aa5f11
...
...
@@ -83,15 +83,7 @@ public interface IPlanVisual3dService {
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
ContingencyInstanceInfo
selectDisposalDetails
(
String
disposalId
);
Page
<
ContingencyInstanceInfo
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
);
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Page
<
ContingencyPlanInstance
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
disposalId
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyPlanInstance
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
/**
* 根据批次号获取预案的消息等记录
...
...
@@ -102,7 +94,7 @@ public interface IPlanVisual3dService {
void
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
);
List
<
ContingencyPlanInstance
>
selectDisposalActionList
(
String
disposalId
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstance
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
/**
* 极光推送
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
55aa5f11
...
...
@@ -35,7 +35,11 @@
where is_delete = 0 and org_code = #{orgCode}
</select>
<select
id=
"selectDisposalActionPage"
resultType=
"com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance"
>
select * from contingency_plan_instance
select `id`, `record_type`, `category`, `content`, `icon`, `sort`, `sequence_num`
, `batch_no`, `create_date`, `create_user`, `update_date`
, `update_user`, `is_delete`, `tips`, IFNULL(`runstate`, 0) AS runstate, `file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, `start_user_id`, `person_img` from contingency_plan_instance
<where>
<if
test=
"batchNo != null and batchNo != ''"
>
batch_no = #{batchNo}
...
...
@@ -77,7 +81,13 @@
</select>
<select
id=
"selectDisposalActionList"
resultType=
"com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance"
>
select * from contingency_plan_instance
select `id`, `record_type`, `category`, `content`, `icon`, `sort`, `sequence_num`
, `batch_no`, `create_date`, `create_user`, `update_date`
, `update_user`, `is_delete`, `tips`, IFNULL(`runstate`, 0) AS runstate, `file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, `start_user_id`, `person_img`
from contingency_plan_instance
<where>
<if
test=
"batchNo != null and batchNo != ''"
>
batch_no = #{batchNo}
...
...
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