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
01388fc1
Commit
01388fc1
authored
Mar 15, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改扫描bug
parent
f041fec9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
202 additions
and
585 deletions
+202
-585
FireRpnChangeLog.java
...oin/amos/boot/module/ccs/api/entity/FireRpnChangeLog.java
+1
-1
FillCommonUserField.java
...in/equipmanage/common/annotation/FillCommonUserField.java
+0
-13
GlobalCache.java
...va/com/yeejoin/equipmanage/common/config/GlobalCache.java
+2
-1
Constant.java
...ava/com/yeejoin/equipmanage/common/constant/Constant.java
+0
-106
SyncDataTypeEnum.java
...n/equipmanage/common/datasync/enums/SyncDataTypeEnum.java
+30
-28
MaintenanceResourceDto.java
...eejoin/equipmanage/common/dto/MaintenanceResourceDto.java
+0
-3
ConfirmEquipmentSpecificAlarm.java
...ipmanage/common/entity/ConfirmEquipmentSpecificAlarm.java
+0
-124
EquipmentCategory.java
.../yeejoin/equipmanage/common/entity/EquipmentCategory.java
+1
-3
EquipmentSpecificIndex.java
...oin/equipmanage/common/entity/EquipmentSpecificIndex.java
+1
-2
MyByteArrayMultipartFile.java
...n/equipmanage/common/entity/MyByteArrayMultipartFile.java
+4
-1
SourceNameListDTO.java
...join/equipmanage/common/entity/dto/SourceNameListDTO.java
+1
-1
TopographyTreeDTO.java
...join/equipmanage/common/entity/dto/TopographyTreeDTO.java
+8
-8
BaseTreeNode.java
...ejoin/equipmanage/common/entity/publics/BaseTreeNode.java
+3
-3
DevOverviewVO.java
...m/yeejoin/equipmanage/common/entity/vo/DevOverviewVO.java
+1
-23
DownloadEquipmentDataVO.java
...equipmanage/common/entity/vo/DownloadEquipmentDataVO.java
+0
-8
ProductInfoVO.java
...m/yeejoin/equipmanage/common/entity/vo/ProductInfoVO.java
+1
-23
EquipStatusChecker.java
.../yeejoin/equipmanage/common/enums/EquipStatusChecker.java
+19
-83
EquipStatusEnum.java
...com/yeejoin/equipmanage/common/enums/EquipStatusEnum.java
+1
-11
TemperatureAlarm.java
...om/yeejoin/equipmanage/common/enums/TemperatureAlarm.java
+1
-6
GlobalExceptionHandler.java
...anage/common/exception/handle/GlobalExceptionHandler.java
+10
-3
GlobalResponseHandler.java
...manage/common/exception/handle/GlobalResponseHandler.java
+2
-13
Common3dResponse.java
...yeejoin/equipmanage/common/response/Common3dResponse.java
+1
-3
Common3dResponseUtil.java
...oin/equipmanage/common/response/Common3dResponseUtil.java
+11
-6
ArrayUtil.java
.../java/com/yeejoin/equipmanage/common/utils/ArrayUtil.java
+3
-0
BillCodeManagerUtil.java
...yeejoin/equipmanage/common/utils/BillCodeManagerUtil.java
+4
-4
ChartsUtils.java
...ava/com/yeejoin/equipmanage/common/utils/ChartsUtils.java
+10
-34
CodeGenerate.java
...va/com/yeejoin/equipmanage/common/utils/CodeGenerate.java
+2
-0
CommonPageParamUtil.java
...yeejoin/equipmanage/common/utils/CommonPageParamUtil.java
+3
-1
CommonResponseUtil.java
.../yeejoin/equipmanage/common/utils/CommonResponseUtil.java
+16
-12
ConverterUtil.java
...a/com/yeejoin/equipmanage/common/utils/ConverterUtil.java
+5
-1
CustomUtil.java
...java/com/yeejoin/equipmanage/common/utils/CustomUtil.java
+2
-0
DateUtils.java
.../java/com/yeejoin/equipmanage/common/utils/DateUtils.java
+0
-0
DocUtil.java
...in/java/com/yeejoin/equipmanage/common/utils/DocUtil.java
+11
-23
EnumsUtils.java
...java/com/yeejoin/equipmanage/common/utils/EnumsUtils.java
+7
-2
EquipmentStateUtil.java
.../yeejoin/equipmanage/common/utils/EquipmentStateUtil.java
+4
-2
ExcelUtil.java
.../java/com/yeejoin/equipmanage/common/utils/ExcelUtil.java
+12
-25
ExcelUtils.java
...java/com/yeejoin/equipmanage/common/utils/ExcelUtils.java
+10
-8
ExtendedIOUtils.java
...com/yeejoin/equipmanage/common/utils/ExtendedIOUtils.java
+2
-0
FileHelper.java
...java/com/yeejoin/equipmanage/common/utils/FileHelper.java
+0
-0
finalString.java
...ava/com/yeejoin/equipmanage/common/utils/finalString.java
+13
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/entity/FireRpnChangeLog.java
View file @
01388fc1
...
...
@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"asf_fire_rpn_change_
log"
)
@TableName
(
"asf_fire_rpn_change_
CODE
)
public class FireRpnChangeLog extends BaseEntity {
private static final long serialVersionUID = 1L;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/annotation/FillCommonUserField.java
View file @
01388fc1
//package com.yeejoin.equipmanage.common.annotation;
//
//import java.lang.annotation.*;
//
///**
// * @author DELL
// */
//@Retention(RetentionPolicy.RUNTIME)
//@Target({ElementType.TYPE})
//@Documented
//public @interface FillCommonUserField {
// boolean isAutoFill() default true;
//}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/config/GlobalCache.java
View file @
01388fc1
...
...
@@ -22,5 +22,6 @@ public class GlobalCache {
*/
public
static
Map
<
String
,
String
>
paramMap
=
new
ConcurrentHashMap
<>(
1000
);
private
GlobalCache
()
{
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/constant/Constant.java
View file @
01388fc1
...
...
@@ -80,112 +80,6 @@ public interface Constant {
String
fourSmallTopicfireFoamMistSys
=
"fourSmallTopicfireFoamMistSys"
;
// String SMALL_PRO_PRCODE = "SMALL_PRO_PRCODE_";
/**
* 任务-作业交底
*/
// Integer JOB_TYPE = 0;
/**
* 任务-三交三查
*/
// Integer HAND_QUERY = 1;
// String JSON_NULL = "[]";
/**
* 违规管理
*/
// Integer BAD_MANAGEMENT = 2;
// Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
// String FILE_SEPARATOR = System.getProperty("file.separator");
// DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// String PAGE_NUM = "0";
//
// String SIZE_NUM = "20";
//
// String PAGE = "page";
//
// String SIZE = "size";
//
//
// String ZERO = "0";
//
// String ONE = "1";
//
// String TWO = "2";
//
// String THREE = "3";
//
// String FOUR = "4";
//
// String FIVE = "5";
/**
* 请求错误
*/
// String ERROR = "300";
/**
* 无权限
*/
// String PERMISSION = "401";
/**
* 请求成功,其他错误
*/
// String DATA_NULL = "402";
/**
* 请求失败
*/
// String FAILED = "999";
/**
* 最大值
*/
// Integer MAX = 32767;
/**
* 数据请求返回码
*/
//成功
// public static final int RESCODE_SUCCESS = 1000;
// //成功(有返回信息)
// public static final int RESCODE_SUCCESS_MSG = 1001;
// //请求抛出异常
// public static final int RESCODE_EXCEPTION = 1002;
// //未登陆状态
// public static final int RESCODE_NOLOGIN = 1003;
// //查询结果为空
// public static final int RESCODE_NOEXIST = 1004;
// //无操作权限
// public static final int RESCODE_NOAUTH = 1005;
// //登录过期
// public static final int RESCODE_LOGINEXPIRE = 1006;
/**
* token
*/
// //Token过期
// public static final int JWT_ERRCODE_EXPIRE = 1007;
// //验证不通过
// public static final int JWT_ERRCODE_FAIL = 1008;
/**
* jwt
*/
// public static final String JWT_ID = "jwt-black";//jwt签发者
// public static final String JWT_SECRET = "Isi5Ob9OfvJt+4IHoMJlHkS1ttg=";//密匙
// public static final int JWT_TTL = 60 * 60 * 1000; // 60*60*1000; //millisecond
// public static final int JWT_REFRESH_INTERVAL = 18 * 1000; //55*60*1000; //millisecond
// public static final int JWT_REFRESH_TTL = 60 * 1000; // 12*60*60*1000; //millisecond
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/datasync/enums/SyncDataTypeEnum.java
View file @
01388fc1
package
com
.
yeejoin
.
equipmanage
.
common
.
datasync
.
enums
;
import
com.yeejoin.equipmanage.common.utils.finalString
;
/**
* <h1>同步数据类型</h1>
*
...
...
@@ -7,112 +9,112 @@ package com.yeejoin.equipmanage.common.datasync.enums;
* @Date 2021-04-01 09:20
*/
public
enum
SyncDataTypeEnum
{
/**
* 巡检项
*/
ASF_FIRE_PATROL_ITEM
(
"11"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_ITEM
(
"11"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检点
*/
ASF_FIRE_PATROL_POINT
(
"12"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_POINT
(
"12"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检点检查项
*/
ASF_FIRE_PATROL_POINT_ITEM
(
"60"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_POINT_ITEM
(
"60"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检路线
*/
ASF_FIRE_PATROL_ROUTE
(
"61"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_ROUTE
(
"61"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检路线点
*/
ASF_FIRE_PATROL_ROUTE_POINT
(
"62"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_ROUTE_POINT
(
"62"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检路线点检查项
*/
ASF_FIRE_PATROL_ROUTE_POINT_ITEM
(
"63"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_ROUTE_POINT_ITEM
(
"63"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检计划
*/
ASF_FIRE_PATROL_PLAN
(
"64"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_PLAN
(
"64"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检任务
*/
ASF_FIRE_PATROL_PLAN_TASK
(
"65"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_PLAN_TASK
(
"65"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 任务详情
*/
ASF_FIRE_PATROL_PLAN_TASK_DETAIL
(
"66"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_PLAN_TASK_DETAIL
(
"66"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡检记录
*/
ASF_FIRE_PATROL_CHECK_RECORD
(
"67"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_CHECK_RECORD
(
"67"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 巡查记录详情
*/
ASF_FIRE_PATROL_CHECK_RECORD_DETAIL
(
"68"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
ASF_FIRE_PATROL_CHECK_RECORD_DETAIL
(
"68"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 区域
*/
AST_AREA
(
"01"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_AREA
(
"01"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 建筑
*/
AST_BUILDING
(
"02"
,
"cs/v1/fireAST/dataSync"
,
"building"
),
AST_BUILDING
(
"02"
,
finalString
.
URLST
,
"building"
),
/**
* 围墙
*/
AST_WALL
(
"03"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_WALL
(
"03"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 楼层
*/
AST_FLOOR
(
"04"
,
"cs/v1/fireAST/dataSync"
,
"floor"
),
AST_FLOOR
(
"04"
,
finalString
.
URLST
,
"floor"
),
/**
* 小室
*/
AST_ROOM
(
"05"
,
"cs/v1/fireAST/dataSync"
,
"room"
),
AST_ROOM
(
"05"
,
finalString
.
URLST
,
"room"
),
/**
* 消防系统
*/
AST_FIRE_FIGHTING
(
"07"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_FIRE_FIGHTING
(
"07"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 消防设备
*/
AST_FIRE_EQUIP
(
"08"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_FIRE_EQUIP
(
"08"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 消防设备参数信息
*/
AST_FIRE_EQUIP_INFO
(
"0801"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_FIRE_EQUIP_INFO
(
"0801"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 消防设备量测信息
*/
AST_FIRE_EQUIP_MEASUREMENT
(
"0802"
,
"cs/v1/fireAST/dataSync"
,
"isIot"
),
AST_FIRE_EQUIP_MEASUREMENT
(
"0802"
,
finalString
.
URLST
,
"isIot"
),
/**
* 消防设备火警
*/
AST_FIRE_EQUIP_ALARM
(
"0803"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
AST_FIRE_EQUIP_ALARM
(
"0803"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 消防设备故障
*/
AST_FIRE_EQUIP_FAULT_ALARM
(
"0804"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
AST_FIRE_EQUIP_FAULT_ALARM
(
"0804"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 消防设备缺陷
*/
AST_FIRE_EQUIP_DEFECT_ALARM
(
"0805"
,
"cs/v1/fireASF/dataSync"
,
"isNotIot"
),
AST_FIRE_EQUIP_DEFECT_ALARM
(
"0805"
,
finalString
.
URL
,
finalString
.
ISNOTIOT
),
/**
* 消防车辆
*/
AST_FIRE_VEHICLE
(
"09"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_FIRE_VEHICLE
(
"09"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 消防车辆参数信息
*/
AST_FIRE_VEHICLE_INFO
(
"0901"
,
"cs/v1/fireAST/dataSync"
,
"isNotIot"
),
AST_FIRE_VEHICLE_INFO
(
"0901"
,
finalString
.
URLST
,
finalString
.
ISNOTIOT
),
/**
* 消防车辆量测信息
*/
AST_FIRE_VEHICLE_MEASUREMENT
(
"0902"
,
"cs/v1/fireAST/dataSync"
,
"isIot"
),
;
AST_FIRE_VEHICLE_MEASUREMENT
(
"0902"
,
finalString
.
URLST
,
"isIot"
);
/**
* 资源类型编码
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/dto/MaintenanceResourceDto.java
View file @
01388fc1
...
...
@@ -37,7 +37,5 @@ public class MaintenanceResourceDto extends BaseTreeNode {
*/
private
String
contractId
;
public
MaintenanceResourceDto
()
{
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/ConfirmEquipmentSpecificAlarm.java
View file @
01388fc1
//package com.yeejoin.equipmanage.common.entity;
//
//import com.baomidou.mybatisplus.annotation.TableField;
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.equipmanage.common.entity.publics.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//
//import java.util.Date;
//
///**
// * @author DELL
// */
//@Data
//@TableName("wl_equipment_specific_alarm")
//@EqualsAndHashCode(callSuper = true)
//@ApiModel(value = "wl_equipment_specific_alarm", description = "设备报警信息表")
//public class ConfirmEquipmentSpecificAlarm extends BaseEntity {
//
// @ApiModelProperty(value = "机构code")
// @TableField("org_code")
// private String orgCode;
//
// @ApiModelProperty(value = "装备名称")
// @TableField("equipment_specific_name")
// private String equipmentSpecificName;
//
// @ApiModelProperty(value = "消防设备id")
// @TableField("equipment_specific_id")
// private Long equipmentSpecificId;
//
// @ApiModelProperty(value = "iot编码")
// @TableField("iot_code")
// private String iotCode;
//
// @ApiModelProperty(value = "指标名称")
// @TableField("equipment_specific_index_name")
// private String equipmentSpecificIndexName;
//
// @ApiModelProperty(value = "指标编码")
// @TableField("equipment_specific_index_key")
// private String equipmentSpecificIndexKey;
//
// @ApiModelProperty(value = "报警值")
// @TableField("equipment_specific_index_value")
// private String equipmentSpecificIndexValue;
//
// @ApiModelProperty(value = "发生频次")
// @TableField("frequency")
// private int frequency;
//
// @ApiModelProperty(value = "报警状态:1报警0恢复")
// @TableField("status")
// private int status;
//
// @ApiModelProperty(value = "报警类型:alarm_type_fire(火灾报警)/alarm_type_trouble(故障告警)")
// @TableField("type")
// private String type;
//
// @ApiModelProperty(value = "更新时间")
// @TableField("update_date")
// private Date updateDate;
//
// @ApiModelProperty(value = "告警恢复时间")
// @TableField("recovery_date")
// private Date recoveryDate;
//
// @ApiModelProperty(value = "指标id")
// @TableField("equipment_index_id")
// private Long equipmentIndexId;
//
// @ApiModelProperty(value = "确认类型")
// @TableField("confirm_type")
// private String confirmType;
//
// @ApiModelProperty(value = "报警原因")
// @TableField("alam_reason")
// private String alamReason;
//
// @ApiModelProperty(value = "处理情况")
// @TableField("resolve_result")
// private String resolveResult;
//
// @ApiModelProperty(value = "确警人员")
// @TableField("confirm_user")
// private String confirmUser;
//
// @ApiModelProperty(value = "确警时间")
// @TableField("confirm_date")
// private Date confirmDate;
//
//
// @ApiModelProperty(value = "画布id")
// @TableField(exist = false)
// private Long sceneId;
//
// @ApiModelProperty(value = "告警内容")
// @TableField(exist = false)
// private String alamContent;
//
// @ApiModelProperty(value = "告警部位")
// @TableField(exist = false)
// private String alamPlace;
//
// @ApiModelProperty(value = "告警设备名称")
// @TableField(exist = false)
// private String equipmentName;
//
// @ApiModelProperty(value = "保护对象")
// @TableField(exist = false)
// private String protectName;
//
// @ApiModelProperty(value = "是否已处理")
// @TableField(exist = false)
// private String isConfirm;
//
// @ApiModelProperty(value = "是否批量")
// @TableField(exist = false)
// private int isBatch;
//
//
//}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentCategory.java
View file @
01388fc1
...
...
@@ -49,9 +49,7 @@ public class EquipmentCategory extends BaseEntity implements TreeNode<EquipmentC
@ApiModelProperty
(
value
=
"行业id"
)
private
String
industryCode
;
// 此业务字段暂时不用,后期业务下发可放开
// @ApiModelProperty(value = "装备二级分类图片")
// private String img;
@ApiModelProperty
(
value
=
"行业名称"
)
@TableField
(
exist
=
false
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificIndex.java
View file @
01388fc1
...
...
@@ -103,8 +103,7 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
indexName
;
// @TableField(exist = false)
// private String equipmentSpecificName;
@TableField
(
exist
=
false
)
private
String
equipmentSpecificIndexName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/MyByteArrayMultipartFile.java
View file @
01388fc1
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.yeejoin.equipmanage.common.exception.BaseException
;
import
lombok.NonNull
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -66,7 +67,9 @@ public class MyByteArrayMultipartFile implements MultipartFile {
try
{
outputStream
=
new
FileOutputStream
(
destination
);
outputStream
.
write
(
bytes
);
}
finally
{
}
catch
(
Exception
e
){
throw
new
BaseException
(
"系统异常!"
);
}
finally
{
if
(
outputStream
!=
null
)
{
outputStream
.
close
();
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/dto/SourceNameListDTO.java
View file @
01388fc1
...
...
@@ -9,7 +9,7 @@ import lombok.Data;
* @since v2.0
*/
@Data
public
class
SourceNameListDTO
extends
BaseDTO
{
public
class
SourceNameListDTO
extends
BaseDTO
<
SourceNameListDTO
>
{
/**
* 建筑id
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/dto/TopographyTreeDTO.java
View file @
01388fc1
...
...
@@ -15,7 +15,7 @@ import java.util.Date;
* @version $Id: TopographyTreeDTO.java, v 0.1 2021年10月19日 下午1:46:23 gwb Exp $
*/
@Data
public
class
TopographyTreeDTO
implements
TreeNode
{
public
class
TopographyTreeDTO
implements
TreeNode
<
TopographyTreeDTO
,
String
>
{
/**
...
...
@@ -69,7 +69,7 @@ public class TopographyTreeDTO implements TreeNode {
*/
private
String
authOrg
;
private
Collection
children
;
private
Collection
<
TopographyTreeDTO
>
children
;
@Override
public
String
getMyParentId
()
...
...
@@ -83,11 +83,11 @@ public class TopographyTreeDTO implements TreeNode {
return
this
.
code
;
}
@Override
public
int
compareTo
(
Object
o
)
{
TreeNode
node
=
(
TreeNode
)
o
;
return
node
.
getMyId
().
equals
(
this
.
code
)?
0
:
1
;
}
@Override
public
int
compareTo
(
TopographyTreeDTO
o
)
{
TopographyTreeDTO
node
=
o
;
return
node
.
getMyId
().
equals
(
this
.
code
)?
0
:
1
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/publics/BaseTreeNode.java
View file @
01388fc1
...
...
@@ -35,8 +35,7 @@ public class BaseTreeNode {
public
BaseTreeNode
()
{
}
public
String
getId
()
{
return
id
;
...
...
@@ -83,8 +82,9 @@ public class BaseTreeNode {
}
public
void
addChild
(
BaseTreeNode
baseTreeNode
)
{
if
(
this
.
children
==
null
)
{
this
.
setChildren
(
new
ArrayList
());
this
.
setChildren
(
new
ArrayList
<
BaseTreeNode
>
());
}
this
.
getChildren
().
add
(
baseTreeNode
);
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/DevOverviewVO.java
View file @
01388fc1
...
...
@@ -27,28 +27,6 @@ public class DevOverviewVO {
private
String
qrCode
;
// 图片名称
private
String
picName
;
//'items': [
// { 'key': '设备名称', 'value': ''
// },
// { 'key': '器材分类', 'value': ''
// },
// { 'key': '设备名称', 'value': ''
// },
// { 'key': '安装位置', 'value': ''
// },
// { 'key': '运行状态', 'value': ''
// },
// { 'key': '维保状态', 'value': ''
// },
// { 'key': '巡检状态', 'value': ''
// },
// { 'key': '编码', 'value': ''
// },
// { 'key': '所属系统', 'value': ''
// },
// { 'key': '负责人', 'value': ''
// }
// ]
// }
private
List
<
Map
<
String
,
Object
>>
items
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/DownloadEquipmentDataVO.java
View file @
01388fc1
...
...
@@ -51,15 +51,7 @@ public class DownloadEquipmentDataVO {
*/
private
Long
equipmentId
;
/**
* 装备定义名
*/
// private String equipmentName;
/**
* 装备定义编码
*/
// private String equipmentCode;
/**
* 装备定义非核心性能指标
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/ProductInfoVO.java
View file @
01388fc1
...
...
@@ -17,28 +17,6 @@ public class ProductInfoVO {
private
List
<
String
>
pic
;
// 图片名称
private
String
picName
;
//'items': [
// { 'key': '名称', 'value': ''
// },
// { 'key': '规格型号', 'value': ''
// },
// { 'key': '进口/国产', 'value': ''
// },
// { 'key': '维保周期', 'value': ''
// },
// { 'key': '报废年限', 'value': ''
// },
// { 'key': '计量单位', 'value': ''
// },
// { 'key': '品牌', 'value': ''
// },
// { 'key': '国别', 'value': ''
// },
// { 'key': '巡检频率', 'value': ''
// },
// { 'key': '备注', 'value': ''
// }
// ]
// },
private
List
<
Map
<
String
,
Object
>>
items
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/EquipStatusChecker.java
View file @
01388fc1
...
...
@@ -20,13 +20,7 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能重复维修!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能维修!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能维修!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能维修!");
//
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能维修!"
);
case
LOSS:
...
...
@@ -48,12 +42,7 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能保养!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能保养!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能保养!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能保养!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能保养!"
);
case
LOSS:
...
...
@@ -75,12 +64,7 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能调拨!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能调拨!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能调拨!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能调拨!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能调拨!"
);
case
LOSS:
...
...
@@ -100,20 +84,14 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能出库!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能执行出库操作!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能执行出库操作!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能执行出库操作!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能执行出库操作!"
);
case
LOAD:
return
createResult
(
false
,
"该装备已配装,不能执行出库操作!"
);
// case ONDUTY:
// return createResult(false, "该装备正在执勤中,不能执行出库操作!");
default
:
return
createResult
(
true
,
""
);
}
...
...
@@ -129,16 +107,10 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能借出!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能再次借出!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能借出!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能借用!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能借出!"
);
// case ONDUTY:
// return createResult(false, "该装备正在执勤中,不能借出!");
case
LOSS:
return
createResult
(
false
,
"该装备已损耗,不能借出!"
);
default
:
...
...
@@ -156,16 +128,10 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能转移货位!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能转移货位!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能转移货位!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能转移货位!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能转移货位!"
);
// case ONDUTY:
// return createResult(false, "该装备正在执勤中,不能转移货位!");
case
LOSS:
return
createResult
(
false
,
"该装备已损耗,不能转移货位!"
);
default
:
...
...
@@ -183,16 +149,10 @@ public class EquipStatusChecker {
switch
(
status
)
{
case
REPAIR:
return
createResult
(
false
,
"该装备正在维修中,不能执勤!"
);
// case LOAN:
// return createResult(false, "该装备已借出,不能执勤!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能执勤!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能执勤!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能执勤!"
);
// case ONDUTY:
// return createResult(false, "该装备正在执勤中,不能重复执勤!");
case
LOSS:
return
createResult
(
false
,
"该装备已损耗,不能执勤!"
);
default
:
...
...
@@ -208,12 +168,7 @@ public class EquipStatusChecker {
*/
public
static
Result
isStockable
(
EquipStatusEnum
status
)
{
switch
(
status
)
{
// case LOAN:
// return createResult(false, "该装备已借出,不能变为在位状态!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能变为在位状态!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能变为在位状态!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能变为在位状态!"
);
case
LOSS:
...
...
@@ -231,12 +186,7 @@ public class EquipStatusChecker {
*/
public
static
Result
isRetirementable
(
EquipStatusEnum
status
)
{
switch
(
status
)
{
// case LOAN:
// return createResult(false, "该装备已借出,不能退役!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能退役!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能退役!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能退役!"
);
case
LOSS:
...
...
@@ -254,18 +204,10 @@ public class EquipStatusChecker {
*/
public
static
Result
isScrapable
(
EquipStatusEnum
status
)
{
switch
(
status
)
{
// case LOAN:
// return createResult(false, "该装备已借出,不能报废!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能报废!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能报废!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能再次报废!"
);
// case ONDUTY:
// return createResult(false, "该装备正在执勤中,请先退役后再进行报废操作!");
// case REPERTORY:
// return createResult(false, "该装备目前是库存状态,请先退役后再进行报废操作!");
case
LOSS:
return
createResult
(
false
,
"该装备目前是损耗状态,不能进行报废操作!"
);
case
LOAD:
...
...
@@ -283,12 +225,7 @@ public class EquipStatusChecker {
*/
public
static
Result
isLoadable
(
EquipStatusEnum
status
)
{
switch
(
status
)
{
// case LOAN:
// return createResult(false, "该装备已借出,不能被装载!");
// case BORROW:
// return createResult(false, "该装备是借用装备,不能被装载!");
// case RETURN:
// return createResult(false, "该借用装备已归还借用方,不能被装载!");
case
SCRAP:
return
createResult
(
false
,
"该装备已报废,不能被装载!"
);
case
REPAIR:
...
...
@@ -310,10 +247,7 @@ public class EquipStatusChecker {
*/
public
static
Result
isReturnable
(
EquipStatusEnum
status
)
{
switch
(
status
)
{
// case BORROW:
// return createResult(false, "该装备是借用装备,请让借出方执行归还操作!");
// case LOAN:
// return createResult(true, "");
default
:
return
createResult
(
false
,
"该装备未被借出,不能进行归还操作!"
);
}
...
...
@@ -328,4 +262,6 @@ public class EquipStatusChecker {
return
result
;
}
private
EquipStatusChecker
()
{
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/EquipStatusEnum.java
View file @
01388fc1
...
...
@@ -42,15 +42,5 @@ public enum EquipStatusEnum {
return
equipStatusEnum
;
}
// public static EquipStatusEnum getEnum(String describe) {
// EquipStatusEnum equipStatusEnum = null;
// for (EquipStatusEnum type : EquipStatusEnum.values()) {
// if (type.getDescribe().equals(describe)) {
// equipStatusEnum = type;
// break;
// }
// }
//
// return equipStatusEnum;
// }
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/TemperatureAlarm.java
View file @
01388fc1
...
...
@@ -7,12 +7,7 @@ package com.yeejoin.equipmanage.common.enums;
*/
public
class
TemperatureAlarm
{
//规则温度
private
Double
ruleTemperature
;
//当前温度
private
Double
currTemperature
;
//测温单位
private
String
thermometryUnit
;
public
enum
AlarmLevel
{
alarmLevel_0
(
"0"
,
"预警"
),
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/exception/handle/GlobalExceptionHandler.java
View file @
01388fc1
...
...
@@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -23,12 +24,18 @@ public class GlobalExceptionHandler {
private
Logger
log
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
public
GlobalExceptionHandler
()
{
log
.
info
(
"开始"
);
}
@ExceptionHandler
({
Exception
.
class
})
public
ResponseModel
<
Object
>
MethodArgumentNotValidHandler
(
Exception
exception
)
throws
Exception
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
())
.
getRequest
();
HttpServletRequest
request
=
null
;
RequestAttributes
re
=
RequestContextHolder
.
getRequestAttributes
();
if
(
re
!=
null
){
request
=
((
ServletRequestAttributes
)
re
).
getRequest
();
}
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
//解析平台返回错误信息,统一返回403,app 端统一跳转到登录页面
...
...
@@ -41,7 +48,7 @@ public class GlobalExceptionHandler {
response
.
setDevMessage
(
"FAILED"
);
response
.
setMessage
(
exception
.
getMessage
());
response
.
setTraceId
(
RequestContext
.
getTraceId
());
response
.
setPath
(
request
.
getServletPath
()
);
response
.
setPath
(
request
!=
null
?
request
.
getServletPath
():
null
);
exception
.
printStackTrace
();
return
response
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/exception/handle/GlobalResponseHandler.java
View file @
01388fc1
...
...
@@ -30,7 +30,7 @@ public class GlobalResponseHandler implements ResponseBodyAdvice<Object> {
static
LinkedList
<
String
>
filterUrl
=
new
LinkedList
<>();
{
static
{
filterUrl
.
add
(
SWAGGER_URL
);
filterUrl
.
add
(
SWAGGER_RESOURCES
);
filterUrl
.
add
(
CSRF
);
...
...
@@ -45,12 +45,7 @@ public class GlobalResponseHandler implements ResponseBodyAdvice<Object> {
*/
@Override
public
boolean
supports
(
MethodParameter
methodParameter
,
Class
<?
extends
HttpMessageConverter
<?>>
aClass
)
{
// 获取当前处理请求的controller的方法
String
methodName
=
methodParameter
.
getMethod
().
getName
();
// 不拦截/不需要处理返回值 的方法
String
method
=
"loginCheck"
;
// 拦截 false
// return !method.equals(methodName);
return
true
;
}
...
...
@@ -73,13 +68,7 @@ public class GlobalResponseHandler implements ResponseBodyAdvice<Object> {
}
}
// 平台返回参数
// ResponseModel<T> response = new ResponseModel<>();
// HttpServletRequest request = ((ServletRequestAttributes)
// RequestContextHolder.getRequestAttributes()).getRequest();
// response.setResult(t);
// response.setDevMessage("SUCCESS");
// response.setStatus(HttpStatus.OK.value());
ResponseModel
<
Object
>
res
=
ResponseHelper
.
buildResponse
(
body
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/response/Common3dResponse.java
View file @
01388fc1
...
...
@@ -68,9 +68,7 @@ public class Common3dResponse {
this
.
message
=
message
;
}
// public Boolean isSuccess() {
// return "SUCCESS".equals(getCode());
// }
public
Integer
getId
()
{
return
id
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/response/Common3dResponseUtil.java
View file @
01388fc1
...
...
@@ -12,11 +12,16 @@ import com.yeejoin.equipmanage.common.constant.Constant;
* @Version: 1.0
*/
public
class
Common3dResponseUtil
{
private
static
final
String
CODE
=
"47100"
;
private
Common3dResponseUtil
()
{
}
public
static
Common3dResponse
success
()
{
Common3dResponse
response
=
new
Common3dResponse
();
response
.
setId
(
1
);
response
.
setCode
(
"47100"
);
response
.
setCode
(
CODE
);
response
.
setMessage
(
Constant
.
RESULT_SUCCESS
);
return
response
;
}
...
...
@@ -25,7 +30,7 @@ public class Common3dResponseUtil {
{
Common3dResponse
response
=
new
Common3dResponse
();
response
.
setId
(
1
);
response
.
setCode
(
"47100"
);
response
.
setCode
(
CODE
);
response
.
setMessage
(
Constant
.
RESULT_SUCCESS
);
response
.
setBody
(
obj
);
return
response
;
...
...
@@ -35,7 +40,7 @@ public class Common3dResponseUtil {
{
Common3dResponse
response
=
new
Common3dResponse
();
response
.
setId
(
1
);
response
.
setCode
(
"47100"
);
response
.
setCode
(
CODE
);
response
.
setBody
(
obj
);
response
.
setMessage
(
message
);
return
response
;
...
...
@@ -45,7 +50,7 @@ public class Common3dResponseUtil {
{
Common3dResponse
response
=
new
Common3dResponse
();
response
.
setId
(
0
);
response
.
setCode
(
"47100"
);
response
.
setCode
(
CODE
);
response
.
setMessage
(
Constant
.
RESULT_FAILURE
);
return
response
;
}
...
...
@@ -54,7 +59,7 @@ public class Common3dResponseUtil {
{
Common3dResponse
response
=
new
Common3dResponse
();
response
.
setId
(
0
);
response
.
setCode
(
"47100"
);
response
.
setCode
(
CODE
);
response
.
setMessage
(
message
);
return
response
;
}
...
...
@@ -63,7 +68,7 @@ public class Common3dResponseUtil {
{
Common3dResponse
response
=
new
Common3dResponse
();
response
.
setId
(
0
);
response
.
setCode
(
"47100"
);
response
.
setCode
(
CODE
);
response
.
setBody
(
obj
);
response
.
setMessage
(
message
);
return
response
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/ArrayUtil.java
View file @
01388fc1
...
...
@@ -63,4 +63,7 @@ public class ArrayUtil {
public
static
<
T
,
R
>
Set
<
R
>
collectSet
(
final
List
<
T
>
arrayList
,
Function
<
T
,
R
>
function
)
{
return
arrayList
.
stream
().
map
(
function
).
collect
(
Collectors
.
toSet
());
}
private
ArrayUtil
()
{
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/BillCodeManagerUtil.java
View file @
01388fc1
...
...
@@ -223,8 +223,7 @@ public class BillCodeManagerUtil {
if
(
null
==
prefix
||
null
==
code
)
{
throw
new
IllegalArgumentException
(
"未输入正确参数,编码前缀(prefix),编码(code)!"
);
}
System
.
out
.
println
(
"生成code :"
+
code
);
String
tmp_prefix
=
prefix
.
toUpperCase
();
switch
(
tmp_prefix
)
{
case
INBOUND:
...
...
@@ -252,7 +251,6 @@ public class BillCodeManagerUtil {
case
LOSS:
return
checkWastageCode
(
code
);
default
:
System
.
out
.
println
(
"由于未在本类中定义前缀,因此默认使用 DF !!!!!!!!!!!!!!!!!!!!"
);
return
checkOtherCode
(
code
);
}
}
...
...
@@ -305,5 +303,7 @@ public class BillCodeManagerUtil {
private
static
String
getRecoedCode
(
String
key
)
{
return
codes
.
get
(
key
);
}
private
BillCodeManagerUtil
()
{
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/ChartsUtils.java
View file @
01388fc1
...
...
@@ -20,8 +20,6 @@ import org.springframework.util.ObjectUtils;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.*
;
...
...
@@ -32,6 +30,8 @@ import java.util.*;
*/
public
class
ChartsUtils
{
private
ChartsUtils
()
{
}
public
static
String
pieChart
(
List
<
Map
<
String
,
Object
>>
data
,
String
title
)
{
//如 果不使用Font,中文将显示不出来
...
...
@@ -40,9 +40,7 @@ public class ChartsUtils {
// 创建数据:饼状图就是名称和值(比例)
Map
<
String
,
Double
>
map
=
new
HashMap
<
String
,
Double
>();
// for (int i = 0; i < name.size(); i++) {
// map.put(name.get(i), value.get(i));
// }
for
(
Map
<
String
,
Object
>
item
:
data
)
{
map
.
put
(
String
.
valueOf
(
item
.
get
(
"type"
)),
Double
.
parseDouble
(
ObjectUtils
.
isEmpty
(
item
.
get
(
"value"
))?
"0"
:
String
.
valueOf
(
item
.
get
(
"value"
))));
...
...
@@ -50,39 +48,19 @@ public class ChartsUtils {
}
// 创建JFreeChart
JFreeChart
chart
=
createPieChart
(
title
,
map
,
font
);
BufferedImage
image
=
chart
.
createBufferedImage
(
600
,
600
)
;
BufferedImage
image
=
chart
!=
null
?
chart
.
createBufferedImage
(
600
,
600
):
null
;
byte
[]
bytes
=
null
;
try
{
bytes
=
ChartUtilities
.
encodeAsPNG
(
image
);
}
catch
(
IOException
e1
)
{
System
.
out
.
println
(
"生成饼图失败"
);
e1
.
printStackTrace
(
);
}
return
Base64
.
getEncoder
().
encodeToString
(
bytes
);
}
private
static
byte
[]
fileToByte
(
File
file
)
{
byte
[]
fileBytes
=
null
;
FileInputStream
fis
=
null
;
try
{
fis
=
new
FileInputStream
(
file
);
fileBytes
=
new
byte
[(
int
)
file
.
length
()];
fis
.
read
(
fileBytes
);
fis
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
fis
!=
null
)
{
try
{
fis
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
fileBytes
;
}
/**
...
...
@@ -97,8 +75,8 @@ public class ChartsUtils {
try
{
Set
<
Map
.
Entry
<
String
,
Double
>>
set
=
data
.
entrySet
();
DefaultPieDataset
pds
=
new
DefaultPieDataset
();
Iterator
iterator
=
set
.
iterator
();
Map
.
Entry
entry
;
Iterator
<
Map
.
Entry
<
String
,
Double
>>
iterator
=
set
.
iterator
();
Map
.
Entry
<
String
,
Double
>
entry
;
while
(
iterator
.
hasNext
())
{
entry
=
(
Map
.
Entry
)
iterator
.
next
();
pds
.
setValue
(
entry
.
getKey
().
toString
(),
Double
.
parseDouble
(
entry
.
getValue
().
toString
()));
...
...
@@ -123,11 +101,9 @@ public class ChartsUtils {
plot
.
setBackgroundAlpha
(
0.0f
);
//设置标签生成器(默认{0})
//{0}:key {1}:value {2}:百分比 {3}:sum
plot
.
setLabelGenerator
(
new
StandardPieSectionLabelGenerator
(
"{0}({1})/{2}"
));
// 一般在{1}后面加单位,如:{0}({1}次)/{2}
plot
.
setLabelGenerator
(
new
StandardPieSectionLabelGenerator
(
"{0}({1})/{2}"
));
//将内存中的图片写到本地硬盘
// ChartUtilities.saveChartAsJPEG(new File("H:/a.png"), chart, 600, 300);
// 标注位于上侧
// chart.getLegend().setPosition(RectangleEdge.TOP);
// 设置标注无边框
chart
.
getLegend
().
setFrame
(
new
BlockBorder
(
Color
.
WHITE
));
return
chart
;
...
...
@@ -156,7 +132,7 @@ public class ChartsUtils {
try
{
bytes
=
ChartUtilities
.
encodeAsPNG
(
image
);
}
catch
(
IOException
e1
)
{
System
.
out
.
println
(
"生成折线图失败"
);
e1
.
printStackTrace
(
);
}
return
Base64
.
getEncoder
().
encodeToString
(
bytes
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CodeGenerate.java
View file @
01388fc1
...
...
@@ -18,4 +18,6 @@ public class CodeGenerate {
return
id
;
}
private
CodeGenerate
()
{
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CommonPageParamUtil.java
View file @
01388fc1
...
...
@@ -5,8 +5,10 @@ import org.springframework.util.CollectionUtils;
import
java.util.List
;
public
class
CommonPageParamUtil
{
private
CommonPageParamUtil
()
{
}
public
static
CommonPageInfoParam
fillCommonPageInfoParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
)
{
public
static
CommonPageInfoParam
fillCommonPageInfoParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
new
CommonPageInfoParam
();
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++){
String
name
=
queryRequests
.
get
(
i
).
getName
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CommonResponseUtil.java
View file @
01388fc1
...
...
@@ -6,53 +6,57 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
public
class
CommonResponseUtil
{
public
static
ResponseModel
success
()
private
CommonResponseUtil
()
{
}
public
static
ResponseModel
<
Object
>
success
()
{
ResponseModel
res
=
new
ResponseModel
();
ResponseModel
<
Object
>
res
=
new
ResponseModel
<>
();
res
.
setDevMessage
(
Constant
.
RESULT_SUCCESS
);
res
.
setStatus
(
HttpStatus
.
OK
.
value
());
return
res
;
}
public
static
ResponseModel
success
(
Object
obj
)
public
static
ResponseModel
<
Object
>
success
(
Object
obj
)
{
ResponseModel
res
=
new
ResponseModel
();
ResponseModel
<
Object
>
res
=
new
ResponseModel
<>
();
res
.
setResult
(
obj
);
res
.
setDevMessage
(
Constant
.
RESULT_SUCCESS
);
res
.
setStatus
(
HttpStatus
.
OK
.
value
());
return
res
;
}
public
static
ResponseModel
success
(
Object
obj
,
String
message
)
public
static
ResponseModel
<
Object
>
success
(
Object
obj
,
String
message
)
{
ResponseModel
res
=
new
ResponseModel
();
ResponseModel
<
Object
>
res
=
new
ResponseModel
<>
();
res
.
setResult
(
obj
);
res
.
setDevMessage
(
message
);
res
.
setStatus
(
HttpStatus
.
OK
.
value
());
return
res
;
}
public
static
ResponseModel
failure
()
public
static
ResponseModel
<
Object
>
failure
()
{
ResponseModel
res
=
new
ResponseModel
();
ResponseModel
<
Object
>
res
=
new
ResponseModel
<>
();
res
.
setDevMessage
(
Constant
.
RESULT_FAILURE
);
res
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
res
;
}
public
static
ResponseModel
failure
(
String
message
)
public
static
ResponseModel
<
Object
>
failure
(
String
message
)
{
ResponseModel
res
=
new
ResponseModel
();
ResponseModel
<
Object
>
res
=
new
ResponseModel
<>
();
res
.
setDevMessage
(
Constant
.
RESULT_FAILURE
);
res
.
setMessage
(
message
);
res
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
res
;
}
public
static
ResponseModel
failure
(
Object
obj
,
String
message
)
public
static
ResponseModel
<
Object
>
failure
(
Object
obj
,
String
message
)
{
ResponseModel
res
=
new
ResponseModel
();
ResponseModel
<
Object
>
res
=
new
ResponseModel
<>
();
res
.
setResult
(
obj
);
res
.
setMessage
(
message
);
res
.
setDevMessage
(
Constant
.
RESULT_FAILURE
);
res
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
res
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/ConverterUtil.java
View file @
01388fc1
...
...
@@ -17,6 +17,9 @@ import java.text.ParseException;
public
class
ConverterUtil
{
private
ConverterUtil
()
{
}
/**
* Gets a String from a Object in a null-safe manner.
* <p>
...
...
@@ -113,6 +116,7 @@ public class ConverterUtil {
* @return the value of the Object as a Boolean, <code>null</code> if null object input
*/
public
static
Boolean
getAsBoolean
(
final
Object
obj
)
{
Boolean
fla
=
null
;
if
(
obj
!=
null
)
{
if
(
obj
instanceof
Boolean
)
{
return
(
Boolean
)
obj
;
...
...
@@ -125,7 +129,7 @@ public class ConverterUtil {
throw
new
UnsupportedOperationException
();
}
}
return
null
;
return
fla
;
}
/**
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CustomUtil.java
View file @
01388fc1
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
public
class
CustomUtil
{
private
CustomUtil
()
{
}
/**
* 去掉末尾的0
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/DateUtils.java
View file @
01388fc1
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/DocUtil.java
View file @
01388fc1
...
...
@@ -10,6 +10,8 @@ import org.jsoup.select.Elements;
import
java.util.*
;
public
class
DocUtil
{
private
DocUtil
()
{
}
/**
* doc对应的html转换
...
...
@@ -17,8 +19,7 @@ public class DocUtil {
* @return
*/
public
static
Map
<
String
,
Object
>
processDoc
(
String
html
){
String
res
=
html
.
replaceAll
(
"black"
,
"white"
);
res
=
html
.
replaceAll
(
"background-color:#ffffff"
,
""
);
String
res
=
html
.
replace
(
"background-color:#ffffff"
,
""
);
Document
doc
=
Jsoup
.
parse
(
res
);
updateStyle
(
doc
);
...
...
@@ -36,12 +37,12 @@ public class DocUtil {
if
(
level
>
5
){
level
=
-
1
;
}
id
=
attr
.
getValue
();
attr
.
getValue
();
}
}
if
(
level
>-
1
){
Elements
children
=
element
.
children
();
StringBu
ffer
sb
=
new
StringBuff
er
();
StringBu
ilder
sb
=
new
StringBuild
er
();
for
(
Element
element2
:
children
)
{
sb
.
append
(
element2
.
text
());
}
...
...
@@ -77,8 +78,7 @@ public class DocUtil {
}
lastlevel
=
level
;
}
// System.out.println(JSON.toJSONString(root.getChildren()));
// System.out.println(doc.toString());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"nodes"
,
root
.
getChildren
());
map
.
put
(
"html"
,
doc
.
toString
());
...
...
@@ -92,8 +92,7 @@ public class DocUtil {
* @return
*/
public
static
Map
<
String
,
Object
>
processDocx
(
String
html
){
String
res
=
html
.
replaceAll
(
"black"
,
"white"
);
res
=
html
.
replaceAll
(
"background-color:#ffffff"
,
""
);
String
res
=
html
.
replace
(
"background-color:#ffffff"
,
""
);
Document
doc
=
Jsoup
.
parse
(
res
);
updateStyle
(
doc
);
Elements
head
=
doc
.
getElementsByTag
(
"head"
);
...
...
@@ -113,6 +112,7 @@ public class DocUtil {
try
{
level
=
Integer
.
parseInt
(
s
.
substring
(
1
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
...
...
@@ -120,7 +120,7 @@ public class DocUtil {
}
if
(
level
>-
1
){
Elements
children
=
element
.
children
();
StringBu
ffer
sb
=
new
StringBuff
er
();
StringBu
ilder
sb
=
new
StringBuild
er
();
for
(
Element
element2
:
children
)
{
sb
.
append
(
element2
.
text
());
}
...
...
@@ -156,8 +156,7 @@ public class DocUtil {
}
lastlevel
=
level
;
}
// System.out.println(JSON.toJSONString(root.getChildren()));
// System.out.println(doc.toString());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"nodes"
,
root
.
getChildren
());
map
.
put
(
"html"
,
doc
.
toString
());
...
...
@@ -166,18 +165,7 @@ public class DocUtil {
//修改样式为白色
private
static
void
updateStyle
(
Document
doc
)
{
// Elements styleEle = doc.getElementsByTag("style");
// styleEle.append("th{border:solid #FFFFFF}" +
// "td{border:solid #ffffff;border-top:solid #FFFFFF !important;border-bottom:solid #ffffff !important"
// + ",border-right:solid #ffffff !important;border-left:solid #ffffff !important}" +
// "table{border:solid ;background-color: transparent !important}"+
// "a{color:#FFFFFF}");
// Elements bodyEle = doc.getElementsByTag("body");
// bodyEle.attr("style", "color:#FFFFFF");
// Elements spans = doc.getElementsByTag("span");
// spans.attr("style", "color:#FFFFFF");
// Elements as = doc.getElementsByTag("a");
// as.attr("style", "color:#FFFFFF");
Elements
table
=
doc
.
getElementsByTag
(
"table"
);
table
.
attr
(
"style"
,
"width: 100%"
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/EnumsUtils.java
View file @
01388fc1
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.Arrays
;
import
java.util.Map
;
...
...
@@ -16,7 +17,10 @@ import java.util.function.Predicate;
*/
@Slf4j
public
class
EnumsUtils
{
private
static
Map
<
Class
,
Object
>
map
=
new
ConcurrentHashMap
<>();
private
EnumsUtils
()
{
}
private
static
Map
<
Class
<
T
>,
Object
>
map
=
new
ConcurrentHashMap
<>();
/**
* 根据条件获取枚举对象
...
...
@@ -26,9 +30,10 @@ public class EnumsUtils {
* @return
*/
public
static
<
T
>
Optional
<
T
>
getEnumObject
(
Class
<
T
>
className
,
Predicate
<
T
>
predicate
)
{
Optional
<
T
>
da
=
new
Optional
<>();
if
(!
className
.
isEnum
()){
log
.
info
(
"Class 不是枚举类"
);
return
null
;
return
da
;
}
Object
obj
=
map
.
get
(
className
);
T
[]
ts
=
null
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/EquipmentStateUtil.java
View file @
01388fc1
...
...
@@ -21,6 +21,8 @@ import java.util.stream.Collectors;
* @date 2021/1/8 09:32
*/
public
class
EquipmentStateUtil
{
private
EquipmentStateUtil
()
{
}
private
final
static
Logger
log
=
LoggerFactory
.
getLogger
(
EquipmentStateUtil
.
class
);
...
...
@@ -58,7 +60,7 @@ public class EquipmentStateUtil {
}
}
String
status
=
getStatus
(
stateVo
);
log
.
info
(
"此装备的状态为
: "
+
status
+
"(屏蔽-5, 火灾告警-4, 故障-3, 正常-2, 挂起-1)"
);
log
.
info
(
"此装备的状态为
(屏蔽-5, 火灾告警-4, 故障-3, 正常-2, 挂起-1): "
);
return
status
;
}
...
...
@@ -257,7 +259,7 @@ public class EquipmentStateUtil {
break
;
}
}
log
.
info
(
"此装备
"
+
index
.
getQrCode
()+
"的状态为: "
+
status
+
"(屏蔽-5, 火灾告警-4, 故障-3, 正常-2, 挂起-1)"
);
log
.
info
(
"此装备
状态为(屏蔽-5, 火灾告警-4, 故障-3, 正常-2, 挂起-1):"
);
return
status
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/ExcelUtil.java
View file @
01388fc1
...
...
@@ -26,7 +26,10 @@ import java.util.Map;
*/
public
class
ExcelUtil
{
private
ExcelUtil
()
{
}
private
static
final
String
TITLE
=
"title"
;
/**
*
* <pre>
...
...
@@ -65,7 +68,6 @@ public class ExcelUtil
for
(
short
j
=
0
;
j
<
list
.
size
();
j
=
(
short
)
(
j
+
1
))
{
HSSFCell
cell
=
row
.
createCell
(
j
);
// cell.setEncoding((short) 1);
if
(
i
==
0
)
{
cell
.
setCellStyle
(
style
);
...
...
@@ -157,17 +159,13 @@ public class ExcelUtil
{
String
name
=
new
String
(
fileName
.
getBytes
(
"UTF-8"
),
"ISO8859_1"
);
OutputStream
output
=
response
.
getOutputStream
();
// response.reset();
response
.
setHeader
(
"Content-disposition"
,
"attachment; filename="
+
name
);
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
workbook
.
write
(
output
);
output
.
flush
();
output
.
close
();
// // 输出Excel文件--保存到本地
// OutputStream output = new FileOutputStream(new File("F:/"+fileName));
// workbook.write(output); // 输出
// output.close();
}
catch
(
IOException
e
)
{
...
...
@@ -241,11 +239,9 @@ public class ExcelUtil
HSSFCellStyle
style
=
workbook
.
createCellStyle
();
HSSFFont
font
=
workbook
.
createFont
();
// font.setColor((short) 16);
font
.
setBold
(
true
);
font
.
setFontHeightInPoints
((
short
)
10
);
style
.
setFont
(
font
);
// style.setFillForegroundColor((short) 9);
style
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
setBorderStyle
(
style
);
...
...
@@ -262,8 +258,6 @@ public class ExcelUtil
font3
.
setFontHeightInPoints
((
short
)
12
);
style3
.
setFont
(
font3
);
style3
.
setWrapText
(
true
);
// style3.setFillForegroundColor((short) 13);
// style3.setAlignment(HorizontalAlignment.CENTER);
style3
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
HSSFRow
statisticRow
=
sheet
.
createRow
(
0
);
...
...
@@ -331,10 +325,7 @@ public class ExcelUtil
style
.
setWrapText
(
true
);
style
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
// 左右居中
style
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// style.setLeftBorderColor(HSSFColor.BLACK.index);// 左边框的颜色
// style.setRightBorderColor(HSSFColor.BLACK.index);// 右边框的颜色
// style.setBottomBorderColor(HSSFColor.BLACK.index); // 设置单元格的边框颜色
// style.setFillForegroundColor(HSSFColor.WHITE.index);
style
.
setBorderBottom
(
BorderStyle
.
THIN
);
style
.
setBorderLeft
(
BorderStyle
.
THIN
);
style
.
setBorderRight
(
BorderStyle
.
THIN
);
...
...
@@ -536,7 +527,7 @@ public class ExcelUtil
CellStyle
style3
=
getTitleStyle
(
workbook
);
/********************标题行************************/
setTitleValue
(
headers
.
get
(
"title"
),
style3
,
sheet
);
setTitleValue
(
headers
.
get
(
TITLE
),
style3
,
sheet
);
/**********************一级表头**********************/
List
<
CellRangeAddress
>
rangelist
=
new
ArrayList
<
CellRangeAddress
>();
// 合并单元格集合
...
...
@@ -559,8 +550,7 @@ public class ExcelUtil
//需要为合并的每个单元格都赋值,否则第二个合并后的单元格值无法显示
firstHeadCell
.
setCellValue
(
firstHeadValue
);
//设置单元格宽度自适应
// sheet.setColumnWidth(j, firstHeadValue.getBytes().length*256);
}
start
=
start
+
Integer
.
valueOf
(
firstHeadArray
[
1
]);
//计算下一个标题的单元格起始位置
...
...
@@ -611,7 +601,7 @@ public class ExcelUtil
setMidContentValue
(
contents
,
style
,
sheet
,
4
);
/**********************填充表格内容最后一行**********************/
int
titleSize
=
Integer
.
valueOf
(
headers
.
get
(
"title"
).
get
(
0
).
split
(
":"
)[
1
]);
int
titleSize
=
Integer
.
valueOf
(
headers
.
get
(
TITLE
).
get
(
0
).
split
(
":"
)[
1
]);
Row
endContentRow
=
sheet
.
createRow
(
4
+
contents
.
size
());
endContentRow
.
setHeightInPoints
(
30
);
sheet
.
addMergedRegion
(
new
CellRangeAddress
...
...
@@ -654,7 +644,7 @@ public class ExcelUtil
CellStyle
style3
=
getTitleStyle
(
workbook
);
/********************填充标题行************************/
setTitleValue
(
headers
.
get
(
"title"
),
style3
,
sheet
);
setTitleValue
(
headers
.
get
(
TITLE
),
style3
,
sheet
);
/**********************填充表头**********************/
Row
headRow
=
sheet
.
createRow
(
1
);
...
...
@@ -670,7 +660,7 @@ public class ExcelUtil
setMidContentValue
(
contents
,
style
,
sheet
,
3
);
/**********************填充表格内容最后一行**********************/
int
titleSize
=
Integer
.
valueOf
(
headers
.
get
(
"title"
).
get
(
0
).
split
(
":"
)[
1
]);
int
titleSize
=
Integer
.
valueOf
(
headers
.
get
(
TITLE
).
get
(
0
).
split
(
":"
)[
1
]);
Row
endContentRow
=
sheet
.
createRow
(
3
+
contents
.
size
());
endContentRow
.
setHeightInPoints
(
30
);
sheet
.
addMergedRegion
(
new
CellRangeAddress
...
...
@@ -727,11 +717,9 @@ public class ExcelUtil
{
CellStyle
style
=
workbook
.
createCellStyle
();
Font
font
=
workbook
.
createFont
();
// font.setColor((short) 16);
//font.setBold(true);
font
.
setFontHeightInPoints
((
short
)
10
);
style
.
setFont
(
font
);
// style.setFillForegroundColor((short) 9);
style
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
style
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
setBorderStyle
(
style
);
...
...
@@ -807,8 +795,7 @@ public class ExcelUtil
style
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
style
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
style
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// style3.setFillForegroundColor((short) 13);
return
style
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/ExcelUtils.java
View file @
01388fc1
...
...
@@ -26,6 +26,8 @@ import java.util.regex.Pattern;
* @create: 2020-05-28 13:57
**/
public
class
ExcelUtils
{
private
ExcelUtils
()
{
}
/**
* excel 导出
...
...
@@ -104,7 +106,7 @@ public class ExcelUtils {
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
"Content-Disposition"
);
workbook
.
write
(
response
.
getOutputStream
());
}
catch
(
IOException
e
)
{
//throw new NormalException(e.getMessage()
);
e
.
printStackTrace
(
);
}
}
...
...
@@ -133,8 +135,9 @@ public class ExcelUtils {
* @return
*/
public
static
<
T
>
List
<
T
>
importExcel
(
String
filePath
,
Integer
titleRows
,
Integer
headerRows
,
Class
<
T
>
pojoClass
)
{
List
<
T
>
da
=
null
;
if
(
StringUtils
.
isBlank
(
filePath
))
{
return
null
;
return
da
;
}
ImportParams
params
=
new
ImportParams
();
params
.
setTitleRows
(
titleRows
);
...
...
@@ -143,10 +146,9 @@ public class ExcelUtils {
try
{
list
=
ExcelImportUtil
.
importExcel
(
new
File
(
filePath
),
pojoClass
,
params
);
}
catch
(
NoSuchElementException
e
)
{
//throw new NormalException("模板不能为空"
);
e
.
printStackTrace
(
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//throw new NormalException(e.getMessage());
}
return
list
;
}
...
...
@@ -162,8 +164,9 @@ public class ExcelUtils {
* @return
*/
public
static
<
T
>
List
<
T
>
importExcel
(
MultipartFile
file
,
Integer
titleRows
,
Integer
headerRows
,
Class
<
T
>
pojoClass
)
{
List
<
T
>
da
=
null
;
if
(
file
==
null
)
{
return
null
;
return
da
;
}
ImportParams
params
=
new
ImportParams
();
params
.
setTitleRows
(
titleRows
);
...
...
@@ -172,10 +175,9 @@ public class ExcelUtils {
try
{
list
=
ExcelImportUtil
.
importExcel
(
file
.
getInputStream
(),
pojoClass
,
params
);
}
catch
(
NoSuchElementException
e
)
{
// throw new NormalException("excel文件不能为空"
);
e
.
printStackTrace
(
);
}
catch
(
Exception
e
)
{
//throw new NormalException(e.getMessage());
System
.
out
.
println
(
e
.
getMessage
());
e
.
printStackTrace
();
}
return
list
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/ExtendedIOUtils.java
View file @
01388fc1
...
...
@@ -12,6 +12,8 @@ import java.io.IOException;
* @since 2018/12/27 17:56
*/
public
class
ExtendedIOUtils
{
private
ExtendedIOUtils
()
{
}
public
static
void
flush
(
Flushable
...
resources
)
throws
IOException
{
Assert
.
noNullElements
(
resources
,
"resources invalid"
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/FileHelper.java
View file @
01388fc1
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/finalString.java
0 → 100644
View file @
01388fc1
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
/**
* @description:
* @author: tw
* @createDate: 2023/3/15
*/
public
class
finalString
{
public
static
final
String
URL
=
"cs/v1/fireASF/dataSync"
;
public
static
final
String
ISNOTIOT
=
"isNotIot"
;
public
static
final
String
URLST
=
"cs/v1/fireAST/dataSync"
;
}
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