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
471ef949
Commit
471ef949
authored
Nov 18, 2021
by
helinlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加APP待办任务统计
parent
a705411a
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
585 additions
and
493 deletions
+585
-493
IPowerTransferCompanyResourcesService.java
...cs/api/service/IPowerTransferCompanyResourcesService.java
+15
-10
IUserCarService.java
...oin/amos/boot/module/jcs/api/service/IUserCarService.java
+12
-10
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+265
-296
PowerTransferCompanyResourcesServiceImpl.java
...ervice/impl/PowerTransferCompanyResourcesServiceImpl.java
+23
-17
UserCarServiceImpl.java
.../boot/module/jcs/biz/service/impl/UserCarServiceImpl.java
+28
-31
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+1
-1
PlanTaskController.java
...s/supervision/business/controller/PlanTaskController.java
+22
-6
PlanTaskMapper.java
.../amos/supervision/business/dao/mapper/PlanTaskMapper.java
+51
-13
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+6
-0
IPlanTaskService.java
.../supervision/business/service/intfc/IPlanTaskService.java
+27
-5
dbTemplate_plan_task.xml
...ion/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+135
-104
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IPowerTransferCompanyResourcesService.java
View file @
471ef949
...
...
@@ -3,24 +3,29 @@ package com.yeejoin.amos.boot.module.jcs.api.service;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
java.util.List
;
/**
* 调派单位资源 服务类
*
* @author tb
* @date 2021-06-17
*/
* 调派单位资源 服务类
*
* @author tb
* @date 2021-06-17
*/
public
interface
IPowerTransferCompanyResourcesService
{
AlertCalled
getByPowerTransferCompanyResourId
(
Long
id
);
AlertCalled
getByPowerTransferCompanyResourId
(
Long
id
);
PowerTransferCompanyResources
getByAlertCalledIdCarId
(
Long
alertCalledId
,
Long
carId
);
PowerTransferCompanyResources
getByAlertCalledIdCarId
(
Long
alertCalledId
,
Long
carId
);
void
updateByAlertCalledId
(
Long
alertCalledId
);
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
);
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
);
/**
* 根据ID获取资源信息
*
* @param resourceId 资源id
* @return 车辆状态
*/
PowerTransferCompanyResources
getResourceById
(
String
resourceId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IUserCarService.java
View file @
471ef949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
java.util.List
;
import
java.util.Map
;
/**
*
*/
*
*/
public
interface
IUserCarService
{
UserCar
selectByAmosUserId
(
Long
id
);
void
add
(
UserCar
userCar
);
void
delete
(
UserCar
userCar
);
void
add
(
UserCar
userCar
);
void
delete
(
UserCar
userCar
);
/**
* 获取用户绑定的车辆的状态为执行中的数量
*
* @return 执行中车辆的数量
*/
int
countUserCarExecuting
(
Long
userId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
471ef949
...
...
@@ -170,12 +170,12 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"JQ/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情列表查询"
,
notes
=
"警情列表查询"
)
public
ResponseModel
<
Object
>
listPage
(
RequestData
par
)
{
par
.
setStatus
(
0
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
return
ResponseHelper
.
buildResponse
(
list
);
}
...
...
@@ -184,12 +184,12 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"history/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情列表查询"
,
notes
=
"警情列表查询"
)
public
ResponseModel
<
Page
<
AlertCalledZhDto
>>
listhistoryPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
Page
<
AlertCalledZhDto
>>
listhistoryPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
if
(
par
.
getStatus
()==
null
)
{
if
(
par
.
getStatus
()
==
null
)
{
par
.
setStatus
(
1
);
}
if
(
null
==
pageNum
||
null
==
pageSize
)
{
...
...
@@ -198,9 +198,9 @@ public class CommandController extends BaseController {
}
else
{
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
}
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
pageNum
,
pageSize
,
par
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
pageNum
,
pageSize
,
par
);
Page
<
AlertCalledZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Integer
num
=
iAlertCalledService
.
alertCalledListByAlertStatusCount
(
par
);
Integer
num
=
iAlertCalledService
.
alertCalledListByAlertStatusCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
...
@@ -212,13 +212,13 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"ZDDW/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标列表分页查询"
,
notes
=
"保卫目标列表分页查询"
)
public
ResponseModel
<
IPage
<
CompanyDto
>>
listPageZDDW
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
CompanyDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
CompanyDto
>
list
=
iOrgUsrService
.
listContractDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iOrgUsrService
.
listContractDtoCount
(
par
);
List
<
CompanyDto
>
list
=
iOrgUsrService
.
listContractDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iOrgUsrService
.
listContractDtoCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
...
@@ -226,46 +226,45 @@ public class CommandController extends BaseController {
/**
* * @param null
* @return
*
<PRE>
*
* @return
<PRE>
* author tw
* date 2021/7/21
* </PRE>
* 保卫目标详情
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/ZDDW"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标详情"
,
notes
=
"保卫目标详情"
)
public
ResponseModel
<
OrgUsrFormDto
>
selectZDDWById
(
Long
id
)
throws
Exception
{
OrgUsrFormDto
orgUsrFormDto
=
iOrgUsrService
.
selectCompanyById
(
id
);
public
ResponseModel
<
OrgUsrFormDto
>
selectZDDWById
(
Long
id
)
throws
Exception
{
OrgUsrFormDto
orgUsrFormDto
=
iOrgUsrService
.
selectCompanyById
(
id
);
return
ResponseHelper
.
buildResponse
(
orgUsrFormDto
);
}
/**
* 微型消防站列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"WX/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"微型消防站列表分页查询"
,
notes
=
"微型消防站列表分页查询"
)
public
ResponseModel
<
IPage
<
FireStationzhDto
>>
listPageWx
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
FireStationzhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireStationzhDto
>
list
=
iFireStationService
.
getStationList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireStationService
.
getStationListCount
(
par
);
List
<
FireStationzhDto
>
list
=
iFireStationService
.
getStationList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireStationService
.
getStationListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
/**
* 水源列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"SY500/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"500水源列表分页查询"
,
notes
=
"500水源列表分页查询"
)
public
ResponseModel
<
IPage
<
WaterResourceZhDto
>>
listPageSY500
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
...
...
@@ -273,41 +272,39 @@ public class CommandController extends BaseController {
par
.
setDistance
(
500
D
);
Page
<
WaterResourceZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
/**
* 水源列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"video/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频分页查询88"
,
notes
=
"视频分页查询88"
)
public
ResponseModel
<
Object
>
getVideo
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
if
(
par
.
getAlertId
()!=
null
)
{
AlertCalled
alertCalled
=
iAlertCalledService
.
getAlertCalledById
(
par
.
getAlertId
());
if
(
par
.
getAlertId
()
!=
null
)
{
AlertCalled
alertCalled
=
iAlertCalledService
.
getAlertCalledById
(
par
.
getAlertId
());
par
.
setLatitude
(
alertCalled
.
getCoordinateX
());
par
.
setLongitude
(
alertCalled
.
getCoordinateY
());
}
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
pageVideo
(
pageNum
==
0
?
1
:
pageNum
,
pageSize
,
par
.
getLongitude
(),
par
.
getLatitude
(),
par
.
getDistance
());
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
pageVideo
(
pageNum
==
0
?
1
:
pageNum
,
pageSize
,
par
.
getLongitude
(),
par
.
getLatitude
(),
par
.
getDistance
());
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
():
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
record
.
put
(
"url"
,
url
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
}
pag
.
setRecords
(
records
);
}
...
...
@@ -315,11 +312,7 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/video/page"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页获取视频"
,
notes
=
"分页获取视频"
)
public
ResponseModel
<
Object
>
getVideopage
(
String
current
,
...
...
@@ -327,16 +320,16 @@ public class CommandController extends BaseController {
String
equipmentName
,
String
code
,
String
buildingId
)
throws
Exception
{
)
throws
Exception
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideopag
(
current
,
size
,
buildingId
,
code
,
equipmentName
);
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
():
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideopag
(
current
,
size
,
buildingId
,
code
,
equipmentName
);
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
record
.
put
(
"url"
,
url
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
}
pag
.
setRecords
(
records
);
}
...
...
@@ -348,21 +341,21 @@ public class CommandController extends BaseController {
*
* @returngetVideo
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"video/pageList"
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"video/pageList"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
" app视频分页查询88"
,
notes
=
"app视频分页查询88"
)
public
ResponseModel
<
Object
>
pageList
(
@RequestBody
PageDto
pageDto
)
{
ResponseModel
<
Page
<
VideoDto
>>
data
=
equipFeignClient
.
pageList
(
pageDto
.
getCurrent
(),
ResponseModel
<
Page
<
VideoDto
>>
data
=
equipFeignClient
.
pageList
(
pageDto
.
getCurrent
(),
pageDto
.
getSize
(),
pageDto
.
getCode
()
==
null
?
""
:
pageDto
.
getCode
(),
pageDto
.
getName
()
==
null
?
""
:
pageDto
.
getName
(),
pageDto
.
getTypeCode
()
==
null
?
""
:
pageDto
.
getTypeCode
());
Page
<
VideoDto
>
pag
=
data
!=
null
?
data
.
getResult
():
null
;
List
<
VideoDto
>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
pageDto
.
getCode
()
==
null
?
""
:
pageDto
.
getCode
(),
pageDto
.
getName
()
==
null
?
""
:
pageDto
.
getName
(),
pageDto
.
getTypeCode
()
==
null
?
""
:
pageDto
.
getTypeCode
());
Page
<
VideoDto
>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
VideoDto
>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
VideoDto
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
getCode
());
String
url
=
da
!=
null
?
da
.
getResult
():
null
;
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
getCode
());
String
url
=
da
!=
null
?
da
.
getResult
()
:
null
;
record
.
setUrl
(
url
);
}
pag
.
setRecords
(
records
);
...
...
@@ -371,30 +364,25 @@ public class CommandController extends BaseController {
}
/**
* 水源列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"video/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频详情88"
,
notes
=
"视频详情88"
)
public
ResponseModel
<
Object
>
getVideoByid
(
@PathVariable
Long
id
)
{
ResponseModel
<
Map
<
String
,
Object
>>
data
=
equipFeignClient
.
getByid
(
id
);
Map
<
String
,
Object
>
records
=
data
!=
null
?
data
.
getResult
():
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
records
.
get
(
"code"
)+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
records
.
put
(
"url"
,
url
);
ResponseModel
<
Map
<
String
,
Object
>>
data
=
equipFeignClient
.
getByid
(
id
);
Map
<
String
,
Object
>
records
=
data
!=
null
?
data
.
getResult
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
records
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
records
.
put
(
"url"
,
url
);
data
.
setResult
(
records
);
}
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
null
);
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
()
:
null
);
}
/**
...
...
@@ -402,21 +390,20 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"SY1000/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"1000水源列表分页查询"
,
notes
=
"1000水源列表分页查询"
)
public
ResponseModel
<
IPage
<
WaterResourceZhDto
>>
listPageSY1000
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
par
.
setDistance
(
1000
D
);
Page
<
WaterResourceZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
// /**
// * 水源列表分页查询
// *
...
...
@@ -440,14 +427,14 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"DW/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防队伍列表分页查询"
,
notes
=
"消防队伍列表分页查询"
)
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
listPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
par
.
setTypeCode
(
AlertStageEnums
.
YWDD
.
getCode
());
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
...
@@ -458,13 +445,13 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"linkageForce/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动力量列表分页查询"
,
notes
=
"联动力量列表分页查询"
)
public
ResponseModel
<
IPage
<
LinkageUnitZhDto
>>
linkageForcelistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
LinkageUnitZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
LinkageUnitZhDto
>
list
=
iLinkageUnitService
.
listLinkageUnitZhDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iLinkageUnitService
.
listLinkageUnitZhDtoCount
(
par
);
List
<
LinkageUnitZhDto
>
list
=
iLinkageUnitService
.
listLinkageUnitZhDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iLinkageUnitService
.
listLinkageUnitZhDtoCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
...
@@ -472,8 +459,8 @@ public class CommandController extends BaseController {
/**
* * @param null
*
@return
* <PRE>
*
*
@return
<PRE>
* author tw
* date 2021/7/21
* </PRE>
...
...
@@ -482,7 +469,7 @@ public class CommandController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/linkageForce"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个联动单位"
,
notes
=
"根据sequenceNbr查询单个联动单位"
)
public
ResponseModel
<
LinkageUnitDto
>
selectlinkageForceOne
(
Long
id
)
{
public
ResponseModel
<
LinkageUnitDto
>
selectlinkageForceOne
(
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iLinkageUnitService
.
queryOne
(
id
));
}
...
...
@@ -492,7 +479,7 @@ public class CommandController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"ZQ/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤实力列表分页查询"
,
notes
=
"执勤实力列表分页查询"
)
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
ZQlistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
...
...
@@ -500,56 +487,50 @@ public class CommandController extends BaseController {
// par.setTypeCode( AlertStageEnums.ZZZD.getCode()+","+AlertStageEnums.YLJY.getCode());
// }
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
/**
*
* 根据id查询警情详情
*
* **/
**/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"JQ/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询灾情详情"
,
notes
=
"根据id查询灾情详情"
)
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledKeyValueLabelById
(
id
));
}
/**
* 根据id查询微型消防站
*
* @param id 主键
*
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/WX"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询微型消防站"
,
notes
=
"根据id查询微型消防站"
)
public
ResponseModel
<
FireStationDto
>
seleteOne
(
Long
id
)
{
public
ResponseModel
<
FireStationDto
>
seleteOne
(
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iFireStationService
.
selectBySequenceNbr
(
id
));
}
/**
* 根据id查询水源
*
* @param id 主键
*
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/SY"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
jsonObject
.
remove
(
"managementUnit"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
...
...
@@ -561,7 +542,7 @@ public class CommandController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/DW"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询队伍信息"
,
notes
=
"根据id查询队伍信息"
)
public
ResponseModel
<
FireTeam
>
selectById
(
HttpServletRequest
request
,
Long
id
)
{
...
...
@@ -575,38 +556,37 @@ public class CommandController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/seismometeorology"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"跑马灯"
,
notes
=
"跑马灯"
)
public
ResponseModel
<
Object
>
seismometeorology
()
throws
Exception
{
public
ResponseModel
<
Object
>
seismometeorology
()
throws
Exception
{
RequestData
requestData
=
new
RequestData
();
requestData
.
setWhether24
(
true
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
requestData
);
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findCarStateByWatchSn
();
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
requestData
);
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findCarStateByWatchSn
();
//数据组装
for
(
AlertCalledZhDto
alertCalledZhDto
:
list
)
{
StringBuffer
st
=
new
StringBuffer
();
StringBuffer
st
=
new
StringBuffer
();
String
time
=
DateUtil
.
formatDate
(
alertCalledZhDto
.
getCallTime
(),
"yyyy-MM-dd HH:mm:ss"
);
String
time
=
DateUtil
.
formatDate
(
alertCalledZhDto
.
getCallTime
(),
"yyyy-MM-dd HH:mm:ss"
);
st
.
append
(
"【"
).
append
(
alertCalledZhDto
.
getAlertType
()).
append
(
"】"
).
append
(
" "
).
append
(
time
).
append
(
" "
).
append
(
alertCalledZhDto
.
getAddress
());
SeismometeorologyDto
sto
=
new
SeismometeorologyDto
(
alertCalledZhDto
.
getSequenceNbr
(),
"1"
,
"警情通知"
,
null
,
alertCalledZhDto
.
getCallTime
(),
null
,
st
.
toString
())
;
SeismometeorologyDto
sto
=
new
SeismometeorologyDto
(
alertCalledZhDto
.
getSequenceNbr
(),
"1"
,
"警情通知"
,
null
,
alertCalledZhDto
.
getCallTime
(),
null
,
st
.
toString
())
;
li
.
add
(
sto
);
}
return
ResponseHelper
.
buildResponse
(
li
);
}
/**
* 根据id指令
*
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"ZL/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id查询指令信息"
,
notes
=
"根据警情id查询指令信息"
)
public
ResponseModel
<
List
<
InstructionsZHDto
>>
selectZL
(
@PathVariable
Long
id
)
{
...
...
@@ -614,7 +594,7 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/gwmcDataDictionary/FireChemical/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询危险品字典"
,
notes
=
"根据字典类型查询危险品字典"
)
public
ResponseModel
<
Object
>
gwmcDataDictionaryFireChemical
(
@PathVariable
String
type
)
throws
Exception
{
...
...
@@ -622,7 +602,7 @@ public class CommandController extends BaseController {
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"危化品分页查询"
,
notes
=
"危化品分页查询"
)
public
ResponseModel
<
Page
<
FireChemicalDto
>>
queryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
...
...
@@ -637,7 +617,7 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/gwmcDataDictionary/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典"
,
notes
=
"根据字典类型查询字典"
)
public
ResponseModel
<
Object
>
gwmcDataDictionary
(
@PathVariable
String
type
)
throws
Exception
{
...
...
@@ -647,7 +627,7 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"fireExperts/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"外部专家分页查询"
,
notes
=
"外部专家分页查询"
)
public
ResponseModel
<
IPage
<
FireExpertsDto
>>
queryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
...
...
@@ -662,25 +642,24 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"LinkageUnitDto/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
LinkageUnitDtoQueryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
)
{
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
LinkageUnitDtoQueryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
)
{
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
iLinkageUnitService
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitTypeCode
,
linkageUnitType
,
null
,
inAgreement
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
iLinkageUnitService
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitTypeCode
,
linkageUnitType
,
null
,
inAgreement
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getFirefighters"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"内部专家列表分页查询"
,
notes
=
"内部专家列表分页查询"
)
public
ResponseModel
<
Page
<
FirefightersZhDto
>>
getFirefighters
(
Integer
pageNum
,
Integer
pageSize
,
FirefightersDto
firefighters
)
{
if
(
firefighters
.
getAreasExpertiseCode
()==
null
)
{
if
(
firefighters
.
getAreasExpertiseCode
()
==
null
)
{
firefighters
.
setAreasExpertiseCode
(
"0"
);
}
//条件分页
...
...
@@ -699,27 +678,26 @@ public class CommandController extends BaseController {
/**
*
* 火灾现场统计
*
* **/
**/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"statistics/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"火灾现场统计"
,
notes
=
"火灾现场统计"
)
public
ResponseModel
<
Object
>
getStatistics
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledcount
(
id
));
}
/**
* * @param null
*
@return
* <PRE>
*
*
@return
<PRE>
* author tw
* date 2021/7/22
* </PRE>
* 到场力量统计
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getpower/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量统计"
,
notes
=
"到场力量统计"
)
public
ResponseModel
<
Object
>
getpower
(
@PathVariable
Long
id
)
{
...
...
@@ -728,14 +706,14 @@ public class CommandController extends BaseController {
/**
* * @param null
*
@return
* <PRE>
*
*
@return
<PRE>
* author tw
* date 2021/7/22
* </PRE>
* 到场力量统计列表
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getPowerDataList/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量统计列表"
,
notes
=
"到场力量统计列表"
)
public
ResponseModel
<
Object
>
getPowerDataList
(
@PathVariable
Long
id
)
{
...
...
@@ -743,23 +721,21 @@ public class CommandController extends BaseController {
}
/**
*
* 力量统计当前灾情阶段
*
* */
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getstate/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取灾情当前阶段"
,
notes
=
"获取灾情当前阶段"
)
public
ResponseModel
<
Object
>
getstate
(
@PathVariable
Long
id
)
{
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
List
<
StateDot
>
list
=
new
ArrayList
<>();
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
List
<
StateDot
>
list
=
new
ArrayList
<>();
list
.
add
(
new
StateDot
(
"警情接报"
));
list
.
add
(
new
StateDot
(
"力量调派"
));
list
.
add
(
new
StateDot
(
"值班确警"
));
list
.
add
(
new
StateDot
(
"处置跟踪"
));
list
.
add
(
new
StateDot
(
"处置结束"
));
list
.
stream
().
forEach
(
stateDot
->
{
if
(
AlertCalled
.
getAlertStage
().
equals
(
stateDot
.
getName
()))
{
list
.
stream
().
forEach
(
stateDot
->
{
if
(
AlertCalled
.
getAlertStage
().
equals
(
stateDot
.
getName
()))
{
stateDot
.
setFlag
(
true
);
}
});
...
...
@@ -768,14 +744,14 @@ public class CommandController extends BaseController {
/**
* * @param null
*
@return
* <PRE>
*
*
@return
<PRE>
* author tw
* date 2021/7/22
* </PRE>
* 到场力量 列表统计
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getPowerCompanyCountDtocount/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量 列表统计"
,
notes
=
"到场力量 列表统计"
)
public
ResponseModel
<
Object
>
getPowerCompanyCountDtocount
(
@PathVariable
Long
id
)
{
...
...
@@ -783,26 +759,26 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"currentPermissionTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"用户菜单"
,
notes
=
"用户菜单"
)
public
ResponseModel
<
List
<
PermissionModelDto
>>
currentPermissionTree
()
{
//获取用户app 菜单
List
<
PermissionModelDto
>
list
=
remoteSecurityService
.
currentPermissionTree
();
List
<
PermissionModelDto
>
listdate
=
getHomePermissionModel
(
list
);
List
<
PermissionModelDto
>
list
=
remoteSecurityService
.
currentPermissionTree
();
List
<
PermissionModelDto
>
listdate
=
getHomePermissionModel
(
list
);
getPermissionModel
(
listdate
);
return
ResponseHelper
.
buildResponse
(
listdate
);
}
public
List
<
PermissionModelDto
>
getHomePermissionModel
(
List
<
PermissionModelDto
>
list
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
for
(
PermissionModelDto
itme
:
list
)
{
if
(
"Home"
.
equals
(
itme
.
getFrontComponent
()))
{
if
(
"Home"
.
equals
(
itme
.
getFrontComponent
()))
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
return
userList
;
}
if
(
itme
.
getChildren
()!=
null
&&!
itme
.
getChildren
().
isEmpty
())
{
if
(
itme
.
getChildren
()
!=
null
&&
!
itme
.
getChildren
().
isEmpty
())
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
return
getHomePermissionModel
(
userList
);
...
...
@@ -815,17 +791,17 @@ public class CommandController extends BaseController {
public
void
getPermissionModel
(
List
<
PermissionModelDto
>
list
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
list
.
forEach
(
itme
->
{
HomePageEnum
homePageEnum
=
HomePageEnum
.
statOf
(
itme
.
getFrontComponent
());
if
(
itme
.
getFrontComponent
()!=
null
&&
homePageEnum
!=
null
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
list
.
forEach
(
itme
->
{
HomePageEnum
homePageEnum
=
HomePageEnum
.
statOf
(
itme
.
getFrontComponent
());
if
(
itme
.
getFrontComponent
()
!=
null
&&
homePageEnum
!=
null
)
{
try
{
Class
clz
=
Class
.
forName
(
homePageEnum
.
getUrl
());
Object
entity
=
clz
.
newInstance
();
Method
repay1
=
clz
.
getDeclaredMethod
(
"getHomePageData"
);
Object
value
=
repay1
.
invoke
(
entity
);
itme
.
setValue
(
value
!=
null
?
Double
.
valueOf
(
value
.
toString
()):
0
);
if
(
itme
.
getChildren
()!=
null
&&!
itme
.
getChildren
().
isEmpty
())
{
itme
.
setValue
(
value
!=
null
?
Double
.
valueOf
(
value
.
toString
())
:
0
);
if
(
itme
.
getChildren
()
!=
null
&&
!
itme
.
getChildren
().
isEmpty
())
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
getPermissionModel
(
userList
);
...
...
@@ -834,8 +810,8 @@ public class CommandController extends BaseController {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
{
if
(
itme
.
getChildren
()!=
null
&&!
itme
.
getChildren
().
isEmpty
())
{
}
else
{
if
(
itme
.
getChildren
()
!=
null
&&
!
itme
.
getChildren
().
isEmpty
())
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
getPermissionModel
(
userList
);
...
...
@@ -848,27 +824,25 @@ public class CommandController extends BaseController {
/**
*
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/lookHtmlText"
)
@ApiOperation
(
value
=
"查看文件内容"
,
notes
=
"查看文件内容"
)
public
ResponseModel
<
Object
>
lookHtmlText
(
HttpServletResponse
response
,
@RequestParam
(
value
=
"fileUrl"
)
String
fileUrl
,
@RequestParam
(
value
=
"product"
)
String
product
,
@RequestParam
(
value
=
"appKey"
)
String
appKey
,
@RequestParam
(
value
=
"token"
)
String
token
/* @PathVariable String fileName */
)
public
ResponseModel
<
Object
>
lookHtmlText
(
HttpServletResponse
response
,
@RequestParam
(
value
=
"fileUrl"
)
String
fileUrl
,
@RequestParam
(
value
=
"product"
)
String
product
,
@RequestParam
(
value
=
"appKey"
)
String
appKey
,
@RequestParam
(
value
=
"token"
)
String
token
/* @PathVariable String fileName */
)
throws
Exception
{
String
fileName
=
readUrl
+
fileUrl
;
//目标文件
String
fileName
=
readUrl
+
fileUrl
;
//目标文件
if
(
fileName
.
endsWith
(
".doc"
)
||
fileName
.
endsWith
(
".docx"
))
{
String
htmlPath
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"file"
+
File
.
separator
;
String
imagePathStr
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"image"
+
File
.
separator
;
String
name
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
'/'
)+
1
);
String
htmlFileName
=
htmlPath
+
name
.
substring
(
0
,
name
.
indexOf
(
"."
))
+
".html"
;
String
htmlPath
=
System
.
getProperty
(
"user.dir"
)
+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"file"
+
File
.
separator
;
String
imagePathStr
=
System
.
getProperty
(
"user.dir"
)
+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"image"
+
File
.
separator
;
String
name
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
'/'
)
+
1
);
String
htmlFileName
=
htmlPath
+
name
.
substring
(
0
,
name
.
indexOf
(
"."
))
+
".html"
;
File
htmlP
=
new
File
(
htmlPath
);
if
(!
htmlP
.
exists
())
{
htmlP
.
mkdirs
();
}
File
htmlFile
=
new
File
(
htmlFileName
);
WordConverterUtils
.
wordToHtml
(
fileName
,
htmlFileName
,
imagePathStr
,
readUrl
,
remoteSecurityService
,
product
,
appKey
,
token
);
WordConverterUtils
.
wordToHtml
(
fileName
,
htmlFileName
,
imagePathStr
,
readUrl
,
remoteSecurityService
,
product
,
appKey
,
token
);
FileInputStream
fis
=
new
FileInputStream
(
htmlFile
);
// response.setContentType("multipart/form-data");
// response.setCharacterEncoding("UTF-8");
...
...
@@ -904,10 +878,10 @@ public class CommandController extends BaseController {
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
alertFormValueService
.
getzqlist
(
sequenceNbr
);
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
String
aircraftModel
=
alertFormValue
.
getFieldValue
();
if
(
aircraftModel
!=
null
&&
!
""
.
equals
(
aircraftModel
))
{
AircraftDto
aircraftDto
=
aircraftService
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
1411994005943717890L
);
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
String
aircraftModel
=
alertFormValue
.
getFieldValue
();
if
(
aircraftModel
!=
null
&&
!
""
.
equals
(
aircraftModel
))
{
AircraftDto
aircraftDto
=
aircraftService
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
1411994005943717890L
);
//现场照片 待完成,
return
ResponseHelper
.
buildResponse
(
aircraftDto
);
}
...
...
@@ -916,7 +890,7 @@ public class CommandController extends BaseController {
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getOrgUsrzhDto/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id处置对象单位详情"
,
notes
=
"根据灾情id处置对象单位详情"
)
public
ResponseModel
<
OrgusrDataxDto
>
getOrgUsrzhDto
(
@PathVariable
Long
id
)
{
...
...
@@ -963,44 +937,41 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/AlertCalledcountTime"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤动态警情信息统计"
,
notes
=
"执勤动态警情信息统计"
)
public
ResponseModel
<
Object
>
AlertCalledcountTime
()
{
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
listdate
.
add
(
new
KeyValueLabel
(
"今年警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
1
)));
listdate
.
add
(
new
KeyValueLabel
(
"当月警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
2
)));
listdate
.
add
(
new
KeyValueLabel
(
"昨天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
4
)));
listdate
.
add
(
new
KeyValueLabel
(
"今天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
3
)));
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
listdate
.
add
(
new
KeyValueLabel
(
"今年警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
1
)));
listdate
.
add
(
new
KeyValueLabel
(
"当月警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
2
)));
listdate
.
add
(
new
KeyValueLabel
(
"昨天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
4
)));
listdate
.
add
(
new
KeyValueLabel
(
"今天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
3
)));
return
ResponseHelper
.
buildResponse
(
listdate
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getTodayPowerTransferCompany"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当天力量调派"
,
notes
=
"当天力量调派"
)
public
ResponseModel
<
Object
>
getTodayPowerTransferCompany
()
{
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyService
.
getTodayPowerTransferCompany
());
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getTodayAlertCalled"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当天接警记录"
,
notes
=
"当天接警记录"
)
public
ResponseModel
<
Object
>
getTodayAlertCalled
()
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getTodayAlertCalled
());
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getFireTeamCountList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤力量"
,
notes
=
"执勤力量"
)
public
ResponseModel
<
Object
>
getFireTeamCountList
()
{
return
ResponseHelper
.
buildResponse
(
iFireTeamService
.
getFireTeamCountList
());
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"当天值班人信息列表"
)
@GetMapping
(
"/getonDuty/list"
)
public
ResponseModel
listOnDutyPerson
()
{
...
...
@@ -1013,11 +984,11 @@ public class CommandController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/findDutyCarStateBy"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当日气象预警"
,
notes
=
"当日气象预警"
)
public
ResponseModel
<
Object
>
findDutyCarStateBy
()
throws
Exception
{
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findDutyCarStateBy
();
public
ResponseModel
<
Object
>
findDutyCarStateBy
()
throws
Exception
{
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findDutyCarStateBy
();
return
ResponseHelper
.
buildResponse
(
li
);
}
...
...
@@ -1027,22 +998,22 @@ public class CommandController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getVideo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页获取视频"
,
notes
=
"分页获取视频"
)
public
ResponseModel
<
Object
>
getVideo
(
long
current
,
long
size
)
throws
Exception
{
public
ResponseModel
<
Object
>
getVideo
(
long
current
,
long
size
)
throws
Exception
{
Page
page
=
new
Page
(
current
,
size
);
List
<
OrderItem
>
list
=
OrderItem
.
ascs
(
"id"
);
List
<
OrderItem
>
list
=
OrderItem
.
ascs
(
"id"
);
page
.
setOrders
(
list
);
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideo
(
current
,
size
,
0
l
);
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideo
(
current
,
size
,
0
l
);
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
():
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
record
.
put
(
"url"
,
url
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
}
pag
.
setRecords
(
records
);
}
...
...
@@ -1050,53 +1021,49 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"fireCar/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源"
,
notes
=
"车辆资源"
)
public
ResponseModel
<
Object
>
getTeamCarList
(
RequestData
par
)
{
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 陈召 开始 */
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
date
=
equipFeignClient
.
getTeamCarList
(
par
.
getLongitude
(),
par
.
getLatitude
());
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 陈召 开始 */
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
date
=
equipFeignClient
.
getTeamCarList
(
par
.
getLongitude
(),
par
.
getLatitude
());
List
<
Map
<
String
,
Object
>>
result
=
date
.
getResult
();
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
()
);
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
());
List
<
PowerTransferCompanyResources
>
alertFormValue
=
powerTransferCompanyResourcesMapper
.
selectList
(
queryWrapper
);
result
.
stream
().
forEach
(
e
->
{
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
)){
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
result
.
stream
().
forEach
(
e
->
{
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
))
{
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
}
String
sequenceNbr
=
e
.
get
(
"sequenceNbr"
).
toString
();
//同步力量调派车辆任务状态
alertFormValue
.
stream
().
forEach
(
v
->
{
alertFormValue
.
stream
().
forEach
(
v
->
{
if
(
v
.
getResourcesId
().
equals
(
sequenceNbr
))
{
String
carStatus
=
v
.
getCarStatus
();
e
.
put
(
"carState"
,
carStatus
!=
null
?
FireCarStatusEnum
.
getEnum
(
carStatus
).
getName
():
null
);
e
.
put
(
"carState"
,
carStatus
!=
null
?
FireCarStatusEnum
.
getEnum
(
carStatus
).
getName
()
:
null
);
}
});
});
return
ResponseHelper
.
buildResponse
(
date
!=
null
?
date
.
getResult
():
null
);
return
ResponseHelper
.
buildResponse
(
date
!=
null
?
date
.
getResult
()
:
null
);
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 2021-10-26 陈召 结束 */
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/fireCar"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源详情"
,
notes
=
"车辆资源详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCarDetailById
(
Long
id
)
{
ResponseModel
<
Map
<
String
,
Object
>>
date
=
equipFeignClient
.
getCarDetailById
(
id
);
public
ResponseModel
<
Map
<
String
,
Object
>>
getCarDetailById
(
Long
id
)
{
ResponseModel
<
Map
<
String
,
Object
>>
date
=
equipFeignClient
.
getCarDetailById
(
id
);
Map
<
String
,
Object
>
map
=
date
!=
null
?
date
.
getResult
():
null
;
if
(
map
!=
null
)
{
int
num
=
0
;
Map
<
String
,
Object
>
map
=
date
!=
null
?
date
.
getResult
()
:
null
;
if
(
map
!=
null
)
{
int
num
=
0
;
num
=
iDutyCarService
.
getDutyCarCount
(
id
);
map
.
put
(
"personNum"
,
num
);
map
.
put
(
"personNum"
,
num
);
}
return
ResponseHelper
.
buildResponse
(
map
);
}
// @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/testPostApi")
// @ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址")
...
...
@@ -1119,36 +1086,36 @@ public class CommandController extends BaseController {
// }
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id建筑部位树"
,
notes
=
"根据灾情id建筑部位树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id建筑部位树"
,
notes
=
"根据灾情id建筑部位树"
)
@GetMapping
(
value
=
"/getBuildTree/{id}"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
getBuildTree
(
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
List
<
OrgMenuDto
>>
getBuildTree
(
@PathVariable
Long
id
)
throws
Exception
{
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
Long
buildId
=
null
;
String
buildIdName
=
""
;
Long
zdid
=
null
;
String
zdname
=
""
;
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
if
(
AlertCalled
.
getUnitInvolved
()!=
null
&&
!
""
.
equals
(
AlertCalled
.
getUnitInvolved
()))
{
List
<
OrgUsrzhDto
>
orgUsrzhDto
=
iOrgUsrService
.
getOrgUsrzhDto
(
AlertCalled
.
getUnitInvolved
());
if
(
orgUsrzhDto
!=
null
&&
orgUsrzhDto
.
size
()>
0
&&
orgUsrzhDto
.
get
(
0
)!=
null
)
{
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()==
null
?
null
:
Long
.
valueOf
(
orgUsrzhDto
.
get
(
0
).
getBuildId
());
buildIdName
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBuildName
();
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
Long
buildId
=
null
;
String
buildIdName
=
""
;
Long
zdid
=
null
;
String
zdname
=
""
;
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
if
(
AlertCalled
.
getUnitInvolved
()
!=
null
&&
!
""
.
equals
(
AlertCalled
.
getUnitInvolved
()))
{
List
<
OrgUsrzhDto
>
orgUsrzhDto
=
iOrgUsrService
.
getOrgUsrzhDto
(
AlertCalled
.
getUnitInvolved
());
if
(
orgUsrzhDto
!=
null
&&
orgUsrzhDto
.
size
()
>
0
&&
orgUsrzhDto
.
get
(
0
)
!=
null
)
{
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()
==
null
?
null
:
Long
.
valueOf
(
orgUsrzhDto
.
get
(
0
).
getBuildId
());
buildIdName
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()
==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBuildName
();
}
}
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
AlertFormValue
>
list
=
buildId
==
null
?
null
:
iAlertFormValueService
.
getzqlist
(
id
);
List
<
AlertFormValue
>
list
=
buildId
==
null
?
null
:
iAlertFormValueService
.
getzqlist
(
id
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"keySiteExcle"
.
equals
(
alertFormValue
.
getFieldCode
())&&
alertFormValue
.
getFieldValue
()!=
null
)
{
if
(
"keySiteExcle"
.
equals
(
alertFormValue
.
getFieldCode
())
&&
alertFormValue
.
getFieldValue
()
!=
null
)
{
List
<
OrgMenuDto
>
list1
=
new
ArrayList
<
OrgMenuDto
>();
List
<
OrgMenuDto
>
children
=
new
ArrayList
<
OrgMenuDto
>();
OrgMenuDto
date
=
new
OrgMenuDto
(
Long
.
valueOf
(
alertFormValue
.
getFieldValueCode
()),
Long
.
valueOf
(
alertFormValue
.
getFieldValueCode
()),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getFieldValue
(),
null
);
OrgMenuDto
date
=
new
OrgMenuDto
(
Long
.
valueOf
(
alertFormValue
.
getFieldValueCode
()),
Long
.
valueOf
(
alertFormValue
.
getFieldValueCode
()),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getFieldValue
(),
null
);
children
.
add
(
date
);
OrgMenuDto
orgMenuDto
=
new
OrgMenuDto
();
OrgMenuDto
orgMenuDto
=
new
OrgMenuDto
();
orgMenuDto
.
setKey
(
buildId
);
orgMenuDto
.
setValue
(
buildId
);
orgMenuDto
.
setChildren
(
children
);
...
...
@@ -1159,23 +1126,23 @@ public class CommandController extends BaseController {
}
}
}
return
ResponseHelper
.
buildResponse
(
buildId
==
null
?
null
:
keySiteService
.
getBuildAndKeyTree
(
buildId
));
return
ResponseHelper
.
buildResponse
(
buildId
==
null
?
null
:
keySiteService
.
getBuildAndKeyTree
(
buildId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据重点部位id查询详情"
,
notes
=
"根据重点部位id查询详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据重点部位id查询详情"
,
notes
=
"根据重点部位id查询详情"
)
@GetMapping
(
value
=
"/getkeySite/{sequenceNbr}"
)
public
ResponseModel
<
KeySiteDto
>
getkeySite
(
@PathVariable
Long
sequenceNbr
)
{
Map
<
String
,
List
<
AttachmentDto
>>
files
=
sourceFileService
.
getAttachments
(
sequenceNbr
);
KeySiteDto
dto
=
keySiteService
.
getSequenceNbr
(
sequenceNbr
);
KeySiteDto
dto
=
keySiteService
.
getSequenceNbr
(
sequenceNbr
);
List
<
String
>
list
=
new
ArrayList
<
String
>();
if
(
files
!=
null
&&
dto
!=
null
)
{
if
(
files
!=
null
&&
dto
!=
null
)
{
if
(
files
!=
null
&&
dto
!=
null
)
{
if
(
files
!=
null
&&
dto
!=
null
)
{
dto
.
setAttachments
(
files
);
JSONArray
array
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
files
.
get
(
"keySitePhoto"
)));
if
(
array
!=
null
&&
array
.
size
()>
0
)
{
for
(
Object
i
:
array
)
{
JSONArray
array
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
files
.
get
(
"keySitePhoto"
)));
if
(
array
!=
null
&&
array
.
size
()
>
0
)
{
for
(
Object
i
:
array
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
i
));
list
.
add
(
object
.
getString
(
"url"
));
}
...
...
@@ -1187,9 +1154,9 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派列表"
,
notes
=
"app-根据警情id查询力量调派列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派列表"
,
notes
=
"app-根据警情id查询力量调派列表"
)
@GetMapping
(
value
=
"/app/transferList"
)
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
page
=
new
Page
();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
...
...
@@ -1197,7 +1164,7 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派资源统计"
,
notes
=
"app-根据警情id查询力量调派资源统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派资源统计"
,
notes
=
"app-根据警情id查询力量调派资源统计"
)
@GetMapping
(
value
=
"/app/transfer/statistics"
)
public
ResponseModel
getPowerTransferStatistics
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferStatistics
(
Long
.
valueOf
(
alertId
),
type
));
...
...
@@ -1282,7 +1249,6 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/DynamicFlightInfo/{dynamicFlightId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"航班信息"
,
notes
=
"航班信息"
)
...
...
@@ -1295,125 +1261,128 @@ public class CommandController extends BaseController {
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"AlertCalledStatusPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"未结束的灾情列表"
,
notes
=
"未结束的灾情列表"
)
public
ResponseModel
<
Page
<
AlertCalled
>>
AlertCalledStatusPage
(
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
)
{
public
ResponseModel
<
Page
<
AlertCalled
>>
AlertCalledStatusPage
(
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
)
{
if
(
null
==
current
||
null
==
size
)
{
current
=
1
;
size
=
Integer
.
MAX_VALUE
;
}
List
<
AlertCalled
>
list
=
iAlertCalledService
.
AlertCalledStatusPage
(
current
,
size
);
int
num
=
iAlertCalledService
.
AlertCalledcount
(
0
);
List
<
AlertCalled
>
list
=
iAlertCalledService
.
AlertCalledStatusPage
(
current
,
size
);
int
num
=
iAlertCalledService
.
AlertCalledcount
(
0
);
Page
<
AlertCalled
>
pageBean
=
new
Page
<>(
current
,
size
,
num
);
pageBean
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"equipmentCarList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
public
ResponseModel
<
Object
>
equipmentCarList
(
String
name
,
String
code
,
public
ResponseModel
<
Object
>
equipmentCarList
(
String
name
,
String
code
,
String
pageNum
,
String
pageSize
,
Boolean
isNo
)
{
Boolean
isNo
)
{
//获取用户所属单位id
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
teamId
=
null
;
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
teamId
=
null
;
// Firefighters orgUsr= firefightersService.selectByAmosOrgId(Long.valueOf(agencyUserModel.getUserId()));
// teamId=orgUsr!=null?Long.valueOf(orgUsr.getFireTeamId()):null;
Long
id
=
null
;
Long
id
=
null
;
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
id
=
userCar
!=
null
?
userCar
.
getCarId
():
null
;
if
(
id
==
null
&&
isNo
!=
null
&&
isNo
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
null
);
map
.
put
(
"data"
,
null
);
id
=
userCar
!=
null
?
userCar
.
getCarId
()
:
null
;
if
(
id
==
null
&&
isNo
!=
null
&&
isNo
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
null
);
map
.
put
(
"data"
,
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
ResponseModel
<
Object
>
data
=
equipFeignClient
.
equipmentCarList
(
teamId
,
name
,
code
,
pageNum
,
pageSize
,
id
,
isNo
);
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
userCar
!=
null
?
userCar
.
getCarId
():
null
);
map
.
put
(
"data"
,
data
!=
null
?
data
.
getResult
():
null
);
ResponseModel
<
Object
>
data
=
equipFeignClient
.
equipmentCarList
(
teamId
,
name
,
code
,
pageNum
,
pageSize
,
id
,
isNo
);
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
userCar
!=
null
?
userCar
.
getCarId
()
:
null
);
map
.
put
(
"data"
,
data
!=
null
?
data
.
getResult
()
:
null
);
return
ResponseHelper
.
buildResponse
(
map
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"countUserCarExecuting"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户绑定的车辆的状态为执行中的数量"
,
notes
=
"获取用户绑定的车辆的状态为执行中的数量"
)
public
ResponseModel
<
Object
>
countUserCarExecuting
()
{
return
ResponseHelper
.
buildResponse
(
userCarService
.
countUserCarExecuting
(
Long
.
valueOf
(
getUserId
())));
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"gettree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆分类"
,
notes
=
"车辆分类"
)
public
ResponseModel
<
Object
>
gettree
(
)
{
public
ResponseModel
<
Object
>
gettree
()
{
ResponseModel
<
Object
>
data
=
equipFeignClient
.
gettree
();
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
null
);
ResponseModel
<
Object
>
data
=
equipFeignClient
.
gettree
();
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
()
:
null
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"adduserCar/{type}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"增加绑定"
,
notes
=
"增加绑定"
)
public
ResponseModel
<
Object
>
adduserCar
(
@PathVariable
String
type
,
@RequestBody
UserCar
userCar
)
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
public
ResponseModel
<
Object
>
adduserCar
(
@PathVariable
String
type
,
@RequestBody
UserCar
userCar
)
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
userCar
.
setAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
userCar
.
setAmosUserName
(
agencyUserModel
.
getRealName
());
if
(
"1"
.
equals
(
type
))
{
if
(
"1"
.
equals
(
type
))
{
userCarService
.
add
(
userCar
);
}
else
{
}
else
{
userCarService
.
delete
(
userCar
);
}
return
ResponseHelper
.
buildResponse
(
true
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"getAlertCalledId"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取绑定车辆装"
,
notes
=
"获取绑定车辆装"
)
public
ResponseModel
<
UserCar
>
getAlertCalledId
()
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
id
=
null
;
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
id
=
null
;
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
return
ResponseHelper
.
buildResponse
(
userCar
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"getAlertCalledData"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前执行灾情"
,
notes
=
"获取当前执行灾情"
)
public
ResponseModel
<
Object
>
getAlertCalled
()
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
id
=
null
;
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
id
=
null
;
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
//获取正在进行的灾情null
if
(
userCar
!=
null
)
{
AlertCalled
alertCalled
=
powerTransferCompanyResourcesService
.
getByPowerTransferCompanyResourId
(
userCar
.
getCarId
());
if
(
userCar
!=
null
)
{
AlertCalled
alertCalled
=
powerTransferCompanyResourcesService
.
getByPowerTransferCompanyResourId
(
userCar
.
getCarId
());
return
ResponseHelper
.
buildResponse
(
alertCalled
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"getPowerTransferCompanyResourcesService/{carid}/{alertCalledId}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前任务,车辆状态"
,
notes
=
"获取当前任务,车辆状态"
)
public
ResponseModel
<
Object
>
getPowerTransferCompanyResourcesService
(
@PathVariable
Long
carid
,
@PathVariable
Long
alertCalledId
)
{
//获取正在进行的灾情
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesService
.
getByAlertCalledIdCarId
(
alertCalledId
,
carid
);
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesService
.
getByAlertCalledIdCarId
(
alertCalledId
,
carid
);
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyResources
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"updatePowerTransferCompanyResourcesService"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改任务,车辆状态"
,
notes
=
"修改任务,车辆状态"
)
public
ResponseModel
<
Object
>
updatePowerTransferCompanyResourcesService
(
@RequestBody
CarTaskDto
carTaskDto
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferCompanyResourcesServiceImpl.java
View file @
471ef949
...
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.CarStatusInfoDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
...
...
@@ -10,7 +9,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
import
com.yeejoin.amos.boot.module.jcs.api.enums.FireCarStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResourcesMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyResourcesService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -21,26 +19,27 @@ import java.util.ArrayList;
import
java.util.List
;
/**
* 调派单位资源 服务实现类
*
* @author tb
* @date 2021-06-17
*/
* 调派单位资源 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public
class
PowerTransferCompanyResourcesServiceImpl
extends
BaseService
<
PowerTransferCompanyResourcesDto
,
PowerTransferCompanyResources
,
PowerTransferCompanyResourcesMapper
>
implements
IPowerTransferCompanyResourcesService
{
public
class
PowerTransferCompanyResourcesServiceImpl
extends
BaseService
<
PowerTransferCompanyResourcesDto
,
PowerTransferCompanyResources
,
PowerTransferCompanyResourcesMapper
>
implements
IPowerTransferCompanyResourcesService
{
@Resource
PowerTransferCompanyResourcesMapper
powerTransferCompanyResourcesMapper
;
@Autowired
EquipFeignClient
equipFeignClient
;
@Override
public
AlertCalled
getByPowerTransferCompanyResourId
(
Long
id
)
{
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
()
);
queryWrapper
.
eq
(
"resources_id"
,
id
.
toString
()
);
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
());
queryWrapper
.
eq
(
"resources_id"
,
id
.
toString
());
PowerTransferCompanyResources
alertFormValue
=
this
.
getOne
(
queryWrapper
);
if
(
alertFormValue
!=
null
)
{
if
(
alertFormValue
!=
null
)
{
return
powerTransferCompanyResourcesMapper
.
getByPowerTransferCompanyResourId
(
alertFormValue
.
getPowerTransferCompanyId
());
}
return
null
;
...
...
@@ -48,7 +47,7 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
@Override
public
PowerTransferCompanyResources
getByAlertCalledIdCarId
(
Long
alertCalledId
,
Long
carId
)
{
return
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
return
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
}
@Override
...
...
@@ -59,24 +58,24 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
@Override
@Transactional
public
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
)
{
public
void
updatePowerTransferCompanyResourcesService
(
Long
alertCalledId
,
Long
carId
,
String
code
,
int
type
,
String
remarks
)
{
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
try
{
if
(
type
==
2
)
{
if
(
type
==
2
)
{
powerTransferCompanyResources
.
setStatus
(
code
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
List
<
Object
>
carStatusInfoDtoList
=
new
ArrayList
();
//修改装备信息
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
carStatusInfo
.
setSequenceNbr
(
carId
+
""
);
carStatusInfo
.
setSequenceNbr
(
carId
+
""
);
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
carStatusInfoDtoList
.
add
(
carStatusInfo
);
// 更新所有车辆状态为执勤
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
}
else
{
}
else
{
powerTransferCompanyResources
.
setCarStatus
(
code
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
...
...
@@ -87,4 +86,11 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
}
@Override
public
PowerTransferCompanyResources
getResourceById
(
String
resourceId
)
{
QueryWrapper
<
PowerTransferCompanyResources
>
powerTransferCompanyResourcesQueryWrapper
=
new
QueryWrapper
<>();
powerTransferCompanyResourcesQueryWrapper
.
eq
(
"resources_id"
,
resourceId
);
return
powerTransferCompanyResourcesMapper
.
selectOne
(
powerTransferCompanyResourcesQueryWrapper
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/UserCarServiceImpl.java
View file @
471ef949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AircraftFileTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AircraftMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.UserCarMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.I
Aircraft
Service
;
import
com.yeejoin.amos.boot.module.jcs.api.service.I
PowerTransferCompanyResources
Service
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IUserCarService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.FileInfoModel
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.DataNotFound
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -49,6 +23,11 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
@Autowired
UserCarMapper
UserCarMapper
;
@Autowired
IPowerTransferCompanyResourcesService
companyResourcesService
;
@Override
public
UserCar
selectByAmosUserId
(
Long
id
)
{
QueryWrapper
<
UserCar
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -61,11 +40,11 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
QueryWrapper
<
UserCar
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"amos_user_id"
,
userCar
.
getAmosUserId
());
UserCar
uer
=
UserCarMapper
.
selectOne
(
queryWrapper
);
if
(
uer
!=
null
)
{
UserCar
uer
=
UserCarMapper
.
selectOne
(
queryWrapper
);
if
(
uer
!=
null
)
{
userCar
.
setSequenceNbr
(
uer
.
getSequenceNbr
());
UserCarMapper
.
updateById
(
userCar
);
}
else
{
}
else
{
UserCarMapper
.
insert
(
userCar
);
}
}
...
...
@@ -76,4 +55,22 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
queryWrapper
.
eq
(
"amos_user_id"
,
userCar
.
getAmosUserId
());
UserCarMapper
.
delete
(
queryWrapper
);
}
@Override
public
int
countUserCarExecuting
(
Long
userId
)
{
UserCar
userCar
=
this
.
selectByAmosUserId
(
userId
);
if
(
userCar
==
null
)
{
return
0
;
}
PowerTransferCompanyResources
resource
=
companyResourcesService
.
getResourceById
(
userCar
.
getCarId
().
toString
());
if
(
resource
==
null
)
{
return
0
;
}
if
(
"executing"
.
equals
(
resource
.
getCarStatus
()))
{
return
1
;
}
else
{
return
0
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
471ef949
...
...
@@ -242,7 +242,7 @@ public class PlanTaskController extends AbstractBaseController {
* 根据点查询用户权限所有巡检执行计划
*
* @param dataType 数据类型
* @param
serial
巡检点编号
* @param
pointNo
巡检点编号
* @param planTaskId 巡检任务Id
* @return
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/PlanTaskController.java
View file @
471ef949
...
...
@@ -22,12 +22,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.PostMapping
;
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.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -515,6 +510,27 @@ public class PlanTaskController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
planTaskService
.
getPlanTasks
(
params
,
pageable
));
}
/**
* 根据用户统计待办任务数量
*
* @param userId 用户id
* @return 统计数量
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"消防监督待办任务查询-mobile"
,
notes
=
"根据用户查询执行中的任务"
)
@GetMapping
(
"/countWaitingTaskByUser"
)
public
CommonResponse
countWaitingTaskByUser
(
@ApiParam
(
value
=
"用户ID"
)
@RequestParam
(
"userId"
)
String
userId
)
{
try
{
return
CommonResponseUtil
.
success
(
planTaskService
.
countWaitingTaskByUser
(
userId
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据检查任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
,
notes
=
"根据检查任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/PlanTaskMapper.java
View file @
471ef949
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dao
.
mapper
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckChkExListBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PlanTaskPointInputItemBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo
;
...
...
@@ -12,39 +8,48 @@ import com.yeejoin.amos.supervision.business.param.PlanTaskPageParam;
import
com.yeejoin.amos.supervision.business.vo.CodeOrderVo
;
import
com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTask
;
import
com.yeejoin.amos.supervision.dao.entity.PointInputItem
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PlanTaskMapper
extends
BaseMapper
{
/**
* 统计-计划执行
*
* @param params
* @return
*/
long
countPlanTask
(
PlanTaskPageParam
params
);
/**
* 计划执行查询
*
* @param params
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
);
/**
* 批量删除
*
* @param strArry
*/
void
planTaskDet
(
String
[]
strArry
);
/**
* 更新任务表
*
* @param param
*/
void
updatePlanTaskPtInfo
(
HashMap
<
String
,
Object
>
param
);
/**
* 查询需删除的任务信息列表
*
* @param param
* @return
*/
...
...
@@ -57,6 +62,7 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
*/
List
<
PlanTask
>
getPlanTaskByRouteId
(
@Param
(
value
=
"routeId"
)
Long
routeId
);
/**
* 根据巡检点id获取关联的计划任务
*
...
...
@@ -64,48 +70,68 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getPlanTaskByPointId
(
HashMap
<
String
,
Object
>
param
);
/**
* 根据条件查询计划任务列表
*
* @param params
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
/**
* 根据用户统计待办任务数量
*
* @param userId 用户id
* @return 统计数量
*/
int
countWaitingTaskByUser
(
@Param
(
value
=
"userId"
)
String
userId
);
/**
* 通过计划任务Id获得计划任务信息
*
* @param planTaskId
* @return
*/
Map
queryPlanTaskById
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
);
Map
queryPlanTaskById
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
);
/**
* 通过计划任务Id获取任务所有点信息
*
* @param params
* @return
*/
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
);
long
getPlanTaskPointsCount
(
HashMap
<
String
,
Object
>
params
);
/**
* 获取用户当前所有可以做的任务个数
*
* @param userId
* @return
*/
int
getCurrentPlanTaskCount
(
@Param
(
value
=
"userId"
)
String
userId
);
int
getCurrentPlanTaskCount
(
@Param
(
value
=
"userId"
)
String
userId
);
/**
* 根据计划任务id获取所有巡检项信息
*
* @param planTaskId
* @return
*/
List
<
PlanTaskPointInputItemBo
>
getPlanTaskPointInputItemByPlanTaskId
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
,
@Param
(
value
=
"planTaskDetailStatus"
)
String
planTaskDetailStatus
);
List
<
PlanTaskPointInputItemBo
>
getPlanTaskPointInputItemByPlanTaskId
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
,
@Param
(
value
=
"planTaskDetailStatus"
)
String
planTaskDetailStatus
);
/**
* 条件查询数据
*
* @param param
* @return
*/
List
<
PlanTaskVo
>
getPlanTaskInfoList
(
PlanTaskPageParam
param
);
/**
* 根据ids获取执行计划
*
* @param ids
* @return
*/
...
...
@@ -113,16 +139,20 @@ public interface PlanTaskMapper extends BaseMapper {
/**
* 分页统计
*
* @param param
* @return
*/
long
countChkExListData
(
CheckPtListPageParam
param
);
/**
* 今日执行情况,业务信息查询
*
* @param param
* @return
*/
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
...
...
@@ -130,6 +160,7 @@ public interface PlanTaskMapper extends BaseMapper {
/**
* 根据计划id和点id获取点详情
*
* @param planTaskId
* @param pointId
* @return
...
...
@@ -138,19 +169,24 @@ public interface PlanTaskMapper extends BaseMapper {
/**
* 根据路线id和点id获取该点的检查项
*
* @param routeId
* @param pointId
* @return
*/
List
<
PointCheckDetailBo
>
getPointInputByRouteIdAndPointId
(
@Param
(
"routeId"
)
Long
routeId
,
@Param
(
"pointId"
)
Long
pointId
);
List
<
PointCheckDetailBo
>
getPointInputByRouteIdAndPointId
(
@Param
(
"routeId"
)
Long
routeId
,
@Param
(
"pointId"
)
Long
pointId
);
/**
* 统计当日任务累计完成情况
*
* @param loginOrgCode
* @return
*/
String
getCumulativePlanCountByOrgCode
(
@Param
(
"orgCode"
)
String
loginOrgCode
);
/**
* 获取用户离线巡检计划任务信息
*
* @param params
* @return
*/
...
...
@@ -163,17 +199,19 @@ public interface PlanTaskMapper extends BaseMapper {
* @param pointId
* @return
*/
List
<
PointInputItem
>
getRoutePointInputItem
(
@Param
(
value
=
"routeId"
)
long
routeId
,
@Param
(
value
=
"pointId"
)
long
pointId
);
List
<
PointInputItem
>
getRoutePointInputItem
(
@Param
(
value
=
"routeId"
)
long
routeId
,
@Param
(
value
=
"pointId"
)
long
pointId
);
List
<
CodeOrderVo
>
queryCodeOrderVo
(
HashMap
<
String
,
Object
>
params
);
/**
* 重新统计用户重做日期段内计划任务
*
* @param userId
* @param refDate
* @param orgCode
*/
void
reformStatistics
(
@Param
(
value
=
"userId"
)
String
userId
,
@Param
(
value
=
"refDate"
)
String
refDate
,
@Param
(
value
=
"orgCode"
)
String
orgCode
);
void
reformStatistics
(
@Param
(
value
=
"userId"
)
String
userId
,
@Param
(
value
=
"refDate"
)
String
refDate
,
@Param
(
value
=
"orgCode"
)
String
orgCode
);
List
<
Map
<
String
,
Object
>>
countFinishByPlanIds
(
List
<
Long
>
planIds
);
...
...
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 @
471ef949
...
...
@@ -43,6 +43,7 @@ import com.yeejoin.amos.supervision.exception.YeeException;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
com.yeejoin.amos.supervision.quartz.IJobService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.assertj.core.util.Lists
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -608,6 +609,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
int
countWaitingTaskByUser
(
String
userId
)
{
return
planTaskMapper
.
countWaitingTaskByUser
(
userId
);
}
@Override
public
Map
queryPlanTaskById
(
Long
planTaskId
)
{
Map
map
=
new
HashMap
();
map
=
planTaskMapper
.
queryPlanTaskById
(
planTaskId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IPlanTaskService.java
View file @
471ef949
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.supervision.business.vo.CodeOrderVo;
import
com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
...
...
@@ -39,8 +40,10 @@ public interface IPlanTaskService {
* 执行计划导出
*/
List
<
PlanTaskVo
>
planTaskReport
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
params
);
/**
* 自动任务执行
*
* @param runDate
*/
void
taskExecution
(
String
runDate
);
...
...
@@ -62,6 +65,7 @@ public interface IPlanTaskService {
/**
* app 根据条件查询用户权限内所有当前巡检计划任务
*
* @param params
* @return
*/
...
...
@@ -69,6 +73,7 @@ public interface IPlanTaskService {
/**
* 根据计划任务ID查询任务想起
*
* @param id
* @return
*/
...
...
@@ -76,6 +81,7 @@ public interface IPlanTaskService {
/**
* 天剑查询假话任务信息
*
* @param params
* @param page
* @return
...
...
@@ -83,7 +89,16 @@ public interface IPlanTaskService {
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
);
/**
* 根据用户统计待办任务数量
*
* @param userId 用户id
* @return 统计数量
*/
int
countWaitingTaskByUser
(
String
userId
);
/**
* 根据计划任务Id获取计划任务信息
*
* @param planTaskId
* @return
*/
...
...
@@ -91,6 +106,7 @@ public interface IPlanTaskService {
/**
* 根据计划ID获取所有的 任务计划巡检点
*
* @param params
* @return
*/
...
...
@@ -98,12 +114,15 @@ public interface IPlanTaskService {
/**
* 获取用户当前所有有的计划任务
*
* @param userId
* @return
*/
int
getCurrentPlanTaskCount
(
String
userId
);
/**
* 今日执行情况
*
* @param params
* @return
*/
...
...
@@ -111,25 +130,28 @@ public interface IPlanTaskService {
/**
* 根据id获取执行计划
*
* @param ids
* @return
*/
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
);
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
);
/**
* 根据任务id点id 获取点详情
*
* @param planTaskId
* @param pointId
* @return
*/
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
AppPointCheckRespone
queryPointPlanTaskDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
AppPointCheckRespone
queryPointPlanTaskDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
/**
* 获取公司计划累计情况
*
* @param loginOrgCode
* @return
*/
...
...
@@ -146,7 +168,7 @@ public interface IPlanTaskService {
void
initPlanStatusOrGenDate
();
List
<
Map
<
String
,
Object
>>
queryPlanTaskTimeAxis
(
Long
userId
,
Integer
createDate
);
List
<
Map
<
String
,
Object
>>
queryPlanTaskTimeAxis
(
Long
userId
,
Integer
createDate
);
List
<
Map
<
String
,
Object
>>
queryTimeAxis
(
Long
userId
,
Integer
createDate
);
List
<
Map
<
String
,
Object
>>
queryTimeAxis
(
Long
userId
,
Integer
createDate
);
}
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
471ef949
...
...
@@ -11,20 +11,24 @@
LEFT JOIN p_plan_task a ON a.id = b.task_no
LEFT JOIN p_point d ON d.id = b.point_id
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
AND
((
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
)
((
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
)
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{beginDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{beginDate}
</if>
)
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{endDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{endDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
)
<if
test=
"status!=null"
>
and b.is_finish
= #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"status!=null"
>
and b.is_finish
= #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
...
...
@@ -62,23 +66,27 @@
</sql>
<!--计划执行查询 -->
<select
id=
"getPlanTaskInfo"
resultType=
"java.util.HashMap"
>
<include
refid=
"planTaskInfoSql"
/>
<include
refid=
"planTaskInfoSql"
/>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
AND
((
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
)
((
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
)
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{beginDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{beginDate}
</if>
)
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{endDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{endDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
)
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
...
...
@@ -91,16 +99,16 @@
</select>
<select
id=
"getPlanTaskInfoList"
resultType=
"com.yeejoin.amos.supervision.business.vo.PlanTaskVo"
>
<include
refid=
"planTaskInfoSql"
/>
<include
refid=
"planTaskInfoSql"
/>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no = #{pointNo}
</if>
<if
test=
"pointName!=null"
>
and c.name like concat(#{pointName},'%')
</if>
<if
test=
"beginDate!=null"
>
and a.begin_Time >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"pointNo!=null"
>
and d.point_no = #{pointNo}
</if>
<if
test=
"pointName!=null"
>
and c.name like concat(#{pointName},'%')
</if>
<if
test=
"beginDate!=null"
>
and a.begin_Time >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
<!-- <if test="status!=null"> and a.finish_status = #{status}</if> -->
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"orgCode!=null"
>
and a.org_code like #{orgCode}
</if>
...
...
@@ -110,7 +118,7 @@
</select>
<select
id=
"getPlanTaskListByIds"
resultType=
"com.yeejoin.amos.supervision.business.vo.PlanTaskVo"
>
<include
refid=
"planTaskInfoSql"
/>
<include
refid=
"planTaskInfoSql"
/>
where b.id in
<foreach
item=
"Id"
collection=
"ids"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{Id}
...
...
@@ -118,16 +126,17 @@
order by b.id
</select>
<delete
id
=
"planTaskDet"
>
<delete
id
=
"planTaskDet"
>
delete from p_plan_task_detail where id in
<foreach
item=
"Id"
collection=
"array"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{Id}
</foreach>
</delete>
<update
id=
"updatePlanTaskPtInfo"
>
<update
id=
"updatePlanTaskPtInfo"
>
update p_plan_task a
set a.point_num = (select count(1) from p_plan_task_detail b where a.id = b.task_no),
a.finish_num = (select count(1) from p_plan_task_detail c where a.id = c.task_no and c.is_finish = #{FINISH_YES})
a.finish_num = (select count(1) from p_plan_task_detail c where a.id = c.task_no and c.is_finish =
#{FINISH_YES})
where a.id in
<foreach
item=
"Id"
collection=
"IDS"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{Id}
...
...
@@ -137,9 +146,9 @@
<select
id=
"getGenPlanTask"
resultType=
"long"
>
select a.id from p_plan_task a
<trim
prefix=
"where"
prefixOverrides=
"AND |OR"
>
<if
test=
"beginDate!=null"
>
and a.begin_Time >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and a.begin_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"beginDate!=null"
>
and a.begin_Time >= #{beginDate}
</if>
<if
test=
"endDate!=null"
>
and a.begin_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
</trim>
</select>
...
...
@@ -153,7 +162,8 @@
<select
id=
"getPlanTaskByPointId"
resultType=
"Map"
>
SELECT ptd.point_id pointId, pt.id planTaskId,
pt.org_code OrgCode, p.name taskName, pt.status , pt.user_id userId,
date_format(pt.begin_time, '%Y-%m-%d %H:%i:%s') beginTime, date_format(pt.end_time, '%Y-%m-%d %H:%i:%s') endTime, pt.check_date checkDate,
date_format(pt.begin_time, '%Y-%m-%d %H:%i:%s') beginTime, date_format(pt.end_time, '%Y-%m-%d %H:%i:%s')
endTime, pt.check_date checkDate,
pt.finish_num finishNum, pt.finish_status finishStatus,pt.batch_no batchNo
FROM
p_plan p
...
...
@@ -161,10 +171,10 @@
LEFT JOIN p_plan_task_detail ptd ON ptd.task_no = pt.id
where
pt.finish_status = 1
<if
test=
"pointId!=null"
>
and ptd.point_id = #{pointId}
</if>
<if
test=
"pointId!=null"
>
and ptd.point_id = #{pointId}
</if>
<if
test=
"orgCode!=null"
>
and p.org_code = #{orgCode}
</if>
<if
test=
"adminOrgCode!=null"
>
and p.org_code like concat(#{adminOrgCode},'%')
</if>
<if
test=
"userId!=null"
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"userId!=null"
>
and find_in_set(#{userId},pt.user_id)>0
</if>
and pt.status = 0
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
and SYSDATE()
<![CDATA[<]]>
pt.end_time
...
...
@@ -209,16 +219,16 @@
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_route r on r.id = pt.route_id
) a
<include
refid=
"mobile-plan-task-where"
/>
<include
refid=
"mobile-plan-task-where"
/>
limit #{offset},#{pageSize}
</select>
<sql
id=
"mobile-plan-task-where"
>
<where>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},a.executorId)>0
</if>
<if
test=
"companyId != null"
>
and find_in_set(#{companyId},a.owner_id)>0
</if>
<if
test=
"taskType != null"
>
and a.checkTypeId = #{taskType}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},a.executorId)>0
</if>
<if
test=
"companyId != null"
>
and find_in_set(#{companyId},a.owner_id)>0
</if>
<if
test=
"taskType != null"
>
and a.checkTypeId = #{taskType}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
...
...
@@ -239,17 +249,17 @@
)
)
</if>
<!-- <choose>-->
<!-- <when test="identityType==1">-->
<!-- And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )-->
<!-- <if test="companyId != null"> and a.owner_id = #{companyId}</if>-->
<!-- </when>-->
<!-- <when test="identityType==2">-->
<!-- And a.owner_id = #{companyId}-->
<!-- </when>-->
<!-- </choose>-->
<!-- <choose>-->
<!-- <when test="identityType==1">-->
<!-- And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )-->
<!-- <if test="companyId != null"> and a.owner_id = #{companyId}</if>-->
<!-- </when>-->
<!-- <when test="identityType==2">-->
<!-- And a.owner_id = #{companyId}-->
<!-- </when>-->
<!-- </choose>-->
</where>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
</sql>
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
...
...
@@ -272,7 +282,7 @@
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_route r on r.id = pt.route_id
) a
<include
refid=
"mobile-plan-task-where"
/>
<include
refid=
"mobile-plan-task-where"
/>
</select>
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
SELECT
...
...
@@ -350,7 +360,7 @@
LEFT JOIN p_plan p ON pt.plan_id = p.id
) a
where 1 = 1
<if
test=
"planTaskId != null and planTaskId >0 "
>
and a.planTaskId = #{planTaskId}
</if>
<if
test=
"planTaskId != null and planTaskId >0 "
>
and a.planTaskId = #{planTaskId}
</if>
</select>
<select
id=
"getPlanTaskPoints"
resultType=
"Map"
>
...
...
@@ -380,9 +390,9 @@
LEFT JOIN p_plan ppn ON ppn.id = pt.plan_id
WHERE
p.is_delete = 0
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},ptd.executor_id)>0
</if>
<if
test=
"finishStatus != null and finishStatus!=''"
>
and ptd.is_finish = #{finishStatus}
</if>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},ptd.executor_id)>0
</if>
<if
test=
"finishStatus != null and finishStatus!=''"
>
and ptd.is_finish = #{finishStatus}
</if>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
...
...
@@ -391,10 +401,10 @@
)
)
</if>
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
limit #{offset},#{pageSize}
</select>
...
...
@@ -410,9 +420,9 @@
LEFT JOIN p_plan ppn ON ppn.id = pt.plan_id
WHERE
p.is_delete = 0
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},ptd.executor_id)>0
</if>
<if
test=
"finishStatus != null and finishStatus!=''"
>
and ptd.is_finish = #{finishStatus}
</if>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},ptd.executor_id)>0
</if>
<if
test=
"finishStatus != null and finishStatus!=''"
>
and ptd.is_finish = #{finishStatus}
</if>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
...
...
@@ -421,9 +431,9 @@
)
)
</if>
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
</select>
<select
id=
"getCurrentPlanTaskCount"
resultType=
"int"
parameterType=
"long"
>
...
...
@@ -438,7 +448,8 @@
<if
test=
"userId != null and userId > 0"
>
and find_in_set( #{userId},pt.user_id)>0
</if>
</select>
<select
id=
"getPlanTaskPointInputItemByPlanTaskId"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PlanTaskPointInputItemBo"
>
<select
id=
"getPlanTaskPointInputItemByPlanTaskId"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PlanTaskPointInputItemBo"
>
SELECT
ppi.input_item_id inputItemId,
...
...
@@ -498,8 +509,10 @@
p_plan b
<!-- s_user c -->
WHERE
<!-- A.USER_ID = C.ID AND -->
A.PLAN_ID = B.ID
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and date_format(a.end_time, '%Y%m%d') >= #{checkDate}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and
date_format(a.end_time, '%Y%m%d') >= #{checkDate}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
</if>
</select>
...
...
@@ -521,8 +534,10 @@
p_plan b
<!-- s_user c -->
WHERE
<!-- A.USER_ID = C.ID AND -->
A.PLAN_ID = B.ID
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and date_format(a.end_time, '%Y%m%d') >= #{checkDate}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and
date_format(a.end_time, '%Y%m%d') >= #{checkDate}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
</if>
order by a.id
...
...
@@ -588,13 +603,14 @@
<if
test=
"userId != null and userId > 0"
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"orgCode != null and orgCode !='' "
>
and pt.org_code like CONCAT(#{orgCode}, '%')
</if>
<if
test=
"userDept != null and userDept !='' "
>
and pt.user_dept like CONCAT('%', #{userDept}, '%')
</if>
<if
test=
"startTime != null and startTime != '' "
>
and pt.end_time
<![CDATA[>=]]>
#{startTime}
</if>
<if
test=
"endTime != null and endTime != '' "
>
and pt.begin_time
<![CDATA[<=]]>
#{endTime}
</if>
<if
test=
"startTime != null and startTime != '' "
>
and pt.end_time
<![CDATA[>=]]>
#{startTime}
</if>
<if
test=
"endTime != null and endTime != '' "
>
and pt.begin_time
<![CDATA[<=]]>
#{endTime}
</if>
</where>
) a
</select>
<select
id=
"getPointPlanTaskInfo"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
<select
id=
"getPointPlanTaskInfo"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
SELECT
pp.id pointId,
pp.`name` pointName,
...
...
@@ -620,7 +636,8 @@
</where>
</select>
<select
id=
"getPointInputByRouteIdAndPointId"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
<select
id=
"getPointInputByRouteIdAndPointId"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
SELECT
pii.`name` inputName,
pii.id checkInputId,
...
...
@@ -684,7 +701,7 @@
p_plan_task_detail t
LEFT JOIN p_plan_task p on p.id = t.task_no
WHERE 1=1
<if
test=
"orgCode != null and orgCode !=''"
>
<if
test=
"orgCode != null and orgCode !=''"
>
And (p.org_code LIKE CONCAT( #{orgCode}, '-%' ) or p.org_code= #{orgCode} )
</if>
AND p.check_date = DATE_FORMAT(SYSDATE(),'%Y-%m-%d')
...
...
@@ -702,7 +719,7 @@
<result
column=
"inOrder"
property=
"inOrder"
/>
<result
column=
"remark"
property=
"remark"
/>
<collection
property=
"points"
ofType=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskPointVo"
select=
"getPlanTaskLeavePoints"
column=
"{planTaskId=planTaskId}"
>
select=
"getPlanTaskLeavePoints"
column=
"{planTaskId=planTaskId}"
>
</collection>
</resultMap>
...
...
@@ -718,10 +735,10 @@
<result
column=
"orderNo"
property=
"orderNo"
/>
<result
column=
"remark"
property=
"remark"
/>
<collection
property=
"classify"
ofType=
"Map"
select=
"queryPointClassifyByRouteIdAndPointId"
column=
"{routeId=routeId,pointId=pointId}"
>
column=
"{routeId=routeId,pointId=pointId}"
>
</collection>
<collection
property=
"inputItems"
ofType=
"Map"
select=
"getRoutePointInputItem"
column=
"{routeId=routeId,pointId=pointId}"
>
column=
"{routeId=routeId,pointId=pointId}"
>
</collection>
</resultMap>
...
...
@@ -754,14 +771,14 @@
<resultMap
id=
"routePointInputItemMap"
type=
"com.yeejoin.amos.supervision.business.vo.PointInputItemVo"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"inputItemId"
column=
"input_item_id"
/>
<result
property=
"classifyIds"
column=
"classify_ids"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"riskDesc"
column=
"risk_desc"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"inputItemId"
column=
"input_item_id"
/>
<result
property=
"classifyIds"
column=
"classify_ids"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"riskDesc"
column=
"risk_desc"
/>
</resultMap>
<select
id=
"getRoutePointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.vo.PointInputItemVo"
>
SELECT
...
...
@@ -893,18 +910,18 @@
WHERE
1 = 1
and pt.finish_status in (0,1)
<if
test=
"userId != null and userId > 0"
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"userId != null and userId > 0"
>
and find_in_set(#{userId},pt.user_id)>0
</if>
<if
test=
"orgCode != null and orgCode !='' "
>
and pt.org_code like CONCAT(#{orgCode}, '%')
</if>
ORDER BY begin_time
</select>
<resultMap
id=
"codeOrderVoMap"
type=
"com.yeejoin.amos.supervision.business.vo.CodeOrderVo"
>
<result
property=
"inOrder"
column=
"in_order"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"playTaskId"
column=
"playTaskId"
/>
<result
property=
"pointNo"
column=
"pointNo"
/>
<result
property=
"status"
column=
"finish_status"
/>
<result
property=
"isFinish"
column=
"is_finish"
/>
<result
property=
"inOrder"
column=
"in_order"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"playTaskId"
column=
"playTaskId"
/>
<result
property=
"pointNo"
column=
"pointNo"
/>
<result
property=
"status"
column=
"finish_status"
/>
<result
property=
"isFinish"
column=
"is_finish"
/>
</resultMap>
<select
id=
"queryCodeOrderVo"
resultMap=
"codeOrderVoMap"
>
SELECT
...
...
@@ -918,7 +935,7 @@
order by rp.order_no
</select>
<update
id=
"reformStatistics"
>
<update
id=
"reformStatistics"
>
call planTaskStatistics(#{userId}, #{refDate}, #{orgCode});
</update>
...
...
@@ -949,9 +966,9 @@
LEFT JOIN p_plan pp ON pp.id = ppk.plan_id
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
<where>
<if
test=
"userId != null "
>
and find_in_set(#{userId},ppk.user_id)
</if>
<if
test=
"beginTime != null and beginTime != '' "
>
and ppk.begin_time
<![CDATA[>=]]>
#{beginTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
and ppk.end_time
<![CDATA[<=]]>
#{endTime}
</if>
<if
test=
"userId != null "
>
and find_in_set(#{userId},ppk.user_id)
</if>
<if
test=
"beginTime != null and beginTime != '' "
>
and ppk.begin_time
<![CDATA[>=]]>
#{beginTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
and ppk.end_time
<![CDATA[<=]]>
#{endTime}
</if>
</where>
GROUP BY
ppk.begin_time,
...
...
@@ -977,9 +994,9 @@
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
LEFT JOIN p_point point ON point.id = pptd.point_id
<where>
<if
test=
"userId != null "
>
and find_in_set(#{userId},ppk.user_id)
</if>
<if
test=
"beginTime != null and beginTime != '' "
>
and ppk.begin_time
<![CDATA[>=]]>
#{beginTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
and ppk.end_time
<![CDATA[<=]]>
#{endTime}
</if>
<if
test=
"userId != null "
>
and find_in_set(#{userId},ppk.user_id)
</if>
<if
test=
"beginTime != null and beginTime != '' "
>
and ppk.begin_time
<![CDATA[>=]]>
#{beginTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
and ppk.end_time
<![CDATA[<=]]>
#{endTime}
</if>
</where>
GROUP BY
ppk.begin_time,
...
...
@@ -987,4 +1004,17 @@
ORDER BY
ppk.begin_time DESC LIMIT 60
</select>
<select
id=
"countWaitingTaskByUser"
resultType=
"java.lang.Integer"
>
SELECT
COUNT( 1 )
FROM
p_plan_task
WHERE
DATE_FORMAT( begin_time, '%y-%M-%d' )
<![CDATA[<=]]>
DATE_FORMAT( SYSDATE( ), '%y-%M-%d' )
AND DATE_FORMAT( end_time, '%y-%M-%d' )
<![CDATA[>=]]>
DATE_FORMAT( SYSDATE( ), '%y-%M-%d' )
AND FIND_IN_SET(
#{userId}, user_id)
AND finish_status = 1
</select>
</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