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
86eee001
Commit
86eee001
authored
Dec 01, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
b09a9b91
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
153 additions
and
58 deletions
+153
-58
PowerTransferMapper.xml
...jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
+2
-1
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+11
-0
KeySiteController.java
.../boot/module/common/biz/controller/KeySiteController.java
+7
-1
DynamicGroupCode.java
...n/amos/boot/module/common/biz/enums/DynamicGroupCode.java
+5
-9
FireStationServiceImpl.java
...odule/common/biz/service/impl/FireStationServiceImpl.java
+27
-2
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+4
-1
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+1
-1
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+6
-2
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+2
-1
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+43
-15
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+45
-25
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
View file @
86eee001
...
@@ -271,7 +271,8 @@
...
@@ -271,7 +271,8 @@
SELECT
SELECT
b.company_id companyId,
b.company_id companyId,
b.company_name companyName,
b.company_name companyName,
COUNT( c.resources_num ) carNum
COUNT( c.resources_num ) carNum,
car_user userNum
FROM
FROM
jc_power_transfer a
jc_power_transfer a
LEFT JOIN jc_power_transfer_company b ON a.sequence_nbr = b.power_transfer_id
LEFT JOIN jc_power_transfer_company b ON a.sequence_nbr = b.power_transfer_id
...
...
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 @
86eee001
...
@@ -1432,12 +1432,14 @@ public class CommandController extends BaseController {
...
@@ -1432,12 +1432,14 @@ public class CommandController extends BaseController {
String
buildIdName
=
""
;
String
buildIdName
=
""
;
Long
zdid
=
null
;
Long
zdid
=
null
;
String
zdname
=
""
;
String
zdname
=
""
;
String
bizOrgCode
=
""
;
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
();
bizOrgCode
=
orgUsrzhDto
.
get
(
0
).
getBizOrgCode
()
==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBizOrgCode
();
}
}
}
}
...
@@ -1463,6 +1465,15 @@ public class CommandController extends BaseController {
...
@@ -1463,6 +1465,15 @@ public class CommandController extends BaseController {
}
}
}
}
}
}
if
(
AlertCalled
.
getAlertTypeCode
().
equals
(
"235"
)
||
AlertCalled
.
getAlertTypeCode
().
equals
(
"242"
)){
List
<
KeySiteDto
>
keySiteDtos
=
keySiteService
.
queryForKeySiteList
(
null
,
null
,
null
,
null
,
null
,
bizOrgCode
);
List
<
OrgMenuDto
>
result
=
new
ArrayList
<>();
keySiteDtos
.
stream
().
forEach
(
e
->{
OrgMenuDto
date
=
new
OrgMenuDto
(
e
.
getSequenceNbr
(),
e
.
getSequenceNbr
(),
e
.
getName
(),
e
.
getName
(),
null
);
result
.
add
(
date
);
});
return
ResponseHelper
.
buildResponse
(
result
);
}
return
ResponseHelper
.
buildResponse
(
buildId
==
null
?
null
:
keySiteService
.
getBuildAndKeyTree
(
buildId
));
return
ResponseHelper
.
buildResponse
(
buildId
==
null
?
null
:
keySiteService
.
getBuildAndKeyTree
(
buildId
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/KeySiteController.java
View file @
86eee001
...
@@ -187,6 +187,10 @@ public class KeySiteController extends BaseController {
...
@@ -187,6 +187,10 @@ public class KeySiteController extends BaseController {
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
}
}
}
if
(
model
.
getFireEnduranceRateName
()!=
null
){
model
.
setFireEnduranceRate
(
DynamicGroupCode
.
getEnum
(
model
.
getFireEnduranceRateName
()).
getCode
());
}
return
ResponseHelper
.
buildResponse
(
keySiteService
.
update
(
model
,
getUserInfo
()));
return
ResponseHelper
.
buildResponse
(
keySiteService
.
update
(
model
,
getUserInfo
()));
}
}
...
@@ -234,7 +238,9 @@ public class KeySiteController extends BaseController {
...
@@ -234,7 +238,9 @@ public class KeySiteController extends BaseController {
}
}
}
}
dto
.
setAttachmentsList
(
list
);
dto
.
setAttachmentsList
(
list
);
if
(
dto
.
getFireEnduranceRateName
()
!=
null
){
dto
.
setFireEnduranceRate
(
dto
.
getFireEnduranceRateName
());
}
if
(
null
!=
dto
.
getLongitude
()
&&
null
!=
dto
.
getLatitude
())
{
if
(
null
!=
dto
.
getLongitude
()
&&
null
!=
dto
.
getLatitude
())
{
dto
.
setAddressDesc
(
dto
.
getAddressDesc
().
concat
(
"@address@"
).
concat
(
"{\"longitude\":"
).
dto
.
setAddressDesc
(
dto
.
getAddressDesc
().
concat
(
"@address@"
).
concat
(
"{\"longitude\":"
).
concat
(
dto
.
getLongitude
().
toString
().
concat
(
",\"latitude\":"
).
concat
(
dto
.
getLatitude
().
toString
().
concat
(
"}"
))));
concat
(
dto
.
getLongitude
().
toString
().
concat
(
",\"latitude\":"
).
concat
(
dto
.
getLatitude
().
toString
().
concat
(
"}"
))));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/enums/DynamicGroupCode.java
View file @
86eee001
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
enums
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
DynamicGroupCode
{
public
enum
DynamicGroupCode
{
JCS_PERSON
(
"机场人员"
,
"246"
),
JCS_PERSON
(
"机场人员"
,
"246"
),
...
@@ -8,10 +13,6 @@ public enum DynamicGroupCode {
...
@@ -8,10 +13,6 @@ public enum DynamicGroupCode {
JCS_SANJ
(
"三级"
,
"854"
),
JCS_SANJ
(
"三级"
,
"854"
),
JCS_SIJ
(
"四级"
,
"855"
);
JCS_SIJ
(
"四级"
,
"855"
);
private
String
name
;
private
String
name
;
private
String
code
;
private
String
code
;
...
@@ -31,11 +32,6 @@ public enum DynamicGroupCode {
...
@@ -31,11 +32,6 @@ public enum DynamicGroupCode {
this
.
code
=
code
;
this
.
code
=
code
;
}
}
DynamicGroupCode
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
DynamicGroupCode
getEnum
(
String
name
)
{
public
static
DynamicGroupCode
getEnum
(
String
name
)
{
for
(
DynamicGroupCode
bEnum
:
DynamicGroupCode
.
values
())
{
for
(
DynamicGroupCode
bEnum
:
DynamicGroupCode
.
values
())
{
if
(
bEnum
.
getName
().
equals
(
name
))
{
if
(
bEnum
.
getName
().
equals
(
name
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireStationServiceImpl.java
View file @
86eee001
...
@@ -9,7 +9,11 @@ import java.util.stream.Collectors;
...
@@ -9,7 +9,11 @@ import java.util.stream.Collectors;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
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.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
@@ -76,10 +80,31 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
...
@@ -76,10 +80,31 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if
(
"null"
.
equals
(
name
))
{
if
(
"null"
.
equals
(
name
))
{
name
=
null
;
name
=
null
;
}
}
return
this
.
queryForList
(
""
,
false
,
isDelete
,
bizCompanyId
,
name
,
bizOrgCode
);
return
this
.
queryForList
(
"
rec_date
"
,
false
,
isDelete
,
bizCompanyId
,
name
,
bizOrgCode
);
}
}
public
List
<
FireStationDto
>
queryList
(
Boolean
isDelete
,
String
bizOrgCode
,
Long
bizCompanyId
,
String
name
){
LambdaQueryWrapper
<
FireStation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
isDelete
);
wrapper
.
eq
(
FireStation:
:
getBizOrgCode
,
bizOrgCode
);
if
(
bizCompanyId
!=
null
){
wrapper
.
eq
(
FireStation:
:
getBizCompanyId
,
bizCompanyId
);
}
if
(
StringUtils
.
isNotEmpty
(
name
)){
wrapper
.
like
(
FireStation:
:
getName
,
name
);
}
List
<
FireStation
>
fireStations
=
fireStationMapper
.
selectList
(
wrapper
);
List
<
FireStationDto
>
list
=
new
ArrayList
<>();
fireStations
.
stream
().
forEach
(
e
->
{
FireStationDto
fireStationDto
=
new
FireStationDto
();
BeanUtils
.
copyProperties
(
e
,
fireStationDto
);
list
.
add
(
fireStationDto
);
});
return
list
;
/**
}
/**
* 删除
* 删除
*/
*/
public
Boolean
updateisDelete
(
Long
sequenceNbr
)
{
public
Boolean
updateisDelete
(
Long
sequenceNbr
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
86eee001
...
@@ -336,7 +336,10 @@ public class BuildingController extends AbstractBaseController {
...
@@ -336,7 +336,10 @@ public class BuildingController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询建筑详细信息"
)
@ApiOperation
(
value
=
"查询建筑详细信息"
)
public
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
@RequestParam
String
instanceId
)
{
public
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
@RequestParam
String
instanceId
)
{
return
buildService
.
getBuildDetaliByFloorId
(
instanceId
);
String
token
=
getToken
();
String
appKey
=
getAppKey
();
String
product
=
getProduct
();
return
buildService
.
getBuildDetaliByFloorId
(
instanceId
,
token
,
appKey
,
product
);
}
}
@GetMapping
(
value
=
"/getBuildingAbsolutePosition"
)
@GetMapping
(
value
=
"/getBuildingAbsolutePosition"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
86eee001
...
@@ -283,7 +283,7 @@ public interface IBuilldService extends IService<Building> {
...
@@ -283,7 +283,7 @@ public interface IBuilldService extends IService<Building> {
List
<
BuildingTreeAndEquipVO
>
gettreeAndEquip
();
List
<
BuildingTreeAndEquipVO
>
gettreeAndEquip
();
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
String
instanceId
);
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
String
instanceId
,
String
appKey
,
String
product
,
String
token
);
/**
/**
* 获取id与绝对位置对应的的map
* 获取id与绝对位置对应的的map
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
86eee001
...
@@ -1145,7 +1145,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1145,7 +1145,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
String
instanceId
)
{
public
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
String
instanceId
,
String
appKey
,
String
product
,
String
token
)
{
List
<
DictionarieValueModel
>
build_type
=
Systemctl
.
dictionarieClient
.
dictValues
(
buildType
).
getResult
();
List
<
DictionarieValueModel
>
build_type
=
Systemctl
.
dictionarieClient
.
dictValues
(
buildType
).
getResult
();
Map
<
String
,
String
>
buildType
=
build_type
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
Map
<
String
,
String
>
buildType
=
build_type
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
...
@@ -1167,7 +1167,11 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1167,7 +1167,11 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
String
userId
=
String
.
valueOf
(
map
.
get
(
"dutyUser"
));
String
userId
=
String
.
valueOf
(
map
.
get
(
"dutyUser"
));
String
dutyUser
=
""
;
String
dutyUser
=
""
;
if
(
userId
!=
null
&&
!
""
.
equals
(
userId
))
{
if
(
userId
!=
null
&&
!
""
.
equals
(
userId
))
{
dutyUser
=
remoteSecurityService
.
getUserById
(
userId
).
getRealName
();
ResponseModel
<
JSONObject
>
obj
=
jcsFeign
.
getUnitById
(
appKey
,
product
,
token
,
userId
);
JSONObject
result
=
obj
.
getResult
();
if
(
result
.
containsKey
(
"bizOrgName"
))
{
dutyUser
=
result
.
get
(
"bizOrgName"
).
toString
();
}
}
}
Map
<
String
,
Object
>
res
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
res
=
new
LinkedHashMap
<>();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
86eee001
...
@@ -335,7 +335,8 @@ public class ExcelServiceImpl {
...
@@ -335,7 +335,8 @@ public class ExcelServiceImpl {
nameString
=
par
.
containsKey
(
"name"
)?
par
.
get
(
"name"
).
toString
():
null
;
nameString
=
par
.
containsKey
(
"name"
)?
par
.
get
(
"name"
).
toString
():
null
;
bizCompanyId
=
par
.
containsKey
(
"bizCompanyId"
)?
Long
.
parseLong
(
par
.
get
(
"bizCompanyId"
).
toString
()):
null
;
bizCompanyId
=
par
.
containsKey
(
"bizCompanyId"
)?
Long
.
parseLong
(
par
.
get
(
"bizCompanyId"
).
toString
()):
null
;
}
}
List
<
FireStationDto
>
fireStationDtoList
=
fireStationService
.
queryForFireStationList
(
false
,
bizCompanyId
,
nameString
,
par
.
containsKey
(
"bizOrgCode"
)?
par
.
get
(
"bizOrgCode"
).
toString
():
null
);
List
<
FireStationDto
>
fireStationDtoList
=
fireStationService
.
queryList
(
false
,
par
.
containsKey
(
"bizOrgCode"
)?
par
.
get
(
"bizOrgCode"
).
toString
():
null
,
bizCompanyId
,
nameString
);
// List<FireStationDto> fireStationDtoList = fireStationService.queryForFireStationList(false, bizCompanyId,nameString,par.containsKey("bizOrgCode")?par.get("bizOrgCode").toString():null);
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
fireStationDtoList
,
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
fireStationDtoList
,
FireStationDto
.
class
,
null
,
false
);
FireStationDto
.
class
,
null
,
false
);
break
;
break
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
86eee001
...
@@ -588,22 +588,50 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
...
@@ -588,22 +588,50 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
});
});
transferDetail
.
deleteCharAt
(
transferDetail
.
length
()
-
1
);
transferDetail
.
deleteCharAt
(
transferDetail
.
length
()
-
1
);
if
(
transferDetail
.
toString
().
contains
(
"、"
))
{
if
(
transferDetail
.
toString
().
contains
(
"、"
))
{
String
transfer
=
null
;
if
(
transferDetail
.
toString
().
contains
(
";"
))
{
String
taskStatus
=
null
;
String
[]
split
=
transferDetail
.
toString
().
split
(
";"
);
String
[]
split
=
transferDetail
.
toString
().
split
(
"、"
);
List
<
String
>
list
=
Arrays
.
asList
(
split
);
if
(
split
.
length
>
1
)
{
list
.
forEach
(
e
->
{
transfer
=
split
[
0
];
if
(
e
.
contains
(
"、"
))
{
taskStatus
=
split
[
1
];
String
transfer
=
null
;
String
taskStatus
=
null
;
String
[]
split2
=
e
.
split
(
"、"
);
if
(
split2
.
length
>
1
)
{
transfer
=
split2
[
0
];
taskStatus
=
split2
[
1
];
}
String
transferDetails
=
templateContent
.
replace
(
"departmentName-type-resourcesNum"
,
transfer
)
.
replace
(
"rescueGrid"
,
rescueGrid
==
null
?
""
:
rescueGrid
).
replace
(
"taskStatus"
,
taskStatus
!=
null
?
FireCarStatusEnum
.
getEnum
(
taskStatus
).
getName
()
:
null
);
transferContent
.
add
(
transferDetails
);
}
else
{
String
transferDetails
=
templateContent
.
replace
(
"departmentName-type-resourcesNum"
,
e
)
.
replace
(
"rescueGrid"
,
rescueGrid
==
null
?
""
:
rescueGrid
).
replace
(
"任务状态:taskStatus"
,
""
);
transferContent
.
add
(
transferDetails
);
}
});
}
else
{
if
(
transferDetail
.
toString
().
contains
(
"、"
))
{
String
transfer
=
null
;
String
taskStatus
=
null
;
String
[]
split2
=
transferDetail
.
toString
().
split
(
"、"
);
if
(
split2
.
length
>
1
)
{
transfer
=
split2
[
0
];
taskStatus
=
split2
[
1
];
}
String
transferDetails
=
templateContent
.
replace
(
"departmentName-type-resourcesNum"
,
transfer
)
.
replace
(
"rescueGrid"
,
rescueGrid
==
null
?
""
:
rescueGrid
).
replace
(
"taskStatus"
,
taskStatus
!=
null
?
FireCarStatusEnum
.
getEnum
(
taskStatus
).
getName
()
:
null
);
transferContent
.
add
(
transferDetails
);
}
else
{
String
transferDetails
=
templateContent
.
replace
(
"departmentName-type-resourcesNum"
,
transferDetail
.
toString
())
.
replace
(
"rescueGrid"
,
rescueGrid
==
null
?
""
:
rescueGrid
).
replace
(
"任务状态:taskStatus"
,
""
);
transferContent
.
add
(
transferDetails
);
}
}
}
String
transferDetails
=
templateContent
.
replace
(
"departmentName-type-resourcesNum"
,
transfer
)
.
replace
(
"rescueGrid"
,
rescueGrid
==
null
?
""
:
rescueGrid
).
replace
(
"taskStatus"
,
taskStatus
!=
null
?
FireCarStatusEnum
.
getEnum
(
taskStatus
).
getName
()
:
null
);
transferContent
.
add
(
transferDetails
);
}
else
{
String
transferDetails
=
templateContent
.
replace
(
"departmentName-type-resourcesNum"
,
transferDetail
.
toString
())
.
replace
(
"rescueGrid"
,
rescueGrid
==
null
?
""
:
rescueGrid
).
replace
(
"任务状态:taskStatus"
,
""
);
transferContent
.
add
(
transferDetails
);
}
}
});
});
transferInfo
.
put
(
"transferContent"
,
transferContent
);
transferInfo
.
put
(
"transferContent"
,
transferContent
);
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
86eee001
...
@@ -668,26 +668,47 @@
...
@@ -668,26 +668,47 @@
a.*
a.*
FROM
FROM
(
(
<if
test=
"par.buildingId!=null and par.buildingId!=''"
>
SELECT
v.id AS id,
v.code AS code,
v.url AS url,
v.token AS token,
v.name AS name,
v.address,
v.longitude,
'' as distance,
v.latitude
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{par.buildingId}, vc.parent_source_ids)
GROUP BY id
</if>
<if
test=
"par.equipmentSpecificId!=null and par.equipmentSpecificId!=''"
>
<if
test=
"par.equipmentSpecificId!=null and par.equipmentSpecificId!=''"
>
select
select
v.id AS id,
v.id AS id,
v.CODE AS CODE,
v.CODE AS CODE,
v.url AS url,
v.url AS url,
v.token AS token,
v.token AS token,
v.NAME AS NAME,
v.NAME AS NAME,
v.address,
v.address,
v.longitude,
v.longitude,
'' AS distance,
'' AS distance,
v.latitude
v.latitude
from wl_video_equipment_specific as ves
from wl_video_equipment_specific as ves
left join wl_video as v on ves.video_id = v.id
left join wl_video as v on ves.video_id = v.id
where equipment_specific_id = #{par.equipmentSpecificId}
where equipment_specific_id = #{par.equipmentSpecificId}
</if>
<if
test=
'par.longitude!=null and par.buildingId!=null '
>
UNION
</if>
</if>
<if
test=
'par.longitude!=null and par.equipmentSpecificId !=null '
>
<if
test=
'par.longitude!=null and par.equipmentSpecificId !=null '
>
UNION
UNION
</if>
</if>
<if
test=
'par.longitude!=null and par.latitude!=null '
>
<if
test=
'par.longitude!=null and par.latitude!=null '
>
SELECT
(
SELECT
wle.id ,
wle.id ,
wle.`code` ,
wle.`code` ,
wle.url,
wle.url,
...
@@ -700,24 +721,24 @@
...
@@ -700,24 +721,24 @@
FROM wl_video wle
FROM wl_video wle
where wle.longitude is not null and wle.latitude is not null
where wle.longitude is not null and wle.latitude is not null
<if
test=
'par.longitude!=null and par.latitude!=null'
>
<if
test=
'par.longitude!=null and par.latitude!=null'
>
and Round(st_distance(point(wle.longitude,wle.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
and
Round(st_distance(point(wle.longitude,wle.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
= #{par.distance}
<
= #{par.distance}
</if>
</if>
<if
test=
'par.type!=null and par.type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
AND
wle.type = #{type}
wle.type = #{type}
</if>
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
<if
test=
'par.remark!=null and par.remark!="" '
>
AND
wle.remake like concat ('%',#{par.remake},'%')
wle.remake like concat ('%',#{par.remake},'%')
</if>
</if>
<if
test=
'par.code!=null and par.code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
AND
wle.code like concat ('%',#{par.code},'%')
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
)
</if>
</if>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
UNION
UNION
</if>
</if>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
SELECT
(
SELECT
wle.id,
wle.id,
wle.`code`,
wle.`code`,
wle.url,
wle.url,
...
@@ -729,15 +750,14 @@
...
@@ -729,15 +750,14 @@
st_distance (
st_distance (
point ( wle.longitude, wle.latitude ),
point ( wle.longitude, wle.latitude ),
point (#{par.longitudeTwo},#{par.latitudeTwo} ) ) * 111195, 1 ) AS distance,
point (#{par.longitudeTwo},#{par.latitudeTwo} ) ) * 111195, 1 ) AS distance,
wle.latitude
wle.latitude
FROM
FROM
wl_video wle
wl_video wle
WHERE
WHERE
wle.longitude IS NOT NULL
wle.longitude IS NOT NULL
AND wle.latitude IS NOT NULL
AND wle.latitude IS NOT NULL
<if
test=
'par.longitudeTwo!=null and par.latitude!=null'
>
<if
test=
'par.longitudeTwo!=null and par.latitude!=null
'
>
AND Round(st_distance(point(wle.longitude,wle.latitude),point(#{par.longitude
},#{par.latitude}
))*111195,1)
AND Round(st_distance(point(wle.longitude,wle.latitude),point(#{par.longitude
Two},#{par.latitudeTwo}
))*111195,1)
<
= #{par.distance}
<
= #{par.distance}
</if>
</if>
<if
test=
'par.type!=null and par.type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
...
@@ -748,7 +768,7 @@
...
@@ -748,7 +768,7 @@
</if>
</if>
<if
test=
'par.code!=null and par.code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
AND wle.code like concat ('%',#{par.code},'%')
AND wle.code like concat ('%',#{par.code},'%')
</if>
</if>
)
</if>
</if>
union
union
SELECT
SELECT
...
@@ -767,7 +787,7 @@
...
@@ -767,7 +787,7 @@
WHERE
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
GROUP BY id
GROUP BY id
) AS a
group by
a.id ) b
) AS a
GROUP BY
a.id ) b
</select>
</select>
<select
id=
"pageVideoCount"
resultType=
"int"
>
<select
id=
"pageVideoCount"
resultType=
"int"
>
...
...
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