|
|
@@ -51,6 +51,7 @@ import org.springblade.finance.vojo.ExportAccOut;
|
|
|
import org.springblade.purchase.sales.vo.SalesDetailsVo;
|
|
|
import org.springblade.system.entity.Tenant;
|
|
|
import org.springblade.system.feign.ITenantClient;
|
|
|
+import org.springblade.system.user.entity.User;
|
|
|
import org.springblade.system.user.feign.IUserClient;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -155,6 +156,7 @@ public class AccController extends BladeController {
|
|
|
.eq(acc.getCreateUser() != null, Acc::getCreateUser, acc.getCreateUser())
|
|
|
.eq(acc.getSrcParentId() != null, Acc::getSrcParentId, acc.getSrcParentId())
|
|
|
.eq(ObjectUtils.isNotNull(acc.getSrcSysno()), Acc::getSrcSysno, acc.getSrcSysno())
|
|
|
+ .eq(ObjectUtils.isNotNull(acc.getSrcRefno()), Acc::getSrcRefno, acc.getSrcRefno())
|
|
|
.eq(StringUtils.isNotBlank(acc.getDc()), Acc::getDc, acc.getDc())
|
|
|
.like(ObjectUtil.isNotEmpty(acc.getQuantity()), Acc::getQuantity, acc.getQuantity())
|
|
|
.like(ObjectUtil.isNotEmpty(acc.getSettlementAmount()), Acc::getSettlementAmount, acc.getSettlementAmount());
|
|
|
@@ -206,12 +208,21 @@ public class AccController extends BladeController {
|
|
|
acc_.setItemName("运费");
|
|
|
}
|
|
|
}
|
|
|
- //录入人
|
|
|
- acc_.setCreateUserName(iUserClient.userInfoById(acc_.getCreateUser()).getData().getRealName());
|
|
|
+ if (ObjectUtils.isNotNull(acc_.getCreateUser())) {
|
|
|
+ R<User> r = iUserClient.userInfoById(acc_.getCreateUser());
|
|
|
+ if (r.isSuccess() && ObjectUtils.isNotNull(r.getData())) {
|
|
|
+ //录入人
|
|
|
+ acc_.setCreateUserName(r.getData().getRealName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (!"064132".equals(AuthUtil.getTenantId())) {
|
|
|
- //业务员
|
|
|
if (ObjectUtils.isNotNull(acc_.getShipName())) {
|
|
|
- acc_.setShipName(iUserClient.userInfoById(Long.parseLong(acc_.getShipName())).getData().getRealName());
|
|
|
+ R<User> r = iUserClient.userInfoById(Long.parseLong(acc_.getShipName()));
|
|
|
+ if (r.isSuccess() && ObjectUtils.isNotNull(r.getData())) {
|
|
|
+ //业务员
|
|
|
+ acc_.setShipName(r.getData().getRealName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//费用名称
|
|
|
@@ -490,6 +501,8 @@ public class AccController extends BladeController {
|
|
|
.like(StringUtils.isNotBlank(acc.getBillType()), Acc::getBillType, acc.getBillType())
|
|
|
.like(StringUtils.isNotBlank(acc.getAccSysNo()), Acc::getAccSysNo, acc.getAccSysNo())
|
|
|
.like(StringUtils.isNotBlank(acc.getSrcBillNo()), Acc::getSrcBillNo, acc.getSrcBillNo())
|
|
|
+ .eq(ObjectUtils.isNotNull(acc.getSrcRefno()), Acc::getSrcRefno, acc.getSrcRefno())
|
|
|
+ .eq(ObjectUtils.isNotNull(acc.getSrcSysno()), Acc::getSrcSysno, acc.getSrcSysno())
|
|
|
.eq(acc.getCorpId() != null, Acc::getCorpId, acc.getCorpId())
|
|
|
.eq(StringUtils.isNotBlank(acc.getItemType()), Acc::getItemType, acc.getItemType())
|
|
|
.eq(StringUtils.isNotBlank(acc.getCostType()), Acc::getCostType, acc.getCostType())
|
|
|
@@ -626,10 +639,10 @@ public class AccController extends BladeController {
|
|
|
public void selBillBalanceExport(Acc acc, HttpServletResponse response) {
|
|
|
acc.setTenantId(AuthUtil.getTenantId());
|
|
|
List<Acc> list = accService.selBillBalanceExport(acc);
|
|
|
- if ("收费".equals(acc.getBillType())){
|
|
|
+ if ("收费".equals(acc.getBillType())) {
|
|
|
List<ChargeExcel> chargeExcelList = BeanUtil.copy(list, ChargeExcel.class);
|
|
|
ExcelUtil.export(response, "应收账款余额", "应收账款余额", chargeExcelList, ChargeExcel.class);
|
|
|
- }else if ("申请".equals(acc.getBillType())){
|
|
|
+ } else if ("申请".equals(acc.getBillType())) {
|
|
|
List<PayExcel> payExcelList = BeanUtil.copy(list, PayExcel.class);
|
|
|
ExcelUtil.export(response, "应付账款余额", "应付账款余额", payExcelList, PayExcel.class);
|
|
|
}
|
|
|
@@ -641,7 +654,7 @@ public class AccController extends BladeController {
|
|
|
*/
|
|
|
@GetMapping("/SelAccItem")
|
|
|
@ApiOperation(value = "应收付款明细", notes = "应收付款明细")
|
|
|
- public R<IPage<Acc>> SelAccItem(Acc acc, Query query){
|
|
|
+ public R<IPage<Acc>> SelAccItem(Acc acc, Query query) {
|
|
|
acc.setTenantId(AuthUtil.getTenantId());
|
|
|
IPage<Acc> page = accService.SelAccItem(Condition.getPage(query), acc);
|
|
|
return R.data(page);
|
|
|
@@ -652,13 +665,13 @@ public class AccController extends BladeController {
|
|
|
*/
|
|
|
@GetMapping("/SelAccItemExport")
|
|
|
@ApiOperation(value = "应收付款明细导出", notes = "应收付款明细导出")
|
|
|
- public void SelAccItemExport(Acc acc, HttpServletResponse response){
|
|
|
+ public void SelAccItemExport(Acc acc, HttpServletResponse response) {
|
|
|
acc.setTenantId(AuthUtil.getTenantId());
|
|
|
List<Acc> list = accService.SelAccItemExport(acc);
|
|
|
- if ("收费".equals(acc.getBillType())){
|
|
|
+ if ("收费".equals(acc.getBillType())) {
|
|
|
List<ChargeItemExcel> chargeItemList = BeanUtil.copy(list, ChargeItemExcel.class);
|
|
|
ExcelUtil.export(response, "应收账款明细", "应收账款明细", chargeItemList, ChargeItemExcel.class);
|
|
|
- }else if ("申请".equals(acc.getBillType())){
|
|
|
+ } else if ("申请".equals(acc.getBillType())) {
|
|
|
List<PayItemExcel> payItemList = BeanUtil.copy(list, PayItemExcel.class);
|
|
|
ExcelUtil.export(response, "应付账款明细", "应付账款明细", payItemList, PayItemExcel.class);
|
|
|
}
|
|
|
@@ -712,6 +725,7 @@ public class AccController extends BladeController {
|
|
|
.eq(StringUtils.isNotBlank(acc.getCostType()), Acc::getCostType, acc.getCostType())
|
|
|
.eq(acc.getCreateUser() != null, Acc::getCreateUser, acc.getCreateUser())
|
|
|
.eq(acc.getSrcParentId() != null, Acc::getSrcParentId, acc.getSrcParentId())
|
|
|
+ .eq(ObjectUtils.isNotNull(acc.getSrcRefno()), Acc::getSrcRefno, acc.getSrcRefno())
|
|
|
.eq(ObjectUtils.isNotNull(acc.getSrcSysno()), Acc::getSrcSysno, acc.getSrcSysno())
|
|
|
.eq(StringUtils.isNotBlank(acc.getDc()), Acc::getDc, acc.getDc());
|
|
|
accLambdaQueryWrapper.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getCheckAmount, 0)
|
|
|
@@ -824,16 +838,19 @@ public class AccController extends BladeController {
|
|
|
.like(StringUtils.isNotBlank(acc.getDepartureHarbor()), Acc::getDepartureHarbor, acc.getDepartureHarbor())
|
|
|
.like(StringUtils.isNotBlank(acc.getPlateNo()), Acc::getPlateNo, acc.getPlateNo())
|
|
|
.like(StringUtils.isNotBlank(acc.getObjectiveHarbor()), Acc::getObjectiveHarbor, acc.getObjectiveHarbor())
|
|
|
- .eq(acc.getCorpId() != null, Acc::getCorpId, acc.getCorpId())
|
|
|
.eq(StringUtils.isNotBlank(acc.getItemType()), Acc::getItemType, acc.getItemType())
|
|
|
.eq(StringUtils.isNotBlank(acc.getCostType()), Acc::getCostType, acc.getCostType())
|
|
|
.eq(acc.getCreateUser() != null, Acc::getCreateUser, acc.getCreateUser())
|
|
|
.eq(acc.getSrcParentId() != null, Acc::getSrcParentId, acc.getSrcParentId())
|
|
|
.eq(ObjectUtils.isNotNull(acc.getSrcSysno()), Acc::getSrcSysno, acc.getSrcSysno())
|
|
|
- .eq(ObjectUtils.isNotNull(acc.getFleetId()), Acc::getFleetId, acc.getFleetId())
|
|
|
.eq(StringUtils.isNotBlank(acc.getDc()), Acc::getDc, acc.getDc())
|
|
|
.like(ObjectUtil.isNotEmpty(acc.getQuantity()), Acc::getQuantity, acc.getQuantity())
|
|
|
.like(ObjectUtil.isNotEmpty(acc.getSettlementAmount()), Acc::getSettlementAmount, acc.getSettlementAmount());
|
|
|
+ if("申请".equals(acc.getBillType())){
|
|
|
+ accLambdaQueryWrapper.eq(ObjectUtils.isNotNull(acc.getCorpId()), Acc::getFleetId, acc.getCorpId());
|
|
|
+ }else{
|
|
|
+ accLambdaQueryWrapper.eq(acc.getCorpId() != null, Acc::getCorpId, acc.getCorpId());
|
|
|
+ }
|
|
|
accLambdaQueryWrapper.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getCheckAmount, 0)
|
|
|
.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getCheckAmount, 0)
|
|
|
.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getSettlementAmount, 0)
|