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
fe177946
Commit
fe177946
authored
Aug 23, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG 2455 2532
parent
fd8af58b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
6 deletions
+139
-6
RescueEquipmentDto.java
...n/amos/boot/module/common/api/dto/RescueEquipmentDto.java
+14
-0
SpecialPositionStaffDto.java
...s/boot/module/common/api/dto/SpecialPositionStaffDto.java
+13
-1
ExcelEnums.java
...om/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
+4
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+1
-1
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+21
-3
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+86
-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/dto/RescueEquipmentDto.java
View file @
fe177946
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
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.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -18,27 +22,37 @@ import lombok.EqualsAndHashCode;
...
@@ -18,27 +22,37 @@ import lombok.EqualsAndHashCode;
@ApiModel
(
value
=
"RescueEquipmentDto"
,
description
=
"救援装备"
)
@ApiModel
(
value
=
"RescueEquipmentDto"
,
description
=
"救援装备"
)
public
class
RescueEquipmentDto
extends
BaseDto
{
public
class
RescueEquipmentDto
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"车辆类型"
,
index
=
0
)
@ExplicitConstraint
(
type
=
"JYZBLX"
,
indexNum
=
0
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"车辆类型"
)
@ApiModelProperty
(
value
=
"车辆类型"
)
private
String
vehicleType
;
private
String
vehicleType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"车辆类型code"
)
@ApiModelProperty
(
value
=
"车辆类型code"
)
private
String
vehicleTypeCode
;
private
String
vehicleTypeCode
;
@ExcelProperty
(
value
=
"车辆数量"
,
index
=
1
)
@ApiModelProperty
(
value
=
"车辆数量"
)
@ApiModelProperty
(
value
=
"车辆数量"
)
private
Long
vehicleNumber
;
private
Long
vehicleNumber
;
@ExcelProperty
(
value
=
"费用"
,
index
=
2
)
@ApiModelProperty
(
value
=
"费用"
)
@ApiModelProperty
(
value
=
"费用"
)
private
Double
fee
;
private
Double
fee
;
@ExcelProperty
(
value
=
"单位名称"
,
index
=
3
)
@ExplicitConstraint
(
indexNum
=
3
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getUnitTeam"
)
//动态下拉内容
@ApiModelProperty
(
value
=
"单位名称"
)
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
company
;
private
String
company
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"单位id"
)
@ApiModelProperty
(
value
=
"单位id"
)
private
Long
companyId
;
private
Long
companyId
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"更新人名称"
)
@ApiModelProperty
(
value
=
"更新人名称"
)
private
String
recUserName
;
private
String
recUserName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/SpecialPositionStaffDto.java
View file @
fe177946
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
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.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -19,24 +23,32 @@ import java.util.Date;
...
@@ -19,24 +23,32 @@ import java.util.Date;
@ApiModel
(
value
=
"SpecialPositionStaffDto"
,
description
=
"特岗人员"
)
@ApiModel
(
value
=
"SpecialPositionStaffDto"
,
description
=
"特岗人员"
)
public
class
SpecialPositionStaffDto
extends
BaseDto
{
public
class
SpecialPositionStaffDto
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"岗位名称"
,
index
=
0
)
@ExplicitConstraint
(
type
=
"GWMC"
,
indexNum
=
0
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"岗位名称"
)
@ApiModelProperty
(
value
=
"岗位名称"
)
private
String
positionName
;
private
String
positionName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"岗位名称code"
)
@ApiModelProperty
(
value
=
"岗位名称code"
)
private
String
positionNameCode
;
private
String
positionNameCode
;
@ExcelProperty
(
value
=
"人数"
,
index
=
1
)
@ApiModelProperty
(
value
=
"人数"
)
@ApiModelProperty
(
value
=
"人数"
)
private
Long
personNumber
;
private
Long
personNumber
;
@ExcelProperty
(
value
=
"单位名称"
,
index
=
2
)
@ExplicitConstraint
(
indexNum
=
2
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getUnitTeam"
)
//动态下拉内容
@ApiModelProperty
(
value
=
"单位名称"
)
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
company
;
private
String
company
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"单位id"
)
@ApiModelProperty
(
value
=
"单位id"
)
private
Long
companyId
;
private
Long
companyId
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"更新人名称"
)
@ApiModelProperty
(
value
=
"更新人名称"
)
private
String
recUserName
;
private
String
recUserName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
View file @
fe177946
...
@@ -21,7 +21,10 @@ public enum ExcelEnums {
...
@@ -21,7 +21,10 @@ public enum ExcelEnums {
CLZQ
(
"车辆执勤"
,
"车辆执勤"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyCarExcelDto"
,
"CLZQ"
),
//("CLZQ","车辆执勤")
CLZQ
(
"车辆执勤"
,
"车辆执勤"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyCarExcelDto"
,
"CLZQ"
),
//("CLZQ","车辆执勤")
JCDWRY
(
"机场单位人员"
,
"机场单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
,
"JCDWRY"
),
//("JCDW","机场单位")
JCDWRY
(
"机场单位人员"
,
"机场单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
,
"JCDWRY"
),
//("JCDW","机场单位")
LDDW
(
"联动单位"
,
"联动单位"
,
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
,
"LDDW"
),
//("JCDW","机场单位")
LDDW
(
"联动单位"
,
"联动单位"
,
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
,
"LDDW"
),
//("JCDW","机场单位")
RYZB
(
"人员值班"
,
"人员值班"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto"
,
"RYZB"
);
//("RYZB","人员值班")
RYZB
(
"人员值班"
,
"人员值班"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto"
,
"RYZB"
),
//("RYZB","人员值班")
// BUG 2455 相关代码 bykongfm
TGRY
(
"特岗人员"
,
"特岗人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto"
,
"TGRY"
),
//("TGRY","特岗人员")
JYZB
(
"救援装备"
,
"救援装备"
,
"com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto"
,
"JYZB"
);
//("JYZB","救援装备")
private
String
fileName
;
private
String
fileName
;
private
String
sheetName
;
private
String
sheetName
;
...
...
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 @
fe177946
...
@@ -327,7 +327,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -327,7 +327,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
});
});
Map
<
String
,
Integer
>
statusCountMap
=
alertCalledMapper
.
queryAlertStatusCount
(
beginDate
,
endDate
);
Map
<
String
,
Integer
>
statusCountMap
=
alertCalledMapper
.
queryAlertStatusCount
(
beginDate
,
endDate
);
Integer
unFinishedCount
=
Integer
unFinishedCount
=
this
.
count
(
new
LambdaQueryWrapper
<
AlertCalled
>().
eq
(
AlertCalled:
:
getAlertStatus
,
"0"
));
this
.
count
(
new
LambdaQueryWrapper
<
AlertCalled
>().
eq
(
AlertCalled:
:
getAlertStatus
,
false
));
//bug2532 未结案警情统计错误 bykongfm
result
.
put
(
"alertInfoList"
,
contentList
);
result
.
put
(
"alertInfoList"
,
contentList
);
result
.
putAll
(
statusCountMap
);
result
.
putAll
(
statusCountMap
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
fe177946
...
@@ -7,7 +7,9 @@ import java.util.stream.Collectors;
...
@@ -7,7 +7,9 @@ import java.util.stream.Collectors;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.LinkageUnitServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
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
;
...
@@ -67,6 +69,9 @@ public class DataSourcesImpl implements DataSources {
...
@@ -67,6 +69,9 @@ public class DataSourcesImpl implements DataSources {
@Autowired
@Autowired
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
@Autowired
LinkageUnitServiceImpl
linkageUnitServiceImpl
;
@Value
(
"${security.systemctl.name}"
)
@Value
(
"${security.systemctl.name}"
)
private
String
systemctl
;
private
String
systemctl
;
...
@@ -130,9 +135,9 @@ public class DataSourcesImpl implements DataSources {
...
@@ -130,9 +135,9 @@ public class DataSourcesImpl implements DataSources {
case
"getparent"
:
case
"getparent"
:
str
=
getparent
();
str
=
getparent
();
break
;
break
;
case
"getUnitTeam"
:
str
=
getUnitTeam
();
break
;
}
}
}
}
return
str
;
return
str
;
...
@@ -294,4 +299,17 @@ public class DataSourcesImpl implements DataSources {
...
@@ -294,4 +299,17 @@ public class DataSourcesImpl implements DataSources {
return
str
;
return
str
;
}
}
/**
* 特岗人员模板及救援车辆模板获取联动单位 BUG 2455 相关代码 bykongfm
* @return
*/
private
String
[]
getUnitTeam
()
{
List
<
LinkageUnitDto
>
units
=
linkageUnitServiceImpl
.
queryForLinkageUnitList
(
false
);
List
<
String
>
names
=
units
.
stream
().
map
(
item
->
{
return
item
.
getUnitName
()
+
"@"
+
item
.
getSequenceNbr
();
}).
collect
(
Collectors
.
toList
());
String
[]
str
=
names
.
toArray
(
new
String
[
names
.
size
()]);
return
str
;
}
}
}
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 @
fe177946
...
@@ -16,6 +16,8 @@ import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
...
@@ -16,6 +16,8 @@ import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.entity.RescueEquipment
;
import
com.yeejoin.amos.boot.module.common.api.entity.SpecialPositionStaff
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService
;
import
com.yeejoin.amos.boot.module.common.api.service.IKeySiteService
;
import
com.yeejoin.amos.boot.module.common.api.service.IKeySiteService
;
...
@@ -100,6 +102,10 @@ public class ExcelServiceImpl {
...
@@ -100,6 +102,10 @@ public class ExcelServiceImpl {
DynamicFormColumnServiceImpl
dynamicFormColumnServiceImpl
;
DynamicFormColumnServiceImpl
dynamicFormColumnServiceImpl
;
@Autowired
@Autowired
LinkageUnitServiceImpl
linkageUnitServiceImpl
;
LinkageUnitServiceImpl
linkageUnitServiceImpl
;
@Autowired
SpecialPositionStaffServiceImpl
specialPositionStaffServiceImpl
;
@Autowired
RescueEquipmentServiceImpl
rescueEquipmentServiceImpl
;
public
void
templateExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
)
throws
ClassNotFoundException
{
public
void
templateExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
)
throws
ClassNotFoundException
{
String
url
=
excelDto
.
getClassUrl
();
String
url
=
excelDto
.
getClassUrl
();
...
@@ -216,10 +222,90 @@ public class ExcelServiceImpl {
...
@@ -216,10 +222,90 @@ public class ExcelServiceImpl {
case
"LDDW"
:
case
"LDDW"
:
excelImportLinkageUnitZhDto
(
multipartFile
);
excelImportLinkageUnitZhDto
(
multipartFile
);
break
;
break
;
// BUG 2455 相关代码 bykongfm
case
"TGRY"
:
excelImportLinkageUnitTGRYDto
(
multipartFile
);
break
;
case
"JYZB"
:
excelImportLinkageUnitJYZBDto
(
multipartFile
);
break
;
}
}
return
;
return
;
}
}
private
void
excelImportLinkageUnitTGRYDto
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
SpecialPositionStaffDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
SpecialPositionStaffDto
.
class
,
1
);
if
(
excelDtoList
!=
null
&&
excelDtoList
.
size
()>
0
){
outer
:
for
(
SpecialPositionStaffDto
positionStaffDto
:
excelDtoList
)
{
String
code
=
""
;
if
(
positionStaffDto
.
getPositionName
()!=
null
){
String
[]
certificates
=
positionStaffDto
.
getPositionName
().
split
(
"@"
);
positionStaffDto
.
setPositionName
(
certificates
[
0
]);
positionStaffDto
.
setPositionNameCode
(
certificates
[
1
]);
code
=
certificates
[
1
];
}
else
{
continue
;
}
if
(
positionStaffDto
.
getCompany
()!=
null
){
String
[]
certificates
=
positionStaffDto
.
getCompany
().
split
(
"@"
);
positionStaffDto
.
setCompany
(
certificates
[
0
]);
positionStaffDto
.
setCompanyId
(
Long
.
parseLong
(
certificates
[
1
]));
// 获取特岗人员已经存在的岗位 如果存在则不导入
LambdaQueryWrapper
<
SpecialPositionStaff
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SpecialPositionStaff:
:
getCompanyId
,
Long
.
parseLong
(
certificates
[
1
])).
eq
(
SpecialPositionStaff:
:
getIsDelete
,
false
);
List
<
SpecialPositionStaff
>
tempList
=
specialPositionStaffServiceImpl
.
list
(
queryWrapper
);
for
(
SpecialPositionStaff
temp
:
tempList
)
{
if
(
temp
.
getPositionNameCode
().
equals
(
code
))
{
continue
outer
;
// 已经存在则不导入继续循环
}
}
}
else
{
continue
;
}
specialPositionStaffServiceImpl
.
createWithModel
(
positionStaffDto
);
}
}
}
private
void
excelImportLinkageUnitJYZBDto
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
RescueEquipmentDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
RescueEquipmentDto
.
class
,
1
);
if
(
excelDtoList
!=
null
&&
excelDtoList
.
size
()>
0
){
outer
:
for
(
RescueEquipmentDto
rescueEquipmentDto
:
excelDtoList
)
{
String
code
=
""
;
if
(
rescueEquipmentDto
.
getVehicleType
()!=
null
){
String
[]
certificates
=
rescueEquipmentDto
.
getVehicleType
().
split
(
"@"
);
rescueEquipmentDto
.
setVehicleType
(
certificates
[
0
]);
rescueEquipmentDto
.
setVehicleTypeCode
(
certificates
[
1
]);
code
=
certificates
[
1
];
}
else
{
continue
;
}
if
(
rescueEquipmentDto
.
getCompany
()!=
null
){
String
[]
certificates
=
rescueEquipmentDto
.
getCompany
().
split
(
"@"
);
rescueEquipmentDto
.
setCompany
(
certificates
[
0
]);
rescueEquipmentDto
.
setCompanyId
(
Long
.
parseLong
(
certificates
[
1
]));
// 获取救援装备已经存在的装备 如果存在则不导入
LambdaQueryWrapper
<
RescueEquipment
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
RescueEquipment:
:
getCompanyId
,
Long
.
parseLong
(
certificates
[
1
])).
eq
(
RescueEquipment:
:
getIsDelete
,
false
);
List
<
RescueEquipment
>
tempList
=
rescueEquipmentServiceImpl
.
list
(
queryWrapper
);
for
(
RescueEquipment
temp
:
tempList
)
{
if
(
temp
.
getVehicleTypeCode
().
equals
(
code
))
{
continue
outer
;
// 已经存在则不导入继续循环
}
}
}
else
{
continue
;
}
rescueEquipmentServiceImpl
.
createWithModel
(
rescueEquipmentDto
);
}
}
}
private
void
excelImportLinkageUnitZhDto
(
MultipartFile
multipartFile
)
throws
Exception
{
private
void
excelImportLinkageUnitZhDto
(
MultipartFile
multipartFile
)
throws
Exception
{
...
...
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