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
2894ce0f
Commit
2894ce0f
authored
Oct 20, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
d11c4694
17e7cde4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
41 deletions
+76
-41
WorkflowExcuteServiceImpl.java
...ot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
+0
-0
FireStationController.java
...t/module/common/biz/controller/FireStationController.java
+11
-9
LatentDangerController.java
...entdanger/business/controller/LatentDangerController.java
+6
-0
LatentDangerListParam.java
...os/latentdanger/business/param/LatentDangerListParam.java
+2
-0
PageParam.java
...m/yeejoin/amos/latentdanger/business/param/PageParam.java
+14
-3
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+33
-24
IPlanDao.java
...in/amos/supervision/business/dao/repository/IPlanDao.java
+2
-2
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+4
-3
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+4
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
View file @
2894ce0f
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FireStationController.java
View file @
2894ce0f
...
@@ -3,25 +3,27 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
...
@@ -3,25 +3,27 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireStation
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireStationServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireStationServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -138,7 +140,7 @@ public class FireStationController extends BaseController {
...
@@ -138,7 +140,7 @@ public class FireStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"微型消防站列表全部数据查询"
,
notes
=
"微型消防站列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"微型消防站列表全部数据查询"
,
notes
=
"微型消防站列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
FireStationDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
FireStationDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
fireStationServiceImpl
.
queryForFireStationList
(
false
));
return
ResponseHelper
.
buildResponse
(
fireStationServiceImpl
.
queryForFireStationList
(
false
,
null
,
null
));
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/controller/LatentDangerController.java
View file @
2894ce0f
...
@@ -240,6 +240,8 @@ public class LatentDangerController extends BaseController {
...
@@ -240,6 +240,8 @@ public class LatentDangerController extends BaseController {
@PostMapping
(
value
=
"/page/list"
)
@PostMapping
(
value
=
"/page/list"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
listDanger
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@RequestBody
PageParam
pageParam
)
throws
Exception
{
public
ResponseModel
listDanger
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@RequestBody
PageParam
pageParam
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
pageParam
.
put
(
"orgCode"
,
reginParams
.
getCompany
().
getOrgCode
());
IPage
<
LatentDanger
>
result
=
iLatentDangerService
.
pageListDanger
(
pageParam
);
IPage
<
LatentDanger
>
result
=
iLatentDangerService
.
pageListDanger
(
pageParam
);
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
...
@@ -294,6 +296,8 @@ public class LatentDangerController extends BaseController {
...
@@ -294,6 +296,8 @@ public class LatentDangerController extends BaseController {
@PostMapping
(
value
=
"/list/all"
)
@PostMapping
(
value
=
"/list/all"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
List
<
LatentDanger
>>
listAllDanger
(
@RequestBody
LatentDangerListParam
searchParam
)
{
public
ResponseModel
<
List
<
LatentDanger
>>
listAllDanger
(
@RequestBody
LatentDangerListParam
searchParam
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
searchParam
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
return
ResponseHelper
.
buildResponse
(
iLatentDangerService
.
listAllDanger
(
searchParam
));
return
ResponseHelper
.
buildResponse
(
iLatentDangerService
.
listAllDanger
(
searchParam
));
}
}
...
@@ -336,6 +340,8 @@ public class LatentDangerController extends BaseController {
...
@@ -336,6 +340,8 @@ public class LatentDangerController extends BaseController {
@PostMapping
(
value
=
"/supervision/page/reviewList"
)
@PostMapping
(
value
=
"/supervision/page/reviewList"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
reviewListDanger
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@RequestBody
PageParam
pageParam
)
throws
Exception
{
public
ResponseModel
reviewListDanger
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@RequestBody
PageParam
pageParam
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
pageParam
.
put
(
"orgCode"
,
reginParams
.
getCompany
().
getOrgCode
());
IPage
<
LatentDanger
>
result
=
iLatentDangerService
.
reviewListDanger
(
pageParam
);
IPage
<
LatentDanger
>
result
=
iLatentDangerService
.
reviewListDanger
(
pageParam
);
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/param/LatentDangerListParam.java
View file @
2894ce0f
...
@@ -39,4 +39,6 @@ public class LatentDangerListParam extends CommonPageable {
...
@@ -39,4 +39,6 @@ public class LatentDangerListParam extends CommonPageable {
private
String
userId
;
private
String
userId
;
private
String
dangerIds
;
private
String
dangerIds
;
private
String
orgCode
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/param/PageParam.java
View file @
2894ce0f
...
@@ -106,11 +106,22 @@ public class PageParam<K, V> extends HashMap<K, V> implements Pageable {
...
@@ -106,11 +106,22 @@ public class PageParam<K, V> extends HashMap<K, V> implements Pageable {
return
false
;
return
false
;
}
}
public
int
getParamCurrent
()
{
public
int
getParam
Page
Current
()
{
if
(
!
ValidationUtil
.
isEmpty
(
this
.
get
(
"current"
)))
{
if
(
ValidationUtil
.
isEmpty
(
this
.
get
(
"current"
)))
{
return
current
;
return
current
;
}
}
if
(
this
.
get
(
"current"
)
instanceof
String
&&
this
.
get
(
"size"
)
instanceof
String
)
{
if
(
this
.
get
(
"current"
)
instanceof
String
)
{
return
Integer
.
parseInt
((
String
)
this
.
get
(
"current"
));
}
else
{
return
(
Integer
)(
this
.
get
(
"current"
));
}
}
public
int
getParamPageSize
()
{
if
(
ValidationUtil
.
isEmpty
(
this
.
get
(
"size"
)))
{
return
size
;
}
if
(
this
.
get
(
"size"
)
instanceof
String
)
{
return
Integer
.
parseInt
((
String
)
this
.
get
(
"current"
));
return
Integer
.
parseInt
((
String
)
this
.
get
(
"current"
));
}
else
{
}
else
{
return
(
Integer
)(
this
.
get
(
"current"
));
return
(
Integer
)(
this
.
get
(
"current"
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
2894ce0f
...
@@ -49,7 +49,20 @@ import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
...
@@ -49,7 +49,20 @@ import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailRiskVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailRiskVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerListVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerListVo
;
import
com.yeejoin.amos.latentdanger.common.enums.*
;
import
com.yeejoin.amos.latentdanger.common.enums.DangerHandleStateEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.DictTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.ExecuteStateEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.ExecuteTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerBizTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerExecuteTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerLevelEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerOvertimeStateEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerProcessStateEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerReformTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerState
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerStateEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.OwerEnum
;
import
com.yeejoin.amos.latentdanger.common.remote.RemoteSpcService
;
import
com.yeejoin.amos.latentdanger.common.remote.RemoteSpcService
;
import
com.yeejoin.amos.latentdanger.common.remote.RemoteWebSocketServer
;
import
com.yeejoin.amos.latentdanger.common.remote.RemoteWebSocketServer
;
import
com.yeejoin.amos.latentdanger.common.remote.RemoteWorkFlowService
;
import
com.yeejoin.amos.latentdanger.common.remote.RemoteWorkFlowService
;
...
@@ -81,9 +94,17 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -81,9 +94,17 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
com
.
yeejoin
.
amos
.
latentdanger
.
business
.
util
.
RandomUtil
.
buildOrderNo
;
import
static
com
.
yeejoin
.
amos
.
latentdanger
.
business
.
util
.
RandomUtil
.
buildOrderNo
;
import
static
org
.
typroject
.
tyboot
.
core
.
foundation
.
context
.
RequestContext
.
getProduct
;
import
static
org
.
typroject
.
tyboot
.
core
.
foundation
.
context
.
RequestContext
.
getProduct
;
...
@@ -107,6 +128,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -107,6 +128,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
@Autowired
@Autowired
SupervisionFeignClient
supervisionFeignClient
;
SupervisionFeignClient
supervisionFeignClient
;
@Autowired
@Autowired
JcsFeignClient
jcsFeignClient
;
@Autowired
private
RemoteWorkFlowService
remoteWorkFlowService
;
private
RemoteWorkFlowService
remoteWorkFlowService
;
@Autowired
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
RemoteSecurityService
remoteSecurityService
;
...
@@ -120,7 +143,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -120,7 +143,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
private
RemoteSpcService
remoteSpcService
;
private
RemoteSpcService
remoteSpcService
;
@Autowired
@Autowired
private
AsyncTask
asyncTask
;
private
AsyncTask
asyncTask
;
// @Autowired
// @Autowired
// private Business business;
// private Business business;
@Autowired
@Autowired
...
@@ -145,14 +167,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -145,14 +167,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
private
WorkflowExcuteServiceImpl
workflowExecuteService
;
private
WorkflowExcuteServiceImpl
workflowExecuteService
;
@Autowired
@Autowired
private
WorkflowFeignService
workflowFeignService
;
private
WorkflowFeignService
workflowFeignService
;
// 有启动后执行现场确认的角色名称
// 有启动后执行现场确认的角色名称
@Value
(
"${onSite.confirm.roleName}"
)
@Value
(
"${onSite.confirm.roleName}"
)
private
String
onSiteConfirmRole
;
private
String
onSiteConfirmRole
;
@Autowired
JcsFeignClient
jcsFeignClient
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
public
CommonResponse
saveNormal
(
LatentDangerDto
latentDangerDto
,
String
userId
,
String
userRealName
,
public
CommonResponse
saveNormal
(
LatentDangerDto
latentDangerDto
,
String
userId
,
String
userRealName
,
...
@@ -1813,18 +1831,17 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -1813,18 +1831,17 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
(!
ValidationUtil
.
isEmpty
(
dangerIdList
))
{
if
(!
ValidationUtil
.
isEmpty
(
dangerIdList
))
{
pageParam
.
put
(
"dangerIds"
,
dangerIdList
);
pageParam
.
put
(
"dangerIds"
,
dangerIdList
);
}
}
Page
page
=
new
Page
();
initPage
(
pageParam
,
page
);
if
(
ValidationUtil
.
isEmpty
(
pageParam
.
get
(
"order"
)))
{
if
(
ValidationUtil
.
isEmpty
(
pageParam
.
get
(
"order"
)))
{
pageParam
.
put
(
"order"
,
"1"
);
pageParam
.
put
(
"order"
,
"1"
);
}
}
Page
page
=
new
Page
(
pageParam
.
getParamPageCurrent
(),
pageParam
.
getParamPageSize
());
IPage
<
LatentDanger
>
iPage
=
this
.
baseMapper
.
selectPageByParam
(
page
,
(
Map
<
String
,
Object
>)
pageParam
);
IPage
<
LatentDanger
>
iPage
=
this
.
baseMapper
.
selectPageByParam
(
page
,
(
Map
<
String
,
Object
>)
pageParam
);
if
(
iPage
.
getCurrent
()
!=
pageParam
.
getParamCurrent
())
{
if
(
iPage
.
getCurrent
()
!=
pageParam
.
getParam
Page
Current
())
{
iPage
.
setRecords
(
Lists
.
newArrayList
());
iPage
.
setRecords
(
Lists
.
newArrayList
());
iPage
.
setTotal
(
0
);
iPage
.
setTotal
(
0
);
iPage
.
setCurrent
(
pageParam
.
getParamCurrent
());
iPage
.
setCurrent
(
pageParam
.
getParam
Page
Current
());
return
iPage
;
return
iPage
;
}
}
Map
<
String
,
Object
>
buildingAbsolutePositionMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
buildingAbsolutePositionMap
=
new
HashMap
<>();
...
@@ -1865,18 +1882,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -1865,18 +1882,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
return
iPage
;
return
iPage
;
}
}
public
void
initPage
(
PageParam
pageParam
,
Page
page
)
{
if
(
pageParam
.
get
(
"current"
)
instanceof
String
&&
pageParam
.
get
(
"size"
)
instanceof
String
)
{
int
current
=
Integer
.
valueOf
((
String
)
pageParam
.
get
(
"current"
));
int
size
=
Integer
.
valueOf
((
String
)
pageParam
.
get
(
"size"
));
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
}
else
{
page
.
setCurrent
((
Integer
)(
pageParam
.
get
(
"current"
)));
page
.
setSize
((
Integer
)(
pageParam
.
get
(
"size"
)));
}
}
private
List
<
Map
<
String
,
Object
>>
getAllNodes
(
List
<
Map
<
String
,
Object
>>
buildingTree
)
{
private
List
<
Map
<
String
,
Object
>>
getAllNodes
(
List
<
Map
<
String
,
Object
>>
buildingTree
)
{
List
<
Map
<
String
,
Object
>>
res
=
new
LinkedList
<>();
List
<
Map
<
String
,
Object
>>
res
=
new
LinkedList
<>();
if
(
buildingTree
!=
null
&&
!
buildingTree
.
isEmpty
())
{
if
(
buildingTree
!=
null
&&
!
buildingTree
.
isEmpty
())
{
...
@@ -1983,6 +1988,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -1983,6 +1988,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
(!
ValidationUtil
.
isEmpty
(
searchParam
.
getDangerIds
()))
{
if
(!
ValidationUtil
.
isEmpty
(
searchParam
.
getDangerIds
()))
{
lambdaQueryWrapper
.
in
(
LatentDanger:
:
getId
,
Lists
.
newArrayList
(
searchParam
.
getDangerIds
().
split
(
","
)));
lambdaQueryWrapper
.
in
(
LatentDanger:
:
getId
,
Lists
.
newArrayList
(
searchParam
.
getDangerIds
().
split
(
","
)));
}
}
lambdaQueryWrapper
.
and
(
o
->
o
.
likeRight
(
LatentDanger:
:
getOrgCode
,
searchParam
.
getOrgCode
()
+
"*"
)
.
or
().
likeRight
(
LatentDanger:
:
getOrgCode
,
searchParam
.
getOrgCode
()
+
"-"
)
.
or
().
eq
(
LatentDanger:
:
getOrgCode
,
searchParam
.
getOrgCode
()));
List
<
LatentDanger
>
latentDangers
=
this
.
baseMapper
.
selectList
(
lambdaQueryWrapper
);
List
<
LatentDanger
>
latentDangers
=
this
.
baseMapper
.
selectList
(
lambdaQueryWrapper
);
return
latentDangers
;
return
latentDangers
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanDao.java
View file @
2894ce0f
...
@@ -17,8 +17,8 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
...
@@ -17,8 +17,8 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Modifying
@Modifying
@Transactional
@Transactional
@Query
(
value
=
"select * from p_plan WHERE next_gen_date = ?1 and
status = ?2
"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from p_plan WHERE next_gen_date = ?1 and
(status = ?2 or status = ?3)
"
,
nativeQuery
=
true
)
List
<
Plan
>
queryScheduledPlan
(
String
strDate
,
String
status
);
List
<
Plan
>
queryScheduledPlan
(
String
strDate
,
String
status
,
String
status1
);
@Modifying
@Modifying
@Transactional
@Transactional
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanTaskServiceImpl.java
View file @
2894ce0f
...
@@ -331,7 +331,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -331,7 +331,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
strDate
=
df
.
format
(
now
);
String
strDate
=
df
.
format
(
now
);
String
tomorrow
=
DateUtil
.
getIntervalDateStr
(
now
,
1
,
"yyyy-MM-dd"
);
//下一天
String
tomorrow
=
DateUtil
.
getIntervalDateStr
(
now
,
1
,
"yyyy-MM-dd"
);
//下一天
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
String
.
valueOf
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
()));
// 根据计划状态5,6和next_gen_date查询需要生成任务的计划
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
String
.
valueOf
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
()),
String
.
valueOf
(
PlanStatusEnum
.
IN_EXECUTION
.
getValue
()));
if
(
planList
==
null
||
planList
.
size
()
<=
0
)
{
if
(
planList
==
null
||
planList
.
size
()
<=
0
)
{
log
.
info
(
strDate
+
" "
+
" 暂无待生成执行数据的计划"
);
log
.
info
(
strDate
+
" "
+
" 暂无待生成执行数据的计划"
);
return
;
return
;
...
@@ -359,9 +360,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -359,9 +360,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
//更新为明天
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
//更新为明天
continue
;
continue
;
}
}
//计划已过期,则更新status =
1,停用
//计划已过期,则更新status =
7,已完成
if
(!
vo
.
getIsGenData
())
{
if
(!
vo
.
getIsGenData
())
{
paramMap
.
put
(
"status"
,
XJConstant
.
PLAN_STATUS_STOP
);
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
COMPLETED
.
getValue
()
);
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
continue
;
continue
;
}
}
...
...
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
2894ce0f
...
@@ -963,6 +963,10 @@
...
@@ -963,6 +963,10 @@
<where>
<where>
deleted = 0
deleted = 0
<foreach
collection=
"paramMap"
index=
"key"
item=
"value"
>
<foreach
collection=
"paramMap"
index=
"key"
item=
"value"
>
<if
test=
"key == 'orgCode' and value != null and value != ''"
>
and (a.org_code like concat(#{value}, "*%") or a.org_code like concat(#{value}, "-%") or
a.org_code = #{value})
</if>
<if
test=
"key == 'bizType' and value != null and value != ''"
>
<if
test=
"key == 'bizType' and value != null and value != ''"
>
and a.biz_type = #{value}
and a.biz_type = #{value}
</if>
</if>
...
...
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