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
20928b0f
Commit
20928b0f
authored
Nov 03, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
9e654c31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
29 deletions
+133
-29
LinkageUnitVo.java
...eejoin/amos/boot/module/common/api/dto/LinkageUnitVo.java
+117
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+16
-29
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/dto/LinkageUnitVo.java
0 → 100644
View file @
20928b0f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.SourceFile
;
import
com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"LinkageUnitVo"
,
description
=
"联动单位"
)
public
class
LinkageUnitVo
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"单位名称"
,
index
=
0
)
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"单位code"
)
private
String
unitCode
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"父级单位id"
)
private
String
parentId
;
@ExcelProperty
(
value
=
"服务类别"
,
index
=
1
)
@ExplicitConstraint
(
type
=
"LDDWLB"
,
indexNum
=
1
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"服务类别"
)
private
String
linkageUnitType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"联动单位类别code"
)
private
String
linkageUnitTypeCode
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"行政区划"
)
private
String
administrativeDivisions
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"行政区划代码"
)
private
String
administrativeDivisionsCode
;
@ExcelProperty
(
value
=
"地址"
,
index
=
2
)
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ExcelProperty
(
value
=
"经度"
,
index
=
3
)
@ApiModelProperty
(
value
=
"经度"
)
private
String
longitude
;
@ExcelProperty
(
value
=
"纬度"
,
index
=
4
)
@ApiModelProperty
(
value
=
"纬度"
)
private
String
latitude
;
@ExcelProperty
(
value
=
"协议开始日期"
,
index
=
5
)
@ApiModelProperty
(
value
=
"协议开始日期"
)
private
Date
agreementStartDate
;
@ExcelProperty
(
value
=
"协议结束日期"
,
index
=
6
)
@ApiModelProperty
(
value
=
"协议结束日期"
)
private
Date
agreementEndDate
;
@ExcelProperty
(
value
=
"应急联动单位类别"
,
index
=
7
)
@ExplicitConstraint
(
type
=
"YJLDDW"
,
indexNum
=
7
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"应急联动单位类别"
)
private
String
emergencyLinkageUnit
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"应急联动单位类别code"
)
private
String
emergencyLinkageUnitCode
;
@ExcelProperty
(
value
=
"联系人"
,
index
=
8
)
@ApiModelProperty
(
value
=
"联系人 "
)
private
String
contactUser
;
@ExcelProperty
(
value
=
"联系人电话"
,
index
=
9
)
@ApiModelProperty
(
value
=
"联系人电话"
)
private
String
contactPhone
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"实例id"
)
private
Long
instanceId
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"组织机构代码"
)
private
String
orgCode
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"操作人名称"
)
private
String
recUserName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"是否在协议期 "
)
private
String
inAgreement
;
@ExcelProperty
(
value
=
"消防救援能力"
,
index
=
10
)
@ApiModelProperty
(
value
=
"消防救援能力"
)
private
String
fireRescueCapability
;
@ExcelProperty
(
value
=
"职责_简要情况"
,
index
=
11
)
@ApiModelProperty
(
value
=
"职责_简要情况"
)
private
String
responsibilitiesSituation
;
@ExcelProperty
(
value
=
"应急服务内容"
,
index
=
12
)
@ApiModelProperty
(
value
=
"应急服务内容"
)
private
String
emergencyServiceContent
;
@ExcelProperty
(
value
=
"单位_简要情况"
,
index
=
13
)
@ApiModelProperty
(
value
=
"单位_简要情况"
)
private
String
unitSituation
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"联动单位图片"
)
private
List
<
SourceFile
>
image
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"车辆数量"
)
private
String
vehicleNumber
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"特岗人数"
)
private
String
personNumber
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
20928b0f
...
...
@@ -15,32 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyFirstAidDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireChemical
;
...
...
@@ -341,15 +316,27 @@ public class ExcelServiceImpl {
LinkageUnitDto
.
class
);
List
<
LinkageUnitDto
>
detaiList
=
resultDtoList
.
stream
().
map
(
item
->
{
Date
now
=
new
Date
();
if
(
item
.
getLongitude
()
!=
null
){
}
boolean
isInAgreement
=
DateUtils
.
belongCalendar
(
now
,
item
.
getAgreementStartDate
(),
item
.
getAgreementEndDate
());
item
.
setInAgreement
(
isInAgreement
?
"是"
:
"否"
);
return
item
;
}).
filter
(
item
->
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
inAgreement
)
||
inAgreement
.
equals
(
item
.
getInAgreement
()))
.
collect
(
Collectors
.
toList
());
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
detaiList
,
LinkageUnitDto
.
class
,
null
,
false
);
/*经纬度导出精度会丢失 转换成string导出 2021-11-02 陈召 开始*/
List
<
LinkageUnitVo
>
result
=
new
ArrayList
<>();
detaiList
.
forEach
(
d
->{
LinkageUnitVo
linkageUnitVo
=
new
LinkageUnitVo
();
BeanUtils
.
copyProperties
(
d
,
linkageUnitVo
);
linkageUnitVo
.
setLatitude
(
d
.
getLatitude
()
!=
null
?
String
.
valueOf
(
d
.
getLatitude
()):
" "
);
linkageUnitVo
.
setLongitude
(
d
.
getLongitude
()
!=
null
?
String
.
valueOf
(
d
.
getLongitude
()):
" "
);
result
.
add
(
linkageUnitVo
);
});
/*经纬度导出精度会丢失 转换成string导出 2021-11-02 陈召 结束*/
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
result
,
LinkageUnitVo
.
class
,
null
,
false
);
break
;
default
:
break
;
...
...
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