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
b5b07111
Commit
b5b07111
authored
Aug 24, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
d0f6ba08
8f551dc2
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
180 additions
and
41 deletions
+180
-41
LinkageUnitMapper.java
...amos/boot/module/common/api/mapper/LinkageUnitMapper.java
+5
-8
LinkageUnitMapper.xml
...ommon-api/src/main/resources/mapper/LinkageUnitMapper.xml
+46
-20
PowerTransferResourceDto.java
...mos/boot/module/jcs/api/dto/PowerTransferResourceDto.java
+0
-2
ResourceStatisticsDto.java
...n/amos/boot/module/jcs/api/dto/ResourceStatisticsDto.java
+41
-0
PowerTransferMapper.java
.../amos/boot/module/jcs/api/mapper/PowerTransferMapper.java
+10
-0
IPowerTransferService.java
...os/boot/module/jcs/api/service/IPowerTransferService.java
+10
-0
PowerTransferMapper.xml
...jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
+26
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+14
-3
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+3
-4
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+25
-4
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/mapper/LinkageUnitMapper.java
View file @
b5b07111
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
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.LinkageUnit
;
import
com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 联动单位 Mapper 接口
* 联动单位 Mapper 接口
...
@@ -58,7 +55,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
...
@@ -58,7 +55,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
* 查询包含特岗人数及的具体信息
* 查询包含特岗人数及的具体信息
* @return
* @return
*/
*/
Page
<
List
<
LinkageUnitDto
>>
getEmergencyLinkageUnitList
(
IPage
<
LinkageUnitDto
>
page
,
String
unitName
,
List
<
LinkageUnitDto
>
getEmergencyLinkageUnitList
(
String
unitName
,
String
linkageUnitTypeCode
,
String
emergencyLinkageUnitCode
);
String
linkageUnitTypeCode
,
String
emergencyLinkageUnitCode
);
List
<
LinkageUnitDto
>
exportToExcel
();
List
<
LinkageUnitDto
>
exportToExcel
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/LinkageUnitMapper.xml
View file @
b5b07111
...
@@ -45,8 +45,17 @@
...
@@ -45,8 +45,17 @@
a.latitude,
a.latitude,
a.longitude,
a.longitude,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
AS distance
AS distance,
FROM cb_linkage_unit a
case when csps.person_number is null then 0 else
csps.person_number end as userNum,
case when cre.vehicle_number is null then 0 else cre.vehicle_number end as
carNum
FROM
cb_linkage_unit a
LEFT JOIN cb_special_position_staff csps ON a.sequence_nbr =
csps.company_id
LEFT JOIN cb_rescue_equipment cre on a.sequence_nbr = cre.company_id
where a.longitude is not null and
where a.longitude is not null and
a.latitude is not null
a.latitude is not null
<if
test=
'par.distance!=null'
>
<if
test=
'par.distance!=null'
>
...
@@ -87,46 +96,61 @@
...
@@ -87,46 +96,61 @@
emergency_linkage_unit_code
emergency_linkage_unit_code
</select>
</select>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
>
select
select
a.unit_name unitName,
a.unit_name unitName,
a.linkage_unit_type linkageUnitType,
a.linkage_unit_type
linkageUnitType,
a.address ,
a.address ,
a.latitude,
a.latitude,
a.longitude,
a.longitude,
a.agreement_start_date agreementStartDate,
a.agreement_start_date agreementStartDate,
a.agreement_end_date agreementEndDate,
a.agreement_end_date
agreementEndDate,
a.contact_user contactUser,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.contact_phone
contactPhone,
b.*
b.*
from cb_linkage_unit a LEFT JOIN
from cb_linkage_unit a LEFT JOIN
(SELECT
(SELECT
m.instance_id,
m.instance_id,
max(case m.field_code when 'emergencyServiceContent' then m.field_value end) emergencyServiceContent,
max(case m.field_code when 'emergencyServiceContent' then
max(case m.field_code when 'fireRescueCapability' then m.field_value end) fireRescueCapability,
m.field_value end) emergencyServiceContent,
max(case m.field_code when 'responsibilitiesSituation' then m.field_value end) responsibilitiesSituation,
max(case m.field_code when
max(case m.field_code when 'unitSituation' then m.field_value end) unitSituation
'fireRescueCapability' then m.field_value end) fireRescueCapability,
FROM cb_dynamic_form_instance m GROUP BY m.instance_id) b
max(case m.field_code when 'responsibilitiesSituation' then
m.field_value end) responsibilitiesSituation,
max(case m.field_code
when 'unitSituation' then m.field_value end) unitSituation
FROM
cb_dynamic_form_instance m GROUP BY m.instance_id) b
on b.instance_id=a.instance_id where a.unit_name is not null
on
b.instance_id=a.instance_id where a.unit_name is not null
</select>
</select>
<select
id=
"getEmergencyLinkageUnitList"
<select
id=
"getEmergencyLinkageUnitList"
resultType=
"
java.util.Map
"
>
resultType=
"
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
"
>
SELECT
SELECT
clu.sequence_nbr as sequenceNbr,
clu.sequence_nbr as sequenceNbr,
clu.unit_name as unitName,
clu.unit_name as unitName,
clu.unit_code AS unitCode,
clu.unit_code AS unitCode,
clu.parent_id AS parentId,
clu.parent_id AS parentId,
clu.linkage_unit_type AS linkageUnitType,
clu.linkage_unit_type AS linkageUnitType,
clu.linkage_unit_type_code AS linkageUnitTypeCode,
clu.linkage_unit_type_code AS
clu.administrative_divisions AS administrativeDivisions,
linkageUnitTypeCode,
clu.administrative_divisions_code AS administrativeDivisionsCode,
clu.administrative_divisions AS
administrativeDivisions,
clu.administrative_divisions_code AS
administrativeDivisionsCode,
clu.address AS address,
clu.address AS address,
clu.longitude AS longitude,
clu.longitude AS
longitude,
clu.latitude AS latitude,
clu.latitude AS latitude,
clu.agreement_start_date AS agreementStartDate,
clu.agreement_start_date AS
agreementStartDate,
clu.agreement_end_date AS agreementEndDate,
clu.agreement_end_date AS agreementEndDate,
clu.emergency_linkage_unit AS emergencyLinkageUnit,
clu.emergency_linkage_unit AS emergencyLinkageUnit,
clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode,
clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode,
...
@@ -160,10 +184,12 @@
...
@@ -160,10 +184,12 @@
<if
test=
"unitName != null and unitName != ''"
>
<if
test=
"unitName != null and unitName != ''"
>
AND clu.unit_name LIKE concat(#{unitName}, '%')
AND clu.unit_name LIKE concat(#{unitName}, '%')
</if>
</if>
<if
test=
"linkageUnitTypeCode != null and linkageUnitTypeCode != ''"
>
<if
test=
"linkageUnitTypeCode != null and linkageUnitTypeCode != ''"
>
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
</if>
</if>
<if
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
<if
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
</if>
</if>
</select>
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/PowerTransferResourceDto.java
View file @
b5b07111
...
@@ -6,8 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -6,8 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
/**
* 调派资源dto
* 调派资源dto
*
*
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/ResourceStatisticsDto.java
0 → 100644
View file @
b5b07111
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 调派资源统计dto
*
* @author tb
* @date 2021-08-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@AllArgsConstructor
@ApiModel
(
value
=
"ResourceStatisticsDto"
,
description
=
"调派资源统计dto"
)
public
class
ResourceStatisticsDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"全部"
)
private
Integer
allCount
=
0
;
@ApiModelProperty
(
value
=
"到场"
)
private
Integer
arrived
=
0
;
@ApiModelProperty
(
value
=
"途中"
)
private
Integer
underway
=
0
;
public
ResourceStatisticsDto
(
String
type
,
Integer
allCount
)
{
this
.
type
=
type
;
this
.
allCount
=
allCount
;
this
.
arrived
=
0
;
this
.
underway
=
0
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/PowerTransferMapper.java
View file @
b5b07111
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -96,6 +97,15 @@ public interface PowerTransferMapper extends BaseMapper<PowerTransfer> {
...
@@ -96,6 +97,15 @@ public interface PowerTransferMapper extends BaseMapper<PowerTransfer> {
@Param
(
"alertCalledId"
)
Long
alertCalledId
);
@Param
(
"alertCalledId"
)
Long
alertCalledId
);
/**
/**
* 根据类型查询力量调派统计
*
* @param alertCalledId
* @param type
* @return
*/
List
<
ResourceStatisticsDto
>
getPowerTransferTeamResourceCount
(
Long
alertCalledId
,
String
type
);
/**
* 根据参数获取警情当前已调派车辆资源列表信息
* 根据参数获取警情当前已调派车辆资源列表信息
*
*
* @param alertCalledId 警情id
* @param alertCalledId 警情id
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IPowerTransferService.java
View file @
b5b07111
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerCompanyCountDto;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerCompanyCountDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
...
@@ -43,4 +44,13 @@ public interface IPowerTransferService extends IService<PowerTransfer> {
...
@@ -43,4 +44,13 @@ public interface IPowerTransferService extends IService<PowerTransfer> {
* @return
* @return
*/
*/
IPage
<
PowerTransferResourceDto
>
getPowerTransferPageByParam
(
Long
alertCalledId
,
String
type
,
Page
<
PowerTransferResourceDto
>
page
);
IPage
<
PowerTransferResourceDto
>
getPowerTransferPageByParam
(
Long
alertCalledId
,
String
type
,
Page
<
PowerTransferResourceDto
>
page
);
/**
* 根据参数查询力量调派资源统计信息
*
* @param alertCalledId 警情id
* @param type 查询类型
* @return
*/
List
<
ResourceStatisticsDto
>
getPowerTransferStatistics
(
Long
alertCalledId
,
String
type
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
View file @
b5b07111
...
@@ -210,6 +210,32 @@
...
@@ -210,6 +210,32 @@
transfer.alert_called_id = #{alertCalledId}
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0
AND is_distribution_agencies = 0
</select>
</select>
<select
id=
"getPowerTransferTeamResourceCount"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto"
>
SELECT
"team" type,
count( DISTINCT company.company_id ) allCount
FROM
jc_power_transfer_company company
LEFT JOIN jc_power_transfer transfer ON transfer.sequence_nbr = company.power_transfer_id
WHERE
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0 UNION ALL
SELECT
"car" type,
count( DISTINCT car.resources_id ) allCount
FROM
jc_power_transfer_company_resources car
LEFT JOIN jc_power_transfer_company company ON company.sequence_nbr = car.power_transfer_company_id
LEFT JOIN jc_power_transfer transfer ON transfer.sequence_nbr = company.power_transfer_id
WHERE
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0
UNION ALL
SELECT
"person" type,
0 allCount
</select>
<select
id=
"getPowerTransferCarResource"
<select
id=
"getPowerTransferCarResource"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto"
>
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto"
>
SELECT DISTINCT
SELECT DISTINCT
...
...
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 @
b5b07111
...
@@ -422,8 +422,10 @@ public class CommandController extends BaseController {
...
@@ -422,8 +422,10 @@ public class CommandController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/SY"
)
@GetMapping
(
value
=
"/SY"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
public
ResponseModel
<
WaterResourceDto
>
selectOne
(
Long
id
)
{
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iWaterResourceService
.
selectBySequenceNbr
(
id
));
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
jsonObject
.
remove
(
"managementUnit"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
...
@@ -945,7 +947,7 @@ public class CommandController extends BaseController {
...
@@ -945,7 +947,7 @@ public class CommandController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派列表"
,
notes
=
"app-根据警情id查询力量调派列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派列表"
,
notes
=
"app-根据警情id查询力量调派列表"
)
@GetMapping
(
value
=
"/app/transferList"
)
@GetMapping
(
value
=
"/app/transferList"
)
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"
company
"
)
String
type
,
@RequestParam
(
defaultValue
=
"
team
"
)
String
type
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
page
=
new
Page
();
Page
page
=
new
Page
();
...
@@ -953,4 +955,12 @@ public class CommandController extends BaseController {
...
@@ -953,4 +955,12 @@ public class CommandController extends BaseController {
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferPageByParam
(
Long
.
valueOf
(
alertId
),
type
,
page
));
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferPageByParam
(
Long
.
valueOf
(
alertId
),
type
,
page
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派资源统计"
,
notes
=
"app-根据警情id查询力量调派资源统计"
)
@GetMapping
(
value
=
"/app/transfer/statistics"
)
public
ResponseModel
getPowerTransferStatistics
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferStatistics
(
Long
.
valueOf
(
alertId
),
type
));
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
b5b07111
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
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
;
...
@@ -76,8 +75,8 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
...
@@ -76,8 +75,8 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
like
)
String
unitName
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
like
)
String
unitName
,
@Condition
(
Operator
.
eq
)
String
linkageUnitTypeCode
,
@Condition
(
Operator
.
eq
)
String
emergencyLinkageUnitCode
,
@Condition
(
Operator
.
eq
)
String
linkageUnitTypeCode
,
@Condition
(
Operator
.
eq
)
String
emergencyLinkageUnitCode
,
String
inAgreement
)
{
String
inAgreement
)
{
Page
<
List
<
LinkageUnitDto
>>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
page
,
unitName
,
linkageUnitTypeCode
,
emergencyLinkageUnitCode
);
List
<
LinkageUnitDto
>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
unitName
,
linkageUnitTypeCode
,
emergencyLinkageUnitCode
);
List
<
Map
>
linkageUnitListMap
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
.
getRecords
()
),
Map
.
class
);
List
<
Map
>
linkageUnitListMap
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
),
Map
.
class
);
List
<
Map
<
String
,
Object
>>
pageList
=
dynamicFormInstanceService
.
listAll
(
getGroupCode
());
List
<
Map
<
String
,
Object
>>
pageList
=
dynamicFormInstanceService
.
listAll
(
getGroupCode
());
linkageUnitListMap
.
forEach
(
i
->
{
linkageUnitListMap
.
forEach
(
i
->
{
...
@@ -88,7 +87,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
...
@@ -88,7 +87,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
}
}
});
});
});
});
List
<
LinkageUnitDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
.
getRecords
()
),
List
<
LinkageUnitDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
),
LinkageUnitDto
.
class
);
LinkageUnitDto
.
class
);
List
<
LinkageUnitDto
>
detaiList
=
resultDtoList
.
stream
().
map
(
item
->
{
List
<
LinkageUnitDto
>
detaiList
=
resultDtoList
.
stream
().
map
(
item
->
{
Date
now
=
new
Date
();
Date
now
=
new
Date
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
b5b07111
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
...
@@ -372,8 +373,8 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
...
@@ -372,8 +373,8 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
}
}
IPage
<
PowerTransferResourceDto
>
resultPage
=
null
;
IPage
<
PowerTransferResourceDto
>
resultPage
=
null
;
switch
(
type
)
{
switch
(
type
)
{
case
"
company
"
:
case
"
team
"
:
resultPage
=
powerTransferMapper
.
getPowerTransferTeamResource
(
page
,
alertCalledId
);
resultPage
=
getPowerTransferTeamResource
(
page
,
alertCalledId
);
break
;
break
;
case
"car"
:
case
"car"
:
resultPage
=
getPowerTransferCarResource
(
page
,
alertCalledId
);
resultPage
=
getPowerTransferCarResource
(
page
,
alertCalledId
);
...
@@ -388,7 +389,28 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
...
@@ -388,7 +389,28 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
return
resultPage
;
return
resultPage
;
}
}
private
IPage
<
PowerTransferResourceDto
>
getPowerTransferCarResource
(
Page
<
PowerTransferResourceDto
>
page
,
Long
alertCalledId
)
{
@Override
public
List
<
ResourceStatisticsDto
>
getPowerTransferStatistics
(
Long
alertCalledId
,
String
type
)
{
List
<
ResourceStatisticsDto
>
result
;
result
=
powerTransferMapper
.
getPowerTransferTeamResourceCount
(
alertCalledId
,
type
);
if
(
ValidationUtil
.
isEmpty
(
result
))
{
ResourceStatisticsDto
team
=
new
ResourceStatisticsDto
(
"team"
,
0
,
0
,
0
);
ResourceStatisticsDto
car
=
new
ResourceStatisticsDto
(
"car"
,
0
,
0
,
0
);
ResourceStatisticsDto
person
=
new
ResourceStatisticsDto
(
"person"
,
0
,
0
,
0
);
result
.
add
(
team
);
result
.
add
(
car
);
result
.
add
(
person
);
}
return
result
;
}
public
IPage
<
PowerTransferResourceDto
>
getPowerTransferTeamResource
(
Page
<
PowerTransferResourceDto
>
page
,
Long
alertCalledId
)
{
return
powerTransferMapper
.
getPowerTransferTeamResource
(
page
,
alertCalledId
);
}
private
IPage
<
PowerTransferResourceDto
>
getPowerTransferCarResource
(
Page
<
PowerTransferResourceDto
>
page
,
Long
alertCalledId
)
{
ResponseModel
<
Object
>
result
=
equipFeignClient
.
getFireCarListAll
();
ResponseModel
<
Object
>
result
=
equipFeignClient
.
getFireCarListAll
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
carInfoMap
=
Maps
.
newConcurrentMap
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
carInfoMap
=
Maps
.
newConcurrentMap
();
if
(!
ValidationUtil
.
isEmpty
(
result
))
{
if
(!
ValidationUtil
.
isEmpty
(
result
))
{
...
@@ -405,7 +427,6 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
...
@@ -405,7 +427,6 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
String
seq
=
car
.
getSequenceNbr
().
toString
();
String
seq
=
car
.
getSequenceNbr
().
toString
();
car
.
setName
((
String
)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"name"
));
car
.
setName
((
String
)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"name"
));
String
carStateCode
=
(
String
)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"carState"
);
String
carStateCode
=
(
String
)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"carState"
);
FireCarStatusEnum
.
getEnum
(
carStateCode
);
car
.
setCarState
(!
ValidationUtil
.
isEmpty
(
FireCarStatusEnum
.
getEnum
(
carStateCode
))
?
car
.
setCarState
(!
ValidationUtil
.
isEmpty
(
FireCarStatusEnum
.
getEnum
(
carStateCode
))
?
FireCarStatusEnum
.
getEnum
(
carStateCode
).
getName
()
:
""
);
FireCarStatusEnum
.
getEnum
(
carStateCode
).
getName
()
:
""
);
List
<
String
>
images
=
(
List
<
String
>)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"image"
);
List
<
String
>
images
=
(
List
<
String
>)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"image"
);
...
...
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