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
0be13336
Commit
0be13336
authored
Dec 28, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_ccs' of
http://172.16.10.76/moa/amos-boot-biz
into develop_ccs
parents
f556c87f
a36bef8b
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
505 additions
and
300 deletions
+505
-300
RedisUtils.java
...va/com/yeejoin/amos/boot/biz/common/utils/RedisUtils.java
+4
-0
OrgUsrDto.java
...in/java/com/yeejoin/equipmanage/common/dto/OrgUsrDto.java
+3
-0
SourceTypeEnum.java
.../com/yeejoin/equipmanage/common/enums/SourceTypeEnum.java
+26
-0
BuildingTreeVo.java
...ava/com/yeejoin/equipmanage/common/vo/BuildingTreeVo.java
+3
-0
AreaController.java
...va/com/yeejoin/equipmanage/controller/AreaController.java
+4
-4
BuildingVideoController.java
...ejoin/equipmanage/controller/BuildingVideoController.java
+20
-14
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+25
-13
CarMapper.java
...c/main/java/com/yeejoin/equipmanage/mapper/CarMapper.java
+2
-0
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+6
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+7
-0
FormInstanceMapper.java
...va/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
+2
-1
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+9
-0
ICarService.java
...ain/java/com/yeejoin/equipmanage/service/ICarService.java
+5
-0
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+5
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+8
-1
IFormInstanceService.java
...com/yeejoin/equipmanage/service/IFormInstanceService.java
+2
-1
ISourceStatistics.java
...va/com/yeejoin/equipmanage/service/ISourceStatistics.java
+16
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+111
-12
CarServiceImpl.java
.../com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
+50
-114
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+40
-101
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+17
-4
FormInstanceServiceImpl.java
...oin/equipmanage/service/impl/FormInstanceServiceImpl.java
+2
-2
SourcesStatisticsImpl.java
...ejoin/equipmanage/service/impl/SourcesStatisticsImpl.java
+63
-0
StockServiceImpl.java
...om/yeejoin/equipmanage/service/impl/StockServiceImpl.java
+5
-0
application.properties
...ot-system-equip/src/main/resources/application.properties
+4
-1
Building.xml
...-boot-system-equip/src/main/resources/mapper/Building.xml
+6
-5
CarMapper.xml
...boot-system-equip/src/main/resources/mapper/CarMapper.xml
+15
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+16
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+10
-26
FormInstanceMapper.xml
...em-equip/src/main/resources/mapper/FormInstanceMapper.xml
+13
-1
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+6
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisUtils.java
View file @
0be13336
...
@@ -456,6 +456,10 @@ public class RedisUtils {
...
@@ -456,6 +456,10 @@ public class RedisUtils {
}
}
return
null
;
return
null
;
}
}
public
Set
<
String
>
getPatternKeys
(
String
pattern
)
{
return
redisTemplate
.
keys
(
pattern
);
}
/**
/**
* 获取指定前缀key列表
* 获取指定前缀key列表
*
*
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/dto/OrgUsrDto.java
View file @
0be13336
...
@@ -44,4 +44,7 @@ public class OrgUsrDto extends BaseDto {
...
@@ -44,4 +44,7 @@ public class OrgUsrDto extends BaseDto {
@ApiModelProperty
(
value
=
"省市区名称,用逗号分隔"
)
@ApiModelProperty
(
value
=
"省市区名称,用逗号分隔"
)
private
String
pczName
;
private
String
pczName
;
@ApiModelProperty
(
value
=
"建筑ID"
)
private
String
buildId
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/SourceTypeEnum.java
0 → 100644
View file @
0be13336
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @author DELL
*/
@AllArgsConstructor
@Getter
public
enum
SourceTypeEnum
{
/**
* 资源类型枚举
*/
EQUIPMENT
(
"装备"
,
"equipment"
,
"equipmentSpecificSerivceImpl"
,
"refreshStaData"
),
CAR
(
"车辆"
,
"car"
,
"carServiceImpl"
,
"refreshStaData"
);
private
String
name
;
private
String
code
;
private
String
beanName
;
private
String
methodName
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/BuildingTreeVo.java
View file @
0be13336
...
@@ -74,4 +74,7 @@ public class BuildingTreeVo {
...
@@ -74,4 +74,7 @@ public class BuildingTreeVo {
@ApiModelProperty
(
"建筑地址"
)
@ApiModelProperty
(
"建筑地址"
)
private
String
address
;
private
String
address
;
@ApiModelProperty
(
"机构编码"
)
private
String
bizOrgCode
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/AreaController.java
View file @
0be13336
...
@@ -2,11 +2,9 @@ package com.yeejoin.equipmanage.controller;
...
@@ -2,11 +2,9 @@ package com.yeejoin.equipmanage.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.equipmanage.common.dto.AreaDto
;
import
com.yeejoin.equipmanage.common.dto.AreaDto
;
import
com.yeejoin.equipmanage.common.entity.Area
;
import
com.yeejoin.equipmanage.common.entity.Area
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.vo.AreaResquest
;
import
com.yeejoin.equipmanage.common.vo.AreaResquest
;
import
com.yeejoin.equipmanage.common.vo.UnitAreaTreeVo
;
import
com.yeejoin.equipmanage.common.vo.UnitAreaTreeVo
;
import
com.yeejoin.equipmanage.service.IAreaService
;
import
com.yeejoin.equipmanage.service.IAreaService
;
...
@@ -47,23 +45,25 @@ public class AreaController extends AbstractBaseController {
...
@@ -47,23 +45,25 @@ public class AreaController extends AbstractBaseController {
/**
/**
* 获取公司部门区域树
* 获取公司部门区域树
*
* @return list
* @return list
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取单位区域树"
,
notes
=
"根据登陆人获取单位区域树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取单位区域树"
,
notes
=
"根据登陆人获取单位区域树"
)
@GetMapping
(
value
=
"/tree"
)
@GetMapping
(
value
=
"/tree"
)
public
List
<
UnitAreaTreeVo
>
getSystemTree
()
{
public
List
<
UnitAreaTreeVo
>
getSystemTree
()
{
return
iAreaService
.
getAreaTreeListVo
();
return
iAreaService
.
getAreaTreeListVo
();
}
}
/**
/**
* 获取公司部门树
* 获取公司部门树
*
* @return list
* @return list
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取公司树"
,
notes
=
"根据登陆人获取公司树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取公司树"
,
notes
=
"根据登陆人获取公司树"
)
@GetMapping
(
value
=
"/companyTreeByUserAndType"
)
@GetMapping
(
value
=
"/companyTreeByUserAndType"
)
public
List
<
OrgMenuDto
>
companyTreeByUserAndType
()
{
public
List
<
OrgMenuDto
>
companyTreeByUserAndType
()
{
return
iAreaService
.
companyDeptTree
();
return
iAreaService
.
companyDeptTree
();
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingVideoController.java
View file @
0be13336
package
com
.
yeejoin
.
equipmanage
.
controller
;
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingListVO
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO
;
import
com.yeejoin.equipmanage.common.vo.BuildingTreeVo
;
import
com.yeejoin.equipmanage.service.IBuilldService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -11,15 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -11,15 +18,7 @@ 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.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingListVO
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO
;
import
com.yeejoin.equipmanage.common.vo.BuildingTreeVo
;
import
com.yeejoin.equipmanage.service.IBuilldService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
/**
* @Description: 消防建筑视屏监控
* @Description: 消防建筑视屏监控
...
@@ -43,12 +42,19 @@ public class BuildingVideoController extends AbstractBaseController {
...
@@ -43,12 +42,19 @@ public class BuildingVideoController extends AbstractBaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"消防建筑视屏监控树"
)
@GetMapping
(
value
=
"/treeByBizOrgTypeCode"
)
public
List
<
BuildingTreeVo
>
getBuildingTreeByBizOrgTypeCode
(
@RequestParam
(
required
=
false
)
String
orgTypes
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
return
buildService
.
getBuildingTreeByBizOrgTypeCode
(
orgTypes
,
bizOrgCode
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"消防建筑视屏监控分页列表"
)
@ApiOperation
(
"消防建筑视屏监控分页列表"
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
public
Page
<
BuildingVideoVO
>
buildingList
(
Page
page
,
BuildingVideoListVO
dto
)
{
public
Page
<
BuildingVideoVO
>
buildingList
(
Page
page
,
BuildingVideoListVO
dto
)
{
if
(
"0"
.
equals
(
dto
.
getBuildingId
()))
{
dto
.
setBuildingId
(
null
);
}
return
buildService
.
buildingVideoList
(
page
,
dto
);
return
buildService
.
buildingVideoList
(
page
,
dto
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
0be13336
...
@@ -449,17 +449,6 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -449,17 +449,6 @@ public class FireFightingSystemController extends AbstractBaseController {
/**
/**
* 获取点位图,区域树数据
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取点位图,区域树数据"
,
notes
=
"消防系统点位图使用"
)
@GetMapping
(
value
=
"/point/tree"
)
public
List
<
PointTreeVo
>
getPointTree
(
@RequestParam
(
required
=
false
)
String
systemId
)
{
return
fireFightingSystemService
.
getPointTree
(
systemId
,
getOrgCode
());
}
/**
* 设备报警信息
* 设备报警信息
*
*
* @param id
* @param id
...
@@ -641,7 +630,30 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -641,7 +630,30 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统分类树"
,
notes
=
"获取系统分类树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统分类树"
,
notes
=
"获取系统分类树"
)
@GetMapping
(
value
=
"/systemTypeTree"
)
@GetMapping
(
value
=
"/systemTypeTree"
)
public
List
<
FireFightingSystemTypeTreeVo
>
systemTypeTree
()
{
public
List
<
FireFightingSystemTypeTreeVo
>
systemTypeTree
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
return
fireFightingSystemService
.
systemTypeTree
();
return
fireFightingSystemService
.
systemTypeTree
(
bizOrgCode
);
}
/**
* 根据bizOrgCode获取系统列表不分页
*
* @return list
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统分类树"
,
notes
=
"获取系统分类树"
)
@GetMapping
(
value
=
"/systemListByBziOrgCode"
)
public
List
<
FireFightingSystemEntity
>
systemListByBziOrgCode
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
return
fireFightingSystemService
.
systemListByBziOrgCode
(
bizOrgCode
);
}
/**
* 获取点位图,区域树数据
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取点位图,区域树数据"
,
notes
=
"消防系统点位图使用"
)
@GetMapping
(
value
=
"/point/tree"
)
public
List
<
PointTreeVo
>
getPointTree
(
@RequestParam
(
required
=
false
)
String
systemId
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
return
fireFightingSystemService
.
getPointTree
(
systemId
,
bizOrgCode
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/CarMapper.java
View file @
0be13336
...
@@ -71,4 +71,6 @@ public interface CarMapper extends BaseMapper<Car> {
...
@@ -71,4 +71,6 @@ public interface CarMapper extends BaseMapper<Car> {
int
equipmentCarListcount
(
Long
teamId
,
String
name
,
String
code
,
Long
id
,
Boolean
isNo
);
int
equipmentCarListcount
(
Long
teamId
,
String
name
,
String
code
,
Long
id
,
Boolean
isNo
);
List
<
CarFusionDto
>
selectCarAndCarProperty
();
List
<
CarFusionDto
>
selectCarAndCarProperty
();
List
<
Map
<
String
,
Object
>>
queryCompanyCarStaData
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
0be13336
...
@@ -200,4 +200,10 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -200,4 +200,10 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
* @return 指标详情
* @return 指标详情
*/
*/
List
<
Map
<
String
,
String
>>
getBoxTropicsIndexDetails
();
List
<
Map
<
String
,
String
>>
getBoxTropicsIndexDetails
();
/**
* 统计数据
* @return
*/
List
<
Map
<
String
,
Object
>>
queryCompanyStaData
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
0be13336
...
@@ -214,4 +214,11 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -214,4 +214,11 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
*/
*/
Map
<
String
,
Object
>
fireFoamSysEquipmentNumber
();
Map
<
String
,
Object
>
fireFoamSysEquipmentNumber
();
/**
* 根据bizorgcode获取系统分类数量
* @param bizOrgCode
* @return
*/
List
<
Map
<
String
,
Object
>>
listByBizOrgCode
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
View file @
0be13336
...
@@ -103,8 +103,9 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
...
@@ -103,8 +103,9 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
/**
/**
* 消防建筑视屏监控统计树
* 消防建筑视屏监控统计树
* @return
* @return
* @param bizOrgCodeList
*/
*/
List
<
Map
<
String
,
Object
>>
getBuildVideoListCount
();
List
<
Map
<
String
,
Object
>>
getBuildVideoListCount
(
@Param
(
"list"
)
List
<
String
>
bizOrgCodeList
);
/**
/**
* 可乐建筑视屏监控统计树
* 可乐建筑视屏监控统计树
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
0be13336
...
@@ -208,6 +208,14 @@ public interface IBuilldService extends IService<Building> {
...
@@ -208,6 +208,14 @@ public interface IBuilldService extends IService<Building> {
List
<
BuildingTreeVo
>
getBuildingVideoTree
();
List
<
BuildingTreeVo
>
getBuildingVideoTree
();
/**
/**
* 消防建筑视屏监控统计树
* @param orgTypes
* @param bizOrgCode
* @return
*/
List
<
BuildingTreeVo
>
getBuildingTreeByBizOrgTypeCode
(
String
orgTypes
,
String
bizOrgCode
);
/**
* 消防建筑视屏监控分页列表
* 消防建筑视屏监控分页列表
* @param page
* @param page
* @param dto
* @param dto
...
@@ -299,4 +307,5 @@ public interface IBuilldService extends IService<Building> {
...
@@ -299,4 +307,5 @@ public interface IBuilldService extends IService<Building> {
* @return
* @return
*/
*/
Map
<
String
,
String
>
getBuildingToLongitudeAndLatitude
(
String
instanceId
);
Map
<
String
,
String
>
getBuildingToLongitudeAndLatitude
(
String
instanceId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ICarService.java
View file @
0be13336
...
@@ -173,4 +173,9 @@ public interface ICarService extends IService<Car> {
...
@@ -173,4 +173,9 @@ public interface ICarService extends IService<Car> {
* @return
* @return
*/
*/
List
<
CarFusionDto
>
getCarFusionList
();
List
<
CarFusionDto
>
getCarFusionList
();
/**
* 更新redis 统计数据
*/
void
refreshStaData
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
0be13336
...
@@ -194,4 +194,9 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
...
@@ -194,4 +194,9 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* @return
* @return
*/
*/
Map
<
String
,
List
<
Map
<
String
,
String
>>>
getFessIndexDetails
();
Map
<
String
,
List
<
Map
<
String
,
String
>>>
getFessIndexDetails
();
/**
* 更新redis 统计数据
*/
void
refreshStaData
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
0be13336
...
@@ -199,5 +199,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -199,5 +199,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
*
*
* @return
* @return
*/
*/
List
<
FireFightingSystemTypeTreeVo
>
systemTypeTree
();
List
<
FireFightingSystemTypeTreeVo
>
systemTypeTree
(
String
bizOrgCode
);
/**
* 获取列表不分页
* @param bizOrgCode orgCode
* @return
*/
List
<
FireFightingSystemEntity
>
systemListByBziOrgCode
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFormInstanceService.java
View file @
0be13336
...
@@ -136,8 +136,9 @@ public interface IFormInstanceService extends IService<FormInstance> {
...
@@ -136,8 +136,9 @@ public interface IFormInstanceService extends IService<FormInstance> {
/**
/**
* 消防建筑视屏监控统计树
* 消防建筑视屏监控统计树
* @return
* @return
* @param bizOrgCodeList
*/
*/
List
<
Map
<
String
,
Object
>>
getBuildVideoListCount
();
List
<
Map
<
String
,
Object
>>
getBuildVideoListCount
(
List
<
String
>
bizOrgCodeList
);
/**
/**
* 安防消防建筑视屏监控统计树
* 安防消防建筑视屏监控统计树
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ISourceStatistics.java
0 → 100644
View file @
0be13336
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.yeejoin.equipmanage.common.enums.SourceTypeEnum
;
public
interface
ISourceStatistics
{
/**
* 装备、车辆按照单位及分类统计
*
* @param bizOrgCode 单位部门code
* @param sourceType 资源类型
* @param categoryCode 资源分类code
* @return int 数量
*/
int
equipCategoryStatistics
(
String
bizOrgCode
,
SourceTypeEnum
sourceType
,
String
categoryCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
0be13336
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.feign.morphic.Morphic;
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.feign.morphic.Morphic;
import
com.yeejoin.amos.feign.morphic.model.ResourceDTO
;
import
com.yeejoin.amos.feign.morphic.model.ResourceDTO
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.equipmanage.common.dto.OrgUsrDto
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.BuildIsRiskDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.BuildIsRiskDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO
;
...
@@ -35,6 +36,7 @@ import com.yeejoin.equipmanage.operation.factory.PageOperatorFactory;
...
@@ -35,6 +36,7 @@ import com.yeejoin.equipmanage.operation.factory.PageOperatorFactory;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
...
@@ -115,6 +117,12 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -115,6 +117,12 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Value
(
"${systemctl.sync.switch}"
)
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
private
Boolean
syncSwitch
;
@Value
(
"${auth-key-fire-video:fire_build_video_info}"
)
private
String
authKey
;
@Autowired
private
JCSRemoteService
jcsRemoteService
;
@Autowired
@Autowired
private
SourceSceneMapper
sourceSceneMapper
;
private
SourceSceneMapper
sourceSceneMapper
;
...
@@ -298,7 +306,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -298,7 +306,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
this
.
saveFiles
(
Long
.
parseLong
(
formKeyMap
.
get
(
"instanceId"
).
toString
()),
map
);
this
.
saveFiles
(
Long
.
parseLong
(
formKeyMap
.
get
(
"instanceId"
).
toString
()),
map
);
synWarehouse
(
formKeyMap
);
synWarehouse
(
formKeyMap
);
// 新增储罐类型,保存不需要风险
// 新增储罐类型,保存不需要风险
if
(!
"storageTank"
.
equals
(
groupCode
))
{
if
(!
"storageTank"
.
equals
(
groupCode
))
{
// 发布风险区域同步操作事件
// 发布风险区域同步操作事件
map
.
put
(
"instanceId"
,
formKeyMap
.
get
(
"instanceId"
));
map
.
put
(
"instanceId"
,
formKeyMap
.
get
(
"instanceId"
));
map
.
put
(
"code"
,
formKeyMap
.
get
(
"code"
));
map
.
put
(
"code"
,
formKeyMap
.
get
(
"code"
));
...
@@ -686,7 +694,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -686,7 +694,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
List
<
BuildingTreeVo
>
getBuildingVideoTree
()
{
public
List
<
BuildingTreeVo
>
getBuildingVideoTree
()
{
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getBuildVideoListCount
();
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getBuildVideoListCount
(
null
);
List
<
BuildingTreeVo
>
allListVo
=
buildColaBuildingData
(
formGroup
,
allList
);
List
<
BuildingTreeVo
>
allListVo
=
buildColaBuildingData
(
formGroup
,
allList
);
// tree 统计处理
// tree 统计处理
return
allListVo
.
stream
().
filter
(
s
->
"-1"
.
equals
(
s
.
getParentId
())).
map
(
s
->
{
return
allListVo
.
stream
().
filter
(
s
->
"-1"
.
equals
(
s
.
getParentId
())).
map
(
s
->
{
...
@@ -700,6 +708,87 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -700,6 +708,87 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
@Override
public
List
<
BuildingTreeVo
>
getBuildingTreeByBizOrgTypeCode
(
String
orgTypes
,
String
bizOrgCode
)
{
List
<
OrgUsrDto
>
list
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
orgTypes
);
List
<
String
>
bizOrgCodeList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
BuildingTreeVo
>
buildingTreeList
=
list
.
stream
()
.
map
(
key
->
{
String
buildId
=
key
.
getBuildId
();
String
orgCode
=
key
.
getBizOrgCode
();
BuildingTreeVo
vo
=
new
BuildingTreeVo
();
vo
.
setId
(
key
.
getSequenceNbr
());
vo
.
setInstanceId
(
StringUtils
.
isNotBlank
(
buildId
)
?
Long
.
parseLong
(
buildId
)
:
null
);
vo
.
setInstanceName
(
key
.
getBizOrgName
());
vo
.
setGroupType
(
key
.
getBizOrgType
());
vo
.
setGroupCode
(
orgCode
);
vo
.
setBizOrgCode
(
orgCode
);
vo
.
setParentId
(
key
.
getParentId
());
bizOrgCodeList
.
add
(
orgCode
);
return
vo
;
}).
collect
(
Collectors
.
toList
());
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getBuildVideoListCount
(
bizOrgCodeList
);
List
<
BuildingTreeVo
>
allListVo
=
Bean
.
listMap2ListBean
(
allList
,
BuildingTreeVo
.
class
);
for
(
BuildingTreeVo
vo
:
buildingTreeList
)
{
String
orgCode
=
vo
.
getBizOrgCode
();
if
(
StringUtils
.
isNotBlank
(
orgCode
))
{
List
<
BuildingTreeVo
>
collect
=
allListVo
.
stream
().
filter
(
x
->
orgCode
.
equals
(
x
.
getBizOrgCode
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
List
<
BuildingTreeVo
>
treeVoList
=
collect
.
stream
().
map
(
s
->
{
BuildingTreeVo
t
=
new
BuildingTreeVo
();
Bean
.
copyExistPropertis
(
s
,
t
);
Map
<
String
,
Object
>
childrenTotal
=
this
.
getChildrenTotal
(
t
.
getInstanceId
(),
allListVo
);
// t.setChildren((List<BuildingTreeVo>) childrenTotal.get("list"));
t
.
setTotal
((
Long
)
childrenTotal
.
get
(
"total"
));
t
.
setDetailPaneApi
(
address
);
return
t
;
}).
collect
(
Collectors
.
toList
());
vo
.
setChildren
(
treeVoList
);
}
}
}
return
listGetStree
(
buildingTreeList
);
}
return
Lists
.
newArrayList
();
}
private
List
<
BuildingTreeVo
>
listGetStree
(
List
<
BuildingTreeVo
>
list
)
{
List
<
BuildingTreeVo
>
treeList
=
new
ArrayList
<
BuildingTreeVo
>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
BuildingTreeVo
tree
=
list
.
get
(
i
);
//找到子
for
(
BuildingTreeVo
treeNode
:
list
)
{
if
(
String
.
valueOf
(
tree
.
getId
()).
equals
(
treeNode
.
getParentId
()))
{
List
<
BuildingTreeVo
>
children
=
tree
.
getChildren
();
children
.
add
(
treeNode
);
tree
.
setChildren
(
children
);
}
}
if
(
i
==
0
)
{
treeList
.
add
(
tree
);
}
}
return
treeList
;
}
private
List
<
BuildingTreeVo
>
getChildren
(
BuildingTreeVo
root
,
List
<
BuildingTreeVo
>
all
)
{
String
bizOrgCode
=
root
.
getBizOrgCode
();
return
all
.
stream
().
filter
(
d
->
StringUtils
.
isNotBlank
(
d
.
getBizOrgCode
())
&&
bizOrgCode
.
equals
(
d
.
getBizOrgCode
().
substring
(
0
,
d
.
getBizOrgCode
().
length
()
-
6
)))
.
peek
(
m
->
{
List
<
BuildingTreeVo
>
children
=
m
.
getChildren
();
if
(
CollectionUtils
.
isEmpty
(
children
))
{
m
.
setChildren
(
getChildren
(
m
,
all
));
}
else
{
children
.
addAll
(
getChildren
(
m
,
all
));
m
.
setChildren
(
children
);
}
})
.
collect
(
Collectors
.
toList
());
}
private
List
<
BuildingTreeVo
>
buildColaBuildingData
(
FormGroup
formGroup
,
List
<
Map
<
String
,
Object
>>
allList
)
{
private
List
<
BuildingTreeVo
>
buildColaBuildingData
(
FormGroup
formGroup
,
List
<
Map
<
String
,
Object
>>
allList
)
{
List
<
BuildingTreeVo
>
allListVo
=
Bean
.
listMap2ListBean
(
allList
,
BuildingTreeVo
.
class
);
List
<
BuildingTreeVo
>
allListVo
=
Bean
.
listMap2ListBean
(
allList
,
BuildingTreeVo
.
class
);
BuildingTreeVo
treeNode
=
new
BuildingTreeVo
();
BuildingTreeVo
treeNode
=
new
BuildingTreeVo
();
...
@@ -753,6 +842,16 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -753,6 +842,16 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
Page
<
BuildingVideoVO
>
buildingVideoList
(
Page
page
,
BuildingVideoListVO
dto
)
{
public
Page
<
BuildingVideoVO
>
buildingVideoList
(
Page
page
,
BuildingVideoListVO
dto
)
{
String
buildingId
=
dto
.
getBuildingId
();
if
(
"0"
.
equals
(
buildingId
))
{
dto
.
setBuildingId
(
null
);
List
<
OrgUsrDto
>
list
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"DEPARTMENT,COMPANY"
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
Long
>
buildIdList
=
new
ArrayList
<>();
list
.
stream
().
filter
(
x
->
StringUtils
.
isNotEmpty
(
x
.
getBuildId
())).
forEach
(
o
->
buildIdList
.
add
(
Long
.
parseLong
(
o
.
getBuildId
())));
dto
.
setBuildIdList
(
buildIdList
);
}
}
Page
<
BuildingVideoVO
>
pages
=
videoService
.
pageBuildingVideo
(
page
,
dto
);
Page
<
BuildingVideoVO
>
pages
=
videoService
.
pageBuildingVideo
(
page
,
dto
);
if
(
0
<
pages
.
getRecords
().
size
())
{
if
(
0
<
pages
.
getRecords
().
size
())
{
pages
.
getRecords
().
forEach
(
x
->
{
pages
.
getRecords
().
forEach
(
x
->
{
...
@@ -1050,36 +1149,36 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1050,36 +1149,36 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
@Override
@Override
public
Map
<
String
,
String
>
getStorageTankCodeByBelongUnitId
(
String
belongUnitId
,
String
groupCode
)
{
public
Map
<
String
,
String
>
getStorageTankCodeByBelongUnitId
(
String
belongUnitId
,
String
groupCode
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"field_name"
,
StroageTankEnum
.
SSDW
.
getCode
());
map
.
put
(
"field_name"
,
StroageTankEnum
.
SSDW
.
getCode
());
map
.
put
(
"field_value"
,
belongUnitId
);
map
.
put
(
"field_value"
,
belongUnitId
);
List
<
Map
<
String
,
Object
>>
list
=
iFormInstanceService
.
queryForMapList
(
groupCode
,
map
);
List
<
Map
<
String
,
Object
>>
list
=
iFormInstanceService
.
queryForMapList
(
groupCode
,
map
);
if
(
list
.
size
()
>
0
)
{
if
(
list
.
size
()
>
0
)
{
map
.
clear
();
map
.
clear
();
map
.
put
(
"storageTankCode"
,
stroageTankCode
(
belongUnitId
,
list
.
size
()+
1
));
map
.
put
(
"storageTankCode"
,
stroageTankCode
(
belongUnitId
,
list
.
size
()
+
1
));
}
else
{
}
else
{
map
.
clear
();
map
.
clear
();
map
.
put
(
"storageTankCode"
,
belongUnitId
+
"0001"
);
map
.
put
(
"storageTankCode"
,
belongUnitId
+
"0001"
);
}
}
return
map
;
return
map
;
}
}
// 生成四位流水号
// 生成四位流水号
private
String
stroageTankCode
(
String
belongUnitId
,
int
num
)
{
private
String
stroageTankCode
(
String
belongUnitId
,
int
num
)
{
if
(
num
<
10
)
{
if
(
num
<
10
)
{
return
belongUnitId
+
"000"
+
num
;
return
belongUnitId
+
"000"
+
num
;
}
}
if
(
num
<
100
&&
num
>
9
)
{
if
(
num
<
100
&&
num
>
9
)
{
return
belongUnitId
+
"00"
+
num
;
return
belongUnitId
+
"00"
+
num
;
}
}
if
(
num
<
1000
&&
num
>
99
)
{
if
(
num
<
1000
&&
num
>
99
)
{
return
belongUnitId
+
"0"
+
num
;
return
belongUnitId
+
"0"
+
num
;
}
}
if
(
num
<
10000
&&
num
>
999
)
{
if
(
num
<
10000
&&
num
>
999
)
{
return
belongUnitId
+
num
;
return
belongUnitId
+
num
;
}
}
throw
new
BadRequest
(
"无流水号可生成"
);
throw
new
BadRequest
(
"无流水号可生成"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
View file @
0be13336
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.function.Consumer
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.gavaghan.geodesy.Ellipsoid
;
import
org.gavaghan.geodesy.GeodeticCalculator
;
import
org.gavaghan.geodesy.GlobalCoordinates
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -53,82 +21,42 @@ import com.yeejoin.equipmanage.common.datasync.entity.FireVehicle;
...
@@ -53,82 +21,42 @@ import com.yeejoin.equipmanage.common.datasync.entity.FireVehicle;
import
com.yeejoin.equipmanage.common.dto.CarFusionDto
;
import
com.yeejoin.equipmanage.common.dto.CarFusionDto
;
import
com.yeejoin.equipmanage.common.dto.CarInfoDto
;
import
com.yeejoin.equipmanage.common.dto.CarInfoDto
;
import
com.yeejoin.equipmanage.common.dto.CarStatusInfoDto
;
import
com.yeejoin.equipmanage.common.dto.CarStatusInfoDto
;
import
com.yeejoin.equipmanage.common.entity.Car
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.CarInfo
;
import
com.yeejoin.equipmanage.common.entity.CarProperty
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.EquipmentCategory
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentOnCar
;
import
com.yeejoin.equipmanage.common.entity.EquipmentQrcode
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
com.yeejoin.equipmanage.common.entity.ExtinguishantOnCar
;
import
com.yeejoin.equipmanage.common.entity.Journal
;
import
com.yeejoin.equipmanage.common.entity.ManufacturerInfo
;
import
com.yeejoin.equipmanage.common.entity.Stock
;
import
com.yeejoin.equipmanage.common.entity.StockDetail
;
import
com.yeejoin.equipmanage.common.entity.SystemDic
;
import
com.yeejoin.equipmanage.common.entity.Unit
;
import
com.yeejoin.equipmanage.common.entity.UploadFile
;
import
com.yeejoin.equipmanage.common.entity.WarehouseStructure
;
import
com.yeejoin.equipmanage.common.entity.WastageBill
;
import
com.yeejoin.equipmanage.common.entity.WastageBillDetail
;
import
com.yeejoin.equipmanage.common.entity.dto.CarDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarDto
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.enums.BillContentEnum
;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.enums.CarStatusEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipStatusEnum
;
import
com.yeejoin.equipmanage.common.enums.FileTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.IndustryEnum
;
import
com.yeejoin.equipmanage.common.enums.JournalTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.OnBoardEquipmentEnum
;
import
com.yeejoin.equipmanage.common.enums.StockBillTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.TrueOrFalseEnum
;
import
com.yeejoin.equipmanage.common.exception.CommonException
;
import
com.yeejoin.equipmanage.common.exception.CommonException
;
import
com.yeejoin.equipmanage.common.utils.ArrayUtil
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.utils.BillCodeManagerUtil
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.common.utils.ParsePropertyUtil
;
import
com.yeejoin.equipmanage.common.utils.QRCodeUtil
;
import
com.yeejoin.equipmanage.common.vo.CarForUE4VO
;
import
com.yeejoin.equipmanage.common.vo.Equip
;
import
com.yeejoin.equipmanage.common.vo.EquipStateOnCarVo
;
import
com.yeejoin.equipmanage.common.vo.ExtinguishantLossRequest
;
import
com.yeejoin.equipmanage.common.vo.ExtinguishantRequeset
;
import
com.yeejoin.equipmanage.common.vo.OnBoardEquipment
;
import
com.yeejoin.equipmanage.mapper.CarInfoMapper
;
import
com.yeejoin.equipmanage.mapper.CarMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentDetailMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentOnCarMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.ExtinguishantOnCarMapper
;
import
com.yeejoin.equipmanage.mapper.JournalMapper
;
import
com.yeejoin.equipmanage.mapper.StockDetailMapper
;
import
com.yeejoin.equipmanage.mapper.StockMapper
;
import
com.yeejoin.equipmanage.mapper.SystemDicMapper
;
import
com.yeejoin.equipmanage.mapper.UnitMapper
;
import
com.yeejoin.equipmanage.mapper.WarehouseStructureMapper
;
import
com.yeejoin.equipmanage.mapper.WastageBillDetailMapper
;
import
com.yeejoin.equipmanage.mapper.WastageBillMapper
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.ICarPropertyService
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.ICarService
;
import
org.apache.commons.lang3.StringUtils
;
import
com.yeejoin.equipmanage.service.IEquipmentCategoryService
;
import
org.gavaghan.geodesy.Ellipsoid
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
org.gavaghan.geodesy.GeodeticCalculator
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
org.gavaghan.geodesy.GlobalCoordinates
;
import
com.yeejoin.equipmanage.service.IEquipmentQrcodeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
org.springframework.beans.factory.annotation.Value
;
import
com.yeejoin.equipmanage.service.IJournalService
;
import
org.springframework.context.annotation.Lazy
;
import
com.yeejoin.equipmanage.service.IManufacturerInfoService
;
import
org.springframework.scheduling.annotation.Async
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.equipmanage.service.ISystemDicService
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.yeejoin.equipmanage.service.IUnitService
;
import
org.springframework.util.CollectionUtils
;
import
com.yeejoin.equipmanage.service.IUploadFileService
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.function.Consumer
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
/**
* 消防车信息 服务实现类
* 消防车信息 服务实现类
...
@@ -1200,14 +1128,14 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1200,14 +1128,14 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
LambdaQueryWrapper
<
Car
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Car
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
teamId
!=
null
,
Car:
:
getTeamId
,
teamId
);
wrapper
.
eq
(
teamId
!=
null
,
Car:
:
getTeamId
,
teamId
);
wrapper
.
like
(!
StringUtil
.
isEmpty
(
name
),
Car:
:
getName
,
name
);
wrapper
.
like
(!
StringUtil
.
isEmpty
(
name
),
Car:
:
getName
,
name
);
wrapper
.
in
(
Car:
:
getCarState
,
"1"
,
"2"
);
wrapper
.
in
(
Car:
:
getCarState
,
"1"
,
"2"
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateDate
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateDate
);
List
<
Car
>
carList
=
this
.
list
(
wrapper
);
List
<
Car
>
carList
=
this
.
list
(
wrapper
);
List
<
Equipment
>
equipmentList
=
iEquipmentService
.
list
();
List
<
Equipment
>
equipmentList
=
iEquipmentService
.
list
();
/*统一车辆图片使用装备定义图片 2021-10-27 陈召*/
/*统一车辆图片使用装备定义图片 2021-10-27 陈召*/
equipmentList
.
stream
().
filter
(
e
->
e
.
getName
().
contains
(
"车"
)).
forEach
(
e
->
{
equipmentList
.
stream
().
filter
(
e
->
e
.
getName
().
contains
(
"车"
)).
forEach
(
e
->
{
carList
.
forEach
(
car
->
{
carList
.
forEach
(
car
->
{
if
(
e
.
getId
().
equals
(
car
.
getEquipmentId
())){
if
(
e
.
getId
().
equals
(
car
.
getEquipmentId
()))
{
List
<
UploadFile
>
objects
=
new
ArrayList
<>();
List
<
UploadFile
>
objects
=
new
ArrayList
<>();
UploadFile
uploadFile
=
new
UploadFile
();
UploadFile
uploadFile
=
new
UploadFile
();
uploadFile
.
setUrl
(
e
.
getImg
());
uploadFile
.
setUrl
(
e
.
getImg
());
...
@@ -1236,7 +1164,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1236,7 +1164,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
carInfoVo
.
setEquipmentName
(
equipment
!=
null
?
equipment
.
getName
()
:
""
);
carInfoVo
.
setEquipmentName
(
equipment
!=
null
?
equipment
.
getName
()
:
""
);
carInfoVo
.
setCategoryId
(
equipment
!=
null
?
equipment
.
getCategoryId
()
:
null
);
carInfoVo
.
setCategoryId
(
equipment
!=
null
?
equipment
.
getCategoryId
()
:
null
);
carInfoVo
.
setCategoryName
(
categoryMap
.
get
(
carInfoVo
.
getCategoryId
()));
carInfoVo
.
setCategoryName
(
categoryMap
.
get
(
carInfoVo
.
getCategoryId
()));
if
(
car
.
getImg
()
!=
null
){
if
(
car
.
getImg
()
!=
null
)
{
List
<
String
>
img
=
new
ArrayList
<>();
List
<
String
>
img
=
new
ArrayList
<>();
img
.
add
(
car
.
getImg
().
get
(
0
).
getUrl
());
img
.
add
(
car
.
getImg
().
get
(
0
).
getUrl
());
carInfoVo
.
setImage
(
img
);
carInfoVo
.
setImage
(
img
);
...
@@ -1299,7 +1227,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1299,7 +1227,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
String
orgCode
=
remoteSecurityService
.
getAgencyUser
().
getCompanys
().
get
(
0
).
getOrgCode
();
String
orgCode
=
remoteSecurityService
.
getAgencyUser
().
getCompanys
().
get
(
0
).
getOrgCode
();
car
.
setOrgCode
(
orgCode
);
car
.
setOrgCode
(
orgCode
);
// @TableField(updateStrategy = FieldStrategy.IGNORED) 置空不生效 为空单独设置 by kongfm 2021-09-09
// @TableField(updateStrategy = FieldStrategy.IGNORED) 置空不生效 为空单独设置 by kongfm 2021-09-09
this
.
update
(
new
LambdaUpdateWrapper
<
Car
>().
set
(
Car:
:
getAgencyId
,
car
.
getAgencyId
()
).
set
(
Car:
:
getTeamId
,
car
.
getTeamId
()).
eq
(
Car:
:
getId
,
car
.
getId
()));
this
.
update
(
new
LambdaUpdateWrapper
<
Car
>().
set
(
Car:
:
getAgencyId
,
car
.
getAgencyId
()).
set
(
Car:
:
getTeamId
,
car
.
getTeamId
()).
eq
(
Car:
:
getId
,
car
.
getId
()));
boolean
update
=
this
.
updateById
(
car
);
boolean
update
=
this
.
updateById
(
car
);
// AST数据同步
// AST数据同步
if
(
update
&&
syncSwitch
)
{
if
(
update
&&
syncSwitch
)
{
...
@@ -1602,7 +1530,6 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1602,7 +1530,6 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
}
}
@Override
@Override
public
CarForUE4VO
getCarDetailByCarNumToThreeDimensional
(
Long
carId
,
String
orgCode
)
{
public
CarForUE4VO
getCarDetailByCarNumToThreeDimensional
(
Long
carId
,
String
orgCode
)
{
CarForUE4VO
carForUE4VO
=
new
CarForUE4VO
();
CarForUE4VO
carForUE4VO
=
new
CarForUE4VO
();
...
@@ -1637,13 +1564,12 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1637,13 +1564,12 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
}
}
@Override
@Override
public
Page
<
CarInfoDto
>
equipmentCarList
(
Page
<
CarInfoDto
>
pag
,
Long
teamId
,
String
name
,
String
code
,
Long
id
,
Boolean
isNo
)
{
public
Page
<
CarInfoDto
>
equipmentCarList
(
Page
<
CarInfoDto
>
pag
,
Long
teamId
,
String
name
,
String
code
,
Long
id
,
Boolean
isNo
)
{
List
<
Car
>
carList
=
carMapper
.
equipmentCarList
(
pag
.
offset
(),
pag
.
getSize
(),
teamId
,
name
,
code
,
id
,
isNo
);
List
<
Car
>
carList
=
carMapper
.
equipmentCarList
(
pag
.
offset
(),
pag
.
getSize
(),
teamId
,
name
,
code
,
id
,
isNo
);
int
num
=
carMapper
.
equipmentCarListcount
(
teamId
,
name
,
code
,
id
,
isNo
);
int
num
=
carMapper
.
equipmentCarListcount
(
teamId
,
name
,
code
,
id
,
isNo
);
List
<
Equipment
>
equipmentList
=
iEquipmentService
.
list
();
List
<
Equipment
>
equipmentList
=
iEquipmentService
.
list
();
Map
<
Long
,
Equipment
>
keyMap
=
equipmentList
.
stream
().
collect
(
Collectors
.
toMap
(
BaseEntity:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
Equipment
>
keyMap
=
equipmentList
.
stream
().
collect
(
Collectors
.
toMap
(
BaseEntity:
:
getId
,
Function
.
identity
()));
...
@@ -1657,7 +1583,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1657,7 +1583,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
List
<
Map
<
String
,
Object
>>
carResourceMapList
=
this
.
baseMapper
.
getCarResourceMapList
(
null
);
List
<
Map
<
String
,
Object
>>
carResourceMapList
=
this
.
baseMapper
.
getCarResourceMapList
(
null
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
carResourceMap
=
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
carResourceMap
=
carResourceMapList
.
stream
().
collect
(
Collectors
.
groupingBy
(
car
->
car
.
get
(
"carId"
).
toString
()));
carResourceMapList
.
stream
().
collect
(
Collectors
.
groupingBy
(
car
->
car
.
get
(
"carId"
).
toString
()));
List
<
CarInfoDto
>
CarInfoDtoList
=
carList
.
stream
().
map
(
car
->
{
List
<
CarInfoDto
>
CarInfoDtoList
=
carList
.
stream
().
map
(
car
->
{
CarInfoDto
carInfoVo
=
new
CarInfoDto
();
CarInfoDto
carInfoVo
=
new
CarInfoDto
();
Bean
.
copyExistPropertis
(
car
,
carInfoVo
);
Bean
.
copyExistPropertis
(
car
,
carInfoVo
);
Equipment
equipment
=
keyMap
.
get
(
carInfoVo
.
getEquipmentId
());
Equipment
equipment
=
keyMap
.
get
(
carInfoVo
.
getEquipmentId
());
...
@@ -1669,7 +1595,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1669,7 +1595,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
carInfoVo
.
setImage
(
fileList
.
stream
().
filter
(
f
->
f
.
getObjectId
().
equals
(
car
.
getId
())).
map
(
UploadFile:
:
getUrl
).
collect
(
Collectors
.
toList
()));
carInfoVo
.
setImage
(
fileList
.
stream
().
filter
(
f
->
f
.
getObjectId
().
equals
(
car
.
getId
())).
map
(
UploadFile:
:
getUrl
).
collect
(
Collectors
.
toList
()));
if
(
equipment
.
getImg
()
!=
null
){
if
(
equipment
.
getImg
()
!=
null
)
{
List
<
String
>
img
=
new
ArrayList
<>();
List
<
String
>
img
=
new
ArrayList
<>();
img
.
add
(
equipment
.
getImg
());
img
.
add
(
equipment
.
getImg
());
carInfoVo
.
setImage
(
img
);
carInfoVo
.
setImage
(
img
);
...
@@ -1690,4 +1616,14 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1690,4 +1616,14 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
List
<
CarFusionDto
>
carFusionDtos
=
this
.
baseMapper
.
selectCarAndCarProperty
();
List
<
CarFusionDto
>
carFusionDtos
=
this
.
baseMapper
.
selectCarAndCarProperty
();
return
carFusionDtos
;
return
carFusionDtos
;
}
}
@Override
public
void
refreshStaData
()
{
List
<
Map
<
String
,
Object
>>
result
=
this
.
baseMapper
.
queryCompanyCarStaData
();
result
.
forEach
(
m
->
redisUtils
.
set
((
buildKey
(
m
)),
m
.
get
(
"total"
)));
}
private
String
buildKey
(
Map
<
String
,
Object
>
row
)
{
return
row
.
get
(
"bizOrgCode"
).
toString
()
+
"_"
+
SourceTypeEnum
.
CAR
.
getCode
()
+
"_"
+
row
.
get
(
"categoryCode"
).
toString
();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
0be13336
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -39,83 +16,34 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...
@@ -39,83 +16,34 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipment
;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipment
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.dto.UserDto
;
import
com.yeejoin.equipmanage.common.dto.UserDto
;
import
com.yeejoin.equipmanage.common.entity.EquProperty
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.EquipmentCategory
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSystemSourceStatistics
;
import
com.yeejoin.equipmanage.common.entity.Stock
;
import
com.yeejoin.equipmanage.common.entity.StockBill
;
import
com.yeejoin.equipmanage.common.entity.StockBillDetail
;
import
com.yeejoin.equipmanage.common.entity.StockDetail
;
import
com.yeejoin.equipmanage.common.entity.UploadFile
;
import
com.yeejoin.equipmanage.common.entity.Video
;
import
com.yeejoin.equipmanage.common.entity.Warehouse
;
import
com.yeejoin.equipmanage.common.entity.WarehouseStructure
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.entity.vo.AlarmInfoVO
;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.entity.vo.AlarmVO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.CurrAlaramVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DetailPaneVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DevInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DevOverviewVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSecificDetailVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.ManufacturerVO
;
import
com.yeejoin.equipmanage.common.entity.vo.PartDetailVO
;
import
com.yeejoin.equipmanage.common.entity.vo.ProductInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SurrVideoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.TechInfoListVO
;
import
com.yeejoin.equipmanage.common.entity.vo.TechInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.VideoVO
;
import
com.yeejoin.equipmanage.common.enums.BillContentEnum
;
import
com.yeejoin.equipmanage.common.enums.BitmapEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipmentRiskTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.FileTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.StockBillTypeEnum
;
import
com.yeejoin.equipmanage.common.exception.BaseException
;
import
com.yeejoin.equipmanage.common.exception.BaseException
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.QRCodeUtil
;
import
com.yeejoin.equipmanage.common.utils.QRCodeUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.vo.EquipFor3DVO
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.EquipmentDate
;
import
com.yeejoin.equipmanage.common.vo.EquipmentDetailVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentSpecific3dVo
;
import
com.yeejoin.equipmanage.config.EquipmentIotMqttReceiveConfig
;
import
com.yeejoin.equipmanage.config.EquipmentIotMqttReceiveConfig
;
import
com.yeejoin.equipmanage.mapper.EquipmentIndexMapper
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.UploadFileMapper
;
import
com.yeejoin.equipmanage.mapper.VideoMapper
;
import
com.yeejoin.equipmanage.service.IEquPropertyService
;
import
com.yeejoin.equipmanage.service.IEquipmentCategoryService
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IStockBillDetailService
;
import
com.yeejoin.equipmanage.service.IStockBillService
;
import
com.yeejoin.equipmanage.service.IStockDetailService
;
import
com.yeejoin.equipmanage.service.IStockService
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.ISystemDicService
;
import
com.yeejoin.equipmanage.service.IUploadFileService
;
import
com.yeejoin.equipmanage.service.IVideoService
;
import
com.yeejoin.equipmanage.service.IWarehouseService
;
import
com.yeejoin.equipmanage.service.IWarehouseStructureService
;
import
com.yeejoin.equipmanage.utils.RelationRedisUtil
;
import
com.yeejoin.equipmanage.utils.RelationRedisUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* @author ZeHua Li
* @author ZeHua Li
...
@@ -470,7 +398,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -470,7 +398,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
SimpleDateFormat
stf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
stf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @TableField(updateStrategy = FieldStrategy.IGNORED) 置空不生效 为空单独设置 by kongfm 2021-09-10
// @TableField(updateStrategy = FieldStrategy.IGNORED) 置空不生效 为空单独设置 by kongfm 2021-09-10
this
.
update
(
new
LambdaUpdateWrapper
<
EquipmentSpecific
>().
set
(
EquipmentSpecific:
:
getAgencyId
,
equipmentSpecific
.
getAgencyId
()).
set
(
EquipmentSpecific:
:
getTeamId
,
equipmentSpecific
.
getTeamId
()).
eq
(
EquipmentSpecific:
:
getId
,
equipmentSpecific
.
getId
()));
this
.
update
(
new
LambdaUpdateWrapper
<
EquipmentSpecific
>().
set
(
EquipmentSpecific:
:
getAgencyId
,
equipmentSpecific
.
getAgencyId
()).
set
(
EquipmentSpecific:
:
getTeamId
,
equipmentSpecific
.
getTeamId
()).
eq
(
EquipmentSpecific:
:
getId
,
equipmentSpecific
.
getId
()));
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
}
boolean
updateById
=
this
.
updateById
(
equipmentSpecific
);
boolean
updateById
=
this
.
updateById
(
equipmentSpecific
);
...
@@ -1062,16 +990,16 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1062,16 +990,16 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override
@Override
public
Object
getOneCard
(
Long
id
,
String
type
)
{
public
Object
getOneCard
(
Long
id
,
String
type
)
{
if
(
BitmapEnum
.
video
.
getKey
().
equals
(
type
))
{
if
(
BitmapEnum
.
video
.
getKey
().
equals
(
type
))
{
AlamVideoVO
video
=
videoMapper
.
getVideoById
(
id
);
AlamVideoVO
video
=
videoMapper
.
getVideoById
(
id
);
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
().
toString
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
().
toString
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
}
}
return
video
;
return
video
;
}
else
{
}
else
{
DetailPaneVO
detailPaneVO
=
new
DetailPaneVO
();
DetailPaneVO
detailPaneVO
=
new
DetailPaneVO
();
Map
<
String
,
String
>
map
=
this
.
baseMapper
.
getQrCodeAndPic
(
id
);
Map
<
String
,
String
>
map
=
this
.
baseMapper
.
getQrCodeAndPic
(
id
);
if
(
ObjectUtils
.
isEmpty
(
map
))
{
if
(
ObjectUtils
.
isEmpty
(
map
))
{
return
detailPaneVO
;
return
detailPaneVO
;
}
}
detailPaneVO
.
setQrCode
(
map
.
get
(
"qrCode"
));
detailPaneVO
.
setQrCode
(
map
.
get
(
"qrCode"
));
...
@@ -1230,7 +1158,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1230,7 +1158,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecific
.
setEquipmentDetailId
(
equipmentDetail
.
getId
());
equipmentSpecific
.
setEquipmentDetailId
(
equipmentDetail
.
getId
());
equipmentSpecific
.
setQrCode
(
qrCode
);
equipmentSpecific
.
setQrCode
(
qrCode
);
equipmentSpecific
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecific
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
}
boolean
save
=
this
.
save
(
equipmentSpecific
);
boolean
save
=
this
.
save
(
equipmentSpecific
);
...
@@ -1308,7 +1236,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1308,7 +1236,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecificBatch
.
setQrCode
(
list
.
get
(
i
));
equipmentSpecificBatch
.
setQrCode
(
list
.
get
(
i
));
equipmentSpecificBatch
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecificBatch
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecificBatch
.
setEquipmentDetailId
(
equipmentDetails
.
get
(
i
).
getId
());
equipmentSpecificBatch
.
setEquipmentDetailId
(
equipmentDetails
.
get
(
i
).
getId
());
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecificBatch
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
equipmentSpecificBatch
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
}
equipmentSpecifics
.
add
(
equipmentSpecificBatch
);
equipmentSpecifics
.
add
(
equipmentSpecificBatch
);
...
@@ -1416,7 +1344,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1416,7 +1344,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecific
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecific
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecific
.
setEquipmentDetailId
(
equipmentDetail
.
getId
());
equipmentSpecific
.
setEquipmentDetailId
(
equipmentDetail
.
getId
());
equipmentSpecific
.
setCreateDate
(
new
Date
());
equipmentSpecific
.
setCreateDate
(
new
Date
());
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
}
//插入设备数据
//插入设备数据
...
@@ -1657,4 +1585,15 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1657,4 +1585,15 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
map
.
put
(
"tropics"
,
tropicsIndexDetails
);
map
.
put
(
"tropics"
,
tropicsIndexDetails
);
return
map
;
return
map
;
}
}
@Override
public
void
refreshStaData
()
{
List
<
Map
<
String
,
Object
>>
result
=
this
.
baseMapper
.
queryCompanyStaData
();
result
.
forEach
(
m
->
redisUtils
.
set
((
buildKey
(
m
)),
m
.
get
(
"total"
)));
}
private
String
buildKey
(
Map
<
String
,
Object
>
row
)
{
return
row
.
get
(
"bizOrgCode"
).
toString
()
+
"_"
+
SourceTypeEnum
.
EQUIPMENT
.
getCode
()
+
"_"
+
row
.
get
(
"categoryCode"
).
toString
();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
0be13336
...
@@ -422,7 +422,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -422,7 +422,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// responses.add(p);
// responses.add(p);
// });
// });
// List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList());
// List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList());
List
<
PointTreeVo
>
buildList
=
buildingMapper
.
getBuildList
(
null
);
List
<
PointTreeVo
>
buildList
=
buildingMapper
.
getBuildList
(
orgCode
);
return
transferListToPointTree
(
buildList
,
id
);
return
transferListToPointTree
(
buildList
,
id
);
}
}
...
@@ -955,16 +955,21 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -955,16 +955,21 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
@Override
@Override
public
List
<
FireFightingSystemTypeTreeVo
>
systemTypeTree
()
{
public
List
<
FireFightingSystemTypeTreeVo
>
systemTypeTree
(
String
bizOrgCode
)
{
// 获取所有系统list
// 获取所有系统
分类
list
LambdaQueryWrapper
<
DynamicFormGroup
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
DynamicFormGroup
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
DynamicFormGroup:
:
getGroupType
,
"fireSystem"
);
wrapper
.
eq
(
DynamicFormGroup:
:
getGroupType
,
"fireSystem"
);
wrapper
.
eq
(
DynamicFormGroup:
:
getParentId
,
0
);
wrapper
.
eq
(
DynamicFormGroup:
:
getParentId
,
0
);
List
<
DynamicFormGroup
>
list
=
iEqDynamicFormGroupService
.
list
(
wrapper
);
List
<
DynamicFormGroup
>
list
=
iEqDynamicFormGroupService
.
list
(
wrapper
);
List
<
Map
<
String
,
Object
>>
typeList
=
fireFightingSystemMapper
.
listByBizOrgCode
(
bizOrgCode
);
List
<
FireFightingSystemTypeTreeVo
>
childrenList
=
list
.
stream
().
map
(
item
->
{
List
<
FireFightingSystemTypeTreeVo
>
childrenList
=
list
.
stream
().
map
(
item
->
{
FireFightingSystemTypeTreeVo
vo
=
new
FireFightingSystemTypeTreeVo
();
FireFightingSystemTypeTreeVo
vo
=
new
FireFightingSystemTypeTreeVo
();
vo
.
setName
(
item
.
getGroupName
());
vo
.
setName
(
item
.
getGroupName
());
vo
.
setTotal
(
"0"
);
typeList
.
forEach
(
obj
->
{
if
(
item
.
getId
().
equals
(
Long
.
valueOf
(
obj
.
get
(
"typeId"
).
toString
())))
{
vo
.
setTotal
(
obj
.
get
(
"total"
).
toString
());
}
});
vo
.
setType
(
item
.
getGroupType
());
vo
.
setType
(
item
.
getGroupType
());
vo
.
setId
(
String
.
valueOf
(
item
.
getId
()));
vo
.
setId
(
String
.
valueOf
(
item
.
getId
()));
return
vo
;
return
vo
;
...
@@ -1044,4 +1049,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1044,4 +1049,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
}
}
@Override
public
List
<
FireFightingSystemEntity
>
systemListByBziOrgCode
(
String
bizOrgCode
)
{
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
StringUtil
.
isNotEmpty
(
bizOrgCode
))
{
wrapper
.
likeRight
(
FireFightingSystemEntity:
:
getBizOrgCode
,
bizOrgCode
);
}
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FormInstanceServiceImpl.java
View file @
0be13336
...
@@ -479,8 +479,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
...
@@ -479,8 +479,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getBuildVideoListCount
()
{
public
List
<
Map
<
String
,
Object
>>
getBuildVideoListCount
(
List
<
String
>
bizOrgCodeList
)
{
return
formInstanceMapper
.
getBuildVideoListCount
();
return
formInstanceMapper
.
getBuildVideoListCount
(
bizOrgCodeList
);
}
}
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SourcesStatisticsImpl.java
0 → 100644
View file @
0be13336
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.enums.SourceTypeEnum
;
import
com.yeejoin.equipmanage.service.ICarService
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.ISourceStatistics
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.SpringContextHelper
;
import
java.lang.reflect.Method
;
import
java.util.Set
;
/**
* @author DELL
*/
@Service
public
class
SourcesStatisticsImpl
implements
ISourceStatistics
{
@Autowired
private
RedisUtils
redisUtil
;
@Override
public
int
equipCategoryStatistics
(
String
bizOrgCode
,
SourceTypeEnum
sourceType
,
String
categoryCode
)
{
// 计算处通用code,用来上下级匹配如12001010000->1200101
String
treeCode
=
subStringZero
(
categoryCode
);
Set
<
String
>
keys
=
redisUtil
.
getKeys
(
buildKey
(
bizOrgCode
,
sourceType
.
getCode
(),
treeCode
));
if
(
keys
.
size
()
>
0
)
{
//求和
return
this
.
sumNumber
(
keys
);
}
else
{
//按照类型插入缓存
Object
bean
=
SpringContextHelper
.
getBean
(
sourceType
.
getBeanName
());
Method
[]
methods
=
bean
.
getClass
().
getDeclaredMethods
();
for
(
Method
method
:
methods
)
{
if
(
method
.
getName
().
equals
(
sourceType
.
getMethodName
()))
{
try
{
method
.
invoke
(
bean
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"更新redis数据失败"
+
e
.
getMessage
());
}
}
}
return
this
.
sumNumber
(
keys
);
}
}
private
int
sumNumber
(
Set
<
String
>
keys
)
{
return
keys
.
stream
().
filter
(
k
->
redisUtil
.
get
(
k
)
!=
null
).
mapToInt
(
k
->
Integer
.
parseInt
(
redisUtil
.
get
(
k
).
toString
())).
sum
();
}
private
String
subStringZero
(
String
categoryCode
)
{
String
reverse
=
new
StringBuffer
(
categoryCode
).
reverse
().
toString
();
int
noZero
=
Integer
.
parseInt
(
reverse
);
return
new
StringBuffer
(
String
.
valueOf
(
noZero
)).
reverse
().
toString
();
}
private
String
buildKey
(
String
bizOrgCode
,
String
sourceType
,
String
treeCode
)
{
return
bizOrgCode
+
"*_"
+
sourceType
+
"_"
+
treeCode
+
"*"
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockServiceImpl.java
View file @
0be13336
...
@@ -384,6 +384,11 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -384,6 +384,11 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
if
(
StringUtils
.
isNotBlank
(
equipmentDetailDownloadVOS
.
get
(
i
).
getCompanyName
()))
{
if
(
StringUtils
.
isNotBlank
(
equipmentDetailDownloadVOS
.
get
(
i
).
getCompanyName
()))
{
String
[]
company
=
equipmentDetailDownloadVOS
.
get
(
i
).
getCompanyName
().
split
(
"@"
);
String
[]
company
=
equipmentDetailDownloadVOS
.
get
(
i
).
getCompanyName
().
split
(
"@"
);
equipmentSpecific
.
setAgencyId
(
company
[
1
]);
equipmentSpecific
.
setAgencyId
(
company
[
1
]);
equipmentSpecific
.
setAgencyName
(
company
[
0
]);
equipmentSpecific
.
setBizOrgCode
(
company
[
2
]);
equipmentSpecific
.
setBizOrgName
(
company
[
0
]);
}
}
equipmentSpecificMapper
.
insert
(
equipmentSpecific
);
equipmentSpecificMapper
.
insert
(
equipmentSpecific
);
...
...
amos-boot-system-equip/src/main/resources/application.properties
View file @
0be13336
...
@@ -36,7 +36,7 @@ dutyMode.fegin.name=AMOS-DUTYMODE
...
@@ -36,7 +36,7 @@ dutyMode.fegin.name=AMOS-DUTYMODE
riskSource.feign.name
=
AMOS-AUTOSYS
riskSource.feign.name
=
AMOS-AUTOSYS
equipManage.name
=
AMOS-EQUIPMANAGE
equipManage.name
=
AMOS-EQUIPMANAGE
iot.vehicle.track
=
AMOS-API-IOT
iot.vehicle.track
=
AMOS-API-IOT
jcs.fegin.name
=
JCS
-SHG
jcs.fegin.name
=
JCS
video.fegin.name
=
VIDEO
video.fegin.name
=
VIDEO
#项目初始化画布id
#项目初始化画布id
morphic.projectSeq
=
1390314016458514433
morphic.projectSeq
=
1390314016458514433
...
@@ -93,3 +93,5 @@ auth-key-fire-system=fire_system_info;
...
@@ -93,3 +93,5 @@ auth-key-fire-system=fire_system_info;
auth-key-fire-equip
=
fire_equip_info;
auth-key-fire-equip
=
fire_equip_info;
# 权限标识-消防视频
# 权限标识-消防视频
auth-key-fire-video
=
fire_video_info;
auth-key-fire-video
=
fire_video_info;
# 权限标识-消防视频
auth-key-fire-build-video
=
fire_build_video_info;
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/Building.xml
View file @
0be13336
...
@@ -233,16 +233,17 @@
...
@@ -233,16 +233,17 @@
AND cd.field_name = 'code'
AND cd.field_name = 'code'
LEFT JOIN wl_form_instance AS bzc ON bzc.instance_id = ins.instance_id
LEFT JOIN wl_form_instance AS bzc ON bzc.instance_id = ins.instance_id
AND bzc.field_name = 'bizOrgCode'
AND bzc.field_name = 'bizOrgCode'
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
bzc.field_value = #{bizOrgCode}
</if>
</where>
GROUP BY
GROUP BY
ins.instance_id
ins.instance_id
ORDER BY
ORDER BY
parentId
parentId
) t
) t
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
t.bizOrgCode = #{bizOrgCode}
</if>
</where>
</select>
</select>
<select
id=
"get3dBuildList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.PointTreeVo"
>
<select
id=
"get3dBuildList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.PointTreeVo"
>
select
select
...
...
amos-boot-system-equip/src/main/resources/mapper/CarMapper.xml
View file @
0be13336
...
@@ -604,4 +604,19 @@
...
@@ -604,4 +604,19 @@
from wl_car wc LEFT JOIN wl_car_property wcp on wc.id = wcp.car_id
from wl_car wc LEFT JOIN wl_car_property wcp on wc.id = wcp.car_id
where wcp.equipment_index_key in ('FAS_Car_Video', 'FAS_Car_GIS');
where wcp.equipment_index_key in ('FAS_Car_Video', 'FAS_Car_GIS');
</select>
</select>
<select
id=
"queryCompanyCarStaData"
resultType=
"java.util.Map"
>
SELECT
s.biz_org_code as bizOrgCode,
c.code as categoryCode,
count(1) as total
FROM
`wl_car` s,
wl_equipment e,
wl_equipment_category c
where
s.equipment_id = e.`id`
and e.category_id = c.id
and s.biz_org_code
<![CDATA[<>]]>
''
GROUP BY s.biz_org_code ,c.code
</select>
</mapper>
</mapper>
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
0be13336
...
@@ -1441,4 +1441,19 @@
...
@@ -1441,4 +1441,19 @@
WHERE
WHERE
s.equipment_code = '92251100TZE44'
s.equipment_code = '92251100TZE44'
</select>
</select>
<select
id=
"queryCompanyStaData"
resultType=
"java.util.Map"
>
SELECT
s.biz_org_code as bizOrgCode,
c.code as categoryCode,
count(1) as total
FROM
`wl_equipment_specific` s,
wl_equipment e,
wl_equipment_category c
where
s.equipment_code = e.`code`
and e.category_id = c.id
and s.biz_org_code
<![CDATA[<>]]>
''
GROUP BY s.biz_org_code ,c.code
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
0be13336
...
@@ -1829,32 +1829,16 @@ FROM
...
@@ -1829,32 +1829,16 @@ FROM
order by createDate DESC
order by createDate DESC
</select>
</select>
<select
id=
"listByBizOrgCode"
resultType=
"java.util.Map"
>
SELECT
form_group_id typeId,
COUNT(form_group_id) total
FROM
f_fire_fighting_system
WHERE
biz_org_code LIKE CONCAT(#{bizOrgCode}, '%' )
GROUP BY form_group_id
</select>
</mapper>
</mapper>
amos-boot-system-equip/src/main/resources/mapper/FormInstanceMapper.xml
View file @
0be13336
...
@@ -259,6 +259,7 @@
...
@@ -259,6 +259,7 @@
</select>
</select>
<!-- 消防建筑视屏监控统计树 -->
<!-- 消防建筑视屏监控统计树 -->
<select
id=
"getBuildVideoListCount"
resultType=
"hashmap"
>
<select
id=
"getBuildVideoListCount"
resultType=
"hashmap"
>
SELECT * FROM(
SELECT
SELECT
sa.*,
sa.*,
b.total
b.total
...
@@ -269,7 +270,8 @@
...
@@ -269,7 +270,8 @@
a.group_code AS groupCode,
a.group_code AS groupCode,
a.group_type AS groupType,
a.group_type AS groupType,
MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId,
MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName,
MAX( CASE WHEN a.field_name = 'biz_org_code' THEN a.field_value END ) AS bizOrgCode
FROM
FROM
`wl_form_instance` a
`wl_form_instance` a
GROUP BY
GROUP BY
...
@@ -283,9 +285,19 @@
...
@@ -283,9 +285,19 @@
'else' as groupType,
'else' as groupType,
0 as parentId,
0 as parentId,
'其他' as instanceName,
'其他' as instanceName,
NULL AS bizOrgCode,
count(1) as total
count(1) as total
from
from
wl_video where id not in (select video_id from wl_video_source)
wl_video where id not in (select video_id from wl_video_source)
) tmp
<where>
<if
test=
"list != null and list.size() >0"
>
AND tmp.bizOrgCode IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
</select>
<select
id=
"getColaBuildVideoListCount"
resultType=
"hashmap"
>
<select
id=
"getColaBuildVideoListCount"
resultType=
"hashmap"
>
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
0be13336
...
@@ -70,6 +70,12 @@
...
@@ -70,6 +70,12 @@
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
FIND_IN_SET(vc.source_id, getChildrenIdsByRootId(#{dto.buildingId}))
FIND_IN_SET(vc.source_id, getChildrenIdsByRootId(#{dto.buildingId}))
</if>
</if>
<if
test=
"dto.buildIdList != null and dto.buildIdList.size > 0"
>
AND
<foreach
collection=
"dto.buildIdList"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
" OR "
>
FIND_IN_SET(vc.source_id, getChildrenIdsByRootId(#{item, jdbcType=INTEGER}))
</foreach>
</if>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
and v.name like concat('%',#{dto.equipmentName},'%')
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment