Browse Source

贸易订单新增已履约量字段

donglang 1 tháng trước cách đây
mục cha
commit
701eddf978

+ 5 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/res/OrderListResVO.java

@@ -232,4 +232,9 @@ public class OrderListResVO {
      */
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date createTime;
+
+    /**
+     * 已履约量
+     */
+    private BigDecimal dealAmount;
 }

+ 6 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTradeOrderService.java

@@ -1747,6 +1747,12 @@ public class KwoTradeOrderService {
             vo.setActualPrice(actualAmount.multiply(unitPrice).setScale(2, RoundingMode.HALF_UP)).setUnitPrice(setScale(e.getUnitPrice())).setPrice(setScale(e.getPrice())).setUnit(e.getUnit()).setUnitLabel(unitType == null ? e.getUnit() : (unitType.get(e.getUnit()) == null ? e.getUnit() : unitType.get(e.getUnit()).getLabel())).setAmount(setScale(vo.getAmount())).setEntrustAmount(setScale(e.getEntrustAmount())).setActualAmount(setScale(e.getActualAmount())).setCreateByName(Objects.isNull(userCache) ? null : userCache.getName());
             vo.setDeliveryTypeLabel(DictEnum.getLabel(DictTypeEnum.LOAD_UNLOAD_WAY.getType(), String.valueOf(e.getChargeType())));
             vo.setAddVehicles(e.getAddVehicles());
+            if (Objects.equals(e.getChargeType(), 1)) { //按装货量
+                vo.setDealAmount(e.getLoadAmount());
+            } else {
+                vo.setDealAmount(e.getUnloadAmount());
+            }
+
             loadAddress.ifPresent(d -> {
                 vo.setLoadName(d.getName());
                 vo.setLoadAddress(d.getCityName() + " " + d.getDetailAddress());