Browse Source

Merge branch 'lihao'

shuiqilin
lihao 1 year ago
parent
commit
87800f8501

+ 2
- 20
src/main/java/com/qtzl/alterSales/manager/handler/AflPaccountRefundCountFindPageHandler.java View File

@@ -55,24 +55,6 @@ public class AflPaccountRefundCountFindPageHandler extends AbstractAfterSalesMan
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("查询部中心原始流水统计失败");
}
}
// private AflPaccountRefundCountFindPageViewResponse toResponse(Pagination pagination) {
// final AflPaccountRefundCountFindPageViewResponse response = new AflPaccountRefundCountFindPageViewResponse();
// BeanTools.copyProperties(pagination, response);
// if (isEmpty(pagination.getResult())) {
// return response;
// }
// response.setData(pagination.getResult(AflPaccountRefundCountVo.class));
// return response;
// }

// private Pagination select(AflPaccountRefundCountFindPageViewRequest request) throws ServiceHandleException {
// if (request.getPageSize() > 100) {
// throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("请求每页数量过大 " + request.getPageSize());
// }
// AflPaccountRefundCountFindPageRequest queryRequest = new AflPaccountRefundCountFindPageRequest();
// BeanUtil.copyProperties(request, queryRequest);
// return aflPaccountRefundCountRepo.page(queryRequest);
// }

private AflPaccountRefundCountFindPageViewResponse toResponse(Page<AflPaccountRefundCount> page, AflPaccountRefundCountFindPageViewRequest request) {
final AflPaccountRefundCountFindPageViewResponse response = new AflPaccountRefundCountFindPageViewResponse();
@@ -95,8 +77,8 @@ public class AflPaccountRefundCountFindPageHandler extends AbstractAfterSalesMan
}
return aflPaccountRefundCountRepo.findAll(((root, query, cb) -> {
List<Predicate> list = Lists.newArrayList();
if (!StringUtils.isEmpty(request.getAgentId())) {
list.add(cb.equal(root.<Integer>get("agentId"), request.getAgentId()));
if (!StringUtils.isEmpty(request.getAgencyId())) {
list.add(cb.equal(root.<Integer>get("agentId"), request.getAgencyId()));
}
if (request.getAccountDateEnd()!=null) {
list.add(cb.le(root.<Integer>get("accountDate"), request.getAccountDateEnd()));

+ 5
- 5
src/main/java/com/qtzl/alterSales/manager/model/protocol/sales/AflPaccountRefundCountFindPageViewRequest.java View File

@@ -7,7 +7,7 @@ public class AflPaccountRefundCountFindPageViewRequest extends AbstractAfterSale
/** 记账日期 */
private Integer accountDate ;
/** 渠道编号 */
private String agentId ;
private String agencyId;
/** 渠道名称 */
private String agentName ;

@@ -24,12 +24,12 @@ public class AflPaccountRefundCountFindPageViewRequest extends AbstractAfterSale
this.accountDate = accountDate;
}

public String getAgentId() {
return agentId;
public String getAgencyId() {
return agencyId;
}

public void setAgentId(String agentId) {
this.agentId = agentId;
public void setAgencyId(String agencyId) {
this.agencyId = agencyId;
}

public String getAgentName() {

+ 2
- 5
src/main/java/com/qtzl/alterSales/manager/service/AflPaccountRefundCountServiceImpl.java View File

@@ -48,9 +48,6 @@ public class AflPaccountRefundCountServiceImpl implements AflPaccountRefundCount
public String export(AflPaccountRefundCountFindPageViewRequest request, Logger logger) throws ServiceHandleException {
String pathFile =null;
try {
// AflPaccountRefundCountFindPageRequest queryRequest = new AflPaccountRefundCountFindPageRequest();
// BeanUtil.copyProperties(request, queryRequest);
// List<AflPaccountRefundCountVo> aflPaccountRefundCountVos = aflPaccountRefundCountRepo.list(queryRequest);
List<AflPaccountRefundCount> select = select(request);
List<AflPaccountRefundCountVo> aflPaccountRefundCountVos = select.stream().map(this::toVo).collect(Collectors.toList());
if (aflPaccountRefundCountVos==null||aflPaccountRefundCountVos.size()==0) {
@@ -160,8 +157,8 @@ public class AflPaccountRefundCountServiceImpl implements AflPaccountRefundCount
private List<AflPaccountRefundCount> select(AflPaccountRefundCountFindPageViewRequest request) throws ServiceHandleException {
return aflPaccountRefundCountRepo.findAll(((root, query, cb) -> {
List<Predicate> list = Lists.newArrayList();
if (!StringUtils.isEmpty(request.getAgentId())) {
list.add(cb.equal(root.<Integer>get("agentId"), request.getAgentId()));
if (!StringUtils.isEmpty(request.getAgencyId())) {
list.add(cb.equal(root.<Integer>get("agentId"), request.getAgencyId()));
}
if (request.getAccountDateEnd()!=null) {
list.add(cb.le(root.<Integer>get("accountDate"), request.getAccountDateEnd()));

Loading…
Cancel
Save