|
|
@@ -706,8 +706,27 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
.eq(OrderFee::getIsDeleted, 0)
|
|
|
);
|
|
|
|
|
|
+ StringBuilder extraAmountItemD = new StringBuilder();
|
|
|
+ StringBuilder extraAmountItemC = new StringBuilder();
|
|
|
+ for (OrderFee fee : feeList) {
|
|
|
+ if (!ObjectUtil.isEmpty(fee.getFeeId())) {
|
|
|
+ R<FeesDesc> feesMessage = feesDescClient.detail(fee.getFeeId());
|
|
|
+ if (feesMessage.isSuccess() && feesMessage.getData() != null) {
|
|
|
+ fee.setFeeName(feesMessage.getData().getCname());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (fee.getType() == 1) {
|
|
|
+ extraAmountItemD.append(fee.getFeeName()).append(":").append(fee.getAmount()).append("\n");
|
|
|
+ } else {
|
|
|
+ extraAmountItemC.append(fee.getFeeName()).append(":").append(fee.getAmount()).append("\n");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
acct.setExtraAmountD(feeList.stream().filter(e -> e.getType() == 1).reduce(BigDecimal.ZERO, (x, y) -> x.add(y.getAmount()), BigDecimal::add));
|
|
|
+ acct.setExtraAmountItemD(extraAmountItemD.toString());
|
|
|
acct.setExtraAmountC(feeList.stream().filter(e -> e.getType() == 2).reduce(BigDecimal.ZERO, (x, y) -> x.add(y.getAmount()), BigDecimal::add));
|
|
|
+ acct.setExtraAmountItemC(extraAmountItemC.toString());
|
|
|
acct.setProfit(acct.getLandAmountD().add(acct.getExtraAmountD()).subtract(acct.getLandAmountC()).subtract(acct.getExtraAmountC()));
|
|
|
if (feeList.stream().anyMatch(e -> e.getConfirmStatus() == 1)) {
|
|
|
acct.setConfirmStatus(1);
|
|
|
@@ -778,23 +797,25 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
orderAddressMapper.updateById(address);
|
|
|
}
|
|
|
|
|
|
- if (StringUtil.isNotBlank(address.getCorpName())) {
|
|
|
+ if (ObjectUtil.isNotEmpty(address.getCorpId()) && StringUtil.isNotBlank(address.getCorpName())) {
|
|
|
addressDetail.append(i).append(".").append(address.getCorpName()).append("(");
|
|
|
+ } else {
|
|
|
+ addressDetail.append(i).append(".").append("(");
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtil.isNotBlank(address.getContacts())) {
|
|
|
- addressDetail.append(address.getContacts());
|
|
|
- }
|
|
|
- if (StringUtil.isNotBlank(address.getTel())) {
|
|
|
- addressDetail.append(" ").append(address.getTel());
|
|
|
- }
|
|
|
- if (StringUtil.isNotBlank(address.getAddress())) {
|
|
|
- addressDetail.append(") ").append(address.getAddress()).append("\n");
|
|
|
- } else {
|
|
|
- addressDetail.append(") ").append("\n");
|
|
|
- }
|
|
|
-
|
|
|
- i ++;
|
|
|
+ if (StringUtil.isNotBlank(address.getContacts())) {
|
|
|
+ addressDetail.append(address.getContacts());
|
|
|
}
|
|
|
+ if (StringUtil.isNotBlank(address.getTel())) {
|
|
|
+ addressDetail.append(" ").append(address.getTel());
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(address.getAddress())) {
|
|
|
+ addressDetail.append(") ").append(address.getAddress()).append("\n");
|
|
|
+ } else {
|
|
|
+ addressDetail.append(") ").append("\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ i++;
|
|
|
}
|
|
|
|
|
|
List<CommonFile> fileList = order.getFileList();
|