|
@@ -1,8 +1,11 @@
|
|
package com.dayou.controller;
|
|
package com.dayou.controller;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.dayou.common.RestResponse;
|
|
import com.dayou.common.RestResponse;
|
|
|
|
+import com.dayou.exception.ErrorCode;
|
|
import com.dayou.service.IBusinessIncomeService;
|
|
import com.dayou.service.IBusinessIncomeService;
|
|
|
|
+import com.dayou.vo.RealFundAssetsStatVO;
|
|
import com.dayou.vo.UserCommissionProdVO;
|
|
import com.dayou.vo.UserCommissionProdVO;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -10,6 +13,12 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 业务收入
|
|
* 业务收入
|
|
*
|
|
*
|
|
@@ -50,6 +59,23 @@ public class BusinessIncomeController extends BaseController {
|
|
return RestResponse.data(ret);
|
|
return RestResponse.data(ret);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 资产业务我的提成导出excel
|
|
|
|
+ * @param vo 查询条件
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/my/assets/export")
|
|
|
|
+ public void myAssetsIncomeExport(HttpServletResponse response, UserCommissionProdVO vo) throws IOException {
|
|
|
|
+ List<UserCommissionProdVO> list = businessIncomeService.myAssetsIncomeExport(vo);
|
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ if (ObjectUtil.isNull(vo.getStartDate()) || ObjectUtil.isNull(vo.getEndDate())){
|
|
|
|
+ ErrorCode.throwBusinessException("起始时间和结束时间必填!", "500");
|
|
|
|
+ }if (ObjectUtil.isNull(list) || list.isEmpty()){
|
|
|
|
+ ErrorCode.throwBusinessException("条件筛选结果数量为0,不可导出!", "500");
|
|
|
|
+ }else {
|
|
|
|
+ exportPlus(response, "资产我的提成_" + dateFormat.format(new Date()),list, UserCommissionProdVO.class);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|