添加员工折扣
This commit is contained in:
@@ -96,7 +96,8 @@ public class MemberController {
|
||||
// public Result returnFlow(@RequestHeader("token") String token,
|
||||
// @RequestHeader("loginName") String loginName,
|
||||
// @RequestHeader("clientType") String clientType,
|
||||
// @RequestParam("flowId") String flowId
|
||||
// @RequestParam("flowId") String flowId,
|
||||
// @RequestParam("remark") String remark
|
||||
// ){
|
||||
//
|
||||
//
|
||||
|
||||
@@ -28,4 +28,9 @@ public class OrderPo {
|
||||
private String remark;
|
||||
|
||||
|
||||
private BigDecimal discountRatio;
|
||||
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -701,4 +701,6 @@ public class MemberService {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -895,7 +895,7 @@ public class PayService {
|
||||
orderInfo.setPayAmount(ObjectUtil.isEmpty(payAmount)?orderInfo.getOrderAmount():payAmount);
|
||||
orderInfo.setDiscountAmount(ObjectUtil.isEmpty(discountAmount)?BigDecimal.ZERO:discountAmount);
|
||||
orderInfo.setStaffId(ObjectUtil.isEmpty(staff)?null:staff.getId());
|
||||
orderInfo.setDiscountRatio(ObjectUtil.isNotEmpty(payAmount)?payAmount.divide(orderInfo.getOrderAmount()).setScale(2,BigDecimal.ROUND_DOWN):null);
|
||||
orderInfo.setDiscountRatio(ObjectUtil.isNotEmpty(payAmount)?payAmount.divide(orderInfo.getOrderAmount(),2,RoundingMode.HALF_UP).setScale(2,RoundingMode.HALF_DOWN):null);
|
||||
orderInfo.setPayType("cash");
|
||||
orderInfo.setStatus("closed");
|
||||
orderInfo.setPayOrderNo("cash".concat(SnowFlakeUtil.generateOrderNo()));
|
||||
|
||||
@@ -78,7 +78,9 @@
|
||||
toi.out_number AS outNumber,
|
||||
toi.table_name AS tableName,
|
||||
toi.remark,
|
||||
toi.master_id as masterId
|
||||
toi.master_id as masterId,
|
||||
toi.discount_ratio as discountRatio,
|
||||
toi.discount_amount as discountAmount
|
||||
|
||||
|
||||
FROM
|
||||
|
||||
Reference in New Issue
Block a user