| New file |
| | |
| | | package cn.gistack.sm.sg.controller; |
| | | |
| | | import cn.gistack.sm.sg.DO.SgProjectInfoDO; |
| | | import cn.gistack.sm.sg.DTO.ProjectSearchDTO; |
| | | import cn.gistack.sm.sg.VO.SgProjectInfoVO; |
| | | import cn.gistack.sm.sg.VO.SgStatisProVO; |
| | | import cn.gistack.sm.sg.VO.SgStatistccVO; |
| | | import cn.gistack.sm.sg.VO.SgStatisticsVO; |
| | | import cn.gistack.sm.sg.excel.ProjectExcel; |
| | | import cn.gistack.sm.sg.excel.ProjectImport; |
| | | import cn.gistack.sm.sg.service.SgProjectInfoService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 施工项目表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author shenyijian |
| | | * @since 2024-06-13 11:51:20 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/sg_project_info") |
| | | public class SgProjectInfoController extends BladeController { |
| | | @Autowired |
| | | private SgProjectInfoService sgProjectInfoService; |
| | | /** |
| | | * 分页列表查询 |
| | | */ |
| | | @GetMapping(value = "/list") |
| | | public R queryPageList(ProjectSearchDTO searchDTO, Query query) { |
| | | IPage<SgProjectInfoDO> page = sgProjectInfoService.queryPageList(Condition.getPage(query), searchDTO); |
| | | return R.data(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询所有接口 |
| | | */ |
| | | @GetMapping(value = "/list_all") |
| | | public R queryPageList(ProjectSearchDTO searchDTO) { |
| | | List<SgProjectInfoDO> list = sgProjectInfoService.listAll(searchDTO); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 查询项目进度情况 |
| | | */ |
| | | @GetMapping(value = "/project_step") |
| | | public R queryStepByProject(ProjectSearchDTO searchDTO) { |
| | | List<SgProjectInfoDO> list= sgProjectInfoService.queryStepByProject(searchDTO); |
| | | return R.data(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目进度列表(APP) |
| | | */ |
| | | @GetMapping(value = "/project_progress_list") |
| | | public R progressList(ProjectSearchDTO searchDTO) { |
| | | List<SgProjectInfoVO> list= sgProjectInfoService.progressList(searchDTO); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 项目进度列表(分页) |
| | | */ |
| | | @GetMapping(value = "/project_progress_page") |
| | | public R progressPage(ProjectSearchDTO searchDTO,Query query) { |
| | | IPage<SgProjectInfoVO> page= sgProjectInfoService.progressPage(Condition.getPage(query),searchDTO); |
| | | return R.data(page); |
| | | } |
| | | |
| | | /** |
| | | * 首页项目统计(APP) |
| | | */ |
| | | @GetMapping(value = "/project_count") |
| | | public R projectCount(ProjectSearchDTO searchDTO) { |
| | | Map<String,Object> map = sgProjectInfoService.projectCount(searchDTO); |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * 导入项目 |
| | | */ |
| | | @PostMapping("import_project") |
| | | public R importUser(MultipartFile file, Integer isCovered) { |
| | | ProjectImport projectImport = new ProjectImport(sgProjectInfoService, isCovered == 1); |
| | | ExcelUtil.save(file, projectImport, ProjectExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 统计项目饼状图 |
| | | */ |
| | | @GetMapping("statisticsce") |
| | | public R projectStatisSum(String code) { |
| | | SgStatisticsVO sgStatisticsVO = sgProjectInfoService.getsgStatistics(code); |
| | | return R.data(sgStatisticsVO); |
| | | } |
| | | |
| | | /** |
| | | * 统计项目图列表 |
| | | */ |
| | | @GetMapping("statisticsBarlist") |
| | | public R projectStatisList(String code) { |
| | | List<SgStatisProVO> sgStatisProVOS = sgProjectInfoService.getsgStatisticsList(code); |
| | | return R.data(sgStatisProVOS); |
| | | } |
| | | |
| | | /** |
| | | * 统计项目柱状图 |
| | | */ |
| | | @GetMapping("statisticsBar") |
| | | public R projectStatis(String code) { |
| | | List<SgStatistccVO> sgStatisProVOS = sgProjectInfoService.getsgStatisticscc(code); |
| | | return R.data(sgStatisProVOS); |
| | | } |
| | | } |