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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
387 additions
and
5 deletions
+387
-5
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
+0
-0
DataDockController.java
...mos/boot/module/jg/biz/controller/DataDockController.java
+25
-5
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+0
-0
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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