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
64ee542e
Commit
64ee542e
authored
Dec 23, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):八大类历史设备导入-电梯
parent
7fc3abf0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2090 additions
and
61 deletions
+2090
-61
DictParamsConverter.java
...mos/boot/module/jg/api/converter/DictParamsConverter.java
+109
-0
EquCategoryConverter.java
...os/boot/module/jg/api/converter/EquCategoryConverter.java
+83
-0
EquDefineConverter.java
...amos/boot/module/jg/api/converter/EquDefineConverter.java
+111
-0
EquListConverter.java
...n/amos/boot/module/jg/api/converter/EquListConverter.java
+52
-0
EquipInfoExcelDto.java
...eejoin/amos/boot/module/jg/api/dto/EquipInfoExcelDto.java
+1021
-0
DataDockController.java
...mos/boot/module/jg/biz/controller/DataDockController.java
+25
-5
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+682
-56
IdxBizJgUseInfo.java
...join/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
+7
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/converter/DictParamsConverter.java
0 → 100644
View file @
64ee542e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
DictParamsConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
dictMap
=
new
HashMap
<>();
static
{
// 填充映射关系
dictMap
.
put
(
"油"
,
"5961"
);
dictMap
.
put
(
"电"
,
"5962"
);
dictMap
.
put
(
"煤"
,
"5963"
);
dictMap
.
put
(
"水煤浆"
,
"5964"
);
dictMap
.
put
(
"生物质"
,
"5965"
);
dictMap
.
put
(
"余热"
,
"5966"
);
dictMap
.
put
(
"其他"
,
"5967"
);
dictMap
.
put
(
"射线"
,
"5969"
);
dictMap
.
put
(
"超声"
,
"5970"
);
dictMap
.
put
(
"磁粉"
,
"5971"
);
dictMap
.
put
(
"渗透"
,
"5972"
);
dictMap
.
put
(
"固定式"
,
"5990"
);
dictMap
.
put
(
"半挂式"
,
"5991"
);
dictMap
.
put
(
"公用管道"
,
"5992"
);
dictMap
.
put
(
"工业管道"
,
"5993"
);
dictMap
.
put
(
"锅筒(锅壳)"
,
"6005"
);
dictMap
.
put
(
"过热器出口集箱"
,
"6006"
);
dictMap
.
put
(
"启动分离器"
,
"6007"
);
dictMap
.
put
(
"长输管道"
,
"5994"
);
dictMap
.
put
(
"磁粉"
,
"5988"
);
dictMap
.
put
(
"射线"
,
"5986"
);
dictMap
.
put
(
"超声"
,
"5987"
);
dictMap
.
put
(
"渗透"
,
"5989"
);
dictMap
.
put
(
"A1"
,
"6094"
);
dictMap
.
put
(
"A2"
,
"6095"
);
dictMap
.
put
(
"A7"
,
"6100"
);
dictMap
.
put
(
"A8"
,
"6101"
);
dictMap
.
put
(
"A3"
,
"6096"
);
dictMap
.
put
(
"A4"
,
"6097"
);
dictMap
.
put
(
"A5"
,
"6098"
);
dictMap
.
put
(
"A6"
,
"6099"
);
dictMap
.
put
(
"牵引索"
,
"6167"
);
dictMap
.
put
(
"平衡索"
,
"6168"
);
dictMap
.
put
(
"Ⅰ类"
,
"1"
);
dictMap
.
put
(
"Ⅱ类"
,
"2"
);
dictMap
.
put
(
"Ⅲ类"
,
"3"
);
dictMap
.
put
(
"ⅢA类"
,
"4"
);
dictMap
.
put
(
"ⅢB类"
,
"5"
);
dictMap
.
put
(
"ⅢC类"
,
"6"
);
dictMap
.
put
(
"M1"
,
"6531"
);
dictMap
.
put
(
"M2"
,
"6532"
);
dictMap
.
put
(
"M3"
,
"6533"
);
dictMap
.
put
(
"M4"
,
"6534"
);
dictMap
.
put
(
"M5"
,
"6535"
);
dictMap
.
put
(
"M6"
,
"6536"
);
dictMap
.
put
(
"M7"
,
"6537"
);
dictMap
.
put
(
"M8"
,
"6538"
);
dictMap
.
put
(
"M9"
,
"6539"
);
dictMap
.
put
(
"M10"
,
"6540"
);
dictMap
.
put
(
"A级"
,
"5957"
);
dictMap
.
put
(
"B级"
,
"5958"
);
dictMap
.
put
(
"C级"
,
"5959"
);
dictMap
.
put
(
"D级"
,
"5960"
);
dictMap
.
put
(
"GC1"
,
"6002"
);
dictMap
.
put
(
"GC2"
,
"6003"
);
dictMap
.
put
(
"GC3"
,
"6004"
);
dictMap
.
put
(
"压缩天然气"
,
"COMPRESSED_NATURAL_GAS"
);
dictMap
.
put
(
"液化天然气"
,
"LIQUEFIED_NATURAL_GAS"
);
dictMap
.
put
(
"液化石油气"
,
"LIQUEFIED_PETROLEUM_GAS"
);
dictMap
.
put
(
"氢气"
,
"HYDROGEN"
);
}
@Override
public
Class
<?>
supportJavaTypeKey
()
{
// 实体类中对象属性类型
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
{
// 从Cell中读取数据
String
cellValue
=
cellData
.
getStringValue
();
// 判断Excel中的值,将其转换为预期的数值
return
dictMap
.
getOrDefault
(
cellValue
,
null
);
}
@Override
public
CellData
convertToExcelData
(
String
o
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
new
CellData
(
""
);
}
public
static
void
main
(
String
[]
args
)
{
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/converter/EquCategoryConverter.java
0 → 100644
View file @
64ee542e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
EquCategoryConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
equipmentMap
=
new
HashMap
<>();
static
{
// 填充映射关系
equipmentMap
.
put
(
"承压蒸汽锅炉"
,
"1100"
);
equipmentMap
.
put
(
"承压热水锅炉"
,
"1200"
);
equipmentMap
.
put
(
"有机热载体锅炉"
,
"1300"
);
equipmentMap
.
put
(
"移动式压力容器"
,
"2200"
);
equipmentMap
.
put
(
"气瓶"
,
"2300"
);
equipmentMap
.
put
(
"氧舱"
,
"2400"
);
equipmentMap
.
put
(
"桥式起重机"
,
"4100"
);
equipmentMap
.
put
(
"门式起重机"
,
"4200"
);
equipmentMap
.
put
(
"塔式起重机"
,
"4300"
);
equipmentMap
.
put
(
"流动式起重机"
,
"4400"
);
equipmentMap
.
put
(
"门座式起重机"
,
"4700"
);
equipmentMap
.
put
(
"升降机"
,
"4800"
);
equipmentMap
.
put
(
"缆索式起重机"
,
"4900"
);
equipmentMap
.
put
(
"桅杆式起重机"
,
"4A00"
);
equipmentMap
.
put
(
"机械式停车设备"
,
"4D00"
);
equipmentMap
.
put
(
"机动工业车辆"
,
"5100"
);
equipmentMap
.
put
(
"非公路用旅游观光车辆"
,
"5200"
);
equipmentMap
.
put
(
"观览车类"
,
"6100"
);
equipmentMap
.
put
(
"滑行车类"
,
"6200"
);
equipmentMap
.
put
(
"固定式压力容器"
,
"2100"
);
equipmentMap
.
put
(
"架空游览车类"
,
"6300"
);
equipmentMap
.
put
(
"陀螺类"
,
"6400"
);
equipmentMap
.
put
(
"飞行塔类"
,
"6500"
);
equipmentMap
.
put
(
"转马类"
,
"6600"
);
equipmentMap
.
put
(
"自控飞机类"
,
"6700"
);
equipmentMap
.
put
(
"赛车类"
,
"6800"
);
equipmentMap
.
put
(
"小火车类"
,
"6900"
);
equipmentMap
.
put
(
"碰碰车类"
,
"6A00"
);
equipmentMap
.
put
(
"滑道类"
,
"6B00"
);
equipmentMap
.
put
(
"无动力游乐设施"
,
"6E00"
);
equipmentMap
.
put
(
"工业管道"
,
"8300"
);
equipmentMap
.
put
(
"客运架空索道"
,
"9100"
);
equipmentMap
.
put
(
"客运缆车"
,
"9200"
);
equipmentMap
.
put
(
"客运拖牵索道"
,
"9300"
);
equipmentMap
.
put
(
"水上游乐设施类"
,
"6D00"
);
equipmentMap
.
put
(
"曳引与强制驱动电梯"
,
"3100"
);
equipmentMap
.
put
(
"液压驱动电梯"
,
"3200"
);
equipmentMap
.
put
(
"自动扶梯与自动人行道"
,
"3300"
);
equipmentMap
.
put
(
"其它类型电梯"
,
"3400"
);
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
{
// 从Cell中读取数据
String
cellValue
=
cellData
.
getStringValue
();
// 判断Excel中的值,将其转换为预期的数值
return
equipmentMap
.
getOrDefault
(
cellValue
,
null
);
}
@Override
public
Class
<?>
supportJavaTypeKey
()
{
// 实体类中对象属性类型
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
CellData
convertToExcelData
(
String
o
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
new
CellData
(
""
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/converter/EquDefineConverter.java
0 → 100644
View file @
64ee542e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
EquDefineConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
equipmentMap
=
new
HashMap
<>();
static
{
// 填充映射关系
equipmentMap
.
put
(
"有机热载体气相炉"
,
"1310"
);
equipmentMap
.
put
(
"有机热载体液相炉"
,
"1320"
);
equipmentMap
.
put
(
"超高压容器"
,
"2110"
);
equipmentMap
.
put
(
"第三类压力容器"
,
"2130"
);
equipmentMap
.
put
(
"第二类压力容器"
,
"2150"
);
equipmentMap
.
put
(
"第一类压力容器"
,
"2170"
);
equipmentMap
.
put
(
"铁路罐车"
,
"2210"
);
equipmentMap
.
put
(
"汽车罐车"
,
"2220"
);
equipmentMap
.
put
(
"长管拖车"
,
"2230"
);
equipmentMap
.
put
(
"罐式集装箱"
,
"2240"
);
equipmentMap
.
put
(
"管束式集装箱"
,
"2250"
);
equipmentMap
.
put
(
"无缝气瓶"
,
"2310"
);
equipmentMap
.
put
(
"焊接气瓶"
,
"2320"
);
equipmentMap
.
put
(
"特种气瓶(内装填料气瓶、纤维缠绕气瓶、低温绝热气瓶)"
,
"23T0"
);
equipmentMap
.
put
(
"医用氧舱"
,
"2410"
);
equipmentMap
.
put
(
"高气压舱"
,
"2420"
);
equipmentMap
.
put
(
"通用桥式起重机"
,
"4110"
);
equipmentMap
.
put
(
"防爆桥式起重机"
,
"4130"
);
equipmentMap
.
put
(
"绝缘桥式起重机"
,
"4140"
);
equipmentMap
.
put
(
"冶金桥式起重机"
,
"4150"
);
equipmentMap
.
put
(
"电动葫芦桥式起重机"
,
"4190"
);
equipmentMap
.
put
(
"通用门式起重机"
,
"4210"
);
equipmentMap
.
put
(
"防爆门式起重机"
,
"4220"
);
equipmentMap
.
put
(
"轨道式集装箱门式起重机"
,
"4230"
);
equipmentMap
.
put
(
"轮胎式集装箱门式起重机"
,
"4240"
);
equipmentMap
.
put
(
"岸边集装箱起重机"
,
"4250"
);
equipmentMap
.
put
(
"造船门式起重机"
,
"4260"
);
equipmentMap
.
put
(
"电动葫芦门式起重机"
,
"4270"
);
equipmentMap
.
put
(
"装卸桥"
,
"4280"
);
equipmentMap
.
put
(
"架桥机"
,
"4290"
);
equipmentMap
.
put
(
"普通塔式起重机"
,
"4310"
);
equipmentMap
.
put
(
"电站塔式起重机"
,
"4320"
);
equipmentMap
.
put
(
"轮胎起重机"
,
"4410"
);
equipmentMap
.
put
(
"履带起重机"
,
"4420"
);
equipmentMap
.
put
(
"集装箱正面吊运起重机"
,
"4440"
);
equipmentMap
.
put
(
"铁路起重机"
,
"4450"
);
equipmentMap
.
put
(
"门座起重机"
,
"4710"
);
equipmentMap
.
put
(
"固定式起重机"
,
"4760"
);
equipmentMap
.
put
(
"施工升降机"
,
"4860"
);
equipmentMap
.
put
(
"简易升降机"
,
"4870"
);
equipmentMap
.
put
(
"叉车"
,
"5110"
);
equipmentMap
.
put
(
"峡谷漂流系列"
,
"6D10"
);
equipmentMap
.
put
(
"水滑梯系列"
,
"6D20"
);
equipmentMap
.
put
(
"碰碰船系列"
,
"6D40"
);
equipmentMap
.
put
(
"蹦极系列"
,
"6E10"
);
equipmentMap
.
put
(
"滑索系列"
,
"6E20"
);
equipmentMap
.
put
(
"空中飞人系列"
,
"6E30"
);
equipmentMap
.
put
(
"系留式观光气球系列"
,
"6E40"
);
equipmentMap
.
put
(
"工艺管道"
,
"8310"
);
equipmentMap
.
put
(
"动力管道"
,
"8320"
);
equipmentMap
.
put
(
"制冷管道"
,
"8330"
);
equipmentMap
.
put
(
"往复式客运架空索道"
,
"9110"
);
equipmentMap
.
put
(
"循环式客运架空索道"
,
"9120"
);
equipmentMap
.
put
(
"往复式客运缆车"
,
"9210"
);
equipmentMap
.
put
(
"循环式客运缆车"
,
"9220"
);
equipmentMap
.
put
(
"低位客运拖牵索道"
,
"9310"
);
equipmentMap
.
put
(
"高位客运拖牵索道"
,
"9320"
);
equipmentMap
.
put
(
"电动单梁起重机"
,
"4170"
);
equipmentMap
.
put
(
"曳引驱动乘客电梯"
,
"3110"
);
equipmentMap
.
put
(
"曳引驱动载货电梯"
,
"3120"
);
equipmentMap
.
put
(
"强制驱动载货电梯"
,
"3130"
);
equipmentMap
.
put
(
"液压乘客电梯"
,
"3210"
);
equipmentMap
.
put
(
"液压载货电梯"
,
"3220"
);
equipmentMap
.
put
(
"自动扶梯"
,
"3310"
);
equipmentMap
.
put
(
"自动人行道"
,
"3320"
);
equipmentMap
.
put
(
"防爆电梯"
,
"3410"
);
equipmentMap
.
put
(
"消防员电梯"
,
"3420"
);
equipmentMap
.
put
(
"杂物电梯"
,
"3430"
);
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
{
// 从Cell中读取数据
String
cellValue
=
cellData
.
getStringValue
();
// 判断Excel中的值,将其转换为预期的数值
return
equipmentMap
.
getOrDefault
(
cellValue
,
null
);
}
@Override
public
Class
<?>
supportJavaTypeKey
()
{
// 实体类中对象属性类型
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
CellData
convertToExcelData
(
String
o
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
new
CellData
(
""
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/converter/EquListConverter.java
0 → 100644
View file @
64ee542e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
EquListConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
equipmentMap
=
new
HashMap
<>();
static
{
// 填充映射关系
equipmentMap
.
put
(
"起重机械"
,
"4000"
);
equipmentMap
.
put
(
"场内机动车辆"
,
"5000"
);
equipmentMap
.
put
(
"锅炉"
,
"1000"
);
equipmentMap
.
put
(
"压力容器"
,
"2000"
);
equipmentMap
.
put
(
"压力管道"
,
"8000"
);
equipmentMap
.
put
(
"大型游乐设施"
,
"6000"
);
equipmentMap
.
put
(
"客运索道"
,
"9000"
);
equipmentMap
.
put
(
"电梯"
,
"3000"
);
}
@Override
public
Class
<?>
supportJavaTypeKey
()
{
// 实体类中对象属性类型
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
{
// 从Cell中读取数据
String
cellValue
=
cellData
.
getStringValue
();
// 判断Excel中的值,将其转换为预期的数值
return
equipmentMap
.
getOrDefault
(
cellValue
,
null
);
}
@Override
public
CellData
convertToExcelData
(
String
o
,
ExcelContentProperty
excelContentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
new
CellData
(
""
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/EquipInfoExcelDto.java
0 → 100644
View file @
64ee542e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.jg.api.converter.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"西安数据对接-设备信息"
,
description
=
"西安数据对接-设备信息"
)
public
class
EquipInfoExcelDto
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
//----------------------------------------------------------------------基本信息
@ApiModelProperty
(
value
=
"设备种类"
)
@ExcelProperty
(
value
=
"设备种类"
,
converter
=
EquListConverter
.
class
)
@NotBlank
(
message
=
"设备种类不能为空"
)
private
String
equList
;
@ApiModelProperty
(
value
=
"设备类别"
)
@ExcelProperty
(
value
=
"设备类别"
,
converter
=
EquCategoryConverter
.
class
)
@NotBlank
(
message
=
"设备类别不能为空"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"设备品种"
)
@ExcelProperty
(
value
=
"设备品种"
,
converter
=
EquDefineConverter
.
class
)
private
String
equDefine
;
@ApiModelProperty
(
value
=
"单位内编号"
)
@ExcelProperty
(
value
=
"单位内编号"
)
@NotBlank
(
message
=
"单位内编号不能为空"
)
private
String
useInnerCode
;
@ApiModelProperty
(
value
=
"产品名称"
)
@ExcelProperty
(
value
=
"产品名称"
)
@NotBlank
(
message
=
"产品名称不能为空"
)
private
String
productName
;
@ApiModelProperty
(
value
=
"设备型号"
)
@ExcelProperty
(
value
=
"设备型号"
)
@NotBlank
(
message
=
"设备型号不能为空"
)
private
String
equType
;
@ApiModelProperty
(
value
=
"设备总价值(万元)"
)
@ExcelProperty
(
value
=
"设备总价值(万元)"
)
private
String
equPrice
;
@ApiModelProperty
(
value
=
"有无设备代码"
)
@ExcelProperty
(
value
=
"有无设备代码"
,
converter
=
EquCodeTypeConverter
.
class
)
@NotBlank
(
message
=
"有无设备代码不能为空"
)
private
String
equCodeType
;
@ApiModelProperty
(
value
=
"设备代码"
)
@ExcelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
@ApiModelProperty
(
value
=
"工程(装置)名称"
)
@ExcelProperty
(
value
=
"工程(装置)名称"
)
private
String
projectContraption
;
@ApiModelProperty
(
value
=
"是否球罐"
)
@ExcelProperty
(
value
=
"是否球罐"
,
converter
=
VehicleCylinderConverter
.
class
)
private
String
whetherSphericalTank
;
@ApiModelProperty
(
value
=
"是否撬装式压力容器"
)
@ExcelProperty
(
value
=
"是否撬装式压力容器"
)
private
String
whetherSkidMountedPressureVessel
;
@ApiModelProperty
(
value
=
"是否车用气瓶"
)
@ExcelProperty
(
value
=
"是否车用气瓶"
,
converter
=
VehicleCylinderConverter
.
class
)
@NotBlank
(
message
=
"是否车用气瓶不能为空"
)
private
String
whetherVehicleCylinder
;
@ApiModelProperty
(
value
=
"信息化管理情况"
)
@ExcelProperty
(
value
=
"信息化管理情况"
,
converter
=
InformationSituationConverter
.
class
)
private
String
informationSituation
;
@ApiModelProperty
(
value
=
"二维码或者电子标签编号"
)
@ExcelProperty
(
value
=
"二维码或者电子标签编号"
)
private
String
informationManageCode
;
@ApiModelProperty
(
value
=
"使用登记证编号"
)
@ExcelProperty
(
value
=
"使用登记证编号"
)
private
String
useOrgCode
;
//-----------------------------------------------------------------------使用信息
@ApiModelProperty
(
value
=
"使用单位统一社会信用代码"
)
@ExcelProperty
(
value
=
"使用单位统一社会信用代码"
)
@NotBlank
(
message
=
"使用单位统一社会信用代码不能为空"
)
private
String
useUnitCode
;
@ApiModelProperty
(
value
=
"使用单位名称"
)
@ExcelProperty
(
value
=
"使用单位名称"
)
@NotBlank
(
message
=
"使用单位名称不能为空"
)
private
String
useUnit
;
//-----------------------------------------------------------------------设计信息
@ApiModelProperty
(
value
=
"设计单位统一社会信用代码"
)
@ExcelProperty
(
value
=
"设计单位统一社会信用代码"
)
@NotBlank
(
message
=
"设计单位统一社会信用代码不能为空"
)
private
String
designUnitCreditCode
;
@ApiModelProperty
(
value
=
"设计单位名称"
)
@ExcelProperty
(
value
=
"设计单位名称"
)
@NotBlank
(
message
=
"设计单位名称不能为空"
)
private
String
designUnitName
;
@ApiModelProperty
(
value
=
"设计许可编号"
)
@ExcelProperty
(
value
=
"设计许可编号"
)
private
String
designLicenseNum
;
@ApiModelProperty
(
value
=
"设计使用年限(年)"
)
@ExcelProperty
(
value
=
"设计使用年限(年)"
)
@NotBlank
(
message
=
"设计使用年限(年)不能为空"
)
private
String
designUseDate
;
@ApiModelProperty
(
value
=
"设计日期"
)
@ExcelProperty
(
value
=
"设计日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
@NotBlank
(
message
=
"设计日期不能为空"
)
private
String
designDate
;
@ApiModelProperty
(
value
=
"总图图号"
)
@ExcelProperty
(
value
=
"总图图号"
)
private
String
drawingDo
;
@ApiModelProperty
(
value
=
"设计文件鉴定单位"
)
@ExcelProperty
(
value
=
"设计文件鉴定单位"
)
private
String
appraisalUnit
;
@ApiModelProperty
(
value
=
"设计文件鉴定日期"
)
@ExcelProperty
(
value
=
"设计文件鉴定日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
appraisalDate
;
//---------------------------------------------------------------制造信息
@ApiModelProperty
(
value
=
"制造单位统一社会信用代码"
)
@ExcelProperty
(
value
=
"制造单位统一社会信用代码"
)
@NotBlank
(
message
=
"制造单位统一社会信用代码不能为空"
)
private
String
produceUnitCreditCode
;
@ApiModelProperty
(
value
=
"制造单位名称"
)
@ExcelProperty
(
value
=
"制造单位名称"
)
@NotBlank
(
message
=
"制造单位名称不能为空"
)
private
String
produceUnitName
;
@ApiModelProperty
(
value
=
"制造许可编号"
)
@ExcelProperty
(
value
=
"制造许可编号"
)
@NotBlank
(
message
=
"制造许可编号不能为空"
)
private
String
produceLicenseNum
;
@ApiModelProperty
(
value
=
"出厂编号/产品编码"
)
@ExcelProperty
(
value
=
"出厂编号/产品编码"
)
@NotBlank
(
message
=
"出厂编号/产品编码不能为空"
)
private
String
factoryNum
;
@ApiModelProperty
(
value
=
"制造日期"
)
@ExcelProperty
(
value
=
"制造日期"
)
@NotBlank
(
message
=
"制造日期不能为空"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
produceDate
;
@ApiModelProperty
(
value
=
"是否进口"
)
@ExcelProperty
(
value
=
"是否进口"
,
converter
=
ImportedConverter
.
class
)
private
String
imported
;
@ApiModelProperty
(
value
=
"制造国"
)
@ExcelProperty
(
value
=
"制造国"
)
private
String
produceCountry
;
//--------------------------------------------------------起重机械----技术参数
@ExcelProperty
(
value
=
"额定起重量(t)"
)
@ApiModelProperty
(
value
=
"额定起重量(t)"
)
private
String
ratedLiftingCapacity
;
@ExcelProperty
(
value
=
"悬臂长度(m)"
)
@ApiModelProperty
(
value
=
"悬臂长度(m)"
)
private
String
cantileverLength
;
@ExcelProperty
(
value
=
"起升速度(m/min)"
)
@ApiModelProperty
(
value
=
"起升速度(m/min)"
)
private
String
liftingSpeed
;
@ExcelProperty
(
value
=
"大车运行速度(m/min)"
)
@ApiModelProperty
(
value
=
"大车运行速度(m/min)"
)
private
String
bigcarRunSpeed
;
@ExcelProperty
(
value
=
"起升高度(m)"
)
@ApiModelProperty
(
value
=
"起升高度(m)"
)
private
String
liftingHeight
;
@ExcelProperty
(
value
=
"工作级别"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"工作级别"
)
private
String
workLevel
;
@ExcelProperty
(
value
=
"燃爆物质"
)
@ApiModelProperty
(
value
=
"燃爆物质"
)
private
String
explosiveSubstance
;
@ExcelProperty
(
value
=
"区域防爆等级"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"区域防爆等级"
)
private
String
explosionProofGrade
;
@ExcelProperty
(
value
=
"小车运行速度(m/min)"
)
@ApiModelProperty
(
value
=
"小车运行速度(m/min)"
)
private
String
smallcarrunSpeed
;
@ExcelProperty
(
value
=
"额定起重力矩(KN.m)"
)
@ApiModelProperty
(
value
=
"额定起重力矩(KN.m)"
)
private
String
ratedLiftingTorque
;
@ExcelProperty
(
value
=
"工作幅度(m)"
)
@ApiModelProperty
(
value
=
"工作幅度(m)"
)
private
String
spanWorkingRange
;
// @ExcelProperty(value = "跨度(m)")
// @ApiModelProperty(value = "跨度(m)")
// private String spanWorkingRange;
@ExcelProperty
(
value
=
"变幅速度(m/min)"
)
@ApiModelProperty
(
value
=
"变幅速度(m/min)"
)
private
String
derrickingSpeed
;
@ExcelProperty
(
value
=
"监检结束高度(m)"
)
@ApiModelProperty
(
value
=
"监检结束高度(m)"
)
private
String
checkFinshedHeight
;
@ExcelProperty
(
value
=
"最大起重量(t)"
)
@ApiModelProperty
(
value
=
"最大起重量(t)"
)
private
String
maxLiftingCapacity
;
@ExcelProperty
(
value
=
"最大起重力矩(KN.m)"
)
@ApiModelProperty
(
value
=
"最大起重力矩(KN.m)"
)
private
String
maxLiftingTorque
;
@ExcelProperty
(
value
=
"运行速度(m/min)"
)
@ApiModelProperty
(
value
=
"运行速度(m/min)"
)
private
String
runningSpeed
;
@ExcelProperty
(
value
=
"额定载重量(Kg)"
)
@ApiModelProperty
(
value
=
"额定载重量(Kg)"
)
private
String
ratedLoadCapacity
;
@ExcelProperty
(
value
=
"额定乘员数(人)"
)
@ApiModelProperty
(
value
=
"额定乘员数(人)"
)
private
String
ratedMembers
;
@ExcelProperty
(
value
=
"额定提升速度(m/min)"
)
@ApiModelProperty
(
value
=
"额定提升速度(m/min)"
)
private
String
ratedLiftingSpeed
;
@ExcelProperty
(
value
=
"自由端高度(m)"
)
@ApiModelProperty
(
value
=
"自由端高度(m)"
)
private
String
heightFreeEnd
;
@ExcelProperty
(
value
=
"监检结束时高度(m)"
)
@ApiModelProperty
(
value
=
"监检结束时高度(m)"
)
private
String
checkFinishedHeight
;
@ExcelProperty
(
value
=
"吊笼数量(个)"
)
@ApiModelProperty
(
value
=
"吊笼数量(个)"
)
private
String
hangingCagesNumber
;
@ExcelProperty
(
value
=
"存容量(辆)"
)
@ApiModelProperty
(
value
=
"存容量(辆)"
)
private
String
storageCapacity
;
@ExcelProperty
(
value
=
"层数(层)"
)
@ApiModelProperty
(
value
=
"层数(层)"
)
private
String
numberStorey
;
@ExcelProperty
(
value
=
"横移速度(m/min)"
)
@ApiModelProperty
(
value
=
"横移速度(m/min)"
)
private
String
ratedTraverseSpeed
;
@ExcelProperty
(
value
=
"适停车辆尺寸(宽)(m)"
)
@ApiModelProperty
(
value
=
"适停车辆尺寸(宽)(m)"
)
private
String
parkingVehicleWeight
;
@ExcelProperty
(
value
=
"升降速度(m/min)"
)
@ApiModelProperty
(
value
=
"升降速度(m/min)"
)
private
String
ratedLiftSpeed
;
@ExcelProperty
(
value
=
"单车最大(出)时间(s)"
)
@ApiModelProperty
(
value
=
"单车最大(出)时间(s)"
)
private
String
bicycleMaxExitTime
;
@ExcelProperty
(
value
=
"单车最大(进)时间(s)"
)
@ApiModelProperty
(
value
=
"单车最大(进)时间(s)"
)
private
String
bicycleMaxComeTime
;
@ExcelProperty
(
value
=
"适停车辆尺寸(长)(m)"
)
@ApiModelProperty
(
value
=
"适停车辆尺寸(长)(m)"
)
private
String
parkingVehicleLength
;
@ExcelProperty
(
value
=
"适停车辆尺寸(高)(m)"
)
@ApiModelProperty
(
value
=
"适停车辆尺寸(高)(m)"
)
private
String
parkingVehicleHeight
;
@ExcelProperty
(
value
=
"吊笼工作行程(m)"
)
@ApiModelProperty
(
value
=
"吊笼工作行程(m)"
)
private
String
workStrokeCage
;
//--------------------------------------------------------------场内机动车辆----技术参数
@ExcelProperty
(
value
=
"发动机(行走电机)编号"
)
@ApiModelProperty
(
value
=
"发动机(行走电机)编号"
)
private
String
engineNo
;
@ExcelProperty
(
value
=
"车架(底盘)编号"
)
@ApiModelProperty
(
value
=
"车架(底盘)编号"
)
private
String
frameNo
;
@ExcelProperty
(
value
=
"额定起重量(Kg)"
)
@ApiModelProperty
(
value
=
"额定起重量(Kg)"
)
private
String
liftingCapacity
;
@ExcelProperty
(
value
=
"传动方式"
)
@ApiModelProperty
(
value
=
"传动方式"
)
private
String
transmissionMode
;
@ExcelProperty
(
value
=
"自重(Kg)"
)
@ApiModelProperty
(
value
=
"自重(Kg)"
)
private
String
weight
;
@ExcelProperty
(
value
=
"动力方式"
)
@ApiModelProperty
(
value
=
"动力方式"
)
private
String
powerMode
;
@ExcelProperty
(
value
=
"最大运行速度(km/h)"
)
@ApiModelProperty
(
value
=
"最大运行速度(km/h)"
)
private
String
maxRunningSpeed
;
@ExcelProperty
(
value
=
"空载最大起升高度(mm)"
)
@ApiModelProperty
(
value
=
"空载最大起升高度(mm)"
)
private
String
maxLiftingHeight
;
@ExcelProperty
(
value
=
"防爆气体/粉尘组别"
)
@ApiModelProperty
(
value
=
"防爆气体/粉尘组别"
)
private
String
gasGroup
;
@ExcelProperty
(
value
=
"车架结构"
)
@ApiModelProperty
(
value
=
"车架结构"
)
private
String
frameStructure
;
@ExcelProperty
(
value
=
"驾驶方式"
)
@ApiModelProperty
(
value
=
"驾驶方式"
)
private
String
drivingMode
;
@ExcelProperty
(
value
=
"空载最大运行速度(km/h)"
)
@ApiModelProperty
(
value
=
"空载最大运行速度(km/h)"
)
private
String
carryingIdlerMaxRunningSpeed
;
@ExcelProperty
(
value
=
"防爆温度组别"
)
@ApiModelProperty
(
value
=
"防爆温度组别"
)
private
String
temperatureGroup
;
@ExcelProperty
(
value
=
"防爆设备保护级别"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"防爆设备保护级别"
)
private
String
protectGrade
;
@ExcelProperty
(
value
=
"额定载客人数(人)"
)
@ApiModelProperty
(
value
=
"额定载客人数(人)"
)
private
String
passengersNumber
;
@ExcelProperty
(
value
=
"最大行驶坡度"
)
@ApiModelProperty
(
value
=
"最大行驶坡度"
)
private
String
maxDrivingSlope
;
@ExcelProperty
(
value
=
"轴距(mm)"
)
@ApiModelProperty
(
value
=
"轴距(mm)"
)
private
String
wheelBase
;
@ExcelProperty
(
value
=
"轮距(前)(mm)"
)
@ApiModelProperty
(
value
=
"轮距(前)(mm)"
)
private
String
trackWidthFront
;
@ExcelProperty
(
value
=
"观光列车每节车厢座位数(个)"
)
@ApiModelProperty
(
value
=
"观光列车每节车厢座位数(个)"
)
private
String
seatNumber
;
@ExcelProperty
(
value
=
"整车整备质量(Kg)"
)
@ApiModelProperty
(
value
=
"整车整备质量(Kg)"
)
private
String
vehicleMass
;
@ExcelProperty
(
value
=
"观光列车车厢数(节)"
)
@ApiModelProperty
(
value
=
"观光列车车厢数(节)"
)
private
String
carsNumber
;
@ExcelProperty
(
value
=
"轮距(后)(mm)"
)
@ApiModelProperty
(
value
=
"轮距(后)(mm)"
)
private
String
trackWidthBehind
;
@ExcelProperty
(
value
=
"观光列车牵引车头座位数(个)"
)
@ApiModelProperty
(
value
=
"观光列车牵引车头座位数(个)"
)
private
String
tractorSeatNumber
;
//--------------------------------------------------------------锅炉----技术参数
@ExcelProperty
(
value
=
"设备级别"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"设备级别"
)
private
String
deviceLevel
;
@ExcelProperty
(
value
=
"额定蒸发量(热功率) (t/h(MW))"
)
@ApiModelProperty
(
value
=
"额定蒸发量(热功率) (t/h(MW))"
)
private
String
ratedEvaporationCapacityThermalPower
;
@ExcelProperty
(
value
=
"额定工作压力(MPa)"
)
@ApiModelProperty
(
value
=
"额定工作压力(MPa)"
)
private
String
ratedWorkingPressure
;
@ExcelProperty
(
value
=
"额定工作温度(℃)"
)
@ApiModelProperty
(
value
=
"额定工作温度(℃)"
)
private
String
ratedOperatingTemperature
;
@ExcelProperty
(
value
=
"设计热效率(%)"
)
@ApiModelProperty
(
value
=
"设计热效率(%)"
)
private
String
designThermalEfficiency
;
@ExcelProperty
(
value
=
"给水温度(℃)"
)
@ApiModelProperty
(
value
=
"给水温度(℃)"
)
private
String
feedwaterTemperature
;
@ExcelProperty
(
value
=
"额定出/回水(油)温度(℃)"
)
@ApiModelProperty
(
value
=
"额定出/回水(油)温度(℃)"
)
private
String
ratedOutletReturnWaterOilTemperature
;
@ExcelProperty
(
value
=
"锅炉本体水(油)容积 (L)"
)
@ApiModelProperty
(
value
=
"锅炉本体水(油)容积 (L)"
)
private
String
waterOilVolumeOfBoilerProper
;
@ExcelProperty
(
value
=
"整装锅炉本体液压试验介质/压力 (MPa)"
)
@ApiModelProperty
(
value
=
"整装锅炉本体液压试验介质/压力 (MPa)"
)
private
String
hydraulicTestMediumPressureOfPackagedBoilerBody
;
@ExcelProperty
(
value
=
"再热器进(出)口温度 (℃)"
)
@ApiModelProperty
(
value
=
"再热器进(出)口温度 (℃)"
)
private
String
inletOutletTemperatureOfReheater
;
@ExcelProperty
(
value
=
"再热器进(出)口压力 (MPa)"
)
@ApiModelProperty
(
value
=
"再热器进(出)口压力 (MPa)"
)
private
String
reheaterInletOutletPressure
;
@ExcelProperty
(
value
=
"再热蒸汽流量 (t/h)"
)
@ApiModelProperty
(
value
=
"再热蒸汽流量 (t/h)"
)
private
String
reheatSteamFlow
;
@ExcelProperty
(
value
=
"有机热载体锅炉气密试验介质/压力 (MPa)"
)
@ApiModelProperty
(
value
=
"有机热载体锅炉气密试验介质/压力 (MPa)"
)
private
String
glAirtightTest
;
@ExcelProperty
(
value
=
"燃烧方式"
)
@ApiModelProperty
(
value
=
"燃烧方式"
)
private
String
combustionMode
;
@ExcelProperty
(
value
=
"燃料(热源)种类"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"燃料(热源)种类"
)
private
String
fuelType
;
@ExcelProperty
(
value
=
"主要受压部件-名称"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"主要受压部件-名称"
)
private
String
nameOfPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-材料"
)
@ApiModelProperty
(
value
=
"主要受压部件-材料"
)
private
String
materialOfPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-壁厚(mm)"
)
@ApiModelProperty
(
value
=
"主要受压部件-壁厚(mm)"
)
private
String
wallThicknessOfPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-无损检测方法"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"主要受压部件-无损检测方法"
)
private
String
nonDestructiveTestingMethodsForPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-无损检测比例(%)"
)
@ApiModelProperty
(
value
=
"主要受压部件-无损检测比例(%)"
)
private
String
proportionOfNdtForPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-热处理温度(℃)"
)
@ApiModelProperty
(
value
=
"主要受压部件-热处理温度(℃)"
)
private
String
heatTreatmentTemperatureOfPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-热处理时间(h)"
)
@ApiModelProperty
(
value
=
"主要受压部件-热处理时间(h)"
)
private
String
heatTreatmentTimeOfPressureParts
;
@ExcelProperty
(
value
=
"主要受压部件-水(耐)压试验介质"
)
@ApiModelProperty
(
value
=
"主要受压部件-水(耐)压试验介质"
)
private
String
hydrostaticTestMedium
;
@ExcelProperty
(
value
=
"主要受压部件-水(耐)压试验压力(Mpa)"
)
@ApiModelProperty
(
value
=
"主要受压部件-水(耐)压试验压力(Mpa)"
)
private
String
hydrostaticTestPressure
;
//--------------------------------------------------------------压力容器----技术参数
@ExcelProperty
(
value
=
"额定质量(kg)"
)
@ApiModelProperty
(
value
=
"额定质量(kg)"
)
private
String
ratedQuality
;
@ExcelProperty
(
value
=
"型号"
)
@ApiModelProperty
(
value
=
"型号"
)
private
String
modelNumber
;
@ExcelProperty
(
value
=
"外径"
)
@ApiModelProperty
(
value
=
"外径"
)
private
String
outsideDiameter
;
@ExcelProperty
(
value
=
"材料(管路)"
)
@ApiModelProperty
(
value
=
"材料(管路)"
)
private
String
piping
;
@ExcelProperty
(
value
=
"无损检测比例(管路)(%)"
)
@ApiModelProperty
(
value
=
"无损检测比例(管路)(%)"
)
private
String
glRatio
;
@ExcelProperty
(
value
=
"耐压试验压力(管路)(MPa)"
)
@ApiModelProperty
(
value
=
"耐压试验压力(管路)(MPa)"
)
private
String
glPressure
;
@ExcelProperty
(
value
=
"气密性试验压力(管路)(MPa)"
)
@ApiModelProperty
(
value
=
"气密性试验压力(管路)(MPa)"
)
private
String
glAirTightness
;
@ExcelProperty
(
value
=
"使用环境温度(℃)"
)
@ApiModelProperty
(
value
=
"使用环境温度(℃)"
)
private
String
ambientTemperature
;
@ExcelProperty
(
value
=
"壁厚"
)
@ApiModelProperty
(
value
=
"壁厚"
)
private
String
wallThickness
;
@ExcelProperty
(
value
=
"无损检测方法(气瓶)"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"无损检测方法(气瓶)"
)
private
String
qpLossless
;
@ExcelProperty
(
value
=
"无损检测比例(气瓶)(%)"
)
@ApiModelProperty
(
value
=
"无损检测比例(气瓶)(%)"
)
private
String
qpRatio
;
@ExcelProperty
(
value
=
"气密性试验压力(气瓶)(MPa)"
)
@ApiModelProperty
(
value
=
"气密性试验压力(气瓶)(MPa)"
)
private
String
qpAirTightness
;
@ExcelProperty
(
value
=
"气瓶安装位置"
)
@ApiModelProperty
(
value
=
"气瓶安装位置"
)
private
String
installationPosition
;
@ExcelProperty
(
value
=
"瓶体内含氧量(%)"
)
@ApiModelProperty
(
value
=
"瓶体内含氧量(%)"
)
private
String
oxygen
;
@ExcelProperty
(
value
=
"单瓶容积(L)"
)
@ApiModelProperty
(
value
=
"单瓶容积(L)"
)
private
String
singleBottleVolume
;
@ExcelProperty
(
value
=
"充装介质"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"充装介质"
)
private
String
chargingMedium
;
@ExcelProperty
(
value
=
"长度"
)
@ApiModelProperty
(
value
=
"长度"
)
private
String
length
;
@ExcelProperty
(
value
=
"材料(瓶体)"
)
@ApiModelProperty
(
value
=
"材料(瓶体)"
)
private
String
bottleBody
;
@ExcelProperty
(
value
=
"无损检测方法(管路)"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"无损检测方法(管路)"
)
private
String
glLossless
;
@ExcelProperty
(
value
=
"气体置换后压力(MPa)"
)
@ApiModelProperty
(
value
=
"气体置换后压力(MPa)"
)
private
String
displacementPressure
;
@ExcelProperty
(
value
=
"规格"
)
@ApiModelProperty
(
value
=
"规格"
)
private
String
specification
;
@ExcelProperty
(
value
=
"公称工作压力(MPa)"
)
@ApiModelProperty
(
value
=
"公称工作压力(MPa)"
)
private
String
nominalWorkingPressure
;
@ExcelProperty
(
value
=
"材料(端塞)"
)
@ApiModelProperty
(
value
=
"材料(端塞)"
)
private
String
endPlug
;
@ExcelProperty
(
value
=
"耐压试验压力(气瓶)(MPa)"
)
@ApiModelProperty
(
value
=
"耐压试验压力(气瓶)(MPa)"
)
private
String
qpPressure
;
@ExcelProperty
(
value
=
"热处理方式"
)
@ApiModelProperty
(
value
=
"热处理方式"
)
private
String
heatTreatmentMethod
;
@ExcelProperty
(
value
=
"热处理温度(℃)"
)
@ApiModelProperty
(
value
=
"热处理温度(℃)"
)
private
String
qpHeatTreatmentTemperature
;
@ExcelProperty
(
value
=
"容器容积(m³)"
)
@ApiModelProperty
(
value
=
"容器容积(m³)"
)
private
String
totalVolume
;
@ExcelProperty
(
value
=
"材料(封头)"
)
@ApiModelProperty
(
value
=
"材料(封头)"
)
private
String
pressureMaterialHead
;
@ExcelProperty
(
value
=
"厚度(封头)(mm)"
)
@ApiModelProperty
(
value
=
"厚度(封头)(mm)"
)
private
String
fixedHead
;
@ExcelProperty
(
value
=
"盛装介质重量(kg)"
)
@ApiModelProperty
(
value
=
"盛装介质重量(kg)"
)
private
String
mediumWeight
;
@ExcelProperty
(
value
=
"设计温度(壳程)(℃)"
)
@ApiModelProperty
(
value
=
"设计温度(壳程)(℃)"
)
private
String
temperatureShell
;
@ExcelProperty
(
value
=
"介质(壳程)"
)
@ApiModelProperty
(
value
=
"介质(壳程)"
)
private
String
mediumShell
;
@ExcelProperty
(
value
=
"介质(夹套)"
)
@ApiModelProperty
(
value
=
"介质(夹套)"
)
private
String
mediumJacket
;
@ExcelProperty
(
value
=
"耐压试验种类"
)
@ApiModelProperty
(
value
=
"耐压试验种类"
)
private
String
withstandVoltage
;
@ExcelProperty
(
value
=
"耐压试验压力(MPa)"
)
@ApiModelProperty
(
value
=
"耐压试验压力(MPa)"
)
private
String
withstandPressureTest
;
@ExcelProperty
(
value
=
"容器内径(mm)"
)
@ApiModelProperty
(
value
=
"容器内径(mm)"
)
private
String
pressureVesselDiameter
;
@ExcelProperty
(
value
=
"材料(衬里)"
)
@ApiModelProperty
(
value
=
"材料(衬里)"
)
private
String
pressureMaterialLining
;
@ExcelProperty
(
value
=
"厚度(衬里)(mm)"
)
@ApiModelProperty
(
value
=
"厚度(衬里)(mm)"
)
private
String
fixedLining
;
@ExcelProperty
(
value
=
"设计压力(壳程)"
)
@ApiModelProperty
(
value
=
"设计压力(壳程)"
)
private
String
pressureHousingPath
;
@ExcelProperty
(
value
=
"设计温度(管程)(℃)"
)
@ApiModelProperty
(
value
=
"设计温度(管程)(℃)"
)
private
String
temperaturePipe
;
@ExcelProperty
(
value
=
"介质(管程)"
)
@ApiModelProperty
(
value
=
"介质(管程)"
)
private
String
mediumPipe
;
@ExcelProperty
(
value
=
"安装型式"
)
@ApiModelProperty
(
value
=
"安装型式"
)
private
String
installation
;
@ExcelProperty
(
value
=
"泄漏试验种类"
)
@ApiModelProperty
(
value
=
"泄漏试验种类"
)
private
String
leakage
;
@ExcelProperty
(
value
=
"泄漏试验压力(MPa)"
)
@ApiModelProperty
(
value
=
"泄漏试验压力(MPa)"
)
private
String
leakPressure
;
@ExcelProperty
(
value
=
"容器高(长)(mm)"
)
@ApiModelProperty
(
value
=
"容器高(长)(mm)"
)
private
String
height
;
@ExcelProperty
(
value
=
"材料(夹套)"
)
@ApiModelProperty
(
value
=
"材料(夹套)"
)
private
String
materialJacket
;
@ExcelProperty
(
value
=
"厚度(夹套)(mm)"
)
@ApiModelProperty
(
value
=
"厚度(夹套)(mm)"
)
private
String
fixedJacket
;
@ExcelProperty
(
value
=
"设计压力(管程)"
)
@ApiModelProperty
(
value
=
"设计压力(管程)"
)
private
String
pressurePipe
;
@ExcelProperty
(
value
=
"设计温度(夹套)(℃)"
)
@ApiModelProperty
(
value
=
"设计温度(夹套)(℃)"
)
private
String
temperatureJacket
;
@ExcelProperty
(
value
=
"最高允许工作压力(管程)"
)
@ApiModelProperty
(
value
=
"最高允许工作压力(管程)"
)
private
String
maxPressurePipe
;
@ExcelProperty
(
value
=
"支座型式"
)
@ApiModelProperty
(
value
=
"支座型式"
)
private
String
support
;
@ExcelProperty
(
value
=
"保温绝热方式"
)
@ApiModelProperty
(
value
=
"保温绝热方式"
)
private
String
insulation
;
@ExcelProperty
(
value
=
"材料(筒体(球壳))"
)
@ApiModelProperty
(
value
=
"材料(筒体(球壳))"
)
private
String
materialCylinderShell
;
@ExcelProperty
(
value
=
"厚度(筒体(球壳))(mm)"
)
@ApiModelProperty
(
value
=
"厚度(筒体(球壳))(mm)"
)
private
String
thickness
;
@ExcelProperty
(
value
=
"容器自重(kg)"
)
@ApiModelProperty
(
value
=
"容器自重(kg)"
)
private
String
selfWeight
;
@ExcelProperty
(
value
=
"设计压力(夹套)"
)
@ApiModelProperty
(
value
=
"设计压力(夹套)"
)
private
String
pressureJacket
;
@ExcelProperty
(
value
=
"最高允许工作压力(夹套)"
)
@ApiModelProperty
(
value
=
"最高允许工作压力(夹套)"
)
private
String
maxPressureJacket
;
@ExcelProperty
(
value
=
"最高允许工作压力(壳程)"
)
@ApiModelProperty
(
value
=
"最高允许工作压力(壳程)"
)
private
String
maxPressureShell
;
@ExcelProperty
(
value
=
"主体结构型式"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"主体结构型式"
)
private
String
mainStructureType
;
@ExcelProperty
(
value
=
"无损检测方法"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"无损检测方法"
)
private
String
checkLossless
;
@ExcelProperty
(
value
=
"容器型号"
)
@ApiModelProperty
(
value
=
"容器型号"
)
private
String
container
;
@ExcelProperty
(
value
=
"工作压力(MPa)"
)
@ApiModelProperty
(
value
=
"工作压力(MPa)"
)
private
String
workingPressure
;
@ExcelProperty
(
value
=
"厚度(筒体)(mm)"
)
@ApiModelProperty
(
value
=
"厚度(筒体)(mm)"
)
private
String
thicknessCylinder
;
@ExcelProperty
(
value
=
"罐车编号"
)
@ApiModelProperty
(
value
=
"罐车编号"
)
private
String
carNum
;
@ExcelProperty
(
value
=
"设计温度(℃)"
)
@ApiModelProperty
(
value
=
"设计温度(℃)"
)
private
String
designTemperature
;
@ExcelProperty
(
value
=
"腐蚀裕量(mm)"
)
@ApiModelProperty
(
value
=
"腐蚀裕量(mm)"
)
private
String
corrosionMargin
;
@ExcelProperty
(
value
=
"容积(L)"
)
@ApiModelProperty
(
value
=
"容积(L)"
)
private
String
volume
;
@ExcelProperty
(
value
=
"设计压力"
)
@ApiModelProperty
(
value
=
"设计压力"
)
private
String
designPressure
;
@ExcelProperty
(
value
=
"材料(筒体)"
)
@ApiModelProperty
(
value
=
"材料(筒体)"
)
private
String
materialCylinder
;
@ExcelProperty
(
value
=
"最大充装量(kg)"
)
@ApiModelProperty
(
value
=
"最大充装量(kg)"
)
private
String
maxFill
;
@ExcelProperty
(
value
=
"工作温度(℃)"
)
@ApiModelProperty
(
value
=
"工作温度(℃)"
)
private
String
workTemperature
;
@ExcelProperty
(
value
=
"介质"
)
@ApiModelProperty
(
value
=
"介质"
)
private
String
medium
;
@ExcelProperty
(
value
=
"氧舱品种"
)
@ApiModelProperty
(
value
=
"氧舱品种"
)
private
String
oxygenChamber
;
@ExcelProperty
(
value
=
"温度(℃)"
)
@ApiModelProperty
(
value
=
"温度(℃)"
)
private
String
temperature
;
@ExcelProperty
(
value
=
"额定进舱人数(人)"
)
@ApiModelProperty
(
value
=
"额定进舱人数(人)"
)
private
String
ratedEntryCapacity
;
@ExcelProperty
(
value
=
"压力介质"
)
@ApiModelProperty
(
value
=
"压力介质"
)
private
String
pressureMedium
;
@ExcelProperty
(
value
=
"主体结构"
)
@ApiModelProperty
(
value
=
"主体结构"
)
private
String
chamberMain
;
@ExcelProperty
(
value
=
"人均舱容(m³)"
)
@ApiModelProperty
(
value
=
"人均舱容(m³)"
)
private
String
perCapitaCabinCapacity
;
@ExcelProperty
(
value
=
"压力(MPa)"
)
@ApiModelProperty
(
value
=
"压力(MPa)"
)
private
String
chamberPressure
;
//--------------------------------------------------------------------压力管道----技术参数
@ExcelProperty
(
value
=
"管道类别"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"管道类别"
)
private
String
pipelineClass
;
@ExcelProperty
(
value
=
"公称壁厚(mm)"
)
@ApiModelProperty
(
value
=
"公称壁厚(mm)"
)
private
String
wallThickness_YLGD
;
@ExcelProperty
(
value
=
"公称直径(mm)"
)
@ApiModelProperty
(
value
=
"公称直径(mm)"
)
private
String
nominalDiameter
;
@ExcelProperty
(
value
=
"管道长度(m)"
)
@ApiModelProperty
(
value
=
"管道长度(m)"
)
private
String
pipeLength
;
@ExcelProperty
(
value
=
"压力(MPa)"
)
@ApiModelProperty
(
value
=
"压力(MPa)"
)
private
String
pressure
;
@ExcelProperty
(
value
=
"介质"
)
@ApiModelProperty
(
value
=
"介质"
)
private
String
medium_YLGD
;
@ExcelProperty
(
value
=
"起/始位置 (经纬度)(格式:经度-纬度)"
)
@ApiModelProperty
(
value
=
"起/始位置 (经纬度)(格式:经度-纬度)"
)
private
String
startePosition
;
@ExcelProperty
(
value
=
"温度(℃)"
)
@ApiModelProperty
(
value
=
"温度(℃)"
)
private
String
temperature_YLGD
;
@ExcelProperty
(
value
=
"管道编号"
)
@ApiModelProperty
(
value
=
"管道编号"
)
private
String
pipelineNumber
;
@ExcelProperty
(
value
=
"管道级别"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"管道级别"
)
private
String
deviceLevel_YLGD
;
@ExcelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
//--------------------------------------------------------------大型游乐设施----技术参数
@ExcelProperty
(
value
=
"轨道高度(m)"
)
@ApiModelProperty
(
value
=
"轨道高度(m)"
)
private
String
trackHeight
;
@ExcelProperty
(
value
=
"运行速度(km/h (m/s))"
)
@ApiModelProperty
(
value
=
"运行速度(km/h (m/s))"
)
private
String
runningSpeed_DXYLSS
;
@ExcelProperty
(
value
=
"承载人数/车 (人)"
)
@ApiModelProperty
(
value
=
"承载人数/车 (人)"
)
private
String
numberOfPassengers
;
@ExcelProperty
(
value
=
"滑道长度(m)"
)
@ApiModelProperty
(
value
=
"滑道长度(m)"
)
private
String
slideLength
;
@ExcelProperty
(
value
=
"运行高度(m)"
)
@ApiModelProperty
(
value
=
"运行高度(m)"
)
private
String
operatingHeight
;
@ExcelProperty
(
value
=
"蹦极绳长度(m)"
)
@ApiModelProperty
(
value
=
"蹦极绳长度(m)"
)
private
String
slideLength_DXYLSS
;
// @ExcelProperty(value = "滑索长度(m)")
// @ApiModelProperty(value = "滑索长度(m)")
// private String slideLength_DXYLSS;
@ExcelProperty
(
value
=
"回转直径(m)"
)
@ApiModelProperty
(
value
=
"回转直径(m)"
)
private
String
rotaryDiameter
;
@ExcelProperty
(
value
=
"单侧摆角(°)"
)
@ApiModelProperty
(
value
=
"单侧摆角(°)"
)
private
String
unilateralSwingAngle
;
@ExcelProperty
(
value
=
"车辆数量 (个)"
)
@ApiModelProperty
(
value
=
"车辆数量 (个)"
)
private
String
numberOfVehicles
;
@ExcelProperty
(
value
=
"设备高度(m)"
)
@ApiModelProperty
(
value
=
"设备高度(m)"
)
private
String
equipmentHeight
;
@ExcelProperty
(
value
=
"运行高度(m)"
)
@ApiModelProperty
(
value
=
"运行高度(m)"
)
private
String
operatingHeight_DXYLSS
;
@ExcelProperty
(
value
=
"回转速度(km/h (m/s))"
)
@ApiModelProperty
(
value
=
"回转速度(km/h (m/s))"
)
private
String
slewingSpeed
;
@ExcelProperty
(
value
=
"倾角(°)"
)
@ApiModelProperty
(
value
=
"倾角(°)"
)
private
String
dip
;
//--------------------------------------------------------------------客运索道----技术参数
@ExcelProperty
(
value
=
"平距(m)"
)
@ApiModelProperty
(
value
=
"平距(m)"
)
private
String
horizontalDistance
;
@ExcelProperty
(
value
=
"支架数据(座)"
)
@ApiModelProperty
(
value
=
"支架数据(座)"
)
private
String
supportsCount
;
@ExcelProperty
(
value
=
"斜长(m)"
)
@ApiModelProperty
(
value
=
"斜长(m)"
)
private
String
obliqueLength
;
@ExcelProperty
(
value
=
"主电机型式"
)
@ApiModelProperty
(
value
=
"主电机型式"
)
private
String
mainMotorModel
;
@ExcelProperty
(
value
=
"主电机功率(W)"
)
@ApiModelProperty
(
value
=
"主电机功率(W)"
)
private
String
mainMotorPower
;
@ExcelProperty
(
value
=
"高差(m)"
)
@ApiModelProperty
(
value
=
"高差(m)"
)
private
String
altitudeDifference
;
@ExcelProperty
(
value
=
"运量(p/h)"
)
@ApiModelProperty
(
value
=
"运量(p/h)"
)
private
String
freightVolume
;
@ExcelProperty
(
value
=
"运载索"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"运载索"
)
private
String
carrierLine
;
@ExcelProperty
(
value
=
"速度(m/s)"
)
@ApiModelProperty
(
value
=
"速度(m/s)"
)
private
String
speed
;
@ExcelProperty
(
value
=
"承载索"
)
@ApiModelProperty
(
value
=
"承载索"
)
private
String
bearingCable
;
@ExcelProperty
(
value
=
"索距(m)"
)
@ApiModelProperty
(
value
=
"索距(m)"
)
private
String
cablePitch
;
@ExcelProperty
(
value
=
"张紧油压(重锤重量)(MPa)"
)
@ApiModelProperty
(
value
=
"张紧油压(重锤重量)(MPa)"
)
private
String
oilPressureHeavyHammer
;
@ExcelProperty
(
value
=
"运载工具数量和类型"
)
@ApiModelProperty
(
value
=
"运载工具数量和类型"
)
private
String
numberAndTypeOfVehicles
;
//--------------------------------------------------------------电梯----技术参数
@ExcelProperty
(
value
=
"额定速度(m/s)"
)
@ApiModelProperty
(
value
=
"额定速度(m/s)"
)
private
String
RATED_SPEED
;
@ExcelProperty
(
value
=
"层数(层)"
)
@ApiModelProperty
(
value
=
"层数(层)"
)
private
String
STOREY
;
@ExcelProperty
(
value
=
"额定载重量(kg)"
)
@ApiModelProperty
(
value
=
"额定载重量(kg)"
)
private
String
RATED_LOAD_CAPACITY
;
@ExcelProperty
(
value
=
"站数(站)"
)
@ApiModelProperty
(
value
=
"站数(站)"
)
private
String
STAND
;
@ExcelProperty
(
value
=
"轿门位置"
)
@ApiModelProperty
(
value
=
"轿门位置"
)
private
String
DOOR_POSITION
;
@ExcelProperty
(
value
=
"门数"
)
@ApiModelProperty
(
value
=
"门数"
)
private
String
NUMBER_DOORS
;
@ExcelProperty
(
value
=
"倾斜角"
)
@ApiModelProperty
(
value
=
"倾斜角"
)
private
String
ANGLE_ROLL
;
@ExcelProperty
(
value
=
"控制方式"
,
converter
=
DictParamsConverter
.
class
)
@ApiModelProperty
(
value
=
"控制方式"
)
private
String
CONTROL_MODE
;
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataDockController.java
View file @
64ee542e
...
...
@@ -3,10 +3,9 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.DataDockServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.apache.commons.io.FilenameUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -29,14 +28,35 @@ public class DataDockController {
/**
* 西安数据对接-批量导入设备数据的接口
*
* @param equLists 设备数据集合
* @return result
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/xi-an/saveEquipmentData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"西安数据对接-设备批量导入"
,
notes
=
"西安数据对接-导入多个设备的数据文件"
)
public
ResponseModel
<?>
saveEquipmentData
(
@RequestBody
List
<
Map
<?,?>>
equLists
)
throws
Exception
{
public
ResponseModel
<?>
saveEquipmentData
(
@RequestBody
List
<
Map
<?,
?>>
equLists
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
dataDockService
.
xiAnSaveEquipmentData
(
equLists
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/importData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"八大类历史设备导入"
,
notes
=
"八大类历史设备导入"
)
public
Object
importData
(
@RequestParam
String
remark
,
@RequestParam
MultipartFile
file
)
{
// 校验文件是否为空
if
(
file
.
isEmpty
())
{
return
ResponseHelper
.
buildResponse
(
"文件不能为空"
);
}
// 校验文件类型为 Excel
String
contentType
=
file
.
getContentType
();
String
fileExtension
=
FilenameUtils
.
getExtension
(
file
.
getOriginalFilename
());
// 校验 Excel 文件的 MIME type 和扩展名
if
(!(
"application/vnd.ms-excel"
.
equals
(
contentType
)
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
.
equals
(
contentType
))
||
!(
"xls"
.
equalsIgnoreCase
(
fileExtension
)
||
"xlsx"
.
equalsIgnoreCase
(
fileExtension
)))
{
return
ResponseHelper
.
buildResponse
(
"文件类型必须是 Excel 文件"
);
}
return
ResponseHelper
.
buildResponse
(
dataDockService
.
dataCheckAndImportEquipmentData
(
remark
,
file
));
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataDockServiceImpl.java
View file @
64ee542e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.read.metadata.ReadSheet
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipInfoExcelDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionTemplate
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.io.InputStream
;
import
java.sql.Timestamp
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.regex.Pattern
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
DataDockServiceImpl
{
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
@Autowired
private
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
@Autowired
private
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
@Autowired
private
IdxBizJgDesignInfoServiceImpl
idxBizJgDesignInfoService
;
@Autowired
private
IdxBizJgFactoryInfoServiceImpl
idxBizJgFactoryInfoService
;
@Autowired
private
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoServiceImpl
;
@Autowired
private
IdxBizJgSupervisionInfoServiceImpl
idxBizJgSupervisionInfoService
;
@Autowired
private
IdxBizJgOtherInfoServiceImpl
idxBizJgOtherInfoService
;
@Autowired
IIdxBizJgTechParamsVehicleService
iIdxBizJgTechParamsVehicleService
;
@Autowired
IIdxBizJgTechParamsLiftingService
iIdxBizJgTechParamsLiftingService
;
@Autowired
IIdxBizJgTechParamsBoilerService
iIdxBizJgTechParamsBoilerService
;
@Autowired
IIdxBizJgTechParamsVesselService
iIdxBizJgTechParamsVesselService
;
@Autowired
IIdxBizJgTechParamsPipelineService
iIdxBizJgTechParamsPipelineService
;
@Autowired
IIdxBizJgTechParamsRidesService
iIdxBizJgTechParamsRidesService
;
@Autowired
IIdxBizJgTechParamsRopewayService
iIdxBizJgTechParamsRopewayService
;
@Autowired
private
TransactionTemplate
transactionTemplate
;
private
final
ESEquipmentCategory
esEquipmentCategory
;
private
final
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
private
final
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
private
final
IdxBizJgDesignInfoServiceImpl
idxBizJgDesignInfoService
;
private
final
IdxBizJgFactoryInfoServiceImpl
idxBizJgFactoryInfoService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoServiceImpl
;
private
final
IdxBizJgSupervisionInfoServiceImpl
idxBizJgSupervisionInfoService
;
private
final
IdxBizJgOtherInfoServiceImpl
idxBizJgOtherInfoService
;
private
final
IIdxBizJgTechParamsVehicleService
iIdxBizJgTechParamsVehicleService
;
private
final
IIdxBizJgTechParamsLiftingService
iIdxBizJgTechParamsLiftingService
;
private
final
IIdxBizJgTechParamsBoilerService
iIdxBizJgTechParamsBoilerService
;
private
final
IIdxBizJgTechParamsVesselService
iIdxBizJgTechParamsVesselService
;
private
final
IIdxBizJgTechParamsPipelineService
iIdxBizJgTechParamsPipelineService
;
private
final
IIdxBizJgTechParamsRidesService
iIdxBizJgTechParamsRidesService
;
private
final
IIdxBizJgTechParamsRopewayService
iIdxBizJgTechParamsRopewayService
;
private
final
IIdxBizJgTechParamsElevatorService
iIdxBizJgTechParamsElevatorService
;
private
final
TransactionTemplate
transactionTemplate
;
private
final
CommonServiceImpl
commonService
;
/**
* 西安数据对接-保存设备信息
...
...
@@ -81,22 +69,22 @@ public class DataDockServiceImpl {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
xiAnSaveEquipmentData
(
List
<
Map
<?,
?>>
equLists
)
{
CompletableFuture
.
allOf
(
equLists
.
stream
().
map
(
equ
->
CompletableFuture
.
runAsync
(()
->
saveEquipmentDataInTransaction
(
equ
))).
toArray
(
CompletableFuture
[]::
new
)).
join
();
CompletableFuture
.
allOf
(
equLists
.
stream
().
map
(
equ
->
CompletableFuture
.
runAsync
(()
->
saveEquipmentDataInTransaction
(
equ
,
"jg_his_xa"
,
null
))).
toArray
(
CompletableFuture
[]::
new
)).
join
();
return
Boolean
.
TRUE
;
}
private
void
saveEquipmentDataInTransaction
(
Map
<?,
?>
equ
)
{
private
void
saveEquipmentDataInTransaction
(
Map
<?,
?>
equ
,
String
dataSource
,
String
remark
)
{
try
{
transactionTemplate
.
execute
(
status
->
{
String
record
=
UUID
.
randomUUID
().
toString
();
String
equList
=
String
.
valueOf
(
equ
.
get
(
"equList"
));
// 保存到设备表
saveUseInfo
(
equ
,
record
);
saveUseInfo
(
equ
,
record
,
dataSource
,
remark
);
saveDesignInfo
(
equ
,
record
);
saveFactoryInfo
(
equ
,
record
);
saveRegisterInfo
(
equ
,
record
);
saveSupervisionInfo
(
equ
,
record
);
saveOtherInfo
(
equ
,
record
);
saveOtherInfo
(
equ
,
record
,
equList
);
// 保存技术参数
saveTechParams
(
equ
,
record
,
equList
);
// 保存到ES
...
...
@@ -105,9 +93,8 @@ public class DataDockServiceImpl {
});
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"
西安数据:保存时出现异常,对应数据:{}"
,
JSONObject
.
toJSONString
(
equ
));
log
.
error
(
"
{}数据:保存时出现异常,对应数据:{}"
,
dataSource
,
JSONObject
.
toJSONString
(
equ
));
log
.
error
(
"异常信息:{}"
,
e
.
getMessage
());
log
.
error
(
"异常原因:{}"
,
e
.
getMessage
());
}
}
...
...
@@ -117,16 +104,17 @@ public class DataDockServiceImpl {
* @param equ
* @param record
*/
private
void
saveUseInfo
(
Map
<?,
?>
equ
,
String
record
)
{
private
void
saveUseInfo
(
Map
<?,
?>
equ
,
String
record
,
String
dataSource
,
String
remark
)
{
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equ
),
IdxBizJgUseInfo
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
useInfo
))
{
useInfo
.
setRecDate
(
new
Date
());
useInfo
.
setRecord
(
record
);
useInfo
.
setDataSource
(
"jg_his_xa"
);
useInfo
.
setDataSource
(
dataSource
);
useInfo
.
setIsNotEs
(
"1"
);
useInfo
.
setIsIntoManagement
(
Boolean
.
FALSE
);
useInfo
.
setUseUnitCreditCode
(
String
.
valueOf
(
equ
.
get
(
"useUnitCode"
)).
trim
());
useInfo
.
setUseUnitName
(
String
.
valueOf
(
equ
.
get
(
"useUnit"
)).
trim
());
useInfo
.
setRemark
(
remark
);
idxBizJgUseInfoService
.
save
(
useInfo
);
}
}
...
...
@@ -157,6 +145,7 @@ public class DataDockServiceImpl {
if
(!
ValidationUtil
.
isEmpty
(
factoryInfo
))
{
factoryInfo
.
setRecord
(
record
);
factoryInfo
.
setRecDate
(
new
Date
());
factoryInfo
.
setFactoryIsComplete
(
"1"
);
idxBizJgFactoryInfoService
.
save
(
factoryInfo
);
}
}
...
...
@@ -198,12 +187,15 @@ public class DataDockServiceImpl {
* @param equ
* @param record
*/
private
void
saveOtherInfo
(
Map
<?,
?>
equ
,
String
record
)
{
private
void
saveOtherInfo
(
Map
<?,
?>
equ
,
String
record
,
String
equList
)
{
IdxBizJgOtherInfo
otherInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equ
),
IdxBizJgOtherInfo
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
otherInfo
))
{
otherInfo
.
setRecord
(
record
);
otherInfo
.
setClaimStatus
(
"已认领"
);
otherInfo
.
setRecDate
(
new
Date
());
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equList
))
{
otherInfo
.
setCode96333Type
(
"2"
);
}
idxBizJgOtherInfoService
.
save
(
otherInfo
);
}
}
...
...
@@ -230,6 +222,8 @@ public class DataDockServiceImpl {
saveRidesParams
(
equ
,
record
);
}
else
if
(
EquipmentClassifityEnum
.
KYSD
.
getCode
().
equals
(
equList
))
{
saveRopewayParams
(
equ
,
record
);
}
else
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equList
))
{
saveElevatorParams
(
equ
,
record
);
}
}
...
...
@@ -345,6 +339,21 @@ public class DataDockServiceImpl {
}
}
/**
* 保存电梯技术参数
*
* @param equ
* @param record
*/
private
void
saveElevatorParams
(
Map
<?,
?>
equ
,
String
record
)
{
IdxBizJgTechParamsElevator
equipTechParamElevator
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equ
),
IdxBizJgTechParamsElevator
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
equipTechParamElevator
))
{
equipTechParamElevator
.
setRecord
(
record
);
equipTechParamElevator
.
setRecDate
(
new
Date
());
iIdxBizJgTechParamsElevatorService
.
saveOrUpdateData
(
equipTechParamElevator
);
}
}
/**
* 保存设备数据至es
...
...
@@ -361,4 +370,621 @@ public class DataDockServiceImpl {
}
}
/**
* 八大类历史设备导入
*
* @param file
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
Object
dataCheckAndImportEquipmentData
(
String
remark
,
MultipartFile
file
)
{
List
<
EquipInfoExcelDto
>
equipInfoExcelDtos
;
try
{
// 1, 数据读取 + 格式、类型异常检查
equipInfoExcelDtos
=
this
.
checkData
(
file
);
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
String
.
format
(
"参数校验失败,详细请看返回信息:%s"
,
e
.
getMessage
()));
}
// 2, 保存设备数据
this
.
batchSaveEquipmentData
(
remark
,
equipInfoExcelDtos
);
return
Boolean
.
TRUE
;
}
private
final
Map
<
String
,
Object
>
resultError
=
new
HashMap
<>();
List
<
String
>
useInnerCodeList
=
new
ArrayList
<>();
// 单位内部编号集合
List
<
String
>
equCodeList
=
new
ArrayList
<>();
// 设备代码集合
List
<
String
>
factoryNumList
=
new
ArrayList
<>();
// 出厂编码集合
List
<
String
>
useOrgCodeList
=
new
ArrayList
<>();
// 使用登记证集合
/**
* excel 文件读取,字段校验
*
* @param file excel 文件
* @return 设备数据
* @throws Exception 异常信息
*/
public
List
<
EquipInfoExcelDto
>
checkData
(
MultipartFile
file
)
{
List
<
EquipInfoExcelDto
>
dataList
=
new
ArrayList
<>();
resultError
.
clear
();
useInnerCodeList
.
clear
();
equCodeList
.
clear
();
factoryNumList
.
clear
();
useOrgCodeList
.
clear
();
try
{
InputStream
inputStream
=
file
.
getInputStream
();
ExcelReader
excelReader
=
EasyExcel
.
read
(
inputStream
).
build
();
List
<
ReadSheet
>
sheetList
=
excelReader
.
excelExecutor
().
sheetList
();
// 获取所有 sheet
for
(
ReadSheet
readSheet
:
sheetList
)
{
String
sheetName
=
readSheet
.
getSheetName
();
int
sheetNo
=
readSheet
.
getSheetNo
();
// 忽略填充设备种类类别品种的三级联动sheet页
if
(
sheetName
.
contains
(
"忽略"
))
{
continue
;
}
Map
<
String
,
Object
>
sheetError
=
new
HashMap
<>();
EasyExcel
.
read
(
file
.
getInputStream
(),
EquipInfoExcelDto
.
class
,
new
AnalysisEventListener
<
EquipInfoExcelDto
>()
{
// 每读一行都会执行
@Override
public
void
invoke
(
EquipInfoExcelDto
data
,
AnalysisContext
context
)
{
// 数据检查
checkExcelData
(
sheetName
,
data
,
context
,
sheetError
);
useInnerCodeList
.
add
(
data
.
getUseInnerCode
());
equCodeList
.
add
(
data
.
getEquCode
());
useOrgCodeList
.
add
(
data
.
getUseOrgCode
());
dataList
.
add
(
data
);
}
// 每个sheet页读完都会执行
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
// 记录每一个sheet页的错误集
if
(!
ValidationUtil
.
isEmpty
(
sheetError
))
{
resultError
.
put
(
String
.
format
(
"%s sheet页"
,
sheetName
),
sheetError
);
}
}
}).
headRowNumber
(
4
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}
excelReader
.
finish
();
// 关闭 reader,释放资源
if
(
CollectionUtils
.
isEmpty
(
dataList
))
{
resultError
.
put
(
"allSheet"
,
"你上传了一个空数据的Excel文档!"
);
throw
new
BadRequest
(
"你上传了一个空数据的Excel文档!"
);
}
// 检查 resultError中的每一项,若存在内容,则有错误信息,直接抛异常
if
(!
ValidationUtil
.
isEmpty
(
resultError
))
{
throw
new
BadRequest
(
JSON
.
toJSONString
(
resultError
));
}
return
dataList
;
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
e
.
getMessage
());
}
}
/**
* excel数据字段校验
*
* @param sheetName sheet页名称
* @param data excel数据
* @param context
*/
public
void
checkExcelData
(
String
sheetName
,
EquipInfoExcelDto
data
,
AnalysisContext
context
,
Map
<
String
,
Object
>
sheetError
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
int
rowIndex
=
readRowHolder
.
getRowIndex
()
+
1
;
StringBuffer
rowError
=
new
StringBuffer
();
log
.
info
(
"开始解析数据,第{}条数据"
,
rowIndex
);
// 是否起重机械
boolean
isQZJX
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"4000"
.
equals
(
data
.
getEquList
());
// 是否场内机动车辆
boolean
isCNJDXL
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"5000"
.
equals
(
data
.
getEquList
());
// 是否锅炉
boolean
isGL
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"1000"
.
equals
(
data
.
getEquList
());
// 是否压力容器
boolean
isYLRQ
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"2000"
.
equals
(
data
.
getEquList
());
// 是否压力管道
boolean
isYLGD
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"8000"
.
equals
(
data
.
getEquList
());
// 是否大型游乐设施
boolean
isDXYNSS
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"6000"
.
equals
(
data
.
getEquList
());
// 是否客运索道
boolean
isKYSD
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"9000"
.
equals
(
data
.
getEquList
());
// 是否电梯
boolean
isDT
=
!
ValidationUtil
.
isEmpty
(
data
.
getEquList
())
&&
"3000"
.
equals
(
data
.
getEquList
());
try
{
log
.
info
(
"解析第{}行数据:{}"
,
rowIndex
,
JSON
.
toJSONString
(
data
));
// 通用字段检查 每一个sheet页都有的基本信息,设计信息,制造信息和使用信息
this
.
commonFieldCheck
(
data
,
rowError
);
// 起重机械----技术参数 检查
if
(
isQZJX
)
{
this
.
QZJXTechnicalParamsCheck
(
data
,
rowError
);
}
// 场内机动车辆----技术参数 检查
if
(
isCNJDXL
)
{
this
.
CNJDCLTechnicalParamsCheck
(
data
,
rowError
);
}
// 锅炉----技术参数 检查
if
(
isGL
)
{
this
.
GLTechnicalParamsCheck
(
data
,
rowError
);
}
// 压力容器----技术参数 检查
if
(
isYLRQ
)
{
this
.
YLRQTechnicalParamsCheck
(
data
,
rowError
);
}
// 压力管道----技术参数 检查
if
(
isYLGD
)
{
this
.
YLGDTechnicalParamsCheck
(
data
,
rowError
);
}
// 大型游乐设施----技术参数 检查
if
(
isDXYNSS
)
{
this
.
DXYLSSTechnicalParamsCheck
(
data
,
rowError
);
}
// 客运索道----技术参数 检查
if
(
isKYSD
)
{
this
.
KYSDTechnicalParamsCheck
(
data
,
rowError
);
}
// 电梯----技术参数 检查
if
(
isDT
)
{
this
.
DTTechnicalParamsCheck
(
data
,
rowError
);
}
if
(!
StringUtils
.
isBlank
(
rowError
))
{
String
excelErrorStr
=
"Excel 第[%s]行"
;
sheetError
.
put
(
String
.
format
(
excelErrorStr
,
rowIndex
),
rowError
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
String
.
format
(
"sheet页:[%s] -> 对应行索引数: [%s] -> 失败的 Excel 数据: [%s]"
,
sheetName
,
rowIndex
,
JSON
.
toJSONString
(
data
)),
e
);
throw
e
;
}
}
/**
* 通用字段检查 每一个sheet页都有的基本信息,设计信息,制造信息和使用信息
*
* @param data 源数据
* @param rowError 错误集合
*/
private
void
commonFieldCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
boolean
isPressureVessel
=
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquList
())
&&
"2000"
.
equals
(
data
.
getEquList
());
// 是否压力容器
boolean
isPressurePiping
=
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquList
())
&&
"8000"
.
equals
(
data
.
getEquList
());
// 是否压力管道
// 基本信息
checkNotBlank
(
data
.
getEquList
(),
"设备种类不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getEquCategory
(),
"设备类别不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getUseInnerCode
(),
"单位内编号不能为空;"
,
rowError
);
if
(
useInnerCodeList
.
contains
(
data
.
getUseInnerCode
()))
{
rowError
.
append
(
"单位内编号不能重复;"
);
}
checkNotBlank
(
data
.
getProductName
(),
"产品名称不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getEquType
(),
"设备型号不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getEquCodeType
(),
"有无设备代码不能为空;"
,
rowError
);
if
(
"1"
.
equals
(
data
.
getEquCodeType
()))
{
checkNotBlank
(
data
.
getEquCode
(),
"设备代码不能为空;"
,
rowError
);
String
equCode
=
data
.
getEquCode
();
if
(
equCode
.
matches
(
"[a-zA-Z0-9]+"
))
{
if
(
equCode
.
length
()
<=
17
)
{
rowError
.
append
(
"设备代码不能小于17位;"
);
}
if
(
equCode
.
length
()
>=
20
)
{
rowError
.
append
(
"设备代码不能大于20位;"
);
}
}
else
{
rowError
.
append
(
"设备代码不能包含特殊字符;"
);
}
if
(
equCodeList
.
contains
(
data
.
getEquCode
()))
{
rowError
.
append
(
"设备代码不能重复;"
);
}
this
.
checkEquCodeUniqueness
(
data
.
getEquCode
(),
rowError
);
}
else
{
data
.
setEquCode
(
""
);
}
if
(
isPressurePiping
)
{
// 校验压力管道特有的参数
checkNotBlank
(
data
.
getProjectContraption
(),
"工程(装置)名称不能为空;"
,
rowError
);
}
else
{
data
.
setProjectContraption
(
""
);
}
if
(
isPressureVessel
)
{
// 校验压力容器特有的参数
boolean
isGasCylinder
=
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquCategory
())
&&
"2300"
.
equals
(
data
.
getEquCategory
());
// 是否气瓶
boolean
isFixedGasCylinder
=
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquCategory
())
&&
"2100"
.
equals
(
data
.
getEquCategory
());
// 是否固定式压力容器
boolean
isOxygenChamber
=
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquCategory
())
&&
"2400"
.
equals
(
data
.
getEquCategory
());
// 是否氧舱
boolean
isMobilePressureVessel
=
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquCategory
())
&&
"2200"
.
equals
(
data
.
getEquCategory
());
// 是否移动式压力容器
boolean
isSpecialGasCylinder
=
isGasCylinder
&&
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getEquDefine
())
&&
"23T0"
.
equals
(
data
.
getEquDefine
());
// 是否特种气瓶
boolean
isCarGasCylinder
=
isSpecialGasCylinder
&&
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getWhetherVehicleCylinder
())
&&
"1"
.
equals
(
data
.
getWhetherVehicleCylinder
()));
// 是否车用气瓶
if
(
isGasCylinder
)
{
// 是气瓶
if
(!
isSpecialGasCylinder
)
{
// 不是特种气瓶
data
.
setWhetherVehicleCylinder
(
""
);
checkNotBlank
(
data
.
getInformationSituation
(),
"信息化管理情况不能为空;"
,
rowError
);
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getInformationSituation
()))
{
checkNotBlank
(
data
.
getInformationManageCode
(),
"二维码或者电子标签编号不能为空;"
,
rowError
);
}
}
if
(
isSpecialGasCylinder
)
{
// 是特种气瓶
checkNotBlank
(
data
.
getWhetherVehicleCylinder
(),
"是否车用气瓶不能为空;"
,
rowError
);
if
(!
isCarGasCylinder
)
{
// 不是车用气瓶
checkNotBlank
(
data
.
getInformationSituation
(),
"信息化管理情况不能为空;"
,
rowError
);
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getInformationSituation
()))
{
checkNotBlank
(
data
.
getInformationManageCode
(),
"二维码或者电子标签编号不能为空;"
,
rowError
);
}
}
if
(
isCarGasCylinder
)
{
// 是车用气瓶
data
.
setInformationSituation
(
""
);
data
.
setInformationManageCode
(
""
);
checkFactoryNumUniqueness
(
data
,
rowError
);
// 校验出厂编号/产品编码唯一性
}
}
data
.
setWhetherSphericalTank
(
""
);
data
.
setWhetherSkidMountedPressureVessel
(
""
);
}
if
(
isFixedGasCylinder
)
{
// 是固定式压力容器
checkNotBlank
(
data
.
getWhetherSphericalTank
(),
"是否球罐不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getWhetherSkidMountedPressureVessel
(),
"是否撬装式压力容器不能为空;"
,
rowError
);
data
.
setInformationSituation
(
""
);
data
.
setInformationManageCode
(
""
);
}
if
(
isMobilePressureVessel
)
{
// 是移动式压力容器
data
.
setWhetherSkidMountedPressureVessel
(
""
);
data
.
setWhetherVehicleCylinder
(
""
);
data
.
setWhetherSphericalTank
(
""
);
data
.
setInformationSituation
(
""
);
data
.
setInformationManageCode
(
""
);
}
if
(
isOxygenChamber
)
{
// 是氧舱
data
.
setWhetherSkidMountedPressureVessel
(
""
);
data
.
setWhetherVehicleCylinder
(
""
);
data
.
setWhetherSphericalTank
(
""
);
data
.
setInformationSituation
(
""
);
data
.
setInformationManageCode
(
""
);
}
}
checkNotBlank
(
data
.
getUseOrgCode
(),
"使用登记证编号不能为空;"
,
rowError
);
if
(!
StringUtils
.
isEmpty
(
data
.
getUseOrgCode
()))
{
if
(!
this
.
useOrgCodeRegularMatching
(
data
))
{
rowError
.
append
(
"使用登记证编号格式不正确;"
);
}
if
(
useOrgCodeList
.
contains
(
data
.
getUseOrgCode
()))
{
rowError
.
append
(
"使用登记证编号不能重复;"
);
}
try
{
idxBizJgRegisterInfoServiceImpl
.
checkUseRegistrationCode
(
data
.
getUseOrgCode
(),
"set"
);
}
catch
(
Exception
e
)
{
rowError
.
append
(
e
.
getMessage
());
}
if
(
commonService
.
useRegistrationCertificateAccountUnique
(
data
.
getUseOrgCode
(),
null
))
{
rowError
.
append
(
"使用登记证编号已存在系统中;"
);
}
}
// 使用信息
checkNotBlank
(
data
.
getUseUnitCode
(),
"使用单位统一社会信用代码不能为空;"
,
rowError
);
Optional
.
ofNullable
(
data
.
getUseUnitCode
()).
ifPresent
(
v
->
checkCreditCode
(
v
,
"使用单位统一社会信用代码格式不正确;"
,
rowError
));
checkNotBlank
(
data
.
getUseUnit
(),
"使用单位名称不能为空;"
,
rowError
);
// 设计信息
// checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
// Optional.ofNullable(data.getDesignUnitCreditCode()).ifPresent(v -> checkCreditCode(v, "设计单位统一社会信用代码格式不正确;", rowError));
// checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
// checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
// Optional.ofNullable(data.getDesignUseDate()).ifPresent(v -> checkDateFormatNumber(v, "设计使用年限不能为数字以外的其他类型;", rowError));
// checkNotBlank(data.getDesignUseDate(), "设计日期不能为空;", rowError);
// Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
// Optional.ofNullable(data.getAppraisalDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计文件鉴定日期格式不正确;", rowError));
// 制造信息
checkNotBlank
(
data
.
getProduceUnitCreditCode
(),
"制造单位统一社会信用代码不能为空;"
,
rowError
);
Optional
.
ofNullable
(
data
.
getProduceUnitCreditCode
()).
ifPresent
(
v
->
checkCreditCode
(
v
,
"制造单位统一社会信用代码格式不正确;"
,
rowError
));
checkNotBlank
(
data
.
getProduceUnitName
(),
"制造单位名称不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getProduceLicenseNum
(),
"制造许可编号不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getFactoryNum
(),
"出厂编号/产品编码不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getProduceDate
(),
"制造日期不能为空;"
,
rowError
);
Optional
.
ofNullable
(
data
.
getProduceDate
()).
ifPresent
(
v
->
checkDateFormatCorrect
(
v
,
"制造日期格式不正确;"
,
rowError
));
}
/**
* 检查上传Excel中的日期格式是否正确
*
* @param date 待检查数据
* @param errorMessage 错误内容
* @param rowError 错误集
*/
private
void
checkDateFormatCorrect
(
String
date
,
String
errorMessage
,
StringBuffer
rowError
)
{
if
(!
date
.
matches
(
"\\d{4}-\\d{2}-\\d{2}"
))
{
rowError
.
append
(
errorMessage
);
}
}
/**
* 检查上传Excel中的统一信用代码格式
*
* @param code 待检查数据
* @param errorMessage 错误内容
* @param rowError 错误集
*/
private
void
checkCreditCode
(
String
code
,
String
errorMessage
,
StringBuffer
rowError
)
{
String
regex
=
"^[A-Z0-9]{15}(?:[A-Z0-9]{3})?$"
;
if
(!
code
.
matches
(
regex
))
{
rowError
.
append
(
errorMessage
);
}
}
/**
* 检查上传Excel中的数字格式是否正确
*
* @param date 待检查数据
* @param errorMessage 错误内容
* @param rowError 错误集
*/
private
void
checkDateFormatNumber
(
String
date
,
String
errorMessage
,
StringBuffer
rowError
)
{
if
(!
NumberUtils
.
isCreatable
(
date
))
{
rowError
.
append
(
errorMessage
);
}
}
/**
* 车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)
*
* @param data
*/
private
void
checkFactoryNumUniqueness
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
Integer
count
=
commonService
.
checkFactoryNumUniquenessForVehicleCylinder
(
data
.
getFactoryNum
(),
null
);
if
(
count
>
0
)
{
rowError
.
append
(
"出厂编号/产品编码系统中已存在!"
);
}
}
/**
* 根据设备代码检查唯一性
*
* @param equCode
* @param rowError
*/
private
void
checkEquCodeUniqueness
(
String
equCode
,
StringBuffer
rowError
)
{
Boolean
bool
=
commonService
.
checkEquCodeUniqueness
(
equCode
);
if
(
bool
)
{
rowError
.
append
(
"设备代码系统中已存在;"
);
}
}
/**
* 起重机械----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
QZJXTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
}
/**
* 场内机动车辆----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
CNJDCLTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
}
/**
* 锅炉----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
GLTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
}
/**
* 压力容器----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
YLRQTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
checkNotBlank
(
data
.
getSingleBottleVolume
(),
"单瓶容积不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getChargingMedium
(),
"充装介质不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getNominalWorkingPressure
(),
"公称工作压力不能为空;"
,
rowError
);
}
/**
* 压力管道----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
YLGDTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
checkNotBlank
(
data
.
getWallThickness_YLGD
(),
"公称壁厚不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getNominalDiameter
(),
"公称直径不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getPipeLength
(),
"管道长度不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getPressure
(),
"压力不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getMedium_YLGD
(),
"介质不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getTemperature_YLGD
(),
"温度不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getPipelineNumber
(),
"管道编号不能为空;"
,
rowError
);
checkNotBlank
(
data
.
getDeviceLevel_YLGD
(),
"管道级别不能为空;"
,
rowError
);
Optional
.
ofNullable
(
data
.
getStartePosition
()).
ifPresent
(
v
->
{
if
(
v
.
split
(
"-"
).
length
<=
1
)
{
rowError
.
append
(
"起/始位置 (经纬度)格式不正确"
);
}
});
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
data
.
getStartePosition
())
&&
data
.
getStartePosition
().
split
(
"-"
).
length
==
2
)
{
String
[]
split
=
data
.
getStartePosition
().
split
(
"-"
);
data
.
setStartePosition
(
String
.
format
(
"{\"latitude\":%s,\"longitude\":%s}"
,
split
[
0
],
split
[
1
]));
}
}
/**
* 检查字段是否为空,如果为空则追加错误信息到result
*
* @param value 待检查字段
* @param errorMessage 错误信息
* @param rowError 结果集
*/
private
void
checkNotBlank
(
String
value
,
String
errorMessage
,
StringBuffer
rowError
)
{
if
(
StringUtils
.
isBlank
(
value
))
{
rowError
.
append
(
errorMessage
);
}
}
/**
* 大型游乐设施----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
DXYLSSTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
}
/**
* 客运索道----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
KYSDTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
}
/**
* 使用等级证编号格式匹配
*
* @param data
* @return 匹配通过true,反之false
*/
private
Boolean
useOrgCodeRegularMatching
(
EquipInfoExcelDto
data
)
{
String
useOrgCode
=
data
.
getUseOrgCode
();
// 梯00陕A00000(24) 起11陕K0127(15)
String
rule01
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}陕[A-Z0-9]{4,}\\(\\d{2}\\)$"
;
boolean
flage01
=
Pattern
.
matches
(
rule01
,
useOrgCode
);
// 起17泾河0104(21) 锅10沣西 00004(20)
String
rule02
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}[\\u4e00-\\u9fa5]{2}[A-Z0-9]{4,5}\\(\\d{2}\\)$"
;
boolean
flage02
=
Pattern
.
matches
(
rule02
,
useOrgCode
);
// CNG-A-01-A-116729
String
rule03
=
"^[a-zA-Z]{3}-[a-zA-Z]-[0-9]{2}-[a-zA-Z]-\\d{6,8}$"
;
boolean
flage03
=
Pattern
.
matches
(
rule03
,
useOrgCode
);
// 3010-610322-201212-3723
String
rule04
=
"^\\d{4}-\\d{6}-\\d{4}(0[1-9]|1[0-2])-\\d{4}$"
;
boolean
flage04
=
Pattern
.
matches
(
rule04
,
useOrgCode
);
// 容1LS陕G0053 起11陕K0127 容2LE陕DM6043
String
rule05
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2,3}[\\u4e00-\\u9fa5][A-Z0-9]{5,6}$"
;
boolean
flage05
=
Pattern
.
matches
(
rule05
,
useOrgCode
);
// CC20160091
String
rule06
=
"^[A-Z]{2}[0-9]{8}$"
;
boolean
flage06
=
Pattern
.
matches
(
rule06
,
useOrgCode
);
// 容15陕C00176(19)B10
String
rule07
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}陕[A-Z0-9]{5,}\\(\\d{2}\\)[A-Z0-9]{3}$"
;
boolean
flage07
=
Pattern
.
matches
(
rule07
,
useOrgCode
);
// 锅10秦汉0006(6020)(20)
String
rule08
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}[\\u4e00-\\u9fa5]{2}[A-Z0-9]{4}\\(\\d{4}\\)\\(\\d{2}\\)$"
;
boolean
flage08
=
Pattern
.
matches
(
rule08
,
useOrgCode
);
// 锅陕KB0415 游20陕DP00002 锅陕FF587
String
rule09
=
"^[\\u4e00-\\u9fa5]{1}[0-9]{0,2}[\\u4e00-\\u9fa5]{1}[A-Z]{1,2}[0-9]{3,6}$"
;
boolean
flage09
=
Pattern
.
matches
(
rule09
,
useOrgCode
);
// 陕TK20142429
String
rule10
=
"^[\\u4e00-\\u9fa5]{1}[A-Z]{1,2}[0-9]{8}$"
;
boolean
flage10
=
Pattern
.
matches
(
rule10
,
useOrgCode
);
// 4010610300200106-1105
String
rule11
=
"^[0-9]{16}\\-[0-9]{4}$"
;
boolean
flage11
=
Pattern
.
matches
(
rule11
,
useOrgCode
);
// 容IIIMC陕G-1202
String
rule12
=
"^[\\u4e00-\\u9fa5]{1}[A-Z]{5}[\\u4e00-\\u9fa5]{1}[A-Z]{1}-[0-9]{4}$"
;
boolean
flage12
=
Pattern
.
matches
(
rule12
,
useOrgCode
);
// AT2011-076
String
rule13
=
"^[A-Z]{2,3}[0-9]{2,4}-[0-9]{3,5}$"
;
boolean
flage13
=
Pattern
.
matches
(
rule13
,
useOrgCode
);
// 610302--0561
String
rule14
=
"^[0-9]{6}--[0-9]{4}$"
;
boolean
flage14
=
Pattern
.
matches
(
rule14
,
useOrgCode
);
// XTS泰3546(F8N9G787)
String
rule15
=
"^[A-Z]{3}[\\u4e00-\\u9fa5][0-9]{4}\\([A-Z0-9]{4,9}\\)$"
;
boolean
flage15
=
Pattern
.
matches
(
rule15
,
useOrgCode
);
// 梯12秦汉1611(SJE2021103783)(23)
String
rule16
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}[\\u4e00-\\u9fa5]{1,2}[0-9]{4}\\([A-Z0-9]{4,15}\\)\\(\\d{2}\\)$"
;
boolean
flage16
=
Pattern
.
matches
(
rule16
,
useOrgCode
);
// 锅20空港051(16)(1510574)
String
rule17
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}[\\u4e00-\\u9fa5]{1,2}[0-9]{3,8}\\(\\d{2}\\)\\([A-Z0-9]{4,15}\\)$"
;
boolean
flage17
=
Pattern
.
matches
(
rule17
,
useOrgCode
);
// 容IIMR陕EH0515
String
rule18
=
"^[\\u4e00-\\u9fa5]{1}[A-Z]{2,5}[\\u4e00-\\u9fa5]{1}[A-Z0-9]{4,9}$"
;
boolean
flage18
=
Pattern
.
matches
(
rule18
,
useOrgCode
);
// 锅陕B10006(24) 车0036(21)
String
rule19
=
"^[\\u4e00-\\u9fa5]{1,2}[A-Z]{0,1}[0-9]{4,6}\\(\\d{2}\\)$"
;
boolean
flage19
=
Pattern
.
matches
(
rule19
,
useOrgCode
);
// 容1LE陕D三0384
String
rule20
=
"^[\\u4e00-\\u9fa5]{1}[A-Z0-9]{3}[\\u4e00-\\u9fa5]{1}[A-Z]{1}[\\u4e00-\\u9fa5]{1}[0-9]{4,6}$"
;
boolean
flage20
=
Pattern
.
matches
(
rule20
,
useOrgCode
);
// 384
String
rule21
=
"^[0-9]{3,4}$"
;
boolean
flage21
=
Pattern
.
matches
(
rule21
,
useOrgCode
);
// 梯12空港0063(20H2G20-590-6)(22) 梯12秦汉0509(2013-11-443)(16)
String
rule22
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{2}[\\u4e00-\\u9fa5]{1,2}[0-9]{4}\\([A-Z0-9]{4,7}-[A-Z0-9]{2,3}-[A-Z0-9]{1,3}\\)\\(\\d{2}\\)$"
;
boolean
flage22
=
Pattern
.
matches
(
rule22
,
useOrgCode
);
// 游A10陕CA00116(23)
String
rule23
=
"^[\\u4e00-\\u9fa5][0-9A-Z]{3}陕[A-Z0-9]{5,7}\\(\\d{2}\\)$"
;
boolean
flage23
=
Pattern
.
matches
(
rule23
,
useOrgCode
);
// 容IIIMC陕D三0384(2K13B3-03)
String
rule24
=
"^[\\u4e00-\\u9fa5]{1}[A-Z0-9]{5}[\\u4e00-\\u9fa5]{1}[A-Z]{1}[\\u4e00-\\u9fa5]{1}[0-9]{4,6}\\([A-Z0-9]{6}-[0-9]{2}\\)$"
;
boolean
flage24
=
Pattern
.
matches
(
rule24
,
useOrgCode
);
// 陕YN0:004
String
rule25
=
"^[\\u4e00-\\u9fa5][A-Z]{2}[0-9]{1}:[0-9]{3}$"
;
boolean
flage25
=
Pattern
.
matches
(
rule25
,
useOrgCode
);
return
flage01
||
flage02
||
flage03
||
flage04
||
flage05
||
flage06
||
flage07
||
flage08
||
flage09
||
flage10
||
flage11
||
flage12
||
flage13
||
flage14
||
flage15
||
flage16
||
flage17
||
flage18
||
flage19
||
flage20
||
flage21
||
flage22
||
flage23
||
flage24
||
flage25
;
}
/**
* 电梯----技术参数 检查
*
* @param data
* @param rowError
*/
private
void
DTTechnicalParamsCheck
(
EquipInfoExcelDto
data
,
StringBuffer
rowError
)
{
}
/**
* 批量异步保存设备数据
*
* @param equipInfoExcelDtos
*/
public
void
batchSaveEquipmentData
(
String
remark
,
List
<
EquipInfoExcelDto
>
equipInfoExcelDtos
)
{
int
batchSize
=
1000
;
int
totalSize
=
equipInfoExcelDtos
.
size
();
for
(
int
i
=
0
;
i
<
totalSize
;
i
+=
batchSize
)
{
List
<
EquipInfoExcelDto
>
batch
=
equipInfoExcelDtos
.
subList
(
i
,
Math
.
min
(
totalSize
,
i
+
batchSize
));
try
{
CompletableFuture
.
allOf
(
batch
.
stream
().
map
(
equ
->
CompletableFuture
.
runAsync
(()
->
this
.
saveEquipmentDataInTransaction
(
JSON
.
parseObject
(
JSON
.
toJSONString
(
equ
),
Map
.
class
),
"jg_his"
,
remark
))).
toArray
(
CompletableFuture
[]::
new
)).
join
();
}
catch
(
Exception
e
)
{
log
.
error
(
"数据上传,保存设备数据失败: "
,
e
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
View file @
64ee542e
...
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
...
...
@@ -279,4 +280,10 @@ public class IdxBizJgUseInfo extends TzsBaseEntity {
*/
@TableField
(
"\"PROJECT_CONTRAPTION_ID\""
)
private
String
projectContraptionId
;
/**
* 备注
*/
@TableField
(
"\"REMARK\""
)
private
String
remark
;
}
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