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
b3565dfd
Commit
b3565dfd
authored
Sep 29, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
4be025d2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
7 deletions
+43
-7
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+7
-5
TemplateCellWriteHandlerDate.java
...module/common/api/excel/TemplateCellWriteHandlerDate.java
+1
-1
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+3
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+1
-1
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+22
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+9
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
b3565dfd
...
...
@@ -306,6 +306,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
"设施定义名称"
)
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
41
)
@ExplicitConstraint
(
indexNum
=
41
,
sourceClass
=
CommonExplicitConstraint
.
class
,
method
=
"getEquipDefinition"
)
private
String
equipName
;
@ExcelIgnore
...
...
@@ -313,8 +314,9 @@ public class WaterResourceDto extends BaseDto {
private
Long
equipCategoryId
;
// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
@ApiModelProperty
(
"设施分类名称"
)
@ExplicitConstraint
(
indexNum
=
42
,
sourceClass
=
CommonExplicitConstraint
.
class
,
method
=
"getEquipCategory"
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
42
)
@ExcelIgnore
// @ExplicitConstraint(indexNum = 42, sourceClass = CommonExplicitConstraint.class, method = "getEquipCategory")
// @ExcelProperty(value = "设施分类名称", index = 42)
private
String
equipCategoryName
;
@ApiModelProperty
(
"设施编码"
)
...
...
@@ -322,15 +324,15 @@ public class WaterResourceDto extends BaseDto {
private
String
equipCode
;
@ApiModelProperty
(
"维保周期"
)
@ExcelProperty
(
value
=
"维保周期(月)"
,
index
=
4
3
)
@ExcelProperty
(
value
=
"维保周期(月)"
,
index
=
4
2
)
private
String
maintenancePeriod
;
@ApiModelProperty
(
value
=
"经度"
)
@ExcelProperty
(
value
=
"经度"
,
index
=
4
4
)
@ExcelProperty
(
value
=
"经度"
,
index
=
4
3
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
@ExcelProperty
(
value
=
"纬度"
,
index
=
4
5
)
@ExcelProperty
(
value
=
"纬度"
,
index
=
4
4
)
private
Double
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/excel/TemplateCellWriteHandlerDate.java
View file @
b3565dfd
...
...
@@ -32,7 +32,7 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler {
/**
* 避免生成的导入模板下拉值获取不到
*/
private
static
final
Integer
LIMIT_NUMBER
=
1
;
private
static
final
Integer
LIMIT_NUMBER
=
0
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
b3565dfd
...
...
@@ -220,4 +220,7 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"equipment-category/tree/{type}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
getEquipmentCategory
(
@PathVariable
String
type
);
@RequestMapping
(
value
=
"/equipment/listLike/{code}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
listLikePage
(
@PathVariable
String
code
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
b3565dfd
...
...
@@ -61,7 +61,7 @@ import java.util.stream.Collectors;
* @date 2021-06-29
*/
@RestController
@Api
(
tags
=
"
消防水源
Api"
)
@Api
(
tags
=
"
station
Api"
)
@RequestMapping
(
value
=
"/water-resource"
)
public
class
WaterResourceController
extends
BaseController
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
b3565dfd
...
...
@@ -159,6 +159,9 @@ public class DataSourcesImpl implements DataSources {
case
"getEquipCategory"
:
str
=
getEquipCategory
();
break
;
case
"getEquipDefinition"
:
str
=
getEquipDefinition
();
break
;
}
}
return
str
;
...
...
@@ -424,4 +427,23 @@ public class DataSourcesImpl implements DataSources {
}
private
String
[]
getEquipDefinition
()
{
String
type
=
"9306"
;
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
response
=
equipFeignClient
.
listLikePage
(
type
);
List
<
LinkedHashMap
<
String
,
Object
>>
categoryList
=
response
.
getResult
();
String
[]
str
=
null
;
List
<
String
>
resultList
=
Lists
.
newArrayList
();
if
(
categoryList
!=
null
&&
categoryList
.
size
()>
0
){
categoryList
.
forEach
(
t
->
{
resultList
.
add
(
t
.
get
(
"name"
)
+
"@"
+
t
.
get
(
"id"
)+
"@"
+
t
.
get
(
"categoryId"
)+
"@"
+
t
.
get
(
"unitName"
));
});
str
=
resultList
.
toArray
(
new
String
[
resultList
.
size
()]);
}
return
str
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
b3565dfd
...
...
@@ -831,6 +831,15 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
item
.
setEquipCategoryName
(
equipCategory
[
0
]);
item
.
setEquipCategoryId
(
Long
.
parseLong
(
equipCategory
[
1
]));
}
if
(
item
.
getEquipName
()
!=
null
)
{
String
[]
equipCategory
=
item
.
getEquipName
().
split
(
"@"
);
item
.
setEquipId
(
Long
.
parseLong
(
equipCategory
[
1
]));
item
.
setEquipName
(
equipCategory
[
0
]);
item
.
setEquipCategoryId
(
Long
.
parseLong
(
equipCategory
[
2
]));
item
.
setEquipCategoryName
(
equipCategory
[
3
]);
}
item
=
Bean
.
toPo
(
getCurrentInfo
(),
item
);
waterResourceServiceImpl
.
importByExcel
(
item
);
});
...
...
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