提交 1401bbd9 authored 作者: huyufan's avatar huyufan

开发:承运功能迭代

上级 f5af8da4
...@@ -11,6 +11,7 @@ import com.clx.performance.vo.app.collect.AppCollectTruckVO; ...@@ -11,6 +11,7 @@ import com.clx.performance.vo.app.collect.AppCollectTruckVO;
import com.clx.performance.vo.feign.FreightEstimateVO; import com.clx.performance.vo.feign.FreightEstimateVO;
import com.clx.performance.vo.feign.OrderGoodsFeignVO; import com.clx.performance.vo.feign.OrderGoodsFeignVO;
import com.clx.performance.vo.pc.OwnerAccountAllVO; import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.OwnerAccountArrearsVO;
import com.clx.performance.vo.pc.OwnerLoanAccountVO; import com.clx.performance.vo.pc.OwnerLoanAccountVO;
import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO; import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import com.msl.common.result.Result; import com.msl.common.result.Result;
...@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -115,4 +117,9 @@ public interface PerformanceFeign { ...@@ -115,4 +117,9 @@ public interface PerformanceFeign {
@GetMapping(value = {"clx-performance/feign/owner/loanAccount"}) @GetMapping(value = {"clx-performance/feign/owner/loanAccount"})
Result<OwnerLoanAccountVO> loanAccount(@RequestParam Long userNo); Result<OwnerLoanAccountVO> loanAccount(@RequestParam Long userNo);
@GetMapping(value = {"clx-performance/feign/owner/accountArrearsInfo"})
Result<OwnerAccountArrearsVO> accountArrearsInfo(@RequestParam(value = "userNo") Long userNo,
@RequestParam(value = "prepaidArrearsOrder") BigDecimal prepaidArrearsOrder,
@RequestParam(value = "marginArrearsOrder") BigDecimal marginArrearsOrder);
} }
package com.clx.performance.vo.pc;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.math.BigDecimal;
@Data
@Builder
public class OwnerAccountArrearsVO {
@ApiModelProperty("当前预付账户未支付订单金额")
private BigDecimal prepaidArrearsOrderSumMoney;
@ApiModelProperty("当前保证金账户未支付订单金额")
private BigDecimal marginArrearsOrderSumMoney;
@ApiModelProperty("货主用户编码")
private Long userNo;
}
...@@ -5,6 +5,7 @@ import com.clx.performance.param.pc.owner.FrozenAccountParam; ...@@ -5,6 +5,7 @@ import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam; import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.service.OwnerAccountService; import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.vo.pc.OwnerAccountAllVO; import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.OwnerAccountArrearsVO;
import com.clx.performance.vo.pc.OwnerLoanAccountVO; import com.clx.performance.vo.pc.OwnerLoanAccountVO;
import com.msl.common.result.Result; import com.msl.common.result.Result;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -13,6 +14,8 @@ import lombok.extern.slf4j.Slf4j; ...@@ -13,6 +14,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/feign/owner") @RequestMapping("/feign/owner")
...@@ -50,4 +53,14 @@ public class OwnerAccountFeignController { ...@@ -50,4 +53,14 @@ public class OwnerAccountFeignController {
public Result<OwnerLoanAccountVO> loanAccount(@RequestParam Long userNo) { public Result<OwnerLoanAccountVO> loanAccount(@RequestParam Long userNo) {
return Result.ok(ownerAccountService.loanAccount(userNo)); return Result.ok(ownerAccountService.loanAccount(userNo));
} }
@ApiOperation(value = "查询用户预付运费和保证金账户", notes = "<br>By:胡宇帆")
@GetMapping("/accountArrearsInfo")
public Result<OwnerAccountArrearsVO> accountArrearsInfo(@RequestParam(value = "userNo") Long userNo,
@RequestParam(value = "prepaidArrearsOrder") BigDecimal prepaidArrearsOrder,
@RequestParam(value = "marginArrearsOrder") BigDecimal marginArrearsOrder
) {
return Result.ok(ownerAccountService.accountArrearsInfo(userNo, prepaidArrearsOrder, marginArrearsOrder));
}
} }
...@@ -13,14 +13,12 @@ import com.clx.performance.param.pc.*; ...@@ -13,14 +13,12 @@ import com.clx.performance.param.pc.*;
import com.clx.performance.param.pc.owner.CreteAccountParam; import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.param.pc.owner.FrozenAccountParam; import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam; import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.vo.pc.OwnerAccountAllVO; import com.clx.performance.vo.pc.*;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.performance.vo.pc.OwnerLoanAccountVO;
import com.clx.user.param.pc.owner.UpdateOwnerBindCardFeignParam; import com.clx.user.param.pc.owner.UpdateOwnerBindCardFeignParam;
import com.clx.user.vo.pc.owner.OwnerBindCardVO; import com.clx.user.vo.pc.owner.OwnerBindCardVO;
import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -104,4 +102,6 @@ public interface OwnerAccountService { ...@@ -104,4 +102,6 @@ public interface OwnerAccountService {
void resetPassword(ResetPasswordParam param); void resetPassword(ResetPasswordParam param);
OwnerLoanAccountVO loanAccount(Long userNo); OwnerLoanAccountVO loanAccount(Long userNo);
OwnerAccountArrearsVO accountArrearsInfo(Long userNo, BigDecimal prepaidArrearsOrder, BigDecimal marginArrearsOrder);
} }
...@@ -43,10 +43,7 @@ import com.clx.performance.utils.excel.ExcelData; ...@@ -43,10 +43,7 @@ import com.clx.performance.utils.excel.ExcelData;
import com.clx.performance.utils.excel.ExcelField; import com.clx.performance.utils.excel.ExcelField;
import com.clx.performance.utils.excel.ExcelSheet; import com.clx.performance.utils.excel.ExcelSheet;
import com.clx.performance.utils.excel.ExcelUtil; import com.clx.performance.utils.excel.ExcelUtil;
import com.clx.performance.vo.pc.OwnerAccountAllVO; import com.clx.performance.vo.pc.*;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.performance.vo.pc.OwnerLoanAccountVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO; import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO;
import com.clx.user.enums.owner.FreezeSettingEnum; import com.clx.user.enums.owner.FreezeSettingEnum;
import com.clx.user.feign.OwnerFeign; import com.clx.user.feign.OwnerFeign;
...@@ -1257,4 +1254,22 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -1257,4 +1254,22 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
return ownerLoanAccountStruct.convert(ownerLoanAccount); return ownerLoanAccountStruct.convert(ownerLoanAccount);
} }
@Override
public OwnerAccountArrearsVO accountArrearsInfo(Long userNo, BigDecimal prepaidArrearsOrder, BigDecimal marginArrearsOrder) {
List<OwnerAccount> accountList = ownerAccountDao.listByField(OwnerAccount::getOwnerUserNo, userNo);
OwnerAccountArrearsVO build = OwnerAccountArrearsVO.builder().build();
//查询保证金和预付运费欠多少金额
for (OwnerAccount ownerAccount : accountList) {
if (ownerAccount.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.MARGIN_ACCOUNT.getCode())) {
build.setMarginArrearsOrderSumMoney(ownerAccount.getUsableBalance().subtract(marginArrearsOrder));
}
if (ownerAccount.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())) {
build.setPrepaidArrearsOrderSumMoney(ownerAccount.getUsableBalance().subtract(prepaidArrearsOrder));
}
}
return build;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论