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
a8cacbfb
Commit
a8cacbfb
authored
Sep 14, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ICM计划导入、导出功能开发(暂未测试)
parent
4d39eea6
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1452 additions
and
4 deletions
+1452
-4
Constants.java
...n/java/com/yonde/dcs/plan/common/constants/Constants.java
+8
-0
ExtICMExternalInterfacePlanVO.java
...nde/dcs/plan/common/vo/ExtICMExternalInterfacePlanVO.java
+208
-0
ExtICMPlanDocLinkVO.java
...ava/com/yonde/dcs/plan/common/vo/ExtICMPlanDocLinkVO.java
+84
-0
ExtICMPlanExcelVO.java
.../java/com/yonde/dcs/plan/common/vo/ExtICMPlanExcelVO.java
+108
-0
ExtICMExternalInterfacePlanController.java
...ore/controller/ExtICMExternalInterfacePlanController.java
+65
-0
ExtICMPlanDocLinkController.java
...dcs/plan/core/controller/ExtICMPlanDocLinkController.java
+33
-0
ExtICMExternalInterfacePlanControllerShadow.java
...r/shadow/ExtICMExternalInterfacePlanControllerShadow.java
+54
-0
ExtICMPlanDocLinkControllerShadow.java
.../controller/shadow/ExtICMPlanDocLinkControllerShadow.java
+44
-0
ICMPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/ICMPlanExcelListenner.java
+213
-0
ExtICMExternalInterfacePlanRepository.java
...ore/repository/ExtICMExternalInterfacePlanRepository.java
+12
-0
ExtICMPlanDocLinkRepository.java
...dcs/plan/core/repository/ExtICMPlanDocLinkRepository.java
+12
-0
ExtICMExternalInterfacePlanRepositoryShadow.java
...y/shadow/ExtICMExternalInterfacePlanRepositoryShadow.java
+22
-0
ExtICMPlanDocLinkRepositoryShadow.java
.../repository/shadow/ExtICMPlanDocLinkRepositoryShadow.java
+18
-0
ExtICMExternalInterfacePlanService.java
...plan/core/service/ExtICMExternalInterfacePlanService.java
+23
-0
ExtICMPlanDocLinkService.java
...yonde/dcs/plan/core/service/ExtICMPlanDocLinkService.java
+19
-0
ExtFileTemplateManagerServiceImpl.java
.../core/service/impl/ExtFileTemplateManagerServiceImpl.java
+4
-2
ExtICMExternalInterfacePlanServiceImpl.java
.../service/impl/ExtICMExternalInterfacePlanServiceImpl.java
+137
-0
ExtICMPlanDocLinkServiceImpl.java
.../plan/core/service/impl/ExtICMPlanDocLinkServiceImpl.java
+45
-0
ExtPuchasePlanAttributeServiceImpl.java
...core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
+2
-2
ExtICMExternalInterfacePlanServiceShadow.java
...vice/shadow/ExtICMExternalInterfacePlanServiceShadow.java
+21
-0
ExtICMPlanDocLinkServiceShadow.java
...n/core/service/shadow/ExtICMPlanDocLinkServiceShadow.java
+16
-0
ExtICMExternalInterfacePlan.java
...yonde/dcs/plan/entity/po/ExtICMExternalInterfacePlan.java
+151
-0
ExtICMPlanDocLink.java
.../java/com/yonde/dcs/plan/entity/po/ExtICMPlanDocLink.java
+67
-0
ExtICMExternalInterfacePlanServiceFeign.java
...s/plan/feign/ExtICMExternalInterfacePlanServiceFeign.java
+19
-0
ExtICMPlanDocLinkServiceFeign.java
...m/yonde/dcs/plan/feign/ExtICMPlanDocLinkServiceFeign.java
+19
-0
ExtICMExternalInterfacePlanServiceFeignShadow.java
...shadow/ExtICMExternalInterfacePlanServiceFeignShadow.java
+27
-0
ExtICMPlanDocLinkServiceFeignShadow.java
...lan/feign/shadow/ExtICMPlanDocLinkServiceFeignShadow.java
+21
-0
No files found.
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/constants/Constants.java
View file @
a8cacbfb
...
@@ -412,6 +412,14 @@ public class Constants {
...
@@ -412,6 +412,14 @@ public class Constants {
*/
*/
public
static
final
String
IED_PLAN_EXCEL_NAME
=
"\\IED计划列表.xlsx"
;
public
static
final
String
IED_PLAN_EXCEL_NAME
=
"\\IED计划列表.xlsx"
;
public
static
final
String
IED_PLAN_TEMP_FILE_CODE_NAME
=
"IED计划001模板"
;
public
static
final
String
IED_PLAN_TEMP_FILE_CODE_NAME
=
"IED计划001模板"
;
/**
* ICM计划相关
*/
public
static
final
String
ICM_PLAN_EXCEL_NAME
=
"\\ICM计划列表.xlsx"
;
public
static
final
String
ICM_PLAN_TEMP_FILE_CODE_NAME
=
"ICM计划001模板"
;
/**
/**
* 计划模板
* 计划模板
*/
*/
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtICMExternalInterfacePlanVO.java
0 → 100644
View file @
a8cacbfb
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
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.yonde.dex.basedata.entity.xmladapters.LocalDateTimeXmlAdapter
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.*
;
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.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOHolder
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable
;
import
com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOHolder
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOEmbeddable
;
import
com.yonde.dex.basedata.entity.users.DxUserVO
;
import
com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOHolder
;
import
com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
import
com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOEmbeddable
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
/**
* @description: ExtICMExternalInterfacePlan-VO
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
CLASS
,
property
=
"dxClassname"
,
visible
=
true
,
defaultImpl
=
ExtICMExternalInterfacePlanVO
.
class
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@ToString
(
callSuper
=
true
)
public
class
ExtICMExternalInterfacePlanVO
extends
IdOnlyVO
implements
IdVO
,
DxContextVOHolder
,
DxLifecycleManageBaseVOHolder
,
DxObjFileLinkVOHolder
,
DxIterationVOHolder
<
ExtICMExternalInterfacePlanVO
>
,
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_LIFECYCLE_MANAGE_BASE_EMBEDDABLE_PROP_NAME
=
"dxLifecycleManageBaseEmbeddable"
;
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_ITERATION_EMBEDDABLE_PROP_NAME
=
"dxIterationEmbeddable"
;
public
static
final
String
ACCEPTOR_PROP_NAME
=
"acceptor"
;
public
static
final
String
ACTUAL_CLOSE_DATE_PROP_NAME
=
"actualCloseDate"
;
public
static
final
String
ACTUAL_OPEN_DATE_PROP_NAME
=
"actualOpenDate"
;
public
static
final
String
EXT_ICMPLAN_DOC_LINKS_PROP_NAME
=
"extICMPlanDocLinks"
;
public
static
final
String
INTERFACE_NOTE_PROP_NAME
=
"interfaceNote"
;
public
static
final
String
INTERFACE_TYPE_PROP_NAME
=
"interfaceType"
;
public
static
final
String
KEY_INTERFACE_PROP_NAME
=
"keyInterface"
;
public
static
final
String
MILESTONE_INTERFACE_PROP_NAME
=
"milestoneInterface"
;
public
static
final
String
PLAN_CLOSE_DATE_PROP_NAME
=
"planCloseDate"
;
public
static
final
String
PLAN_NUMBER_PROP_NAME
=
"planNumber"
;
public
static
final
String
PLAN_OPEN_DATE_PROP_NAME
=
"planOpenDate"
;
public
static
final
String
PUBLISHER_PROP_NAME
=
"publisher"
;
public
static
final
String
RESPONSIBILITY_PERSON_PROP_NAME
=
"responsibilityPerson"
;
public
static
final
String
RESPONSIBILITY_UNIT_PROP_NAME
=
"responsibilityUnit"
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxContextVOEmbeddable
dxContextEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxObjFileLinkVOEmbeddable
dxObjFileLinkEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLifecycleManageBaseVOEmbeddable
dxLifecycleManageBaseEmbeddable
;
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLogicDeleteVOEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxSecretVOEmbeddable
dxSecretEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxIterationVOEmbeddable
<
ExtICMExternalInterfacePlanVO
>
dxIterationEmbeddable
;
/**
* 接收方
*/
private
String
acceptor
;
/**
* 实际关闭日期
*/
private
LocalDateTime
actualCloseDate
;
/**
* 实际打开日期
*/
private
LocalDateTime
actualOpenDate
;
/**
* ExtICMPlanDocLink集合
*/
@RelationProperty
(
refProperty
=
"source"
)
@VersionProperty
(
curVersion
=
VersionRelationType
.
VERSION
,
refVersion
=
VersionRelationType
.
NONE
)
private
List
<
ExtICMPlanDocLinkVO
>
extICMPlanDocLinks
;
/**
* 接口说明
*/
private
String
interfaceNote
;
/**
* 接口类型
*/
private
String
interfaceType
;
/**
* 是否关键接口
*/
private
String
keyInterface
;
/**
* 是否里程碑接口
*/
private
String
milestoneInterface
;
/**
* 计划关闭日期
*/
private
LocalDateTime
planCloseDate
;
/**
* 计划编号
*/
private
String
planNumber
;
/**
* 计划打开日期
*/
private
LocalDateTime
planOpenDate
;
/**
* 发布方
*/
private
String
publisher
;
/**
* 责任人
*/
private
String
responsibilityPerson
;
/**
* 责任单位
*/
private
String
responsibilityUnit
;
}
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtICMPlanDocLinkVO.java
0 → 100644
View file @
a8cacbfb
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
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.yonde.dex.basedata.entity.xmladapters.LocalDateTimeXmlAdapter
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.*
;
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.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.basedata.entity.users.DxUserVO
;
/**
* @description: ExtICMPlanDocLink-VO
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
CLASS
,
property
=
"dxClassname"
,
visible
=
true
,
defaultImpl
=
ExtICMPlanDocLinkVO
.
class
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@ToString
(
callSuper
=
true
)
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
public
class
ExtICMPlanDocLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtICMExternalInterfacePlanVO
,
DxDocumentVO
>
,
DxLogicDeleteVOHolder
{
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_LINK_DATA_EMBEDDABLE_PROP_NAME
=
"dxLinkDataEmbeddable"
;
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLogicDeleteVOEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLinkDataVOEmbeddable
<
ExtICMExternalInterfacePlanVO
,
DxDocumentVO
>
dxLinkDataEmbeddable
;
}
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtICMPlanExcelVO.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
common
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
import
java.time.LocalDateTime
;
@EqualsAndHashCode
(
callSuper
=
false
)
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ExtICMPlanExcelVO
{
@ExcelProperty
(
value
=
{
"ICM计划"
,
"操作*"
},
index
=
0
)
@ColumnWidth
(
20
)
private
String
operation
;
/**
* 文件类型
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"编码*"
},
index
=
1
)
@ColumnWidth
(
20
)
private
String
planNumber
;
/**
* 文件分类
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"发布方*"
},
index
=
2
)
@ColumnWidth
(
20
)
private
String
publisher
;
/**
* 文件分类
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"接收方*"
},
index
=
3
)
@ColumnWidth
(
20
)
private
String
acceptor
;
/**
* 文件编号
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"是否关键接口*"
},
index
=
4
)
@ColumnWidth
(
20
)
private
String
keyInterface
;
/**
* 文件代号
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"是否里程碑接口*"
},
index
=
5
)
@ColumnWidth
(
20
)
private
String
milestoneInterface
;
/**
* 管理员系统编码
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"接口类型*"
},
index
=
6
)
@ColumnWidth
(
20
)
private
String
interfaceType
;
/**
* 设备编号
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"计划打开日期*"
},
index
=
7
)
@ColumnWidth
(
20
)
private
LocalDateTime
planOpenDate
;
/**
* 阶段
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"计划关闭日期*"
},
index
=
8
)
@ColumnWidth
(
20
)
private
LocalDateTime
planCloseDate
;
/**
* 节点审核时间
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"责任单位*"
},
index
=
9
)
@ColumnWidth
(
20
)
private
String
responsibilityUnit
;
/**
* 文件提交时间
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"责任人*"
},
index
=
10
)
@ColumnWidth
(
20
)
private
String
responsibilityPerson
;
/**
* 编写者
*/
@ExcelProperty
(
value
=
{
"ICM计划"
,
"接口说明*"
},
index
=
11
)
@ColumnWidth
(
20
)
private
String
interfaceNote
;
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtICMExternalInterfacePlanController.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
;
import
org.springframework.stereotype.Controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
java.io.IOException
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
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.ExtICMExternalInterfacePlanService
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dcs.plan.core.controller.shadow.ExtICMExternalInterfacePlanControllerShadow
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* @description: ExtICMExternalInterfacePlan-Controller
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
@Api
(
tags
=
"ExtICMExternalInterfacePlan管理服务"
)
@RequestMapping
(
"/ExtICMExternalInterfacePlan"
)
@ResponseBody
()
@Controller
(
ExtICMExternalInterfacePlanController
.
BEAN_NAME
)
public
class
ExtICMExternalInterfacePlanController
<
V
extends
ExtICMExternalInterfacePlanVO
,
S
extends
ExtICMExternalInterfacePlanService
<
V
>>
extends
ExtICMExternalInterfacePlanControllerShadow
<
V
,
S
>
{
@Autowired
private
ExtICMExternalInterfacePlanService
extICMExternalInterfacePlanService
;
/**
* 导入采购计划
*
* @param uploadFile
* @return
* @throws IOException
*/
@ApiOperation
(
"导入ICM计划"
)
@PostMapping
(
value
=
"/importICMPlan"
)
public
ApiResult
importPlan
(
@RequestParam
(
"file"
)
MultipartFile
uploadFile
,
@RequestParam
(
"projectId"
)
String
projectId
)
throws
IOException
{
return
ApiResult
.
ok
(
extICMExternalInterfacePlanService
.
importICMPlan
(
uploadFile
.
getInputStream
(),
projectId
),
"ICM计划导入成功"
);
}
/**
* 导出计划
* @param response
* @param ids
* @throws IOException
*/
@ApiOperation
(
value
=
"导出ICM计划"
,
notes
=
"导出ICM计划"
,
httpMethod
=
"GET"
)
@GetMapping
(
value
=
"/exportICMPlan"
)
public
ApiResult
exportPlan
(
HttpServletResponse
response
,
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
throws
IOException
{
return
ApiResult
.
ok
(
extICMExternalInterfacePlanService
.
exportICMPlan
(
response
,
ids
),
"IED计划导出成功"
);
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtICMPlanDocLinkController.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
;
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.ExtICMPlanDocLinkVO
;
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.ExtICMPlanDocLinkService
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dcs.plan.core.controller.shadow.ExtICMPlanDocLinkControllerShadow
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
/**
* @description: ExtICMPlanDocLink-Controller
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@Api
(
tags
=
"ExtICMPlanDocLink管理服务"
)
@RequestMapping
(
"/ExtICMPlanDocLink"
)
@ResponseBody
()
@Controller
(
ExtICMPlanDocLinkController
.
BEAN_NAME
)
public
class
ExtICMPlanDocLinkController
<
V
extends
ExtICMPlanDocLinkVO
,
S
extends
ExtICMPlanDocLinkService
<
V
>>
extends
ExtICMPlanDocLinkControllerShadow
<
V
,
S
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/shadow/ExtICMExternalInterfacePlanControllerShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
.
shadow
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
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.ExtICMExternalInterfacePlanService
;
import
com.yonde.dcs.plan.core.service.impl.ExtICMExternalInterfacePlanServiceImpl
;
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.baseweb.AbstractBaseController
;
import
com.yonde.dex.lcycle.plugin.core.controller.AbstractLifecycleBaseController
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
/**
* @description: ExtICMExternalInterfacePlan-Controller
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
public
class
ExtICMExternalInterfacePlanControllerShadow
<
V
extends
ExtICMExternalInterfacePlanVO
,
S
extends
ExtICMExternalInterfacePlanService
<
V
>>
implements
AbstractBaseController
<
V
,
S
>
,
AbstractLifecycleBaseController
<
V
,
S
>
,
AbstractVersionBaseController
<
V
,
S
>
,
DxObjFileLinkController
<
V
,
S
>
{
public
static
final
String
BEAN_NAME
=
"extICMExternalInterfacePlanController"
;
/**
* 注入
*/
@Resource
(
name
=
ExtICMExternalInterfacePlanServiceImpl
.
BEAN_NAME
)
private
ExtICMExternalInterfacePlanService
<
V
>
extICMExternalInterfacePlanService
;
/**
* getService
*/
@Override
public
S
getService
()
{
return
(
S
)
this
.
extICMExternalInterfacePlanService
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/shadow/ExtICMPlanDocLinkControllerShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
.
shadow
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
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.ExtICMPlanDocLinkService
;
import
com.yonde.dcs.plan.core.service.impl.ExtICMPlanDocLinkServiceImpl
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
javax.annotation.Resource
;
import
com.yonde.dex.linkdata.plugin.core.controller.DxLinkDataController
;
import
com.yonde.dex.baseweb.AbstractBaseController
;
/**
* @description: ExtICMPlanDocLink-Controller
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
public
class
ExtICMPlanDocLinkControllerShadow
<
V
extends
ExtICMPlanDocLinkVO
,
S
extends
ExtICMPlanDocLinkService
<
V
>>
implements
AbstractBaseController
<
V
,
S
>
,
DxLinkDataController
<
V
,
S
>{
public
static
final
String
BEAN_NAME
=
"extICMPlanDocLinkController"
;
/**
* 注入
*/
@Resource
(
name
=
ExtICMPlanDocLinkServiceImpl
.
BEAN_NAME
)
private
ExtICMPlanDocLinkService
<
V
>
extICMPlanDocLinkService
;
/**
* getService
*/
@Override
public
S
getService
()
{
return
(
S
)
this
.
extICMPlanDocLinkService
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/ICMPlanExcelListenner.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
listener
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.util.BeanMapUtils
;
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.utils.SearchUtil
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.core.service.ExtICMExternalInterfacePlanService
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
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.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
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
;
@Component
@Slf4j
public
class
ICMPlanExcelListenner
extends
AnalysisEventListener
<
ExtICMPlanExcelVO
>
{
private
ExtICMExternalInterfacePlanService
extICMExternalInterfacePlanService
;
/**
* 每隔100条处理下,然后清理list ,方便内存回收
*/
private
static
final
int
BATCH_COUNT
=
100
;
/**
* 缓存的数据
*/
private
List
<
ExtICMPlanExcelVO
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
/**
* excel数据行数
*/
private
Integer
excelDataRow
=
0
;
/**
* 校验数据的错误信息
*/
List
<
StringBuffer
>
errorList
=
new
ArrayList
<>();
/**
* 项目id
*/
private
String
projectId
;
/**
* excel操作符集合
*/
List
<
String
>
operationList
=
Arrays
.
asList
(
Constants
.
EXCEL_ADD
,
Constants
.
EXCEL_UPDATE
,
Constants
.
EXCEL_DELETE
);
public
ICMPlanExcelListenner
()
{}
public
ICMPlanExcelListenner
(
String
projectId
)
{
this
.
extICMExternalInterfacePlanService
=
ApplicationContextUtil
.
getBean
(
ExtICMExternalInterfacePlanService
.
class
);
this
.
projectId
=
projectId
;
}
@Override
public
void
invoke
(
ExtICMPlanExcelVO
extICMPlanExcelVO
,
AnalysisContext
analysisContext
)
{
excelDataRow
++;
//判断是否是空数据行
if
(!
CommonUtils
.
checkAllPropertiesIsEmpty
(
extICMPlanExcelVO
)){
log
.
info
(
"解析到一条数据:{}"
,
extICMPlanExcelVO
);
//检查excel数据合法性
checkDataForExcel
(
extICMPlanExcelVO
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
analysisContext
)
{
// 收尾工作,处理剩下的缓存数据。。。
log
.
info
(
"sheet={} 所有数据解析完成!"
,
analysisContext
.
readSheetHolder
().
getSheetName
());
if
(
errorList
.
size
()
>
0
)
{
throw
new
DxBusinessException
(
"-1"
,
"IED计划数据有误!!"
+
errorList
.
toString
());
}
//处理全部检查通过的数据
for
(
ExtICMPlanExcelVO
extICMPlanExcelVO
:
cachedDataList
)
{
ExtICMExternalInterfacePlanVO
extICMPlanVO
=
new
ExtICMExternalInterfacePlanVO
();
extICMPlanVO
.
setDxContextId
(
Long
.
parseLong
(
projectId
));
//将excel对象转换为po对象
BeanUtil
.
copyProperties
(
extICMPlanExcelVO
,
extICMPlanVO
);
if
(
Constants
.
EXCEL_ADD
.
equals
(
extICMPlanExcelVO
.
getOperation
()))
{
//新增
extICMPlanVO
.
setOperator
(
OperatorType
.
ADD
);
extICMExternalInterfacePlanService
.
saveRecursion
(
extICMPlanVO
);
}
else
if
(
Constants
.
EXCEL_UPDATE
.
equals
(
extICMPlanExcelVO
.
getOperation
()))
{
//更新
extICMPlanVO
.
setOperator
(
OperatorType
.
MODIFY
);
ExtICMExternalInterfacePlanVO
extICMPlanVOForDB
=
getICMPlanByPlanNumber
(
extICMPlanExcelVO
.
getPlanNumber
());
BeanUtil
.
copyProperties
(
extICMPlanExcelVO
,
extICMPlanVOForDB
);
extICMExternalInterfacePlanService
.
saveRecursion
(
extICMPlanVOForDB
);
}
else
{
//删除
ExtICMExternalInterfacePlanVO
extICMPlanVOForDB
=
getICMPlanByPlanNumber
(
extICMPlanExcelVO
.
getPlanNumber
());
extICMExternalInterfacePlanService
.
remove
(
extICMPlanVOForDB
.
getId
());
}
}
//数据处理完之后,进行初始化
errorList
.
clear
();
cachedDataList
.
clear
();
excelDataRow
=
0
;
}
/**
* @param exception
* @param context
* @throws Exception
*/
@Override
public
void
onException
(
Exception
exception
,
AnalysisContext
context
)
throws
Exception
{
log
.
error
(
"======>>>解析异常:"
,
exception
);
throw
exception
;
}
/**
* 校验excel中的数据是否合法
*
* @param extICMPlanExcelVO excel表格内容对象
*/
public
void
checkDataForExcel
(
ExtICMPlanExcelVO
extICMPlanExcelVO
)
{
StringBuffer
errorString
=
new
StringBuffer
();
//校验数据
if
(!
StringUtils
.
isEmpty
(
extICMPlanExcelVO
.
getOperation
())
&&
!
StringUtils
.
isEmpty
(
extICMPlanExcelVO
.
getPlanNumber
()))
{
if
(!
operationList
.
contains
(
extICMPlanExcelVO
.
getOperation
()))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extICMPlanExcelVO
.
getPlanNumber
()
+
"的操作符无法识别!!"
);
errorList
.
add
(
errorString
);
}
//如果是新增,查看一下数据库中是不是已经存在
if
(
Constants
.
EXCEL_ADD
.
equals
(
extICMPlanExcelVO
.
getOperation
()))
{
ExtICMExternalInterfacePlanVO
extICMPlanVO
=
getICMPlanByPlanNumber
(
extICMPlanExcelVO
.
getPlanNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extICMPlanVO
))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,新增ICM计划编号:"
+
extICMPlanExcelVO
.
getPlanNumber
()
+
"已存在,不能重复添加!"
);
errorList
.
add
(
errorString
);
}
}
else
{
ExtICMExternalInterfacePlanVO
extICMPlanVO
=
getICMPlanByFileNumberAndDeleted
(
extICMPlanExcelVO
.
getPlanNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extICMPlanVO
)
&&
1
==
extICMPlanVO
.
getDeleted
())
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,ICM计划编号:"
+
extICMPlanExcelVO
.
getPlanNumber
()
+
"已被删除,更新或删除失败!"
);
errorList
.
add
(
errorString
);
}
}
}
else
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
",文件编号、操作符均不能为空!!"
);
errorList
.
add
(
errorString
);
}
cachedDataList
.
add
(
extICMPlanExcelVO
);
}
public
ExtICMExternalInterfacePlanVO
getICMPlanByPlanNumber
(
String
planNumber
)
{
//根据文件编号查询IED计划
DxPageImpl
<
ExtICMExternalInterfacePlanVO
>
ICMPlanPage
=
extICMExternalInterfacePlanService
.
findRecursion
(
SearchUtil
.
buildQuery
(
"planNumber"
,
SearchItem
.
Operator
.
EQ
,
planNumber
));
if
(!
CollectionUtils
.
isEmpty
(
ICMPlanPage
.
getContent
()))
{
ExtICMExternalInterfacePlanVO
extICMPlanVOForDB
=
DxPageUtils
.
getFirst
(
ICMPlanPage
);
return
extICMPlanVOForDB
;
}
else
{
log
.
info
(
"根据计划的计划编码:{},未查到相关计划"
,
planNumber
);
}
return
null
;
}
/**
* 根据planNumber查询已经删除的计划
* @param planNumber
* @return
*/
private
ExtICMExternalInterfacePlanVO
getICMPlanByFileNumberAndDeleted
(
String
planNumber
)
{
SearchQueryCondition
condition
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"planNumber"
,
SearchItem
.
Operator
.
EQ
,
planNumber
,
null
))
.
item
(
new
SearchItem
(
"deleted"
,
SearchItem
.
Operator
.
EQ
,
1
,
null
))
.
build
())
.
build
();
//根据文件编号查询IED计划
DxPageImpl
<
ExtICMExternalInterfacePlanVO
>
ICMPlanPage
=
extICMExternalInterfacePlanService
.
findRecursion
(
condition
);
if
(!
CollectionUtils
.
isEmpty
(
ICMPlanPage
.
getContent
()))
{
ExtICMExternalInterfacePlanVO
extICMPlanVOForDB
=
DxPageUtils
.
getFirst
(
ICMPlanPage
);
return
extICMPlanVOForDB
;
}
else
{
log
.
info
(
"根据计划编码:{},未查到已删除的相关计划"
,
planNumber
);
}
return
null
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/ExtICMExternalInterfacePlanRepository.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
;
import
com.yonde.dcs.plan.entity.po.ExtICMExternalInterfacePlan
;
import
com.yonde.dcs.plan.core.repository.shadow.ExtICMExternalInterfacePlanRepositoryShadow
;
/**
* @description: ExtICMExternalInterfacePlan-repository
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
public
interface
ExtICMExternalInterfacePlanRepository
<
P
extends
ExtICMExternalInterfacePlan
>
extends
ExtICMExternalInterfacePlanRepositoryShadow
<
P
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/ExtICMPlanDocLinkRepository.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
;
import
com.yonde.dcs.plan.entity.po.ExtICMPlanDocLink
;
import
com.yonde.dcs.plan.core.repository.shadow.ExtICMPlanDocLinkRepositoryShadow
;
/**
* @description: ExtICMPlanDocLink-repository
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
public
interface
ExtICMPlanDocLinkRepository
<
P
extends
ExtICMPlanDocLink
>
extends
ExtICMPlanDocLinkRepositoryShadow
<
P
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/shadow/ExtICMExternalInterfacePlanRepositoryShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
.
shadow
;
import
com.yonde.dcs.plan.entity.po.ExtICMExternalInterfacePlan
;
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.secretcode.plugin.core.repositroy.DxSecretCodePluginRepository
;
import
com.yonde.dex.version.plugin.core.repository.DxIterationRepository
;
import
com.yonde.dex.lcycle.plugin.core.repository.DxLifecycleManageBaseRepository
;
import
com.yonde.dex.dfs.objfilelink.plugin.core.repository.DxObjFileLinkPluginRepository
;
/**
* @description: ExtICMExternalInterfacePlan-repository
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
@NoRepositoryBean
public
interface
ExtICMExternalInterfacePlanRepositoryShadow
<
P
extends
ExtICMExternalInterfacePlan
>
extends
DxContextPluginRepository
<
P
>
,
DxObjFileLinkPluginRepository
<
P
>
,
DxLifecycleManageBaseRepository
<
P
>
,
BaseRepository
<
P
>
,
DxLogicDeleteRepository
<
P
>
,
DxSecretCodePluginRepository
<
P
>
,
DxIterationRepository
<
P
>
{
String
BEAN_NAME
=
"extICMExternalInterfacePlanRepository"
;
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/repository/shadow/ExtICMPlanDocLinkRepositoryShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
repository
.
shadow
;
import
com.yonde.dcs.plan.entity.po.ExtICMPlanDocLink
;
import
org.springframework.data.repository.NoRepositoryBean
;
import
com.yonde.dex.logicdelete.plugin.core.repository.DxLogicDeleteRepository
;
import
com.yonde.dex.dao.business.repository.BaseRepository
;
import
com.yonde.dex.linkdata.plugin.core.repository.DxLinkDataRepository
;
/**
* @description: ExtICMPlanDocLink-repository
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@NoRepositoryBean
public
interface
ExtICMPlanDocLinkRepositoryShadow
<
P
extends
ExtICMPlanDocLink
>
extends
BaseRepository
<
P
>
,
DxLogicDeleteRepository
<
P
>
,
DxLinkDataRepository
<
P
>
{
String
BEAN_NAME
=
"extICMPlanDocLinkRepository"
;
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtICMExternalInterfacePlanService.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtICMExternalInterfacePlanServiceShadow
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* @description: ExtICMExternalInterfacePlan-service
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
public
interface
ExtICMExternalInterfacePlanService
<
V
extends
ExtICMExternalInterfacePlanVO
>
extends
ExtICMExternalInterfacePlanServiceShadow
<
V
>
{
String
importICMPlan
(
InputStream
inputStream
,
String
projectId
);
String
exportICMPlan
(
HttpServletResponse
response
,
List
<
String
>
ids
)
throws
IOException
;
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtICMPlanDocLinkService.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtICMPlanDocLinkServiceShadow
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* @description: ExtICMPlanDocLink-service
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
public
interface
ExtICMPlanDocLinkService
<
V
extends
ExtICMPlanDocLinkVO
>
extends
ExtICMPlanDocLinkServiceShadow
<
V
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtFileTemplateManagerServiceImpl.java
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
cn.hutool.core.io.FileUtil
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.core.service.ExtFileTemplateManagerService
;
import
com.yonde.dcs.plan.core.service.ExtFileTemplateManagerService
;
import
com.yonde.dcs.plan.core.util.FileUtils
;
import
com.yonde.dcs.plan.core.util.FileUtils
;
...
@@ -40,7 +41,7 @@ public class ExtFileTemplateManagerServiceImpl implements ExtFileTemplateManager
...
@@ -40,7 +41,7 @@ public class ExtFileTemplateManagerServiceImpl implements ExtFileTemplateManager
}
else
if
(
fileType
==
2
){
//IED计划模板下载
}
else
if
(
fileType
==
2
){
//IED计划模板下载
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
IED_PLAN_TEMP_FILE_CODE_NAME
);
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
IED_PLAN_TEMP_FILE_CODE_NAME
);
}
else
if
(
fileType
==
3
){
//ICM计划模板下载
}
else
if
(
fileType
==
3
){
//ICM计划模板下载
//todo ICM计划暂时还未创建模板
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
ICM_PLAN_TEMP_FILE_CODE_NAME
);
}
else
{
}
else
{
log
.
info
(
"未知文件类型:{}"
,
fileType
);
log
.
info
(
"未知文件类型:{}"
,
fileType
);
}
}
...
@@ -61,7 +62,8 @@ public class ExtFileTemplateManagerServiceImpl implements ExtFileTemplateManager
...
@@ -61,7 +62,8 @@ public class ExtFileTemplateManagerServiceImpl implements ExtFileTemplateManager
FileUtils
.
inputToFile
(
inputStream
,
filePath
);
FileUtils
.
inputToFile
(
inputStream
,
filePath
);
//导出数据
//导出数据
FileUtils
.
exportFile
(
response
,
new
FileInputStream
(
filePath
),
"application/vnd.ms-excel;charset=utf-8"
,
"计划模板.xlsx"
);
FileUtils
.
exportFile
(
response
,
new
FileInputStream
(
filePath
),
"application/vnd.ms-excel;charset=utf-8"
,
"计划模板.xlsx"
);
//删除临时目录
FileUtil
.
del
(
dir
);
return
ApiResult
.
SUCCESS
;
return
ApiResult
.
SUCCESS
;
}
}
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtICMExternalInterfacePlanServiceImpl.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.io.FileUtil
;
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.ExtICMPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanVO
;
import
com.yonde.dcs.plan.core.listener.ICMPlanExcelListenner
;
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.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.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
io.swagger.annotations.ApiOperation
;
import
java.io.ByteArrayInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
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.ExtICMExternalInterfacePlanService
;
import
com.yonde.dcs.plan.core.repository.ExtICMExternalInterfacePlanRepository
;
import
com.yonde.dcs.plan.entity.po.ExtICMExternalInterfacePlan
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @description: ExtICMExternalInterfacePlan-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
@Slf4j
@Service
(
ExtICMExternalInterfacePlanServiceImpl
.
BEAN_NAME
)
public
class
ExtICMExternalInterfacePlanServiceImpl
<
V
extends
ExtICMExternalInterfacePlanVO
>
implements
ExtICMExternalInterfacePlanService
<
V
>{
public
static
final
String
BEAN_NAME
=
"extICMExternalInterfacePlanServiceImpl"
;
@Autowired
private
SystemFileFeignService
systemFileFeignService
;
@Autowired
private
FileManagerFeignService
fileManagerFeignService
;
@Autowired
ExtICMExternalInterfacePlanRepository
<
ExtICMExternalInterfacePlan
>
extICMExternalInterfacePlanRepository
;
@Override
public
String
importICMPlan
(
InputStream
inputStream
,
String
projectId
)
{
EasyExcel
.
read
(
inputStream
,
ExtICMPlanExcelVO
.
class
,
new
ICMPlanExcelListenner
(
projectId
))
.
sheet
()
.
doRead
();
return
ApiResult
.
SUCCESS
;
}
@Override
public
String
exportICMPlan
(
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
<
ExtICMPlanExcelVO
>
extICMPlanExcelVOList
=
transformationObject
(
content
);
try
{
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
ICM_PLAN_TEMP_FILE_CODE_NAME
);
multipartFile
=
fileManagerFeignService
.
feignDownloadIO
(
fileId
);
}
catch
(
IOException
e
)
{
log
.
info
(
"[ICM计划模板] >>> 文件服务下载为文件:{}--失败!"
,
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载文件失败:"
+
fileId
);
}
try
{
inputStream
=
new
ByteArrayInputStream
(
multipartFile
.
getBytes
());
}
catch
(
IOException
e
)
{
log
.
info
(
"[ICM计划模板] >>> 文件服务下载的文件:{}--转换为输入流失败!"
,
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载的文件转换为输入流失败:"
+
fileId
);
}
String
dir
=
ResourceHelper
.
CreateTemDir
().
getPath
();
String
filePath
=
dir
+
Constants
.
ICM_PLAN_EXCEL_NAME
;
//创建采购计划列表.xlsx 文件
FileUtils
.
inputToFile
(
inputStream
,
filePath
);
//向表格中写入数据
EasyExcel
.
write
(
filePath
,
ExtICMPlanExcelVO
.
class
)
.
registerWriteHandler
(
new
LongestMatchColumnWidthStyleStrategy
())
.
sheet
(
"ICM计划列表"
).
doWrite
(
extICMPlanExcelVOList
);
//导出数据
FileUtils
.
exportFile
(
response
,
new
FileInputStream
(
filePath
),
"application/vnd.ms-excel;charset=utf-8"
,
"ICM计划.xlsx"
);
FileUtil
.
del
(
dir
);
}
else
{
log
.
info
(
"根据计划ids:"
+
ids
.
toString
()
+
"未查到相关数据"
);
return
"未查到相关ICM计划数据"
;
}
return
ApiResult
.
SUCCESS
;
}
private
List
<
ExtICMPlanExcelVO
>
transformationObject
(
List
<
V
>
extICMPlanList
)
{
List
<
ExtICMPlanExcelVO
>
extICMPlanExcelVOList
=
new
ArrayList
<>();
for
(
ExtICMExternalInterfacePlanVO
extICMPlanVO
:
extICMPlanList
)
{
ExtICMPlanExcelVO
extICMPlanExcelVO
=
new
ExtICMPlanExcelVO
();
BeanUtil
.
copyProperties
(
extICMPlanVO
,
extICMPlanExcelVO
);
extICMPlanExcelVOList
.
add
(
extICMPlanExcelVO
);
}
return
extICMPlanExcelVOList
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtICMPlanDocLinkServiceImpl.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
com.alibaba.excel.EasyExcel
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.ExtIEDPlanExcelVO
;
import
com.yonde.dcs.plan.core.listener.ICMPlanExcelListenner
;
import
com.yonde.dcs.plan.core.listener.IEDPlanExcelListenner
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
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.ExtICMPlanDocLinkService
;
import
com.yonde.dcs.plan.core.repository.ExtICMPlanDocLinkRepository
;
import
com.yonde.dcs.plan.entity.po.ExtICMPlanDocLink
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @description: ExtICMPlanDocLink-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@Slf4j
@Service
(
ExtICMPlanDocLinkServiceImpl
.
BEAN_NAME
)
public
class
ExtICMPlanDocLinkServiceImpl
<
V
extends
ExtICMPlanDocLinkVO
>
implements
ExtICMPlanDocLinkService
<
V
>{
public
static
final
String
BEAN_NAME
=
"extICMPlanDocLinkServiceImpl"
;
@Autowired
ExtICMPlanDocLinkRepository
<
ExtICMPlanDocLink
>
extICMPlanDocLinkRepository
;
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
View file @
a8cacbfb
...
@@ -93,13 +93,13 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
...
@@ -93,13 +93,13 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
PURCHASE_PLAN_TEMP_FILE_CODE_NAME
);
fileId
=
systemFileFeignService
.
getSystemFileId
(
Constants
.
PURCHASE_PLAN_TEMP_FILE_CODE_NAME
);
multipartFile
=
fileManagerFeignService
.
feignDownloadIO
(
fileId
);
multipartFile
=
fileManagerFeignService
.
feignDownloadIO
(
fileId
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
info
(
"[
接口单
] >>> 文件服务下载为文件:{}--失败!"
,
fileId
);
log
.
info
(
"[
采购计划
] >>> 文件服务下载为文件:{}--失败!"
,
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载文件失败:"
+
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载文件失败:"
+
fileId
);
}
}
try
{
try
{
inputStream
=
new
ByteArrayInputStream
(
multipartFile
.
getBytes
());
inputStream
=
new
ByteArrayInputStream
(
multipartFile
.
getBytes
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
info
(
"[
接口单
] >>> 文件服务下载的文件:{}--转换为输入流失败!"
,
fileId
);
log
.
info
(
"[
采购计划
] >>> 文件服务下载的文件:{}--转换为输入流失败!"
,
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载的文件转换为输入流失败:"
+
fileId
);
throw
new
DxBusinessException
(
"500"
,
"文件服务下载的文件转换为输入流失败:"
+
fileId
);
}
}
String
dir
=
ResourceHelper
.
CreateTemDir
().
getPath
();
String
dir
=
ResourceHelper
.
CreateTemDir
().
getPath
();
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/shadow/ExtICMExternalInterfacePlanServiceShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
import
com.yonde.dcs.plan.feign.ExtICMExternalInterfacePlanServiceFeign
;
import
com.yonde.dex.dao.service.BaseIdEntityService
;
import
com.yonde.dex.secretcode.plugin.core.service.SecretCodePluginService
;
import
com.yonde.dex.version.plugin.core.service.IterationService
;
import
com.yonde.dex.context.plugin.core.service.ContextPluginService
;
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
;
/**
* @description: ExtICMExternalInterfacePlan-service
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
public
interface
ExtICMExternalInterfacePlanServiceShadow
<
V
extends
ExtICMExternalInterfacePlanVO
>
extends
ExtICMExternalInterfacePlanServiceFeign
<
V
>,
ContextPluginService
<
V
>
,
ObjFileLinkPluginService
<
V
>
,
LifecycleBaseService
<
V
>
,
BaseIdEntityService
<
V
>
,
LogicDeleteService
<
V
>
,
SecretCodePluginService
<
V
>
,
IterationService
<
V
>
{
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/shadow/ExtICMPlanDocLinkServiceShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
import
com.yonde.dcs.plan.feign.ExtICMPlanDocLinkServiceFeign
;
import
com.yonde.dex.linkdata.plugin.core.service.DxLinkDataService
;
import
com.yonde.dex.dao.service.BaseIdEntityService
;
import
com.yonde.dex.logicdelete.plugin.core.service.LogicDeleteService
;
/**
* @description: ExtICMPlanDocLink-service
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
public
interface
ExtICMPlanDocLinkServiceShadow
<
V
extends
ExtICMPlanDocLinkVO
>
extends
ExtICMPlanDocLinkServiceFeign
<
V
>,
BaseIdEntityService
<
V
>
,
LogicDeleteService
<
V
>
,
DxLinkDataService
<
V
>
{
}
dcs-plan-entity/src/main/java/com/yonde/dcs/plan/entity/po/ExtICMExternalInterfacePlan.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
entity
.
po
;
import
org.springframework.data.annotation.CreatedBy
;
import
javax.persistence.UniqueConstraint
;
import
java.util.Date
;
import
java.time.LocalDateTime
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
javax.persistence.Column
;
import
org.springframework.data.annotation.CreatedDate
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
java.math.BigInteger
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
lombok.AllArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.Embedded
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
com.yonde.dex.lcycle.plugin.entities.DxLifecycleManageBaseEmbeddable
;
import
com.yonde.dex.context.plugin.entities.DxContextHolder
;
import
com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkHolder
;
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.lcycle.plugin.entities.DxLifecycleManageBaseHolder
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.secretcode.plugin.entities.DxSecretEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
import
com.yonde.dex.version.plugin.entities.DxIterationEmbeddable
;
/**
* @description: ExtICMExternalInterfacePlan-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:10
**/
@Entity
@EqualsAndHashCode
(
callSuper
=
true
)
@NoArgsConstructor
@Data
@Table
(
name
=
"EXT_ICM_EXT_INTERFACE_PLAN"
)
public
class
ExtICMExternalInterfacePlan
extends
IdOnlyEntity
implements
DxContextHolder
,
DxObjFileLinkHolder
,
DxLifecycleManageBaseHolder
,
IdEntity
,
DxLogicDeleteHolder
,
DxSecretHolder
,
DxIterationHolder
{
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxContextEmbeddable
dxContextEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxObjFileLinkEmbeddable
dxObjFileLinkEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLifecycleManageBaseEmbeddable
dxLifecycleManageBaseEmbeddable
;
/**
* dao扩展对象
*/
@DexEmbedded
()
@Embedded
()
private
DxIdEntityEmbeddable
dxIdEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLogicDeleteEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxSecretEmbeddable
dxSecretEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxIterationEmbeddable
dxIterationEmbeddable
;
/**
* 接收方
*/
private
String
acceptor
;
/**
* 实际关闭日期
*/
private
LocalDateTime
actualCloseDate
;
/**
* 实际打开日期
*/
private
LocalDateTime
actualOpenDate
;
/**
* 接口说明
*/
private
String
interfaceNote
;
/**
* 接口类型
*/
private
String
interfaceType
;
/**
* 是否关键接口
*/
private
String
keyInterface
;
/**
* 是否里程碑接口
*/
private
String
milestoneInterface
;
/**
* 计划关闭日期
*/
private
LocalDateTime
planCloseDate
;
/**
* 计划编号
*/
private
String
planNumber
;
/**
* 计划打开日期
*/
private
LocalDateTime
planOpenDate
;
/**
* 发布方
*/
private
String
publisher
;
/**
* 责任人
*/
private
String
responsibilityPerson
;
/**
* 责任单位
*/
private
String
responsibilityUnit
;
}
dcs-plan-entity/src/main/java/com/yonde/dcs/plan/entity/po/ExtICMPlanDocLink.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
entity
.
po
;
import
org.springframework.data.annotation.CreatedBy
;
import
javax.persistence.UniqueConstraint
;
import
java.util.Date
;
import
java.time.LocalDateTime
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
javax.persistence.Column
;
import
org.springframework.data.annotation.CreatedDate
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
java.math.BigInteger
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
lombok.AllArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.Embedded
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
javax.persistence.Column
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
/**
* @description: ExtICMPlanDocLink-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@Entity
@EqualsAndHashCode
(
callSuper
=
true
)
@NoArgsConstructor
@Data
@Table
(
name
=
"EXT_ICM_PLAN_DOC_LINK"
)
public
class
ExtICMPlanDocLink
extends
IdOnlyEntity
implements
IdEntity
,
DxLogicDeleteHolder
,
DxLinkDataHolder
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@Embedded
()
private
DxIdEntityEmbeddable
dxIdEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLogicDeleteEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLinkDataEmbeddable
dxLinkDataEmbeddable
;
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtICMExternalInterfacePlanServiceFeign.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
feign
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
import
io.swagger.annotations.Api
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.feign.shadow.ExtICMExternalInterfacePlanServiceFeignShadow
;
/**
* @description: ExtICMExternalInterfacePlan-Feign
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@Api
(
tags
=
"ExtICMExternalInterfacePlan-FEIGN"
)
@FeignClient
(
value
=
"${dcs.feign.INET-PLAN}"
,
path
=
"/ExtICMExternalInterfacePlan"
)
public
interface
ExtICMExternalInterfacePlanServiceFeign
<
V
extends
ExtICMExternalInterfacePlanVO
>
extends
ExtICMExternalInterfacePlanServiceFeignShadow
<
V
>
{
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtICMPlanDocLinkServiceFeign.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
feign
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
import
io.swagger.annotations.Api
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.feign.shadow.ExtICMPlanDocLinkServiceFeignShadow
;
/**
* @description: ExtICMPlanDocLink-Feign
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
@Api
(
tags
=
"ExtICMPlanDocLink-FEIGN"
)
@FeignClient
(
value
=
"${dcs.feign.INET-PLAN}"
,
path
=
"/ExtICMPlanDocLink"
)
public
interface
ExtICMPlanDocLinkServiceFeign
<
V
extends
ExtICMPlanDocLinkVO
>
extends
ExtICMPlanDocLinkServiceFeignShadow
<
V
>
{
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/shadow/ExtICMExternalInterfacePlanServiceFeignShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
feign
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
import
io.swagger.annotations.Api
;
import
org.springframework.cloud.openfeign.FeignClient
;
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.secretcode.plugin.feign.SecretCodeFeign
;
import
com.yonde.dex.version.plugin.feign.BaseVersionFeign
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
import
com.yonde.dex.context.plugin.feign.ContextPluginFeign
;
import
com.yonde.dex.logicdelete.plugin.feign.LogicDeleteFeign
;
/**
* @description: ExtICMExternalInterfacePlan-Feign
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
public
interface
ExtICMExternalInterfacePlanServiceFeignShadow
<
V
extends
ExtICMExternalInterfacePlanVO
>
extends
ContextPluginFeign
<
V
>
,
BaseLifecycleManageFeign
<
V
>
,
BaseFeign
<
V
>
,
LogicDeleteFeign
<
V
>
,
SecretCodeFeign
<
V
>
,
BaseVersionFeign
<
V
>
{
String
BEAN_NAME
=
"extICMExternalInterfacePlanServiceFeign"
;
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/shadow/ExtICMPlanDocLinkServiceFeignShadow.java
0 → 100644
View file @
a8cacbfb
package
com
.
yonde
.
dcs
.
plan
.
feign
.
shadow
;
import
com.yonde.dcs.plan.common.vo.ExtICMPlanDocLinkVO
;
import
io.swagger.annotations.Api
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dex.dao.service.remotes.BaseFeign
;
import
com.yonde.dex.logicdelete.plugin.feign.LogicDeleteFeign
;
import
com.yonde.dex.linkdata.plugin.feign.DxLinkDataFeign
;
/**
* @description: ExtICMPlanDocLink-Feign
* @author: dexadmin
* @version: V
* @date: 2024-9-14 10:04:11
**/
public
interface
ExtICMPlanDocLinkServiceFeignShadow
<
V
extends
ExtICMPlanDocLinkVO
>
extends
BaseFeign
<
V
>
,
LogicDeleteFeign
<
V
>
,
DxLinkDataFeign
<
V
>
{
String
BEAN_NAME
=
"extICMPlanDocLinkServiceFeign"
;
}
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