|
@@ -176,8 +176,26 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
}
|
|
|
|
|
|
IWrapper<Contract> wrapper = getWrapper();
|
|
|
+ wrapper.in("t1", Contract::getBuyCorporationId, authIdList);
|
|
|
+
|
|
|
+ return pageCommon(dto, wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 不过滤权限的分页接口
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Page<ContractVo> getPage1(ContractSelectDto dto) {
|
|
|
+ IWrapper<Contract> wrapper = getWrapper();
|
|
|
+ return pageCommon(dto, wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页公共代码抽取
|
|
|
+ */
|
|
|
+ private Page<ContractVo> pageCommon(ContractSelectDto dto, IWrapper<Contract> wrapper) {
|
|
|
wrapper.orderByDesc("t1", Contract::getCreateTime);
|
|
|
- wrapper.eq("t1", Contract::getIsChange,"0");//列表只展示未变更得数据
|
|
|
+ wrapper.eq("t1", Contract::getIsChange, "0");//列表只展示未变更得数据
|
|
|
wrapper.between("t1", Contract::getStatus, FlowStatusEnum.DRAFT.getKey(), FlowStatusEnum.CANCELLATION.getKey() - 1);
|
|
|
if (StringUtils.isNotEmpty(dto.getStatus())) {
|
|
|
wrapper.eq("t1", Contract::getStatus, dto.getStatus());
|
|
@@ -196,8 +214,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
//过滤合同类型
|
|
|
wrapper.eq("t1.contract_type", dto.getContractType());
|
|
|
|
|
|
- wrapper.in("t1", Contract::getBuyCorporationId, authIdList);
|
|
|
-
|
|
|
Page<ContractVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
List<ContractVo> list = page.getRecords();
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|