|
@@ -1,11 +1,9 @@
|
|
package com.ozs.web.controller.plan;
|
|
package com.ozs.web.controller.plan;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.ozs.common.core.controller.BaseController;
|
|
import com.ozs.common.core.controller.BaseController;
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
import com.ozs.common.core.domain.model.LoginUser;
|
|
import com.ozs.common.core.domain.model.LoginUser;
|
|
-import com.ozs.common.core.page.TableDataInfo;
|
|
|
|
import com.ozs.common.utils.poi.ExcelUtil;
|
|
import com.ozs.common.utils.poi.ExcelUtil;
|
|
import com.ozs.framework.web.service.TokenService;
|
|
import com.ozs.framework.web.service.TokenService;
|
|
import com.ozs.plan.doman.PlanYears;
|
|
import com.ozs.plan.doman.PlanYears;
|
|
@@ -20,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -88,13 +87,17 @@ public class PlanYearsController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "审核年度计划通过")
|
|
@ApiOperation(value = "审核年度计划通过")
|
|
@PostMapping("/reviewTo")
|
|
@PostMapping("/reviewTo")
|
|
- public AjaxResult reviewTo(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
|
|
|
|
+ public AjaxResult reviewTo(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(request);
|
|
|
|
+ yearsStandardVo.setUpdated(String.valueOf(loginUser.getUserId()));
|
|
return planYearsService.reviewTo(yearsStandardVo);
|
|
return planYearsService.reviewTo(yearsStandardVo);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "审核年度计划退回")
|
|
@ApiOperation(value = "审核年度计划退回")
|
|
@PostMapping("/reviewReturn")
|
|
@PostMapping("/reviewReturn")
|
|
- public AjaxResult reviewReturn(@RequestBody PlanYearsStandardVo yearsStandardVo) {
|
|
|
|
|
|
+ public AjaxResult reviewReturn(@RequestBody PlanYearsStandardVo yearsStandardVo, HttpServletRequest request) {
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(request);
|
|
|
|
+ yearsStandardVo.setUpdated(String.valueOf(loginUser.getUserId()));
|
|
return planYearsService.reviewReturn(yearsStandardVo);
|
|
return planYearsService.reviewReturn(yearsStandardVo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -133,5 +136,14 @@ public class PlanYearsController extends BaseController {
|
|
return success(message);
|
|
return success(message);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "导出年度计划数据")
|
|
|
|
+ @PostMapping("/exportPlan")
|
|
|
|
+ public void exportPlan(HttpServletResponse response, @RequestBody PlanYearsStandardVo yearsStandardVo) throws Exception {
|
|
|
|
+ PageInfo<PlanYears> page = planYearsService.selectPlanYearsList(yearsStandardVo);
|
|
|
|
+ List<PlanYears> list = page.getList();
|
|
|
|
+ ExcelUtil<PlanYears> util = new ExcelUtil<>(PlanYears.class);
|
|
|
|
+ util.exportExcel(response, list, "年度计划数据");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|