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
2ed66a91
Commit
2ed66a91
authored
Oct 10, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建进度计划
parent
14fdf92f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
ExtPlanController.java
...com/yonde/dcs/plan/core/controller/ExtPlanController.java
+8
-0
ExtPlanService.java
.../java/com/yonde/dcs/plan/core/service/ExtPlanService.java
+3
-0
ExtPlanServiceImpl.java
.../yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
+31
-0
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtPlanController.java
View file @
2ed66a91
package
com
.
yonde
.
dcs
.
plan
.
core
.
controller
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.plan.common.vo.ExtSupplierManageVO
;
import
org.springframework.stereotype.Controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -58,6 +59,13 @@ public class ExtPlanController<V extends ExtPlanVO, S extends ExtPlanService<V>>
return
apiResult
;
}
@ApiOperation
(
"流程启动"
)
@PostMapping
(
value
=
"/startWorkflow"
)
public
ApiResult
insertPlan
(
@RequestParam
(
"id"
)
Long
id
)
throws
IOException
{
return
ApiResult
.
ok
(
extPlanService
.
startWorkflow
(
id
),
"启动计划成功"
);
}
/**
* 修改计划状态
*
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtPlanService.java
View file @
2ed66a91
...
...
@@ -2,6 +2,7 @@ package com.yonde.dcs.plan.core.service;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.plan.common.vo.ExtPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtSupplierManageVO
;
import
com.yonde.dcs.plan.core.service.shadow.ExtPlanServiceShadow
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dex.user.common.vo.DxOrganizationVO
;
...
...
@@ -44,6 +45,8 @@ public interface ExtPlanService<V extends ExtPlanVO> extends ExtPlanServiceShado
ApiResult
insertPlan
(
MultipartFile
uploadFile
,
Long
projectId
);
ExtPlanVO
startWorkflow
(
Long
id
);
/**
* 计划驱动编制任务
*
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
View file @
2ed66a91
...
...
@@ -36,6 +36,7 @@ import com.yonde.dex.user.common.vo.DxUserInfoVO;
import
com.yonde.dex.user.feign.DxOrganizationFeign
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.version.plugin.core.deleteType.IterationDeleteVO
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
dm.jdbc.util.StringUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.usermodel.CellStyle
;
...
...
@@ -60,6 +61,7 @@ import java.net.URLEncoder;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Properties
;
/**
...
...
@@ -100,6 +102,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
@Autowired
private
DxUserInfoFeign
<
DxUserInfoVO
>
dxUserInfoFeign
;
@Autowired
private
WfcProcessFeign
wfcProcessFeign
;
/**
* 通过userId获取组织名
*
...
...
@@ -174,6 +179,19 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
return
apiResult
;
}
@Override
public
ExtPlanVO
startWorkflow
(
Long
id
)
{
ExtPlanVO
extPlanVO
=
this
.
get
(
id
);
if
(
extPlanVO
==
null
)
{
throw
new
DxBusinessException
(
"500"
,
"获取不到对象"
);
}
if
(!
extPlanVO
.
getState
().
equals
(
"unopened"
))
{
throw
new
DxBusinessException
(
"500"
,
"该对象不是编制状态"
);
}
wfcProcessFeign
.
startProcessByKey
(
"ExtPlanWF"
,
extPlanVO
);
return
this
.
changeStatus
(
extPlanVO
.
getId
(),
"unfinished"
,
true
);
}
/**
* 导入计划(系统校验计划编号、计划名称、工期、计划开始时间、计划完成时间等必填项)
*
...
...
@@ -308,6 +326,13 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
if
(
StringUtils
.
isEmpty
(
secretCodeKey
))
{
buffer
.
append
(
String
.
format
(
"第%s行密级格式不正确!"
,
i
+
1
)
+
"</br>"
);
}
if
(
Objects
.
nonNull
(
excelVO
.
getSuperPlanCode
())){
//校验父级编号
ExtPlanVO
extPlanVO
=
this
.
searchByNumber
(
excelVO
.
getSuperPlanCode
());
if
(!
ObjectUtils
.
isEmpty
(
extPlanVO
)){
buffer
.
append
(
String
.
format
(
"第%s行,父级编号不存在"
,
i
+
1
)
+
"</br>"
);
}
}
return
buffer
;
}
...
...
@@ -549,6 +574,12 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
private
ExtPlanVO
copyPlan
(
PlanExcelVO
planExcelVO
,
OperatorType
operatorType
)
{
ExtPlanVO
extPlanVO
=
new
ExtPlanVO
();
BeanUtils
.
copyProperties
(
planExcelVO
,
extPlanVO
);
if
(
Objects
.
nonNull
(
planExcelVO
.
getSuperPlanCode
()))
{
ExtPlanVO
extPlanVO1
=
this
.
searchByNumber
(
planExcelVO
.
getSuperPlanCode
());
if
(!
ObjectUtils
.
isEmpty
(
extPlanVO1
))
{
extPlanVO
.
setParentId
(
extPlanVO1
.
getId
());
}
}
extPlanVO
.
setName
(
planExcelVO
.
getName
());
extPlanVO
.
setNumber
(
planExcelVO
.
getNumber
());
extPlanVO
.
setOperator
(
operatorType
);
...
...
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