Helius
2021-12-30 21465c793eb6f703c62fd238a8f7e185020350fa
merge score_shop
17 files modified
131 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java 19 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java 12 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java 15 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java 5 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml 7 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html 4 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html 16 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html 6 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-meidu.html 8 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html 16 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -124,9 +124,28 @@
        List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(id);
        if (CollUtil.isNotEmpty(beauticianStateList)) {
            for (SysBeauticianState sysBeauticianState : beauticianStateList) {
                SysProjUse item = sysBeauticianState.getProjUse();
                // 若项目/套餐无效,则打印时,不显示余次
                if ("无效".equals(item.getStatus())) {
                    item.setRemainCount(item.getSurplusCount());
                } else {
                    item.setRemainCount(null);
                }
                if (sysBeauticianState.getProjUse().getTaocanId() != null) {
                    SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId());
                    if ("无效".equals(sysProjUse.getStatus())) {
                        item.setRemainCount(sysProjUse.getSurplusCount());
                    } else {
                        item.setRemainCount(null);
                    }
                    sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName()+"--"+sysBeauticianState.getProjInfo().getName());
                    if ("Y".equals(sysProjUse.getIsCourse()) && "Y".equals(sysProjUse.getIsInfinite())) {
                        int count = projUseService.findTaocanCountForCourseAndInfinite(sysBeauticianState.getProjUse().getTaocanId(), projServices.getVipId());
                        item.setRemainCount(count);
                    }
                }
            }
        }
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java
@@ -143,6 +143,18 @@
    @Extend
    private String updateRemark;
    /**
     * 套餐/项目剩余次数
     */
    private Integer remainCount;
    public Integer getRemainCount() {
        return remainCount;
    }
    public void setRemainCount(Integer remainCount) {
        this.remainCount = remainCount;
    }
    public Long getOrderId() {
        return orderId;
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
@@ -134,4 +134,6 @@
    Integer selectProjUseFlowTotal(@Param("record") SysProjUseFlow projUseFlow);
    List<SysProjUse> selectTaoCanListWithProj(@Param("record") SysProjUse sysProjUse);
    int selectTaocanCountForCourseAndInfinite(@Param("taocanId") Long taocanId, @Param("vipId") Long vipId);
}
zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
@@ -143,4 +143,6 @@
    public List<SysProjUse> selectTaocanProjUse(Long id, String status);
    public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse);
    int findTaocanCountForCourseAndInfinite(Long taocanId, Long vipId);
}
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
@@ -608,4 +608,9 @@
    public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse) {
        return sysProjUseDao.selectTaoCanListWithProj(sysProjUse);
    }
    @Override
    public int findTaocanCountForCourseAndInfinite(Long taocanId, Long vipId) {
        return sysProjUseDao.selectTaocanCountForCourseAndInfinite(taocanId, vipId);
    }
}
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java
@@ -152,12 +152,23 @@
        shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
        List<ShopOrderDetails> details = new ArrayList<>();
        // 是否包含实物商品
        boolean hasRealGoods = false;
        Integer orderCount = 0;
        for (OrderItemDto orderItemDto : shopOrderDto.getOrderItemList()) {
            ShopOrderDetails shopOrderDetails = new ShopOrderDetails();
            shopOrderDetails.setCreateBy(AppConstance.SYSTEM_USER);
            shopOrderDetails.setUpdateBy(AppConstance.SYSTEM_USER);
            shopOrderDetails.setpId(orderItemDto.getProductId());
            if (!hasRealGoods) {
                ShopProduct shopProduct = shopProductDao.selectById(orderItemDto.getProductId());
                if (shopProduct.getIsUnrealProduct() == 2) {
                    hasRealGoods = true;
                }
            }
            shopOrderDetails.setsId(orderItemDto.getSkuId());
            shopOrderDetails.setCount(orderItemDto.getCount());
            if(ShopOrderDetails.PAYTYPE_MICRO==orderItemDto.getPayType()){
@@ -198,6 +209,10 @@
        shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS);
        //购买方式
        shopOrder.setShippingMethod(shopOrderDto.getDeliverySelect());
        // 客户选择的物流配送,且没有实物产品(全是虚拟产品), 则直接门店自提,无需填写配送单
        if (ShopOrder.SHIPPING_METHOD_WL == shopOrderDto.getDeliverySelect() && !hasRealGoods) {
            shopOrder.setShippingMethod(ShopOrder.SHIPPING_METHOD_MDZT);
        }
        //生成订单号
        shopOrder.setOrderNo(WxUtils.getOrderNum());
        //设置支付状态
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
@@ -272,6 +272,9 @@
    private Long companyId;
    /**
     * 是否虚拟产品 1/是 2/否
     */
    private Integer isUnrealProduct;
}
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -944,4 +944,8 @@
        </if>
    </select>
    <select id="selectTaocanCountForCourseAndInfinite" resultType="java.lang.Integer">
        select count(1) from sys_proj_use
        where taocan_id=#{taocanId} and vip_id=#{vipId}
    </select>
</mapper>
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
@@ -45,6 +45,7 @@
        <result property="ableScorePay" column="able_score_pay"/>
        <result property="ableSales" column="able_sales"/>
        <result property="scoreCategoryId" column="score_category_id"/>
        <result property="isUnrealProduct" column="is_unreal_product"/>
        <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById"
                     column="{id=couponId}"></association>
@@ -123,6 +124,7 @@
            company_id,
        able_score_pay,
        able_sales,
        is_unreal_product,
        score_category_id
    </sql>
@@ -162,6 +164,7 @@
            #{item.companyId},
            #{item.ableScorePay},
            #{item.ableSales},
            #{item.isUnrealProduct},
            #{item.scoreCategoryId}
    </sql>
@@ -554,6 +557,9 @@
            <if test="record.scoreCategoryId != null and record.scoreCategoryId ">
               score_category_id = #{record.scoreCategoryId},
            </if>
            <if test="record.isUnrealProduct != null and record.isUnrealProduct">
                is_unreal_product = #{record.isUnrealProduct},
            </if>
        </set>
        WHERE id=#{record.id}
@@ -909,6 +915,7 @@
            a.able_score_pay,
            a.able_sales,
            a.score_category_id,
            a.is_unreal_product,
            (SELECT SUM(s.stock) from shop_sku  s where s.p_id = a.id) as stockNum,
            (SELECT ROUND(SUM(s.stock),2) from shop_sku  s where s.p_id = a.id) as stockNum,
            shop_ids
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html
@@ -52,6 +52,10 @@
<body>
<div class="panel-body" id="app" v-cloak>
        <el-row>
                <el-card class="box-card" style="background-color: #0a628f;">
                    <div style="padding:10px;font-size: 20px;">¥{{basicdetail.balance}}</div>
                    <div>订单总金额</div>
                </el-card >
                <el-card class="box-card" style="background-color: #0f9aef;">
                    <div style="padding:10px;font-size: 20px;">¥{{basicdetail.balance}}</div>
                    <div>待计算金额</div>
@@ -148,6 +152,7 @@
                            </el-form-item>
                            <el-button type="primary" @click="search" >搜索</el-button>
                            <el-button @click="resetForm('form')">重置</el-button>
                            <el-button>导出</el-button>
                        </el-form>
                    </el-col>
                </el-row>
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html
@@ -343,7 +343,9 @@
                        }
                        _this.shfs = data.mapInfo.shfs;
                        _this.sqtj = data.mapInfo.sqtj;
                        if (!data.mapInfo.order && data.mapInfo.order != null) {
                        _this.order = data.mapInfo.order;
                        }
                    }
                });
            },
@@ -356,7 +358,7 @@
                this.pushToSelectGoods(row);
            },
            pushToSelectGoods(goods) {
                console.log(this.order)
                //判断是否被选中
                let selected = false;
                for(let i = 0; i < this.order.length; i++){
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -218,6 +218,7 @@
            userList: [],
            treeSelect : [],
            payMoneys : [],
            order:{},
            printPaper : false,
        },
        created : function() {
@@ -324,8 +325,19 @@
                        data: _this.cardInfo,
                        url: url,
                        callback: function (data) {
                            _this.order.id = data.mapInfo.orderId;
                            if (_this.printPaper) {
                                _this.$message.success(data.info);
                                _this.print();
                            } else {
                                _this.$message.success({
                                    message : data.info,
                                    duration : 1000,
                                    onClose() {
                                        _this.closeFrame();
                                    }
                                });
                            }
                            if(parent.myGrid) {
@@ -336,7 +348,7 @@
                                parent.app.vipInfoFn();
                            }
                            _this.closeFrame();
                            // _this.closeFrame();
                        }
                    });
                }
@@ -354,7 +366,7 @@
                        maxmin: true,
                        content: [basePath + '/admin/order/printOrder?id=' + this.order.id],
                        cancel: function (index, layero) {
                            _this.closeFram();
                            _this.closeFrame();
                        }
                    });
                } else {
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -1103,6 +1103,7 @@
                                //结算打印提示
                                if (submitType == 1) {
                                    if (_this.printPaper) {
                                        _this.$message.success(data.info);
                                        _this.print();
                                    } else {
                                        _this.$message.success({
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html
@@ -32,7 +32,7 @@
        <h1   style="text-align: center;font-size: 18px;margin: 20px auto;">
            {{order.shopName}}
        </h1>
        <table style="width: 100%; font-size:12px;line-height: 20px;">
        <table style="width: 100%; font-size:12px;">
            <tr>
                <td colspan="2">
@@ -56,7 +56,7 @@
            </tr>
        </table>
        <p>--------------------------------</p>
        <table style="width: 80%;font-size:12px;margin-top: 20px;text-align: left">
        <table style="width: 80%;font-size:12px;margin-top: 10px;text-align: left; margin-bottom: 5px;">
            <tr>
                <th style="text-align: left;"  colspan="4">产品</th>
@@ -89,7 +89,7 @@
            </tr>
        </table>
        <p>--------------------------------</p>
        <table style="width: 100%;font-size: 10px;line-height: 30px;">
        <table style="width: 100%;font-size: 10px; margin-bottom: 5px;">
            <tr  >
                <td>
                    <b  >储值卡余额:</b><span >{{totalMoney}}</span>
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-meidu.html
@@ -30,7 +30,7 @@
        <h1   style="text-align: center;font-size:18px;margin: 20px auto;">
            {{projService.shopName}}
        </h1>
        <table style="width: 100%; font-size:10px;line-height: 20px;">
        <table style="width: 100%; font-size:10px;">
            <tr>
                <td colspan="2">
@@ -53,7 +53,7 @@
                </td>
            </tr>
        </table>
        <table style="width: 80%;font-size:10px;margin-top: 20px;text-align: left">
        <table style="width: 80%;font-size:10px;margin-top: 10px;text-align: left; margin-bottom: 5px;">
            <tr>
                <th style="text-align: left;"  colspan="4">产品</th>
            </tr>
@@ -70,12 +70,12 @@
                <tr  >
                    <td>{{item.count }}</td>
                    <td>{{item.projUse.price }}</td>
                    <td >{{item.projUse.surplusCount }}</td>
                    <td >{{item.projUse.remainCount == null ? "-" : item.projUse.remainCount}}</td>
                    <td>{{item.beautiStaffInfo?item.beautiStaffInfo.suName:''}}</td>
                </tr>
            </template>
        </table>
        <table style="width: 100%;font-size: 10px;line-height: 30px;">
        <table style="width: 100%;font-size: 10px; margin-bottom: 5px;">
            <tr>
                <td>
                    <b>本次划扣:</b> <span >{{projService.money}}</span>
zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
@@ -722,8 +722,8 @@
                if(zjw != null && zjh != null){
                    cNode.nodeStyleStr = '{"width":"'+zjw+'px","height":"'+zjh+'px"}';
                }
                if(this.interval != null && this.previousMargin != null && this.nextMargin != null){
                    cNode.nodeAttribute = '{"interval":'+this.interval+',"previous-margin":'+this.previousMargin+',"next-margin":'+this.nextMargin+'}';
                if(this.interval != null && this.previousMargin != null && this.nextMargin != null && this.interval != '' && this.previousMargin != '' && this.nextMargin != ''){
                    cNode.nodeAttribute = '{\"interval\":'+this.interval+',\"previous-margin\":'+this.previousMargin+',\"next-margin\":'+this.nextMargin+'}';
                }
                if (cNode.nodeStyleStr != null && cNode.nodeStyleStr.length > 1) {
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
@@ -196,6 +196,22 @@
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否虚拟产品
                                </label>
                                <div class="col-sm-4">
                                    <select th:field="${obj.isUnrealProduct}" class="form-control select2 " size="1"
                                            name="isUnrealProduct"
                                            style="width: 100%">
                                        <option value="2" th:selected="${obj.isUnrealProduct == '2'}">否</option>
                                        <option value="1" th:selected="${obj.isUnrealProduct == '1'}">是</option>
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>