| | |
| | | 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; |
| | |
| | | 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)); |
| | |
| | | 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() |
| | |
| | | |
| | | @PostMapping(UrlConstants.STATE_SETTLEMENT_IMPORT) |
| | | public AjaxResult<Void> importSettlement(ImportSettlementBO importSettlementBO) throws IOException { |
| | | |
| | | settlementService.stateSettlementImport(importSettlementBO); |
| | | return AjaxResult.success(); |
| | | |
| | |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | |
| | | //项目实施明细 |
| | | @PostMapping(UrlConstants.STATE_EXECUTION_DETAIL) |
| | |
| | | |
| | | /** |
| | | * @param projectId |
| | | * @param componsationType 前端传 “null” 无办法 |
| | | * @param componsationType |
| | | * @return |
| | | */ |
| | | @GetMapping(UrlConstants.STATE_SETTLEMENT_GENERATE_SETTLE_BATCH) |
| | |
| | | public AjaxResult<List<String>> listBatchName(@RequestParam String projectId) { |
| | | return AjaxResult.success(settlementService.listBatchName(projectId)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |