From 031748e56f04bf939927fdc54f31df29660d9363 Mon Sep 17 00:00:00 2001 From: yanghb <yangbhwork@163.com> Date: 星期二, 18 二月 2025 09:48:26 +0800 Subject: [PATCH] feat: 完善备注 --- land-admin/src/main/java/com/zzg/web/controller/state/StateSettlementController.java | 54 +++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 37 insertions(+), 17 deletions(-) diff --git a/land-admin/src/main/java/com/zzg/web/controller/state/StateSettlementController.java b/land-admin/src/main/java/com/zzg/web/controller/state/StateSettlementController.java index 37997b3..0c3d353 100644 --- a/land-admin/src/main/java/com/zzg/web/controller/state/StateSettlementController.java +++ b/land-admin/src/main/java/com/zzg/web/controller/state/StateSettlementController.java @@ -14,17 +14,32 @@ import com.zzg.common.utils.file.FileUtils; import com.zzg.system.convert.StateProjectConvert; import com.zzg.system.convert.easyExcel.MultiDropdownWriteHandler; -import com.zzg.system.domain.bo.*; -import com.zzg.system.domain.vo.*; -import com.zzg.system.service.state.StateHouseholdService; +import com.zzg.system.domain.bo.ImportSettlementBO; +import com.zzg.system.domain.bo.SettlementBO; +import com.zzg.system.domain.bo.SettlementDetailBO; +import com.zzg.system.domain.bo.StateExecutionBO; +import com.zzg.system.domain.bo.WorkFlowSubmitBO; +import com.zzg.system.domain.vo.HouseholdVO; +import com.zzg.system.domain.vo.NotResettlementHouseholdExportVO; +import com.zzg.system.domain.vo.ProjectExecutionSumVO; +import com.zzg.system.domain.vo.ResettlementHouseholdExportVO; +import com.zzg.system.domain.vo.SettlementDetailPageVO; +import com.zzg.system.domain.vo.SettlementSumVO; +import com.zzg.system.domain.vo.StateExecutionDetailExportVO; +import com.zzg.system.domain.vo.StateExecutionDetailVO; import com.zzg.system.service.state.StateSettlementService; import com.zzg.system.service.system.ISysDeptService; import com.zzg.web.core.enums.TemplateFileTypeEnum; +import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -43,49 +58,49 @@ public class StateSettlementController { private final StateSettlementService settlementService; - private final StateHouseholdService stateHouseholdService; private final ISysDeptService deptService; + @ApiOperation(value = "安置情况保存", notes = "安置情况保存") @PostMapping(UrlConstants.STATE_SETTLEMENT_SAVE) public AjaxResult<List<StateSettlement>> saveSettlement(@RequestBody List<StateSettlement> stateSettlement) { settlementService.saveOrUpdateSettlement(stateSettlement); return AjaxResult.success(stateSettlement); } + @ApiOperation(value = "安置情况删除", notes = "安置情况删除") @GetMapping(UrlConstants.STATE_SETTLEMENT_DEL) public AjaxResult<Boolean> delSettlement(@RequestParam String settlementId) { settlementService.deleteSettlement(settlementId); return AjaxResult.success(true); } - //安置详情 + @ApiOperation(value = "安置详情", notes = "安置详情") @PostMapping(UrlConstants.STATE_SETTLEMENT_DETAIL_LIST) public AjaxResult<SettlementDetailPageVO> listSettlementDetail(@RequestBody SettlementDetailBO settlementBO) { return AjaxResult.success(settlementService.listDetailData(settlementBO)); } - //安置详情 + @ApiOperation(value = "安置详情-回显", notes = "安置详情-回显") @PostMapping(UrlConstants.STATE_SETTLEMENT_DETAIL_UPDATE_LIST) public AjaxResult<SettlementDetailPageVO> listSettlementDetailUpdate(@RequestBody SettlementDetailBO settlementBO) { return AjaxResult.success(settlementService.listDetailUpdateData(settlementBO)); } - //外层项目实施数据 + @ApiOperation(value = "外层项目实施数据", notes = "外层项目实施数据") @GetMapping(UrlConstants.STATE_SETTLEMENT_SUM) public AjaxResult<SettlementSumVO> sumSettled(@RequestParam String projectId) { return AjaxResult.success(settlementService.sumSettleData(projectId)); } - + // 安置情况页面 数据 @PostMapping(UrlConstants.STATE_SETTLEMENT_LIST) public AjaxResult<PageInfo<HouseholdVO>> listSettlement(@RequestBody SettlementBO settlementBO) { return AjaxResult.success(settlementService.listSettleData(settlementBO)); } - + // 安置情况页面 导出 @PostMapping(UrlConstants.STATE_SETTLEMENT_EXPORT) public AjaxResult<Void> exportSettlement(@RequestBody SettlementBO settlementBO, HttpServletResponse response) { try { List<HouseholdVO> result = settlementService.exportSettleData(settlementBO, response); - if (Objects.equals(settlementBO.getIsSettled(), SettledProcessEnum.NOT_SETTLE.getValue())) { List<NotResettlementHouseholdExportVO> exportVOList = StateProjectConvert.INSTANCE.toNotResettlementHouseholdExportVO(result); List<String> deptIdList = exportVOList.stream() @@ -158,6 +173,7 @@ } } + // 新增安置情况模板 @GetMapping(UrlConstants.STATE_SETTLEMENT_IMPORT_TEMPLATE) public void importStateHouseholdTemplate(@RequestParam Integer compensationType, HttpServletResponse response) { @@ -188,15 +204,15 @@ } } - + // 新增安置详情页面 导入 @PostMapping(UrlConstants.STATE_SETTLEMENT_IMPORT) public AjaxResult<Void> importSettlement(ImportSettlementBO importSettlementBO) throws IOException { - settlementService.stateSettlementImport(importSettlementBO); return AjaxResult.success(); } + // 实施明细导出 @PostMapping(UrlConstants.STATE_SETTLEMENT_LIST_EXPORT) public AjaxResult<Void> exportSettlementDetail(@RequestBody(required = false) StateExecutionBO executionBO, HttpServletResponse response) { try { @@ -215,7 +231,6 @@ } } - //项目实施明细 @PostMapping(UrlConstants.STATE_EXECUTION_DETAIL) public AjaxResult<PageInfo<StateExecutionDetailVO>> listExecution(@RequestBody(required = false) StateExecutionBO executionBO) { @@ -227,7 +242,7 @@ public AjaxResult<Map<String, Map<Integer, ProjectExecutionSumVO>>> listProjectExecution(@RequestBody List<String> projectIdList) { return AjaxResult.success(settlementService.listProjectExecutionByProjectId(projectIdList, null)); } - + // 新增安置情况 - 提交审核 @PostMapping(UrlConstants.STATE_SETTLEMENT_EXECUTION_WORKFLOW_SUBMIT) public AjaxResult<Boolean> submitSettle(@RequestBody WorkFlowSubmitBO workFlowSubmitBO) { if (Objects.isNull(workFlowSubmitBO.getSettlementIdList()) || workFlowSubmitBO.getSettlementIdList().isEmpty()) { @@ -248,8 +263,9 @@ } /** + * 新增安置情况 - 安置批次名字 * @param projectId - * @param componsationType 前端传 “null” 无办法 + * @param componsationType * @return */ @GetMapping(UrlConstants.STATE_SETTLEMENT_GENERATE_SETTLE_BATCH) @@ -257,11 +273,15 @@ return AjaxResult.success(settlementService.generateBatchName(projectId, componsationType)); } + /** + * 当前项目安置批次名字列表 + * @param projectId + * @return + */ @GetMapping(UrlConstants.STATE_SETTLEMENT_BATCH_NAME_LIST) public AjaxResult<List<String>> listBatchName(@RequestParam String projectId) { return AjaxResult.success(settlementService.listBatchName(projectId)); } - } -- Gitblit v1.7.1