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
2e7a6dca
Commit
2e7a6dca
authored
Dec 06, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
e603a057
ee23cfb0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
165 additions
and
21 deletions
+165
-21
MaintenanceCompany.java
...mos/boot/module/common/api/entity/MaintenanceCompany.java
+13
-0
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+21
-5
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+1
-1
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+9
-6
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+60
-3
FireStationServiceImpl.java
...odule/common/biz/service/impl/FireStationServiceImpl.java
+9
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+2
-2
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+36
-4
RemoteSecurityService.java
.../com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
+2
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+12
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/MaintenanceCompany.java
View file @
2e7a6dca
...
...
@@ -79,6 +79,19 @@ public class MaintenanceCompany extends BaseEntity {
@TableField
(
"longitude"
)
private
String
longitude
;
/**
* amos平台id
*/
@TableField
(
"amos_org_id"
)
private
String
amosId
;
/**
* amos账户名称
*/
@TableField
(
"amos_org_name"
)
private
String
amosName
;
/**
* 动态表单实例id
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
2e7a6dca
...
...
@@ -4,12 +4,9 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.Map
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -188,6 +185,7 @@ public interface EquipFeignClient {
*/
@RequestMapping
(
value
=
"/building/video/page"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getVideo
(
@RequestParam
(
"current"
)
long
current
,
@RequestParam
(
"size"
)
long
size
,
@RequestParam
(
"buildingId"
)
Long
buildingId
);
@RequestMapping
(
value
=
"/building/video/page"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getVideopag
(
@RequestParam
(
"current"
)
String
current
,
@RequestParam
(
"size"
)
String
size
,
...
...
@@ -196,6 +194,24 @@ public interface EquipFeignClient {
@RequestParam
(
"equipmentName"
)
String
equipmentName
);
@RequestMapping
(
value
=
"/monitorView/video/page"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryUncheckedVideoList
(
@RequestParam
(
value
=
"viewId"
)
Long
viewId
,
@RequestParam
(
value
=
"videoName"
,
required
=
false
)
String
videoName
,
@RequestParam
(
value
=
"videoCode"
,
required
=
false
)
String
videoCode
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
);
@RequestMapping
(
value
=
"/confirmAlarm/getDetailsById"
,
method
=
RequestMethod
.
GET
)
public
Map
<
String
,
Object
>
getDetailsById
(
@RequestParam
Long
alamId
,
@RequestParam
Long
equipId
,
@RequestParam
String
type
,
@RequestParam
String
area
)
;
/**
*
*获取视频列表
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
2e7a6dca
...
...
@@ -83,7 +83,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
*/
List
<
OrgUsrExcelDto
>
exportPersonToExcelByParentId
(
Long
parentId
);
List
<
OrgUsr
>
amosIdExist
(
String
amosId
);
int
amosIdExist
(
String
amosId
);
void
updatelistByParentId
(
String
codex
,
String
code
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
2e7a6dca
...
...
@@ -627,12 +627,15 @@ GROUP BY
</select>
<select
id=
"amosIdExist"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.OrgUsr"
>
SELECT *
FROM cb_org_usr
WHERE is_delete = 0
and
amos_org_id = #{amosId}
<select
id=
"amosIdExist"
resultType=
"int"
>
select sum(num) from (
SELECT count(*) AS num FROM cb_firefighters WHERE amos_user_id = #{amosId} and is_delete = 0
union all SELECT count(*) AS num FROM cb_org_usr WHERE amos_org_id = #{amosId} and is_delete = 0
union all SELECT count(*) AS num FROM cb_maintenance_company WHERE amos_org_id = #{amosId} and is_delete = 0
) AS total;
</select>
...
...
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 @
2e7a6dca
...
...
@@ -336,6 +336,58 @@ public class CommandController extends BaseController {
return
ResponseHelper
.
buildResponse
(
pag
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询视图下的视频列表"
)
@RequestMapping
(
value
=
"monitorView/video/page"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryUncheckedVideoList
(
@RequestParam
(
value
=
"viewId"
)
Long
viewId
,
@RequestParam
(
value
=
"videoName"
,
required
=
false
)
String
videoName
,
@RequestParam
(
value
=
"videoCode"
,
required
=
false
)
String
videoCode
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
throws
Exception
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
queryUncheckedVideoList
(
viewId
,
videoName
,
videoCode
,
current
,
size
);
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
}
pag
.
setRecords
(
records
);
}
return
ResponseHelper
.
buildResponse
(
pag
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"confirmAlarm/getDetailsById"
)
@ApiOperation
(
value
=
"根据id,type查询确警页面相关数据"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetailsById
(
@RequestParam
Long
alamId
,
@RequestParam
Long
equipId
,
@RequestParam
String
type
,
@RequestParam
String
area
)
{
Map
<
String
,
Object
>
data
=
equipFeignClient
.
getDetailsById
(
alamId
,
equipId
,
type
,
area
);
List
<
Map
<
String
,
Object
>>
records
=
data
!=
null
?
(
List
<
Map
<
String
,
Object
>>)
data
.
get
(
"video"
)
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
ResponseModel
<
String
>
da
=
videoFeignClient
.
videoUrlByIndexCode
(
record
.
get
(
"code"
)
+
""
);
String
url
=
da
!=
null
?
da
.
getResult
().
substring
(
da
.
getResult
().
indexOf
(
"openUrl"
))
:
null
;
record
.
put
(
"url"
,
url
);
}
data
.
put
(
"video"
,
records
);
}
return
ResponseHelper
.
buildResponse
(
data
);
}
/**
* 水源列表分页查询
*
...
...
@@ -533,10 +585,15 @@ public class CommandController extends BaseController {
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
.
get
(
"buildDate"
)))
{
LocalDateTime
dateTime
=
(
LocalDateTime
)
jsonObject
.
get
(
"buildDate"
);
Date
date
=
Date
.
from
(
dateTime
.
toInstant
(
ZoneOffset
.
of
(
"+8"
)));
jsonObject
.
remove
(
"buildDate"
);
String
str
=
jsonObject
.
get
(
"buildDate"
).
toString
();
Date
date
=
new
Date
(
Long
.
parseLong
(
str
));
jsonObject
.
put
(
"buildDate"
,
DateUtils
.
convertDateToString
(
date
,
DateUtils
.
DATE_TIME_PATTERN
));
}
else
{
jsonObject
.
put
(
"buildDate"
,
""
);
}
if
(
ValidationUtil
.
isEmpty
(
jsonObject
.
get
(
"intakeHeight"
)))
{
jsonObject
.
put
(
"intakeHeight"
,
""
);
}
return
ResponseHelper
.
buildResponse
(
jsonObject
);
...
...
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 @
2e7a6dca
...
...
@@ -134,6 +134,15 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
}
// 地址处理
if
(
model
.
getAddress
()
!=
null
)
{
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
FireStation
entity
=
this
.
prepareEntity
(
model
);
this
.
updateById
(
entity
);
return
Bean
.
toModel
(
entity
,
model
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
2e7a6dca
...
...
@@ -1700,8 +1700,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
public
Object
amosIdExist
(
String
amosId
)
{
List
<
OrgUsr
>
orgUsrs
=
orgUsrMapper
.
amosIdExist
(
amosId
);
if
(
orgUsrs
.
size
()
>
0
)
{
int
num
=
orgUsrMapper
.
amosIdExist
(
amosId
);
if
(
num
>
0
)
{
return
false
;
}
return
true
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
2e7a6dca
...
...
@@ -31,6 +31,7 @@ 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.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -204,6 +205,28 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
WaterResourceDto
waterResourceDto
=
this
.
queryBySeq
(
sequenceNbr
);
waterResourceDto
.
setRealityImgList
(
JSONArray
.
parseArray
(
waterResourceDto
.
getRealityImg
(),
Object
.
class
));
waterResourceDto
.
setOrientationImgList
(
JSONArray
.
parseArray
(
waterResourceDto
.
getOrientationImg
()));
if
(
ValidationUtil
.
isEmpty
(
waterResourceDto
.
getContactUser
()))
{
waterResourceDto
.
setContactUser
(
""
);
}
if
(
ValidationUtil
.
isEmpty
(
waterResourceDto
.
getContactPhone
()))
{
waterResourceDto
.
setContactPhone
(
""
);
}
if
(
ValidationUtil
.
isEmpty
(
waterResourceDto
.
getManagementUnit
()))
{
waterResourceDto
.
setManagementUnit
(
""
);
}
if
(
ValidationUtil
.
isEmpty
(
waterResourceDto
.
getSection
()))
{
waterResourceDto
.
setSection
(
""
);
}
if
(
ValidationUtil
.
isEmpty
(
waterResourceDto
.
getWaterSupplyName
()))
{
waterResourceDto
.
setWaterSupplyName
(
""
);
}
Boolean
isDelete
=
waterResourceDto
.
getIsDelete
();
// 查询属性信息
String
resourceType
=
waterResourceDto
.
getResourceType
();
...
...
@@ -214,26 +237,35 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
waterResourceHydrantService
.
getOne
(
new
QueryWrapper
<
WaterResourceHydrant
>().
eq
(
"resource_id"
,
sequenceNbr
));
BeanUtils
.
copyProperties
(
waterResourceHydrant
,
waterResourceDto
);
if
(
null
!=
waterResourceHydrant
)
{
BeanUtils
.
copyProperties
(
waterResourceHydrant
,
waterResourceDto
);
}
break
;
case
"crane"
:
WaterResourceCrane
waterResourceCrane
=
waterResourceCraneService
.
getOne
(
new
QueryWrapper
<
WaterResourceCrane
>().
eq
(
"resource_id"
,
sequenceNbr
));
BeanUtils
.
copyProperties
(
waterResourceCrane
,
waterResourceDto
);
if
(
null
!=
waterResourceCrane
)
{
BeanUtils
.
copyProperties
(
waterResourceCrane
,
waterResourceDto
);
}
break
;
case
"natural"
:
WaterResourceNatural
waterResourceNatural
=
waterResourceNaturalService
.
getOne
(
new
QueryWrapper
<
WaterResourceNatural
>().
eq
(
"resource_id"
,
sequenceNbr
));
BeanUtils
.
copyProperties
(
waterResourceNatural
,
waterResourceDto
);
if
(
null
!=
waterResourceNatural
)
{
BeanUtils
.
copyProperties
(
waterResourceNatural
,
waterResourceDto
);
}
break
;
case
"pool"
:
WaterResourcePool
waterResourcePool
=
waterResourcePoolService
.
getOne
(
new
QueryWrapper
<
WaterResourcePool
>().
eq
(
"resource_id"
,
sequenceNbr
));
BeanUtils
.
copyProperties
(
waterResourcePool
,
waterResourceDto
);
if
(
null
!=
waterResourcePool
)
{
BeanUtils
.
copyProperties
(
waterResourcePool
,
waterResourceDto
);
}
break
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
View file @
2e7a6dca
...
...
@@ -116,6 +116,8 @@ public class RemoteSecurityService {
toke
=
getLogin
(
dPasswordAuthModel
);
}
}
RequestContext
.
setAppKey
(
toke
.
getAppKey
());
RequestContext
.
setToken
(
toke
.
getToke
());
}
catch
(
InnerInvokException
e
)
{
e
.
printStackTrace
();
}
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
2e7a6dca
...
...
@@ -2310,5 +2310,17 @@
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2021-12-04-cz-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_maintenance_company"
/>
</preConditions>
<comment>
新增两个字段用来保存amos账户信息
</comment>
<sql>
ALTER TABLE `cb_maintenance_company` add amos_org_id varchar(100) COMMENT 'amos平台id';
ALTER TABLE `cb_maintenance_company` add amos_org_name varchar(30) COMMENT 'amos账户名称';
</sql>
</changeSet>
</databaseChangeLog>
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