Commit 1c030b6c authored by huyuchen's avatar huyuchen

优化修改

parent 6f265a18
......@@ -126,8 +126,8 @@ public class TEmpChangeInfoController {
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page,@RequestParam(required = false) String departName
, @RequestParam(required = false) String customerId) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId));
, @RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId,flag));
}
/**
......
......@@ -70,5 +70,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
R<List<TCustomerInfo>> getAllUint(String customerName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId,String flag);
}
......@@ -315,12 +315,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId);
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId,flag);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId) {
private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(deptName)) {
wrapper.like(TSettleDomain::getDepartName, deptName);
......@@ -329,7 +329,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
wrapper.eq(TSettleDomain::getCustomerId, customerId);
}
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
if (Common.isEmpty(flag)) {
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