Helius
2021-04-09 907bfd7ec81eb7d13dad7da5f7d1e0306368ad28
modify tj
5 files modified
60 ■■■■ changed files
zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java 22 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml 6 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml 24 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html 4 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html 4 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java
@@ -40,6 +40,12 @@
    @ApiModelProperty(value = "卡项业绩")
    private BigDecimal cardAchieve;
    @ApiModelProperty(value = "储值卡本金扣款")
    private BigDecimal cardAmount;
    @ApiModelProperty(value = "储值卡增金扣款")
    private BigDecimal cardFreeAmount;
    @ApiModelProperty(value = "退款")
    private BigDecimal refund;
@@ -297,4 +303,20 @@
    public void setTimeLength(BigDecimal timeLength) {
        this.timeLength = timeLength;
    }
    public BigDecimal getCardAmount() {
        return cardAmount;
    }
    public void setCardAmount(BigDecimal cardAmount) {
        this.cardAmount = cardAmount;
    }
    public BigDecimal getCardFreeAmount() {
        return cardFreeAmount;
    }
    public void setCardFreeAmount(BigDecimal cardFreeAmount) {
        this.cardFreeAmount = cardFreeAmount;
    }
}
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -920,15 +920,13 @@
    <select id="selectUserAchieveByTime" resultType="com.matrix.system.app.vo.UserAchieveVo">
        select
            sale_id id,
            (select ifnull(sum(case b.pay_method when '现金' then goods_cash else 0 end),0)
            (select ifnull(sum(case pay_method when '现金' then goods_cash else 0 end),0)
                from achieve_new a
                inner join sys_order_item b on a.order_item_id=b.ID
            where a.beault_id=#{userId}
            and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d'))
            ) orderCash,
            (select ifnull(sum(case b.pay_method when '划扣' then goods_cash else 0 end),0)
            (select ifnull(sum(case pay_method when '划扣' then goods_cash else 0 end),0)
                from achieve_new a
                inner join sys_order_item b on a.order_item_id=b.ID
            where  a.beault_id=#{userId}
            and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d'))
            ) cash,
zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
@@ -636,7 +636,7 @@
                    )totalPay,
                (select IFNULL(sum(a.amount),0) from sys_order_flow a
                    inner join sys_order b on a.order_id=b.id and b.statu!='已取消'
                    where a.pay_method not in ('储值卡', '欠款') and a.flow_type != '退款' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
                    where a.pay_method not in ('储值卡', '欠款') and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
                    <if test="shopId != null">
                        and a.shop_id=#{shopId}
                    </if>
@@ -716,6 +716,28 @@
                        and a.company_id=#{companyId}
                    </if>
                ) refund,
                (select sum(IFNULL(amount, 0))
                    from sys_order_flow a
                    inner join sys_order b on a.order_id=b.id and b.STATU!='已取消'
                    where a.pay_method='储值卡' and a.is_gift='N' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
                    <if test="shopId != null">
                        and a.shop_id=#{shopId}
                    </if>
                    <if test="companyId != null">
                        and a.company_id=#{companyId}
                    </if>
                ) cardAmount,
                (select sum(IFNULL(amount, 0))
                    from sys_order_flow a
                    inner join sys_order b on a.order_id=b.id and b.STATU!='已取消'
                    where a.pay_method='储值卡' and a.is_gift='Y' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]>
                    <if test="shopId != null">
                        and a.shop_id=#{shopId}
                    </if>
                    <if test="companyId != null">
                        and a.company_id=#{companyId}
                    </if>
                ) cardFreeAmount,
                (select IFNULL(count(1),0) from sys_order
                    where STATU in ('已付款', '欠款') and orderType=1 and <![CDATA[ ORDER_TIME > #{item.beginTime} and ORDER_TIME < #{item.endTime} ]]>
                    <if test="shopId != null">
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
@@ -690,7 +690,9 @@
                    callback: function (data) {
                        _this.isRefund = false;
                        _this.dialogSettleVisible = false;
                        _this.queryOrderDetailData(_this.data.oldOrderId);
                        var param = {};
                        param.id = _this.data.oldOrderId;
                        _this.queryOrderDetailData(param);
                    }
                });
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
@@ -710,7 +710,9 @@
                    callback: function (data) {
                        _this.isRefund = false;
                        _this.dialogSettleVisible = false;
                        _this.queryOrderDetailData(_this.data.oldOrderId);
                        var param = {};
                        param.id = _this.data.oldOrderId;
                        _this.queryOrderDetailData(param);
                    }
                });