| | |
| | | |
| | | private String payMethod; |
| | | |
| | | private String cateName; |
| | | |
| | | public String getCateName() { |
| | | return cateName; |
| | | } |
| | | |
| | | public void setCateName(String cateName) { |
| | | this.cateName = cateName; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getPuseId()); |
| | | |
| | | ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(sysProjUse.getProjId()); |
| | | SysOrderItem orderItem = sysOrderItemService.findById(sysProjUse.getOrderItemId()); |
| | | SysOrderItem item = sysOrderItemService.findById(sysProjUse.getOrderItemId()); |
| | | SysOrder orderItem = sysOrderService.findById(item.getOrderId()); |
| | | if ("购买".equals(sysProjUse.getSource())) { |
| | | // 如果用户有欠款,服务单总价不能超过已付金额 |
| | | if (orderItem!=null && orderItem.getArrears() > 0) { |
| | |
| | | double money = MoneyUtil.sub((bj - orderItem.getArrears()), (yxfje + bcxfje)); |
| | | // 如果 已付金额 - (已消费金额+本次消费金额)<0 则不能再消费 |
| | | if (money < 0) { |
| | | return new VerifyResult(true, shoppingGoods.getName() + "存在欠款" + orderItem.getArrears() + "元 , 订单编号[ " + sysOrderService.findById(orderItem.getOrderId()).getOrderNo() + " ] "); |
| | | return new VerifyResult(true, shoppingGoods.getName() + "存在欠款" + orderItem.getArrears() + "元 , 订单编号[ " + orderItem.getOrderNo() + " ] "); |
| | | } |
| | | |
| | | |
| | | } |
| | | } else if ("赠送".equals(sysProjUse.getSource())) { |
| | | if (orderItem!=null &&orderItem.getArrears() > 0) { |
| | | return new VerifyResult(true, shoppingGoods.getName() + "存在欠款" + orderItem.getArrears() + "元 , 不能消费赠送项目,订单编号[ " + sysOrderService.findById(orderItem.getOrderId()).getOrderNo() + " ] "); |
| | | return new VerifyResult(true, shoppingGoods.getName() + "存在欠款" + orderItem.getArrears() + "元 , 不能消费赠送项目,订单编号[ " + orderItem.getOrderNo() + " ] "); |
| | | } |
| | | } |
| | | } |
| | |
| | | String title = "每日单据明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"年", "月", "日", "订单类型", "订单编号", "会员级别", "姓名", "项目名称", "总金额", "现金产品", "划扣", "本金消耗", "赠消", "提成", "顾问", "美疗师", "人头", "项目个数", "项目时间", "门店"}; |
| | | String[] header = {"年", "月", "日", "订单编号", "订单类型", "会员姓名", "项目名称", "订单金额", "订单业绩", "收款方式", "业绩类型", "顾问", "美疗师", "本金消耗", "赠消", "提成", "人头", "项目个数", "项目时间", "门店"}; |
| | | orderSheet.setHeaders(header); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | |
| | | temp.add(item.getYear()); |
| | | temp.add(item.getMonth()); |
| | | temp.add(item.getDay()); |
| | | temp.add(item.getOrderType()); |
| | | temp.add(item.getOrderNo()); |
| | | temp.add(item.getLevelName()); |
| | | temp.add(item.getOrderType()); |
| | | temp.add(item.getVipName()); |
| | | temp.add(item.getProName()); |
| | | temp.add(item.getZkTotal()); |
| | | temp.add(item.getGoodsCash()); |
| | | temp.add(item.getPayMethod()); |
| | | temp.add(item.getGuwen()); |
| | | temp.add(item.getMeiliao()); |
| | | temp.add(item.getHisConsume()); |
| | | temp.add(item.getFreeConsume()); |
| | | temp.add(item.getProjPercentage()); |
| | | temp.add(item.getGuwen()); |
| | | temp.add(item.getMeiliao()); |
| | | temp.add(item.getNumberOfPeople()); |
| | | temp.add(item.getProjNum()); |
| | | temp.add(item.getProjTime()); |
| | |
| | | <result property="goodsNo" column="goodsNo" /> |
| | | <result property="goodsName" column="goodsName" /> |
| | | <result property="payMethod" column="pay_method" /> |
| | | <result property="cateName" column="cateName" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | d.level_name, |
| | | c.vip_name, |
| | | e.name as pro_name, |
| | | (IFNULL(a.goods_cash,0)) as zk_total, |
| | | b.ZK_TOTAL as zk_total, |
| | | a.goods_cash, |
| | | a.his_consume, |
| | | a.free_consume, |
| | |
| | | a.number_of_people, |
| | | a.proj_num, |
| | | a.proj_time, |
| | | i.name as module_subName, |
| | | h.SHOP_NAME shop_name, |
| | | a.order_type |
| | | i.name as cateName, |
| | | h.shop_short_name shop_name, |
| | | a.order_type, |
| | | a.achieveType, |
| | | j.pay_method |
| | | from |
| | | achieve_new a |
| | | left join sys_order b on a.order_id=b.id |
| | |
| | | LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID |
| | | LEFT JOIN shopping_goods_category i ON e.cate_id = i.id |
| | | left join sys_proj_services l on a.service_order_id=l.id |
| | | left join sys_order_item j on a.order_item_id=j.ID |
| | | <where> |
| | | <if test="record!=null"> |
| | | <if |
| | |
| | | <th data-formatter="MGrid.indexfn" data-align="center" |
| | | data-width="30px" data-footer-formatter="footCountTitle">序号</th> |
| | | <th data-field="datatime">时间</th> |
| | | <th data-field="orderType">订单类型</th> |
| | | <th data-field="orderNo" data-formatter="buildOpenDetail" >订单编号</th> |
| | | <th data-field="levelName">会员级别</th> |
| | | <th data-field="vipName">姓名</th> |
| | | <th data-field="proName">项目名称</th> |
| | | <th data-field="zkTotal" data-footer-formatter="countColumn">总现金业绩 |
| | | <i data-toggle="tooltip" data-placement="top" title="总现金业绩=售卡+项目+产品" class="fa fa-question-circle"></i> |
| | | </th> |
| | | |
| | | <th data-field="cardCash" data-footer-formatter="countColumn" >售卡业绩 |
| | | <i data-toggle="tooltip" data-placement="top" title="售卡业绩:现金购买充值卡,套餐,充值的收款金额" class="fa fa-question-circle"></i> |
| | | </th> |
| | | |
| | | <th data-field="projCash" data-footer-formatter="countColumn">项目业绩 |
| | | <i data-toggle="tooltip" data-placement="top" title="项目业绩:现金购买单个项目的业绩" class="fa fa-question-circle"></i> |
| | | </th> |
| | | |
| | | <th data-field="goodsCash" data-footer-formatter="countColumn">产品业绩 |
| | | <i data-toggle="tooltip" data-placement="top" title="产品业绩:现金购买产品的业绩" class="fa fa-question-circle"></i> |
| | | </th> |
| | | |
| | | <th data-field="consume" data-footer-formatter="countColumn">余额划扣业绩 |
| | | <i data-toggle="tooltip" data-placement="top" title="余额划扣业绩:从客户的充值卡余额中划扣消费的金额" class="fa fa-question-circle"></i> |
| | | </th> |
| | | |
| | | <th data-field="orderType">订单类型</th> |
| | | <th data-field="vipName">会员姓名</th> |
| | | <th data-field="proName">产品</th> |
| | | <th data-field="cateName">产品分类</th> |
| | | <th data-field="zkTotal" data-footer-formatter="countColumn">订单金额</th> |
| | | <th data-field="goodsCash" data-footer-formatter="countColumn">订单业绩</th> |
| | | <th data-field="payMethod">收款方式</th> |
| | | <th data-field="achieveType">业绩类型</th> |
| | | <th data-field="guwen">顾问</th> |
| | | <th data-field="meiliao">美疗师</th> |
| | | <th data-field="hisConsume" data-footer-formatter="countColumn">本金消耗 |
| | | <i data-toggle="tooltip" data-placement="top" title="消耗金额:客户做服务时划扣的本金" class="fa fa-question-circle"></i> |
| | | </th> |
| | |
| | | <th data-field="projPercentage" data-footer-formatter="countColumn">服务提成 |
| | | <i data-toggle="tooltip" data-placement="top" title="服务提成:为美疗师手动设置的项目服务提成" class="fa fa-question-circle"></i> |
| | | </th> |
| | | <th data-field="guwen">顾问</th> |
| | | <th data-field="meiliao">美疗师</th> |
| | | <th data-field="numberOfPeople" data-footer-formatter="countColumn">人头</th> |
| | | <th data-field="projNum" data-footer-formatter="countColumn">项目个数</th> |
| | | <th data-field="projTime" data-footer-formatter="countColumn">项目时间</th> |