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
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1703 additions
and
1611 deletions
+1703
-1611
IPowerTransferCompanyResourcesService.java
...cs/api/service/IPowerTransferCompanyResourcesService.java
+16
-11
IUserCarService.java
...oin/amos/boot/module/jcs/api/service/IUserCarService.java
+12
-10
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+393
-424
PowerTransferCompanyResourcesServiceImpl.java
...ervice/impl/PowerTransferCompanyResourcesServiceImpl.java
+24
-18
UserCarServiceImpl.java
.../boot/module/jcs/biz/service/impl/UserCarServiceImpl.java
+29
-32
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
+206
-168
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+7
-1
IPlanTaskService.java
.../supervision/business/service/intfc/IPlanTaskService.java
+133
-111
dbTemplate_plan_task.xml
...ion/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+860
-829
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;
...
@@ -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.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
java.util.List
;
/**
/**
* 调派单位资源 服务类
* 调派单位资源 服务类
*
*
* @author tb
* @author tb
* @date 2021-06-17
* @date 2021-06-17
*/
*/
public
interface
IPowerTransferCompanyResourcesService
{
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
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
;
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
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
*
*
*/
*/
public
interface
IUserCarService
{
public
interface
IUserCarService
{
UserCar
selectByAmosUserId
(
Long
id
);
UserCar
selectByAmosUserId
(
Long
id
);
void
add
(
UserCar
userCar
);
void
add
(
UserCar
userCar
);
void
delete
(
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
...
@@ -99,20 +99,20 @@ public class CommandController extends BaseController {
...
@@ -99,20 +99,20 @@ public class CommandController extends BaseController {
@Autowired
@Autowired
SeismometeorologyDtoDao
seismometeorologyDtoDao
;
SeismometeorologyDtoDao
seismometeorologyDtoDao
;
@Autowired
@Autowired
IOrgUsrService
iOrgUsrService
;
IOrgUsrService
iOrgUsrService
;
@Autowired
@Autowired
ILinkageUnitService
iLinkageUnitService
;
ILinkageUnitService
iLinkageUnitService
;
@Autowired
@Autowired
IAlertSubmittedService
alertSubmittedService
;
IAlertSubmittedService
alertSubmittedService
;
@Autowired
@Autowired
IDataDictionaryService
dataDictionaryService
;
IDataDictionaryService
dataDictionaryService
;
@Autowired
@Autowired
IFireChemicalService
fireChemicalService
;
IFireChemicalService
fireChemicalService
;
@Autowired
@Autowired
IDutyCarService
dutyCarService
;
IDutyCarService
dutyCarService
;
@Autowired
@Autowired
IFireExpertsService
fireExpertsService
;
IFireExpertsService
fireExpertsService
;
@Autowired
@Autowired
IFirefightersService
firefightersService
;
IFirefightersService
firefightersService
;
@Autowired
@Autowired
...
@@ -125,11 +125,11 @@ public class CommandController extends BaseController {
...
@@ -125,11 +125,11 @@ public class CommandController extends BaseController {
RemoteSecurityService
remoteSecurityService
;
RemoteSecurityService
remoteSecurityService
;
@Autowired
@Autowired
IAlertFormValueService
alertFormValueService
;
IAlertFormValueService
alertFormValueService
;
// 文件读取参数
// 文件读取参数
@Value
(
"${file.url}"
)
@Value
(
"${file.url}"
)
private
String
readUrl
;
private
String
readUrl
;
@Autowired
@Autowired
EquipFeignClient
equipFeignClient
;
EquipFeignClient
equipFeignClient
;
@Autowired
@Autowired
PowerTransferMapper
powerTransferMapper
;
PowerTransferMapper
powerTransferMapper
;
@Autowired
@Autowired
...
@@ -151,7 +151,7 @@ public class CommandController extends BaseController {
...
@@ -151,7 +151,7 @@ public class CommandController extends BaseController {
ISourceFileService
sourceFileService
;
ISourceFileService
sourceFileService
;
@Value
(
"${video.url}"
)
@Value
(
"${video.url}"
)
private
String
videoUrl
;
private
String
videoUrl
;
@Autowired
@Autowired
IDutyPersonService
iDutyPersonService
;
IDutyPersonService
iDutyPersonService
;
...
@@ -170,12 +170,12 @@ public class CommandController extends BaseController {
...
@@ -170,12 +170,12 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"JQ/list"
)
@GetMapping
(
value
=
"JQ/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情列表查询"
,
notes
=
"警情列表查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情列表查询"
,
notes
=
"警情列表查询"
)
public
ResponseModel
<
Object
>
listPage
(
RequestData
par
)
{
public
ResponseModel
<
Object
>
listPage
(
RequestData
par
)
{
par
.
setStatus
(
0
);
par
.
setStatus
(
0
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
...
@@ -184,12 +184,12 @@ public class CommandController extends BaseController {
...
@@ -184,12 +184,12 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"history/list"
)
@GetMapping
(
value
=
"history/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情列表查询"
,
notes
=
"警情列表查询"
)
@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
);
par
.
setStatus
(
1
);
}
}
if
(
null
==
pageNum
||
null
==
pageSize
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
...
@@ -198,9 +198,9 @@ public class CommandController extends BaseController {
...
@@ -198,9 +198,9 @@ public class CommandController extends BaseController {
}
else
{
}
else
{
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
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
);
Page
<
AlertCalledZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Integer
num
=
iAlertCalledService
.
alertCalledListByAlertStatusCount
(
par
);
Integer
num
=
iAlertCalledService
.
alertCalledListByAlertStatusCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
@@ -212,60 +212,59 @@ public class CommandController extends BaseController {
...
@@ -212,60 +212,59 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"ZDDW/list"
)
@GetMapping
(
value
=
"ZDDW/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标列表分页查询"
,
notes
=
"保卫目标列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标列表分页查询"
,
notes
=
"保卫目标列表分页查询"
)
public
ResponseModel
<
IPage
<
CompanyDto
>>
listPageZDDW
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
CompanyDto
>>
listPageZDDW
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
CompanyDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
CompanyDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
CompanyDto
>
list
=
iOrgUsrService
.
listContractDto
(
pageNum
,
pageSize
,
par
);
List
<
CompanyDto
>
list
=
iOrgUsrService
.
listContractDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iOrgUsrService
.
listContractDtoCount
(
par
);
Integer
num
=
iOrgUsrService
.
listContractDtoCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
/**
/**
* * @param null
* * @param null
* @return
*
*
<PRE>
* @return
<PRE>
* author tw
* author tw
* date 2021/7/21
* date 2021/7/21
* </PRE>
* </PRE>
* 保卫目标详情
* 保卫目标详情
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/ZDDW"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/ZDDW"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标详情"
,
notes
=
"保卫目标详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标详情"
,
notes
=
"保卫目标详情"
)
public
ResponseModel
<
OrgUsrFormDto
>
selectZDDWById
(
Long
id
)
throws
Exception
{
public
ResponseModel
<
OrgUsrFormDto
>
selectZDDWById
(
Long
id
)
throws
Exception
{
OrgUsrFormDto
orgUsrFormDto
=
iOrgUsrService
.
selectCompanyById
(
id
);
OrgUsrFormDto
orgUsrFormDto
=
iOrgUsrService
.
selectCompanyById
(
id
);
return
ResponseHelper
.
buildResponse
(
orgUsrFormDto
);
return
ResponseHelper
.
buildResponse
(
orgUsrFormDto
);
}
}
/**
/**
* 微型消防站列表分页查询
* 微型消防站列表分页查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"WX/list"
)
@GetMapping
(
value
=
"WX/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"微型消防站列表分页查询"
,
notes
=
"微型消防站列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"微型消防站列表分页查询"
,
notes
=
"微型消防站列表分页查询"
)
public
ResponseModel
<
IPage
<
FireStationzhDto
>>
listPageWx
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
FireStationzhDto
>>
listPageWx
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
FireStationzhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
FireStationzhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireStationzhDto
>
list
=
iFireStationService
.
getStationList
(
pageNum
,
pageSize
,
par
);
List
<
FireStationzhDto
>
list
=
iFireStationService
.
getStationList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireStationService
.
getStationListCount
(
par
);
Integer
num
=
iFireStationService
.
getStationListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
/**
/**
* 水源列表分页查询
* 水源列表分页查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"SY500/list"
)
@GetMapping
(
value
=
"SY500/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"500水源列表分页查询"
,
notes
=
"500水源列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"500水源列表分页查询"
,
notes
=
"500水源列表分页查询"
)
public
ResponseModel
<
IPage
<
WaterResourceZhDto
>>
listPageSY500
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
WaterResourceZhDto
>>
listPageSY500
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
...
@@ -273,41 +272,39 @@ public class CommandController extends BaseController {
...
@@ -273,41 +272,39 @@ public class CommandController extends BaseController {
par
.
setDistance
(
500
D
);
par
.
setDistance
(
500
D
);
Page
<
WaterResourceZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
WaterResourceZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
/**
/**
* 水源列表分页查询
* 水源列表分页查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"video/list"
)
@GetMapping
(
value
=
"video/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频分页查询88"
,
notes
=
"视频分页查询88"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频分页查询88"
,
notes
=
"视频分页查询88"
)
public
ResponseModel
<
Object
>
getVideo
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
Object
>
getVideo
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
if
(
par
.
getAlertId
()!=
null
)
{
if
(
par
.
getAlertId
()
!=
null
)
{
AlertCalled
alertCalled
=
iAlertCalledService
.
getAlertCalledById
(
par
.
getAlertId
());
AlertCalled
alertCalled
=
iAlertCalledService
.
getAlertCalledById
(
par
.
getAlertId
());
par
.
setLatitude
(
alertCalled
.
getCoordinateX
());
par
.
setLatitude
(
alertCalled
.
getCoordinateX
());
par
.
setLongitude
(
alertCalled
.
getCoordinateY
());
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
;
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)+
""
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
record
.
put
(
"url"
,
url
);
}
}
pag
.
setRecords
(
records
);
pag
.
setRecords
(
records
);
}
}
...
@@ -315,11 +312,7 @@ public class CommandController extends BaseController {
...
@@ -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
)
@RequestMapping
(
value
=
"/video/page"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页获取视频"
,
notes
=
"分页获取视频"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页获取视频"
,
notes
=
"分页获取视频"
)
public
ResponseModel
<
Object
>
getVideopage
(
String
current
,
public
ResponseModel
<
Object
>
getVideopage
(
String
current
,
...
@@ -327,16 +320,16 @@ public class CommandController extends BaseController {
...
@@ -327,16 +320,16 @@ public class CommandController extends BaseController {
String
equipmentName
,
String
equipmentName
,
String
code
,
String
code
,
String
buildingId
String
buildingId
)
throws
Exception
{
)
throws
Exception
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideopag
(
current
,
size
,
buildingId
,
code
,
equipmentName
);
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideopag
(
current
,
size
,
buildingId
,
code
,
equipmentName
);
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
():
null
;
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)+
""
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
record
.
put
(
"url"
,
url
);
}
}
pag
.
setRecords
(
records
);
pag
.
setRecords
(
records
);
}
}
...
@@ -348,21 +341,21 @@ public class CommandController extends BaseController {
...
@@ -348,21 +341,21 @@ public class CommandController extends BaseController {
*
*
* @returngetVideo
* @returngetVideo
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"video/pageList"
)
@PostMapping
(
value
=
"video/pageList"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
" app视频分页查询88"
,
notes
=
"app视频分页查询88"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
" app视频分页查询88"
,
notes
=
"app视频分页查询88"
)
public
ResponseModel
<
Object
>
pageList
(
@RequestBody
PageDto
pageDto
)
{
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
.
getSize
(),
pageDto
.
getCode
()
==
null
?
""
:
pageDto
.
getCode
(),
pageDto
.
getCode
()
==
null
?
""
:
pageDto
.
getCode
(),
pageDto
.
getName
()
==
null
?
""
:
pageDto
.
getName
(),
pageDto
.
getName
()
==
null
?
""
:
pageDto
.
getName
(),
pageDto
.
getTypeCode
()
==
null
?
""
:
pageDto
.
getTypeCode
());
pageDto
.
getTypeCode
()
==
null
?
""
:
pageDto
.
getTypeCode
());
Page
<
VideoDto
>
pag
=
data
!=
null
?
data
.
getResult
():
null
;
Page
<
VideoDto
>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
VideoDto
>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
List
<
VideoDto
>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
VideoDto
record
:
records
)
{
for
(
VideoDto
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
getCode
());
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
getCode
());
String
url
=
da
!=
null
?
da
.
getResult
():
null
;
String
url
=
da
!=
null
?
da
.
getResult
()
:
null
;
record
.
setUrl
(
url
);
record
.
setUrl
(
url
);
}
}
pag
.
setRecords
(
records
);
pag
.
setRecords
(
records
);
...
@@ -371,30 +364,25 @@ public class CommandController extends BaseController {
...
@@ -371,30 +364,25 @@ public class CommandController extends BaseController {
}
}
/**
/**
* 水源列表分页查询
* 水源列表分页查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"video/{id}"
)
@GetMapping
(
value
=
"video/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频详情88"
,
notes
=
"视频详情88"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频详情88"
,
notes
=
"视频详情88"
)
public
ResponseModel
<
Object
>
getVideoByid
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
getVideoByid
(
@PathVariable
Long
id
)
{
ResponseModel
<
Map
<
String
,
Object
>>
data
=
equipFeignClient
.
getByid
(
id
);
ResponseModel
<
Map
<
String
,
Object
>>
data
=
equipFeignClient
.
getByid
(
id
);
Map
<
String
,
Object
>
records
=
data
!=
null
?
data
.
getResult
():
null
;
Map
<
String
,
Object
>
records
=
data
!=
null
?
data
.
getResult
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
records
.
get
(
"code"
)+
""
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
records
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
records
.
put
(
"url"
,
url
);
records
.
put
(
"url"
,
url
);
data
.
setResult
(
records
);
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 {
...
@@ -402,21 +390,20 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"SY1000/list"
)
@GetMapping
(
value
=
"SY1000/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"1000水源列表分页查询"
,
notes
=
"1000水源列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"1000水源列表分页查询"
,
notes
=
"1000水源列表分页查询"
)
public
ResponseModel
<
IPage
<
WaterResourceZhDto
>>
listPageSY1000
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
WaterResourceZhDto
>>
listPageSY1000
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
par
.
setDistance
(
1000
D
);
par
.
setDistance
(
1000
D
);
Page
<
WaterResourceZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
WaterResourceZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
List
<
WaterResourceZhDto
>
list
=
iWaterResourceService
.
getWaterResourceList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
Integer
num
=
iWaterResourceService
.
getWaterResourceListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
// /**
// /**
// * 水源列表分页查询
// * 水源列表分页查询
// *
// *
...
@@ -440,14 +427,14 @@ public class CommandController extends BaseController {
...
@@ -440,14 +427,14 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"DW/list"
)
@GetMapping
(
value
=
"DW/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防队伍列表分页查询"
,
notes
=
"消防队伍列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防队伍列表分页查询"
,
notes
=
"消防队伍列表分页查询"
)
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
listPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
listPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
par
.
setTypeCode
(
AlertStageEnums
.
YWDD
.
getCode
());
par
.
setTypeCode
(
AlertStageEnums
.
YWDD
.
getCode
());
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
@@ -458,13 +445,13 @@ public class CommandController extends BaseController {
...
@@ -458,13 +445,13 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"linkageForce/list"
)
@GetMapping
(
value
=
"linkageForce/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动力量列表分页查询"
,
notes
=
"联动力量列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动力量列表分页查询"
,
notes
=
"联动力量列表分页查询"
)
public
ResponseModel
<
IPage
<
LinkageUnitZhDto
>>
linkageForcelistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
LinkageUnitZhDto
>>
linkageForcelistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
LinkageUnitZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
LinkageUnitZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
LinkageUnitZhDto
>
list
=
iLinkageUnitService
.
listLinkageUnitZhDto
(
pageNum
,
pageSize
,
par
);
List
<
LinkageUnitZhDto
>
list
=
iLinkageUnitService
.
listLinkageUnitZhDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iLinkageUnitService
.
listLinkageUnitZhDtoCount
(
par
);
Integer
num
=
iLinkageUnitService
.
listLinkageUnitZhDtoCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
...
@@ -472,8 +459,8 @@ public class CommandController extends BaseController {
...
@@ -472,8 +459,8 @@ public class CommandController extends BaseController {
/**
/**
* * @param null
* * @param null
*
@return
*
* <PRE>
*
@return
<PRE>
* author tw
* author tw
* date 2021/7/21
* date 2021/7/21
* </PRE>
* </PRE>
...
@@ -482,7 +469,7 @@ public class CommandController extends BaseController {
...
@@ -482,7 +469,7 @@ public class CommandController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/linkageForce"
)
@GetMapping
(
value
=
"/linkageForce"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个联动单位"
,
notes
=
"根据sequenceNbr查询单个联动单位"
)
@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
));
return
ResponseHelper
.
buildResponse
(
iLinkageUnitService
.
queryOne
(
id
));
}
}
...
@@ -492,7 +479,7 @@ public class CommandController extends BaseController {
...
@@ -492,7 +479,7 @@ public class CommandController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"ZQ/list"
)
@GetMapping
(
value
=
"ZQ/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤实力列表分页查询"
,
notes
=
"执勤实力列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤实力列表分页查询"
,
notes
=
"执勤实力列表分页查询"
)
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
ZQlistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
ZQlistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
...
@@ -500,57 +487,51 @@ public class CommandController extends BaseController {
...
@@ -500,57 +487,51 @@ public class CommandController extends BaseController {
// par.setTypeCode( AlertStageEnums.ZZZD.getCode()+","+AlertStageEnums.YLJY.getCode());
// par.setTypeCode( AlertStageEnums.ZZZD.getCode()+","+AlertStageEnums.YLJY.getCode());
// }
// }
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
/**
/**
*
* 根据id查询警情详情
* 根据id查询警情详情
*
**/
* **/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"JQ/{id}"
)
@GetMapping
(
value
=
"JQ/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询灾情详情"
,
notes
=
"根据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
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledKeyValueLabelById
(
id
));
}
}
/**
/**
* 根据id查询微型消防站
* 根据id查询微型消防站
*
*
* @param id 主键
* @param id 主键
*
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/WX"
)
@GetMapping
(
value
=
"/WX"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询微型消防站"
,
notes
=
"根据id查询微型消防站"
)
@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
));
return
ResponseHelper
.
buildResponse
(
iFireStationService
.
selectBySequenceNbr
(
id
));
}
}
/**
/**
* 根据id查询水源
* 根据id查询水源
*
*
* @param id 主键
* @param id 主键
*
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/SY"
)
@GetMapping
(
value
=
"/SY"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
jsonObject
.
remove
(
"managementUnit"
);
jsonObject
.
remove
(
"managementUnit"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
...
@@ -561,7 +542,7 @@ public class CommandController extends BaseController {
...
@@ -561,7 +542,7 @@ public class CommandController extends BaseController {
* @param id
* @param id
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/DW"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/DW"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询队伍信息"
,
notes
=
"根据id查询队伍信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询队伍信息"
,
notes
=
"根据id查询队伍信息"
)
public
ResponseModel
<
FireTeam
>
selectById
(
HttpServletRequest
request
,
Long
id
)
{
public
ResponseModel
<
FireTeam
>
selectById
(
HttpServletRequest
request
,
Long
id
)
{
...
@@ -575,38 +556,37 @@ public class CommandController extends BaseController {
...
@@ -575,38 +556,37 @@ public class CommandController extends BaseController {
* @param
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/seismometeorology"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/seismometeorology"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"跑马灯"
,
notes
=
"跑马灯"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"跑马灯"
,
notes
=
"跑马灯"
)
public
ResponseModel
<
Object
>
seismometeorology
()
throws
Exception
{
public
ResponseModel
<
Object
>
seismometeorology
()
throws
Exception
{
RequestData
requestData
=
new
RequestData
();
RequestData
requestData
=
new
RequestData
();
requestData
.
setWhether24
(
true
);
requestData
.
setWhether24
(
true
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
requestData
);
List
<
AlertCalledZhDto
>
list
=
iAlertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
requestData
);
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findCarStateByWatchSn
();
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findCarStateByWatchSn
();
//数据组装
//数据组装
for
(
AlertCalledZhDto
alertCalledZhDto
:
list
)
{
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
());
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
);
li
.
add
(
sto
);
}
}
return
ResponseHelper
.
buildResponse
(
li
);
return
ResponseHelper
.
buildResponse
(
li
);
}
}
/**
/**
* 根据id指令
* 根据id指令
*
*
* @param id
* @param id
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"ZL/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"ZL/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id查询指令信息"
,
notes
=
"根据警情id查询指令信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id查询指令信息"
,
notes
=
"根据警情id查询指令信息"
)
public
ResponseModel
<
List
<
InstructionsZHDto
>>
selectZL
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
List
<
InstructionsZHDto
>>
selectZL
(
@PathVariable
Long
id
)
{
...
@@ -614,15 +594,15 @@ public class CommandController extends BaseController {
...
@@ -614,15 +594,15 @@ 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
)
@RequestMapping
(
value
=
"/gwmcDataDictionary/FireChemical/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询危险品字典"
,
notes
=
"根据字典类型查询危险品字典"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询危险品字典"
,
notes
=
"根据字典类型查询危险品字典"
)
public
ResponseModel
<
Object
>
gwmcDataDictionaryFireChemical
(
@PathVariable
String
type
)
throws
Exception
{
public
ResponseModel
<
Object
>
gwmcDataDictionaryFireChemical
(
@PathVariable
String
type
)
throws
Exception
{
Object
list
=
dataDictionaryService
.
getFireChemical
(
type
);
Object
list
=
dataDictionaryService
.
getFireChemical
(
type
);
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"危化品分页查询"
,
notes
=
"危化品分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"危化品分页查询"
,
notes
=
"危化品分页查询"
)
public
ResponseModel
<
Page
<
FireChemicalDto
>>
queryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
public
ResponseModel
<
Page
<
FireChemicalDto
>>
queryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
...
@@ -637,7 +617,7 @@ public class CommandController extends BaseController {
...
@@ -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
)
@RequestMapping
(
value
=
"/gwmcDataDictionary/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典"
,
notes
=
"根据字典类型查询字典"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典"
,
notes
=
"根据字典类型查询字典"
)
public
ResponseModel
<
Object
>
gwmcDataDictionary
(
@PathVariable
String
type
)
throws
Exception
{
public
ResponseModel
<
Object
>
gwmcDataDictionary
(
@PathVariable
String
type
)
throws
Exception
{
...
@@ -647,7 +627,7 @@ public class CommandController extends BaseController {
...
@@ -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"
)
@GetMapping
(
value
=
"fireExperts/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"外部专家分页查询"
,
notes
=
"外部专家分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"外部专家分页查询"
,
notes
=
"外部专家分页查询"
)
public
ResponseModel
<
IPage
<
FireExpertsDto
>>
queryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
public
ResponseModel
<
IPage
<
FireExpertsDto
>>
queryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
...
@@ -656,33 +636,32 @@ public class CommandController extends BaseController {
...
@@ -656,33 +636,32 @@ public class CommandController extends BaseController {
Page
<
FireExpertsDto
>
page
=
new
Page
<>();
Page
<
FireExpertsDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
pageNum
);
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
page
.
setSize
(
pageSize
);
Page
<
FireExpertsDto
>
fireExpertsDtoPage
=
fireExpertsService
.
queryForFireExpertsPage
(
page
,
false
,
Page
<
FireExpertsDto
>
fireExpertsDtoPage
=
fireExpertsService
.
queryForFireExpertsPage
(
page
,
false
,
fireExpertsDto
.
getName
(),
fireExpertsDto
.
getExpertCode
());
fireExpertsDto
.
getName
(),
fireExpertsDto
.
getExpertCode
());
return
ResponseHelper
.
buildResponse
(
fireExpertsDtoPage
);
return
ResponseHelper
.
buildResponse
(
fireExpertsDtoPage
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"LinkageUnitDto/page"
)
@GetMapping
(
value
=
"LinkageUnitDto/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
@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
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
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
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getFirefighters"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getFirefighters"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"内部专家列表分页查询"
,
notes
=
"内部专家列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"内部专家列表分页查询"
,
notes
=
"内部专家列表分页查询"
)
public
ResponseModel
<
Page
<
FirefightersZhDto
>>
getFirefighters
(
Integer
pageNum
,
Integer
pageSize
,
public
ResponseModel
<
Page
<
FirefightersZhDto
>>
getFirefighters
(
Integer
pageNum
,
Integer
pageSize
,
FirefightersDto
firefighters
)
{
FirefightersDto
firefighters
)
{
if
(
firefighters
.
getAreasExpertiseCode
()==
null
)
{
if
(
firefighters
.
getAreasExpertiseCode
()
==
null
)
{
firefighters
.
setAreasExpertiseCode
(
"0"
);
firefighters
.
setAreasExpertiseCode
(
"0"
);
}
}
//条件分页
//条件分页
if
(
null
==
pageNum
||
null
==
pageSize
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
pageNum
=
1
;
pageNum
=
1
;
...
@@ -696,46 +675,45 @@ public class CommandController extends BaseController {
...
@@ -696,46 +675,45 @@ public class CommandController extends BaseController {
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
/**
/**
*
* 火灾现场统计
* 火灾现场统计
**/
*
* **/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"statistics/{id}"
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"火灾现场统计"
,
notes
=
"火灾现场统计"
)
@GetMapping
(
value
=
"statistics/{id}"
)
public
ResponseModel
<
Object
>
getStatistics
(
@PathVariable
Long
id
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"火灾现场统计"
,
notes
=
"火灾现场统计"
)
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledcount
(
id
));
public
ResponseModel
<
Object
>
getStatistics
(
@PathVariable
Long
id
)
{
}
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledcount
(
id
));
}
/**
/**
* * @param null
* * @param null
*
@return
*
* <PRE>
*
@return
<PRE>
* author tw
* author tw
* date 2021/7/22
* date 2021/7/22
* </PRE>
* </PRE>
* 到场力量统计
* 到场力量统计
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getpower/{id}"
)
@GetMapping
(
value
=
"getpower/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量统计"
,
notes
=
"到场力量统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量统计"
,
notes
=
"到场力量统计"
)
public
ResponseModel
<
Object
>
getpower
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
getpower
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
powercount
(
id
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
powercount
(
id
));
}
}
/**
/**
* * @param null
* * @param null
*
@return
*
* <PRE>
*
@return
<PRE>
* author tw
* author tw
* date 2021/7/22
* date 2021/7/22
* </PRE>
* </PRE>
* 到场力量统计列表
* 到场力量统计列表
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getPowerDataList/{id}"
)
@GetMapping
(
value
=
"getPowerDataList/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量统计列表"
,
notes
=
"到场力量统计列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量统计列表"
,
notes
=
"到场力量统计列表"
)
public
ResponseModel
<
Object
>
getPowerDataList
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
getPowerDataList
(
@PathVariable
Long
id
)
{
...
@@ -743,23 +721,21 @@ public class CommandController extends BaseController {
...
@@ -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}"
)
@GetMapping
(
value
=
"getstate/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取灾情当前阶段"
,
notes
=
"获取灾情当前阶段"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取灾情当前阶段"
,
notes
=
"获取灾情当前阶段"
)
public
ResponseModel
<
Object
>
getstate
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
getstate
(
@PathVariable
Long
id
)
{
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
List
<
StateDot
>
list
=
new
ArrayList
<>();
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
.
add
(
new
StateDot
(
"值班确警"
));
list
.
add
(
new
StateDot
(
"处置跟踪"
));
list
.
add
(
new
StateDot
(
"处置跟踪"
));
list
.
add
(
new
StateDot
(
"处置结束"
));
list
.
add
(
new
StateDot
(
"处置结束"
));
list
.
stream
().
forEach
(
stateDot
->
{
list
.
stream
().
forEach
(
stateDot
->
{
if
(
AlertCalled
.
getAlertStage
().
equals
(
stateDot
.
getName
()))
{
if
(
AlertCalled
.
getAlertStage
().
equals
(
stateDot
.
getName
()))
{
stateDot
.
setFlag
(
true
);
stateDot
.
setFlag
(
true
);
}
}
});
});
...
@@ -768,14 +744,14 @@ public class CommandController extends BaseController {
...
@@ -768,14 +744,14 @@ public class CommandController extends BaseController {
/**
/**
* * @param null
* * @param null
*
@return
*
* <PRE>
*
@return
<PRE>
* author tw
* author tw
* date 2021/7/22
* date 2021/7/22
* </PRE>
* </PRE>
* 到场力量 列表统计
* 到场力量 列表统计
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getPowerCompanyCountDtocount/{id}"
)
@GetMapping
(
value
=
"getPowerCompanyCountDtocount/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量 列表统计"
,
notes
=
"到场力量 列表统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"到场力量 列表统计"
,
notes
=
"到场力量 列表统计"
)
public
ResponseModel
<
Object
>
getPowerCompanyCountDtocount
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
getPowerCompanyCountDtocount
(
@PathVariable
Long
id
)
{
...
@@ -783,29 +759,29 @@ public class CommandController extends BaseController {
...
@@ -783,29 +759,29 @@ public class CommandController extends BaseController {
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"currentPermissionTree"
)
@GetMapping
(
value
=
"currentPermissionTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"用户菜单"
,
notes
=
"用户菜单"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"用户菜单"
,
notes
=
"用户菜单"
)
public
ResponseModel
<
List
<
PermissionModelDto
>>
currentPermissionTree
()
{
public
ResponseModel
<
List
<
PermissionModelDto
>>
currentPermissionTree
()
{
//获取用户app 菜单
//获取用户app 菜单
List
<
PermissionModelDto
>
list
=
remoteSecurityService
.
currentPermissionTree
();
List
<
PermissionModelDto
>
list
=
remoteSecurityService
.
currentPermissionTree
();
List
<
PermissionModelDto
>
listdate
=
getHomePermissionModel
(
list
);
List
<
PermissionModelDto
>
listdate
=
getHomePermissionModel
(
list
);
getPermissionModel
(
listdate
);
getPermissionModel
(
listdate
);
return
ResponseHelper
.
buildResponse
(
listdate
);
return
ResponseHelper
.
buildResponse
(
listdate
);
}
}
public
List
<
PermissionModelDto
>
getHomePermissionModel
(
List
<
PermissionModelDto
>
list
)
{
public
List
<
PermissionModelDto
>
getHomePermissionModel
(
List
<
PermissionModelDto
>
list
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
for
(
PermissionModelDto
itme
:
list
)
{
for
(
PermissionModelDto
itme
:
list
)
{
if
(
"Home"
.
equals
(
itme
.
getFrontComponent
()))
{
if
(
"Home"
.
equals
(
itme
.
getFrontComponent
()))
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
return
userList
;
return
userList
;
}
}
if
(
itme
.
getChildren
()!=
null
&&!
itme
.
getChildren
().
isEmpty
())
{
if
(
itme
.
getChildren
()
!=
null
&&
!
itme
.
getChildren
().
isEmpty
())
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
return
getHomePermissionModel
(
userList
);
return
getHomePermissionModel
(
userList
);
}
}
}
}
...
@@ -814,82 +790,80 @@ public class CommandController extends BaseController {
...
@@ -814,82 +790,80 @@ public class CommandController extends BaseController {
}
}
public
void
getPermissionModel
(
List
<
PermissionModelDto
>
list
)
{
public
void
getPermissionModel
(
List
<
PermissionModelDto
>
list
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
list
.
forEach
(
itme
->
{
list
.
forEach
(
itme
->
{
HomePageEnum
homePageEnum
=
HomePageEnum
.
statOf
(
itme
.
getFrontComponent
());
HomePageEnum
homePageEnum
=
HomePageEnum
.
statOf
(
itme
.
getFrontComponent
());
if
(
itme
.
getFrontComponent
()!=
null
&&
homePageEnum
!=
null
)
{
if
(
itme
.
getFrontComponent
()
!=
null
&&
homePageEnum
!=
null
)
{
try
{
try
{
Class
clz
=
Class
.
forName
(
homePageEnum
.
getUrl
());
Class
clz
=
Class
.
forName
(
homePageEnum
.
getUrl
());
Object
entity
=
clz
.
newInstance
();
Object
entity
=
clz
.
newInstance
();
Method
repay1
=
clz
.
getDeclaredMethod
(
"getHomePageData"
);
Method
repay1
=
clz
.
getDeclaredMethod
(
"getHomePageData"
);
Object
value
=
repay1
.
invoke
(
entity
);
Object
value
=
repay1
.
invoke
(
entity
);
itme
.
setValue
(
value
!=
null
?
Double
.
valueOf
(
value
.
toString
()):
0
);
itme
.
setValue
(
value
!=
null
?
Double
.
valueOf
(
value
.
toString
())
:
0
);
if
(
itme
.
getChildren
()!=
null
&&!
itme
.
getChildren
().
isEmpty
())
{
if
(
itme
.
getChildren
()
!=
null
&&
!
itme
.
getChildren
().
isEmpty
())
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
getPermissionModel
(
userList
);
getPermissionModel
(
userList
);
itme
.
setChildren
(
userList
);
itme
.
setChildren
(
userList
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
else
{
}
else
{
if
(
itme
.
getChildren
()!=
null
&&!
itme
.
getChildren
().
isEmpty
())
{
if
(
itme
.
getChildren
()
!=
null
&&
!
itme
.
getChildren
().
isEmpty
())
{
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
String
userStr
=
JSON
.
toJSONString
(
itme
.
getChildren
());
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
List
<
PermissionModelDto
>
userList
=
JSON
.
parseArray
(
userStr
,
PermissionModelDto
.
class
);
getPermissionModel
(
userList
);
getPermissionModel
(
userList
);
itme
.
setChildren
(
userList
);
itme
.
setChildren
(
userList
);
}
}
}
}
});
});
}
}
}
}
/**
/**
*
* @return
*
*/
* @return
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
*/
@GetMapping
(
value
=
"/lookHtmlText"
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查看文件内容"
,
notes
=
"查看文件内容"
)
@GetMapping
(
value
=
"/lookHtmlText"
)
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 */
)
@ApiOperation
(
value
=
"查看文件内容"
,
notes
=
"查看文件内容"
)
throws
Exception
{
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 */
)
String
fileName
=
readUrl
+
fileUrl
;
//目标文件
throws
Exception
{
if
(
fileName
.
endsWith
(
".doc"
)
||
fileName
.
endsWith
(
".docx"
))
{
String
fileName
=
readUrl
+
fileUrl
;
//目标文件
String
htmlPath
=
System
.
getProperty
(
"user.dir"
)
+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"file"
+
File
.
separator
;
if
(
fileName
.
endsWith
(
".doc"
)
||
fileName
.
endsWith
(
".docx"
))
{
String
imagePathStr
=
System
.
getProperty
(
"user.dir"
)
+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"image"
+
File
.
separator
;
String
htmlPath
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"file"
+
File
.
separator
;
String
name
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
'/'
)
+
1
);
String
imagePathStr
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"image"
+
File
.
separator
;
String
htmlFileName
=
htmlPath
+
name
.
substring
(
0
,
name
.
indexOf
(
"."
))
+
".html"
;
String
name
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
'/'
)+
1
);
File
htmlP
=
new
File
(
htmlPath
);
String
htmlFileName
=
htmlPath
+
name
.
substring
(
0
,
name
.
indexOf
(
"."
))
+
".html"
;
if
(!
htmlP
.
exists
())
{
File
htmlP
=
new
File
(
htmlPath
);
htmlP
.
mkdirs
();
if
(!
htmlP
.
exists
())
{
}
htmlP
.
mkdirs
();
File
htmlFile
=
new
File
(
htmlFileName
);
}
WordConverterUtils
.
wordToHtml
(
fileName
,
htmlFileName
,
imagePathStr
,
readUrl
,
remoteSecurityService
,
product
,
appKey
,
token
);
File
htmlFile
=
new
File
(
htmlFileName
);
FileInputStream
fis
=
new
FileInputStream
(
htmlFile
);
WordConverterUtils
.
wordToHtml
(
fileName
,
htmlFileName
,
imagePathStr
,
readUrl
,
remoteSecurityService
,
product
,
appKey
,
token
);
FileInputStream
fis
=
new
FileInputStream
(
htmlFile
);
// response.setContentType("multipart/form-data");
// response.setContentType("multipart/form-data");
// response.setCharacterEncoding("UTF-8");
// response.setCharacterEncoding("UTF-8");
// response.setContentType("text/html");
// response.setContentType("text/html");
ServletOutputStream
out
;
ServletOutputStream
out
;
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
int
b
=
0
;
int
b
=
0
;
byte
[]
buffer
=
new
byte
[
1024
];
byte
[]
buffer
=
new
byte
[
1024
];
while
((
b
=
fis
.
read
(
buffer
))
!=
-
1
)
{
while
((
b
=
fis
.
read
(
buffer
))
!=
-
1
)
{
// 4.写到输出流(out)中
// 4.写到输出流(out)中
out
.
write
(
buffer
,
0
,
b
);
out
.
write
(
buffer
,
0
,
b
);
}
}
fis
.
close
();
fis
.
close
();
out
.
flush
();
out
.
flush
();
out
.
close
();
out
.
close
();
return
ResponseHelper
.
buildResponse
(
""
);
return
ResponseHelper
.
buildResponse
(
""
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
}
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
...
@@ -901,22 +875,22 @@ public class CommandController extends BaseController {
...
@@ -901,22 +875,22 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情查询单个航空器信息"
,
notes
=
"根据灾情查询单个航空器信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情查询单个航空器信息"
,
notes
=
"根据灾情查询单个航空器信息"
)
public
ResponseModel
<
AircraftDto
>
seleteaircraftOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
AircraftDto
>
seleteaircraftOne
(
@PathVariable
Long
sequenceNbr
)
{
// 警情动态表单数据
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
alertFormValueService
.
getzqlist
(
sequenceNbr
);
List
<
AlertFormValue
>
list
=
alertFormValueService
.
getzqlist
(
sequenceNbr
);
for
(
AlertFormValue
alertFormValue
:
list
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
String
aircraftModel
=
alertFormValue
.
getFieldValue
();
String
aircraftModel
=
alertFormValue
.
getFieldValue
();
if
(
aircraftModel
!=
null
&&
!
""
.
equals
(
aircraftModel
))
{
if
(
aircraftModel
!=
null
&&
!
""
.
equals
(
aircraftModel
))
{
AircraftDto
aircraftDto
=
aircraftService
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
1411994005943717890L
);
AircraftDto
aircraftDto
=
aircraftService
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
1411994005943717890L
);
//现场照片 待完成,
//现场照片 待完成,
return
ResponseHelper
.
buildResponse
(
aircraftDto
);
return
ResponseHelper
.
buildResponse
(
aircraftDto
);
}
}
}
}
}
}
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getOrgUsrzhDto/{id}"
)
@GetMapping
(
value
=
"/getOrgUsrzhDto/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id处置对象单位详情"
,
notes
=
"根据灾情id处置对象单位详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id处置对象单位详情"
,
notes
=
"根据灾情id处置对象单位详情"
)
public
ResponseModel
<
OrgusrDataxDto
>
getOrgUsrzhDto
(
@PathVariable
Long
id
)
{
public
ResponseModel
<
OrgusrDataxDto
>
getOrgUsrzhDto
(
@PathVariable
Long
id
)
{
...
@@ -930,7 +904,7 @@ public class CommandController extends BaseController {
...
@@ -930,7 +904,7 @@ public class CommandController extends BaseController {
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
();
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
();
}
}
}
}
if
(
buildId
!=
null
)
{
if
(
buildId
!=
null
)
{
List
<
Map
<
String
,
Object
>>
list
=
equipFeignClient
.
findImgByFileCategory
(
buildId
,
"fourImg"
).
getResult
();
List
<
Map
<
String
,
Object
>>
list
=
equipFeignClient
.
findImgByFileCategory
(
buildId
,
"fourImg"
).
getResult
();
List
<
String
>
url
=
new
ArrayList
<>();
List
<
String
>
url
=
new
ArrayList
<>();
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
...
@@ -963,44 +937,41 @@ public class CommandController extends BaseController {
...
@@ -963,44 +937,41 @@ public class CommandController extends BaseController {
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/AlertCalledcountTime"
)
@GetMapping
(
value
=
"/AlertCalledcountTime"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤动态警情信息统计"
,
notes
=
"执勤动态警情信息统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤动态警情信息统计"
,
notes
=
"执勤动态警情信息统计"
)
public
ResponseModel
<
Object
>
AlertCalledcountTime
()
{
public
ResponseModel
<
Object
>
AlertCalledcountTime
()
{
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
listdate
.
add
(
new
KeyValueLabel
(
"今年警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
1
)));
listdate
.
add
(
new
KeyValueLabel
(
"今年警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
1
)));
listdate
.
add
(
new
KeyValueLabel
(
"当月警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
2
)));
listdate
.
add
(
new
KeyValueLabel
(
"当月警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
2
)));
listdate
.
add
(
new
KeyValueLabel
(
"昨天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
4
)));
listdate
.
add
(
new
KeyValueLabel
(
"昨天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
4
)));
listdate
.
add
(
new
KeyValueLabel
(
"今天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
3
)));
listdate
.
add
(
new
KeyValueLabel
(
"今天警情数量"
,
""
,
iAlertCalledService
.
AlertCalledcountTime
(
3
)));
return
ResponseHelper
.
buildResponse
(
listdate
);
return
ResponseHelper
.
buildResponse
(
listdate
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getTodayPowerTransferCompany"
)
@GetMapping
(
value
=
"/getTodayPowerTransferCompany"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当天力量调派"
,
notes
=
"当天力量调派"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当天力量调派"
,
notes
=
"当天力量调派"
)
public
ResponseModel
<
Object
>
getTodayPowerTransferCompany
()
{
public
ResponseModel
<
Object
>
getTodayPowerTransferCompany
()
{
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyService
.
getTodayPowerTransferCompany
());
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyService
.
getTodayPowerTransferCompany
());
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getTodayAlertCalled"
)
@GetMapping
(
value
=
"/getTodayAlertCalled"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当天接警记录"
,
notes
=
"当天接警记录"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当天接警记录"
,
notes
=
"当天接警记录"
)
public
ResponseModel
<
Object
>
getTodayAlertCalled
()
{
public
ResponseModel
<
Object
>
getTodayAlertCalled
()
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getTodayAlertCalled
());
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getTodayAlertCalled
());
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getFireTeamCountList"
)
@GetMapping
(
value
=
"/getFireTeamCountList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤力量"
,
notes
=
"执勤力量"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤力量"
,
notes
=
"执勤力量"
)
public
ResponseModel
<
Object
>
getFireTeamCountList
()
{
public
ResponseModel
<
Object
>
getFireTeamCountList
()
{
return
ResponseHelper
.
buildResponse
(
iFireTeamService
.
getFireTeamCountList
());
return
ResponseHelper
.
buildResponse
(
iFireTeamService
.
getFireTeamCountList
());
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"当天值班人信息列表"
)
@ApiOperation
(
"当天值班人信息列表"
)
@GetMapping
(
"/getonDuty/list"
)
@GetMapping
(
"/getonDuty/list"
)
public
ResponseModel
listOnDutyPerson
()
{
public
ResponseModel
listOnDutyPerson
()
{
...
@@ -1013,11 +984,11 @@ public class CommandController extends BaseController {
...
@@ -1013,11 +984,11 @@ public class CommandController extends BaseController {
* @param
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/findDutyCarStateBy"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/findDutyCarStateBy"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当日气象预警"
,
notes
=
"当日气象预警"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当日气象预警"
,
notes
=
"当日气象预警"
)
public
ResponseModel
<
Object
>
findDutyCarStateBy
()
throws
Exception
{
public
ResponseModel
<
Object
>
findDutyCarStateBy
()
throws
Exception
{
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findDutyCarStateBy
();
List
<
SeismometeorologyDto
>
li
=
seismometeorologyDtoDao
.
findDutyCarStateBy
();
return
ResponseHelper
.
buildResponse
(
li
);
return
ResponseHelper
.
buildResponse
(
li
);
}
}
...
@@ -1027,76 +998,72 @@ public class CommandController extends BaseController {
...
@@ -1027,76 +998,72 @@ public class CommandController extends BaseController {
* @param
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getVideo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getVideo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页获取视频"
,
notes
=
"分页获取视频"
)
@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
);
Page
page
=
new
Page
(
current
,
size
);
List
<
OrderItem
>
list
=
OrderItem
.
ascs
(
"id"
);
List
<
OrderItem
>
list
=
OrderItem
.
ascs
(
"id"
);
page
.
setOrders
(
list
);
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
;
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
():
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()>
0
)
{
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)+
""
);
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
)):
null
;
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
record
.
put
(
"url"
,
url
);
}
}
pag
.
setRecords
(
records
);
pag
.
setRecords
(
records
);
}
}
return
ResponseHelper
.
buildResponse
(
pag
);
return
ResponseHelper
.
buildResponse
(
pag
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"fireCar/list"
)
@GetMapping
(
value
=
"fireCar/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源"
,
notes
=
"车辆资源"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源"
,
notes
=
"车辆资源"
)
public
ResponseModel
<
Object
>
getTeamCarList
(
RequestData
par
)
{
public
ResponseModel
<
Object
>
getTeamCarList
(
RequestData
par
)
{
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 陈召 开始 */
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 陈召 开始 */
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
date
=
equipFeignClient
.
getTeamCarList
(
par
.
getLongitude
(),
par
.
getLatitude
());
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
date
=
equipFeignClient
.
getTeamCarList
(
par
.
getLongitude
(),
par
.
getLatitude
());
List
<
Map
<
String
,
Object
>>
result
=
date
.
getResult
();
List
<
Map
<
String
,
Object
>>
result
=
date
.
getResult
();
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
()
);
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
());
List
<
PowerTransferCompanyResources
>
alertFormValue
=
powerTransferCompanyResourcesMapper
.
selectList
(
queryWrapper
);
List
<
PowerTransferCompanyResources
>
alertFormValue
=
powerTransferCompanyResourcesMapper
.
selectList
(
queryWrapper
);
result
.
stream
().
forEach
(
e
->
{
result
.
stream
().
forEach
(
e
->
{
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
)){
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
))
{
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
}
}
String
sequenceNbr
=
e
.
get
(
"sequenceNbr"
).
toString
();
String
sequenceNbr
=
e
.
get
(
"sequenceNbr"
).
toString
();
//同步力量调派车辆任务状态
//同步力量调派车辆任务状态
alertFormValue
.
stream
().
forEach
(
v
->
{
alertFormValue
.
stream
().
forEach
(
v
->
{
if
(
v
.
getResourcesId
().
equals
(
sequenceNbr
))
{
if
(
v
.
getResourcesId
().
equals
(
sequenceNbr
))
{
String
carStatus
=
v
.
getCarStatus
();
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 陈召 结束 */
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 2021-10-26 陈召 结束 */
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/fireCar"
)
@GetMapping
(
value
=
"/fireCar"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源详情"
,
notes
=
"车辆资源详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源详情"
,
notes
=
"车辆资源详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCarDetailById
(
Long
id
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getCarDetailById
(
Long
id
)
{
ResponseModel
<
Map
<
String
,
Object
>>
date
=
equipFeignClient
.
getCarDetailById
(
id
);
ResponseModel
<
Map
<
String
,
Object
>>
date
=
equipFeignClient
.
getCarDetailById
(
id
);
Map
<
String
,
Object
>
map
=
date
!=
null
?
date
.
getResult
():
null
;
Map
<
String
,
Object
>
map
=
date
!=
null
?
date
.
getResult
()
:
null
;
if
(
map
!=
null
)
{
if
(
map
!=
null
)
{
int
num
=
0
;
int
num
=
0
;
num
=
iDutyCarService
.
getDutyCarCount
(
id
);
num
=
iDutyCarService
.
getDutyCarCount
(
id
);
map
.
put
(
"personNum"
,
num
);
map
.
put
(
"personNum"
,
num
);
}
}
return
ResponseHelper
.
buildResponse
(
map
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
// @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
// @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/testPostApi")
// @GetMapping(value = "/testPostApi")
// @ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址")
// @ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址")
...
@@ -1119,63 +1086,63 @@ public class CommandController extends BaseController {
...
@@ -1119,63 +1086,63 @@ public class CommandController extends BaseController {
// }
// }
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id建筑部位树"
,
notes
=
"根据灾情id建筑部位树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id建筑部位树"
,
notes
=
"根据灾情id建筑部位树"
)
@GetMapping
(
value
=
"/getBuildTree/{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
);
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
Long
buildId
=
null
;
Long
buildId
=
null
;
String
buildIdName
=
""
;
String
buildIdName
=
""
;
Long
zdid
=
null
;
Long
zdid
=
null
;
String
zdname
=
""
;
String
zdname
=
""
;
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
if
(
AlertCalled
.
getUnitInvolved
()!=
null
&&
!
""
.
equals
(
AlertCalled
.
getUnitInvolved
()))
{
if
(
AlertCalled
.
getUnitInvolved
()
!=
null
&&
!
""
.
equals
(
AlertCalled
.
getUnitInvolved
()))
{
List
<
OrgUsrzhDto
>
orgUsrzhDto
=
iOrgUsrService
.
getOrgUsrzhDto
(
AlertCalled
.
getUnitInvolved
());
List
<
OrgUsrzhDto
>
orgUsrzhDto
=
iOrgUsrService
.
getOrgUsrzhDto
(
AlertCalled
.
getUnitInvolved
());
if
(
orgUsrzhDto
!=
null
&&
orgUsrzhDto
.
size
()>
0
&&
orgUsrzhDto
.
get
(
0
)!=
null
)
{
if
(
orgUsrzhDto
!=
null
&&
orgUsrzhDto
.
size
()
>
0
&&
orgUsrzhDto
.
get
(
0
)
!=
null
)
{
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()==
null
?
null
:
Long
.
valueOf
(
orgUsrzhDto
.
get
(
0
).
getBuildId
());
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()
==
null
?
null
:
Long
.
valueOf
(
orgUsrzhDto
.
get
(
0
).
getBuildId
());
buildIdName
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBuildName
();
buildIdName
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()
==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBuildName
();
}
}
}
}
// 警情动态表单数据
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
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
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
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
>
list1
=
new
ArrayList
<
OrgMenuDto
>();
List
<
OrgMenuDto
>
children
=
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
);
children
.
add
(
date
);
OrgMenuDto
orgMenuDto
=
new
OrgMenuDto
();
OrgMenuDto
orgMenuDto
=
new
OrgMenuDto
();
orgMenuDto
.
setKey
(
buildId
);
orgMenuDto
.
setKey
(
buildId
);
orgMenuDto
.
setValue
(
buildId
);
orgMenuDto
.
setValue
(
buildId
);
orgMenuDto
.
setChildren
(
children
);
orgMenuDto
.
setChildren
(
children
);
orgMenuDto
.
setName
(
buildIdName
);
orgMenuDto
.
setName
(
buildIdName
);
orgMenuDto
.
setTitle
(
buildIdName
);
orgMenuDto
.
setTitle
(
buildIdName
);
list1
.
add
(
orgMenuDto
);
list1
.
add
(
orgMenuDto
);
return
ResponseHelper
.
buildResponse
(
list1
);
return
ResponseHelper
.
buildResponse
(
list1
);
}
}
}
}
}
}
return
ResponseHelper
.
buildResponse
(
buildId
==
null
?
null
:
keySiteService
.
getBuildAndKeyTree
(
buildId
));
return
ResponseHelper
.
buildResponse
(
buildId
==
null
?
null
:
keySiteService
.
getBuildAndKeyTree
(
buildId
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据重点部位id查询详情"
,
notes
=
"根据重点部位id查询详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据重点部位id查询详情"
,
notes
=
"根据重点部位id查询详情"
)
@GetMapping
(
value
=
"/getkeySite/{sequenceNbr}"
)
@GetMapping
(
value
=
"/getkeySite/{sequenceNbr}"
)
public
ResponseModel
<
KeySiteDto
>
getkeySite
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
KeySiteDto
>
getkeySite
(
@PathVariable
Long
sequenceNbr
)
{
Map
<
String
,
List
<
AttachmentDto
>>
files
=
sourceFileService
.
getAttachments
(
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
>();
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
);
dto
.
setAttachments
(
files
);
JSONArray
array
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
files
.
get
(
"keySitePhoto"
)));
JSONArray
array
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
files
.
get
(
"keySitePhoto"
)));
if
(
array
!=
null
&&
array
.
size
()>
0
)
{
if
(
array
!=
null
&&
array
.
size
()
>
0
)
{
for
(
Object
i
:
array
)
{
for
(
Object
i
:
array
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
i
));
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
i
));
list
.
add
(
object
.
getString
(
"url"
));
list
.
add
(
object
.
getString
(
"url"
));
}
}
...
@@ -1187,9 +1154,9 @@ public class CommandController extends BaseController {
...
@@ -1187,9 +1154,9 @@ public class CommandController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@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"
)
@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
page
=
new
Page
();
page
.
setSize
(
size
);
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
...
@@ -1197,9 +1164,9 @@ public class CommandController extends BaseController {
...
@@ -1197,9 +1164,9 @@ public class CommandController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@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"
)
@GetMapping
(
value
=
"/app/transfer/statistics"
)
public
ResponseModel
getPowerTransferStatistics
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
)
{
public
ResponseModel
getPowerTransferStatistics
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferStatistics
(
Long
.
valueOf
(
alertId
),
type
));
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferStatistics
(
Long
.
valueOf
(
alertId
),
type
));
}
}
...
@@ -1282,7 +1249,6 @@ public class CommandController extends BaseController {
...
@@ -1282,7 +1249,6 @@ public class CommandController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/DynamicFlightInfo/{dynamicFlightId}"
)
@GetMapping
(
value
=
"/DynamicFlightInfo/{dynamicFlightId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"航班信息"
,
notes
=
"航班信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"航班信息"
,
notes
=
"航班信息"
)
...
@@ -1295,125 +1261,128 @@ public class CommandController extends BaseController {
...
@@ -1295,125 +1261,128 @@ public class CommandController extends BaseController {
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"AlertCalledStatusPage"
)
@GetMapping
(
value
=
"AlertCalledStatusPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"未结束的灾情列表"
,
notes
=
"未结束的灾情列表"
)
@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
)
{
if
(
null
==
current
||
null
==
size
)
{
current
=
1
;
current
=
1
;
size
=
Integer
.
MAX_VALUE
;
size
=
Integer
.
MAX_VALUE
;
}
}
List
<
AlertCalled
>
list
=
iAlertCalledService
.
AlertCalledStatusPage
(
current
,
size
);
List
<
AlertCalled
>
list
=
iAlertCalledService
.
AlertCalledStatusPage
(
current
,
size
);
int
num
=
iAlertCalledService
.
AlertCalledcount
(
0
);
int
num
=
iAlertCalledService
.
AlertCalledcount
(
0
);
Page
<
AlertCalled
>
pageBean
=
new
Page
<>(
current
,
size
,
num
);
Page
<
AlertCalled
>
pageBean
=
new
Page
<>(
current
,
size
,
num
);
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"equipmentCarList"
)
@GetMapping
(
value
=
"equipmentCarList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
public
ResponseModel
<
Object
>
equipmentCarList
(
String
name
,
public
ResponseModel
<
Object
>
equipmentCarList
(
String
name
,
String
code
,
String
code
,
String
pageNum
,
String
pageNum
,
String
pageSize
,
String
pageSize
,
Boolean
isNo
)
{
Boolean
isNo
)
{
//获取用户所属单位id
//获取用户所属单位id
AgencyUserModel
agencyUserModel
=
getUserInfo
();
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
teamId
=
null
;
Long
teamId
=
null
;
// Firefighters orgUsr= firefightersService.selectByAmosOrgId(Long.valueOf(agencyUserModel.getUserId()));
// Firefighters orgUsr= firefightersService.selectByAmosOrgId(Long.valueOf(agencyUserModel.getUserId()));
// teamId=orgUsr!=null?Long.valueOf(orgUsr.getFireTeamId()):null;
// teamId=orgUsr!=null?Long.valueOf(orgUsr.getFireTeamId()):null;
Long
id
=
null
;
Long
id
=
null
;
//获取用户已绑定车辆id、
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
id
=
userCar
!=
null
?
userCar
.
getCarId
():
null
;
id
=
userCar
!=
null
?
userCar
.
getCarId
()
:
null
;
if
(
id
==
null
&&
isNo
!=
null
&&
isNo
)
{
if
(
id
==
null
&&
isNo
!=
null
&&
isNo
)
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
null
);
map
.
put
(
"select"
,
null
);
map
.
put
(
"data"
,
null
);
map
.
put
(
"data"
,
null
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
ResponseModel
<
Object
>
data
=
equipFeignClient
.
equipmentCarList
(
teamId
,
name
,
code
,
pageNum
,
pageSize
,
id
,
isNo
);
ResponseModel
<
Object
>
data
=
equipFeignClient
.
equipmentCarList
(
teamId
,
name
,
code
,
pageNum
,
pageSize
,
id
,
isNo
);
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
userCar
!=
null
?
userCar
.
getCarId
():
null
);
map
.
put
(
"select"
,
userCar
!=
null
?
userCar
.
getCarId
()
:
null
);
map
.
put
(
"data"
,
data
!=
null
?
data
.
getResult
():
null
);
map
.
put
(
"data"
,
data
!=
null
?
data
.
getResult
()
:
null
);
return
ResponseHelper
.
buildResponse
(
map
);
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"
)
@GetMapping
(
value
=
"gettree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆分类"
,
notes
=
"车辆分类"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆分类"
,
notes
=
"车辆分类"
)
public
ResponseModel
<
Object
>
gettree
(
)
{
public
ResponseModel
<
Object
>
gettree
()
{
ResponseModel
<
Object
>
data
=
equipFeignClient
.
gettree
();
ResponseModel
<
Object
>
data
=
equipFeignClient
.
gettree
();
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
null
);
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
)
@RequestMapping
(
value
=
"adduserCar/{type}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"增加绑定"
,
notes
=
"增加绑定"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"增加绑定"
,
notes
=
"增加绑定"
)
public
ResponseModel
<
Object
>
adduserCar
(
@PathVariable
String
type
,
@RequestBody
UserCar
userCar
)
{
public
ResponseModel
<
Object
>
adduserCar
(
@PathVariable
String
type
,
@RequestBody
UserCar
userCar
)
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
AgencyUserModel
agencyUserModel
=
getUserInfo
();
userCar
.
setAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
userCar
.
setAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
userCar
.
setAmosUserName
(
agencyUserModel
.
getRealName
());
userCar
.
setAmosUserName
(
agencyUserModel
.
getRealName
());
if
(
"1"
.
equals
(
type
))
{
if
(
"1"
.
equals
(
type
))
{
userCarService
.
add
(
userCar
);
userCarService
.
add
(
userCar
);
}
else
{
}
else
{
userCarService
.
delete
(
userCar
);
userCarService
.
delete
(
userCar
);
}
}
return
ResponseHelper
.
buildResponse
(
true
);
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
)
@RequestMapping
(
value
=
"getAlertCalledId"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取绑定车辆装"
,
notes
=
"获取绑定车辆装"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取绑定车辆装"
,
notes
=
"获取绑定车辆装"
)
public
ResponseModel
<
UserCar
>
getAlertCalledId
()
{
public
ResponseModel
<
UserCar
>
getAlertCalledId
()
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
id
=
null
;
Long
id
=
null
;
//获取用户已绑定车辆id、
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
return
ResponseHelper
.
buildResponse
(
userCar
);
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
)
@RequestMapping
(
value
=
"getAlertCalledData"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前执行灾情"
,
notes
=
"获取当前执行灾情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前执行灾情"
,
notes
=
"获取当前执行灾情"
)
public
ResponseModel
<
Object
>
getAlertCalled
()
{
public
ResponseModel
<
Object
>
getAlertCalled
()
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
AgencyUserModel
agencyUserModel
=
getUserInfo
();
Long
id
=
null
;
Long
id
=
null
;
//获取用户已绑定车辆id、
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
//获取正在进行的灾情null
//获取正在进行的灾情null
if
(
userCar
!=
null
)
{
if
(
userCar
!=
null
)
{
AlertCalled
alertCalled
=
powerTransferCompanyResourcesService
.
getByPowerTransferCompanyResourId
(
userCar
.
getCarId
());
AlertCalled
alertCalled
=
powerTransferCompanyResourcesService
.
getByPowerTransferCompanyResourId
(
userCar
.
getCarId
());
return
ResponseHelper
.
buildResponse
(
alertCalled
);
return
ResponseHelper
.
buildResponse
(
alertCalled
);
}
}
return
ResponseHelper
.
buildResponse
(
null
);
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
)
@RequestMapping
(
value
=
"getPowerTransferCompanyResourcesService/{carid}/{alertCalledId}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前任务,车辆状态"
,
notes
=
"获取当前任务,车辆状态"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前任务,车辆状态"
,
notes
=
"获取当前任务,车辆状态"
)
public
ResponseModel
<
Object
>
getPowerTransferCompanyResourcesService
(
@PathVariable
Long
carid
,
public
ResponseModel
<
Object
>
getPowerTransferCompanyResourcesService
(
@PathVariable
Long
carid
,
@PathVariable
Long
alertCalledId
)
{
@PathVariable
Long
alertCalledId
)
{
//获取正在进行的灾情
//获取正在进行的灾情
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesService
.
getByAlertCalledIdCarId
(
alertCalledId
,
carid
);
PowerTransferCompanyResources
powerTransferCompanyResources
=
powerTransferCompanyResourcesService
.
getByAlertCalledIdCarId
(
alertCalledId
,
carid
);
return
ResponseHelper
.
buildResponse
(
powerTransferCompanyResources
);
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
)
@RequestMapping
(
value
=
"updatePowerTransferCompanyResourcesService"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改任务,车辆状态"
,
notes
=
"修改任务,车辆状态"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改任务,车辆状态"
,
notes
=
"修改任务,车辆状态"
)
public
ResponseModel
<
Object
>
updatePowerTransferCompanyResourcesService
(
@RequestBody
CarTaskDto
carTaskDto
)
{
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;
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.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.CarStatusInfoDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
...
@@ -10,7 +9,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
...
@@ -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.enums.FireCarStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResourcesMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResourcesMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyResourcesService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyResourcesService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -21,26 +19,27 @@ import java.util.ArrayList;
...
@@ -21,26 +19,27 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 调派单位资源 服务实现类
* 调派单位资源 服务实现类
*
*
* @author tb
* @author tb
* @date 2021-06-17
* @date 2021-06-17
*/
*/
@Service
@Service
public
class
PowerTransferCompanyResourcesServiceImpl
extends
BaseService
<
PowerTransferCompanyResourcesDto
,
PowerTransferCompanyResources
,
PowerTransferCompanyResourcesMapper
>
implements
IPowerTransferCompanyResourcesService
{
public
class
PowerTransferCompanyResourcesServiceImpl
extends
BaseService
<
PowerTransferCompanyResourcesDto
,
PowerTransferCompanyResources
,
PowerTransferCompanyResourcesMapper
>
implements
IPowerTransferCompanyResourcesService
{
@Resource
@Resource
PowerTransferCompanyResourcesMapper
powerTransferCompanyResourcesMapper
;
PowerTransferCompanyResourcesMapper
powerTransferCompanyResourcesMapper
;
@Autowired
@Autowired
EquipFeignClient
equipFeignClient
;
EquipFeignClient
equipFeignClient
;
@Override
@Override
public
AlertCalled
getByPowerTransferCompanyResourId
(
Long
id
)
{
public
AlertCalled
getByPowerTransferCompanyResourId
(
Long
id
)
{
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
()
);
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
());
queryWrapper
.
eq
(
"resources_id"
,
id
.
toString
()
);
queryWrapper
.
eq
(
"resources_id"
,
id
.
toString
());
PowerTransferCompanyResources
alertFormValue
=
this
.
getOne
(
queryWrapper
);
PowerTransferCompanyResources
alertFormValue
=
this
.
getOne
(
queryWrapper
);
if
(
alertFormValue
!=
null
)
{
if
(
alertFormValue
!=
null
)
{
return
powerTransferCompanyResourcesMapper
.
getByPowerTransferCompanyResourId
(
alertFormValue
.
getPowerTransferCompanyId
());
return
powerTransferCompanyResourcesMapper
.
getByPowerTransferCompanyResourId
(
alertFormValue
.
getPowerTransferCompanyId
());
}
}
return
null
;
return
null
;
...
@@ -48,7 +47,7 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
...
@@ -48,7 +47,7 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
@Override
@Override
public
PowerTransferCompanyResources
getByAlertCalledIdCarId
(
Long
alertCalledId
,
Long
carId
)
{
public
PowerTransferCompanyResources
getByAlertCalledIdCarId
(
Long
alertCalledId
,
Long
carId
)
{
return
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
return
powerTransferCompanyResourcesMapper
.
getByAlertCalledIdCarId
(
alertCalledId
,
carId
);
}
}
@Override
@Override
...
@@ -59,32 +58,39 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
...
@@ -59,32 +58,39 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
@Override
@Override
@Transactional
@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
{
try
{
if
(
type
==
2
)
{
if
(
type
==
2
)
{
powerTransferCompanyResources
.
setStatus
(
code
);
powerTransferCompanyResources
.
setStatus
(
code
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
List
<
Object
>
carStatusInfoDtoList
=
new
ArrayList
();
List
<
Object
>
carStatusInfoDtoList
=
new
ArrayList
();
//修改装备信息
//修改装备信息
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
carStatusInfo
.
setSequenceNbr
(
carId
+
""
);
carStatusInfo
.
setSequenceNbr
(
carId
+
""
);
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
carStatusInfoDtoList
.
add
(
carStatusInfo
);
carStatusInfoDtoList
.
add
(
carStatusInfo
);
// 更新所有车辆状态为执勤
// 更新所有车辆状态为执勤
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
}
else
{
}
else
{
powerTransferCompanyResources
.
setCarStatus
(
code
);
powerTransferCompanyResources
.
setCarStatus
(
code
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"修改失败!"
);
throw
new
RuntimeException
(
"修改失败!"
);
}
}
}
}
@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
;
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.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.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
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.UserCar
;
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.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.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.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
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.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
...
@@ -49,6 +23,11 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
@Autowired
@Autowired
UserCarMapper
UserCarMapper
;
UserCarMapper
UserCarMapper
;
@Autowired
IPowerTransferCompanyResourcesService
companyResourcesService
;
@Override
@Override
public
UserCar
selectByAmosUserId
(
Long
id
)
{
public
UserCar
selectByAmosUserId
(
Long
id
)
{
QueryWrapper
<
UserCar
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
UserCar
>
queryWrapper
=
new
QueryWrapper
<>();
...
@@ -61,12 +40,12 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
...
@@ -61,12 +40,12 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
QueryWrapper
<
UserCar
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
UserCar
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"amos_user_id"
,
userCar
.
getAmosUserId
());
queryWrapper
.
eq
(
"amos_user_id"
,
userCar
.
getAmosUserId
());
UserCar
uer
=
UserCarMapper
.
selectOne
(
queryWrapper
);
UserCar
uer
=
UserCarMapper
.
selectOne
(
queryWrapper
);
if
(
uer
!=
null
)
{
if
(
uer
!=
null
)
{
userCar
.
setSequenceNbr
(
uer
.
getSequenceNbr
());
userCar
.
setSequenceNbr
(
uer
.
getSequenceNbr
());
UserCarMapper
.
updateById
(
userCar
);
UserCarMapper
.
updateById
(
userCar
);
}
else
{
}
else
{
UserCarMapper
.
insert
(
userCar
);
UserCarMapper
.
insert
(
userCar
);
}
}
}
}
...
@@ -76,4 +55,22 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
...
@@ -76,4 +55,22 @@ public class UserCarServiceImpl extends BaseService<AircraftDto, UserCar, UserCa
queryWrapper
.
eq
(
"amos_user_id"
,
userCar
.
getAmosUserId
());
queryWrapper
.
eq
(
"amos_user_id"
,
userCar
.
getAmosUserId
());
UserCarMapper
.
delete
(
queryWrapper
);
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 {
...
@@ -242,7 +242,7 @@ public class PlanTaskController extends AbstractBaseController {
* 根据点查询用户权限所有巡检执行计划
* 根据点查询用户权限所有巡检执行计划
*
*
* @param dataType 数据类型
* @param dataType 数据类型
* @param
serial
巡检点编号
* @param
pointNo
巡检点编号
* @param planTaskId 巡检任务Id
* @param planTaskId 巡检任务Id
* @return
* @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;
...
@@ -22,12 +22,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -515,6 +510,27 @@ public class PlanTaskController extends AbstractBaseController {
...
@@ -515,6 +510,27 @@ public class PlanTaskController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
planTaskService
.
getPlanTasks
(
params
,
pageable
));
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
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据检查任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
,
notes
=
"根据检查任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
)
@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
)
@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
;
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.CheckChkExListBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PlanTaskPointInputItemBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PlanTaskPointInputItemBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo
;
...
@@ -12,174 +8,216 @@ import com.yeejoin.amos.supervision.business.param.PlanTaskPageParam;
...
@@ -12,174 +8,216 @@ import com.yeejoin.amos.supervision.business.param.PlanTaskPageParam;
import
com.yeejoin.amos.supervision.business.vo.CodeOrderVo
;
import
com.yeejoin.amos.supervision.business.vo.CodeOrderVo
;
import
com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.PlanTaskVo
;
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.PlanTask
;
import
com.yeejoin.amos.supervision.dao.entity.PointInputItem
;
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
{
public
interface
PlanTaskMapper
extends
BaseMapper
{
/**
/**
* 统计-计划执行
* 统计-计划执行
* @param params
*
* @return
* @param params
*/
* @return
long
countPlanTask
(
PlanTaskPageParam
params
);
*/
/**
long
countPlanTask
(
PlanTaskPageParam
params
);
* 计划执行查询
* @param params
/**
* @return
* 计划执行查询
*/
*
List
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
);
* @param params
/**
* @return
* 批量删除
*/
* @param strArry
List
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
);
*/
void
planTaskDet
(
String
[]
strArry
);
/**
* 批量删除
/**
*
* 更新任务表
* @param strArry
* @param param
*/
*/
void
planTaskDet
(
String
[]
strArry
);
void
updatePlanTaskPtInfo
(
HashMap
<
String
,
Object
>
param
);
/**
/**
* 更新任务表
* 查询需删除的任务信息列表
*
* @param param
* @param param
* @return
*/
*/
void
updatePlanTaskPtInfo
(
HashMap
<
String
,
Object
>
param
);
List
<
Long
>
getGenPlanTask
(
HashMap
<
String
,
Object
>
param
);
/**
/**
* 查询需删除的任务信息列表
* 根据路线id获取关联的计划任务
*
*
* @param param
* @param routeId
* @return
* @return
*/
*/
List
<
Long
>
getGenPlanTask
(
HashMap
<
String
,
Object
>
param
);
List
<
PlanTask
>
getPlanTaskByRouteId
(
@Param
(
value
=
"routeId"
)
Long
routeId
);
/**
/**
* 根据巡检点id获取关联的计划任务
* 根据路线id获取关联的计划任务
*
*
* @param routeId
* @param routeId
* @return
* @return
*/
*/
List
<
HashMap
<
String
,
Object
>>
getPlanTaskByPointId
(
HashMap
<
String
,
Object
>
param
);
List
<
PlanTask
>
getPlanTaskByRouteId
(
@Param
(
value
=
"routeId"
)
Long
routeId
);
/**
* 根据条件查询计划任务列表
/**
* @param params
* 根据巡检点id获取关联的计划任务
* @return
*
*/
* @param routeId
List
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
* @return
/**
*/
* 通过计划任务Id获得计划任务信息
List
<
HashMap
<
String
,
Object
>>
getPlanTaskByPointId
(
HashMap
<
String
,
Object
>
param
);
* @param planTaskId
* @return
/**
*/
* 根据条件查询计划任务列表
Map
queryPlanTaskById
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
);
*
/**
* @param params
* 通过计划任务Id获取任务所有点信息
* @return
* @param params
*/
* @return
List
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
);
*/
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
);
/**
* 根据用户统计待办任务数量
long
getPlanTaskPointsCount
(
HashMap
<
String
,
Object
>
params
);
*
/**
* @param userId 用户id
* 获取用户当前所有可以做的任务个数
* @return 统计数量
* @param userId
*/
* @return
int
countWaitingTaskByUser
(
@Param
(
value
=
"userId"
)
String
userId
);
*/
int
getCurrentPlanTaskCount
(
@Param
(
value
=
"userId"
)
String
userId
);
/**
* 通过计划任务Id获得计划任务信息
/**
*
* 根据计划任务id获取所有巡检项信息
* @param planTaskId
* @param planTaskId
* @return
* @return
*/
*/
Map
queryPlanTaskById
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
);
List
<
PlanTaskPointInputItemBo
>
getPlanTaskPointInputItemByPlanTaskId
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
,
@Param
(
value
=
"planTaskDetailStatus"
)
String
planTaskDetailStatus
);
/**
/**
* 通过计划任务Id获取任务所有点信息
* 条件查询数据
*
* @param param
* @param params
* @return
* @return
*/
*/
List
<
PlanTaskVo
>
getPlanTaskInfoList
(
PlanTaskPageParam
param
);
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
);
/**
* 根据ids获取执行计划
long
getPlanTaskPointsCount
(
HashMap
<
String
,
Object
>
params
);
* @param ids
* @return
/**
*/
* 获取用户当前所有可以做的任务个数
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
@Param
(
"ids"
)
Long
[]
ids
);
*
* @param userId
/**
* @return
* 分页统计
*/
* @param param
int
getCurrentPlanTaskCount
(
@Param
(
value
=
"userId"
)
String
userId
);
* @return
*/
/**
long
countChkExListData
(
CheckPtListPageParam
param
);
* 根据计划任务id获取所有巡检项信息
/**
*
* 今日执行情况,业务信息查询
* @param planTaskId
* @param param
* @return
* @return
*/
*/
List
<
PlanTaskPointInputItemBo
>
getPlanTaskPointInputItemByPlanTaskId
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
,
@Param
(
value
=
"planTaskDetailStatus"
)
String
planTaskDetailStatus
);
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
/**
* 条件查询数据
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
*
* @param param
* @return
/**
*/
* 根据计划id和点id获取点详情
List
<
PlanTaskVo
>
getPlanTaskInfoList
(
PlanTaskPageParam
param
);
* @param planTaskId
* @param pointId
/**
* @return
* 根据ids获取执行计划
*/
*
PointCheckDetailBo
getPointPlanTaskInfo
(
@Param
(
"planTaskId"
)
Long
planTaskId
,
@Param
(
"pointId"
)
Long
pointId
);
* @param ids
* @return
/**
*/
* 根据路线id和点id获取该点的检查项
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
@Param
(
"ids"
)
Long
[]
ids
);
* @param routeId
* @param pointId
/**
* @return
* 分页统计
*/
*
List
<
PointCheckDetailBo
>
getPointInputByRouteIdAndPointId
(
@Param
(
"routeId"
)
Long
routeId
,
@Param
(
"pointId"
)
Long
pointId
);
* @param param
/**
* @return
* 统计当日任务累计完成情况
*/
* @param loginOrgCode
long
countChkExListData
(
CheckPtListPageParam
param
);
* @return
*/
/**
String
getCumulativePlanCountByOrgCode
(
@Param
(
"orgCode"
)
String
loginOrgCode
);
* 今日执行情况,业务信息查询
/**
*
* 获取用户离线巡检计划任务信息
* @param param
* @param params
* @return
* @return
*/
*/
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
List
<
LeavePlanTaskVo
>
queryLeavePlanTask
(
HashMap
<
String
,
Object
>
params
);
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
/**
* 根据路线id与点id,获取路线点项
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
*
* @param routeId
* @param pointId
/**
* @return
* 根据计划id和点id获取点详情
*/
*
List
<
PointInputItem
>
getRoutePointInputItem
(
@Param
(
value
=
"routeId"
)
long
routeId
,
@Param
(
value
=
"pointId"
)
long
pointId
);
* @param planTaskId
* @param pointId
* @return
List
<
CodeOrderVo
>
queryCodeOrderVo
(
HashMap
<
String
,
Object
>
params
);
*/
/**
PointCheckDetailBo
getPointPlanTaskInfo
(
@Param
(
"planTaskId"
)
Long
planTaskId
,
@Param
(
"pointId"
)
Long
pointId
);
* 重新统计用户重做日期段内计划任务
* @param userId
/**
* @param refDate
* 根据路线id和点id获取该点的检查项
* @param orgCode
*
*/
* @param routeId
void
reformStatistics
(
@Param
(
value
=
"userId"
)
String
userId
,
@Param
(
value
=
"refDate"
)
String
refDate
,
@Param
(
value
=
"orgCode"
)
String
orgCode
);
* @param pointId
* @return
List
<
Map
<
String
,
Object
>>
countFinishByPlanIds
(
List
<
Long
>
planIds
);
*/
List
<
PointCheckDetailBo
>
getPointInputByRouteIdAndPointId
(
@Param
(
"routeId"
)
Long
routeId
,
@Param
(
"pointId"
)
Long
pointId
);
List
<
Map
<
String
,
Object
>>
queryPlanTaskTimeAxis
(
HashMap
<
String
,
Object
>
params
);
/**
List
<
Map
<
String
,
Object
>>
queryTimeAxis
(
HashMap
<
String
,
Object
>
params
);
* 统计当日任务累计完成情况
*
* @param loginOrgCode
* @return
*/
String
getCumulativePlanCountByOrgCode
(
@Param
(
"orgCode"
)
String
loginOrgCode
);
/**
* 获取用户离线巡检计划任务信息
*
* @param params
* @return
*/
List
<
LeavePlanTaskVo
>
queryLeavePlanTask
(
HashMap
<
String
,
Object
>
params
);
/**
* 根据路线id与点id,获取路线点项
*
* @param routeId
* @param pointId
* @return
*/
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
);
List
<
Map
<
String
,
Object
>>
countFinishByPlanIds
(
List
<
Long
>
planIds
);
List
<
Map
<
String
,
Object
>>
queryPlanTaskTimeAxis
(
HashMap
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
queryTimeAxis
(
HashMap
<
String
,
Object
>
params
);
}
}
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;
...
@@ -43,6 +43,7 @@ import com.yeejoin.amos.supervision.exception.YeeException;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
com.yeejoin.amos.supervision.quartz.IJobService
;
import
com.yeejoin.amos.supervision.quartz.IJobService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.assertj.core.util.Lists
;
import
org.assertj.core.util.Lists
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -608,6 +609,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -608,6 +609,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
@Override
@Override
public
int
countWaitingTaskByUser
(
String
userId
)
{
return
planTaskMapper
.
countWaitingTaskByUser
(
userId
);
}
@Override
public
Map
queryPlanTaskById
(
Long
planTaskId
)
{
public
Map
queryPlanTaskById
(
Long
planTaskId
)
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
=
planTaskMapper
.
queryPlanTaskById
(
planTaskId
);
map
=
planTaskMapper
.
queryPlanTaskById
(
planTaskId
);
...
@@ -619,7 +625,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -619,7 +625,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
pageable
)
{
public
Page
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
pageable
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
planTaskMapper
.
getPlanTaskPointsCount
(
params
);
long
total
=
planTaskMapper
.
getPlanTaskPointsCount
(
params
);
if
(
total
==
0
)
{
if
(
total
==
0
)
{
...
...
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;
...
@@ -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.LeavePlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
...
@@ -20,133 +21,154 @@ import com.yeejoin.amos.supervision.dao.entity.PlanTask;
...
@@ -20,133 +21,154 @@ import com.yeejoin.amos.supervision.dao.entity.PlanTask;
public
interface
IPlanTaskService
{
public
interface
IPlanTaskService
{
/**
/**
* 计划执行查询
* 计划执行查询
*/
*/
Page
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
);
Page
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
);
/**
/**
* 计划执行重做
* 计划执行重做
*/
*/
void
reGenPlanTask
(
HashMap
<
String
,
Object
>
param
)
throws
ParseException
;
void
reGenPlanTask
(
HashMap
<
String
,
Object
>
param
)
throws
ParseException
;
/**
/**
* 计划执行删除
* 计划执行删除
*/
*/
void
planTaskDet
(
String
[]
strArry
);
void
planTaskDet
(
String
[]
strArry
);
/**
/**
* 执行计划导出
* 执行计划导出
*/
*/
List
<
PlanTaskVo
>
planTaskReport
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
params
);
List
<
PlanTaskVo
>
planTaskReport
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
params
);
/**
* 自动任务执行
/**
* @param runDate
* 自动任务执行
*/
*
void
taskExecution
(
String
runDate
);
* @param runDate
*/
/**
void
taskExecution
(
String
runDate
);
* 根据路线id获取关联的所有计划任务
*
/**
* @param routeId
* 根据路线id获取关联的所有计划任务
* @return
*
*/
* @param routeId
List
<
PlanTask
>
getPlanTaskByRouteId
(
Long
routeId
);
* @return
*/
/**
List
<
PlanTask
>
getPlanTaskByRouteId
(
Long
routeId
);
* 停用计划任务
*
/**
* @param routeIds
* 停用计划任务
*/
*
void
disablePlanTask
(
Long
[]
routeIds
);
* @param routeIds
*/
/**
void
disablePlanTask
(
Long
[]
routeIds
);
* app 根据条件查询用户权限内所有当前巡检计划任务
* @param params
/**
* @return
* app 根据条件查询用户权限内所有当前巡检计划任务
*/
*
List
getPlanTaskInfo
(
HashMap
<
String
,
Object
>
params
);
* @param params
* @return
/**
*/
* 根据计划任务ID查询任务想起
List
getPlanTaskInfo
(
HashMap
<
String
,
Object
>
params
);
* @param id
* @return
/**
*/
* 根据计划任务ID查询任务想起
public
Map
findPlanTaskByTaskIdAndPointId
(
long
id
,
long
pointId
);
*
* @param id
/**
* @return
* 天剑查询假话任务信息
*/
* @param params
public
Map
findPlanTaskByTaskIdAndPointId
(
long
id
,
long
pointId
);
* @param page
* @return
/**
*/
* 天剑查询假话任务信息
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
);
*
* @param params
/**
* @param page
* 根据计划任务Id获取计划任务信息
* @return
* @param planTaskId
*/
* @return
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
);
*/
Map
queryPlanTaskById
(
Long
planTaskId
);
/**
* 根据用户统计待办任务数量
/**
*
* 根据计划ID获取所有的 任务计划巡检点
* @param userId 用户id
* @param params
* @return 统计数量
* @return
*/
*/
int
countWaitingTaskByUser
(
String
userId
);
Page
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
pageable
);
/**
/**
* 根据计划任务Id获取计划任务信息
* 获取用户当前所有有的计划任务
*
* @param userId
* @param planTaskId
* @return
* @return
*/
*/
int
getCurrentPlanTaskCount
(
String
userId
);
Map
queryPlanTaskById
(
Long
planTaskId
);
/**
* 根据计划ID获取所有的 任务计划巡检点
*
* @param params
* @return
*/
Page
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
pageable
);
/**
* 获取用户当前所有有的计划任务
*
* @param userId
* @return
*/
int
getCurrentPlanTaskCount
(
String
userId
);
/**
/**
* 今日执行情况
* 今日执行情况
*
* @param params
* @param params
* @return
* @return
*/
*/
Page
<
CheckChkExListBo
>
getChkExList
(
String
toke
,
String
product
,
String
appKey
,
CheckPtListPageParam
params
);
Page
<
CheckChkExListBo
>
getChkExList
(
String
toke
,
String
product
,
String
appKey
,
CheckPtListPageParam
params
);
/**
/**
* 根据id获取执行计划
* 根据id获取执行计划
* @param ids
*
* @return
* @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 获取点详情
* 根据任务id点id 获取点详情
* @param planTaskId
*
* @param pointId
* @param planTaskId
* @return
* @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
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
/**
/**
* 获取公司计划累计情况
* 获取公司计划累计情况
* @param loginOrgCode
*
* @return
* @param loginOrgCode
*/
* @return
String
getCumulativePlanCountByOrgCode
(
String
loginOrgCode
);
*/
String
getCumulativePlanCountByOrgCode
(
String
loginOrgCode
);
List
<
LeavePlanTaskVo
>
queryLeavePlanTask
(
HashMap
<
String
,
Object
>
params
);
List
<
LeavePlanTaskVo
>
queryLeavePlanTask
(
HashMap
<
String
,
Object
>
params
);
List
<
CodeOrderVo
>
queryCodeOrderVo
(
HashMap
<
String
,
Object
>
params
);
List
<
CodeOrderVo
>
queryCodeOrderVo
(
HashMap
<
String
,
Object
>
params
);
PlanTask
selectPlanTaskStatus
(
Long
id
);
PlanTask
selectPlanTaskStatus
(
Long
id
);
public
void
reformStatisticsPlanTask
(
String
strBginDate
,
String
strEndDate
,
String
userId
,
String
orgCode
)
throws
ParseException
;
public
void
reformStatisticsPlanTask
(
String
strBginDate
,
String
strEndDate
,
String
userId
,
String
orgCode
)
throws
ParseException
;
void
initPlanStatusOrGenDate
();
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
...
@@ -2,36 +2,40 @@
...
@@ -2,36 +2,40 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper"
>
<mapper
namespace=
"com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper"
>
<!--统计-计划执行 -->
<!--统计-计划执行 -->
<select
id=
"countPlanTask"
resultType=
"long"
>
<select
id=
"countPlanTask"
resultType=
"long"
>
SELECT COUNT(1) as total_num FROM (
SELECT COUNT(1) as total_num FROM (
SELECT
SELECT
b.id
b.id
FROM p_plan_task_detail b
FROM p_plan_task_detail b
LEFT JOIN p_plan_task a ON a.id = b.task_no
LEFT JOIN p_plan_task a ON a.id = b.task_no
LEFT JOIN p_point d ON d.id = b.point_id
LEFT JOIN p_point d ON d.id = b.point_id
<where>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<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=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
AND
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
OR
<![CDATA[<=]]>
#{endDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{beginDate}
</if>
)
OR
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{endDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
<![CDATA[>=]]>
#{beginDate}
</if>
)
OR
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[<=]]>
#{endDate} AND a.end_Time
)
<![CDATA[>=]]>
#{endDate}
</if>
)
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
OR
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<![CDATA[>=]]>
#{endDate}
</if>
)
<if
test=
"orgCode!=null"
>
)
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
</where>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
order by b.id) t
<if
test=
"orgCode!=null"
>
</select>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
<sql
id=
"planTaskInfoSql"
>
</if>
</where>
order by b.id) t
</select>
<sql
id=
"planTaskInfoSql"
>
SELECT
SELECT
b.id,
b.id,
a.id batchNo,
a.id batchNo,
...
@@ -60,385 +64,392 @@
...
@@ -60,385 +64,392 @@
LEFT JOIN p_point d ON d.id = b.point_id
LEFT JOIN p_point d ON d.id = b.point_id
LEFT JOIN p_route e ON e.id = a.route_id
LEFT JOIN p_route e ON e.id = a.route_id
</sql>
</sql>
<!--计划执行查询 -->
<!--计划执行查询 -->
<select
id=
"getPlanTaskInfo"
resultType=
"java.util.HashMap"
>
<select
id=
"getPlanTaskInfo"
resultType=
"java.util.HashMap"
>
<include
refid=
"planTaskInfoSql"
/>
<include
refid=
"planTaskInfoSql"
/>
<where>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<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=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
AND
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
OR
<![CDATA[<=]]>
#{endDate}
</if>
)
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<![CDATA[>=]]>
#{beginDate}
</if>
)
OR
OR
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{endDate} AND a.end_Time
<![CDATA[>=]]>
#{endDate}
</if>
)
<![CDATA[>=]]>
#{beginDate}
</if>
)
OR
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[<=]]>
#{endDate} AND a.end_Time
)
<![CDATA[>=]]>
#{endDate}
</if>
)
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
OR
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
(
<if
test=
"beginDate!=null and endDate!=null"
>
a.begin_Time
<![CDATA[<=]]>
#{beginDate} AND a.end_Time
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<![CDATA[>=]]>
#{endDate}
</if>
)
<if
test=
"orgCode!=null"
>
)
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
</where>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
order by b.id
<if
test=
"orgCode!=null"
>
<choose>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
<when
test=
"pageSize==-1"
></when>
</if>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</where>
</choose>
order by b.id
</select>
<choose>
<when
test=
"pageSize==-1"
></when>
<select
id=
"getPlanTaskInfoList"
resultType=
"com.yeejoin.amos.supervision.business.vo.PlanTaskVo"
>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<include
refid=
"planTaskInfoSql"
/>
</choose>
<where>
</select>
<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=
"orgCode!=null"
>
and a.org_code like #{orgCode}
</if>
</where>
order by b.id
</select>
<select
id=
"getPlanTaskListByIds"
resultType=
"com.yeejoin.amos.supervision.business.vo.PlanTaskVo"
>
<select
id=
"getPlanTaskInfoList"
resultType=
"com.yeejoin.amos.supervision.business.vo.PlanTaskVo"
>
<include
refid=
"planTaskInfoSql"
/>
<include
refid=
"planTaskInfoSql"
/>
where b.id in
<where>
<foreach
item=
"Id"
collection=
"ids"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<if
test=
"pointNo!=null"
>
and d.point_no = #{pointNo}
</if>
#{Id}
<if
test=
"pointName!=null"
>
and c.name like concat(#{pointName},'%')
</if>
</foreach>
<if
test=
"beginDate!=null"
>
and a.begin_Time >= #{beginDate}
</if>
order by b.id
<if
test=
"endDate!=null"
>
and a.end_time
<![CDATA[<=]]>
#{endDate}
</if>
</select>
<!-- <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=
"orgCode!=null"
>
and a.org_code like #{orgCode}
</if>
</where>
order by b.id
<delete
id =
"planTaskDet"
>
</select>
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 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})
where a.id in
<foreach
item=
"Id"
collection=
"IDS"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{Id}
</foreach>
</update>
<select
id=
"getGenPlanTask"
resultType=
"long
"
>
<select
id=
"getPlanTaskListByIds"
resultType=
"com.yeejoin.amos.supervision.business.vo.PlanTaskVo
"
>
select a.id from p_plan_task a
<include
refid=
"planTaskInfoSql"
/>
<trim
prefix=
"where"
prefixOverrides=
"AND |OR"
>
where b.id in
<if
test=
"beginDate!=null"
>
and a.begin_Time >= #{beginDate}
</if
>
<foreach
item=
"Id"
collection=
"ids"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<if
test=
"endDate!=null"
>
and a.begin_Time
<![CDATA[<=]]>
#{endDate}
</if>
#{Id}
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if
>
</foreach
>
</trim>
order by b.id
</select>
</select>
<select
id=
"getPlanTaskByRouteId"
resultType=
"com.yeejoin.amos.supervision.dao.entity.PlanTask"
>
<delete
id=
"planTaskDet"
>
SELECT * FROM `p_plan_task`
delete from p_plan_task_detail where id in
<where>
<foreach
item=
"Id"
collection=
"array"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<if
test=
"routeId != null"
>
route_id = #{routeId}
</if>
#{Id}
</where>
</foreach>
</select>
</delete>
<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})
where a.id in
<foreach
item=
"Id"
collection=
"IDS"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{Id}
</foreach>
</update>
<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>
</trim>
</select>
<select
id=
"getPlanTaskByPointId"
resultType=
"Map"
>
<select
id=
"getPlanTaskByRouteId"
resultType=
"com.yeejoin.amos.supervision.dao.entity.PlanTask"
>
SELECT ptd.point_id pointId, pt.id planTaskId,
SELECT * FROM `p_plan_task`
pt.org_code OrgCode, p.name taskName, pt.status , pt.user_id userId,
<where>
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,
<if
test=
"routeId != null"
>
route_id = #{routeId}
</if>
pt.finish_num finishNum, pt.finish_status finishStatus,pt.batch_no batchNo
</where>
FROM
</select>
p_plan p
LEFT JOIN p_plan_task pt ON pt.plan_id = p.id
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=
"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>
and pt.status = 0
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
and SYSDATE()
<![CDATA[<]]>
pt.end_time
</select>
<select
id=
"getPlanTasks"
resultType=
"Map"
>
<select
id=
"getPlanTaskByPointId"
resultType=
"Map"
>
SELECT
SELECT ptd.point_id pointId, pt.id planTaskId,
*
pt.org_code OrgCode, p.name taskName, pt.status , pt.user_id userId,
FROM
date_format(pt.begin_time, '%Y-%m-%d %H:%i:%s') beginTime, date_format(pt.end_time, '%Y-%m-%d %H:%i:%s')
(SELECT
endTime, pt.check_date checkDate,
pt.id planTaskId,
pt.finish_num finishNum, pt.finish_status finishStatus,pt.batch_no batchNo
pt.org_code orgCode,
FROM
p.name taskName,
p_plan p
p.check_type_name checkTypeName,
LEFT JOIN p_plan_task pt ON pt.plan_id = p.id
P.check_type_id checkTypeId,
LEFT JOIN p_plan_task_detail ptd ON ptd.task_no = pt.id
p.id planId,
where
pt.status,
pt.finish_status = 1
pt.user_id userId,
<if
test=
"pointId!=null"
>
and ptd.point_id = #{pointId}
</if>
date_format(
<if
test=
"orgCode!=null"
>
and p.org_code = #{orgCode}
</if>
pt.begin_time,
<if
test=
"adminOrgCode!=null"
>
and p.org_code like concat(#{adminOrgCode},'%')
</if>
'%Y-%m-%d %H:%i:%s'
<if
test=
"userId!=null"
>
and find_in_set(#{userId},pt.user_id)>0
</if>
) beginTime,
and pt.status = 0
date_format(
and SYSDATE()
<![CDATA[>=]]>
pt.begin_time
pt.end_time,
and SYSDATE()
<![CDATA[<]]>
pt.end_time
'%Y-%m-%d %H:%i:%s'
</select>
) endTime,
date_format(
pt.check_date,
'%Y-%m-%d %H:%i:%s'
) checkDate,
pt.point_num as taskPlanNum,
pt.finish_num finishNum,
(pt.point_num - pt.finish_num) as waitNum,
pt.finish_status finishStatus,
pt.id batchNo,
pt.route_id,
pt.user_name userName,
r.owner_id,
r.owner_name as ownerName
FROM
p_plan_task pt
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"
/>
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=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
a.beginTime
<![CDATA[>=]]>
#{startTime}
AND a.endTime
<![CDATA[<=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{endTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>]]>
#{startTime}
)
OR (
a.beginTime
<![CDATA[<=]]>
#{startTime}
AND a.endTime
<![CDATA[>=]]>
#{endTime}
)
)
</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>-->
</where>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
</sql>
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
<select
id=
"getPlanTasks"
resultType=
"Map"
>
SELECT
SELECT
count(1) tasksCount
*
FROM
FROM
(
(SELECT
SELECT
pt.id planTaskId,
pt.id,
pt.org_code orgCode,
pt.user_id as userId,
p.name taskName,
pt.finish_status as finishStatus,
p.check_type_name checkTypeName,
pt.org_code as orgCode,
P.check_type_id checkTypeId,
pt.begin_time as beginTime,
p.id planId,
pt.end_time as endTime,
pt.status,
pt.point_num as taskPlanNum,
pt.user_id userId,
r.owner_id,
date_format(
P.check_type_id checkTypeId
pt.begin_time,
FROM
'%Y-%m-%d %H:%i:%s'
p_plan_task pt
) beginTime,
INNER JOIN p_plan p ON pt.plan_id = p.id
date_format(
INNER JOIN p_route r on r.id = pt.route_id
pt.end_time,
) a
'%Y-%m-%d %H:%i:%s'
<include
refid=
"mobile-plan-task-where"
/>
) endTime,
</select>
date_format(
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
pt.check_date,
SELECT
'%Y-%m-%d %H:%i:%s'
a.planTaskId,
) checkDate,
a.OrgCode,
pt.point_num as taskPlanNum,
a.taskName,
pt.finish_num finishNum,
a.userId as userId,
(pt.point_num - pt.finish_num) as waitNum,
a.beginTime,
pt.finish_status finishStatus,
a.endTime,
pt.id batchNo,
a.checkDate,
pt.route_id,
sum(a.finish) finshNum,
pt.user_name userName,
sum(a.omission) omission,
r.owner_id,
sum(a.unqualified) unqualified,
r.owner_name as ownerName
sum(a.unplan) unplan,
FROM
count(a.finish) taskPlanNum,
p_plan_task pt
a.finishStatus,
INNER JOIN p_plan p ON pt.plan_id = p.id
a.batchNo,
INNER JOIN p_route r on r.id = pt.route_id
a.itemNum,
) a
a.remain,
<include
refid=
"mobile-plan-task-where"
/>
a.safetyNum,
limit #{offset},#{pageSize}
a.majorNum,
</select>
a.inOrder
<sql
id=
"mobile-plan-task-where"
>
FROM
<where>
(
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
SELECT
<if
test=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},a.executorId)>0
</if>
pt.id planTaskId,
<if
test=
"companyId != null"
>
and find_in_set(#{companyId},a.owner_id)>0
</if>
pt.org_code OrgCode,
<if
test=
"taskType != null"
>
and a.checkTypeId = #{taskType}
</if>
p. NAME taskName,
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
pt.in_order inOrder,
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
pt. STATUS,
AND (
pt.user_id userId,
(
date_format(
a.beginTime
<![CDATA[>=]]>
#{startTime}
pt.begin_time,
AND a.endTime
<![CDATA[<=]]>
#{endTime}
'%Y-%m-%d %H:%i:%s'
)
) beginTime,
OR (
date_format(
a.beginTime
<![CDATA[<=]]>
#{endTime}
pt.end_time,
AND a.endTime
<![CDATA[>=]]>
#{endTime}
'%Y-%m-%d %H:%i:%s'
)
) endTime,
OR (
pt.check_date checkDate,
a.beginTime
<![CDATA[<=]]>
#{startTime}
pt.finish_num finishNum,
AND a.endTime
<![CDATA[>]]>
#{startTime}
pt.finish_status finishStatus,
)
pt.batch_no batchNo,
OR (
ptd.item_num itemNum,
a.beginTime
<![CDATA[<=]]>
#{startTime}
(ptd.item_num - ptd.executed_num) remain,
AND a.endTime
<![CDATA[>=]]>
#{endTime}
ptd.safety_danger_num safetyNum,
)
ptd.major_danger_num majorNum,
)
CASE ptd.`status`
</if>
WHEN 1 THEN
<!-- <choose>-->
1
<!-- <when test="identityType==1">-->
ELSE
<!-- And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )-->
0
<!-- <if test="companyId != null"> and a.owner_id = #{companyId}</if>-->
END finish,
<!-- </when>-->
CASE ptd.`status`
<!-- <when test="identityType==2">-->
WHEN 3 THEN
<!-- And a.owner_id = #{companyId}-->
1
<!-- </when>-->
ELSE
<!-- </choose>-->
0
</where>
END omission,
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
CASE ptd.`status`
</sql>
WHEN 2 THEN
1
<select
id=
"getPlanTasksCount"
resultType=
"long"
>
ELSE
SELECT
0
count(1) tasksCount
END unqualified,
FROM
CASE ptd.`status`
(
WHEN 0 THEN
SELECT
1
pt.id,
ELSE
pt.user_id as userId,
0
pt.finish_status as finishStatus,
END unplan
pt.org_code as orgCode,
FROM
pt.begin_time as beginTime,
p_plan_task_detail ptd
pt.end_time as endTime,
LEFT JOIN p_plan_task pt ON ptd.task_no = pt.id
pt.point_num as taskPlanNum,
LEFT JOIN p_plan p ON pt.plan_id = p.id
r.owner_id,
) a
P.check_type_id checkTypeId
where 1 = 1
FROM
<if
test=
"planTaskId != null and planTaskId >0 "
>
and a.planTaskId = #{planTaskId}
</if>
p_plan_task pt
</select>
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"
/>
</select>
<select
id=
"queryPlanTaskById"
resultType=
"Map"
>
SELECT
a.planTaskId,
a.OrgCode,
a.taskName,
a.userId as userId,
a.beginTime,
a.endTime,
a.checkDate,
sum(a.finish) finshNum,
sum(a.omission) omission,
sum(a.unqualified) unqualified,
sum(a.unplan) unplan,
count(a.finish) taskPlanNum,
a.finishStatus,
a.batchNo,
a.itemNum,
a.remain,
a.safetyNum,
a.majorNum,
a.inOrder
FROM
(
SELECT
pt.id planTaskId,
pt.org_code OrgCode,
p. NAME taskName,
pt.in_order inOrder,
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,
pt.finish_num finishNum,
pt.finish_status finishStatus,
pt.batch_no batchNo,
ptd.item_num itemNum,
(ptd.item_num - ptd.executed_num) remain,
ptd.safety_danger_num safetyNum,
ptd.major_danger_num majorNum,
CASE ptd.`status`
WHEN 1 THEN
1
ELSE
0
END finish,
CASE ptd.`status`
WHEN 3 THEN
1
ELSE
0
END omission,
CASE ptd.`status`
WHEN 2 THEN
1
ELSE
0
END unqualified,
CASE ptd.`status`
WHEN 0 THEN
1
ELSE
0
END unplan
FROM
p_plan_task_detail ptd
LEFT JOIN p_plan_task pt ON ptd.task_no = pt.id
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>
</select>
<select
id=
"getPlanTaskPoints"
resultType=
"Map"
>
<select
id=
"getPlanTaskPoints"
resultType=
"Map"
>
SELECT
SELECT
p.name,
p.name,
p.id pointId,
p.id pointId,
p.point_no pointNO,
p.point_no pointNO,
p.offline,
p.offline,
ptd.status,
ptd.status,
ptd.is_finish finish,
ptd.is_finish finish,
p.is_fixed isFixed,
p.is_fixed isFixed,
pt.route_id routeId,
pt.route_id routeId,
c.id checkId,
c.id checkId,
prp.order_no orderNo,
prp.order_no orderNo,
ptd.item_num itemNum,
ptd.item_num itemNum,
ptd.executed_num executedNum,
ptd.executed_num executedNum,
ptd.safety_danger_num safetyDangerNum,
ptd.safety_danger_num safetyDangerNum,
ptd.major_danger_num majorDangerNum,
ptd.major_danger_num majorDangerNum,
ptd.executor_date beginTime,
ptd.executor_date beginTime,
ptd.item_num taskPlanNum
ptd.item_num taskPlanNum
FROM
FROM
p_plan_task_detail ptd
p_plan_task_detail ptd
LEFT JOIN p_plan_task pt
ON pt.id = ptd.task_no
LEFT JOIN p_plan_task pt
ON pt.id = ptd.task_no
LEFT JOIN p_point p ON p.id = ptd.point_id
LEFT JOIN p_point p ON p.id = ptd.point_id
LEFT JOIN p_check c ON c.plan_task_detail_id = ptd.id
LEFT JOIN p_check c ON c.plan_task_detail_id = ptd.id
LEFT JOIN p_route_point prp ON prp.point_id = ptd.point_id AND prp.route_id = pt.route_id
LEFT JOIN p_route_point prp ON prp.point_id = ptd.point_id AND prp.route_id = pt.route_id
LEFT JOIN p_plan ppn ON ppn.id = pt.plan_id
LEFT JOIN p_plan ppn ON ppn.id = pt.plan_id
WHERE
WHERE
p.is_delete = 0
p.is_delete = 0
<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=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},ptd.executor_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=
"finishStatus != null and finishStatus!=''"
>
and ptd.is_finish = #{finishStatus}
</if>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
AND (
(
(
ptd.executor_date
<![CDATA[>=]]>
#{startTime}
ptd.executor_date
<![CDATA[>=]]>
#{startTime}
AND ptd.executor_date
<![CDATA[<=]]>
#{endTime}
AND ptd.executor_date
<![CDATA[<=]]>
#{endTime}
)
)
)
)
</if>
</if>
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</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=
"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=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
<select
id=
"getPlanTaskPointsCount"
resultType=
"long"
>
<select
id=
"getPlanTaskPointsCount"
resultType=
"long"
>
SELECT
SELECT
count(1)
count(1)
FROM
FROM
p_plan_task_detail ptd
p_plan_task_detail ptd
LEFT JOIN p_plan_task pt
ON pt.id = ptd.task_no
LEFT JOIN p_plan_task pt
ON pt.id = ptd.task_no
LEFT JOIN p_point p ON p.id = ptd.point_id
LEFT JOIN p_point p ON p.id = ptd.point_id
LEFT JOIN p_check c ON c.plan_task_detail_id = ptd.id
LEFT JOIN p_check c ON c.plan_task_detail_id = ptd.id
LEFT JOIN p_route_point prp ON prp.point_id = ptd.point_id AND prp.route_id = pt.route_id
LEFT JOIN p_route_point prp ON prp.point_id = ptd.point_id AND prp.route_id = pt.route_id
LEFT JOIN p_plan ppn ON ppn.id = pt.plan_id
LEFT JOIN p_plan ppn ON ppn.id = pt.plan_id
WHERE
WHERE
p.is_delete = 0
p.is_delete = 0
<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=
"executorId != null and executorId > 0 "
>
and find_in_set(#{executorId},ptd.executor_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=
"finishStatus != null and finishStatus!=''"
>
and ptd.is_finish = #{finishStatus}
</if>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
AND (
(
(
ptd.executor_date
<![CDATA[>=]]>
#{startTime}
ptd.executor_date
<![CDATA[>=]]>
#{startTime}
AND ptd.executor_date
<![CDATA[<=]]>
#{endTime}
AND ptd.executor_date
<![CDATA[<=]]>
#{endTime}
)
)
)
)
</if>
</if>
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</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=
"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=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
</select>
</select>
<select
id=
"getCurrentPlanTaskCount"
resultType=
"int"
parameterType=
"long"
>
<select
id=
"getCurrentPlanTaskCount"
resultType=
"int"
parameterType=
"long"
>
SELECT
SELECT
count(1) num
count(1) num
FROM
FROM
p_plan_task pt
p_plan_task pt
where
where
DATE_FORMAT(pt.begin_time, '%y-%M-%d')
<![CDATA[<=]]>
DATE_FORMAT(SYSDATE(),'%y-%M-%d')
DATE_FORMAT(pt.begin_time, '%y-%M-%d')
<![CDATA[<=]]>
DATE_FORMAT(SYSDATE(),'%y-%M-%d')
and DATE_FORMAT(pt.end_time, '%y-%M-%d')
<![CDATA[>=]]>
DATE_FORMAT(SYSDATE(),'%y-%M-%d')
and DATE_FORMAT(pt.end_time, '%y-%M-%d')
<![CDATA[>=]]>
DATE_FORMAT(SYSDATE(),'%y-%M-%d')
and pt.finish_status = 1
and pt.finish_status = 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>
</select>
</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
SELECT
ppi.input_item_id inputItemId,
ppi.input_item_id inputItemId,
...
@@ -489,351 +500,357 @@
...
@@ -489,351 +500,357 @@
AND temp1.route_id = temp2.routeId)
AND temp1.route_id = temp2.routeId)
</select>
</select>
<!-- 巡检执行情况统计分页用 -->
<!-- 巡检执行情况统计分页用 -->
<select
id=
"countChkExListData"
resultType=
"long"
>
<select
id=
"countChkExListData"
resultType=
"long"
>
select
select
count(A.ID) total_num
count(A.ID) total_num
from
from
p_plan_task a,
p_plan_task a,
p_plan b
p_plan b
<!-- s_user c -->
<!-- s_user c -->
WHERE
<!-- A.USER_ID = C.ID AND -->
A.PLAN_ID = B.ID
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=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and
<if
test=
"orgCode != null and orgCode !=''"
>
date_format(a.end_time, '%Y%m%d') >= #{checkDate}
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
</if>
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
</select>
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
<resultMap
id=
"ChkExResultMap"
</if>
type=
"com.yeejoin.amos.supervision.business.entity.mybatis.CheckChkExListBo"
>
</select>
</resultMap>
<resultMap
id=
"ChkExResultMap"
<!-- 巡检执行情况查询 -->
type=
"com.yeejoin.amos.supervision.business.entity.mybatis.CheckChkExListBo"
>
<select
id=
"getChkExList"
resultMap=
"ChkExResultMap"
>
</resultMap>
select
<!-- 巡检执行情况查询 -->
a.id,
<select
id=
"getChkExList"
resultMap=
"ChkExResultMap"
>
b.name,
select
date_format(a.begin_time, '%Y-%m-%d %H:%i:%s') lastTime,
a.id,
date_format(a.end_time, '%Y-%m-%d %H:%i:%s') as endTime,
b.name,
a.finish_status finishStatus,
date_format(a.begin_time, '%Y-%m-%d %H:%i:%s') lastTime,
a.USER_ID realName
<!-- , -->
date_format(a.end_time, '%Y-%m-%d %H:%i:%s') as endTime,
<!-- IFNULL(case when c.mobile = '' or c.mobile is null then null else c.mobile END,c.telephone) as LoginName -->
a.finish_status finishStatus,
from
a.USER_ID realName
<!-- , -->
p_plan_task a,
<!-- IFNULL(case when c.mobile = '' or c.mobile is null then null else c.mobile END,c.telephone) as LoginName -->
p_plan b
from
<!-- s_user c -->
p_plan_task a,
WHERE
<!-- A.USER_ID = C.ID AND -->
A.PLAN_ID = B.ID
p_plan b
<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>
<!-- s_user c -->
<if
test=
"orgCode != null and orgCode !=''"
>
WHERE
<!-- A.USER_ID = C.ID AND -->
A.PLAN_ID = B.ID
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
<if
test=
"checkDate!=null"
>
and date_format(a.begin_time, '%Y%m%d')
<![CDATA[<=]]>
#{checkDate} and
</if>
date_format(a.end_time, '%Y%m%d') >= #{checkDate}
order by a.id
</if>
<choose>
<if
test=
"orgCode != null and orgCode !=''"
>
<when
test=
"pageSize==-1"
></when>
And (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</if>
</choose>
order by a.id
</select>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
<select
id=
"getPlanTaskStatisticsForApp"
resultType=
"Map"
>
<select
id=
"getPlanTaskStatisticsForApp"
resultType=
"Map"
>
SELECT
SELECT
count(1) total,
count(1) total,
CASE
CASE
WHEN sum(a.unfinished) IS NULL THEN
WHEN sum(a.unfinished) IS NULL THEN
0
0
ELSE
ELSE
sum(a.unfinished)
sum(a.unfinished)
END unfinished,
END unfinished,
CASE
CASE
WHEN sum(a.finished) IS NULL THEN
WHEN sum(a.finished) IS NULL THEN
0
0
ELSE
ELSE
sum(a.finished)
sum(a.finished)
END finished,
END finished,
CASE
CASE
WHEN sum(a.missed) IS NULL THEN
WHEN sum(a.missed) IS NULL THEN
0
0
ELSE
ELSE
sum(a.missed)
sum(a.missed)
END missed
END missed
FROM
FROM
(
(
SELECT
SELECT
ptd.id,
ptd.id,
ptd.is_finish,
ptd.is_finish,
CASE ptd.is_finish
CASE ptd.is_finish
WHEN 0 THEN
WHEN 0 THEN
1
1
ELSE
ELSE
0
0
END unfinished,
END unfinished,
CASE ptd.is_finish
CASE ptd.is_finish
WHEN 1 THEN
WHEN 1 THEN
1
1
ELSE
ELSE
0
0
END finished,
END finished,
CASE ptd.is_finish
CASE ptd.is_finish
WHEN 2 THEN
WHEN 2 THEN
1
1
ELSE
ELSE
0
0
END missed,
END missed,
pt.begin_time,
pt.begin_time,
pt.end_time,
pt.end_time,
pt.user_id,
pt.user_id,
pt.org_code,
pt.org_code,
pt.user_dept
pt.user_dept
FROM
FROM
p_plan_task_detail ptd
p_plan_task_detail ptd
LEFT JOIN p_plan_task pt ON pt.id = ptd.task_no
LEFT JOIN p_plan_task pt ON pt.id = ptd.task_no
<where>
<where>
<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>
<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=
"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=
"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=
"endTime != null and endTime != '' "
>
and pt.begin_time
<![CDATA[<=]]>
#{endTime}
</if>
</where>
</where>
) a
) a
</select>
</select>
<select
id=
"getPointPlanTaskInfo"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
<select
id=
"getPointPlanTaskInfo"
SELECT
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
pp.id pointId,
SELECT
pp.`name` pointName,
pp.id pointId,
pp.point_no pointNo,
pp.`name` pointName,
ppt.route_id routeId,
pp.point_no pointNo,
ppl.`name` planName,
ppt.route_id routeId,
ppt.begin_time checkTime,
ppl.`name` planName,
ppl.dept_id checkDepartmentId,
ppt.begin_time checkTime,
ppt.user_id userId,
ppl.dept_id checkDepartmentId,
pptd.`status` pointStatus
ppt.user_id userId,
FROM
pptd.`status` pointStatus
p_plan_task_detail pptd
FROM
LEFT JOIN p_plan_task ppt ON pptd.task_no = ppt.id
p_plan_task_detail pptd
LEFT JOIN p_plan ppl ON ppl.id = ppt.plan_id
LEFT JOIN p_plan_task ppt ON pptd.task_no = ppt.id
LEFT JOIN p_point pp ON pp.id = pptd.point_id
LEFT JOIN p_plan ppl ON ppl.id = ppt.plan_id
<where>
LEFT JOIN p_point pp ON pp.id = pptd.point_id
<if
test=
"planTaskId != null and planTaskId !=''"
>
<where>
AND ppt.id = #{planTaskId}
<if
test=
"planTaskId != null and planTaskId !=''"
>
</if>
AND ppt.id = #{planTaskId}
<if
test=
"pointId != null and pointId !=''"
>
</if>
AND pptd.point_id = #{pointId}
<if
test=
"pointId != null and pointId !=''"
>
</if>
AND pptd.point_id = #{pointId}
</where>
</if>
</select>
</where>
</select>
<select
id=
"getPointInputByRouteIdAndPointId"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
<select
id=
"getPointInputByRouteIdAndPointId"
SELECT
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
pii.`name` inputName,
SELECT
pii.id checkInputId,
pii.`name` inputName,
ppc.id classifyId,
pii.id checkInputId,
ppc.name classifyName,
ppc.id classifyId,
pii.item_type itemType,
ppc.name classifyName,
pii.risk_desc riskDesc,
pii.item_type itemType,
pii.data_json dataJson,
pii.risk_desc riskDesc,
pii.is_must isMust,
pii.data_json dataJson,
pii.picture_json pictureJson,
pii.is_must isMust,
pii.is_multiline isMultiline,
pii.picture_json pictureJson,
pii.order_no orderNo
pii.is_multiline isMultiline,
FROM
pii.order_no orderNo
p_route_point_item prpi
FROM
LEFT JOIN p_point_classify ppc ON ppc.id = prpi.point_classify_id
p_route_point_item prpi
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
LEFT JOIN p_point_classify ppc ON ppc.id = prpi.point_classify_id
LEFT JOIN p_point_inputitem ppii ON ppii.id = prpi.point_input_item_id
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
LEFT JOIN p_input_item pii ON pii.id = ppii.input_item_id
LEFT JOIN p_point_inputitem ppii ON ppii.id = prpi.point_input_item_id
WHERE prp.point_id = #{pointId}
LEFT JOIN p_input_item pii ON pii.id = ppii.input_item_id
AND prp.route_id =#{routeId}
WHERE prp.point_id = #{pointId}
ORDER BY
AND prp.route_id =#{routeId}
prpi.order_no
ORDER BY
prpi.order_no
<!--
SELECT
<!--
pii.`name` inputName,
SELECT
pii.id checkInputId
pii.`name` inputName,
FROM
pii.id checkInputId
p_route_point_item prpi,
FROM
p_route_point prp,
p_route_point_item prpi,
p_point_inputitem ppii,
p_route_point prp,
p_input_item pii
p_point_inputitem ppii,
WHERE
p_input_item pii
prpi.route_point_id = prp.id
WHERE
AND prpi.point_input_item_id = ppii.id
prpi.route_point_id = prp.id
AND pii.id = ppii.input_item_id
AND prpi.point_input_item_id = ppii.id
AND prp.point_id = #{pointId}
AND pii.id = ppii.input_item_id
AND prp.route_id = #{routeId}
AND prp.point_id = #{pointId}
ORDER BY
AND prp.route_id = #{routeId}
prpi.order_no -->
ORDER BY
</select>
prpi.order_no -->
</select>
<select
id=
"getCumulativePlanCountByOrgCode"
resultType=
"String"
>
<select
id=
"getCumulativePlanCountByOrgCode"
resultType=
"String"
>
SELECT
SELECT
concat(
concat(
coalesce(sum(a.finish), 0),
coalesce(sum(a.finish), 0),
'/',
'/',
coalesce(sum(a.total), 0)
coalesce(sum(a.total), 0)
) finish
) finish
FROM
FROM
(
(
SELECT
SELECT
CASE
CASE
WHEN t.is_finish = 1 THEN
WHEN t.is_finish = 1 THEN
1
1
ELSE
ELSE
0
0
END finish,
END finish,
1 total
1 total
FROM
FROM
p_plan_task_detail t
p_plan_task_detail t
LEFT JOIN p_plan_task p on p.id = t.task_no
LEFT JOIN p_plan_task p on p.id = t.task_no
WHERE 1=1
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} )
And (p.org_code LIKE CONCAT( #{orgCode}, '-%' ) or p.org_code= #{orgCode} )
</if>
</if>
AND p.check_date = DATE_FORMAT(SYSDATE(),'%Y-%m-%d')
AND p.check_date = DATE_FORMAT(SYSDATE(),'%Y-%m-%d')
) a
) a
</select>
</select>
<resultMap
type=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo"
id=
"LeavePlanTaskMap"
>
<resultMap
type=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo"
id=
"LeavePlanTaskMap"
>
<id
column=
"planTaskId"
property=
"planTaskId"
/>
<id
column=
"planTaskId"
property=
"planTaskId"
/>
<result
column=
"taskName"
property=
"taskName"
/>
<result
column=
"taskName"
property=
"taskName"
/>
<result
column=
"beginTime"
property=
"beginTime"
/>
<result
column=
"beginTime"
property=
"beginTime"
/>
<result
column=
"endTime"
property=
"endTime"
/>
<result
column=
"endTime"
property=
"endTime"
/>
<result
column=
"batchNo"
property=
"batchNo"
/>
<result
column=
"batchNo"
property=
"batchNo"
/>
<result
column=
"OrgCode"
property=
"OrgCode"
/>
<result
column=
"OrgCode"
property=
"OrgCode"
/>
<result
column=
"finishStatus"
property=
"finishStatus"
/>
<result
column=
"finishStatus"
property=
"finishStatus"
/>
<result
column=
"inOrder"
property=
"inOrder"
/>
<result
column=
"inOrder"
property=
"inOrder"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"remark"
property=
"remark"
/>
<collection
property=
"points"
ofType=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskPointVo"
<collection
property=
"points"
ofType=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskPointVo"
select=
"getPlanTaskLeavePoints"
column=
"{planTaskId=planTaskId}"
>
select=
"getPlanTaskLeavePoints"
column=
"{planTaskId=planTaskId}"
>
</collection>
</collection>
</resultMap>
</resultMap>
<resultMap
type=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskPointVo"
id=
"LeavePlanTaskPointMap"
>
<resultMap
type=
"com.yeejoin.amos.supervision.business.vo.LeavePlanTaskPointVo"
id=
"LeavePlanTaskPointMap"
>
<result
column=
"pointId"
property=
"pointId"
/>
<result
column=
"pointId"
property=
"pointId"
/>
<result
column=
"routeId"
property=
"routeId"
/>
<result
column=
"routeId"
property=
"routeId"
/>
<result
column=
"planTaskId"
property=
"planTaskId"
/>
<result
column=
"planTaskId"
property=
"planTaskId"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"pointNO"
property=
"pointNO"
/>
<result
column=
"pointNO"
property=
"pointNO"
/>
<result
column=
"offline"
property=
"offline"
/>
<result
column=
"offline"
property=
"offline"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"isFixed"
property=
"isFixed"
/>
<result
column=
"isFixed"
property=
"isFixed"
/>
<result
column=
"orderNo"
property=
"orderNo"
/>
<result
column=
"orderNo"
property=
"orderNo"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"remark"
property=
"remark"
/>
<collection
property=
"classify"
ofType=
"Map"
select=
"queryPointClassifyByRouteIdAndPointId"
<collection
property=
"classify"
ofType=
"Map"
select=
"queryPointClassifyByRouteIdAndPointId"
column=
"{routeId=routeId,pointId=pointId}"
>
column=
"{routeId=routeId,pointId=pointId}"
>
</collection>
</collection>
<collection
property=
"inputItems"
ofType=
"Map"
select=
"getRoutePointInputItem"
<collection
property=
"inputItems"
ofType=
"Map"
select=
"getRoutePointInputItem"
column=
"{routeId=routeId,pointId=pointId}"
>
column=
"{routeId=routeId,pointId=pointId}"
>
</collection>
</collection>
</resultMap>
</resultMap>
<select
id=
"getPlanTaskLeavePoints"
resultMap=
"LeavePlanTaskPointMap"
>
<select
id=
"getPlanTaskLeavePoints"
resultMap=
"LeavePlanTaskPointMap"
>
SELECT
SELECT
p.name,
p.name,
p.id pointId,
p.id pointId,
p.point_no pointNO,
p.point_no pointNO,
p.offline,
p.offline,
ptd.is_finish status,
ptd.is_finish status,
p.is_fixed isFixed,
p.is_fixed isFixed,
pt.route_id routeId,
pt.route_id routeId,
c.id checkId,
c.id checkId,
pt.id planTaskId,
pt.id planTaskId,
pp.name taskName,
pp.name taskName,
rp.order_no orderNo,
rp.order_no orderNo,
p.remark remark
p.remark remark
FROM
FROM
p_plan_task pt
p_plan_task pt
LEFT JOIN p_plan_task_detail ptd ON pt.id = ptd.task_no
LEFT JOIN p_plan_task_detail ptd ON pt.id = ptd.task_no
LEFT JOIN p_plan pp on pp.id = plan_id
LEFT JOIN p_plan pp on pp.id = plan_id
LEFT JOIN p_point p ON p.id = ptd.point_id
LEFT JOIN p_point p ON p.id = ptd.point_id
LEFT JOIN p_check c ON c.plan_task_detail_id = ptd.id
LEFT JOIN p_check c ON c.plan_task_detail_id = ptd.id
LEFT JOIN p_route_point rp on rp.route_id = pt.route_id and rp.point_id = ptd.point_id
LEFT JOIN p_route_point rp on rp.route_id = pt.route_id and rp.point_id = ptd.point_id
WHERE
WHERE
p.is_delete = 0
p.is_delete = 0
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and pt.id = #{planTaskId}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and pt.id = #{planTaskId}
</if>
order by orderNo
order by orderNo
</select>
</select>
<resultMap
id=
"routePointInputItemMap"
type=
"com.yeejoin.amos.supervision.business.vo.PointInputItemVo"
>
<resultMap
id=
"routePointInputItemMap"
type=
"com.yeejoin.amos.supervision.business.vo.PointInputItemVo"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"inputItemId"
column=
"input_item_id"
/>
<result
property=
"inputItemId"
column=
"input_item_id"
/>
<result
property=
"classifyIds"
column=
"classify_ids"
/>
<result
property=
"classifyIds"
column=
"classify_ids"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"riskDesc"
column=
"risk_desc"
/>
<result
property=
"riskDesc"
column=
"risk_desc"
/>
</resultMap>
</resultMap>
<select
id=
"getRoutePointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.vo.PointInputItemVo"
>
<select
id=
"getRoutePointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.vo.PointInputItemVo"
>
SELECT
SELECT
pii.*, ppc.id classifyIds, ppc.`name`
classifyNames
pii.*, ppc.id classifyIds, ppc.`name`
classifyNames
FROM
FROM
p_route_point_item prpi
p_route_point_item prpi
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
LEFT JOIN p_point_classify ppc on ppc.id = prpi.point_classify_id
LEFT JOIN p_point_classify ppc on ppc.id = prpi.point_classify_id
LEFT JOIN p_point_inputitem ppi ON ppi.id = prpi.point_input_item_id
LEFT JOIN p_point_inputitem ppi ON ppi.id = prpi.point_input_item_id
LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id
LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id
<where>
<where>
<if
test=
"routeId != null"
>
prp.route_id = #{routeId}
</if>
<if
test=
"routeId != null"
>
prp.route_id = #{routeId}
</if>
<if
test=
"pointId != null"
>
and prp.point_id = #{pointId}
</if>
<if
test=
"pointId != null"
>
and prp.point_id = #{pointId}
</if>
</where>
</where>
<!--
<!--
SELECT
SELECT
ii.*, pii.classify_ids, group_concat(ppc.name) classifyNames
ii.*, pii.classify_ids, group_concat(ppc.name) classifyNames
FROM
FROM
p_input_item ii
p_input_item ii
LEFT JOIN p_point_inputitem pii ON pii.input_item_id = ii.id
LEFT JOIN p_point_inputitem pii ON pii.input_item_id = ii.id
LEFT JOIN p_point_classify ppc on pii.classify_ids REGEXP CONCAT(
LEFT JOIN p_point_classify ppc on pii.classify_ids REGEXP CONCAT(
'^',
'^',
ppc.id,
ppc.id,
',|,',
',|,',
ppc.id,
ppc.id,
',|,',
',|,',
ppc.id,
ppc.id,
'$',
'$',
'|^',
'|^',
ppc.id,
ppc.id,
'$'
'$'
)
)
LEFT JOIN p_route_point_item prpi ON prpi.point_input_item_id = pii.id,
LEFT JOIN p_route_point_item prpi ON prpi.point_input_item_id = pii.id,
(
(
SELECT
SELECT
id AS route_point_id
id AS route_point_id
FROM
FROM
p_route_point rp
p_route_point rp
<where>
<where>
<if test="routeId != null">route_id = #{routeId}</if>
<if test="routeId != null">route_id = #{routeId}</if>
<if test="pointId != null">and point_id = #{pointId}</if>
<if test="pointId != null">and point_id = #{pointId}</if>
</where>
</where>
) prp
) prp
WHERE
WHERE
prp.route_point_id = prpi.route_point_id
prp.route_point_id = prpi.route_point_id
GROUP BY ii.id,
GROUP BY ii.id,
ii.org_code,
ii.org_code,
ii.name,
ii.name,
ii.order_no,
ii.order_no,
ii.item_type,
ii.item_type,
ii.is_must,
ii.is_must,
ii.is_score,
ii.is_score,
ii.default_value,
ii.default_value,
ii.is_multiline,
ii.is_multiline,
ii.catalog_id,
ii.catalog_id,
ii.input_json,
ii.input_json,
ii.data_json,
ii.data_json,
ii.remark,
ii.remark,
ii.picture_json,
ii.picture_json,
ii.create_by,
ii.create_by,
ii.create_date,
ii.create_date,
ii.is_delete,
ii.is_delete,
ii.level
ii.level
, pii.classify_ids
, pii.classify_ids
SELECT
SELECT
*
*
FROM
FROM
p_point_inputitem
p_point_inputitem
WHERE
WHERE
id IN (
id IN (
SELECT
SELECT
point_input_item_id
point_input_item_id
FROM
FROM
p_route_point_item prpi,
p_route_point_item prpi,
...
@@ -849,10 +866,10 @@
...
@@ -849,10 +866,10 @@
) prp
) prp
WHERE
WHERE
prp.route_point_id = prpi.route_point_id
prp.route_point_id = prpi.route_point_id
) -->
) -->
</select>
</select>
<select
id=
"queryPointClassifyByRouteIdAndPointId"
resultType=
"Map"
>
<select
id=
"queryPointClassifyByRouteIdAndPointId"
resultType=
"Map"
>
SELECT
SELECT
ppc.id,
ppc.id,
ppc.point_id pointId,
ppc.point_id pointId,
...
@@ -872,41 +889,41 @@
...
@@ -872,41 +889,41 @@
ppc.order_no
ppc.order_no
</select>
</select>
<select
id=
"queryLeavePlanTask"
resultMap=
"LeavePlanTaskMap"
>
<select
id=
"queryLeavePlanTask"
resultMap=
"LeavePlanTaskMap"
>
SELECT
SELECT
pt.id planTaskId,
pt.id planTaskId,
p. NAME taskName,
p. NAME taskName,
pt.batch_no batchNo,
pt.batch_no batchNo,
pt.finish_status finishStatus,
pt.finish_status finishStatus,
pt.user_id userId,
pt.user_id userId,
pt.org_code OrgCode,
pt.org_code OrgCode,
pt.finish_num finshNum,
pt.finish_num finshNum,
pt.point_num taskPlanNum,
pt.point_num taskPlanNum,
pt.begin_time beginTime,
pt.begin_time beginTime,
pt.end_time endTime,
pt.end_time endTime,
pt.route_id routeId,
pt.route_id routeId,
p.in_order inOrder,
p.in_order inOrder,
p.remark remark
p.remark remark
FROM
FROM
p_plan_task pt
p_plan_task pt
LEFT JOIN p_plan p ON pt.plan_id = p.id
LEFT JOIN p_plan p ON pt.plan_id = p.id
WHERE
WHERE
1 = 1
1 = 1
and pt.finish_status in (0,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>
<if
test=
"orgCode != null and orgCode !='' "
>
and pt.org_code like CONCAT(#{orgCode}, '%')
</if>
ORDER BY begin_time
ORDER BY begin_time
</select>
</select>
<resultMap
id=
"codeOrderVoMap"
type=
"com.yeejoin.amos.supervision.business.vo.CodeOrderVo"
>
<resultMap
id=
"codeOrderVoMap"
type=
"com.yeejoin.amos.supervision.business.vo.CodeOrderVo"
>
<result
property=
"inOrder"
column=
"in_order"
/>
<result
property=
"inOrder"
column=
"in_order"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"pointId"
column=
"point_id"
/>
<result
property=
"playTaskId"
column=
"playTaskId"
/>
<result
property=
"playTaskId"
column=
"playTaskId"
/>
<result
property=
"pointNo"
column=
"pointNo"
/>
<result
property=
"pointNo"
column=
"pointNo"
/>
<result
property=
"status"
column=
"finish_status"
/>
<result
property=
"status"
column=
"finish_status"
/>
<result
property=
"isFinish"
column=
"is_finish"
/>
<result
property=
"isFinish"
column=
"is_finish"
/>
</resultMap>
</resultMap>
<select
id=
"queryCodeOrderVo"
resultMap=
"codeOrderVoMap"
>
<select
id=
"queryCodeOrderVo"
resultMap=
"codeOrderVoMap"
>
SELECT
SELECT
ptd.point_id ,
ptd.point_id ,
pt.finish_status,
pt.finish_status,
...
@@ -918,73 +935,86 @@
...
@@ -918,73 +935,86 @@
order by rp.order_no
order by rp.order_no
</select>
</select>
<update
id=
"reformStatistics"
>
<update
id=
"reformStatistics"
>
call planTaskStatistics(#{userId}, #{refDate}, #{orgCode});
call planTaskStatistics(#{userId}, #{refDate}, #{orgCode});
</update>
</update>
<select
id=
"countFinishByPlanIds"
resultType=
"java.util.Map"
>
<select
id=
"countFinishByPlanIds"
resultType=
"java.util.Map"
>
select
select
plan_id as planId,
plan_id as planId,
sum(if(finish_status=2,1,0)) as finishTimes
sum(if(finish_status=2,1,0)) as finishTimes
from
from
p_plan_task
p_plan_task
where
where
plan_id in
plan_id in
<foreach
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
group by plan_id
group by plan_id
</select>
</select>
<select
id=
"queryPlanTaskTimeAxis"
resultType=
"java.util.Map"
parameterType=
"java.util.HashMap"
>
<select
id=
"queryPlanTaskTimeAxis"
resultType=
"java.util.Map"
parameterType=
"java.util.HashMap"
>
SELECT
SELECT
ppk.id,
ppk.id,
pp.NAME AS planName,
pp.NAME AS planName,
ppk.begin_time AS beginTime,
ppk.begin_time AS beginTime,
ppk.end_time AS endTime,
ppk.end_time AS endTime,
ppk.user_id AS userId,
ppk.user_id AS userId,
( CASE pptd.STATUS WHEN 0 THEN '未执行' WHEN 1 THEN '正常' WHEN 2 THEN '异常' WHEN 3 THEN '漏检' END ) AS STATUS
( CASE pptd.STATUS WHEN 0 THEN '未执行' WHEN 1 THEN '正常' WHEN 2 THEN '异常' WHEN 3 THEN '漏检' END ) AS STATUS
FROM
FROM
`p_plan_task` ppk
`p_plan_task` ppk
LEFT JOIN p_plan pp ON pp.id = ppk.plan_id
LEFT JOIN p_plan pp ON pp.id = ppk.plan_id
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
<where>
<where>
<if
test=
"userId != null "
>
and find_in_set(#{userId},ppk.user_id)
</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=
"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=
"endTime != null and endTime != ''"
>
and ppk.end_time
<![CDATA[<=]]>
#{endTime}
</if>
</where>
</where>
GROUP BY
GROUP BY
ppk.begin_time,
ppk.begin_time,
ppk.id
ppk.id
ORDER BY
ORDER BY
ppk.begin_time DESC
ppk.begin_time DESC
</select>
</select>
<select
id=
"queryTimeAxis"
resultType=
"java.util.Map"
parameterType=
"java.util.HashMap"
>
<select
id=
"queryTimeAxis"
resultType=
"java.util.Map"
parameterType=
"java.util.HashMap"
>
SELECT
SELECT
ppk.id,
ppk.id,
pp.NAME AS planName,
pp.NAME AS planName,
ppk.begin_time AS beginTime,
ppk.begin_time AS beginTime,
ppk.end_time AS endTime,
ppk.end_time AS endTime,
ppk.user_id AS userId,
ppk.user_id AS userId,
point.name,
point.name,
point.risk_source_id,
point.risk_source_id,
( CASE pptd.STATUS WHEN 0 THEN '未执行' WHEN 1 THEN '正常' WHEN 2 THEN '异常' WHEN 3 THEN '漏检' END ) AS STATUS
( CASE pptd.STATUS WHEN 0 THEN '未执行' WHEN 1 THEN '正常' WHEN 2 THEN '异常' WHEN 3 THEN '漏检' END ) AS STATUS
FROM
FROM
`p_plan_task` ppk
`p_plan_task` ppk
LEFT JOIN p_plan pp ON pp.id = ppk.plan_id
LEFT JOIN p_plan pp ON pp.id = ppk.plan_id
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
LEFT JOIN p_point point ON point.id = pptd.point_id
LEFT JOIN p_point point ON point.id = pptd.point_id
<where>
<where>
<if
test=
"userId != null "
>
and find_in_set(#{userId},ppk.user_id)
</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=
"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=
"endTime != null and endTime != ''"
>
and ppk.end_time
<![CDATA[<=]]>
#{endTime}
</if>
</where>
</where>
GROUP BY
GROUP BY
ppk.begin_time,
ppk.begin_time,
ppk.id
ppk.id
ORDER BY
ORDER BY
ppk.begin_time DESC LIMIT 60
ppk.begin_time DESC LIMIT 60
</select>
</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>
</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