|
|
@@ -6,11 +6,14 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
import com.ruoyi.common.enums.FileType;
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
import com.ruoyi.flowable.service.IInvestmentOpportunityService;
|
|
|
import com.ruoyi.invest.domain.*;
|
|
|
import com.ruoyi.invest.domain.dto.InvestDto;
|
|
|
import com.ruoyi.invest.service.*;
|
|
|
-import com.ruoyi.system.domain.vo.TProjectPoolVo;
|
|
|
+import com.ruoyi.invest.domain.vo.TProjectPoolVo;
|
|
|
+import com.ruoyi.system.service.ISysDictDataService;
|
|
|
import com.ruoyi.tool.service.ITUnifyFileService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -19,7 +22,9 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 项目池Controller
|
|
|
@@ -41,36 +46,13 @@ public class InvestmentOpportunityController extends BaseController
|
|
|
@Autowired
|
|
|
private ITProjectContactsService tProjectContactsService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private ITProjectCirculationService tProjectCirculationService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ITUnifyFileService tUnifyFileService;
|
|
|
|
|
|
@Autowired
|
|
|
private ITProjectPoolService tProjectPoolService;
|
|
|
- //所有项目观望列表
|
|
|
- @ApiOperation("所有项目观望列表")
|
|
|
- @PreAuthorize("@ss.hasPermi('invest:pool:list')")
|
|
|
- @GetMapping("/allWatchlist")
|
|
|
- public TableDataInfo allWatchlist(TProjectPool tProjectPool)
|
|
|
- {
|
|
|
- startPage();
|
|
|
- List<TProjectPoolVo> list=investmentOpportunityService.selectAllWatchList(tProjectPool);
|
|
|
- return getDataTable(list);
|
|
|
- }
|
|
|
- /**
|
|
|
- * 查询所有项目终止列表
|
|
|
- */
|
|
|
- @ApiOperation("查询所有项目终止列表")
|
|
|
- @PreAuthorize("@ss.hasPermi('invest:pool:list')")
|
|
|
- @GetMapping("/allTerminationList")
|
|
|
- public TableDataInfo allTerminationList(TProjectPool tProjectPool)
|
|
|
- {
|
|
|
- startPage();
|
|
|
- List<TProjectPoolVo> list=investmentOpportunityService.selectAllTerminationList(tProjectPool);
|
|
|
- return getDataTable(list);
|
|
|
- }
|
|
|
+ @Autowired
|
|
|
+ private ISysDictDataService dictDataService;
|
|
|
|
|
|
/**
|
|
|
* 查询所有投资机会流程
|
|
|
@@ -84,7 +66,37 @@ public class InvestmentOpportunityController extends BaseController
|
|
|
List<TProjectPoolVo> list=investmentOpportunityService.selectAllInvestmentOpportunityList(tProjectPool);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 导出所有投资机会流程列表
|
|
|
+ */
|
|
|
+ @ApiOperation("导出所有投资机会流程列表")
|
|
|
+ @Log(title = "所有投资机会流程列表", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, TProjectPool tProjectPool)
|
|
|
+ {
|
|
|
+ List<TProjectPoolVo> list=investmentOpportunityService.selectAllInvestmentOpportunityList(tProjectPool)
|
|
|
+ .stream().map(n -> {
|
|
|
+ if(null != n.gettProjectChannel()){
|
|
|
+ n.setChannel(n.gettProjectChannel().getChannelName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getIndustry()))n.setIndustry(dictDataService.selectDictLabel("CUSTOMER_TRADE",n.getIndustry()));
|
|
|
+ if(null != n.gettProjectCompany()){
|
|
|
+ n.setCompany(n.gettProjectCompany().getCompanyName());
|
|
|
+ }
|
|
|
+ if(null != n.gettProjectContacts()){
|
|
|
+ n.setProjectContacts(n.gettProjectContacts().getName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestType()))n.setInvestType(dictDataService.selectDictLabel("INVEST_TYPE",n.getInvestType()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestPloy()))n.setInvestPloy(dictDataService.selectDictLabel("INVEST_PLOY",n.getInvestPloy()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestWorth()))n.setInvestWorth(dictDataService.selectDictLabel("INVEST_WORTH",n.getInvestWorth()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStage()))n.setProjectStage(dictDataService.selectDictLabel("PROJECT_STAGE",n.getProjectStage()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectState()))n.setProjectState(dictDataService.selectDictLabel("PROJECT_STATE",n.getProjectState()));
|
|
|
+ return n;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ ExcelUtil<TProjectPoolVo> util = new ExcelUtil<TProjectPoolVo>(TProjectPoolVo.class);
|
|
|
+ util.exportExcel(response, list, "所有投资机会流程数据");
|
|
|
+ }
|
|
|
//我的待办任务
|
|
|
@ApiOperation("我的待办任务列表")
|
|
|
@PreAuthorize("@ss.hasPermi('invest:pool:list')")
|
|
|
@@ -92,7 +104,6 @@ public class InvestmentOpportunityController extends BaseController
|
|
|
public TableDataInfo getMyTaskList(TProjectPool tProjectPool)
|
|
|
{
|
|
|
startPage();
|
|
|
- //tProjectPool.setProjectStage("1");
|
|
|
List<TProjectPoolVo> list=investmentOpportunityService.getMyTaskList(getUserId().toString(),tProjectPool);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
@@ -103,7 +114,6 @@ public class InvestmentOpportunityController extends BaseController
|
|
|
public TableDataInfo getMyDoneTaskList(TProjectPool tProjectPool)
|
|
|
{
|
|
|
startPage();
|
|
|
- //tProjectPool.setProjectStage("1");
|
|
|
List<TProjectPoolVo> list=investmentOpportunityService.getMyDoneTaskList(getUserId().toString(),tProjectPool);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
@@ -114,11 +124,130 @@ public class InvestmentOpportunityController extends BaseController
|
|
|
public TableDataInfo getMyList(TProjectPool tProjectPool)
|
|
|
{
|
|
|
startPage();
|
|
|
- //tProjectPool.setProjectStage("1");
|
|
|
List<TProjectPoolVo> list=investmentOpportunityService.getMyList(getUserId().toString(),tProjectPool);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 导出我的已办任务列表
|
|
|
+ */
|
|
|
+ @ApiOperation("导出我的待办任务列表")
|
|
|
+ @Log(title = "我的待办任务列表", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/exportMyTask")
|
|
|
+ public void exportMyTask(HttpServletResponse response, TProjectPool tProjectPool)
|
|
|
+ {
|
|
|
+ List<TProjectPoolVo> list=investmentOpportunityService.getMyTaskList(getUserId().toString(),tProjectPool)
|
|
|
+ .stream().map(n -> {
|
|
|
+ if(null != n.gettProjectChannel()){
|
|
|
+ n.setChannel(n.gettProjectChannel().getChannelName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getIndustry()))n.setIndustry(dictDataService.selectDictLabel("CUSTOMER_TRADE",n.getIndustry()));
|
|
|
+ if(null != n.gettProjectCompany()){
|
|
|
+ n.setCompany(n.gettProjectCompany().getCompanyName());
|
|
|
+ }
|
|
|
+ if(null != n.gettProjectContacts()){
|
|
|
+ n.setProjectContacts(n.gettProjectContacts().getName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestType()))n.setInvestType(dictDataService.selectDictLabel("INVEST_TYPE",n.getInvestType()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestPloy()))n.setInvestPloy(dictDataService.selectDictLabel("INVEST_PLOY",n.getInvestPloy()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestWorth()))n.setInvestWorth(dictDataService.selectDictLabel("INVEST_WORTH",n.getInvestWorth()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStage()))n.setProjectStage(dictDataService.selectDictLabel("PROJECT_STAGE",n.getProjectStage()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectState()))n.setProjectState(dictDataService.selectDictLabel("PROJECT_STATE",n.getProjectState()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStatus())){
|
|
|
+ if("0".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("正常");
|
|
|
+ }else if("1".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("终止");
|
|
|
+ }else if("2".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("观望");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return n;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ ExcelUtil<TProjectPoolVo> util = new ExcelUtil<TProjectPoolVo>(TProjectPoolVo.class);
|
|
|
+ util.exportExcel(response, list, "我的待办任务数据");
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 导出我的已办任务列表
|
|
|
+ */
|
|
|
+ @ApiOperation("导出我的已办任务列表")
|
|
|
+ @Log(title = "我的已办任务列表", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/exportMyDoneTask")
|
|
|
+ public void exportMyDoneTask(HttpServletResponse response, TProjectPool tProjectPool)
|
|
|
+ {
|
|
|
+ List<TProjectPoolVo> list=investmentOpportunityService.getMyDoneTaskList(getUserId().toString(),tProjectPool)
|
|
|
+ .stream().map(n -> {
|
|
|
+ if(null != n.gettProjectChannel()){
|
|
|
+ n.setChannel(n.gettProjectChannel().getChannelName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getIndustry()))n.setIndustry(dictDataService.selectDictLabel("CUSTOMER_TRADE",n.getIndustry()));
|
|
|
+ if(null != n.gettProjectCompany()){
|
|
|
+ n.setCompany(n.gettProjectCompany().getCompanyName());
|
|
|
+ }
|
|
|
+ if(null != n.gettProjectContacts()){
|
|
|
+ n.setProjectContacts(n.gettProjectContacts().getName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestType()))n.setInvestType(dictDataService.selectDictLabel("INVEST_TYPE",n.getInvestType()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestPloy()))n.setInvestPloy(dictDataService.selectDictLabel("INVEST_PLOY",n.getInvestPloy()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestWorth()))n.setInvestWorth(dictDataService.selectDictLabel("INVEST_WORTH",n.getInvestWorth()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStage()))n.setProjectStage(dictDataService.selectDictLabel("PROJECT_STAGE",n.getProjectStage()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectState()))n.setProjectState(dictDataService.selectDictLabel("PROJECT_STATE",n.getProjectState()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStatus())){
|
|
|
+ if("0".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("正常");
|
|
|
+ }else if("1".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("终止");
|
|
|
+ }else if("2".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("观望");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return n;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ ExcelUtil<TProjectPoolVo> util = new ExcelUtil<TProjectPoolVo>(TProjectPoolVo.class);
|
|
|
+ util.exportExcel(response, list, "我的已办任务数据");
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 导出我的单据列表
|
|
|
+ */
|
|
|
+ @ApiOperation("导出我的单据列表")
|
|
|
+ @Log(title = "我的单据列表", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/exportMy")
|
|
|
+ public void exportMy(HttpServletResponse response, TProjectPool tProjectPool)
|
|
|
+ {
|
|
|
+ List<TProjectPoolVo> list=investmentOpportunityService.getMyList(getUserId().toString(),tProjectPool)
|
|
|
+ .stream().map(n -> {
|
|
|
+ if(null != n.gettProjectChannel()){
|
|
|
+ n.setChannel(n.gettProjectChannel().getChannelName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getIndustry()))n.setIndustry(dictDataService.selectDictLabel("CUSTOMER_TRADE",n.getIndustry()));
|
|
|
+ if(null != n.gettProjectCompany()){
|
|
|
+ n.setCompany(n.gettProjectCompany().getCompanyName());
|
|
|
+ }
|
|
|
+ if(null != n.gettProjectContacts()){
|
|
|
+ n.setProjectContacts(n.gettProjectContacts().getName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestType()))n.setInvestType(dictDataService.selectDictLabel("INVEST_TYPE",n.getInvestType()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestPloy()))n.setInvestPloy(dictDataService.selectDictLabel("INVEST_PLOY",n.getInvestPloy()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getInvestWorth()))n.setInvestWorth(dictDataService.selectDictLabel("INVEST_WORTH",n.getInvestWorth()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStage()))n.setProjectStage(dictDataService.selectDictLabel("PROJECT_STAGE",n.getProjectStage()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectState()))n.setProjectState(dictDataService.selectDictLabel("PROJECT_STATE",n.getProjectState()));
|
|
|
+ if(StringUtils.isNotEmpty(n.getProjectStatus())){
|
|
|
+ if("0".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("正常");
|
|
|
+ }else if("1".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("终止");
|
|
|
+ }else if("2".equals(n.getProjectStatus())){
|
|
|
+ n.setProjectStatus("观望");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return n;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ ExcelUtil<TProjectPoolVo> util = new ExcelUtil<TProjectPoolVo>(TProjectPoolVo.class);
|
|
|
+ util.exportExcel(response, list, "我的单据数据");
|
|
|
+ }
|
|
|
/**
|
|
|
* 获取项目池详细信息
|
|
|
*/
|