bug修复
This commit is contained in:
parent
ee8255d465
commit
6e27be0849
|
|
@ -1,6 +1,9 @@
|
||||||
package com.bonus.material.basic.controller;
|
package com.bonus.material.basic.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
|
import com.bonus.common.biz.config.ListPagingUtil;
|
||||||
|
import com.bonus.common.core.utils.ServletUtils;
|
||||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
|
@ -112,9 +115,10 @@ public class BmReportController extends BaseController {
|
||||||
@GetMapping("/getLeaseOutList")
|
@GetMapping("/getLeaseOutList")
|
||||||
public AjaxResult getLeaseOutList(LeaseOutInfo bean) {
|
public AjaxResult getLeaseOutList(LeaseOutInfo bean) {
|
||||||
bean.setIsExport(1);
|
bean.setIsExport(1);
|
||||||
startPage();
|
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||||
|
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||||
List<LeaseOutInfo> pageList = bmReportService.getLeaseOutList(bean);
|
List<LeaseOutInfo> pageList = bmReportService.getLeaseOutList(bean);
|
||||||
return AjaxResult.success(getDataTable(pageList));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, pageList));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.material.basic.service.impl;
|
package com.bonus.material.basic.service.impl;
|
||||||
|
|
||||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.material.basic.domain.report.*;
|
import com.bonus.material.basic.domain.report.*;
|
||||||
import com.bonus.material.basic.mapper.BmReportMapper;
|
import com.bonus.material.basic.mapper.BmReportMapper;
|
||||||
|
|
@ -11,6 +12,7 @@ import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName BmReportServiceImpl
|
* @ClassName BmReportServiceImpl
|
||||||
|
|
@ -95,6 +97,16 @@ public class BmReportServiceImpl implements BmReportService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//模糊查询
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
||||||
|
String keyWord = bean.getKeyWord();
|
||||||
|
// 如果关键字不为空,进行过滤
|
||||||
|
if (!StringUtils.isBlank(keyWord)) {
|
||||||
|
list = list.stream()
|
||||||
|
.filter(item -> containsKeyword(item, keyWord))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (bean.getIsExport() == 0) {
|
if (bean.getIsExport() == 0) {
|
||||||
LeaseOutInfo info = new LeaseOutInfo();
|
LeaseOutInfo info = new LeaseOutInfo();
|
||||||
info.setLeaseNum(totalLeaseNum);
|
info.setLeaseNum(totalLeaseNum);
|
||||||
|
|
@ -105,6 +117,14 @@ public class BmReportServiceImpl implements BmReportService {
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
private boolean containsKeyword(LeaseOutInfo item, String keyWord) {
|
||||||
|
return (item.getTypeName() != null && item.getTypeName().contains(keyWord)) ||
|
||||||
|
(item.getTypeModelName() != null && item.getTypeModelName().contains(keyWord)) ||
|
||||||
|
(item.getLeaseUnitName() != null && item.getLeaseUnitName().contains(keyWord)) ||
|
||||||
|
(item.getCode() != null && item.getCode().contains(keyWord)) ||
|
||||||
|
(item.getLeaseProjectName() != null && item.getLeaseProjectName().contains(keyWord)) ||
|
||||||
|
(item.getLeasePersonName()!= null && item.getLeasePersonName().contains(keyWord));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领料出库报表查询详情
|
* 领料出库报表查询详情
|
||||||
|
|
|
||||||
|
|
@ -117,16 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND a.type_id = lad.type_id
|
AND a.type_id = lad.type_id
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
<if test="keyWord != null and keyWord != ''">
|
|
||||||
AND (
|
|
||||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
|
||||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
|
||||||
OR bu.unit_name LIKE CONCAT('%', #{keyWord}, '%')
|
|
||||||
OR bp.pro_name LIKE CONCAT('%', #{keyWord}, '%')
|
|
||||||
OR lai.create_by LIKE CONCAT('%', #{keyWord}, '%')
|
|
||||||
OR lai.`code` LIKE CONCAT('%', #{keyWord}, '%')
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue