Browse Source

优化

master
dimengzhe 2 years ago
parent
commit
3a694053ce
  1. 4
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finselectedreceivablesdetailed/FinSelectReceivablesDetailedVo.java
  2. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finselectedreceivablesdetailed/FinSelectedReceivablesPaymentDetailsQuery.java
  3. 2
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/DetailsOfReceivablesAndUncollectedItemsVo.java
  4. 5
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  5. 3
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml
  6. 51
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedService.java
  7. 4
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/finance/collectionConfirm/ReceivablesPaymentDetailsQuery.java

4
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finselectedreceivablesdetailed/FinSelectReceivablesDetailedVo.java

@ -50,7 +50,9 @@ public class FinSelectReceivablesDetailedVo implements Vo {
private int subscribedOf;
private String subscriptionMoney;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("认款申请日期")
private String subscriptionDate;
}

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finselectedreceivablesdetailed/FinSelectedReceivablesPaymentDetailsQuery.java

@ -4,6 +4,8 @@ import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @description: 已认款查询
* @author: dimengzhe
@ -31,4 +33,7 @@ public class FinSelectedReceivablesPaymentDetailsQuery implements Query {
private String name;
@ApiModelProperty("应收款项sid")
private List<String> sids;
}

2
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailed/DetailsOfReceivablesAndUncollectedItemsVo.java

@ -69,7 +69,7 @@ public class DetailsOfReceivablesAndUncollectedItemsVo implements Vo {
@ApiModelProperty("当前应收金额")
private String currentReceivableMoney; // 当前应收金额
@ApiModelProperty("应收金额")
@ApiModelProperty("剩余应收金额")
private String reveivableMoney;
@ApiModelProperty("业务车辆sid")
private String busVinSid;

5
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -1130,8 +1130,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
}
}
if (StringUtils.isNotBlank(pagerQuery.getParams().getName())) {
List<AppFinUncollectedReceivablesDetailedVo> cll = collList.stream().filter(v -> v.getVin().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
collList = Stream.of(collList, cll).flatMap(Collection::stream).collect(Collectors.toList());
collList = collList.stream().filter(v -> v.getVin().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
// List<AppFinUncollectedReceivablesDetailedVo> cll = collList.stream().filter(v -> v.getVin().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
// collList = Stream.of(collList, cll).flatMap(Collection::stream).collect(Collectors.toList());
}
}
//将collList根据sid去重

3
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedMapper.xml

@ -304,7 +304,8 @@
furd.payType,
furd.payTypeKey,
fd.subscriptionMoney,
fd.useOrgSid
fd.useOrgSid,
fd.subscriptionDate
from fin_selected_receivables_detailed fd
left join fin_uncollected_receivables_detailed furd on furd.sid = fd.receivablesSid
<where>

51
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finselectedreceivablesdetailed/FinSelectedReceivablesDetailedService.java

@ -34,8 +34,6 @@ import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.fin.api.fincollectionconfirmation.AppFinSelectedReceivablesPaymentDetailsQuery;
import com.yxt.anrui.fin.api.fincollectionconfirmation.AppFinSelectedReceivablesPaymentDetailsVo;
import com.yxt.anrui.fin.api.fincollectionconfirmation.FinCollectionConfirmation;
import com.yxt.anrui.fin.api.fincollectionconfirmation.FinCollectionConfirmationJYDDKYDJVo;
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.AppBusArrearsCarryMoneyVo;
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.*;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.AppFinUncollectedReceivablesDetailedVo;
@ -53,9 +51,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* Project: anrui-fin(销售相关) <br/>
@ -360,12 +360,23 @@ public class FinSelectedReceivablesDetailedService extends MybatisBaseService<Fi
if (StringUtils.isNotBlank(userSid)) {
qw.eq("fd.createBySid", userSid);
}
//查询没有认完的车辆sid
/* List<String> stringList = baseMapper.selectUnSelectList(pagerQuery.getParams().getPurchaseSystemSid(),userSid,useOrgSid);
stringList.removeAll(Collections.singleton(null));
if(!stringList.isEmpty()){
qw.notIn("receivablesSid",stringList);
}*/
List<String> sids = pagerQuery.getParams().getSids();
if (sids != null) {
for (String sid : sids) {
if (StringUtils.isNotBlank(sid)) {
qw.ne("fd.sid", sid);
}
}
}
if(StringUtils.isNotBlank(params.getContractNo())){
qw.like("fd.contractNo",params.getContractNo());
}
if(StringUtils.isNotBlank(params.getCustomerName())){
qw.like("fd.customerName",params.getCustomerName());
}
if(StringUtils.isNotBlank(params.getMobile())){
qw.like("fd.customerPhone",params.getMobile());
}
List<FinSelectReceivablesDetailedVo> collList = baseMapper.selectPageList(qw, params.getName());
if (collList.isEmpty()) {
collList = baseMapper.selectPageList(qw, "");
@ -404,6 +415,9 @@ public class FinSelectedReceivablesDetailedService extends MybatisBaseService<Fi
if (StringUtils.isNotBlank(pagerQuery.getParams().getName())) {
collList = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
}
if (StringUtils.isNotBlank(pagerQuery.getParams().getVinNo())) {
collList = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getVinNo())).collect(Collectors.toList());
}
} else {
for (FinSelectReceivablesDetailedVo record : collList) {
BigDecimal currentMoney = new BigDecimal(record.getCurrentReceivableMoney());
@ -438,8 +452,14 @@ public class FinSelectedReceivablesDetailedService extends MybatisBaseService<Fi
}
}
if (StringUtils.isNotBlank(pagerQuery.getParams().getName())) {
List<FinSelectReceivablesDetailedVo> cll = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
collList = Stream.of(collList, cll).flatMap(Collection::stream).collect(Collectors.toList());
collList = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
// List<FinSelectReceivablesDetailedVo> cll = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getName())).collect(Collectors.toList());
// collList = Stream.of(collList, cll).flatMap(Collection::stream).collect(Collectors.toList());
}
if (StringUtils.isNotBlank(pagerQuery.getParams().getVinNo())) {
collList = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getVinNo())).collect(Collectors.toList());
// List<FinSelectReceivablesDetailedVo> cll = collList.stream().filter(v -> v.getVIN().contains(pagerQuery.getParams().getVinNo())).collect(Collectors.toList());
// collList = Stream.of(collList, cll).flatMap(Collection::stream).collect(Collectors.toList());
}
}
//将collList根据sid去重
@ -449,9 +469,12 @@ public class FinSelectedReceivablesDetailedService extends MybatisBaseService<Fi
collList = collList.stream().sorted(Comparator.comparing(FinSelectReceivablesDetailedVo::getContractNo).reversed()).collect(Collectors.toList());
//分页
IPage<FinSelectReceivablesDetailedVo> page1 = new Page<>();
page1.setRecords(collList);
page1.setTotal(collList.size());
page1.setPages((collList.size() / pagerQuery.getSize()) + 1);
// page1.setPages((collList.size() / pagerQuery.getSize()) + 1);
page1.setPages(collList.size()/pagerQuery.getSize()+(collList.size()%pagerQuery.getSize()==0?0:1));
collList = collList.stream().skip((pagerQuery.getCurrent() - 1) *pagerQuery.getSize()).limit(pagerQuery.getSize()).collect(Collectors.toList()); //开始分页
// collList = CollUtil.page(Integer.parseInt(String.valueOf(pagerQuery.getCurrent())), Integer.parseInt(String.valueOf(pagerQuery.getSize())), collList);
page1.setRecords(collList);
page1.setCurrent(pagerQuery.getCurrent());
page1.setSize(pagerQuery.getSize());
return page1;

4
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/finance/collectionConfirm/ReceivablesPaymentDetailsQuery.java

@ -1,5 +1,6 @@
package com.yxt.anrui.terminal.api.finance.collectionConfirm;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -17,7 +18,8 @@ public class ReceivablesPaymentDetailsQuery implements Query {
private String name;
@ApiModelProperty("明细sid")
private List<String> sidList;
@JsonProperty("sidList")
private List<String> sids;
@ApiModelProperty("分公司sid")
private String useOrgSid;

Loading…
Cancel
Save