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
dfe8fb4a
Commit
dfe8fb4a
authored
Sep 11, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IED计划导入、增加、删除、更新功能开发(未测试,编译通过);修改模型名称IDE->IED
parent
6df27433
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
462 additions
and
251 deletions
+462
-251
Constants.java
...n/java/com/yonde/dcs/plan/common/constants/Constants.java
+6
-1
ExtIEDPlanDocLinkVO.java
...ava/com/yonde/dcs/plan/common/vo/ExtIEDPlanDocLinkVO.java
+3
-3
ExtIEDPlanExcelVO.java
.../java/com/yonde/dcs/plan/common/vo/ExtIEDPlanExcelVO.java
+1
-17
ExtIEDPlanVO.java
.../main/java/com/yonde/dcs/plan/common/vo/ExtIEDPlanVO.java
+46
-40
ExtIDEPlanController.java
.../yonde/dcs/plan/core/controller/ExtIDEPlanController.java
+0
-34
ExtIEDPlanController.java
.../yonde/dcs/plan/core/controller/ExtIEDPlanController.java
+47
-0
ExtIDEPlanControllerShadow.java
...an/core/controller/shadow/ExtIDEPlanControllerShadow.java
+0
-53
ExtIEDPlanControllerShadow.java
...an/core/controller/shadow/ExtIEDPlanControllerShadow.java
+40
-0
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+122
-12
ExtIDEPlanRepository.java
.../yonde/dcs/plan/core/repository/ExtIDEPlanRepository.java
+0
-12
ExtIEDPlanRepository.java
.../yonde/dcs/plan/core/repository/ExtIEDPlanRepository.java
+14
-0
ExtIEDPlanRepositoryShadow.java
...an/core/repository/shadow/ExtIEDPlanRepositoryShadow.java
+23
-0
ExtIDEPlanService.java
...va/com/yonde/dcs/plan/core/service/ExtIDEPlanService.java
+0
-15
ExtIEDPlanService.java
...va/com/yonde/dcs/plan/core/service/ExtIEDPlanService.java
+17
-0
ExtIDEPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIDEPlanServiceImpl.java
+0
-35
ExtIEDPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
+49
-0
ExtPuchasePlanAttributeServiceImpl.java
...core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
+1
-1
ExtIEDPlanServiceShadow.java
...dcs/plan/core/service/shadow/ExtIEDPlanServiceShadow.java
+21
-0
ExtIEDPlan.java
...rc/main/java/com/yonde/dcs/plan/entity/po/ExtIEDPlan.java
+30
-9
ExtIDEPlanServiceFeign.java
...java/com/yonde/dcs/plan/feign/ExtIDEPlanServiceFeign.java
+0
-19
ExtIEDPlanServiceFeign.java
...java/com/yonde/dcs/plan/feign/ExtIEDPlanServiceFeign.java
+20
-0
ExtIEDPlanServiceFeignShadow.java
...e/dcs/plan/feign/shadow/ExtIEDPlanServiceFeignShadow.java
+22
-0
No files found.
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/constants/Constants.java
View file @
dfe8fb4a
...
@@ -402,10 +402,15 @@ public class Constants {
...
@@ -402,10 +402,15 @@ public class Constants {
public
static
final
String
EXCEL_UPDATE
=
"更新"
;
public
static
final
String
EXCEL_UPDATE
=
"更新"
;
/**
/**
* 采购计划相关
属性
* 采购计划相关
*/
*/
public
static
final
String
PURCHASE_PLAN_EXCEL_NAME
=
"\\采购计划列表.xlsx"
;
public
static
final
String
PURCHASE_PLAN_EXCEL_NAME
=
"\\采购计划列表.xlsx"
;
public
static
final
String
PURCHASE_PLAN_TEMP_FILE_CODE_NAME
=
"采购计划001模板"
;
public
static
final
String
PURCHASE_PLAN_TEMP_FILE_CODE_NAME
=
"采购计划001模板"
;
/**
* IED计划相关
*/
public
static
final
String
IED_PLAN_EXCEL_NAME
=
"\\IED计划列表.xlsx"
;
public
static
final
String
IED_PLAN_TEMP_FILE_CODE_NAME
=
"IED计划001模板"
;
}
}
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtIEDPlanDocLinkVO.java
View file @
dfe8fb4a
...
@@ -36,7 +36,7 @@ import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder;
...
@@ -36,7 +36,7 @@ import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.basedata.entity.users.DxUserVO
;
import
com.yonde.dex.basedata.entity.users.DxUserVO
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
/**
/**
* @description: ExtIEDPlanDocLink-VO
* @description: ExtIEDPlanDocLink-VO
...
@@ -50,7 +50,7 @@ import com.yonde.dcs.plan.common.vo.ExtIDEPlanVO;
...
@@ -50,7 +50,7 @@ import com.yonde.dcs.plan.common.vo.ExtIDEPlanVO;
@ToString
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
public
class
ExtIEDPlanDocLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtI
DE
PlanVO
,
DxDocumentVO
>{
public
class
ExtIEDPlanDocLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtI
ED
PlanVO
,
DxDocumentVO
>{
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_LINK_DATA_EMBEDDABLE_PROP_NAME
=
"dxLinkDataEmbeddable"
;
public
static
final
String
DX_LINK_DATA_EMBEDDABLE_PROP_NAME
=
"dxLinkDataEmbeddable"
;
...
@@ -67,7 +67,7 @@ public class ExtIEDPlanDocLinkVO extends IdOnlyVO implements IdVO ,DxLinkDataVOH
...
@@ -67,7 +67,7 @@ public class ExtIEDPlanDocLinkVO extends IdOnlyVO implements IdVO ,DxLinkDataVOH
*/
*/
@DexEmbedded
()
@DexEmbedded
()
@JsonIgnore
@JsonIgnore
private
DxLinkDataVOEmbeddable
<
ExtI
DE
PlanVO
,
DxDocumentVO
>
dxLinkDataEmbeddable
;
private
DxLinkDataVOEmbeddable
<
ExtI
ED
PlanVO
,
DxDocumentVO
>
dxLinkDataEmbeddable
;
}
}
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtIEDPlanExcelVO.java
View file @
dfe8fb4a
...
@@ -87,7 +87,7 @@ public class ExtIEDPlanExcelVO {
...
@@ -87,7 +87,7 @@ public class ExtIEDPlanExcelVO {
*/
*/
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件提交时间*"
},
index
=
9
)
@ExcelProperty
(
value
=
{
"IED计划"
,
"文件提交时间*"
},
index
=
9
)
@ColumnWidth
(
15
)
@ColumnWidth
(
15
)
private
LocalDateTime
fileSubmitTime
e
;
private
LocalDateTime
fileSubmitTime
;
/**
/**
* 编写者
* 编写者
...
@@ -138,22 +138,6 @@ public class ExtIEDPlanExcelVO {
...
@@ -138,22 +138,6 @@ public class ExtIEDPlanExcelVO {
@ColumnWidth
(
15
)
@ColumnWidth
(
15
)
private
String
secretCode
;
private
String
secretCode
;
public
static
void
main
(
String
[]
args
)
{
List
<
ExtIEDPlanExcelVO
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<=
1
;
i
++){
ExtIEDPlanExcelVO
extIEDPlanExcelVO
=
new
ExtIEDPlanExcelVO
();
extIEDPlanExcelVO
.
setNote
(
"测试"
+
i
);
list
.
add
(
extIEDPlanExcelVO
);
}
EasyExcel
.
write
(
"F:\\yangyi\\项目\\清华核研院\\核研院设计文档及原型\\IED计划导入模板22.xlsx"
,
ExtIEDPlanExcelVO
.
class
)
.
sheet
(
"采购计划"
).
doWrite
(
list
);
}
}
}
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtI
DE
PlanVO.java
→
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtI
ED
PlanVO.java
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
common
.
vo
;
package
com
.
yonde
.
dcs
.
plan
.
common
.
vo
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
cn.hutool.core.convert.Convert
;
import
com.yonde.dex.basedata.entity.annotation.XmlElementProperty
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.annotation.JsonUnwrapped
;
import
lombok.ToString
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
;
import
java.math.BigInteger
;
import
org.springframework.data.annotation.Transient
;
import
lombok.experimental.Delegate
;
import
javax.xml.bind.annotation.*
;
import
javax.xml.bind.annotation.XmlAttribute
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.xmladapters.LocalDateTimeXmlAdapter
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.RelationProperty
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
com.yonde.dex.basedata.entity.annotation.VersionProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.lang.TypeReference
;
import
com.yonde.dex.basedata.entity.data.VersionRelationType
;
import
com.yonde.dex.basedata.entity.data.VersionRelationType
;
import
com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOHolder
;
import
com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.d
cs.plan.common.vo.ExtIEDPlanDocLink
VO
;
import
com.yonde.d
ex.basedata.entity.vo.IdOnly
VO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOHolder
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOEmbeddable
;
import
com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOHolder
;
import
com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOHolder
;
import
com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOEmbeddable
;
import
com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOHolder
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOHolder
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOEmbeddable
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOEmbeddable
;
import
com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOEmbeddable
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
import
com.yonde.dex.basedata.entity.users.DxUserVO
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
/**
* @description: ExtI
DE
Plan-VO
* @description: ExtI
ED
Plan-VO
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-
8-29 9:31:22
* @date: 2024-
9-11 15:49:41
**/
**/
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
CLASS
,
property
=
"dxClassname"
,
visible
=
true
,
defaultImpl
=
ExtI
DE
PlanVO
.
class
)
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
CLASS
,
property
=
"dxClassname"
,
visible
=
true
,
defaultImpl
=
ExtI
ED
PlanVO
.
class
)
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Data
@ToString
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
ExtI
DEPlanVO
extends
IdOnlyVO
implements
IdVO
,
DxLifecycleManageBaseVOHolder
,
DxObjFileLinkVOHolder
,
DxSecretVOHolder
,
DxIterationVOHolder
<
ExtIDEPlanVO
>
{
public
class
ExtI
EDPlanVO
extends
IdOnlyVO
implements
IdVO
,
DxContextVOHolder
,
DxLifecycleManageBaseVOHolder
,
DxObjFileLinkVOHolder
,
DxIterationVOHolder
<
ExtIEDPlanVO
>
,
DxLogicDeleteVOHolder
,
DxSecretVOHolder
{
public
static
final
String
DX_CONTEXT_EMBEDDABLE_PROP_NAME
=
"dxContextEmbeddable"
;
public
static
final
String
DX_OBJ_FILE_LINK_EMBEDDABLE_PROP_NAME
=
"dxObjFileLinkEmbeddable"
;
public
static
final
String
DX_OBJ_FILE_LINK_EMBEDDABLE_PROP_NAME
=
"dxObjFileLinkEmbeddable"
;
public
static
final
String
DX_LIFECYCLE_MANAGE_BASE_EMBEDDABLE_PROP_NAME
=
"dxLifecycleManageBaseEmbeddable"
;
public
static
final
String
DX_LIFECYCLE_MANAGE_BASE_EMBEDDABLE_PROP_NAME
=
"dxLifecycleManageBaseEmbeddable"
;
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_LOGIC_DELETE_EMBEDDABLE_PROP_NAME
=
"dxLogicDeleteEmbeddable"
;
public
static
final
String
DX_SECRET_EMBEDDABLE_PROP_NAME
=
"dxSecretEmbeddable"
;
public
static
final
String
DX_SECRET_EMBEDDABLE_PROP_NAME
=
"dxSecretEmbeddable"
;
public
static
final
String
DX_ITERATION_EMBEDDABLE_PROP_NAME
=
"dxIterationEmbeddable"
;
public
static
final
String
DX_ITERATION_EMBEDDABLE_PROP_NAME
=
"dxIterationEmbeddable"
;
public
static
final
String
ACTUAL_COMPLETE_TIME_PROP_NAME
=
"actualCompleteTime"
;
public
static
final
String
ACTUAL_COMPLETE_TIME_PROP_NAME
=
"actualCompleteTime"
;
...
@@ -79,6 +66,13 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
...
@@ -79,6 +66,13 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
public
static
final
String
RATIFIER_PROP_NAME
=
"ratifier"
;
public
static
final
String
RATIFIER_PROP_NAME
=
"ratifier"
;
public
static
final
String
SYSTEM_NUMBER_PROP_NAME
=
"systemNumber"
;
public
static
final
String
SYSTEM_NUMBER_PROP_NAME
=
"systemNumber"
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxContextVOEmbeddable
dxContextEmbeddable
;
/**
/**
* 扩展VO属性
* 扩展VO属性
*/
*/
...
@@ -100,6 +94,13 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
...
@@ -100,6 +94,13 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
@JsonIgnore
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLogicDeleteVOEmbeddable
dxLogicDeleteEmbeddable
;
/**
/**
* 扩展VO属性
* 扩展VO属性
*/
*/
...
@@ -112,7 +113,7 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
...
@@ -112,7 +113,7 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
*/
*/
@DexEmbedded
()
@DexEmbedded
()
@JsonIgnore
@JsonIgnore
private
DxIterationVOEmbeddable
<
ExtI
DE
PlanVO
>
dxIterationEmbeddable
;
private
DxIterationVOEmbeddable
<
ExtI
ED
PlanVO
>
dxIterationEmbeddable
;
/**
/**
* 实际完成时间
* 实际完成时间
...
@@ -171,10 +172,15 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
...
@@ -171,10 +172,15 @@ public class ExtIDEPlanVO extends IdOnlyVO implements IdVO ,DxLifecycleManageBas
*/
*/
private
String
fileName
;
private
String
fileName
;
/**
* 文件编号
*/
private
String
fileNumber
;
/**
/**
* 文件提交时间
* 文件提交时间
*/
*/
private
LocalDateTime
fileSubmitTime
e
;
private
LocalDateTime
fileSubmitTime
;
/**
/**
* 文件类型
* 文件类型
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtIDEPlanController.java
deleted
100644 → 0
View file @
6df27433
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
org.springframework.stereotype.Controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.core.service.ExtIDEPlanService
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dcs.plan.core.controller.shadow.ExtIDEPlanControllerShadow
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
/**
* @description: ExtIDEPlan-Controller
* @author: dexadmin
* @version: V
* @date: 2024-8-29 17:14:49
**/
@Api
(
tags
=
"ExtIDEPlan管理服务"
)
@RequestMapping
(
"/ExtIDEPlan"
)
@ResponseBody
()
@Controller
(
ExtIDEPlanController
.
BEAN_NAME
)
public
class
ExtIDEPlanController
<
V
extends
ExtIDEPlanVO
&
DxContextVOHolder
,
S
extends
ExtIDEPlanService
<
V
>>
extends
ExtIDEPlanControllerShadow
<
V
,
S
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtIEDPlanController.java
0 → 100644
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.core.controller.shadow.ExtIEDPlanControllerShadow
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
/**
* @description: ExtIEDPlan-Controller
* @author: dexadmin
* @version: V
* @date: 2024-9-11 15:49:41
**/
@Api
(
tags
=
"ExtIEDPlan管理服务"
)
@RequestMapping
(
"/ExtIEDPlan"
)
@ResponseBody
()
@Controller
(
ExtIEDPlanController
.
BEAN_NAME
)
public
class
ExtIEDPlanController
<
V
extends
ExtIEDPlanVO
,
S
extends
ExtIEDPlanService
<
V
>>
extends
ExtIEDPlanControllerShadow
<
V
,
S
>
{
@Autowired
private
ExtIEDPlanService
extIEDPlanService
;
/**
* 导入采购计划
*
* @param uploadFile
* @return
* @throws IOException
*/
@ApiOperation
(
"导入采购计划"
)
@PostMapping
(
value
=
"/insertIEDPlan"
)
public
ApiResult
insertPlan
(
@RequestParam
(
"file"
)
MultipartFile
uploadFile
)
throws
IOException
{
return
ApiResult
.
ok
(
extIEDPlanService
.
importIEDPlan
(
uploadFile
.
getInputStream
()),
"采购计划导入成功"
);
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/shadow/ExtIDEPlanControllerShadow.java
deleted
100644 → 0
View file @
6df27433
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
.
shadow
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.core.service.ExtIDEPlanService
;
import
com.yonde.dcs.plan.core.service.impl.ExtIDEPlanServiceImpl
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
javax.annotation.Resource
;
import
com.yonde.dex.basedata.auth.annos.PermissionObject
;
import
com.yonde.dex.version.plugin.core.controller.AbstractVersionBaseController
;
import
com.yonde.dex.basedata.auth.annos.SubPermission
;
import
com.yonde.entity.annotation.SandBoxOpen
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.controller.DxObjFileLinkController
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
import
com.yonde.dex.lcycle.plugin.core.controller.AbstractLifecycleBaseController
;
import
com.yonde.dex.baseweb.AbstractBaseController
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
/**
* @description: ExtIDEPlan-Controller
* @author: dexadmin
* @version: V
* @date: 2024-8-29 9:31:22
**/
public
class
ExtIDEPlanControllerShadow
<
V
extends
ExtIDEPlanVO
&
DxContextVOHolder
,
S
extends
ExtIDEPlanService
<
V
>>
implements
AbstractBaseController
<
V
,
S
>
,
AbstractLifecycleBaseController
<
V
,
S
>
,
AbstractVersionBaseController
<
V
,
S
>
,
DxObjFileLinkController
<
V
,
S
>{
public
static
final
String
BEAN_NAME
=
"extIDEPlanController"
;
/**
* 注入
*/
@Resource
(
name
=
ExtIDEPlanServiceImpl
.
BEAN_NAME
)
private
ExtIDEPlanService
<
V
>
extIDEPlanService
;
/**
* getService
*/
@Override
public
S
getService
()
{
return
(
S
)
this
.
extIDEPlanService
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/shadow/ExtIEDPlanControllerShadow.java
0 → 100644
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.service.impl.ExtIEDPlanServiceImpl
;
import
com.yonde.dex.baseweb.AbstractBaseController
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.controller.DxObjFileLinkController
;
import
com.yonde.dex.lcycle.plugin.core.controller.AbstractLifecycleBaseController
;
import
com.yonde.dex.version.plugin.core.controller.AbstractVersionBaseController
;
import
javax.annotation.Resource
;
/**
* @description: ExtIEDPlan-Controller
* @author: dexadmin
* @version: V
* @date: 2024-9-11 15:49:41
**/
public
class
ExtIEDPlanControllerShadow
<
V
extends
ExtIEDPlanVO
,
S
extends
ExtIEDPlanService
<
V
>>
implements
AbstractBaseController
<
V
,
S
>
,
AbstractLifecycleBaseController
<
V
,
S
>
,
AbstractVersionBaseController
<
V
,
S
>
,
DxObjFileLinkController
<
V
,
S
>{
public
static
final
String
BEAN_NAME
=
"extIEDPlanController"
;
/**
* 注入
*/
@Resource
(
name
=
ExtIEDPlanServiceImpl
.
BEAN_NAME
)
private
ExtIEDPlanService
<
V
>
extIEDPlanService
;
/**
* getService
*/
@Override
public
S
getService
()
{
return
(
S
)
this
.
extIEDPlanService
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
dfe8fb4a
...
@@ -3,25 +3,35 @@ package com.yonde.dcs.plan.core.listener;
...
@@ -3,25 +3,35 @@ package com.yonde.dcs.plan.core.listener;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.StringUtils
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
com.yonde.dcs.plan.common.utils.SearchUtil
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtPuchasePlanAttributeVO
;
import
com.yonde.dcs.plan.common.vo.ExtPuchasePlanAttributeVO
;
import
com.yonde.dcs.plan.common.vo.ExtPuchasePlanExcelVO
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.service.ExtDistributeRecordService
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dcs.plan.core.service.ExtIDEPlanService
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
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.dao.service.util.ApplicationContextUtil
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
@Component
@Component
@Slf4j
@Slf4j
public
class
IEDPlanExcelListenner
extends
AnalysisEventListener
<
ExtI
DEPlan
VO
>
{
public
class
IEDPlanExcelListenner
extends
AnalysisEventListener
<
ExtI
EDPlanExcel
VO
>
{
@Autowired
private
ExtIEDPlanService
extIEDPlanService
;
private
ExtIDEPlanService
extIDEPlanService
;
/**
/**
* 每隔100条处理下,然后清理list ,方便内存回收
* 每隔100条处理下,然后清理list ,方便内存回收
...
@@ -31,26 +41,62 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIDEPlanVO> {
...
@@ -31,26 +41,62 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIDEPlanVO> {
/**
/**
* 缓存的数据
* 缓存的数据
*/
*/
private
List
<
Ext
Puchase
PlanExcelVO
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
private
List
<
Ext
IED
PlanExcelVO
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
/**
* 校验数据的错误信息
*/
List
<
StringBuffer
>
errorList
=
new
ArrayList
<>();
/**
* excel操作符集合
*/
List
<
String
>
operationList
=
Arrays
.
asList
(
Constants
.
EXCEL_ADD
,
Constants
.
EXCEL_UPDATE
,
Constants
.
EXCEL_DELETE
);
public
IEDPlanExcelListenner
()
{
this
.
extIEDPlanService
=
ApplicationContextUtil
.
getBean
(
ExtIEDPlanService
.
class
);
}
@Override
@Override
public
void
invoke
(
ExtIDEPlanVO
extIDEPlanVO
,
AnalysisContext
analysisContext
)
{
public
void
invoke
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
,
AnalysisContext
analysisContext
)
{
log
.
info
(
"解析到一条数据:{}"
,
extIDEPlanVO
);
log
.
info
(
"解析到一条数据:{}"
,
extIEDPlanExcelVO
);
//检查excel数据合法性
checkDataForExcel
(
extIEDPlanExcelVO
);
}
}
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
analysisContext
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
analysisContext
)
{
// 收尾工作,处理剩下的缓存数据。。。
// 收尾工作,处理剩下的缓存数据。。。
log
.
info
(
"sheet={} 所有数据解析完成!"
,
analysisContext
.
readSheetHolder
().
getSheetName
());
log
.
info
(
"sheet={} 所有数据解析完成!"
,
analysisContext
.
readSheetHolder
().
getSheetName
());
if
(
errorList
.
size
()
>
0
)
{
throw
new
DxBusinessException
(
"-1"
,
"导入采购计划数据有误!!"
+
errorList
.
toString
());
}
//处理全部检查通过的数据
for
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
:
cachedDataList
)
{
ExtIEDPlanVO
extIEDPlanVO
=
new
ExtIEDPlanVO
();
//将excel对象转换为po对象
transitionObject
(
extIEDPlanVO
,
extIEDPlanExcelVO
);
if
(
Constants
.
EXCEL_ADD
.
equals
(
extIEDPlanExcelVO
.
getOperation
()))
{
//新增
extIEDPlanVO
.
setOperator
(
OperatorType
.
ADD
);
extIEDPlanService
.
saveRecursion
(
extIEDPlanVO
);
}
else
if
(
Constants
.
EXCEL_UPDATE
.
equals
(
extIEDPlanExcelVO
.
getOperation
()))
{
//更新
extIEDPlanVO
.
setOperator
(
OperatorType
.
MODIFY
);
ExtIEDPlanVO
extIEDPlanVOForDB
=
getIEDPlanByFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
transitionObject
(
extIEDPlanVOForDB
,
extIEDPlanExcelVO
);
extIEDPlanService
.
saveRecursion
(
extIEDPlanVOForDB
);
}
else
{
//删除
ExtIEDPlanVO
extIEDPlanVOForDB
=
getIEDPlanByFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
extIEDPlanService
.
remove
(
extIEDPlanVOForDB
.
getId
());
}
}
}
}
/**
/**
*
* @param exception
* @param exception
* @param context
* @param context
* @throws Exception
* @throws Exception
...
@@ -62,6 +108,70 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIDEPlanVO> {
...
@@ -62,6 +108,70 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIDEPlanVO> {
}
}
/**
* 校验excel中的数据是否合法
*
* @param extIEDPlanExcelVO excel表格内容对象
*/
public
void
checkDataForExcel
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
)
{
StringBuffer
errorString
=
new
StringBuffer
();
//校验数据
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getOperation
())
&&
!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileNumber
()))
{
if
(
operationList
.
contains
(
extIEDPlanExcelVO
.
getOperation
()))
{
errorString
.
append
(
"文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的操作符无法识别!!"
);
errorList
.
add
(
errorString
);
}
if
(
Constants
.
EXCEL_ADD
.
equals
(
extIEDPlanExcelVO
.
getOperation
()))
{
//如果是新增,查看一下数据库中是不是已经存在
ExtIEDPlanVO
extIEDPlanVO
=
getIEDPlanByFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extIEDPlanVO
))
{
errorString
.
append
(
"新增IED计划的文件编号:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"已存在,不能重复添加!"
);
errorList
.
add
(
errorString
);
}
}
}
else
{
errorString
.
append
(
"文件编号、操作符均不能为空!!"
);
errorList
.
add
(
errorString
);
}
cachedDataList
.
add
(
extIEDPlanExcelVO
);
}
/**
* 转换数据,将EXCEL对象转换为PO对象
*/
private
void
transitionObject
(
ExtIEDPlanVO
extIEDPlanVO
,
ExtIEDPlanExcelVO
extIEDPlanExcelVO
)
{
extIEDPlanVO
.
setFileType
(
extIEDPlanExcelVO
.
getFileType
());
extIEDPlanVO
.
setFileClassify
(
extIEDPlanExcelVO
.
getFileClassify
());
extIEDPlanVO
.
setFileNumber
(
extIEDPlanExcelVO
.
getFileNumber
());
extIEDPlanVO
.
setFileCode
(
extIEDPlanExcelVO
.
getFileCode
());
extIEDPlanVO
.
setSystemNumber
(
extIEDPlanExcelVO
.
getSystemNumber
());
extIEDPlanVO
.
setDeviceNumber
(
extIEDPlanExcelVO
.
getDeviceNumber
());
extIEDPlanVO
.
setPhase
(
extIEDPlanExcelVO
.
getPhase
());
extIEDPlanVO
.
setAuditTime
(
extIEDPlanExcelVO
.
getAuditTime
());
extIEDPlanVO
.
setFileSubmitTime
(
extIEDPlanExcelVO
.
getFileSubmitTime
());
extIEDPlanVO
.
setEditor
(
extIEDPlanExcelVO
.
getEditor
());
extIEDPlanVO
.
setChecker
(
extIEDPlanExcelVO
.
getChecker
());
extIEDPlanVO
.
setAuditor
(
extIEDPlanExcelVO
.
getAuditor
());
extIEDPlanVO
.
setInvestigator
(
extIEDPlanExcelVO
.
getInvestigator
());
extIEDPlanVO
.
setRatifier
(
extIEDPlanExcelVO
.
getRatifier
());
extIEDPlanVO
.
setNote
(
extIEDPlanExcelVO
.
getNote
());
//获取密级code
String
secretCode
=
CommonUtils
.
searchDictDataByDictCode
(
Constants
.
SECRET_CODE
,
extIEDPlanExcelVO
.
getSecretCode
());
extIEDPlanVO
.
setSecretCode
(
secretCode
);
}
public
ExtIEDPlanVO
getIEDPlanByFileNumber
(
String
fileNumber
)
{
//根据文件编号查询IED计划
DxPageImpl
<
ExtIEDPlanVO
>
IEDPlanPage
=
extIEDPlanService
.
findRecursion
(
SearchUtil
.
buildQuery
(
"fileNumber"
,
SearchItem
.
Operator
.
EQ
,
fileNumber
));
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/repository/ExtIDEPlanRepository.java
deleted
100644 → 0
View file @
6df27433
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
;
import
com.yonde.dcs.plan.entity.po.ExtIDEPlan
;
import
com.yonde.dcs.plan.core.repository.shadow.ExtIDEPlanRepositoryShadow
;
/**
* @description: ExtIDEPlan-repository
* @author: dexadmin
* @version: V
* @date: 2024-8-29 9:31:22
**/
public
interface
ExtIDEPlanRepository
<
P
extends
ExtIDEPlan
>
extends
ExtIDEPlanRepositoryShadow
<
P
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/ExtIEDPlanRepository.java
0 → 100644
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
;
import
com.yonde.dcs.plan.core.repository.shadow.ExtIEDPlanRepositoryShadow
;
import
com.yonde.dcs.plan.entity.po.ExtIEDPlan
;
/**
* @description: ExtIEDPlan-repository
* @author: dexadmin
* @version: V
* @date: 2024-9-11 15:49:41
**/
public
interface
ExtIEDPlanRepository
<
P
extends
ExtIEDPlan
>
extends
ExtIEDPlanRepositoryShadow
<
P
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/shadow/ExtI
DE
PlanRepositoryShadow.java
→
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/shadow/ExtI
ED
PlanRepositoryShadow.java
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
.
shadow
;
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
.
shadow
;
import
com.yonde.dcs.plan.entity.po.ExtIDEPlan
;
import
com.yonde.dcs.plan.entity.po.ExtIEDPlan
;
import
org.springframework.data.repository.NoRepositoryBean
;
import
org.springframework.data.repository.NoRepositoryBean
;
import
com.yonde.dex.context.plugin.core.repository.DxContextPluginRepository
;
import
com.yonde.dex.logicdelete.plugin.core.repository.DxLogicDeleteRepository
;
import
com.yonde.dex.dao.business.repository.BaseRepository
;
import
com.yonde.dex.dao.business.repository.BaseRepository
;
import
com.yonde.dex.secretcode.plugin.core.repositroy.DxSecretCodePluginRepository
;
import
com.yonde.dex.secretcode.plugin.core.repositroy.DxSecretCodePluginRepository
;
import
com.yonde.dex.version.plugin.core.repository.DxIterationRepository
;
import
com.yonde.dex.version.plugin.core.repository.DxIterationRepository
;
import
com.yonde.dex.lcycle.plugin.core.repository.DxLifecycleManageBaseRepository
;
import
com.yonde.dex.lcycle.plugin.core.repository.DxLifecycleManageBaseRepository
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.repository.DxObjFileLinkPluginRepository
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.repository.DxObjFileLinkPluginRepository
;
/**
/**
* @description: ExtI
DE
Plan-repository
* @description: ExtI
ED
Plan-repository
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-
8-29 9:31:22
* @date: 2024-
9-11 15:49:41
**/
**/
@NoRepositoryBean
@NoRepositoryBean
public
interface
ExtI
DEPlanRepositoryShadow
<
P
extends
ExtIDEPlan
>
extends
DxObjFileLinkPluginRepository
<
P
>
,
DxLifecycleManageBaseRepository
<
P
>
,
Bas
eRepository
<
P
>
,
DxSecretCodePluginRepository
<
P
>
,
DxIterationRepository
<
P
>
{
public
interface
ExtI
EDPlanRepositoryShadow
<
P
extends
ExtIEDPlan
>
extends
DxContextPluginRepository
<
P
>
,
DxObjFileLinkPluginRepository
<
P
>
,
DxLifecycleManageBaseRepository
<
P
>
,
BaseRepository
<
P
>
,
DxLogicDelet
eRepository
<
P
>
,
DxSecretCodePluginRepository
<
P
>
,
DxIterationRepository
<
P
>
{
String
BEAN_NAME
=
"extI
DE
PlanRepository"
;
String
BEAN_NAME
=
"extI
ED
PlanRepository"
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtIDEPlanService.java
deleted
100644 → 0
View file @
6df27433
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtIDEPlanServiceShadow
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
/**
* @description: ExtIDEPlan-service
* @author: dexadmin
* @version: V
* @date: 2024-8-29 9:31:22
**/
public
interface
ExtIDEPlanService
<
V
extends
ExtIDEPlanVO
&
DxContextVOHolder
>
extends
ExtIDEPlanServiceShadow
<
V
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtIEDPlanService.java
0 → 100644
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtIEDPlanServiceShadow
;
import
java.io.InputStream
;
/**
* @description: ExtIEDPlan-service
* @author: dexadmin
* @version: V
* @date: 2024-9-11 15:49:41
**/
public
interface
ExtIEDPlanService
<
V
extends
ExtIEDPlanVO
>
extends
ExtIEDPlanServiceShadow
<
V
>
{
String
importIEDPlan
(
InputStream
inputStream
);
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIDEPlanServiceImpl.java
deleted
100644 → 0
View file @
6df27433
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.core.service.ExtIDEPlanService
;
import
com.yonde.dcs.plan.core.repository.ExtIDEPlanRepository
;
import
com.yonde.dcs.plan.entity.po.ExtIDEPlan
;
import
javax.annotation.Resource
;
/**
* @description: ExtIDEPlan-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-8-29 9:31:22
**/
@Slf4j
@Service
(
ExtIDEPlanServiceImpl
.
BEAN_NAME
)
public
class
ExtIDEPlanServiceImpl
<
V
extends
ExtIDEPlanVO
&
DxContextVOHolder
>
implements
ExtIDEPlanService
<
V
>{
public
static
final
String
BEAN_NAME
=
"extIDEPlanServiceImpl"
;
@Autowired
ExtIDEPlanRepository
<
ExtIDEPlan
>
extIDEPlanRepository
;
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
0 → 100644
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
com.alibaba.excel.EasyExcel
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtPuchasePlanExcelVO
;
import
com.yonde.dcs.plan.core.listener.IEDPlanExcelListenner
;
import
com.yonde.dcs.plan.core.listener.PurchasePlanExcelReadListenner
;
import
com.yonde.dcs.plan.core.repository.ExtIEDPlanRepository
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.entity.po.ExtIEDPlan
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.io.InputStream
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @description: ExtIEDPlan-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-9-11 15:49:41
**/
@Slf4j
@Service
(
ExtIEDPlanServiceImpl
.
BEAN_NAME
)
public
class
ExtIEDPlanServiceImpl
<
V
extends
ExtIEDPlanVO
>
implements
ExtIEDPlanService
<
V
>
{
public
static
final
String
BEAN_NAME
=
"extIEDPlanServiceImpl"
;
@Autowired
ExtIEDPlanRepository
<
ExtIEDPlan
>
extIEDPlanRepository
;
@Override
public
String
importIEDPlan
(
InputStream
inputStream
)
{
EasyExcel
.
read
(
inputStream
,
ExtPuchasePlanExcelVO
.
class
,
new
IEDPlanExcelListenner
())
.
sheet
()
.
doRead
();
return
ApiResult
.
SUCCESS
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
View file @
dfe8fb4a
...
@@ -83,7 +83,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
...
@@ -83,7 +83,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
.
item
(
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
IN
,
Ids
,
null
))
.
item
(
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
IN
,
Ids
,
null
))
.
build
())
.
build
())
.
build
();
.
build
();
//根据批量计划
编码
获取计划集合
//根据批量计划
id
获取计划集合
DxPageImpl
<
V
>
purchasePlanPage
=
this
.
findRecursion
(
condition
);
DxPageImpl
<
V
>
purchasePlanPage
=
this
.
findRecursion
(
condition
);
if
(
CollectionUtils
.
isNotEmpty
(
purchasePlanPage
.
getContent
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
purchasePlanPage
.
getContent
()))
{
List
<
V
>
content
=
purchasePlanPage
.
getContent
();
List
<
V
>
content
=
purchasePlanPage
.
getContent
();
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/shadow/ExtI
DE
PlanServiceShadow.java
→
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/shadow/ExtI
ED
PlanServiceShadow.java
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
shadow
;
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
com.yonde.dcs.plan.
feign.ExtIDEPlanServiceFeign
;
import
com.yonde.dcs.plan.
common.vo.ExtIEDPlanVO
;
import
com.yonde.d
ex.context.plugin.common.entity.DxContextVOHolder
;
import
com.yonde.d
cs.plan.feign.ExtIEDPlanServiceFeign
;
import
com.yonde.dex.dao.service.BaseIdEntityService
;
import
com.yonde.dex.dao.service.BaseIdEntityService
;
import
com.yonde.dex.secretcode.plugin.core.service.SecretCodePluginService
;
import
com.yonde.dex.secretcode.plugin.core.service.SecretCodePluginService
;
import
com.yonde.dex.version.plugin.core.service.IterationService
;
import
com.yonde.dex.version.plugin.core.service.IterationService
;
import
com.yonde.dex.context.plugin.core.service.ContextPluginService
;
import
com.yonde.dex.context.plugin.core.service.ContextPluginService
;
import
com.yonde.dex.lcycle.plugin.core.service.LifecycleBaseService
;
import
com.yonde.dex.lcycle.plugin.core.service.LifecycleBaseService
;
import
com.yonde.dex.logicdelete.plugin.core.service.LogicDeleteService
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.service.ObjFileLinkPluginService
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.service.ObjFileLinkPluginService
;
/**
/**
* @description: ExtI
DE
Plan-service
* @description: ExtI
ED
Plan-service
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-
8-30 10:28:37
* @date: 2024-
9-11 15:49:41
**/
**/
public
interface
ExtI
DEPlanServiceShadow
<
V
extends
ExtIDEPlanVO
&
DxContextVOHolder
>
extends
ExtIDEPlanServiceFeign
<
V
>,
ContextPluginService
<
V
>
,
ObjFileLinkPluginService
<
V
>
,
LifecycleBaseService
<
V
>
,
BaseIdEntity
Service
<
V
>
,
SecretCodePluginService
<
V
>
,
IterationService
<
V
>
{
public
interface
ExtI
EDPlanServiceShadow
<
V
extends
ExtIEDPlanVO
>
extends
ExtIEDPlanServiceFeign
<
V
>,
ContextPluginService
<
V
>
,
ObjFileLinkPluginService
<
V
>
,
LifecycleBaseService
<
V
>
,
BaseIdEntityService
<
V
>
,
LogicDelete
Service
<
V
>
,
SecretCodePluginService
<
V
>
,
IterationService
<
V
>
{
}
}
dcs-plan-entity/src/main/java/com/yonde/dcs/plan/entity/po/ExtI
DE
Plan.java
→
dcs-plan-entity/src/main/java/com/yonde/dcs/plan/entity/po/ExtI
ED
Plan.java
View file @
dfe8fb4a
...
@@ -23,31 +23,41 @@ import javax.persistence.Embedded;
...
@@ -23,31 +23,41 @@ import javax.persistence.Embedded;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.yonde.dex.lcycle.plugin.entities.DxLifecycleManageBaseEmbeddable
;
import
com.yonde.dex.lcycle.plugin.entities.DxLifecycleManageBaseEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
com.yonde.dex.context.plugin.entities.DxContextHolder
;
import
javax.persistence.Column
;
import
com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkHolder
;
import
com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkHolder
;
import
com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkEmbeddable
;
import
com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkEmbeddable
;
import
com.yonde.dex.context.plugin.entities.DxContextEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.version.plugin.entities.DxIterationHolder
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
javax.persistence.Column
;
import
com.yonde.dex.secretcode.plugin.entities.DxSecretHolder
;
import
com.yonde.dex.secretcode.plugin.entities.DxSecretHolder
;
import
com.yonde.dex.lcycle.plugin.entities.DxLifecycleManageBaseHolder
;
import
com.yonde.dex.lcycle.plugin.entities.DxLifecycleManageBaseHolder
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.secretcode.plugin.entities.DxSecretEmbeddable
;
import
com.yonde.dex.secretcode.plugin.entities.DxSecretEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
import
com.yonde.dex.version.plugin.entities.DxIterationHolder
;
import
com.yonde.dex.version.plugin.entities.DxIterationEmbeddable
;
import
com.yonde.dex.version.plugin.entities.DxIterationEmbeddable
;
/**
/**
* @description: ExtI
DE
Plan-PO实体
* @description: ExtI
ED
Plan-PO实体
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-
8-29 9:31:22
* @date: 2024-
9-11 15:49:41
**/
**/
@Entity
@Entity
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@NoArgsConstructor
@NoArgsConstructor
@Data
@Data
@Table
(
name
=
"EXT_I
DE
_PLAN"
)
@Table
(
name
=
"EXT_I
ED
_PLAN"
)
public
class
ExtI
DEPlan
extends
IdOnlyEntity
implements
DxObjFileLinkHolder
,
DxLifecycleManageBaseHolder
,
IdEntity
,
DxSecretHolder
,
DxIterationHolder
{
public
class
ExtI
EDPlan
extends
IdOnlyEntity
implements
DxContextHolder
,
DxObjFileLinkHolder
,
DxLifecycleManageBaseHolder
,
IdEntity
,
DxLogicDeleteHolder
,
DxSecretHolder
,
DxIterationHolder
{
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxContextEmbeddable
dxContextEmbeddable
;
/**
/**
* 扩展PO属性
* 扩展PO属性
*/
*/
...
@@ -71,6 +81,12 @@ public class ExtIDEPlan extends IdOnlyEntity implements DxObjFileLinkHolder ,DxL
...
@@ -71,6 +81,12 @@ public class ExtIDEPlan extends IdOnlyEntity implements DxObjFileLinkHolder ,DxL
*/
*/
@DexEmbedded
()
@DexEmbedded
()
@Embedded
()
@Embedded
()
private
DxLogicDeleteEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxSecretEmbeddable
dxSecretEmbeddable
;
private
DxSecretEmbeddable
dxSecretEmbeddable
;
/**
/**
* 扩展PO属性
* 扩展PO属性
...
@@ -118,10 +134,15 @@ public class ExtIDEPlan extends IdOnlyEntity implements DxObjFileLinkHolder ,DxL
...
@@ -118,10 +134,15 @@ public class ExtIDEPlan extends IdOnlyEntity implements DxObjFileLinkHolder ,DxL
* 文件名称
* 文件名称
*/
*/
private
String
fileName
;
private
String
fileName
;
/**
* 文件编号
*/
private
String
fileNumber
;
/**
/**
* 文件提交时间
* 文件提交时间
*/
*/
private
LocalDateTime
fileSubmitTime
e
;
private
LocalDateTime
fileSubmitTime
;
/**
/**
* 文件类型
* 文件类型
*/
*/
...
...
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtIDEPlanServiceFeign.java
deleted
100644 → 0
View file @
6df27433
package
com
.
yonde
.
dcs
.
plan
.
feign
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
io.swagger.annotations.Api
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.feign.shadow.ExtIDEPlanServiceFeignShadow
;
/**
* @description: ExtIDEPlan-Feign
* @author: dexadmin
* @version: V
* @date: 2024-8-29 9:31:22
**/
@Api
(
tags
=
"ExtIDEPlan-FEIGN"
)
@FeignClient
(
value
=
"${dcs.feign.INET-PLAN}"
,
path
=
"/ExtIDEPlan"
)
public
interface
ExtIDEPlanServiceFeign
<
V
extends
ExtIDEPlanVO
>
extends
ExtIDEPlanServiceFeignShadow
<
V
>
{
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtIEDPlanServiceFeign.java
0 → 100644
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
feign
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.feign.shadow.ExtIEDPlanServiceFeignShadow
;
import
io.swagger.annotations.Api
;
import
org.springframework.cloud.openfeign.FeignClient
;
/**
* @description: ExtIEDPlan-Feign
* @author: dexadmin
* @version: V
* @date: 2024-9-11 15:49:41
**/
@Api
(
tags
=
"ExtIEDPlan-FEIGN"
)
@FeignClient
(
value
=
"${dcs.feign.INET-PLAN}"
,
path
=
"/ExtIEDPlan"
)
public
interface
ExtIEDPlanServiceFeign
<
V
extends
ExtIEDPlanVO
>
extends
ExtIEDPlanServiceFeignShadow
<
V
>
{
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/shadow/ExtI
DE
PlanServiceFeignShadow.java
→
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/shadow/ExtI
ED
PlanServiceFeignShadow.java
View file @
dfe8fb4a
package
com
.
yonde
.
dcs
.
plan
.
feign
.
shadow
;
package
com
.
yonde
.
dcs
.
plan
.
feign
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtIDEPlanVO
;
import
io.swagger.annotations.Api
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
com.yonde.dex.context.plugin.feign.ContextPluginFeign
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dex.lcycle.plugin.feign.BaseLifecycleManageFeign
;
import
com.yonde.dex.dao.service.remotes.BaseFeign
;
import
com.yonde.dex.dao.service.remotes.BaseFeign
;
import
com.yonde.dex.lcycle.plugin.feign.BaseLifecycleManageFeign
;
import
com.yonde.dex.logicdelete.plugin.feign.LogicDeleteFeign
;
import
com.yonde.dex.secretcode.plugin.feign.SecretCodeFeign
;
import
com.yonde.dex.secretcode.plugin.feign.SecretCodeFeign
;
import
com.yonde.dex.version.plugin.feign.BaseVersionFeign
;
import
com.yonde.dex.version.plugin.feign.BaseVersionFeign
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
/**
/**
* @description: ExtI
DE
Plan-Feign
* @description: ExtI
ED
Plan-Feign
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-
8-29 9:31:22
* @date: 2024-
9-11 15:49:41
**/
**/
public
interface
ExtI
DEPlanServiceFeignShadow
<
V
extends
ExtIDEPlanVO
>
extends
BaseLifecycleManageFeign
<
V
>
,
Bas
eFeign
<
V
>
,
SecretCodeFeign
<
V
>
,
BaseVersionFeign
<
V
>
{
public
interface
ExtI
EDPlanServiceFeignShadow
<
V
extends
ExtIEDPlanVO
>
extends
ContextPluginFeign
<
V
>
,
BaseLifecycleManageFeign
<
V
>
,
BaseFeign
<
V
>
,
LogicDelet
eFeign
<
V
>
,
SecretCodeFeign
<
V
>
,
BaseVersionFeign
<
V
>
{
String
BEAN_NAME
=
"extI
DE
PlanServiceFeign"
;
String
BEAN_NAME
=
"extI
ED
PlanServiceFeign"
;
}
}
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