liujie
2025-11-19 7cbdb488dba7018984e19dde8be9c459a5bf3eaf
UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/IncomeServiceImpl.java
@@ -77,7 +77,7 @@
     * @throws Exception
     */
    @Override
    public void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money) throws Exception {
    public void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money,String orgReqSeqId) throws Exception {
        Income income = new Income();
        income.setUserType(userType);
        income.setObjectId(objectId);
@@ -87,6 +87,7 @@
        income.setMoney(new BigDecimal(money).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
        income.setInsertTime(new Date());
        income.setActivityType(2);
        income.setOrgReqSeqId(orgReqSeqId);
        this.insert(income);
    }
@@ -405,11 +406,11 @@
            BigDecimal multiply1 = new BigDecimal(payMoney).multiply(new BigDecimal(percent / 100));
            //抽成金额小于最低金额,司机收入为0
            if(multiply1.compareTo(new BigDecimal(d)) < 0){
                saveData(1, 1, 2, orderId, orderType, d);
                saveData(1, 1, 2, orderId, orderType, d,null);
                //司机收入
                BigDecimal subtract = new BigDecimal(payMoney).subtract(new BigDecimal(d));
                if(subtract.compareTo(BigDecimal.ZERO) > 0){
                    saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue());
                    saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null);
                    return subtract;
                }
                return new BigDecimal(0);
@@ -417,15 +418,15 @@
            if(multiply1.compareTo(new BigDecimal(d)) >= 0 && multiply1.compareTo(new BigDecimal(g)) < 0){
                //司机收入
                BigDecimal subtract = new BigDecimal(payMoney).subtract(multiply1);
                saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue());
                saveData(1, 1, 2, orderId, orderType, multiply1.doubleValue());
                saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null);
                saveData(1, 1, 2, orderId, orderType, multiply1.doubleValue(),null);
                return subtract;
            }
            if(multiply1.compareTo(new BigDecimal(g)) >= 0){
                //司机收入
                BigDecimal subtract = new BigDecimal(payMoney).subtract(new BigDecimal(g));
                saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue());
                saveData(1, 1, 2, orderId, orderType, g);
                saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null);
                saveData(1, 1, 2, orderId, orderType, g,null);
                return subtract;
            }
        }