|
@@ -2,29 +2,22 @@ package com.xjrsoft.module.oa.controller;
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
-import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
-import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.xjrsoft.common.annotation.XjrLog;
|
|
import com.xjrsoft.common.annotation.XjrLog;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
-import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
|
|
import com.xjrsoft.module.oa.dto.AddOfficialDocumentReceivedHandleDto;
|
|
import com.xjrsoft.module.oa.dto.AddOfficialDocumentReceivedHandleDto;
|
|
|
import com.xjrsoft.module.oa.dto.OfficialDocumentReceivedHandlePageDto;
|
|
import com.xjrsoft.module.oa.dto.OfficialDocumentReceivedHandlePageDto;
|
|
|
import com.xjrsoft.module.oa.dto.UpdateOfficialDocumentReceivedHandleDto;
|
|
import com.xjrsoft.module.oa.dto.UpdateOfficialDocumentReceivedHandleDto;
|
|
|
-import com.xjrsoft.module.oa.entity.OfficialDocumentReceived;
|
|
|
|
|
import com.xjrsoft.module.oa.entity.OfficialDocumentReceivedHandle;
|
|
import com.xjrsoft.module.oa.entity.OfficialDocumentReceivedHandle;
|
|
|
import com.xjrsoft.module.oa.service.IOfficialDocumentReceivedHandleService;
|
|
import com.xjrsoft.module.oa.service.IOfficialDocumentReceivedHandleService;
|
|
|
import com.xjrsoft.module.oa.service.IOfficialDocumentReceivedService;
|
|
import com.xjrsoft.module.oa.service.IOfficialDocumentReceivedService;
|
|
|
import com.xjrsoft.module.oa.vo.OfficialDocumentReceivedHandlePageVo;
|
|
import com.xjrsoft.module.oa.vo.OfficialDocumentReceivedHandlePageVo;
|
|
|
import com.xjrsoft.module.oa.vo.OfficialDocumentReceivedHandleVo;
|
|
import com.xjrsoft.module.oa.vo.OfficialDocumentReceivedHandleVo;
|
|
|
-import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
-import org.camunda.bpm.engine.history.HistoricProcessInstance;
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -57,19 +50,7 @@ public class OfficialDocumentReceivedHandleController {
|
|
|
@SaCheckPermission("officialdocumentreceivedhandle:detail")
|
|
@SaCheckPermission("officialdocumentreceivedhandle:detail")
|
|
|
@XjrLog(value = "公文收文-承办表列表(分页)")
|
|
@XjrLog(value = "公文收文-承办表列表(分页)")
|
|
|
public RT<PageOutput<OfficialDocumentReceivedHandlePageVo>> page(@Valid OfficialDocumentReceivedHandlePageDto dto){
|
|
public RT<PageOutput<OfficialDocumentReceivedHandlePageVo>> page(@Valid OfficialDocumentReceivedHandlePageDto dto){
|
|
|
-
|
|
|
|
|
- MPJLambdaWrapper<OfficialDocumentReceived> queryWrapper = new MPJLambdaWrapper<>();
|
|
|
|
|
- queryWrapper
|
|
|
|
|
- .select(OfficialDocumentReceived::getId)
|
|
|
|
|
- .select(OfficialDocumentReceived.class,x -> VoToColumnUtil.fieldsToColumns(OfficialDocumentReceived.class).contains(x.getProperty()))
|
|
|
|
|
- .innerJoin(WorkflowFormRelation.class, WorkflowFormRelation::getFormKeyValue, OfficialDocumentReceived::getId)
|
|
|
|
|
- .eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
|
|
|
|
|
- .eq(StrUtil.isNotEmpty(dto.getReceivedType()), OfficialDocumentReceived::getReceivedType, dto.getReceivedType())
|
|
|
|
|
- .like(StrUtil.isNotEmpty(dto.getReceivedTitle()), OfficialDocumentReceived::getReceivedTitle, dto.getReceivedTitle())
|
|
|
|
|
- .eq(ObjectUtil.isNotNull(dto.getIsHandle()), OfficialDocumentReceived::getIsHandle, dto.getIsHandle())
|
|
|
|
|
- .eq(ObjectUtil.isNotNull(dto.getIsHandle()), OfficialDocumentReceived::getIsHandle, dto.getIsHandle())
|
|
|
|
|
- .orderByDesc(OfficialDocumentReceived::getId);
|
|
|
|
|
- IPage<OfficialDocumentReceived> page = officialDocumentReceivedService.page(ConventPage.getPage(dto), queryWrapper);
|
|
|
|
|
|
|
+ Page<OfficialDocumentReceivedHandlePageVo> page = officialDocumentReceivedHandleService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
PageOutput<OfficialDocumentReceivedHandlePageVo> pageOutput = ConventPage.getPageOutput(page, OfficialDocumentReceivedHandlePageVo.class);
|
|
PageOutput<OfficialDocumentReceivedHandlePageVo> pageOutput = ConventPage.getPageOutput(page, OfficialDocumentReceivedHandlePageVo.class);
|
|
|
return RT.ok(pageOutput);
|
|
return RT.ok(pageOutput);
|
|
|
}
|
|
}
|