Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
64ee2ef6
Commit
64ee2ef6
authored
Sep 01, 2021
by
陈浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chenhao' into 'developer'
Chenhao See merge request
moa/amos-boot-biz!6
parents
3fa2ff39
c17d2b80
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
146 additions
and
55 deletions
+146
-55
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+5
-3
DataDictionaryMapper.xml
...common/src/main/resources/mapper/DataDictionaryMapper.xml
+4
-2
AlertCalledMapper.java
...in/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
+8
-0
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+49
-3
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+1
-14
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+5
-3
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+15
-5
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+24
-0
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+35
-25
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
64ee2ef6
...
@@ -265,14 +265,16 @@ public class DataDictionaryController extends BaseController {
...
@@ -265,14 +265,16 @@ public class DataDictionaryController extends BaseController {
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
Collection
<
DataDictionary
>
list
=
null
;
Collection
<
DataDictionary
>
list
=
null
;
List
<
Menu
>
menus
=
null
;
if
(
"YJLDDW"
.
equals
(
type
))
{
if
(
"YJLDDW"
.
equals
(
type
))
{
list
=
dataDictionaryMapper
.
getNoInLinkUnit
();
list
=
dataDictionaryMapper
.
getNoInLinkUnit
();
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
}
else
{
}
else
{
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
}
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
null
);
}
// 创建根节点
// 创建根节点
Menu
menu
=
new
Menu
(-
1L
,
rootName
,
-
1L
,
menus
,
0
);
Menu
menu
=
new
Menu
(-
1L
,
rootName
,
-
1L
,
menus
,
0
);
List
<
Menu
>
menuList
=
new
ArrayList
<>();
List
<
Menu
>
menuList
=
new
ArrayList
<>();
...
...
amos-boot-biz-common/src/main/resources/mapper/DataDictionaryMapper.xml
View file @
64ee2ef6
...
@@ -29,7 +29,9 @@ GROUP BY
...
@@ -29,7 +29,9 @@ GROUP BY
<select
id =
"getNoInLinkUnit"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
<select
id =
"getNoInLinkUnit"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
SELECT
SELECT
cbb.*
CONCAT(cbb.`name`,' (',elink.count,')') as `name`,
cbb.*,
elink.count as count
FROM
FROM
cb_data_dictionary cbb
cb_data_dictionary cbb
LEFT JOIN (
LEFT JOIN (
...
@@ -42,7 +44,7 @@ LEFT JOIN (
...
@@ -42,7 +44,7 @@ LEFT JOIN (
emergency_linkage_unit_code
emergency_linkage_unit_code
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
WHERE
WHERE
cbb.type = 'YJLDDW'
cbb.type = 'YJLDDW'
and cbb.is_delete = 0
AND elink.count IS NOT NULL
AND elink.count IS NOT NULL
</select>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
View file @
64ee2ef6
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
...
@@ -34,4 +35,11 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
...
@@ -34,4 +35,11 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Integer
AlertCalledcountTime
(
@Param
(
"type"
)
int
type
);
Integer
AlertCalledcountTime
(
@Param
(
"type"
)
int
type
);
List
<
AlertCalledTodyDto
>
getTodayAlertCalled
();
List
<
AlertCalledTodyDto
>
getTodayAlertCalled
();
List
<
AlertCalled
>
selectAllPage
(
Long
current
,
Long
size
,
Integer
alertStatus
,
String
alertTypeCode
,
String
alertSourceCode
,
String
startTime
,
String
endTime
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
64ee2ef6
...
@@ -84,6 +84,52 @@
...
@@ -84,6 +84,52 @@
</select>
</select>
<select
id=
"selectAllPage"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled"
>
SELECT
a.sequence_nbr,
a.alert_status,
a.type,
a.alert_stage,
a.alarm_type,
a.alarm_type_code,
a.call_record_id,
a.father_alert,
a.response_level_code,
a.contact_user,
a.contact_phone,
a.call_time,
a.call_time_num,
a.alert_source,
a.alert_source_code,
a.alert_type,
a.alert_type_code,
a.unit_involved,
a.trapped_num,
a.casualties_num,
a.address,
a.rescue_grid,
a.coordinate_x,
a.coordinate_y,
a.response_level
FROM
jc_alert_called a
<where>
<if
test=
"alertStatus!= null "
>
and alert_status = #{alertStatus}
</if>
<if
test=
"startTime!= null and endTime != null"
>
and call_time between #{startTime} and #{endTime}
</if>
<if
test=
"alertTypeCode!= null "
>
and alarm_type_code = #{alertTypeCode}
</if>
<if
test=
"alertSourceCode!= null "
>
and alert_source_code = #{alertSourceCode}
</if>
</where>
order by call_time DESC limit #{current},#{size}
</select>
<select
id=
"AlertCalledcountTime"
resultType=
"Integer"
>
<select
id=
"AlertCalledcountTime"
resultType=
"Integer"
>
...
@@ -107,11 +153,11 @@
...
@@ -107,11 +153,11 @@
<select
id=
"getTodayAlertCalled"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto"
>
<select
id=
"getTodayAlertCalled"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto"
>
select
select jc_alert_called.alert_type alarmType,
jc_alert_called.alert_type alarmType,
jc_alert_called.address,
jc_alert_called.address,
jc_alert_called.call_time callTime
jc_alert_called.call_time callTime
from jc_alert_called where is_delete=0
from jc_alert_called
where is_delete = 0
and to_days(call_time) = to_days(now())
and to_days(call_time) = to_days(now())
ORDER BY call_time DESC
ORDER BY call_time DESC
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureDetailsController.java
View file @
64ee2ef6
...
@@ -77,19 +77,6 @@ public class FailureDetailsController extends BaseController {
...
@@ -77,19 +77,6 @@ public class FailureDetailsController extends BaseController {
}
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
FailureDetailsDto
>
updateBySequenceNbrFailureDetails
(
@RequestBody
FailureDetailsDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
updateWithModel
(
model
));
}
/**
/**
...
@@ -251,7 +238,7 @@ public class FailureDetailsController extends BaseController {
...
@@ -251,7 +238,7 @@ public class FailureDetailsController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/weblist"
)
@GetMapping
(
value
=
"/
list/
weblist"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"Web端列表分页查询"
,
notes
=
"Web端列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"Web端列表分页查询"
,
notes
=
"Web端列表分页查询"
)
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPageList
(
@RequestParam
(
value
=
"current"
)
Long
current
,
@RequestParam
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPageList
(
@RequestParam
(
value
=
"current"
)
Long
current
,
@RequestParam
(
value
=
"size"
)
Long
size
,
@RequestParam
(
required
=
false
)
Long
currentStatus
,
(
value
=
"size"
)
Long
size
,
@RequestParam
(
required
=
false
)
Long
currentStatus
,
...
...
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 @
64ee2ef6
...
@@ -353,20 +353,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -353,20 +353,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
@Override
public
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
{
public
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
{
// 动态表单数据
// 动态表单数据
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 开始 */
List
<
DynamicFormInstanceDto
>
list
=
alertFormValueServiceImpl
.
listByCalledId
(
id
);
List
<
DynamicFormInstanceDto
>
list
=
alertFormValueServiceImpl
.
listByCalledId
(
id
);
List
<
FormValue
>
formValue
=
new
ArrayList
<>();
List
<
FormValue
>
formValue
=
new
ArrayList
<>();
for
(
DynamicFormInstanceDto
alertFormValue
:
list
)
{
for
(
DynamicFormInstanceDto
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldValue
()
!=
null
)
{
if
(
alertFormValue
.
getFieldValue
Label
()
!=
null
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getBlock
());
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
Label
(),
alertFormValue
.
getBlock
());
formValue
.
add
(
value
);
formValue
.
add
(
value
);
}
else
{
}
else
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
Label
(),
alertFormValue
.
getBlock
());
alertFormValue
.
getFieldType
(),
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getBlock
());
formValue
.
add
(
value
);
formValue
.
add
(
value
);
}
}
}
}
return
formValue
;
return
formValue
;
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 结束 */
}
}
public
List
<
FormValue
>
getFormValueDetail
(
Long
id
)
throws
Exception
{
public
List
<
FormValue
>
getFormValueDetail
(
Long
id
)
throws
Exception
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
64ee2ef6
...
@@ -140,20 +140,30 @@ public class AlertCalledController extends BaseController {
...
@@ -140,20 +140,30 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
ResponseModel
<
IPage
<
AlertCalled
>>
listPage
(
String
pageNum
,
String
pageSize
,
String
sort
,
AlertCalled
alertCalled
)
{
public
ResponseModel
<
IPage
<
AlertCalled
>>
listPage
(
String
pageNum
,
String
pageSize
,
String
sort
,
AlertCalled
alertCalled
,
Integer
alertStatus
,
String
alertTypeCode
,
String
alertSourceCode
,
String
startTime
,
String
endTime
){
Page
<
AlertCalled
>
pageBean
;
Page
<
AlertCalled
>
pageBean
;
IPage
<
AlertCalled
>
page
;
/* IPage<AlertCalled> page;
String sort, AlertCalled alertCalled,
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
setQueryWrapper(alertCalledQueryWrapper, alertCalled,sort);
setQueryWrapper(alertCalledQueryWrapper, alertCalled,sort);
*/
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
}
page
=
iAlertCalledService
.
page
(
pageBean
,
alertCalledQueryWrapper
);
/* bug2408 筛选参数解析异常 修改筛选条件方法 修改入参分离筛选条件
return
ResponseHelper
.
buildResponse
(
page
);
alertStatus 警情状态 alertTypeCode 报警类型code alertSourceCode 警情来源code
陈召 2021-08-21 开始*/
IPage
<
AlertCalled
>
alertCalledIPage
=
iAlertCalledService
.
queryForCalledList
(
pageBean
,
alertStatus
,
alertTypeCode
,
alertSourceCode
,
startTime
,
endTime
);
/* bug2408 筛选参数解析异常 修改筛选条件方法 陈召 2021-08-21 结束*/
return
ResponseHelper
.
buildResponse
(
alertCalledIPage
);
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
64ee2ef6
...
@@ -6,14 +6,18 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -6,14 +6,18 @@ 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
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
...
@@ -124,6 +128,26 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -124,6 +128,26 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
alertCalledMapper
.
alertCalledListByAlertStatusCount
(
par
);
return
alertCalledMapper
.
alertCalledListByAlertStatusCount
(
par
);
}
}
/**
* 接警记录 列表分页查询
**/
/* bug2408 筛选参数解析异常 修改筛选条件方法 陈召 2021-08-21 开始*/
public
IPage
<
AlertCalled
>
queryForCalledList
(
Page
pageBean
,
Integer
alertStatus
,
String
alertTypeCode
,
String
alertSourceCode
,
String
startTime
,
String
endTime
)
{
List
<
AlertCalled
>
list
=
alertCalledMapper
.
selectAllPage
(
pageBean
.
getCurrent
(),
pageBean
.
getSize
(),
alertStatus
,
alertTypeCode
,
alertSourceCode
,
startTime
,
endTime
);
IPage
<
AlertCalled
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
iPage
.
setTotal
(
list
.
size
());
return
iPage
;
/* bug2408 筛选参数解析异常 修改筛选条件方法 陈召 2021-08-21 结束*/
}
/**
/**
* 根据灾情id 查询灾情详情
* 根据灾情id 查询灾情详情
**/
**/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
64ee2ef6
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
import
org.aspectj.weaver.ast.Var
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
...
@@ -33,11 +34,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -33,11 +34,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Collection
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -133,7 +130,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -133,7 +130,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
public
List
<
Menu
>
getTeamTree
(
Map
<
String
,
Object
>
columnMap
)
throws
Exception
{
public
List
<
Menu
>
getTeamTree
(
Map
<
String
,
Object
>
columnMap
)
throws
Exception
{
Collection
<
FireTeam
>
list
=
this
.
listByMap
(
columnMap
);
Collection
<
FireTeam
>
list
=
this
.
listByMap
(
columnMap
);
return
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
return
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
"getParent"
,
null
);
"getParent"
,
null
);
}
}
/**
/**
...
@@ -192,7 +189,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -192,7 +189,7 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
}
}
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getById
(
fireTeam
.
getTypeCode
());
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getById
(
fireTeam
.
getTypeCode
());
if
(
null
!=
dataDictionary
)
{
if
(
null
!=
dataDictionary
)
{
fireTeam
.
setType
(
dataDictionary
.
getName
());
fireTeam
.
setType
(
dataDictionary
.
getName
());
}
}
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getSequenceNbr
()))
{
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getSequenceNbr
()))
{
...
@@ -225,16 +222,29 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -225,16 +222,29 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
if
(
null
==
pageNum
||
null
==
pageSize
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
pageNum
=
1
;
pageNum
=
1
;
pageSize
=
Integer
.
MAX_VALUE
;
pageSize
=
Integer
.
MAX_VALUE
;
}
else
{
}
else
{
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
}
}
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
// 获取消防车辆列表
// 获取消防车辆列表
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
list
.
forEach
(
fireTeamZhDto
->
{
Long
sequenceNbr
=
fireTeamZhDto
.
getSequenceNbr
();
result1
.
forEach
(
map
->
{
String
mapId
=
String
.
valueOf
(
map
.
get
(
"teamId"
));
if
(
String
.
valueOf
(
sequenceNbr
).
equals
(
mapId
)){
Integer
carNum
=
Integer
.
valueOf
(
map
.
get
(
"carNum"
).
toString
());
fireTeamZhDto
.
setCarNum
(
carNum
);
}
});
});
/*
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
if(result1!=null&&result1.size()>0){
if(result1!=null&&result1.size()>0){
Map<String, Object> combineResultMap = new HashMap<String, Object>();
Map<String, Object> combineResultMap = new HashMap<String, Object>();
result1.stream().forEach(obj ->{
result1.stream().forEach(obj ->{
...
@@ -245,9 +255,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -245,9 +255,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
obj.setCarNum(Integer.valueOf(combineResultMap.get(obj.getSequenceNbr()).toString()));
obj.setCarNum(Integer.valueOf(combineResultMap.get(obj.getSequenceNbr()).toString()));
}
}
});
});
}
}
*/
return
list
;
return
list
;
}
}
@Override
@Override
public
Integer
getFireTeamListCount
(
RequestData
par
)
{
public
Integer
getFireTeamListCount
(
RequestData
par
)
{
...
@@ -262,20 +272,20 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -262,20 +272,20 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Override
@Override
public
List
<
FireTeamZhDto
>
getFireTeamCountList
()
{
public
List
<
FireTeamZhDto
>
getFireTeamCountList
()
{
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamCountList
();
List
<
FireTeamZhDto
>
list
=
fireTeamMapper
.
getFireTeamCountList
();
// 获取消防车辆列表
// 获取消防车辆列表
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
result
=
equipFeignClient
.
getFireCarListAllcount
();
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
List
<
Map
<
String
,
Object
>>
result1
=
result
.
getResult
();
if
(
result1
!=
null
&&
result1
.
size
()>
0
)
{
if
(
result1
!=
null
&&
result1
.
size
()
>
0
)
{
Map
<
String
,
Object
>
combineResultMap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
combineResultMap
=
new
HashMap
<
String
,
Object
>();
result1
.
stream
().
forEach
(
obj
->{
result1
.
stream
().
forEach
(
obj
->
{
combineResultMap
.
put
(
obj
.
get
(
"teamId"
).
toString
(),
obj
.
get
(
"carNum"
));
combineResultMap
.
put
(
obj
.
get
(
"teamId"
).
toString
(),
obj
.
get
(
"carNum"
));
});
});
list
.
stream
().
forEach
(
obj
->{
list
.
stream
().
forEach
(
obj
->
{
if
(
combineResultMap
.
containsKey
(
obj
.
getSequenceNbr
().
toString
()))
{
if
(
combineResultMap
.
containsKey
(
obj
.
getSequenceNbr
().
toString
()))
{
obj
.
setCarNum
(
Integer
.
valueOf
(
combineResultMap
.
get
(
obj
.
getSequenceNbr
().
toString
()).
toString
()));
obj
.
setCarNum
(
Integer
.
valueOf
(
combineResultMap
.
get
(
obj
.
getSequenceNbr
().
toString
()).
toString
()));
}
}
});
});
...
@@ -292,12 +302,12 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -292,12 +302,12 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
count
+=
fireTeamMapper
.
getFighterNumByTeamId
(
teamId
);
count
+=
fireTeamMapper
.
getFighterNumByTeamId
(
teamId
);
// 获取下部分数据
// 获取下部分数据
LambdaQueryWrapper
<
FireTeam
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FireTeam
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FireTeam:
:
getParent
,
teamId
).
eq
(
FireTeam:
:
getIsDelete
,
false
);
queryWrapper
.
eq
(
FireTeam:
:
getParent
,
teamId
).
eq
(
FireTeam:
:
getIsDelete
,
false
);
List
<
FireTeam
>
fireTeamList
=
this
.
list
(
queryWrapper
);
List
<
FireTeam
>
fireTeamList
=
this
.
list
(
queryWrapper
);
if
(
fireTeamList
.
size
()
==
0
)
{
if
(
fireTeamList
.
size
()
==
0
)
{
return
count
;
return
count
;
}
else
{
}
else
{
for
(
FireTeam
t
:
fireTeamList
)
{
for
(
FireTeam
t
:
fireTeamList
)
{
count
+=
getFightNumByTeamId
(
t
.
getSequenceNbr
());
count
+=
getFightNumByTeamId
(
t
.
getSequenceNbr
());
}
}
}
}
...
...
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