package com.rongwei.bsserver.controller; import com.alibaba.fastjson.JSONObject; import com.rongwei.bscommon.sys.service.LuckysheetService; import com.rongwei.bscommon.sys.service.ZhcxProjectManageRectifyBatchService; import com.rongwei.bscommon.sys.service.ZhcxProjectManageService; import com.rongwei.bsentity.domain.ZhcxProjectManageDo; import com.rongwei.bsentity.domain.ZhcxProjectManageRectifyBatchDo; import com.rongwei.bsentity.dto.luckysheet.UpdateFilterSelectRequest; import com.rongwei.bsentity.dto.project.DelProjectSummaryDto; import com.rongwei.bsentity.dto.project.ExportProjectSummaryDto; import com.rongwei.bsentity.dto.project.SavePorjectSummaryDto; import com.rongwei.bsentity.dto.project.UpdateDataVerificationRequest; import com.rongwei.rwcommon.base.R; import com.rongwei.rwcommon.base.exception.CustomException; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.util.Map; /** *
* 项目管理表 前端控制器 *
* * @author wm * @since 2024-06-28 */ @RestController @RequestMapping("/zhcxProjectManage") @Api(tags = "项目管理") @Slf4j public class ZhcxProjectManageController { @Autowired private ZhcxProjectManageService service; @Autowired private LuckysheetService luckysheetService; @Autowired private ZhcxProjectManageRectifyBatchService projectManageRectifyBatchService; /** * 生成整改清单 * @param projectManageDo * @return */ @PostMapping("/genSummaryFiles") @ApiOperation("生成汇总文件") public R genSummaryFiles(@RequestBody ZhcxProjectManageDo projectManageDo){ String files = luckysheetService.genProjectSummaryFiles(projectManageDo.getId()); return R.ok(files); } /** * 生成整改清单 * @param batch * @return */ @PostMapping("/genBatchSummaryFiles") @ApiOperation("生成批次汇总文件") public R genBatchSummaryFiles(@RequestBody ZhcxProjectManageRectifyBatchDo batch){ String files = projectManageRectifyBatchService.genProjectSummaryFiles(batch.getId()); return R.ok(files); } /** * 保存汇总文件数据 * * @param dto * @return */ @PostMapping("/saveSummaryData") @ApiOperation("保存汇总文件数据") public R saveSummaryData(@RequestBody SavePorjectSummaryDto dto) { service.saveSummaryData(dto); return R.ok(); } /** * 保存汇总文件数据 * * @param dto * @return */ @PostMapping("/saveSummaryDataByBatchId") @ApiOperation("保存汇总文件数据") public R saveSummaryDataByBatchId(@RequestBody SavePorjectSummaryDto dto) { service.saveSummaryData(dto.getBatchId()); return R.ok(); } /** * 保存汇总文件数据 * * @param dto * @return */ @PostMapping("/saveSummaryDataByDto") @ApiOperation("保存汇总文件数据") public R saveSummaryDataByDto(@RequestBody SavePorjectSummaryDto dto) { service.saveSummaryDataByDto(dto); return R.ok(); } /** * 更新excel下拉框 * * @param req * @return */ @PostMapping("/updateDataVerification") @ApiOperation("更新excel下拉框") public R updateDataVerification(@RequestBody UpdateDataVerificationRequest req) { final JSONObject verifyData = luckysheetService.updateDataVerification(req); return R.ok(verifyData); } /** * 更新excel筛选 * * @param req * @return */ @PostMapping("/updateFilterSelect") @ApiOperation("更新excel筛选") public R updateFilterSelect(@RequestBody UpdateFilterSelectRequest req) { luckysheetService.updateFilterSelect(req); return R.ok(); } @PostMapping("/getRectifyReportData") @ApiOperation("获取整改报表数据") public R getRectifyReportData(@RequestBody Map