You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gysl/ruoyi-admin/src/main/java/com/ruoyi/docking/controller/ProjectProgressController.java

123 lines
3.6 KiB

package com.ruoyi.docking.controller;
1 month ago
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.docking.entity.ProjectProgress;
import com.ruoyi.docking.service.ProjectProgressService;
1 month ago
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
1 month ago
import javax.validation.Valid;
1 month ago
import java.io.Serializable;
1 month ago
import java.util.List;
/**
* (ProjectProgress)
1 month ago
*
* @author makejava
* @since 2025-03-25 14:49:04
1 month ago
*/
@Api(tags = "项目月度进度(对接数据)")
1 month ago
@RestController
@RequestMapping("/gysl/projectProgress")
public class ProjectProgressController extends BaseController {
1 month ago
/**
*
*/
@Resource
private ProjectProgressService projectProgressService;
1 month ago
1 month ago
1 month ago
/**
*
*
* @param page
1 month ago
* @param zwIdPageReq
* @return
*/
@ApiOperation(value = "分页查询所有数据", response = ProjectProgress.class)
1 month ago
@GetMapping("/page")
public AjaxResult selectAll(Page<ProjectProgress> page, @Valid ZwIdPageReq zwIdPageReq) {
return success(projectProgressService.page(page, zwIdPageReq));
1 month ago
}
/**
*
*
* @param projectMonthInfo
* @return
*/
@ApiOperation("新增数据")
@PostMapping("/add")
public AjaxResult insert(@RequestBody ProjectProgress projectMonthInfo) {
return success(projectProgressService.save(projectMonthInfo));
1 month ago
}
// /**
// * 测试
// */
// @GetMapping("/test")
// @ApiOperation(value = "测试", response = ProjectProgress.class)
// public AjaxResult test() {
// return success(projectProgressService.djList());
// }
1 month ago
/**
*
*
* @param id
* @return
*/
@GetMapping("/{id}")
@ApiOperation(value = "通过主键查询单条数据", response = ProjectProgress.class)
1 month ago
public AjaxResult selectOne(@PathVariable Serializable id) {
return success(projectProgressService.getById(id));
1 month ago
}
1 month ago
/**
*
*
* @param projectProgress
1 month ago
* @return
*/
@ApiOperation("修改数据")
@PutMapping("/edit")
public AjaxResult update(@RequestBody ProjectProgress projectProgress) {
return success(projectProgressService.updateById(projectProgress));
1 month ago
}
/**
*
*
* @param idList
* @return
*/
@ApiOperation("删除数据")
@DeleteMapping("/delete")
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
return success(projectProgressService.removeByIds(idList));
1 month ago
}
/**
*
*/
@ApiOperation(value = "根据条件导出月度进展详情")
@PostMapping(value = "/export")
public void export(HttpServletResponse response, ZwIdPageReq zwIdPageReq) throws Exception {
List<ProjectProgress> filteredList = projectProgressService.page(zwIdPageReq);
ExcelUtil<ProjectProgress> util = new ExcelUtil<>(ProjectProgress.class);
util.exportExcel(response, filteredList, "月度进展详情");
1 month ago
}
}