|
@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.project;
|
|
|
import java.util.List;
|
|
|
|
|
|
import com.ruoyi.system.domain.project.BmDeptPlan;
|
|
|
+import com.ruoyi.system.domain.vo.BmDeptPlanVo;
|
|
|
import com.ruoyi.system.service.project.IBmDeptPlanService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -22,15 +23,14 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
/**
|
|
|
- * 部门招商计划Controller
|
|
|
- *
|
|
|
+ * 部门招商计划Controller
|
|
|
+ *
|
|
|
* @author ruoyi
|
|
|
* @date 2021-03-09
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/deptPlan/plan")
|
|
|
-public class BmDeptPlanController extends BaseController
|
|
|
-{
|
|
|
+public class BmDeptPlanController extends BaseController {
|
|
|
@Autowired
|
|
|
private IBmDeptPlanService bmDeptPlanService;
|
|
|
|
|
@@ -39,8 +39,7 @@ public class BmDeptPlanController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('deptPlan:Plan:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(BmDeptPlan bmDeptPlan)
|
|
|
- {
|
|
|
+ public TableDataInfo list(BmDeptPlan bmDeptPlan) {
|
|
|
startPage();
|
|
|
List<BmDeptPlan> list = bmDeptPlanService.selectBmDeptPlanList(bmDeptPlan);
|
|
|
return getDataTable(list);
|
|
@@ -52,8 +51,7 @@ public class BmDeptPlanController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('deptPlan:Plan:export')")
|
|
|
@Log(title = " 部门招商计划", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
|
- public AjaxResult export(BmDeptPlan bmDeptPlan)
|
|
|
- {
|
|
|
+ public AjaxResult export(BmDeptPlan bmDeptPlan) {
|
|
|
List<BmDeptPlan> list = bmDeptPlanService.selectBmDeptPlanList(bmDeptPlan);
|
|
|
ExcelUtil<BmDeptPlan> util = new ExcelUtil<BmDeptPlan>(BmDeptPlan.class);
|
|
|
return util.exportExcel(list, "Plan");
|
|
@@ -64,8 +62,7 @@ public class BmDeptPlanController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('deptPlan:Plan:query')")
|
|
|
@GetMapping(value = "/{id}")
|
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
return AjaxResult.success(bmDeptPlanService.selectBmDeptPlanById(id));
|
|
|
}
|
|
|
|
|
@@ -75,8 +72,7 @@ public class BmDeptPlanController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('deptPlan:Plan:add')")
|
|
|
@Log(title = " 部门招商计划", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody BmDeptPlan bmDeptPlan)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody BmDeptPlan bmDeptPlan) {
|
|
|
return toAjax(bmDeptPlanService.insertBmDeptPlan(bmDeptPlan));
|
|
|
}
|
|
|
|
|
@@ -86,8 +82,7 @@ public class BmDeptPlanController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('deptPlan:Plan:edit')")
|
|
|
@Log(title = " 部门招商计划", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody BmDeptPlan bmDeptPlan)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody BmDeptPlan bmDeptPlan) {
|
|
|
return toAjax(bmDeptPlanService.updateBmDeptPlan(bmDeptPlan));
|
|
|
}
|
|
|
|
|
@@ -96,9 +91,41 @@ public class BmDeptPlanController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('deptPlan:Plan:remove')")
|
|
|
@Log(title = " 部门招商计划", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
- {
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
return toAjax(bmDeptPlanService.deleteBmDeptPlanByIds(ids));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 首页-单位榜单
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('deptPlan:Plan:unitList')")
|
|
|
+ @Log(title = " 单位榜单", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/unitList")
|
|
|
+ public TableDataInfo unitList() {
|
|
|
+ List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanService.selectUnitList();
|
|
|
+ return getDataTable(bmDeptPlanVos);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 首页-单位榜单资金
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('deptPlan:Plan:unitAmountList')")
|
|
|
+ @Log(title = " 单位榜单资金", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/unitAmountList")
|
|
|
+ public TableDataInfo unitAmountList() {
|
|
|
+ List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanService.selectUnitAmountList();
|
|
|
+ return getDataTable(bmDeptPlanVos);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统计分析-合同金额
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('deptPlan:Plan:totAmtList')")
|
|
|
+ @Log(title = " 统计分析-合同金额", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/totAmtList")
|
|
|
+ public TableDataInfo totAmtList() {
|
|
|
+ List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanService.selectTotAmtList();
|
|
|
+ return getDataTable(bmDeptPlanVos);
|
|
|
+ }
|
|
|
}
|