Commit bb077406 authored by huyuchen's avatar huyuchen

预派单 代码修改

parent de36924a
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller; package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel; import com.pig4cloud.plugin.excel.annotation.RequestExcel;
...@@ -117,6 +118,17 @@ public class TEmpChangeInfoController { ...@@ -117,6 +118,17 @@ public class TEmpChangeInfoController {
return R.ok(tEmpChangeInfoService.removeById(id)); return R.ok(tEmpChangeInfoService.removeById(id));
} }
/**
* 分页查询获取所有项目名称
* @param page 分页对象
* @return
*/
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page));
}
/** /**
* 获取所有项目名称 * 获取所有项目名称
* @return R * @return R
...@@ -130,7 +142,6 @@ public class TEmpChangeInfoController { ...@@ -130,7 +142,6 @@ public class TEmpChangeInfoController {
return tEmpChangeInfoService.getAllDept(); return tEmpChangeInfoService.getAllDept();
} }
/** /**
* 获取所有单位名称 * 获取所有单位名称
* @return R * @return R
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
...@@ -66,4 +68,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> { ...@@ -66,4 +68,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/ */
R<List<TCustomerInfo>> getAllUint(); R<List<TCustomerInfo>> getAllUint();
IPage<TSettleDomain> getAllDeptPage(Page page);
} }
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
...@@ -233,4 +233,23 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -233,4 +233,23 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)); List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
return R.ok(list); return R.ok(list);
} }
/**
* 分页获取所有项目名称
* @return R
* @Author huyc
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper();
return tSettleDomainService.page(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper() {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING);
return wrapper;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment