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
9774734e
Commit
9774734e
authored
Nov 06, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量下载接口和修改季报的状态接口
parent
8ed6283b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
14 deletions
+39
-14
ExtActionItemController.java
...nde/dcs/plan/core/controller/ExtActionItemController.java
+13
-0
ExtActionItemService.java
...com/yonde/dcs/plan/core/service/ExtActionItemService.java
+2
-2
ExtActionItemServiceImpl.java
.../dcs/plan/core/service/impl/ExtActionItemServiceImpl.java
+3
-5
ExtQuarterlyReportServiceImpl.java
...plan/core/service/impl/ExtQuarterlyReportServiceImpl.java
+17
-5
ExtActionItemServiceFeign.java
...a/com/yonde/dcs/plan/feign/ExtActionItemServiceFeign.java
+4
-2
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtActionItemController.java
View file @
9774734e
...
...
@@ -5,7 +5,11 @@ import com.yonde.dcs.plan.core.controller.shadow.ExtActionItemControllerShadow;
import
com.yonde.dcs.plan.core.service.ExtActionItemService
;
import
com.yonde.dex.basedata.auth.annos.BasePermission
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -23,6 +27,15 @@ import org.springframework.web.bind.annotation.ResponseBody;
public
class
ExtActionItemController
<
V
extends
ExtActionItemVO
,
S
extends
ExtActionItemService
<
V
>>
extends
ExtActionItemControllerShadow
<
V
,
S
>
{
@Autowired
private
ExtActionItemService
extActionItemService
;
@ApiOperation
(
value
=
"根据行动项id修改季报的状态"
,
notes
=
"根据行动项id修改季报的状态"
)
@PostMapping
(
value
=
"/updateQRStateByAItemId"
)
public
String
changeQRStateWhenAllActionItemIsDone
(
@RequestBody
ExtActionItemVO
extActionItemVO
){
return
extActionItemService
.
changeQRStateWhenAllActionItemIsDone
(
extActionItemVO
);
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtActionItemService.java
View file @
9774734e
...
...
@@ -16,11 +16,11 @@ public interface ExtActionItemService<V extends ExtActionItemVO> extends ExtActi
/**
* 季报下的所有行动项如果已完成,将季报状态置为待审阅
* @param
id
行动项的id
* @param
extActionItemVO
行动项的id
* @return
*/
String
changeQRStateWhenAllActionItemIsDone
(
Long
id
);
String
changeQRStateWhenAllActionItemIsDone
(
ExtActionItemVO
extActionItemVO
);
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtActionItemServiceImpl.java
View file @
9774734e
...
...
@@ -43,14 +43,12 @@ public class ExtActionItemServiceImpl<V extends ExtActionItemVO> implements ExtA
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
String
changeQRStateWhenAllActionItemIsDone
(
Long
id
)
{
public
String
changeQRStateWhenAllActionItemIsDone
(
ExtActionItemVO
extActionItemVO
)
{
Boolean
allActionItemIsCompleteFlag
=
false
;
ExtActionItemVO
extActionItemVO
=
this
.
findLatest
(
id
);
if
(
ObjectUtils
.
isEmpty
(
extActionItemVO
))
{
throw
new
DxBusinessException
(
"-1"
,
"根据行动项id:"
+
id
+
"未查到数据"
);
}
//根据行动项id查询季报id
SearchQueryCondition
searchQRById
=
SearchUtil
.
buildQueryWithOpenAttr
(
"id"
,
SearchItem
.
Operator
.
EQ
,
extActionItemVO
.
getExtQuarterlyReport
().
getId
(),
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtQuarterlyReportServiceImpl.java
View file @
9774734e
...
...
@@ -17,6 +17,7 @@ import com.yonde.dex.basedata.data.search.SearchQueryCondition;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.users.UserHelper
;
import
com.yonde.dex.dfs.feign.FileManagerFeignService
;
import
com.yonde.dex.dfs.vo.ObjFileLinkVO
;
import
com.yonde.dex.dfs.vo.view.FileDownLoadInfoVO
;
...
...
@@ -32,6 +33,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -57,6 +59,8 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
@Autowired
private
WfcProcessFeign
wfcProcessFeign
;
@Autowired
private
UserHelper
userHelper
;
@Override
public
void
batchDownloadDoc
(
HttpServletResponse
response
,
Long
id
)
throws
IOException
{
...
...
@@ -65,14 +69,15 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
List
<
Long
>
fileIds
=
new
ArrayList
<>();
//临时文件目录
String
tempDir
=
ResourceHelper
.
createTempDir
().
getPath
();
SearchQueryCondition
query
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"extActionItems"
)
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"objFileLinks"
)
.
build
())
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"target"
).
build
()).
build
())
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"objFileLinks"
)
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"target"
).
build
()
).
build
()).
build
())
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"id"
,
SearchItem
.
Operator
.
EQ
,
id
,
null
))
.
item
(
new
SearchItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
.
build
()).
build
();
List
<
V
>
quarterlyReportVOList
=
this
.
findRecursion
(
query
).
getContent
();
if
(!
ObjectUtils
.
isEmpty
(
quarterlyReportVOList
))
{
ExtQuarterlyReportVO
extQuarterlyReportVO
=
quarterlyReportVOList
.
get
(
0
);
...
...
@@ -89,10 +94,13 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
});
//压缩文件
downloadDataZip
(
response
,
tempDir
);
// todo 删除临时文件夹
}
else
{
throw
new
DxBusinessException
(
"-1"
,
"根据季报id:"
+
id
+
"未查到数据"
);
throw
new
DxBusinessException
(
"-1"
,
"根据季报id:"
+
id
+
"未查到
报表
数据"
);
}
}
else
{
throw
new
DxBusinessException
(
"-1"
,
"根据季报id:"
+
id
+
"未查到季报对象"
);
}
...
...
@@ -110,6 +118,10 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
}
//批量启动行动项工作流
for
(
ExtActionItemVO
extActionItemVO
:
extQuarterlyReportVO
.
getExtActionItems
())
{
//任务启动时间
extActionItemVO
.
setTaskReleaseDate
(
LocalDateTime
.
now
());
//任务发布人
extActionItemVO
.
setTaskReleasePersonId
(
userHelper
.
getCurrentUser
().
getUserId
());
wfcProcessFeign
.
startProcessByKey
(
"ExtActionItemWF"
,
extActionItemVO
);
}
//修改季报的状态未信息收集中
...
...
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtActionItemServiceFeign.java
View file @
9774734e
...
...
@@ -6,6 +6,8 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
...
...
@@ -20,6 +22,6 @@ public interface ExtActionItemServiceFeign<V extends ExtActionItemVO> extends Ex
@ApiOperation
(
value
=
"根据行动项id修改季报的状态"
,
notes
=
"根据行动项id修改季报的状态"
)
@
Ge
tMapping
(
value
=
"/updateQRStateByAItemId"
)
String
changeQRStateWhenAllActionItemIsDone
(
@Request
Param
(
"id"
)
Long
id
);
@
Pos
tMapping
(
value
=
"/updateQRStateByAItemId"
)
String
changeQRStateWhenAllActionItemIsDone
(
@Request
Body
ExtActionItemVO
extActionItemVO
);
}
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