Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
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
INET-TWO
server
dcs-plan
Commits
a4ec1f62
Commit
a4ec1f62
authored
Sep 12, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IED计划导入、增加、删除、更新功能开发(已完成测测试);
IED计划导出功能开发(已完成测试)
parent
dfe8fb4a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
281 additions
and
66 deletions
+281
-66
ExtIEDPlanExcelVO.java
.../java/com/yonde/dcs/plan/common/vo/ExtIEDPlanExcelVO.java
+40
-33
ExtIEDPlanVO.java
.../main/java/com/yonde/dcs/plan/common/vo/ExtIEDPlanVO.java
+2
-2
ExtIEDPlanController.java
.../yonde/dcs/plan/core/controller/ExtIEDPlanController.java
+17
-4
ExtPuchasePlanAttributeController.java
...an/core/controller/ExtPuchasePlanAttributeController.java
+2
-2
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+63
-9
PurchasePlanExcelReadListenner.java
...cs/plan/core/listener/PurchasePlanExcelReadListenner.java
+11
-1
ExtIEDPlanService.java
...va/com/yonde/dcs/plan/core/service/ExtIEDPlanService.java
+4
-0
ExtPuchasePlanAttributeService.java
...dcs/plan/core/service/ExtPuchasePlanAttributeService.java
+1
-1
ExtIEDPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
+109
-6
ExtPuchasePlanAttributeServiceImpl.java
...core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
+3
-3
CommonUtils.java
...c/main/java/com/yonde/dcs/plan/core/util/CommonUtils.java
+27
-3
ExtIEDPlan.java
...rc/main/java/com/yonde/dcs/plan/entity/po/ExtIEDPlan.java
+2
-2
No files found.
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtIEDPlanExcelVO.java
View file @
a4ec1f62
...
@@ -18,124 +18,131 @@ public class ExtIEDPlanExcelVO {
...
@@ -18,124 +18,131 @@ public class ExtIEDPlanExcelVO {
@ExcelProperty
(
value
=
{
"IED计划"
,
"操作*"
},
index
=
0
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"操作*"
},
index
=
0
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
operation
;
private
String
operation
;
/**
/**
* 文件类型
* 文件类型
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件类型*"
},
index
=
1
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件类型*"
},
index
=
1
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
Integer
fileType
;
private
String
fileType
;
/**
/**
* 文件分类
* 文件分类
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件分类*"
},
index
=
2
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件分类*"
},
index
=
2
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
Integer
fileClassify
;
private
String
fileClassify
;
/**
* 文件分类
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件名称*"
},
index
=
3
)
@ColumnWidth
(
20
)
private
String
fileName
;
/**
/**
* 文件编号
* 文件编号
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件编号*"
},
index
=
3
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件编号*"
},
index
=
4
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
fileNumber
;
private
String
fileNumber
;
/**
/**
* 文件代号
* 文件代号
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件代号*"
},
index
=
4
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件代号*"
},
index
=
5
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
fileCode
;
private
String
fileCode
;
/**
/**
* 管理员系统编码
* 管理员系统编码
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"管理员系统编码*"
},
index
=
5
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"管理员系统编码*"
},
index
=
6
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
systemNumber
;
private
String
systemNumber
;
/**
/**
* 设备编号
* 设备编号
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"设备编号*"
},
index
=
6
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"设备编号*"
},
index
=
7
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
deviceNumber
;
private
String
deviceNumber
;
/**
/**
* 阶段
* 阶段
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"阶段*"
},
index
=
7
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"阶段*"
},
index
=
8
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
phase
;
private
String
phase
;
/**
/**
* 节点审核时间
* 节点审核时间
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"节点审核时间*"
},
index
=
8
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"节点审核时间*"
},
index
=
9
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
LocalDateTime
auditTime
;
private
LocalDateTime
auditTime
;
/**
/**
* 文件提交时间
* 文件提交时间
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件提交时间*"
},
index
=
9
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件提交时间*"
},
index
=
10
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
LocalDateTime
fileSubmitTime
;
private
LocalDateTime
fileSubmitTime
;
/**
/**
* 编写者
* 编写者
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"编写*"
},
index
=
1
0
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"编写*"
},
index
=
1
1
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
editor
;
private
String
editor
;
/**
/**
* 校核者
* 校核者
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"校核*"
},
index
=
1
1
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"校核*"
},
index
=
1
2
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
checker
;
private
String
checker
;
/**
/**
* 审核者
* 审核者
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"审核*"
},
index
=
1
2
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"审核*"
},
index
=
1
3
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
auditor
;
private
String
auditor
;
/**
/**
* 审定者
* 审定者
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"审定*"
},
index
=
1
3
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"审定*"
},
index
=
1
4
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
investigator
;
private
String
investigator
;
/**
/**
* 批准者
* 批准者
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"批准*"
},
index
=
1
4
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"批准*"
},
index
=
1
5
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
ratifier
;
private
String
ratifier
;
/**
/**
* 备注
* 备注
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"备注*"
},
index
=
1
5
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"备注*"
},
index
=
1
6
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
note
;
private
String
note
;
/**
/**
* 密级
* 密级
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"密级*"
},
index
=
1
6
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"密级*"
},
index
=
1
7
)
@ColumnWidth
(
15
)
@ColumnWidth
(
20
)
private
String
secretCode
;
private
String
secretCode
;
}
}
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtIEDPlanVO.java
View file @
a4ec1f62
...
@@ -160,7 +160,7 @@ public class ExtIEDPlanVO extends IdOnlyVO implements IdVO ,DxContextVOHolder ,D
...
@@ -160,7 +160,7 @@ public class ExtIEDPlanVO extends IdOnlyVO implements IdVO ,DxContextVOHolder ,D
/**
/**
* 文件分类
* 文件分类
*/
*/
private
Integer
fileClassify
;
private
String
fileClassify
;
/**
/**
* 文件代号
* 文件代号
...
@@ -185,7 +185,7 @@ public class ExtIEDPlanVO extends IdOnlyVO implements IdVO ,DxContextVOHolder ,D
...
@@ -185,7 +185,7 @@ public class ExtIEDPlanVO extends IdOnlyVO implements IdVO ,DxContextVOHolder ,D
/**
/**
* 文件类型
* 文件类型
*/
*/
private
Integer
fileType
;
private
String
fileType
;
/**
/**
* 审定者
* 审定者
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtIEDPlanController.java
View file @
a4ec1f62
...
@@ -12,7 +12,9 @@ import io.swagger.annotations.Api;
...
@@ -12,7 +12,9 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
/**
/**
* @description: ExtIEDPlan-Controller
* @description: ExtIEDPlan-Controller
...
@@ -36,12 +38,23 @@ public class ExtIEDPlanController<V extends ExtIEDPlanVO, S extends ExtIEDPlanSe
...
@@ -36,12 +38,23 @@ public class ExtIEDPlanController<V extends ExtIEDPlanVO, S extends ExtIEDPlanSe
* @return
* @return
* @throws IOException
* @throws IOException
*/
*/
@ApiOperation
(
"导入
采购
计划"
)
@ApiOperation
(
"导入
IED
计划"
)
@PostMapping
(
value
=
"/i
nse
rtIEDPlan"
)
@PostMapping
(
value
=
"/i
mpo
rtIEDPlan"
)
public
ApiResult
i
nse
rtPlan
(
@RequestParam
(
"file"
)
MultipartFile
uploadFile
)
throws
IOException
{
public
ApiResult
i
mpo
rtPlan
(
@RequestParam
(
"file"
)
MultipartFile
uploadFile
)
throws
IOException
{
return
ApiResult
.
ok
(
extIEDPlanService
.
importIEDPlan
(
uploadFile
.
getInputStream
()),
"采购
计划导入成功"
);
return
ApiResult
.
ok
(
extIEDPlanService
.
importIEDPlan
(
uploadFile
.
getInputStream
()),
"IED
计划导入成功"
);
}
}
/**
* 导出计划
* @param response
* @param ids
* @throws IOException
*/
@ApiOperation
(
value
=
"导出IED计划"
,
notes
=
"导出IED计划"
,
httpMethod
=
"GET"
)
@GetMapping
(
value
=
"/exportIEDPlan"
)
public
ApiResult
exportPlan
(
HttpServletResponse
response
,
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
throws
IOException
{
return
ApiResult
.
ok
(
extIEDPlanService
.
exportIEDPlan
(
response
,
ids
),
"IED计划导出成功"
);
}
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtPuchasePlanAttributeController.java
View file @
a4ec1f62
...
@@ -45,7 +45,7 @@ public class ExtPuchasePlanAttributeController<V extends ExtPuchasePlanAttribute
...
@@ -45,7 +45,7 @@ public class ExtPuchasePlanAttributeController<V extends ExtPuchasePlanAttribute
* @throws IOException
* @throws IOException
*/
*/
@ApiOperation
(
"导入采购计划"
)
@ApiOperation
(
"导入采购计划"
)
@PostMapping
(
value
=
"/i
nse
rtPurchasePlan"
)
@PostMapping
(
value
=
"/i
mpo
rtPurchasePlan"
)
public
ApiResult
insertPlan
(
@RequestParam
(
"file"
)
MultipartFile
uploadFile
,
@RequestParam
(
"projectId"
)
String
projectId
)
throws
IOException
{
public
ApiResult
insertPlan
(
@RequestParam
(
"file"
)
MultipartFile
uploadFile
,
@RequestParam
(
"projectId"
)
String
projectId
)
throws
IOException
{
return
ApiResult
.
ok
(
extPuchasePlanAttributeService
.
importPurchasePlan
(
uploadFile
.
getInputStream
(),
projectId
),
"采购计划导入成功"
);
return
ApiResult
.
ok
(
extPuchasePlanAttributeService
.
importPurchasePlan
(
uploadFile
.
getInputStream
(),
projectId
),
"采购计划导入成功"
);
}
}
...
@@ -56,7 +56,7 @@ public class ExtPuchasePlanAttributeController<V extends ExtPuchasePlanAttribute
...
@@ -56,7 +56,7 @@ public class ExtPuchasePlanAttributeController<V extends ExtPuchasePlanAttribute
* @param ids
* @param ids
* @throws IOException
* @throws IOException
*/
*/
@ApiOperation
(
value
=
"导出采购计划
计划
"
,
notes
=
"导出计划"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"导出采购计划"
,
notes
=
"导出计划"
,
httpMethod
=
"GET"
)
@GetMapping
(
value
=
"/exportPurchasePlan"
)
@GetMapping
(
value
=
"/exportPurchasePlan"
)
public
ApiResult
exportPlan
(
HttpServletResponse
response
,
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
throws
IOException
{
public
ApiResult
exportPlan
(
HttpServletResponse
response
,
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
throws
IOException
{
return
ApiResult
.
ok
(
extPuchasePlanAttributeService
.
exportPurchasePlanFile
(
response
,
ids
),
"采购计划导出成功"
);
return
ApiResult
.
ok
(
extPuchasePlanAttributeService
.
exportPurchasePlanFile
(
response
,
ids
),
"采购计划导出成功"
);
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
a4ec1f62
...
@@ -12,6 +12,8 @@ import com.yonde.dcs.plan.common.vo.ExtPuchasePlanAttributeVO;
...
@@ -12,6 +12,8 @@ import com.yonde.dcs.plan.common.vo.ExtPuchasePlanAttributeVO;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
...
@@ -43,6 +45,12 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -43,6 +45,12 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
*/
*/
private
List
<
ExtIEDPlanExcelVO
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
private
List
<
ExtIEDPlanExcelVO
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
/**
* excel数据行数
*/
private
Integer
excelDataRow
=
0
;
/**
/**
* 校验数据的错误信息
* 校验数据的错误信息
*/
*/
...
@@ -60,9 +68,16 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -60,9 +68,16 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
@Override
@Override
public
void
invoke
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
,
AnalysisContext
analysisContext
)
{
public
void
invoke
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
,
AnalysisContext
analysisContext
)
{
log
.
info
(
"解析到一条数据:{}"
,
extIEDPlanExcelVO
);
excelDataRow
++;
//检查excel数据合法性
//判断是否是空数据行
checkDataForExcel
(
extIEDPlanExcelVO
);
if
(!
CommonUtils
.
checkAllPropertiesIsEmpty
(
extIEDPlanExcelVO
)){
log
.
info
(
"解析到一条数据:{}"
,
extIEDPlanExcelVO
);
//检查excel数据合法性
checkDataForExcel
(
extIEDPlanExcelVO
);
}
else
{
log
.
info
(
"解析到数据第{}行是空白数据请检查数据!"
,
excelDataRow
);
}
}
}
...
@@ -72,7 +87,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -72,7 +87,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
// 收尾工作,处理剩下的缓存数据。。。
// 收尾工作,处理剩下的缓存数据。。。
log
.
info
(
"sheet={} 所有数据解析完成!"
,
analysisContext
.
readSheetHolder
().
getSheetName
());
log
.
info
(
"sheet={} 所有数据解析完成!"
,
analysisContext
.
readSheetHolder
().
getSheetName
());
if
(
errorList
.
size
()
>
0
)
{
if
(
errorList
.
size
()
>
0
)
{
throw
new
DxBusinessException
(
"-1"
,
"
导入采购
计划数据有误!!"
+
errorList
.
toString
());
throw
new
DxBusinessException
(
"-1"
,
"
IED
计划数据有误!!"
+
errorList
.
toString
());
}
}
//处理全部检查通过的数据
//处理全部检查通过的数据
for
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
:
cachedDataList
)
{
for
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
:
cachedDataList
)
{
...
@@ -93,6 +108,11 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -93,6 +108,11 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
}
}
}
//数据处理完之后,进行初始化
errorList
.
clear
();
cachedDataList
.
clear
();
excelDataRow
=
0
;
}
}
...
@@ -117,26 +137,34 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -117,26 +137,34 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
StringBuffer
errorString
=
new
StringBuffer
();
StringBuffer
errorString
=
new
StringBuffer
();
//校验数据
//校验数据
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getOperation
())
&&
!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileNumber
()))
{
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getOperation
())
&&
!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileNumber
()))
{
if
(
operationList
.
contains
(
extIEDPlanExcelVO
.
getOperation
()))
{
if
(
!
operationList
.
contains
(
extIEDPlanExcelVO
.
getOperation
()))
{
errorString
.
append
(
"文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的操作符无法识别!!"
);
errorString
.
append
(
"
解析到数据第"
+
excelDataRow
+
"行
文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的操作符无法识别!!"
);
errorList
.
add
(
errorString
);
errorList
.
add
(
errorString
);
}
}
//如果是新增,查看一下数据库中是不是已经存在
if
(
Constants
.
EXCEL_ADD
.
equals
(
extIEDPlanExcelVO
.
getOperation
()))
{
if
(
Constants
.
EXCEL_ADD
.
equals
(
extIEDPlanExcelVO
.
getOperation
()))
{
//如果是新增,查看一下数据库中是不是已经存在
ExtIEDPlanVO
extIEDPlanVO
=
getIEDPlanByFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
ExtIEDPlanVO
extIEDPlanVO
=
getIEDPlanByFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extIEDPlanVO
))
{
if
(!
ObjectUtils
.
isEmpty
(
extIEDPlanVO
))
{
errorString
.
append
(
"新增IED计划的文件编号:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"已存在,不能重复添加!"
);
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,新增IED计划的文件编号:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"已存在,不能重复添加!"
);
errorList
.
add
(
errorString
);
}
}
else
{
ExtIEDPlanVO
extIEDPlanVO
=
getIEDPlanByFileNumberAndDeleted
(
extIEDPlanExcelVO
.
getFileNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extIEDPlanVO
)
&&
1
==
extIEDPlanVO
.
getDeleted
())
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,更新IED计划的文件编号:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"已被删除,更新或删除失败!"
);
errorList
.
add
(
errorString
);
errorList
.
add
(
errorString
);
}
}
}
}
}
else
{
}
else
{
errorString
.
append
(
"文件编号、操作符均不能为空!!"
);
errorString
.
append
(
"
解析到数据第"
+
excelDataRow
+
",
文件编号、操作符均不能为空!!"
);
errorList
.
add
(
errorString
);
errorList
.
add
(
errorString
);
}
}
cachedDataList
.
add
(
extIEDPlanExcelVO
);
cachedDataList
.
add
(
extIEDPlanExcelVO
);
}
}
/**
/**
* 转换数据,将EXCEL对象转换为PO对象
* 转换数据,将EXCEL对象转换为PO对象
*/
*/
...
@@ -145,6 +173,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -145,6 +173,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
extIEDPlanVO
.
setFileClassify
(
extIEDPlanExcelVO
.
getFileClassify
());
extIEDPlanVO
.
setFileClassify
(
extIEDPlanExcelVO
.
getFileClassify
());
extIEDPlanVO
.
setFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
extIEDPlanVO
.
setFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
extIEDPlanVO
.
setFileCode
(
extIEDPlanExcelVO
.
getFileCode
());
extIEDPlanVO
.
setFileCode
(
extIEDPlanExcelVO
.
getFileCode
());
extIEDPlanVO
.
setFileName
(
extIEDPlanExcelVO
.
getFileName
());
extIEDPlanVO
.
setSystemNumber
(
extIEDPlanExcelVO
.
getSystemNumber
());
extIEDPlanVO
.
setSystemNumber
(
extIEDPlanExcelVO
.
getSystemNumber
());
extIEDPlanVO
.
setDeviceNumber
(
extIEDPlanExcelVO
.
getDeviceNumber
());
extIEDPlanVO
.
setDeviceNumber
(
extIEDPlanExcelVO
.
getDeviceNumber
());
extIEDPlanVO
.
setPhase
(
extIEDPlanExcelVO
.
getPhase
());
extIEDPlanVO
.
setPhase
(
extIEDPlanExcelVO
.
getPhase
());
...
@@ -174,4 +203,29 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -174,4 +203,29 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
return
null
;
return
null
;
}
}
/**
* 根据fileNumber查询已经删除的计划
* @param fileNumber
* @return
*/
private
ExtIEDPlanVO
getIEDPlanByFileNumberAndDeleted
(
String
fileNumber
)
{
SearchQueryCondition
condition
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"fileNumber"
,
SearchItem
.
Operator
.
EQ
,
fileNumber
,
null
))
.
item
(
new
SearchItem
(
"deleted"
,
SearchItem
.
Operator
.
EQ
,
1
,
null
))
.
build
())
.
build
();
//根据文件编号查询IED计划
DxPageImpl
<
ExtIEDPlanVO
>
IEDPlanPage
=
extIEDPlanService
.
findRecursion
(
condition
);
if
(!
CollectionUtils
.
isEmpty
(
IEDPlanPage
.
getContent
()))
{
ExtIEDPlanVO
extIEDPlanVOForDB
=
DxPageUtils
.
getFirst
(
IEDPlanPage
);
return
extIEDPlanVOForDB
;
}
else
{
log
.
info
(
"根据计划的文件编码:{},未查到相关计划"
,
fileNumber
);
}
return
null
;
}
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/PurchasePlanExcelReadListenner.java
View file @
a4ec1f62
...
@@ -41,6 +41,11 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
...
@@ -41,6 +41,11 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
private
String
projectId
;
private
String
projectId
;
/**
* excel数据行数
*/
private
Integer
excelDataRow
=
0
;
/**
/**
* 缓存的数据
* 缓存的数据
*/
*/
...
@@ -58,7 +63,12 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
...
@@ -58,7 +63,12 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
public
void
invoke
(
ExtPuchasePlanExcelVO
extPuchasePlanExcelVO
,
AnalysisContext
analysisContext
)
{
public
void
invoke
(
ExtPuchasePlanExcelVO
extPuchasePlanExcelVO
,
AnalysisContext
analysisContext
)
{
log
.
info
(
"解析到一条数据:{}"
,
extPuchasePlanExcelVO
);
log
.
info
(
"解析到一条数据:{}"
,
extPuchasePlanExcelVO
);
cachedDataList
.
add
(
extPuchasePlanExcelVO
);
if
(!
CommonUtils
.
checkAllPropertiesIsEmpty
(
extPuchasePlanExcelVO
)){
cachedDataList
.
add
(
extPuchasePlanExcelVO
);
}
else
{
log
.
info
(
"解析到数据第{}行是空白数据请检查数据!"
,
excelDataRow
);
}
}
}
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtIEDPlanService.java
View file @
a4ec1f62
...
@@ -3,7 +3,10 @@ package com.yonde.dcs.plan.core.service;
...
@@ -3,7 +3,10 @@ package com.yonde.dcs.plan.core.service;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtIEDPlanServiceShadow
;
import
com.yonde.dcs.plan.core.service.shadow.ExtIEDPlanServiceShadow
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.List
;
/**
/**
* @description: ExtIEDPlan-service
* @description: ExtIEDPlan-service
...
@@ -14,4 +17,5 @@ import java.io.InputStream;
...
@@ -14,4 +17,5 @@ import java.io.InputStream;
public
interface
ExtIEDPlanService
<
V
extends
ExtIEDPlanVO
>
extends
ExtIEDPlanServiceShadow
<
V
>
{
public
interface
ExtIEDPlanService
<
V
extends
ExtIEDPlanVO
>
extends
ExtIEDPlanServiceShadow
<
V
>
{
String
importIEDPlan
(
InputStream
inputStream
);
String
importIEDPlan
(
InputStream
inputStream
);
String
exportIEDPlan
(
HttpServletResponse
response
,
List
<
String
>
ids
)
throws
IOException
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtPuchasePlanAttributeService.java
View file @
a4ec1f62
...
@@ -21,5 +21,5 @@ public interface ExtPuchasePlanAttributeService<V extends ExtPuchasePlanAttribut
...
@@ -21,5 +21,5 @@ public interface ExtPuchasePlanAttributeService<V extends ExtPuchasePlanAttribut
public
String
importPurchasePlan
(
InputStream
inputStream
,
String
projectId
);
public
String
importPurchasePlan
(
InputStream
inputStream
,
String
projectId
);
public
String
exportPurchasePlanFile
(
HttpServletResponse
response
,
List
<
String
>
planCodeList
)
throws
IOException
;
public
String
exportPurchasePlanFile
(
HttpServletResponse
response
,
List
<
String
>
ids
)
throws
IOException
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
View file @
a4ec1f62
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
cn.hutool.core.io.FileUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtPuchasePlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtPuchasePlanExcelVO
;
import
com.yonde.dcs.plan.core.listener.IEDPlanExcelListenner
;
import
com.yonde.dcs.plan.core.listener.IEDPlanExcelListenner
;
import
com.yonde.dcs.plan.core.listener.PurchasePlanExcelReadListenner
;
import
com.yonde.dcs.plan.core.listener.PurchasePlanExcelReadListenner
;
import
com.yonde.dcs.plan.core.repository.ExtIEDPlanRepository
;
import
com.yonde.dcs.plan.core.repository.ExtIEDPlanRepository
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dcs.plan.core.util.FileUtils
;
import
com.yonde.dcs.plan.core.util.ResourceHelper
;
import
com.yonde.dcs.plan.entity.po.ExtIEDPlan
;
import
com.yonde.dcs.plan.entity.po.ExtIEDPlan
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dex.basedata.entity.api.CustomMultipartFile
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.dfs.feign.FileManagerFeignService
;
import
com.yonde.dex.systemfile.feign.SystemFileFeignService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
java.io.ByteArrayInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* @description: ExtIEDPlan-ServiceImpl
* @description: ExtIEDPlan-ServiceImpl
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-9-11 15:49:41
* @date: 2024-9-11 15:49:41
**/
**/
@Slf4j
@Slf4j
@Service
(
ExtIEDPlanServiceImpl
.
BEAN_NAME
)
@Service
(
ExtIEDPlanServiceImpl
.
BEAN_NAME
)
public
class
ExtIEDPlanServiceImpl
<
V
extends
ExtIEDPlanVO
>
implements
ExtIEDPlanService
<
V
>
{
public
class
ExtIEDPlanServiceImpl
<
V
extends
ExtIEDPlanVO
>
implements
ExtIEDPlanService
<
V
>
{
...
@@ -35,15 +57,96 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -35,15 +57,96 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
@Autowired
@Autowired
ExtIEDPlanRepository
<
ExtIEDPlan
>
extIEDPlanRepository
;
ExtIEDPlanRepository
<
ExtIEDPlan
>
extIEDPlanRepository
;
@Autowired
private
SystemFileFeignService
systemFileFeignService
;
@Autowired
private
FileManagerFeignService
fileManagerFeignService
;
@Override
@Override
public
String
importIEDPlan
(
InputStream
inputStream
)
{
public
String
importIEDPlan
(
InputStream
inputStream
)
{
EasyExcel
.
read
(
inputStream
,
Ext
Puchase
PlanExcelVO
.
class
,
EasyExcel
.
read
(
inputStream
,
Ext
IED
PlanExcelVO
.
class
,
new
IEDPlanExcelListenner
())
new
IEDPlanExcelListenner
())
.
sheet
()
.
sheet
()
.
doRead
();
.
doRead
();
return
ApiResult
.
SUCCESS
;
return
ApiResult
.
SUCCESS
;
}
}
@Override
public
String
exportIEDPlan
(
HttpServletResponse
response
,
List
<
String
>
ids
)
throws
IOException
{
InputStream
inputStream
=
null
;
CustomMultipartFile
multipartFile
=
null
;
Long
fileId
=
null
;
SearchQueryCondition
condition
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
IN
,
ids
,
null
))
.
build
())
.
build
();
//根据批量计划id获取计划集合
DxPageImpl
<
V
>
IEDPlanPage
=
this
.
findRecursion
(
condition
);
if
(
CollectionUtils
.
isNotEmpty
(
IEDPlanPage
.
getContent
()))
{
List
<
V
>
content
=
IEDPlanPage
.
getContent
();
//数据转换,将PO转换成EXCEL-VO;
List
<
ExtIEDPlanExcelVO
>
extIEDPlanExcelVOList
=
transformationObject
(
content
);
try
{
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
IED_PLAN_TEMP_FILE_CODE_NAME
);
multipartFile
=
fileManagerFeignService
.
feignDownloadIO
(
fileId
);
}
catch
(
IOException
e
)
{
log
.
info
(
"[接口单] >>> 文件服务下载为文件:{}--失败!"
,
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载文件失败:"
+
fileId
);
}
try
{
inputStream
=
new
ByteArrayInputStream
(
multipartFile
.
getBytes
());
}
catch
(
IOException
e
)
{
log
.
info
(
"[接口单] >>> 文件服务下载的文件:{}--转换为输入流失败!"
,
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载的文件转换为输入流失败:"
+
fileId
);
}
String
dir
=
ResourceHelper
.
CreateTemDir
().
getPath
();
String
filePath
=
dir
+
Constants
.
IED_PLAN_EXCEL_NAME
;
//创建采购计划列表.xlsx 文件
FileUtils
.
inputToFile
(
inputStream
,
filePath
);
//向表格中写入数据
EasyExcel
.
write
(
filePath
,
ExtIEDPlanExcelVO
.
class
)
.
registerWriteHandler
(
new
LongestMatchColumnWidthStyleStrategy
())
.
sheet
(
"IED计划列表"
).
doWrite
(
extIEDPlanExcelVOList
);
//导出数据
FileUtils
.
exportFile
(
response
,
new
FileInputStream
(
filePath
),
"application/vnd.ms-excel;charset=utf-8"
,
"采购计划.xlsx"
);
FileUtil
.
del
(
dir
);
}
else
{
log
.
info
(
"根据计划ids:"
+
ids
.
toString
()
+
"未查到相关数据"
);
return
"未查到相关IED计划数据"
;
}
return
ApiResult
.
SUCCESS
;
}
private
List
<
ExtIEDPlanExcelVO
>
transformationObject
(
List
<
V
>
extIEDPlanList
)
{
List
<
ExtIEDPlanExcelVO
>
extIEDPlanExcelVOList
=
new
ArrayList
<>();
for
(
ExtIEDPlanVO
extIEDPlanVO
:
extIEDPlanList
)
{
ExtIEDPlanExcelVO
extIEDPlanExcelVO
=
new
ExtIEDPlanExcelVO
();
extIEDPlanExcelVO
.
setFileType
(
extIEDPlanVO
.
getFileType
());
extIEDPlanExcelVO
.
setFileClassify
(
extIEDPlanVO
.
getFileClassify
());
extIEDPlanExcelVO
.
setFileNumber
(
extIEDPlanVO
.
getFileNumber
());
extIEDPlanExcelVO
.
setFileCode
(
extIEDPlanVO
.
getFileCode
());
extIEDPlanExcelVO
.
setFileName
(
extIEDPlanVO
.
getFileName
());
extIEDPlanExcelVO
.
setSystemNumber
(
extIEDPlanVO
.
getSystemNumber
());
extIEDPlanExcelVO
.
setDeviceNumber
(
extIEDPlanVO
.
getDeviceNumber
());
extIEDPlanExcelVO
.
setPhase
(
extIEDPlanVO
.
getPhase
());
extIEDPlanExcelVO
.
setAuditTime
(
extIEDPlanVO
.
getAuditTime
());
extIEDPlanExcelVO
.
setFileSubmitTime
(
extIEDPlanVO
.
getFileSubmitTime
());
extIEDPlanExcelVO
.
setEditor
(
extIEDPlanVO
.
getEditor
());
extIEDPlanExcelVO
.
setChecker
(
extIEDPlanVO
.
getChecker
());
extIEDPlanExcelVO
.
setAuditor
(
extIEDPlanVO
.
getAuditor
());
extIEDPlanExcelVO
.
setInvestigator
(
extIEDPlanVO
.
getInvestigator
());
extIEDPlanExcelVO
.
setRatifier
(
extIEDPlanVO
.
getRatifier
());
extIEDPlanExcelVO
.
setNote
(
extIEDPlanVO
.
getNote
());
//获取密级code
String
secretCode
=
CommonUtils
.
searchDictDataValueByDictCode
(
Constants
.
SECRET_CODE
,
extIEDPlanVO
.
getSecretCode
());
extIEDPlanExcelVO
.
setSecretCode
(
secretCode
);
extIEDPlanExcelVOList
.
add
(
extIEDPlanExcelVO
);
}
return
extIEDPlanExcelVOList
;
}
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
View file @
a4ec1f62
...
@@ -72,7 +72,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
...
@@ -72,7 +72,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
}
}
@Override
@Override
public
String
exportPurchasePlanFile
(
HttpServletResponse
response
,
List
<
String
>
I
ds
)
throws
IOException
{
public
String
exportPurchasePlanFile
(
HttpServletResponse
response
,
List
<
String
>
i
ds
)
throws
IOException
{
InputStream
inputStream
=
null
;
InputStream
inputStream
=
null
;
CustomMultipartFile
multipartFile
=
null
;
CustomMultipartFile
multipartFile
=
null
;
...
@@ -80,7 +80,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
...
@@ -80,7 +80,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
SearchQueryCondition
condition
=
SearchQueryCondition
.
builder
()
SearchQueryCondition
condition
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
IN
,
I
ds
,
null
))
.
item
(
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
IN
,
i
ds
,
null
))
.
build
())
.
build
())
.
build
();
.
build
();
//根据批量计划id获取计划集合
//根据批量计划id获取计划集合
...
@@ -115,7 +115,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
...
@@ -115,7 +115,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
FileUtil
.
del
(
dir
);
FileUtil
.
del
(
dir
);
}
else
{
}
else
{
log
.
info
(
"根据计划ids:"
+
I
ds
.
toString
()
+
"未查到相关数据"
);
log
.
info
(
"根据计划ids:"
+
i
ds
.
toString
()
+
"未查到相关数据"
);
}
}
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/util/CommonUtils.java
View file @
a4ec1f62
...
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Component;
...
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.lang.reflect.Field
;
import
java.util.List
;
import
java.util.List
;
...
@@ -16,13 +17,15 @@ import java.util.List;
...
@@ -16,13 +17,15 @@ import java.util.List;
public
class
CommonUtils
{
public
class
CommonUtils
{
private
static
DictDataFeignService
dictDataFeignService
;
private
static
DictDataFeignService
dictDataFeignService
;
public
CommonUtils
()
{
public
CommonUtils
()
{
this
.
dictDataFeignService
=
ApplicationContextUtil
.
getBean
(
DictDataFeignService
.
class
);
this
.
dictDataFeignService
=
ApplicationContextUtil
.
getBean
(
DictDataFeignService
.
class
);
}
}
/**
/**
*根据字典code获取字典code和字典项的值获取key(中文转英文,key是英文,value是中文)
* 根据字典code获取字典code和字典项的值获取key(中文转英文,key是英文,value是中文)
*
* @param dictCode
* @param dictCode
* @param dictValue
* @param dictValue
* @return
* @return
...
@@ -49,7 +52,8 @@ public class CommonUtils {
...
@@ -49,7 +52,8 @@ public class CommonUtils {
}
}
/**
/**
*根据字典code获取字典code和字典项的值获取key(英文转中文,key是英文,value是中文)
* 根据字典code获取字典code和字典项的值获取key(英文转中文,key是英文,value是中文)
*
* @param dictCode
* @param dictCode
* @return
* @return
*/
*/
...
@@ -74,4 +78,24 @@ public class CommonUtils {
...
@@ -74,4 +78,24 @@ public class CommonUtils {
return
""
;
return
""
;
}
}
}
/**
* 检查对象中的属性是否是空值
* @param obj
* @return
*/
public
static
boolean
checkAllPropertiesIsEmpty
(
Object
obj
)
{
Class
<?>
aClass
=
obj
.
getClass
();
for
(
Field
field:
aClass
.
getDeclaredFields
()){
field
.
setAccessible
(
true
);
try
{
if
(
field
.
get
(
obj
)
!=
null
){
return
false
;
}
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
return
true
;
}
}
\ No newline at end of file
dcs-plan-entity/src/main/java/com/yonde/dcs/plan/entity/po/ExtIEDPlan.java
View file @
a4ec1f62
...
@@ -125,7 +125,7 @@ public class ExtIEDPlan extends IdOnlyEntity implements DxContextHolder ,DxObjFi
...
@@ -125,7 +125,7 @@ public class ExtIEDPlan extends IdOnlyEntity implements DxContextHolder ,DxObjFi
/**
/**
* 文件分类
* 文件分类
*/
*/
private
Integer
fileClassify
;
private
String
fileClassify
;
/**
/**
* 文件代号
* 文件代号
*/
*/
...
@@ -146,7 +146,7 @@ public class ExtIEDPlan extends IdOnlyEntity implements DxContextHolder ,DxObjFi
...
@@ -146,7 +146,7 @@ public class ExtIEDPlan extends IdOnlyEntity implements DxContextHolder ,DxObjFi
/**
/**
* 文件类型
* 文件类型
*/
*/
private
Integer
fileType
;
private
String
fileType
;
/**
/**
* 审定者
* 审定者
*/
*/
...
...
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