Commit 006b4d0c authored by wangqiang's avatar wangqiang

季报启动流程

parent 98ef6dd8
......@@ -49,6 +49,12 @@ public class ExtQuarterlyReportController<V extends ExtQuarterlyReportVO, S exte
public ApiResult startWorkflow(@RequestParam("id") Long id) {
return ApiResult.ok(extQuarterlyReportService.startWorkflow(id),"下发成功!");
}
@ApiOperation(value = "修改季报状态", notes = "修改季报状态", httpMethod = "PUT")
@PutMapping(value = "/changeQPState")
public ApiResult changeQPState(@RequestParam("id") Long id) {
return ApiResult.ok(extQuarterlyReportService.changeState(id),"修改成功!");
}
}
......@@ -31,4 +31,6 @@ public interface ExtQuarterlyReportService<V extends ExtQuarterlyReportVO> exten
* @return
*/
String startWorkflow(Long id);
ExtQuarterlyReportVO changeState(Long id);
}
......@@ -88,7 +88,7 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
if (!ObjectUtils.isEmpty(quarterlyReportVOList)) {
ExtQuarterlyReportVO extQuarterlyReportVO = quarterlyReportVOList.get(0);
//取出所有行动项的附件id
for(ExtActionItemVO extActionItemVO:extQuarterlyReportVO.getExtActionItems()){
for (ExtActionItemVO extActionItemVO : extQuarterlyReportVO.getExtActionItems()) {
this.extFindFileIds(fileIds, extActionItemVO.getObjFileLinks(), Constants.MASTER_FILE);
}
if (!CollectionUtils.isEmpty(fileIds)) {
......@@ -109,7 +109,7 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
throw new DxBusinessException("-1", "根据季报id:" + id + "未查到报表数据");
}
}else {
} else {
throw new DxBusinessException("-1", "根据季报id:" + id + "未查到季报对象");
}
......@@ -142,7 +142,7 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
}
//修改季报的状态未信息收集中
this.changeStatus(extQuarterlyReportVO.getId(), Constants.INFORMATION_COLLECTION, true);
this.changeStatus(extQuarterlyReportVO.getId(), Constants.INFORMATION_COLLECTION, true);
} else {
throw new DxBusinessException("-1", "为查到id:" + id + "的季报对象");
......@@ -150,6 +150,18 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
return ApiResult.SUCCESS;
}
@Transactional(rollbackFor = Exception.class)
@Override
public ExtQuarterlyReportVO changeState(Long id) {
ExtQuarterlyReportVO extQuarterlyReportVO = this.get(id);
if(!ObjectUtils.isEmpty(extQuarterlyReportVO)){
wfcProcessFeign.startProcessByKey("ExtQuarterlyReportWF",extQuarterlyReportVO);
return this.changeStatus(id, Constants.REVIEWING, true);
}else {
throw new DxBusinessException("-1","根据id:"+id+"查询出的对象是空");
}
}
/**
* 批量下载季报报表文件
*
......@@ -173,7 +185,9 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
if (!CollectionUtils.isEmpty(objFileLinks)) {
//遍历取主内容的文件id
//List<ObjFileLinkVO> objFileLinkVOs = objFileLinks.stream().filter(n -> n.getContentType().equals(fileType)).collect(Collectors.toList());
objFileLinks.stream().forEach(o -> {fileIds.add(o.getTargetId());});
objFileLinks.stream().forEach(o -> {
fileIds.add(o.getTargetId());
});
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment