mitao
2025-01-15 da8bd34ef4e721b9d6255f983c68ef3975d0962d
land-admin/src/main/java/com/zzg/web/controller/state/StateProjectController.java
@@ -40,11 +40,9 @@
@RequiredArgsConstructor
public class StateProjectController {
    private final StateProjectService stateProjectService;
    private final StateProjectCollectionFileService stateProjectCollectionFileService;
    private final StateProjectNoticeService stateProjectNoticeService;
    private final StateProcessTemplateService processTemplateService;
    private final StateHouseholdService stateHouseholdService;
    // 查询所有项目
@@ -67,13 +65,12 @@
        return AjaxResult.success(stateProjectService.getPageForApplyRecord(getProjectPageBO));
    }
    // 根据ID查询项目
    @GetMapping(UrlConstants.STATE_PROJECT_GET_BY_ID)
    public AjaxResult<StateProjectBO> getById(@PathVariable String id) {
        return AjaxResult.success(stateProjectService.getProjectInfoById(id));
    }
    //获取当前项目的所有街道
    @GetMapping(UrlConstants.STATE_PROJECT_GET_STREET_BY_ID)
    public AjaxResult<String[]> getProjectBelongingStreetTownById(@PathVariable String id) {
        return AjaxResult.success(stateProjectService.getProjectBelongingStreetTownById(id));
@@ -95,8 +92,6 @@
    @PostMapping(UrlConstants.STATE_PROJECT_UPDATE_STATUS)
    @ApiOperation(value = "修改项目状态,例如转征收,并发布公告", notes = "修改项目状态,例如转征收,并发布公告")
    public AjaxResult<Boolean> update(@RequestBody UpdateProjectAndAddNoticeBO updateProjectAndAddNoticeBO) {
        if (StateProjectStatusEnum.LEVY.getKey().equals(updateProjectAndAddNoticeBO.getProjectStatus())
                || StateProjectStatusEnum.SIMULATE.getKey().equals(updateProjectAndAddNoticeBO.getProjectStatus())) {
            HouseAgreeMoveRateBO houseAgreeMoveRateBO = stateHouseholdService.currentProjectRate(updateProjectAndAddNoticeBO.getProjectId());
@@ -173,8 +168,8 @@
    public AjaxResult<Boolean> delete(@PathVariable String id) {
        return AjaxResult.success(stateProjectService.removeById(id));
    }
    // 删除项目
    // 删除项目
    @PostMapping(UrlConstants.STATE_PROJECT_SUCCESS)
    @ApiOperation(value = "将项目改为已完成", notes = "将项目改为已完成")
    public AjaxResult<Boolean> successProject(@RequestBody GetProjectPageBO getProjectPageBO) {
@@ -186,18 +181,15 @@
    @PostMapping(UrlConstants.STATE_PROJECT_APP_SUCCESS)
    @ApiOperation(value = "app将项目改为已完成", notes = "app将项目改为已完成")
    public AjaxResult<Boolean> appSuccessProject(@RequestBody GetProjectPageBO getProjectPageBO) {
        //todo接workflow 并计算金额
        return AjaxResult.success(stateProjectService.updateProjectAppStage(getProjectPageBO.getProjectId(), StateProjectStatusEnum.SUCCESS.getKey()));
    }
    @PostMapping(UrlConstants.STATE_PROJECT_NOTICE_SIMULATE)
    @ApiOperation(value = "将项目改为模拟", notes = "将项目改为模拟")
    public AjaxResult<Boolean> simulatedProject(@RequestBody GetProjectPageBO getProjectPageBO) {
        //todo接workflow 并计算金额
        stateProjectService.updateProjectAppStage(getProjectPageBO.getProjectId(), StateProjectStatusEnum.SIMULATE.getKey());
        return AjaxResult.success(stateProjectService.updateProjectStatus(getProjectPageBO.getProjectId(), StateProjectStatusEnum.SIMULATE.getKey()));
    }
    @DeleteMapping(UrlConstants.STATE_PROJECT_CANCELLATION)
    @ApiOperation(value = "作废项目", notes = "作废项目")
@@ -230,13 +222,11 @@
        return AjaxResult.success(stateProjectCollectionFileService.addCollectionFile(uploadFileBO));
    }
    @PostMapping(UrlConstants.STATE_PROJECT_NOTICE_PAGE)
    @ApiOperation(value = "分页查询公告", notes = "分页查询公告")
    public AjaxResult<Page<StateProjectNotice>> pageNotice(@RequestBody GetProjectPageBO getProjectPageBO) {
        return AjaxResult.success(stateProjectNoticeService.page(new Page<>(getProjectPageBO.getPageNum(), getProjectPageBO.getPageSize())));
    }
    @PostMapping(UrlConstants.STATE_PROJECT_NOTICE_PAGE_AFTER_UPDATE_PROJECT)
    @ApiOperation(value = "分页查询公告", notes = "分页查询公告在更新项目之后")
@@ -257,7 +247,6 @@
        return AjaxResult.success(stateProjectNoticeVO);
    }
    @DeleteMapping(UrlConstants.STATE_PROJECT_NOTICE_DELETE)
    @ApiOperation(value = "删除公告", notes = "删除公告")
    public AjaxResult<Boolean> deleteNotice(@PathVariable String id) {
@@ -276,15 +265,12 @@
        }
        //1 正常公告 2转征收的公告
        stateProjectNotice.setType(1);
        return AjaxResult.success(stateProjectNoticeService.saveOrUpdate(stateProjectNotice));
    }
    @PostMapping(UrlConstants.STATE_PROJECT_IMPL_PAGE)
    @ApiOperation(value = "项目实施查询", notes = "项目实施查询")
    public AjaxResult<PageInfo<ProjectImplPageVO>> projectImplPage(@RequestBody GetProjectPageBO getProjectPageBO) {
        return AjaxResult.success(stateProjectService.getProjectImplPage(getProjectPageBO));
    }
}