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
0554cfc7
Commit
0554cfc7
authored
Apr 10, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改任务节点查询逻辑
parent
b76f1ad8
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
15 deletions
+56
-15
EmergencyTaskController.java
...amos/fas/business/controller/EmergencyTaskController.java
+10
-1
PlanClassifyTreeController.java
...s/fas/business/controller/PlanClassifyTreeController.java
+4
-0
EmergencyTaskMapper.java
...oin/amos/fas/business/dao/mapper/EmergencyTaskMapper.java
+4
-4
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+5
-1
EmergencyTaskServiceImpl.java
...s/fas/business/service/impl/EmergencyTaskServiceImpl.java
+11
-6
PlanClassifyTreeServiceImpl.java
...as/business/service/impl/PlanClassifyTreeServiceImpl.java
+5
-0
IEmergencyTaskService.java
...mos/fas/business/service/intfc/IEmergencyTaskService.java
+2
-2
IPlanClassifyTreeService.java
.../fas/business/service/intfc/IPlanClassifyTreeService.java
+2
-0
dbTemplate_emergency_task.xml
...rc/main/resources/db/mapper/dbTemplate_emergency_task.xml
+13
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EmergencyTaskController.java
View file @
0554cfc7
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.feign.JcsFeign;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.feign.JcsFeign;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.vo.EmergencyRelationVo
;
import
com.yeejoin.amos.fas.business.vo.EmergencyRelationVo
;
import
com.yeejoin.amos.fas.common.enums.PlanTypeEnum
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
...
@@ -19,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -19,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -42,6 +44,9 @@ public class EmergencyTaskController extends BaseController{
...
@@ -42,6 +44,9 @@ public class EmergencyTaskController extends BaseController{
@Autowired
@Autowired
private
IDictService
dictService
;
private
IDictService
dictService
;
@Autowired
private
RedisTemplate
redisTemplate
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"岗位人员树"
,
notes
=
"岗位人员树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"岗位人员树"
,
notes
=
"岗位人员树"
)
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
tree
(){
public
CommonResponse
tree
(){
...
@@ -90,7 +95,11 @@ public class EmergencyTaskController extends BaseController{
...
@@ -90,7 +95,11 @@ public class EmergencyTaskController extends BaseController{
obligationId
=
null
;
obligationId
=
null
;
}
}
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
Page
<
EmergencyTaskContent
>
list
=
iEmergencyTaskService
.
list
(
obligationId
,
commonPageable
);
String
planType
=
null
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
Page
<
EmergencyTaskContent
>
list
=
iEmergencyTaskService
.
list
(
obligationId
,
planType
,
commonPageable
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanClassifyTreeController.java
View file @
0554cfc7
...
@@ -30,6 +30,10 @@ public class PlanClassifyTreeController extends BaseController {
...
@@ -30,6 +30,10 @@ public class PlanClassifyTreeController extends BaseController {
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
model
.
setOrgCode
(
compCode
);
model
.
setOrgCode
(
compCode
);
model
.
setCreator
(
user
.
getUserId
());
model
.
setCreator
(
user
.
getUserId
());
if
(!
"0"
.
equalsIgnoreCase
(
String
.
valueOf
(
model
.
getParentId
())))
{
String
planType
=
planClassifyTreeService
.
findById
(
model
.
getParentId
()).
getPlanType
();
model
.
setPlanType
(
planType
);
}
return
CommonResponseUtil2
.
success
(
planClassifyTreeService
.
create
(
model
));
return
CommonResponseUtil2
.
success
(
planClassifyTreeService
.
create
(
model
));
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EmergencyTaskMapper.java
View file @
0554cfc7
...
@@ -9,8 +9,8 @@ import org.apache.ibatis.annotations.Param;
...
@@ -9,8 +9,8 @@ import org.apache.ibatis.annotations.Param;
import
java.util.List
;
import
java.util.List
;
public
interface
EmergencyTaskMapper
extends
BaseMapper
{
public
interface
EmergencyTaskMapper
extends
BaseMapper
{
List
<
EmergencyTaskContent
>
getEmergencyTaskList
(
Long
obligationId
,
Long
offset
,
int
pageSiz
e
);
List
<
EmergencyTaskContent
>
getEmergencyTaskList
(
@Param
(
"obligationId"
)
Long
obligationId
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"pageSize"
)
int
pageSize
,
@Param
(
"planType"
)
String
planTyp
e
);
int
getEmergencyTaskCount
(
Long
obligationId
);
int
getEmergencyTaskCount
(
@Param
(
"obligationId"
)
Long
obligationId
,
@Param
(
"planType"
)
String
planType
);
List
<
EmergencyRelationTree
>
treeList
();
List
<
EmergencyRelationTree
>
treeList
();
...
@@ -24,8 +24,8 @@ public interface EmergencyTaskMapper extends BaseMapper {
...
@@ -24,8 +24,8 @@ public interface EmergencyTaskMapper extends BaseMapper {
List
<
String
>
roleNames
(
String
amosOrgId
);
List
<
String
>
roleNames
(
String
amosOrgId
);
List
<
EmergencyTaskContentVo
>
getContentList
(
@Param
(
"stepCode"
)
String
stepCode
);
List
<
EmergencyTaskContentVo
>
getContentList
(
@Param
(
"stepCode"
)
String
stepCode
,
@Param
(
"planType"
)
String
planType
);
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
@Param
(
"stepCode"
)
String
stepCode
);
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
@Param
(
"stepCode"
)
String
stepCode
,
@Param
(
"planType"
)
String
planType
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
0554cfc7
...
@@ -468,7 +468,11 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -468,7 +468,11 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
instance
.
setContent
(
instance
.
getCategory
());
instance
.
setContent
(
instance
.
getCategory
());
ContingencyPlanInstance
res
=
repository
.
save
(
instance
);
ContingencyPlanInstance
res
=
repository
.
save
(
instance
);
if
(!
ObjectUtils
.
isEmpty
(
res
))
{
if
(!
ObjectUtils
.
isEmpty
(
res
))
{
List
<
EmergencyTaskContentVo
>
mustTasks
=
emergencyTaskService
.
getMustTaskList
(
stepCode
);
String
planType
=
null
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
List
<
EmergencyTaskContentVo
>
mustTasks
=
emergencyTaskService
.
getMustTaskList
(
stepCode
,
planType
);
boolean
flag
=
judgeIfConfirmed
(
mustTasks
,
batchNo
);
boolean
flag
=
judgeIfConfirmed
(
mustTasks
,
batchNo
);
if
(!
"-1"
.
equals
(
stepCode
)
&&
flag
)
{
if
(!
"-1"
.
equals
(
stepCode
)
&&
flag
)
{
PlanExecuteVo
vo
=
new
PlanExecuteVo
();
PlanExecuteVo
vo
=
new
PlanExecuteVo
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EmergencyTaskServiceImpl.java
View file @
0554cfc7
...
@@ -74,9 +74,9 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
...
@@ -74,9 +74,9 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
private
String
stationName
;
private
String
stationName
;
@Override
@Override
public
Page
<
EmergencyTaskContent
>
list
(
Long
obligationId
,
CommonPageable
pageable
)
{
public
Page
<
EmergencyTaskContent
>
list
(
Long
obligationId
,
String
planType
,
CommonPageable
pageable
)
{
int
total
=
emergencyTaskMapper
.
getEmergencyTaskCount
(
obligationId
);
int
total
=
emergencyTaskMapper
.
getEmergencyTaskCount
(
obligationId
,
planType
);
List
<
EmergencyTaskContent
>
emergencyTaskList
=
emergencyTaskMapper
.
getEmergencyTaskList
(
obligationId
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
List
<
EmergencyTaskContent
>
emergencyTaskList
=
emergencyTaskMapper
.
getEmergencyTaskList
(
obligationId
,
pageable
.
getOffset
(),
pageable
.
getPageSize
()
,
planType
);
Page
<
EmergencyTaskContent
>
result
=
new
PageImpl
<>(
emergencyTaskList
,
pageable
,
total
);
Page
<
EmergencyTaskContent
>
result
=
new
PageImpl
<>(
emergencyTaskList
,
pageable
,
total
);
return
result
;
return
result
;
...
@@ -84,6 +84,7 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
...
@@ -84,6 +84,7 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
@Override
@Override
public
List
<
EmergencyRelationTree
>
treeList
()
{
public
List
<
EmergencyRelationTree
>
treeList
()
{
return
emergencyTaskMapper
.
treeList
();
return
emergencyTaskMapper
.
treeList
();
}
}
...
@@ -120,7 +121,11 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
...
@@ -120,7 +121,11 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
@Transactional
@Transactional
@Override
@Override
public
void
saveTask
(
String
stepCode
,
String
batchId
)
{
public
void
saveTask
(
String
stepCode
,
String
batchId
)
{
List
<
EmergencyTaskContentVo
>
list
=
emergencyTaskMapper
.
getContentList
(
stepCode
);
String
planType
=
null
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
List
<
EmergencyTaskContentVo
>
list
=
emergencyTaskMapper
.
getContentList
(
stepCode
,
planType
);
if
(
0
<
list
.
size
())
{
if
(
0
<
list
.
size
())
{
String
batchNo
=
StringUtil
.
isNotEmpty
(
batchId
)
?
batchId
:
planOperationRecordMapper
.
getLastBatchNo
();
String
batchNo
=
StringUtil
.
isNotEmpty
(
batchId
)
?
batchId
:
planOperationRecordMapper
.
getLastBatchNo
();
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
...
@@ -194,7 +199,7 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
...
@@ -194,7 +199,7 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
}
}
@Override
@Override
public
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
String
stepCode
)
{
public
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
String
stepCode
,
String
planType
)
{
return
emergencyTaskMapper
.
getMustTaskList
(
stepCode
);
return
emergencyTaskMapper
.
getMustTaskList
(
stepCode
,
planType
);
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanClassifyTreeServiceImpl.java
View file @
0554cfc7
...
@@ -137,6 +137,11 @@ public class PlanClassifyTreeServiceImpl implements IPlanClassifyTreeService {
...
@@ -137,6 +137,11 @@ public class PlanClassifyTreeServiceImpl implements IPlanClassifyTreeService {
return
planClassifyTreeDao
.
save
(
model
);
return
planClassifyTreeDao
.
save
(
model
);
}
}
@Override
public
PlanClassifyTree
findById
(
Long
id
)
{
return
planClassifyTreeDao
.
findById
(
id
).
orElse
(
new
PlanClassifyTree
());
}
private
boolean
classifyNameExist
(
String
classifyName
,
Long
parentId
)
{
private
boolean
classifyNameExist
(
String
classifyName
,
Long
parentId
)
{
return
0
<
planClassifyTreeDao
.
countByClassifyNameAndParentId
(
classifyName
,
parentId
);
return
0
<
planClassifyTreeDao
.
countByClassifyNameAndParentId
(
classifyName
,
parentId
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEmergencyTaskService.java
View file @
0554cfc7
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
public
interface
IEmergencyTaskService
{
public
interface
IEmergencyTaskService
{
Page
<
EmergencyTaskContent
>
list
(
Long
obligationId
,
CommonPageable
pageable
);
Page
<
EmergencyTaskContent
>
list
(
Long
obligationId
,
String
planType
,
CommonPageable
pageable
);
List
<
EmergencyRelationTree
>
treeList
();
List
<
EmergencyRelationTree
>
treeList
();
...
@@ -28,5 +28,5 @@ public interface IEmergencyTaskService {
...
@@ -28,5 +28,5 @@ public interface IEmergencyTaskService {
void
saveTask
(
String
stepCode
,
String
batchNo
);
void
saveTask
(
String
stepCode
,
String
batchNo
);
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
String
stepCode
);
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
String
stepCode
,
String
planType
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanClassifyTreeService.java
View file @
0554cfc7
...
@@ -28,4 +28,6 @@ public interface IPlanClassifyTreeService {
...
@@ -28,4 +28,6 @@ public interface IPlanClassifyTreeService {
PlanClassifyTree
create
(
PlanClassifyTree
model
);
PlanClassifyTree
create
(
PlanClassifyTree
model
);
PlanClassifyTree
update
(
PlanClassifyTree
model
);
PlanClassifyTree
update
(
PlanClassifyTree
model
);
PlanClassifyTree
findById
(
Long
id
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_emergency_task.xml
View file @
0554cfc7
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
<if
test=
"obligationId != null "
>
<if
test=
"obligationId != null "
>
obligation_id = #{obligationId}
obligation_id = #{obligationId}
</if>
</if>
<if
test=
"planType != null "
>
AND plan_type = #{planType}
</if>
</where>
</where>
LIMIT #{offset}, #{pageSize}
LIMIT #{offset}, #{pageSize}
...
@@ -31,8 +34,10 @@
...
@@ -31,8 +34,10 @@
<if
test=
"_parameter != null "
>
<if
test=
"_parameter != null "
>
obligation_id = #{obligationId}
obligation_id = #{obligationId}
</if>
</if>
<if
test=
"planType != null "
>
AND plan_type = #{planType}
</if>
</where>
</where>
</select>
</select>
...
@@ -115,6 +120,9 @@
...
@@ -115,6 +120,9 @@
<if
test=
"stepCode != null and stepCode != '' and stepCode == '-2'"
>
<if
test=
"stepCode != null and stepCode != '' and stepCode == '-2'"
>
step_code = -1
step_code = -1
</if>
</if>
<if
test=
"planType != null "
>
AND plan_type = #{planType}
</if>
</where>
</where>
</select>
</select>
...
@@ -128,6 +136,9 @@
...
@@ -128,6 +136,9 @@
<if
test=
"stepCode != null and stepCode != ''"
>
<if
test=
"stepCode != null and stepCode != ''"
>
and step_code = #{stepCode}
and step_code = #{stepCode}
</if>
</if>
<if
test=
"planType != null "
>
AND plan_type = #{planType}
</if>
</where>
</where>
</select>
</select>
</mapper>
</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