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 @@
SELECT
b.company_id companyId,
b.company_name companyName,
COUNT( c.resources_num ) carNum
COUNT( c.resources_num ) carNum,
car_user userNum
FROM
jc_power_transfer a
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 {
String
buildIdName
=
""
;
Long
zdid
=
null
;
String
zdname
=
""
;
String
bizOrgCode
=
""
;
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
if
(
AlertCalled
.
getUnitInvolved
()
!=
null
&&
!
""
.
equals
(
AlertCalled
.
getUnitInvolved
()))
{
List
<
OrgUsrzhDto
>
orgUsrzhDto
=
iOrgUsrService
.
getOrgUsrzhDto
(
AlertCalled
.
getUnitInvolved
());
if
(
orgUsrzhDto
!=
null
&&
orgUsrzhDto
.
size
()
>
0
&&
orgUsrzhDto
.
get
(
0
)
!=
null
)
{
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()
==
null
?
null
:
Long
.
valueOf
(
orgUsrzhDto
.
get
(
0
).
getBuildId
());
buildIdName
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()
==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBuildName
();
bizOrgCode
=
orgUsrzhDto
.
get
(
0
).
getBizOrgCode
()
==
null
?
null
:
orgUsrzhDto
.
get
(
0
).
getBizOrgCode
();
}
}
...
...
@@ -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
));
}
...
...
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 {
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
()));
}
...
...
@@ -234,7 +238,9 @@ public class KeySiteController extends BaseController {
}
}
dto
.
setAttachmentsList
(
list
);
if
(
dto
.
getFireEnduranceRateName
()
!=
null
){
dto
.
setFireEnduranceRate
(
dto
.
getFireEnduranceRateName
());
}
if
(
null
!=
dto
.
getLongitude
()
&&
null
!=
dto
.
getLatitude
())
{
dto
.
setAddressDesc
(
dto
.
getAddressDesc
().
concat
(
"@address@"
).
concat
(
"{\"longitude\":"
).
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
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
DynamicGroupCode
{
JCS_PERSON
(
"机场人员"
,
"246"
),
...
...
@@ -8,10 +13,6 @@ public enum DynamicGroupCode {
JCS_SANJ
(
"三级"
,
"854"
),
JCS_SIJ
(
"四级"
,
"855"
);
private
String
name
;
private
String
code
;
...
...
@@ -31,11 +32,6 @@ public enum DynamicGroupCode {
this
.
code
=
code
;
}
DynamicGroupCode
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
DynamicGroupCode
getEnum
(
String
name
)
{
for
(
DynamicGroupCode
bEnum
:
DynamicGroupCode
.
values
())
{
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;
import
com.alibaba.fastjson.JSONObject
;
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.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -76,10 +80,31 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if
(
"null"
.
equals
(
name
))
{
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
)
{
...
...
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 {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询建筑详细信息"
)
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"
)
...
...
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> {
List
<
BuildingTreeAndEquipVO
>
gettreeAndEquip
();
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
String
instanceId
);
Map
<
String
,
Object
>
getBuildDetaliByFloorId
(
String
instanceId
,
String
appKey
,
String
product
,
String
token
);
/**
* 获取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
}
@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
();
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
String
userId
=
String
.
valueOf
(
map
.
get
(
"dutyUser"
));
String
dutyUser
=
""
;
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
<>();
...
...
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 {
nameString
=
par
.
containsKey
(
"name"
)?
par
.
get
(
"name"
).
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
,
FireStationDto
.
class
,
null
,
false
);
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
});
transferDetail
.
deleteCharAt
(
transferDetail
.
length
()
-
1
);
if
(
transferDetail
.
toString
().
contains
(
"、"
))
{
String
transfer
=
null
;
String
taskStatus
=
null
;
String
[]
split
=
transferDetail
.
toString
().
split
(
"、"
);
if
(
split
.
length
>
1
)
{
transfer
=
split
[
0
];
taskStatus
=
split
[
1
];
if
(
transferDetail
.
toString
().
contains
(
";"
))
{
String
[]
split
=
transferDetail
.
toString
().
split
(
";"
);
List
<
String
>
list
=
Arrays
.
asList
(
split
);
list
.
forEach
(
e
->
{
if
(
e
.
contains
(
"、"
))
{
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
);
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
86eee001
...
...
@@ -668,26 +668,47 @@
a.*
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!=''"
>
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_equipment_specific as ves
left join wl_video as v on ves.video_id = v.id
where equipment_specific_id = #{par.equipmentSpecificId}
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_equipment_specific as ves
left join wl_video as v on ves.video_id = v.id
where equipment_specific_id = #{par.equipmentSpecificId}
</if>
<if
test=
'par.longitude!=null and par.buildingId!=null '
>
UNION
</if>
<if
test=
'par.longitude!=null and par.equipmentSpecificId !=null '
>
UNION
</if>
<if
test=
'par.longitude!=null and par.latitude!=null '
>
SELECT
(
SELECT
wle.id ,
wle.`code` ,
wle.url,
...
...
@@ -700,24 +721,24 @@
FROM wl_video wle
where wle.longitude is not null and wle.latitude is not 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}
</if>
<if
test=
'par.type!=null and par.type!="" '
>
AND
wle.type = #{type}
wle.type = #{type}
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
AND
wle.remake like concat ('%',#{par.remake},'%')
wle.remake like concat ('%',#{par.remake},'%')
</if>
<if
test=
'par.code!=null and par.code!="" '
>
AND
wle.code like concat ('%',#{par.code},'%')
</if>
wle.code like concat ('%',#{par.code},'%')
</if>
)
</if>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
UNION
</if>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
SELECT
(
SELECT
wle.id,
wle.`code`,
wle.url,
...
...
@@ -729,15 +750,14 @@
st_distance (
point ( wle.longitude, wle.latitude ),
point (#{par.longitudeTwo},#{par.latitudeTwo} ) ) * 111195, 1 ) AS distance,
wle.latitude
FROM
wl_video wle
WHERE
wle.longitude IS NOT NULL
AND wle.latitude IS NOT 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)
<if
test=
'par.longitudeTwo!=null and par.latitude!=null
'
>
AND Round(st_distance(point(wle.longitude,wle.latitude),point(#{par.longitude
Two},#{par.latitudeTwo}
))*111195,1)
<
= #{par.distance}
</if>
<if
test=
'par.type!=null and par.type!="" '
>
...
...
@@ -748,7 +768,7 @@
</if>
<if
test=
'par.code!=null and par.code!="" '
>
AND wle.code like concat ('%',#{par.code},'%')
</if>
</if>
)
</if>
union
SELECT
...
...
@@ -767,7 +787,7 @@
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
GROUP BY id
) AS a
group by
a.id ) b
) AS a
GROUP BY
a.id ) b
</select>
<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