From ac61bdd7a7f4834d35bf42a06bc766981f50211e Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 29 Jan 2021 20:27:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/hive2.0' into hive2.0

---
 zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html                            |   48 ++-
 zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java                       |   68 ----
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java                           |   13 
 zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java                  |    1 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html                            |   22 +
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html                        |   24 +
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java                 |   61 ----
 zq-erp/src/main/resources/config/application.properties                                              |   12 
 zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java                          |    5 
 zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html     |   17 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html |   12 
 zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml                                    |   11 
 zq-erp/src/main/java/com/matrix/system/hive/service/MoneyCardUseService.java                         |    6 
 zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java                              |   11 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml                              |    4 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml                                    |    5 
 zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java                            |   39 --
 zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java                           |    5 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java                   |    5 
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java                      |   11 
 zq-erp/src/main/resources/static/css/styleOne/style.min.css                                          |    1 
 zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java                           |   21 -
 zq-erp/src/main/java/com/matrix/system/app/dto/AddVipDto.java                                        |    2 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml                                      |   61 ++-
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java                     |  163 ++++++-----
 zq-erp/src/main/java/com/matrix/system/hive/action/TaocanController.java                             |   24 -
 /dev/null                                                                                            |   44 ---
 zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java                         |    3 
 zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java                        |    5 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java                   |   83 -----
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java                                     |   14 +
 zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java                                   |   15 +
 32 files changed, 293 insertions(+), 523 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
index 4238207..d9285cb 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -42,7 +42,6 @@
 import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -131,7 +130,7 @@
 
         if (CollectionUtils.isNotEmpty(serviceTcVos)) {
             serviceTcVos.forEach(item -> {
-                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId());
+                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus());
                 List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(sysProjUses);
                 item.setProj(taocanProj);
             });
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/AddVipDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/AddVipDto.java
index cbacf14..5c090c5 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/dto/AddVipDto.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/AddVipDto.java
@@ -20,7 +20,6 @@
     @ApiModelProperty(value = "头像")
     private String photo;
 
-    @Length(max = 10, min = 1)
     @ApiModelProperty(value = "会员编号")
     private String vipNo;
 
@@ -41,7 +40,6 @@
     @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
     private Date birthday;
 
-    @Length(max = 6,message = "资金密码为6位数")
     @ApiModelProperty(value = "资金密码", example = "123456")
     private String password;
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java
index 97cf6ed..acb73b6 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java
@@ -55,9 +55,10 @@
     @Resource
     private SysVipInfoService vipInfoService;
 
-    @Autowired
+    @Resource
     private MoneyCardUseFlowDao moneyCardUseFlowDao;
-    @Autowired
+
+    @Resource
     private   MoneyCardUseDao moneyCardUseDao;
 
 
@@ -76,20 +77,9 @@
     @RequestMapping(value = "/editFormCz")
     public String editFormCz(Long id) {
         MoneyCardUse cardUseInfo = cardUseService.findByVipId(id);
-
         if (cardUseInfo == null) {
-            cardUseInfo = new MoneyCardUse();
-            cardUseInfo.setVipId(id);
-            cardUseInfo.setCardName("储值卡");
-            cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y);
-            cardUseInfo.setRealMoney(0D);
-            cardUseInfo.setGiftMoney(0D);
-            cardUseInfo.setSource("-");
-            cardUseInfo.setFailTime(DateUtil.stringToDate("2050-01-01 00:00",DateUtil.DATE_FORMAT_MM));
-            cardUseInfo.setStatus(Dictionary.MONEYCARD_STATUS_YX);
-            moneyCardUseDao.insert(cardUseInfo);
+            cardUseInfo=vipInfoService.addVipDefaultCard(id);
         }
-
         WebUtil.getRequest().setAttribute("obj", cardUseInfo);
         return "admin/hive/beautySalon/cz-form";
     }
@@ -381,57 +371,7 @@
         return new AjaxResult(AjaxResult.STATUS_FAIL, "冻结失败");
     }
 
-    /**
-     * 退款
-     *
-     * @return
-     */
-    @RequestMapping(value = "getEffectCard")
-    public @ResponseBody
-    AjaxResult getEffectCard(MoneyCardUse moneyCardUse) {
-        AjaxResult result = AjaxResult.buildSuccessInstance("");
-        //要退款的充值卡
-        MoneyCardUse srcCardUse = cardUseService.findById(moneyCardUse.getId());
-        if (!srcCardUse.getStatus().equals(Dictionary.TAOCAN_STATUS_YX)) {
-            throw new GlobleException("不是有效充值卡");
-        }
-        //该会员是否有有效会籍卡
-        MoneyCardUse targetCardUse = cardUseService.findByVipId(moneyCardUse.getVipId());
 
-        double money = srcCardUse.getRealMoney();
 
-        if (targetCardUse != null) {
-            targetCardUse.setRealMoney(money);
-            List<MoneyCardUse> list = Arrays.asList(targetCardUse);
 
-            if (targetCardUse.getId().equals(srcCardUse.getId())) {
-                result.setInfo("会籍卡退款只能退现金");
-                result.setRows(list);
-
-            } else {
-                result.setInfo("有有效会籍卡");
-                result.setRows(list);
-            }
-        } else {
-            //无会员卡则new一个,为了把钱传递到前台
-            targetCardUse = new MoneyCardUse();
-            targetCardUse.setRealMoney(money);
-            List<MoneyCardUse> list1 = Arrays.asList(targetCardUse);
-            result.setInfo("无有效会籍卡,退现金");
-            result.setRows(list1);
-        }
-        return result;
-    }
-
-    @RequestMapping(value = "/returnMoney")
-    public @ResponseBody
-    AjaxResult returnMoney(MoneyCardUse moneyCardUse, Long hjkId, String tcRemark, Long
-            shopId, Double money
-            , String tcName) {
-        int i = cardUseService.returnMoney(moneyCardUse, hjkId);
-        if (i > 0) {
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功");
-        }
-        return new AjaxResult(AjaxResult.STATUS_FAIL, "冻结失败");
-    }
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
index 7289374..ffe1a96 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
@@ -293,16 +293,7 @@
         MoneyCardUse cardUseInfo = cardUseService.findByVipId(order.getVipId());
 
         if (cardUseInfo == null) {
-            cardUseInfo = new MoneyCardUse();
-            cardUseInfo.setVipId(order.getVipId());
-            cardUseInfo.setCardName("储值卡");
-            cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y);
-            cardUseInfo.setRealMoney(0D);
-            cardUseInfo.setGiftMoney(0D);
-            cardUseInfo.setSource("-");
-            cardUseInfo.setStatus(Dictionary.MONEYCARD_STATUS_YX);
-            cardUseInfo.setFailTime(DateUtil.stringToDate("2050-01-01 00:00",DateUtil.DATE_FORMAT_MM));
-            moneyCardUseDao.insert(cardUseInfo);
+            cardUseInfo=sysVipInfoService.addVipDefaultCard(order.getVipId());
         }
 
         //打印需求加入门店信息
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
index 47a0a16..6da4382 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -18,11 +18,8 @@
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
-import com.matrix.core.tools.DateUtil;
-import com.matrix.system.hive.pojo.TaoCanVo;
 import com.matrix.system.hive.service.*;
 import org.apache.commons.collections.CollectionUtils;
-import org.jsoup.helper.DataUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
@@ -197,7 +194,7 @@
         queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC);
         List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null);
         taoCanList.forEach(item->{
-            item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId()));
+            item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus()));
             item.setProjInfo(shoppingGoodsDao.selectById(item.getProjId()));
         });
         result.putInMap("projList", projList);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
index 1f50192..29c757c 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -168,21 +168,7 @@
         return new AjaxResult(AjaxResult.STATUS_FAIL, "项目转让失败");
     }
 
-    @RequestMapping(value = "/returnProj")
-    public @ResponseBody
-    AjaxResult returnTc(SysProjUse sysProjUse, Long moneyCardUseId, String tcRemark, Long shopId, Double money, String tcName) {
 
-        MoneyCardUse card = null;
-        if (moneyCardUseId != null) {
-            card = moneyCardUseService.findById(moneyCardUseId);
-        }
-        int i = projUseService.returnMoneyProj(sysProjUse, card, moneyCardUseId);
-        if (i > 0) {
-
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功");
-        }
-        return new AjaxResult(AjaxResult.STATUS_FAIL, "退款失败");
-    }
 
 
     /**
@@ -203,31 +189,6 @@
     }
 
 
-    /**
-     * 退款
-     *
-     * @return
-     */
-    @RequestMapping(value = "/getEffectCard")
-    public @ResponseBody
-    AjaxResult getEffectCard(SysProjUse sysProjUse) {
-        MoneyCardUse cardUse = moneyCardUseService.findByVipId(sysProjUse.getVipId());
-        double money = projUseService.getTotalMoneyProj(sysProjUse);
-        if (cardUse != null) {
-            cardUse.setRealMoney(money);
-            List<MoneyCardUse> list = new ArrayList<MoneyCardUse>();
-            list.add(cardUse);
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, "有有效会籍卡", list, null);
-        } else {
-            //无会员卡则new一个,为了把钱传递到前台
-            cardUse = new MoneyCardUse();
-            cardUse.setRealMoney(money);
-            List<MoneyCardUse> list = new ArrayList<MoneyCardUse>();
-            list.add(cardUse);
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, "无有效会籍卡", list, null);
-        }
-
-    }
 
     /**
      * 冻结会员项目
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/TaocanController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/TaocanController.java
index e221d43..ded5549 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/TaocanController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/TaocanController.java
@@ -65,7 +65,7 @@
         List<SysProjUse> projUseList =sysProjUseService.findInPage(sysProjUse,null);
         //设置套餐中的项目
         projUseList.forEach(taocanProjUse -> {
-            taocanProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(taocanProjUse.getId()));
+            taocanProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(taocanProjUse.getId(),sysProjUse.getStatus()));
         });
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, projUseList, sysProjUseService.findTotal(sysProjUse));
     }
@@ -123,21 +123,7 @@
         return new AjaxResult(AjaxResult.STATUS_FAIL, "套餐转让失败");
     }
 
-    @RequestMapping(value = "/returnTc")
-    public @ResponseBody
-    AjaxResult returnTc(SysProjUse sysProjUse, Long moneyCardUseId, String tcRemark, Long shopId, Double money, String tcName) {
 
-        System.out.println("moneyCardUseId = " + moneyCardUseId);
-        MoneyCardUse card = moneyCardUseService.findById(moneyCardUseId);
-        System.out.println("card = " + card);
-        int i = sysProjUseService.returnMoneyTc(sysProjUse, card, moneyCardUseId);
-        if (i > 0) {
-
-
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功");
-        }
-        return new AjaxResult(AjaxResult.STATUS_FAIL, "退款失败");
-    }
 
 
     /**
@@ -158,11 +144,7 @@
     }
 
 
-    /**
-     * 退款
-     *
-     * @return
-     */
+
     @RequestMapping(value = "/getEffectCard")
     public @ResponseBody
     AjaxResult getEffectCard(SysProjUse sysProjUse) {
@@ -194,7 +176,7 @@
     public String editForm(Long id) {
         if (id != null) {
             SysProjUse sysProjUse = sysProjUseService.findById(id);
-            sysProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(sysProjUse.getId()));
+            sysProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(sysProjUse.getId(), sysProjUse.getStatus()));
             WebUtil.getRequest().setAttribute("obj", sysProjUse);
         }
         return "admin/hive/vip/tc-form";
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
index 99d661c..5c37494 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
@@ -77,6 +77,11 @@
 	 * 充值卡的id
 	 */
 	private Long  goodsId;
+
+	/**
+	 * 订单ID
+	 */
+	private Long  orderId;
 			
 	
 	private Long  vipId;
@@ -88,7 +93,7 @@
 	private String  isOver;
 			
 	/**
-	 * 是会籍卡? Y 是,N否
+	 * 是默认储值卡? Y 是,N否
 	 */
 	private String  isVipCar;
 	/**
@@ -105,6 +110,14 @@
 	 */
 	private String cardName;
 
+	public Long getOrderId() {
+		return orderId;
+	}
+
+	public void setOrderId(Long orderId) {
+		this.orderId = orderId;
+	}
+
 	public String getCardName() {
 		return cardName;
 	}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java
index 7450dda..94b8b15 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java
@@ -63,6 +63,12 @@
     private Long orderItemId;
 
     /**
+     * 订单id
+     */
+    @Extend
+    private Long orderId;
+
+    /**
      * 单次扣减金额(理解为单次手工业绩)
      * =订单金额/订单数量
      * 如果是赠送则等于产品原价,业绩记录为赠销
@@ -138,6 +144,14 @@
     private String updateRemark;
 
 
+    public Long getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(Long orderId) {
+        this.orderId = orderId;
+    }
+
     public String getUpdateRemark() {
         return updateRemark;
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/MoneyCardUseService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/MoneyCardUseService.java
index cc80452..c677c7b 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/MoneyCardUseService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/MoneyCardUseService.java
@@ -93,11 +93,7 @@
      */
     public void transfer(MoneyCardUse moneyCardUse, Long vipId2, Double money);
 
-    /**
-     * 退款
-     * jyy
-     */
-    public int returnMoney(MoneyCardUse moneyCardUse, Long hjkId);
+
 
     /**
      * 设置为有效
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
index 82f5810..df034a0 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
@@ -94,12 +94,7 @@
 	public int invalidTc(SysProjUse sysProjUse);
 	
 
-	/**
-	 * 退款
-	 * @param sysProjUse
-	 * @return
-	 */
-	public int returnMoneyTc(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId);
+
 	/**
 	 * 设置为有效套餐
 	 * @param proj
@@ -134,28 +129,16 @@
 	
 
 	/**
-	 * 退款
-	 * @param sysProjUse
-	 * @return
-	 */
-	public int returnMoneyProj(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId);
-	/**
 	 * 设置为有效套餐
 	 * @param proj
 	 * @return
 	 */
 	public AjaxResult activeProj(SysProjUse proj);
-	/**
-	 * 退款项目
-	 * @param sysProjUse
-	 * @return
-	 */
-	public double getTotalMoneyProj(SysProjUse sysProjUse);
 
 
 
 	public int updateProjUseTck(SysProjUse projUse);
 
 
-	public List<SysProjUse> selectTaocanProjUse(Long id);
+	public List<SysProjUse> selectTaocanProjUse(Long id, String status);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
index 5d024d7..0d5f436 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
@@ -6,14 +6,13 @@
 import com.matrix.system.app.dto.VipInfoListDto;
 import com.matrix.system.app.vo.VipInfoDetailVo;
 import com.matrix.system.app.vo.VipInfoListVo;
+import com.matrix.system.hive.bean.MoneyCardUse;
 import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.system.hive.plugin.util.BaseServices;
 import com.matrix.system.hive.pojo.VipInfoVo;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.NoSuchAlgorithmException;
 import java.util.List;
 
 /**
@@ -22,7 +21,7 @@
  */
 public interface SysVipInfoService  extends BaseServices<SysVipInfo>{
 
-	public  int addVipDefaultCard(Long vipId);
+	public MoneyCardUse addVipDefaultCard(Long vipId);
 	/**
 	 * 新增SysVipInfo
 	 * 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java
index 4b91861..414e544 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java
@@ -42,6 +42,10 @@
     @Autowired
     private SysVipLevelDao viplevelDao;
 
+
+
+
+
     @Override
     public int add(MoneyCardUse moneyCardUse) {
 
@@ -213,64 +217,7 @@
         }
     }
 
-    //退款
-    @Override
-    public int returnMoney(MoneyCardUse moneyCardUse, Long hjkId) {
 
-
-        MoneyCardUse realObj = moneyCardUseDao.selectById(moneyCardUse.getId());
-
-        //检测商品是否已付款完成
-        if (realObj.getOrderItemId() != 1) {//不是数据迁移过来的判断付款状态
-            checkOrderStatu(realObj.getOrderItemId());
-        }
-
-        if (!realObj.getStatus().equals(Dictionary.TAOCAN_STATUS_YX)) {
-            throw new GlobleException("不是有效充值卡");
-        }
-
-        if (realObj.getSource().contains(Dictionary.TAOCAN_SOURCE_ZR)) {
-            throw new GlobleException("转让的充值卡不能退款");
-        }
-        if (realObj.getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)) {
-            throw new GlobleException("赠送的充值卡不能退款");
-        }
-
-        if (Dictionary.FLAG_YES_Y.equals(realObj.getIsVipCar())) {
-            //更新会员等级
-            realObj.getVipInfo().setLevelId(0L);
-            infoDao.update(realObj.getVipInfo());
-        }
-        StringBuilder content = new StringBuilder();
-
-        //有会籍卡退到会籍卡中,无则退了现金
-        if (hjkId != null && !hjkId.equals("")) {
-            MoneyCardUse vipCard = moneyCardUseDao.selectById(hjkId);
-            vipCard.setRealMoney(vipCard.getRealMoney() + realObj.getRealMoney());
-            moneyCardUseDao.update(vipCard);
-            content.append(realObj.getCardName() + "退款¥" + realObj.getRealMoney() + "到会籍卡")
-                    .append(vipCard.getCardName())
-                    .append(",余次:" + vipCard.getLastCountName())
-                    .append(",本金余额:" + vipCard.getRealMoney())
-                    .append(",有效期:" + DateUtil.dateToString(vipCard.getFailTime(), DateUtil.DATE_FORMAT_MM))
-                    .append(",是否赠送:" + vipCard.getSourceName());
-        } else {
-            content.append(realObj.getCardName() + "退款现金¥" + moneyCardUse.getReturnMonery() + "");
-        }
-        DecimalFormat df = new DecimalFormat("#.00");
-        double d = Double.valueOf(df.format(realObj.getRealMoney() - Double.valueOf(moneyCardUse.getReturnMonery())));
-        //退款的本金为零,状态为已退款
-        realObj.setRealMoney(d);
-        //赠送金额也清零
-        realObj.setGiftMoney(0.0);
-        if (d <= 0) {
-            realObj.setStatus(Dictionary.TAOCAN_STATUS_TK);
-        }
-        int i = moneyCardUseDao.update(realObj);
-        SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
-        //新增退款流水
-        return i;
-    }
 
     //设置为有效
     @Override
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index 8fc6d49..fc36595 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -4,7 +4,6 @@
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.dto.OrderListDto;
@@ -20,6 +19,7 @@
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
+import com.matrix.core.tools.DateUtil;
 import com.matrix.system.hive.plugin.util.MoneyUtil;
 import com.matrix.system.hive.pojo.CzXkVo;
 import com.matrix.system.hive.pojo.ShoppingCarItem;
@@ -33,12 +33,10 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpSession;
 import javax.validation.constraints.NotEmpty;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @date 2016-07-03 20:53
@@ -113,7 +111,7 @@
 
 
     @Value("${evn}")
-    private  String evn;
+    private String evn;
 
     @Autowired
     private RabiitMqTemplate rabiitMqTemplate;
@@ -147,7 +145,7 @@
 
     @Override
     public List<SysOrder> findInPage(SysOrder sysOrder, PaginationVO pageVo) {
-        if(pageVo!=null){
+        if (pageVo != null) {
             pageVo.setSort("desc");
             pageVo.setSort("orderTime");
         }
@@ -211,7 +209,7 @@
 
             // 订单欠款减去支付金额 设置实际欠款
             Double itemZkTotal = MoneyUtil.mul(item.getZkPrice(), Double.valueOf(item.getCount()));
-            zkTotal=MoneyUtil.add(zkTotal, itemZkTotal);
+            zkTotal = MoneyUtil.add(zkTotal, itemZkTotal);
             item.setStatus(orderStatus);
         }
 
@@ -222,12 +220,12 @@
         sysOrder.setCompanyId(source != null ? source.getCompanyId() : user.getCompanyId());
 
         sysOrder.setPayTime(new Date());
-        if(sysOrder.getId()==null){
+        if (sysOrder.getId() == null) {
             //新增订单
             sysOrder.setOrderNo(codeService.getOrderCode());
             sysOrderDao.insert(sysOrder);
 
-        }else{
+        } else {
             //更新订单
             sysOrderDao.update(sysOrder);
             //删除原有订单明细
@@ -269,9 +267,9 @@
             order.setArrears(0D);
 
             //发送微信公众号提醒
-            UniformMsgParam uniformMsgParam=new UniformMsgParam(order.getCompanyId(),UniformMsgParam.GZH_DDQX);
-            uniformMsgParam.put("orderId",order.getId());
-            rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString());
+            UniformMsgParam uniformMsgParam = new UniformMsgParam(order.getCompanyId(), UniformMsgParam.GZH_DDQX);
+            uniformMsgParam.put("orderId", order.getId());
+            rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, uniformMsgParam.toJSONString());
 
             return sysOrderDao.update(order);
 
@@ -296,12 +294,12 @@
 
                         // 根据订单明细判断是赠送金额购买还是本金购买
 
-                            moneyCardUseFlow.setTotal(orderItem.getCardPay());
-                            moneyCardUse.setRealMoney(MoneyUtil.add(moneyCardUse.getRealMoney(), orderItem.getCardPay()));
+                        moneyCardUseFlow.setTotal(orderItem.getCardPay());
+                        moneyCardUse.setRealMoney(MoneyUtil.add(moneyCardUse.getRealMoney(), orderItem.getCardPay()));
                         //TODO 目前无法退回到具体的赠送金额还是本金
 
                         if (!moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_YES_Y)) {
-                            if(moneyCardUse.getLastCount()!=null) {
+                            if (moneyCardUse.getLastCount() != null) {
                                 moneyCardUse.setLastCount(moneyCardUse.getLastCount() + 1);
                                 moneyCardUseFlow.setTimes(1);
                             }
@@ -316,7 +314,7 @@
                         moneyCardUseFlow.setCreateTime(new Date());
                         moneyCardUseFlow.setOperationId(user.getSuId());
                         moneyCardUseFlow.setContent(moneyCardUse.getChangeRemark());
-                        moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney());
+                        moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney());
                         moneyCardUseFlowDao.insert(moneyCardUseFlow);
                     }
                 }
@@ -484,7 +482,6 @@
     @Transactional(rollbackFor = Exception.class)
     public void updateReceiptMoney(SysOrder pageOrder) throws GlobleException {
 
-
         if (!Dictionary.ORDER_STATU_DFK.equals(pageOrder.getStatu())) {
             throw new GlobleException("该订单已经收过款,请刷新页面再试!");
         }
@@ -497,78 +494,92 @@
             sysVipInfoDao.update(vipInfo);
         }
 
+        //设置订单的成交状态
         changeOrderStatu(pageOrder);
+
         // 设置会员充值卡使用情况
         addMoneyCardUse(pageOrder);
 
-        // 新增出库单
-        addOutStore(pageOrder);
-
         // 改变客户项目套餐使用情况
         addTaocanProj(pageOrder);
+
+        // 新增出库单
+        addOutStore(pageOrder);
 
         // 设置业绩
         achieveNewService.addAchaeveByOrder(pageOrder);
 
         setShopSelCount(pageOrder);
 
-
     }
 
     /**
      * 收款改变订单状态,划扣金额
+     *
      * @author:姜友瑶
      */
     private void changeOrderStatu(SysOrder sourceOrder) {
-        int i = 1;
+
         String orderStatus = Dictionary.ORDER_STATU_YFK;
         String flowType = SysOrderFlow.FLOW_TYPE_BUY;
         double cashPayTotal = 0D;
         double cardPayTotal = 0D;
+
+        //处理支付流水
+        int flowCount = 1;
         for (SysOrderFlow flow : sourceOrder.getFlows()) {
-            flow.setFlowNo(codeService.getFlowCode() + "-" + i);
+
+            //支付内容摘要设置
             Long goodsId = sourceOrder.getItems().get(0).getGoodsId();
             ShoppingGoods goods = shoppingGoodsDao.selectById(goodsId);
             flow.setFlowContent(goods.getName() + "等" + sourceOrder.getItems().size() + "件产品");
 
+            // 若是退款,则取负数
             if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) {
                 flowType = SysOrderFlow.FLOW_TYPE_REFUND;
-                // 若是退款,则取负数
                 flow.setAmount(flow.getAmount().negate());
                 flow.setOrderId(sourceOrder.getOldOrderId());
             } else {
                 flow.setOrderId(sourceOrder.getId());
             }
 
-            flow.setVipId(sourceOrder.getVipId());
-            flow.setFlowType(flowType);
-            // 若使用储值卡付款
-            if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
-                if (flow.getCardId() != null) {
-                    MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId());
-                    cardPaySk(moneyCardUse, sourceOrder, flow);
-                    cardPayTotal += flow.getAmount().doubleValue();
-                }
-            }
-
+            //欠款处理
             if (SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod())) {
                 orderStatus = Dictionary.ORDER_STATU_QK;
                 sourceOrder.setArrears(flow.getAmount().doubleValue());
             }
 
-            if (!SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod()) && !SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
+            //统计储值卡支付
+            if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
+                if (flow.getCardId() != null) {
+                    MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId());
+                    cardPayTotal += flow.getAmount().doubleValue();
+
+                    //修改储值卡余额
+                    cardPaySk(moneyCardUse, sourceOrder, flow);
+                }else{
+                    throw new GlobleException("无效的储值卡支付方式");
+                }
+            }
+            //统计现金支付
+            if (!SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod())
+                    && !SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) {
                 cashPayTotal += flow.getAmount().doubleValue();
             }
+
+            flow.setFlowNo(codeService.getFlowCode() + "-" + flowCount);
+            flow.setVipId(sourceOrder.getVipId());
+            flow.setFlowType(flowType);
             flow.setShopId(sourceOrder.getShopId());
             flow.setCompanyId(sourceOrder.getCompanyId());
             sysOrderFlowDao.insert(flow);
-            i++;
+            flowCount++;
         }
 
+        //修改订单信息
         if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) {
             orderStatus = Dictionary.ORDER_STATU_TK;
         }
-
         // 更新收款状态
         sourceOrder.setStatu(orderStatus);
         sourceOrder.setCardPay(cardPayTotal);
@@ -606,7 +617,6 @@
     }
 
 
-
     /**
      * 使用充值卡付款操作
      *
@@ -624,9 +634,9 @@
 
         SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
 
-        MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow();
+        MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow();
         if (SysOrderFlow.IS_GIFT_Y.equals(flow.getIsGift())) {
-            if(moneyCardUse.getGiftMoney() >= flow.getAmount().doubleValue()) {
+            if (moneyCardUse.getGiftMoney() >= flow.getAmount().doubleValue()) {
                 double surplus = MoneyUtil.sub(moneyCardUse.getGiftMoney(), flow.getAmount().doubleValue());
                 moneyCardUse.setGiftMoney(surplus);
                 moneyCardUseFlow.setGiftMoney(0D - flow.getAmount().doubleValue());
@@ -634,7 +644,7 @@
                 throw new GlobleException(moneyCardUse.getCardName() + "余额不足");
             }
         } else {
-            if(moneyCardUse.getRealMoney() >= flow.getAmount().doubleValue()) {
+            if (moneyCardUse.getRealMoney() >= flow.getAmount().doubleValue()) {
                 double surplus = MoneyUtil.sub(moneyCardUse.getRealMoney(), flow.getAmount().doubleValue());
                 moneyCardUse.setRealMoney(surplus);
                 moneyCardUseFlow.setTotal(0 - flow.getAmount().doubleValue());
@@ -645,7 +655,7 @@
 
         if (moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_NO_N)) {
             //余额为0时充值卡变为无效
-            if(moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)){
+            if (moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)) {
                 moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y);
                 moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX);
             }
@@ -666,7 +676,7 @@
         moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CONSUMER);
         moneyCardUseFlow.setCreateTime(new Date());
         moneyCardUseFlow.setOperationId(user.getSuId());
-        moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney());
+        moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney());
         moneyCardUseFlowDao.insert(moneyCardUseFlow);
     }
 
@@ -740,7 +750,7 @@
             // 如果购买的是充值卡
             if (sysOrderItem.getType().equals(Dictionary.SHOPPING_GOODS_TYPE_CZK)) {
 
-                for(int i = 0; i < sysOrderItem.getCount(); i++) {
+                for (int i = 0; i < sysOrderItem.getCount(); i++) {
                     ShoppingGoods moneyCar = shoppingGoodsDao.selectById(sysOrderItem.getGoodsId());
                     MoneyCardUse moneyCardUse = new MoneyCardUse();
                     moneyCardUse.setVipId(sourceOrder.getVipId());
@@ -752,13 +762,8 @@
                     moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_GM);
                     moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX);
                     moneyCardUse.setCardName(moneyCar.getName());
-
-                    if (Dictionary.FLAG_YES.equals(moneyCar.getCarIsAll())) {
-                        moneyCardUse.setIsVipCar(Dictionary.FLAG_YES_Y);
-                    } else {
-                        // 非会籍卡
-                        moneyCardUse.setIsVipCar(Dictionary.FLAG_NO_N);
-                    }
+                    moneyCardUse.setIsVipCar(Dictionary.FLAG_NO_N);
+                    moneyCardUse.setVipId(sourceOrder.getVipId());
 
                     // 是否为赠送
                     if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_YES)) {
@@ -766,6 +771,7 @@
                     } else {
                         moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_GM);
                     }
+                    //余次处理
                     if (moneyCar.getCarUseCount() == null || moneyCar.getCarUseCount() == 0) {
                         moneyCardUse.setUseTotal(999999999);
                         moneyCardUse.setLastCount(999999999);
@@ -773,8 +779,7 @@
                         moneyCardUse.setUseTotal(moneyCar.getCarUseCount());
                         moneyCardUse.setLastCount(moneyCar.getCarUseCount());
                     }
-                    moneyCardUse.setVipId(sourceOrder.getVipId());
-
+                    //失效时间处理
                     Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null);
                     moneyCardUse.setFailTime(invalidTime);
 
@@ -824,16 +829,16 @@
             i++;
         }
 
-        boolean haQk=false;
+        boolean haQk = false;
 
         if (refundTotal == pageOrder.getArrears()) {
             haQk = true;
         }
 
         //更新收款状态
-        if(haQk){
+        if (haQk) {
             sourceOrder.setStatu(Dictionary.ORDER_STATU_YFK);
-        }else{
+        } else {
             sourceOrder.setStatu(Dictionary.ORDER_STATU_QK);
         }
 
@@ -920,7 +925,7 @@
                 if (sum < outStoreItem.getAmount()) {
                     ShoppingGoods sysGoods = shoppingGoodsDao.selectById(outStoreItem.getSkuId());
                     if (sysGoods != null) {
-                        throw new GlobleException("出库失败:【" + sysGoods.getName()+"-"+sysGoods.getCode()+  "库存不足】");
+                        throw new GlobleException("出库失败:【" + sysGoods.getName() + "库存不足】");
                     } else {
                         throw new GlobleException("出库失败没有找到出库产品");
                     }
@@ -993,7 +998,8 @@
             //综合卡中包含的项目
             List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_XM);
             assembleList.forEach(item -> {
-                createProjuseByAssemble(order, sysOrderItem, item, null);
+                //TODO 补综合卡逻辑
+                createProjuseByAssemble(order, sysOrderItem, item, null, null);
             });
 
             //处理综合卡中包含的套餐
@@ -1014,9 +1020,9 @@
      * 通过组合关系创建用户项目余次
      */
     private SysProjUse createProjuseByAssemble(SysOrder order, SysOrderItem sysOrderItem,
-                                               ShoppingGoodsAssemble goodsAssemble, Long taocanId) {
+                                               ShoppingGoodsAssemble goodsAssemble, Long taocanId, Date failTime) {
         //计算折扣
-        Double zk=sysOrderItem.getZkPrice()/sysOrderItem.getPrice();
+        Double zk = sysOrderItem.getZkPrice() / sysOrderItem.getPrice();
 
         SysProjUse puse = new SysProjUse();
         puse.setIsOver(Dictionary.DELETED_N);
@@ -1030,9 +1036,9 @@
         puse.setTaocanId(taocanId);
         puse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM);
         if (taocanId == null) {
-            puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() * zk );
+            puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() * zk);
         } else {
-            puse.setPrice(goodsAssemble.getPrice() * zk  );
+            puse.setPrice(goodsAssemble.getPrice() * zk);
         }
         puse.setBalance(MoneyUtil.mul(puse.getPrice(), Double.valueOf(puse.getSurplusCount())));
         // 赠送和打折后金额为0的都视为赠送项目
@@ -1041,10 +1047,7 @@
         } else {
             puse.setSource(Dictionary.TAOCAN_SOURCE_ZS);
         }
-        // 设置失效时间
-        Calendar cal = Calendar.getInstance();
-        cal.set(2200, 1, 1);
-        puse.setFailTime(cal.getTime());
+        puse.setFailTime(failTime);
         sysProjUseDao.insert(puse);
         return puse;
     }
@@ -1086,20 +1089,20 @@
         taocanProjUse.setFailTime(invalidTime);
         sysProjUseDao.insert(taocanProjUse);
         //计划次数
-        int surplusCount=0;
+        int surplusCount = 0;
         //总余额
         Double sumBanance = 0D;
         //创建套餐绑定的项目
         List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(projId, ShoppingGoods.SHOPPING_GOODS_TYPE_XM);
         for (ShoppingGoodsAssemble assemble : assembleList) {
-            SysProjUse tempUse = createProjuseByAssemble(order, sysOrderItem, assemble, taocanProjUse.getId());
+            SysProjUse tempUse = createProjuseByAssemble(order, sysOrderItem, assemble, taocanProjUse.getId(),taocanProjUse.getFailTime());
             sumBanance += tempUse.getBalance();
-            surplusCount+=tempUse.getSurplusCount();
+            surplusCount += tempUse.getSurplusCount();
         }
-        if(Dictionary.FLAG_NO_N.equals(taocanShoppingGoods.getIsCourse())){
+        if (Dictionary.FLAG_NO_N.equals(taocanShoppingGoods.getIsCourse())) {
             //固定套餐,剩余次数等于绑定项目的次数
             taocanProjUse.setSurplusCount(surplusCount);
-        }else{
+        } else {
             //任选套餐剩余次数等于最大使用次数
             taocanProjUse.setSurplusCount(taocanShoppingGoods.getCarUseCount());
         }
@@ -1141,6 +1144,7 @@
 
     /**
      * 会员卡充值
+     *
      * @param czVo
      */
     @Override
@@ -1190,7 +1194,7 @@
         orderItem.setOrderId(order.getId());
         orderItem.setOrderNo(order.getOrderNo());
         orderItem.setArrears(0D);
-        ShoppingGoods shoppingGoods= shoppingGoodsDao.selectVipCzGoods();
+        ShoppingGoods shoppingGoods = shoppingGoodsDao.selectVipCzGoods();
         orderItem.setGoodsId(shoppingGoods.getId());
         orderItem.setPayMethod(Dictionary.PAY_TYPE_MOENY);
         orderItem.setCashPay(czVo.getBjmoney());
@@ -1209,7 +1213,7 @@
 
 
         //设置卡项使用流水
-        MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow();
+        MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow();
         moneyCardUseFlow.setTotal(czVo.getBjmoney());
         moneyCardUseFlow.setGiftMoney(czVo.getGiftMoney());
         moneyCardUseFlow.setCarUseId(czVo.getCardId());
@@ -1218,7 +1222,7 @@
         moneyCardUseFlow.setOrderNo(order.getOrderNo());
         moneyCardUseFlow.setCreateTime(new Date());
         moneyCardUseFlow.setOperationId(user.getSuId());
-        moneyCardUseFlow.setBalance(cardUser.getGiftMoney()+cardUser.getRealMoney());
+        moneyCardUseFlow.setBalance(cardUser.getGiftMoney() + cardUser.getRealMoney());
         moneyCardUseFlowDao.insert(moneyCardUseFlow);
 
         order.setFlows(czVo.getFlows());
@@ -1274,7 +1278,8 @@
     @Override
     public void refundOrderMoney(SysOrder pageOrder) {
         SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-        // 插入订单流水
+
+        // 修改订单状态
         changeOrderStatu(pageOrder);
 
         List<SysOrderItem> returnItems = new ArrayList<>();
@@ -1318,7 +1323,7 @@
                     throw new GlobleException("数据异常");
                 }
 
-                for(int i = 0; i < item.getCount(); i++) {
+                for (int i = 0; i < item.getCount(); i++) {
                     SysProjUse sysProjUse = sysProjUses.get(i);
                     sysProjUse.setIsOver(Dictionary.FLAG_YES_Y);
                     sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX);
@@ -1340,7 +1345,7 @@
                 queryCardUse.setOrderItemId(item.getOldItemId());
 
                 List<MoneyCardUse> moneyCardUses = moneyCardUseDao.selectByModel(queryCardUse);
-                for(int i = 0; i < item.getCount(); i++) {
+                for (int i = 0; i < item.getCount(); i++) {
                     MoneyCardUse moneyCardUse = moneyCardUses.get(i);
                     moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y);
                     moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
index 3e21745..30bd8c9 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
@@ -11,15 +11,12 @@
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
-import com.matrix.core.tools.DateUtil;
 import com.matrix.system.hive.plugin.util.MoneyUtil;
 import com.matrix.system.hive.service.SysProjUseService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import javax.xml.crypto.Data;
-import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -407,23 +404,7 @@
         return i;
     }
 
-    /**
-     * cardUser暂时没有用到
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public int returnMoneyTc(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId) {
-        //充值记录
-        //SysRechargeFlow flow=new SysRechargeFlow();
 
-        // 计算出套餐所有项目的剩余次数的钱
-        getTotalMoney(sysProjUse, cardUse, moneyCardUseId);
-        //3、套餐下的项目状态改为退款
-        sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_TK);
-        int j = sysProjUseDao.updateProjStatus(sysProjUse);
-
-        return j;
-    }
 
 
     /*********************以下为项目使用情况操作***********************/
@@ -553,49 +534,7 @@
     }
 
 
-    /**
-     * 退款
-     *
-     * @param sysProjUse
-     * @return
-     */
-    public int returnMoneyProj(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId) {
-        int i = 0;
-        sysProjUse = sysProjUseDao.selectById(sysProjUse.getId());
-        //判断套餐是否存在欠款
-        checkOrderStatu(sysProjUse);
-        if (!(sysProjUse.getStatus().equals(Dictionary.TAOCAN_STATUS_YX))) {
-            throw new GlobleException("不是有效项目");
-        }
-        if (sysProjUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZR)) {
-            throw new GlobleException("转让的项目不能退款");
-        }
-        if (sysProjUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZS)) {
-            throw new GlobleException("赠送的项目不能退款");
-        }
-        StringBuilder content = new StringBuilder();
-        ShoppingGoodsAssemble shoppingGoodsAssemble = shoppingGoodsAssembleDao.selectById(sysProjUse.getAssembleId());
-        ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(shoppingGoodsAssemble.getShoppingGoodsId());
-        content.append(shoppingGoods + "退款");
-        if (cardUse != null) {
-            // 1、金额退到该用户的有效会籍卡中
-            MoneyCardUse upCard = moneyCardUseDao.selectById(cardUse.getId());
-            upCard.setRealMoney(upCard.getRealMoney() + sysProjUse.getBalance());
-            ;
-            moneyCardUseDao.update(upCard);
 
-            content.append("到会籍卡(" + upCard.getCardName() + ")" + sysProjUse.getBalance() + "元")
-                    .append(",余次:" + upCard.getLastCountName())
-                    .append(",本金余额:" + upCard.getRealMoney())
-                    .append(",有效期:" + DateUtil.dateToString(upCard.getFailTime(), DateUtil.DATE_FORMAT_MM))
-                    .append(",是否赠送:" + upCard.getSourceName());
-        } else {
-            content.append("现金" + sysProjUse.getBalance() + "元");
-        }
-
-        sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_TK);
-        return sysProjUseDao.update(sysProjUse);
-    }
 
     /**
      * 设置为有效套餐
@@ -646,25 +585,6 @@
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "操作成功");
     }
 
-    /**
-     * 退款项目
-     */
-    @Override
-    public double getTotalMoneyProj(SysProjUse sysProjUse) {
-        sysProjUse = sysProjUseDao.selectById(sysProjUse.getId());
-        //判断套餐是否存在欠款
-        checkOrderStatu(sysProjUse);
-        if (!(sysProjUse.getStatus().equals(Dictionary.TAOCAN_STATUS_YX))) {
-            throw new GlobleException("不是有效项目");
-        }
-        if (sysProjUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZR)) {
-            throw new GlobleException("转让的项目不能退款");
-        }
-        if (sysProjUse.getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)) {
-            throw new GlobleException("赠送的项目不能退款");
-        }
-        return sysProjUse.getBalance();
-    }
 
 
     @Override
@@ -673,9 +593,10 @@
     }
 
     @Override
-    public List<SysProjUse> selectTaocanProjUse(Long taocanId) {
+    public List<SysProjUse> selectTaocanProjUse(Long taocanId, String status) {
         SysProjUse projUse = new SysProjUse();
         projUse.setTaocanId(taocanId);
+        projUse.setStatus(status);
         return sysProjUseDao.selectByModel(projUse);
     }
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
index 3fa566e..922b7d9 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -74,7 +74,7 @@
 	 * @return
 	 */
 	@Override
-	public  int addVipDefaultCard(Long vipId){
+	public MoneyCardUse addVipDefaultCard(Long vipId){
 		MoneyCardUse defaultCardUse=new MoneyCardUse();
 		defaultCardUse.setVipId(vipId);
 		defaultCardUse.setCardName("储值卡");
@@ -83,7 +83,8 @@
 		defaultCardUse.setGiftMoney(0D);
 		defaultCardUse.setSource("-");
 		defaultCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX);
-		return  moneyCardUseDao.insert(defaultCardUse);
+		moneyCardUseDao.insert(defaultCardUse);
+		return  defaultCardUse;
 
 	}
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java
index 3769823..a3ad197 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java
@@ -3,6 +3,7 @@
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.excl.ExcelSheetPO;
 import com.matrix.core.tools.excl.ExcelUtil;
 import com.matrix.core.tools.excl.ExcelVersion;
@@ -48,6 +49,10 @@
     @PostMapping(value = "/findOrderFlow")
     public @ResponseBody
     AjaxResult findOrderFlow(@RequestBody OrderFlowListDto orderFlowListDto) {
+        if(StringUtils.isBlank(orderFlowListDto.getSort())){
+            orderFlowListDto.setSort("createTime");
+            orderFlowListDto.setOrder("desc");
+        }
         if (!DataAuthUtil.hasAllShopAuth()) {
             QueryUtil.setQueryLimit(orderFlowListDto);
         } else {
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
index 532662d..81a5f11 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
@@ -36,6 +36,7 @@
         if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
             param.put("shopId",sysUsers.getShopId());
         }
+
         return AjaxResult.buildSuccessInstance(beauticianStateDao.selectItemDetail(param),
                 beauticianStateDao.selectItemDetailTotal(param));
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
index 2b18447..f2ed540 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
@@ -117,16 +117,7 @@
             // 在session存放当前查询的客户
             MoneyCardUse cardUseInfo = cardUseService.findByVipId(vips.get(0).getId());
             if (cardUseInfo == null) {
-                cardUseInfo = new MoneyCardUse();
-                cardUseInfo.setVipId(vips.get(0).getId());
-                cardUseInfo.setCardName("储值卡");
-                cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y);
-                cardUseInfo.setRealMoney(0D);
-                cardUseInfo.setGiftMoney(0D);
-                cardUseInfo.setSource("-");
-                cardUseInfo.setStatus(Dictionary.MONEYCARD_STATUS_YX);
-                cardUseInfo.setFailTime(DateUtil.stringToDate("2050-01-01 00:00",DateUtil.DATE_FORMAT_MM));
-                moneyCardUseDao.insert(cardUseInfo);
+                cardUseInfo=vipInfoService.addVipDefaultCard(vips.get(0).getId());
             }
             vips.get(0).setLevelCard(cardUseInfo);
             WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
index 1c07d32..abc7fbd 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
@@ -4,24 +4,16 @@
 import com.matrix.biz.dao.BizUserDao;
 import com.matrix.component.rabbitmq.RabiitMqTemplate;
 import com.matrix.component.redis.RedisUserLoginUtils;
-import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.pojo.PaginationVO;
 import com.matrix.core.pojo.VerifyResult;
 import com.matrix.core.tools.DateUtil;
-import com.matrix.core.tools.LogUtil;
 import com.matrix.core.tools.StringUtils;
-import com.matrix.core.tools.WebUtil;
-import com.matrix.system.app.dto.ServiceOrderListDto;
-import com.matrix.system.app.mapper.SysBeauticianStateMapper;
-import com.matrix.system.app.mapper.SysProjServiceMapper;
 import com.matrix.system.app.mapper.SysProjUseMapper;
 import com.matrix.system.app.vo.*;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.dao.SysUsersDao;
 import com.matrix.system.common.interceptor.HostInterceptor;
-import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.common.tools.LocationUtil;
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.*;
@@ -30,14 +22,11 @@
 import com.matrix.system.hive.service.*;
 import com.matrix.system.shopXcx.api.dto.ErpServiceCommentDto;
 import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto;
-import com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo;
 import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo;
-import com.matrix.system.shopXcx.bean.ShopProduct;
 import com.matrix.system.shopXcx.dao.ShopProductDao;
 import com.matrix.system.shopXcx.dao.ShopSkuDao;
 import com.matrix.system.shopXcx.dto.YYDayOfWeek;
 import com.matrix.system.shopXcx.dto.YYmonth;
-import com.matrix.system.shopXcx.mqTask.DTO.UserProjInfo;
 import io.swagger.annotations.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -245,7 +234,7 @@
 
         if (CollectionUtils.isNotEmpty(serviceTcVos)) {
             serviceTcVos.forEach(item -> {
-                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId());
+                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus());
                 List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(sysProjUses);
                 item.setProj(taocanProj);
             });
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index 66e104b..0c3083e 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -4,13 +4,13 @@
 
 #线上测试环境
 
-#spring.datasource.username=ct_test
-#spring.datasource.password=123456
-#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+spring.datasource.username=ct_test
+spring.datasource.password=123456
+spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
-spring.datasource.username=chuhuan
-spring.datasource.password=chuhuan
-spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+#spring.datasource.username=chuhuan
+#spring.datasource.password=chuhuan
+#spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
 
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/QuestionMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/QuestionMapperImpl.java
deleted file mode 100644
index ff647be..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/QuestionMapperImpl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.dto.QuestionAnswerItemDto;
-import com.matrix.system.app.vo.QuestionVo;
-import com.matrix.system.hive.bean.Answer;
-import com.matrix.system.hive.bean.Question;
-import com.matrix.system.hive.bean.VipAnswer;
-
-import javax.annotation.Generated;
-import java.util.ArrayList;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:10+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class QuestionMapperImpl extends QuestionMapper {
-
-    @Override
-    public QuestionVo entityToVo(Question question) {
-        if ( question == null ) {
-            return null;
-        }
-
-        QuestionVo questionVo = new QuestionVo();
-
-        questionVo.setId( question.getId() );
-        questionVo.setQuestion( question.getQuestion() );
-        questionVo.setType( question.getType() );
-        List<Answer> list = question.getAnswers();
-        if ( list != null ) {
-            questionVo.setAnswers( new ArrayList<Answer>( list ) );
-        }
-        questionVo.setVipAnswer( question.getVipAnswer() );
-
-        return questionVo;
-    }
-
-    @Override
-    public List<QuestionVo> entitiesToVos(List<Question> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<QuestionVo> list1 = new ArrayList<QuestionVo>( list.size() );
-        for ( Question question : list ) {
-            list1.add( entityToVo( question ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public VipAnswer dtoToVipAnswer(QuestionAnswerItemDto questionAnswerDto) {
-        if ( questionAnswerDto == null ) {
-            return null;
-        }
-
-        VipAnswer vipAnswer = new VipAnswer();
-
-        vipAnswer.setQuesionId( questionAnswerDto.getQuestionId() );
-        vipAnswer.setVipId( questionAnswerDto.getVipId() );
-        vipAnswer.setAnswerId( questionAnswerDto.getAnswerId() );
-        vipAnswer.setAnswerText( questionAnswerDto.getAnswerText() );
-
-        return vipAnswer;
-    }
-
-    @Override
-    public List<VipAnswer> dtosToVipAnswers(List<QuestionAnswerItemDto> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<VipAnswer> list1 = new ArrayList<VipAnswer>( list.size() );
-        for ( QuestionAnswerItemDto questionAnswerItemDto : list ) {
-            list1.add( dtoToVipAnswer( questionAnswerItemDto ) );
-        }
-
-        return list1;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysBeauticianStateMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysBeauticianStateMapperImpl.java
deleted file mode 100644
index 7ee627f..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysBeauticianStateMapperImpl.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.dto.CreateServiceOrderItemDto;
-import com.matrix.system.app.vo.ServiceOrderDetailItemVo;
-import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.hive.bean.ShoppingGoods;
-import com.matrix.system.hive.bean.SysBeauticianState;
-import com.matrix.system.hive.bean.SysProjUse;
-
-import javax.annotation.Generated;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysBeauticianStateMapperImpl extends SysBeauticianStateMapper {
-
-    @Override
-    public SysBeauticianState serviceOrderItemVoToEntity(CreateServiceOrderItemDto dto) {
-        if ( dto == null ) {
-            return null;
-        }
-
-        SysBeauticianState sysBeauticianState = new SysBeauticianState();
-
-        sysBeauticianState.setPuseId( dto.getPuseId() );
-        sysBeauticianState.setCount( dto.getCount() );
-
-        return sysBeauticianState;
-    }
-
-    @Override
-    public List<SysBeauticianState> orderItmesVoToEntityList(List<CreateServiceOrderItemDto> dtoList) {
-        if ( dtoList == null ) {
-            return null;
-        }
-
-        List<SysBeauticianState> list = new ArrayList<SysBeauticianState>( dtoList.size() );
-        for ( CreateServiceOrderItemDto createServiceOrderItemDto : dtoList ) {
-            list.add( serviceOrderItemVoToEntity( createServiceOrderItemDto ) );
-        }
-
-        return list;
-    }
-
-    @Override
-    public ServiceOrderDetailItemVo entityToDetailItemVo(SysBeauticianState sysBeauticianState) {
-        if ( sysBeauticianState == null ) {
-            return null;
-        }
-
-        ServiceOrderDetailItemVo serviceOrderDetailItemVo = new ServiceOrderDetailItemVo();
-
-        serviceOrderDetailItemVo.setName( sysBeauticianStateProjInfoName( sysBeauticianState ) );
-        serviceOrderDetailItemVo.setTimeLength( sysBeauticianStateProjInfoTimeLength( sysBeauticianState ) );
-        if ( sysBeauticianState.getExtract() != null ) {
-            serviceOrderDetailItemVo.setCommission( new BigDecimal( sysBeauticianState.getExtract() ) );
-        }
-        Double price = sysBeauticianStateProjUsePrice( sysBeauticianState );
-        if ( price != null ) {
-            serviceOrderDetailItemVo.setPrice( BigDecimal.valueOf( price ) );
-        }
-        serviceOrderDetailItemVo.setBeautyName( sysBeauticianStateBeautiStaffInfoSuName( sysBeauticianState ) );
-        serviceOrderDetailItemVo.setCount( sysBeauticianState.getCount() );
-        serviceOrderDetailItemVo.setBeginTime( sysBeauticianState.getBeginTime() );
-        serviceOrderDetailItemVo.setEndTime( sysBeauticianState.getEndTime() );
-
-        return serviceOrderDetailItemVo;
-    }
-
-    @Override
-    public List<ServiceOrderDetailItemVo> entitiesToDetailItemsVo(List<SysBeauticianState> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<ServiceOrderDetailItemVo> list1 = new ArrayList<ServiceOrderDetailItemVo>( list.size() );
-        for ( SysBeauticianState sysBeauticianState : list ) {
-            list1.add( entityToDetailItemVo( sysBeauticianState ) );
-        }
-
-        return list1;
-    }
-
-    private String sysBeauticianStateProjInfoName(SysBeauticianState sysBeauticianState) {
-        if ( sysBeauticianState == null ) {
-            return null;
-        }
-        ShoppingGoods projInfo = sysBeauticianState.getProjInfo();
-        if ( projInfo == null ) {
-            return null;
-        }
-        String name = projInfo.getName();
-        if ( name == null ) {
-            return null;
-        }
-        return name;
-    }
-
-    private Integer sysBeauticianStateProjInfoTimeLength(SysBeauticianState sysBeauticianState) {
-        if ( sysBeauticianState == null ) {
-            return null;
-        }
-        ShoppingGoods projInfo = sysBeauticianState.getProjInfo();
-        if ( projInfo == null ) {
-            return null;
-        }
-        Integer timeLength = projInfo.getTimeLength();
-        if ( timeLength == null ) {
-            return null;
-        }
-        return timeLength;
-    }
-
-    private Double sysBeauticianStateProjUsePrice(SysBeauticianState sysBeauticianState) {
-        if ( sysBeauticianState == null ) {
-            return null;
-        }
-        SysProjUse projUse = sysBeauticianState.getProjUse();
-        if ( projUse == null ) {
-            return null;
-        }
-        Double price = projUse.getPrice();
-        if ( price == null ) {
-            return null;
-        }
-        return price;
-    }
-
-    private String sysBeauticianStateBeautiStaffInfoSuName(SysBeauticianState sysBeauticianState) {
-        if ( sysBeauticianState == null ) {
-            return null;
-        }
-        SysUsers beautiStaffInfo = sysBeauticianState.getBeautiStaffInfo();
-        if ( beautiStaffInfo == null ) {
-            return null;
-        }
-        String suName = beautiStaffInfo.getSuName();
-        if ( suName == null ) {
-            return null;
-        }
-        return suName;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysProjServiceMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysProjServiceMapperImpl.java
deleted file mode 100644
index a7df2af..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysProjServiceMapperImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.vo.ServiceOrderDetailVo;
-import com.matrix.system.hive.bean.SysProjServices;
-import com.matrix.system.hive.bean.SysVipInfo;
-import javax.annotation.Generated;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysProjServiceMapperImpl extends SysProjServiceMapper {
-
-    @Override
-    public ServiceOrderDetailVo projServiceToDetailVo(SysProjServices projServices) {
-        if ( projServices == null ) {
-            return null;
-        }
-
-        ServiceOrderDetailVo serviceOrderDetailVo = new ServiceOrderDetailVo();
-
-        serviceOrderDetailVo.setStaffName( projServices.getCreateStaffName() );
-        serviceOrderDetailVo.setVipName( projServicesVipInfoVipName( projServices ) );
-        serviceOrderDetailVo.setPhone( projServicesVipInfoPhone( projServices ) );
-        serviceOrderDetailVo.setStatus( projServices.getState() );
-        serviceOrderDetailVo.setComment( projServices.getComment() );
-        serviceOrderDetailVo.setServiceNo( projServices.getServiceNo() );
-        serviceOrderDetailVo.setYyTime( projServices.getYyTime() );
-        serviceOrderDetailVo.setBedName( projServices.getBedName() );
-        serviceOrderDetailVo.setPlsName( projServices.getPlsName() );
-        serviceOrderDetailVo.setTotalTime( projServices.getTotalTime() );
-
-        return serviceOrderDetailVo;
-    }
-
-    private String projServicesVipInfoVipName(SysProjServices sysProjServices) {
-        if ( sysProjServices == null ) {
-            return null;
-        }
-        SysVipInfo vipInfo = sysProjServices.getVipInfo();
-        if ( vipInfo == null ) {
-            return null;
-        }
-        String vipName = vipInfo.getVipName();
-        if ( vipName == null ) {
-            return null;
-        }
-        return vipName;
-    }
-
-    private String projServicesVipInfoPhone(SysProjServices sysProjServices) {
-        if ( sysProjServices == null ) {
-            return null;
-        }
-        SysVipInfo vipInfo = sysProjServices.getVipInfo();
-        if ( vipInfo == null ) {
-            return null;
-        }
-        String phone = vipInfo.getPhone();
-        if ( phone == null ) {
-            return null;
-        }
-        return phone;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysProjUseMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysProjUseMapperImpl.java
deleted file mode 100644
index 4ea658a..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysProjUseMapperImpl.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.vo.ServiceProjVo;
-import com.matrix.system.app.vo.ServiceTcVo;
-import com.matrix.system.hive.bean.SysProjUse;
-import com.matrix.system.hive.bean.SysProjUseFlow;
-
-import javax.annotation.Generated;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysProjUseMapperImpl extends SysProjUseMapper {
-
-    @Override
-    public ServiceTcVo entityToServiceTcVo(SysProjUse sysProjUse) {
-        if ( sysProjUse == null ) {
-            return null;
-        }
-
-        ServiceTcVo serviceTcVo = new ServiceTcVo();
-
-        serviceTcVo.setName( sysProjUse.getProjName() );
-        if ( sysProjUse.getSurplusCount() != null ) {
-            serviceTcVo.setCount( String.valueOf( sysProjUse.getSurplusCount() ) );
-        }
-        serviceTcVo.setInvalidTime( sysProjUse.getFailTime() );
-        serviceTcVo.setId( sysProjUse.getId() );
-        serviceTcVo.setProjId( sysProjUse.getProjId() );
-        serviceTcVo.setIsCourse( sysProjUse.getIsCourse() );
-        serviceTcVo.setIsInfinite( sysProjUse.getIsInfinite() );
-
-        return serviceTcVo;
-    }
-
-    @Override
-    public List<ServiceTcVo> entityListToTcVoList(List<SysProjUse> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<ServiceTcVo> list1 = new ArrayList<ServiceTcVo>( list.size() );
-        for ( SysProjUse sysProjUse : list ) {
-            list1.add( entityToServiceTcVo( sysProjUse ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public ServiceProjVo entityToServiceProjVo(SysProjUse sysProjUse) {
-        if ( sysProjUse == null ) {
-            return null;
-        }
-
-        ServiceProjVo serviceProjVo = new ServiceProjVo();
-
-        serviceProjVo.setName( sysProjUse.getProjName() );
-        serviceProjVo.setCount( sysProjUse.getSurplusCount() );
-        serviceProjVo.setInvalidTime( sysProjUse.getFailTime() );
-        serviceProjVo.setTimeLength( sysProjUse.getTimeLength() );
-        serviceProjVo.setProjId( sysProjUse.getProjId() );
-        serviceProjVo.setImg( sysProjUse.getImg() );
-        serviceProjVo.setId( sysProjUse.getId() );
-
-        return serviceProjVo;
-    }
-
-    @Override
-    public List<ServiceProjVo> entityListToProjVoList(List<SysProjUse> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<ServiceProjVo> list1 = new ArrayList<ServiceProjVo>( list.size() );
-        for ( SysProjUse sysProjUse : list ) {
-            list1.add( entityToServiceProjVo( sysProjUse ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public SysProjUseFlow projUseToFlow(SysProjUse sysProjUse) {
-        if ( sysProjUse == null ) {
-            return null;
-        }
-
-        SysProjUseFlow sysProjUseFlow = new SysProjUseFlow();
-
-        sysProjUseFlow.setProjUseId( sysProjUse.getId() );
-        HashMap<String, Object> hashMap = sysProjUse.getDicMap();
-        if ( hashMap != null ) {
-            sysProjUseFlow.setDicMap( new HashMap<String, Object>( hashMap ) );
-        }
-        sysProjUseFlow.setCreateBy( sysProjUse.getCreateBy() );
-        sysProjUseFlow.setCreateTime( sysProjUse.getCreateTime() );
-        sysProjUseFlow.setUpdateBy( sysProjUse.getUpdateBy() );
-        sysProjUseFlow.setUpdateTime( sysProjUse.getUpdateTime() );
-        sysProjUseFlow.setId( sysProjUse.getId() );
-        sysProjUseFlow.setSurplusCount( sysProjUse.getSurplusCount() );
-        sysProjUseFlow.setIsOver( sysProjUse.getIsOver() );
-        sysProjUseFlow.setFailTime( sysProjUse.getFailTime() );
-        sysProjUseFlow.setPrice( sysProjUse.getPrice() );
-        sysProjUseFlow.setStatus( sysProjUse.getStatus() );
-        sysProjUseFlow.setBalance( sysProjUse.getBalance() );
-        sysProjUseFlow.setRemark( sysProjUse.getRemark() );
-        sysProjUseFlow.setProjName( sysProjUse.getProjName() );
-
-        return sysProjUseFlow;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysSkinCheckRecordMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysSkinCheckRecordMapperImpl.java
deleted file mode 100644
index 391e39d..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysSkinCheckRecordMapperImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.vo.SkinCheckAnalysisItems;
-import com.matrix.system.app.vo.SkinCheckDetailVo;
-import com.matrix.system.app.vo.SkinCheckDiagnoseItemVo;
-import com.matrix.system.app.vo.SkinCheckListVo;
-import com.matrix.system.hive.bean.SysSkinCheckRecord;
-import com.matrix.system.hive.bean.SysSkinDetail;
-
-import javax.annotation.Generated;
-import java.util.ArrayList;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysSkinCheckRecordMapperImpl extends SysSkinCheckRecordMapper {
-
-    @Override
-    public SkinCheckListVo entityToSkinCheckListVo(SysSkinCheckRecord sysSkinCheckRecord) {
-        if ( sysSkinCheckRecord == null ) {
-            return null;
-        }
-
-        SkinCheckListVo skinCheckListVo = new SkinCheckListVo();
-
-        skinCheckListVo.setId( sysSkinCheckRecord.getId() );
-        skinCheckListVo.setCheckUserName( sysSkinCheckRecord.getCheckUserName() );
-        skinCheckListVo.setShopName( sysSkinCheckRecord.getShopName() );
-        skinCheckListVo.setCheckTime( sysSkinCheckRecord.getCheckTime() );
-
-        return skinCheckListVo;
-    }
-
-    @Override
-    public List<SkinCheckListVo> entitiesToListVos(List<SysSkinCheckRecord> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<SkinCheckListVo> list1 = new ArrayList<SkinCheckListVo>( list.size() );
-        for ( SysSkinCheckRecord sysSkinCheckRecord : list ) {
-            list1.add( entityToSkinCheckListVo( sysSkinCheckRecord ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public SkinCheckDetailVo entityToDetailVo(SysSkinCheckRecord sysSkinCheckRecord) {
-        if ( sysSkinCheckRecord == null ) {
-            return null;
-        }
-
-        SkinCheckDetailVo skinCheckDetailVo = new SkinCheckDetailVo();
-
-        skinCheckDetailVo.setVipName( sysSkinCheckRecord.getUserName() );
-        skinCheckDetailVo.setSex( sysSkinCheckRecord.getExt2() );
-        skinCheckDetailVo.setCheckTime( sysSkinCheckRecord.getCheckTime() );
-
-        return skinCheckDetailVo;
-    }
-
-    @Override
-    public SkinCheckDiagnoseItemVo entityToDiagnoseItem(SysSkinDetail sysSkinDetail) {
-        if ( sysSkinDetail == null ) {
-            return null;
-        }
-
-        SkinCheckDiagnoseItemVo skinCheckDiagnoseItemVo = new SkinCheckDiagnoseItemVo();
-
-        skinCheckDiagnoseItemVo.setTitle( sysSkinDetail.getSymptom() );
-        skinCheckDiagnoseItemVo.setPercentage( sysSkinDetail.getPercentage() );
-
-        return skinCheckDiagnoseItemVo;
-    }
-
-    @Override
-    public List<SkinCheckDiagnoseItemVo> entitiesToDiagnoseItems(List<SysSkinDetail> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<SkinCheckDiagnoseItemVo> list1 = new ArrayList<SkinCheckDiagnoseItemVo>( list.size() );
-        for ( SysSkinDetail sysSkinDetail : list ) {
-            list1.add( entityToDiagnoseItem( sysSkinDetail ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public SkinCheckAnalysisItems entityToAnalysisItem(SysSkinDetail sysSkinDetail) {
-        if ( sysSkinDetail == null ) {
-            return null;
-        }
-
-        SkinCheckAnalysisItems skinCheckAnalysisItems = new SkinCheckAnalysisItems();
-
-        skinCheckAnalysisItems.setTitle( sysSkinDetail.getSymptom() );
-        skinCheckAnalysisItems.setProductIds( sysSkinDetail.getProductIds() );
-        skinCheckAnalysisItems.setImg( sysSkinDetail.getImg() );
-        skinCheckAnalysisItems.setAnalysis( sysSkinDetail.getAnalysis() );
-        skinCheckAnalysisItems.setSolution( sysSkinDetail.getSolution() );
-
-        return skinCheckAnalysisItems;
-    }
-
-    @Override
-    public List<SkinCheckAnalysisItems> entitiesToAnalysisItems(List<SysSkinDetail> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<SkinCheckAnalysisItems> list1 = new ArrayList<SkinCheckAnalysisItems>( list.size() );
-        for ( SysSkinDetail sysSkinDetail : list ) {
-            list1.add( entityToAnalysisItem( sysSkinDetail ) );
-        }
-
-        return list1;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysStoreInfoMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysStoreInfoMapperImpl.java
deleted file mode 100644
index ba8fead..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysStoreInfoMapperImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.vo.StoreInOutListVo;
-import com.matrix.system.app.vo.StoreListVo;
-import com.matrix.system.hive.bean.ShoppingGoods;
-import com.matrix.system.hive.bean.SysStoreInfo;
-import com.matrix.system.hive.pojo.StoreInOutRecordVO;
-
-import javax.annotation.Generated;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysStoreInfoMapperImpl extends SysStoreInfoMapper {
-
-    @Override
-    public StoreListVo entityToStoreVo(SysStoreInfo sysStoreInfo) {
-        if ( sysStoreInfo == null ) {
-            return null;
-        }
-
-        StoreListVo storeListVo = new StoreListVo();
-
-        storeListVo.setImg( sysStoreInfoGoodsImg( sysStoreInfo ) );
-        storeListVo.setGoodsCode( sysStoreInfoGoodsCode( sysStoreInfo ) );
-        storeListVo.setGoodsName( sysStoreInfoGoodsName( sysStoreInfo ) );
-        storeListVo.setAlarmNum( sysStoreInfoGoodsAlarmNum( sysStoreInfo ) );
-        if ( sysStoreInfo.getStoreTotal() != null ) {
-            storeListVo.setStoreTotal( sysStoreInfo.getStoreTotal().intValue() );
-        }
-
-        return storeListVo;
-    }
-
-    @Override
-    public List<StoreListVo> entitiesToStoreVos(List<SysStoreInfo> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<StoreListVo> list1 = new ArrayList<StoreListVo>( list.size() );
-        for ( SysStoreInfo sysStoreInfo : list ) {
-            list1.add( entityToStoreVo( sysStoreInfo ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public StoreInOutListVo recordVoToInOutListVo(StoreInOutRecordVO recordVO) {
-        if ( recordVO == null ) {
-            return null;
-        }
-
-        StoreInOutListVo storeInOutListVo = new StoreInOutListVo();
-
-        storeInOutListVo.setContent( recordVO.getOrderType() );
-        storeInOutListVo.setOrderNo( recordVO.getOrderNo() );
-        if ( recordVO.getAmount() != null ) {
-            storeInOutListVo.setAmount( BigDecimal.valueOf( recordVO.getAmount() ) );
-        }
-        storeInOutListVo.setCreateTime( recordVO.getCreateTime() );
-
-        return storeInOutListVo;
-    }
-
-    @Override
-    public List<StoreInOutListVo> recordVosToInOutListVos(List<StoreInOutRecordVO> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<StoreInOutListVo> list1 = new ArrayList<StoreInOutListVo>( list.size() );
-        for ( StoreInOutRecordVO storeInOutRecordVO : list ) {
-            list1.add( recordVoToInOutListVo( storeInOutRecordVO ) );
-        }
-
-        return list1;
-    }
-
-    private String sysStoreInfoGoodsImg(SysStoreInfo sysStoreInfo) {
-        if ( sysStoreInfo == null ) {
-            return null;
-        }
-        ShoppingGoods goods = sysStoreInfo.getGoods();
-        if ( goods == null ) {
-            return null;
-        }
-        String img = goods.getImg();
-        if ( img == null ) {
-            return null;
-        }
-        return img;
-    }
-
-    private String sysStoreInfoGoodsCode(SysStoreInfo sysStoreInfo) {
-        if ( sysStoreInfo == null ) {
-            return null;
-        }
-        ShoppingGoods goods = sysStoreInfo.getGoods();
-        if ( goods == null ) {
-            return null;
-        }
-        String code = goods.getCode();
-        if ( code == null ) {
-            return null;
-        }
-        return code;
-    }
-
-    private String sysStoreInfoGoodsName(SysStoreInfo sysStoreInfo) {
-        if ( sysStoreInfo == null ) {
-            return null;
-        }
-        ShoppingGoods goods = sysStoreInfo.getGoods();
-        if ( goods == null ) {
-            return null;
-        }
-        String name = goods.getName();
-        if ( name == null ) {
-            return null;
-        }
-        return name;
-    }
-
-    private Integer sysStoreInfoGoodsAlarmNum(SysStoreInfo sysStoreInfo) {
-        if ( sysStoreInfo == null ) {
-            return null;
-        }
-        ShoppingGoods goods = sysStoreInfo.getGoods();
-        if ( goods == null ) {
-            return null;
-        }
-        Integer alarmNum = goods.getAlarmNum();
-        if ( alarmNum == null ) {
-            return null;
-        }
-        return alarmNum;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysUsersMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysUsersMapperImpl.java
deleted file mode 100644
index d721e09..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysUsersMapperImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.dto.ModifyUserDto;
-import com.matrix.system.app.vo.BeauticianVo;
-import com.matrix.system.app.vo.UserInfoDetailVo;
-import com.matrix.system.common.bean.SysUsers;
-
-import javax.annotation.Generated;
-import java.util.ArrayList;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysUsersMapperImpl extends SysUsersMapper {
-
-    @Override
-    public BeauticianVo sysUsersToBeauticianVo(SysUsers sysUsers) {
-        if ( sysUsers == null ) {
-            return null;
-        }
-
-        BeauticianVo beauticianVo = new BeauticianVo();
-
-        beauticianVo.setName( sysUsers.getSuName() );
-        beauticianVo.setPhoto( sysUsers.getSuPhoto() );
-        beauticianVo.setId( sysUsers.getSuId() );
-        beauticianVo.setTelphone( sysUsers.getSuTel() );
-        beauticianVo.setRoleName( sysUsers.getRoleName() );
-
-        return beauticianVo;
-    }
-
-    @Override
-    public List<BeauticianVo> usersListToBeautyList(List<SysUsers> list) {
-        if ( list == null ) {
-            return null;
-        }
-
-        List<BeauticianVo> list1 = new ArrayList<BeauticianVo>( list.size() );
-        for ( SysUsers sysUsers : list ) {
-            list1.add( sysUsersToBeauticianVo( sysUsers ) );
-        }
-
-        return list1;
-    }
-
-    @Override
-    public UserInfoDetailVo usersToDetailInfoVo(SysUsers sysUsers) {
-        if ( sysUsers == null ) {
-            return null;
-        }
-
-        UserInfoDetailVo userInfoDetailVo = new UserInfoDetailVo();
-
-        userInfoDetailVo.setBirthday( sysUsers.getSuBirthday() );
-        userInfoDetailVo.setEngName( sysUsers.getSuAliases() );
-        userInfoDetailVo.setAddress( sysUsers.getSuAddress() );
-        userInfoDetailVo.setTelphone( sysUsers.getSuTel() );
-        userInfoDetailVo.setSex( sysUsers.getSuSex() );
-        userInfoDetailVo.setName( sysUsers.getSuName() );
-        userInfoDetailVo.setPhoto( sysUsers.getSuPhoto() );
-        userInfoDetailVo.setServiceSign( sysUsers.getServiceSignature() );
-        userInfoDetailVo.setEmail( sysUsers.getSuEmail() );
-
-        return userInfoDetailVo;
-    }
-
-    @Override
-    public ModifyUserDto usersToModifyUserDto(SysUsers sysUsers) {
-        if ( sysUsers == null ) {
-            return null;
-        }
-
-        ModifyUserDto modifyUserDto = new ModifyUserDto();
-
-        return modifyUserDto;
-    }
-
-    @Override
-    public SysUsers modifyUserDtoToUsers(ModifyUserDto modifyUserDto) {
-        if ( modifyUserDto == null ) {
-            return null;
-        }
-
-        SysUsers sysUsers = new SysUsers();
-
-        sysUsers.setSuAliases( modifyUserDto.getEngName() );
-        sysUsers.setSuTel( modifyUserDto.getTelphone() );
-        sysUsers.setSuBirthday( modifyUserDto.getBirthday() );
-        sysUsers.setServiceSignature( modifyUserDto.getServiceSign() );
-        sysUsers.setSuAddress( modifyUserDto.getAddress() );
-        sysUsers.setSuEmail( modifyUserDto.getEmail() );
-        sysUsers.setSuPhoto( modifyUserDto.getPhoto() );
-        sysUsers.setSuName( modifyUserDto.getName() );
-        sysUsers.setSuSex( modifyUserDto.getSex() );
-
-        return sysUsers;
-    }
-}
diff --git a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysWorkBeatuistaffMapperImpl.java b/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysWorkBeatuistaffMapperImpl.java
deleted file mode 100644
index 0520ada..0000000
--- a/zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/SysWorkBeatuistaffMapperImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.matrix.system.app.mapper;
-
-import com.matrix.system.app.vo.BeauticianVo;
-import com.matrix.system.hive.bean.SysWorkBeatuistaff;
-
-import javax.annotation.Generated;
-import java.util.ArrayList;
-import java.util.List;
-
-@Generated(
-    value = "org.mapstruct.ap.MappingProcessor",
-    date = "2021-01-26T20:08:11+0800",
-    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
-)
-public class SysWorkBeatuistaffMapperImpl extends SysWorkBeatuistaffMapper {
-
-    @Override
-    public BeauticianVo workBeautyToBeautyVo(SysWorkBeatuistaff sysWorkBeatuistaff) {
-        if ( sysWorkBeatuistaff == null ) {
-            return null;
-        }
-
-        BeauticianVo beauticianVo = new BeauticianVo();
-
-        beauticianVo.setName( sysWorkBeatuistaff.getWorkStaffName() );
-        beauticianVo.setId( sysWorkBeatuistaff.getStaffId() );
-
-        return beauticianVo;
-    }
-
-    @Override
-    public List<BeauticianVo> workBeautysToBeautyVos(List<SysWorkBeatuistaff> sysWorkBeatuistaff) {
-        if ( sysWorkBeatuistaff == null ) {
-            return null;
-        }
-
-        List<BeauticianVo> list = new ArrayList<BeauticianVo>( sysWorkBeatuistaff.size() );
-        for ( SysWorkBeatuistaff sysWorkBeatuistaff1 : sysWorkBeatuistaff ) {
-            list.add( workBeautyToBeautyVo( sysWorkBeatuistaff1 ) );
-        }
-
-        return list;
-    }
-}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
index 94d6c2d..c74aeca 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
@@ -20,6 +20,7 @@
         <result property="isVipCar" column="is_vip_car"/>
         <result property="remark" column="remark"/>
         <result property="cardName" column="card_name"/>
+        <result property="orderId" column="orderId"/>
 
         <!-- 对应会员信息 -->
         <association property="vipInfo" javaType="SysVipInfo"
@@ -366,6 +367,7 @@
         select
         a.id,
         a.order_item_id,
+        d.id AS orderId,
         a.use_total,
         a.last_count,
         a.real_money,
@@ -380,7 +382,10 @@
         a.remark,
         a.card_name
         from money_card_use a
-        where vip_id = #{record.vipId}
+        left join shopping_goods b on a.goods_id=b.id
+        left join sys_order_item c on a.ORDER_ITEM_ID=c.id
+        left join sys_order d on c.ORDER_ID=d.id
+        where a.vip_id = #{record.vipId}
         <if test="record!=null">
             <if test="record.orderItemId != null and record.orderItemId !='' ">
                 and a.order_item_id = #{record.orderItemId}
@@ -420,7 +425,9 @@
         select count(*)
         from money_card_use a
         left join shopping_goods b on a.goods_id=b.id
-        where vip_id = #{record.vipId}
+        left join sys_order_item c on a.ORDER_ITEM_ID=c.id
+        left join sys_order d on c.ORDER_ID=d.id
+        where a.vip_id = #{record.vipId}
         <if test="record!=null">
             <if test="record.orderItemId != null and record.orderItemId !='' ">
                 and a.order_item_id = #{record.orderItemId}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
index 7a5a0e5..6262844 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
@@ -410,6 +410,7 @@
     <select id="selectItemDetail" resultType="java.util.HashMap" parameterType="java.util.HashMap">
         select
         f.SHOP_NAME,
+        b.yy_time,
         b.consume_time,
         b.SERVICE_NO,
         d.su_name,
@@ -420,7 +421,8 @@
         a.COUNT,
         h.PRICE,
         h.SOURCE,
-        a.STATE
+        a.STATE,
+        a.extract
         from sys_beautician_state a
         left join sys_proj_services b on a.SERVICES_ID=b.ID
         left join shopping_goods c on a.proj_id=c.id
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml
index 138bd76..eb0d269 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml
@@ -125,8 +125,11 @@
 			<if test="record.shopId != null and record.shopId != ''">
 				and a.shop_id=#{record.shopId}
 			</if>
-
 		</where>
+		<if test="record.sort !=null">
+			order by
+			a.${record.sort} ${record.order}
+		</if>
 		<if test="record.offset >=0  and record.limit >0">
 			limit
 			#{record.offset},#{record.limit}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
index d3edbfd..0053d74 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -31,6 +31,7 @@
         <result property="deductionNum" column="deductionNum"/>
         <result property="isCourse" column="is_course"/>
         <result property="timeLength" column="time_length"/>
+        <result property="orderId" column="orderId"/>
         <!-- 对应项目信息-->
         <association property="projInfo" javaType="ShoppingGoods"
                      resultMap="com.matrix.system.hive.dao.ShoppingGoodsDao.ShoppingGoodsMap"/>
@@ -331,10 +332,13 @@
     <select id="selectInPage" resultMap="SysProjUseMap">
         select
         a.*,
+        d.id as orderId,
         b.TIME_LENGTH,
         b.img
         from sys_proj_use a
         left join shopping_goods b on a.proj_id=b.id
+        left join sys_order_item c on a.ORDER_ITEM_ID=c.id
+        left join sys_order d on c.ORDER_ID=d.id
         where 1=1
         <if test="record!=null">
             <if test="record.id != null and record.id !='' ">
@@ -440,70 +444,81 @@
     <!-- 查询总条数 -->
     <select id="selectTotalRecord" resultType="java.lang.Integer">
         select count(*)
-        from sys_proj_use
+        from sys_proj_use a
+        left join shopping_goods b on a.proj_id=b.id
+        left join sys_order_item c on a.ORDER_ITEM_ID=c.id
+        left join sys_order d on c.ORDER_ID=d.id
         where 1=1
         <if test="record!=null">
             <if test="record.id != null and record.id !='' ">
-                and ID = #{record.id}
+                and a.ID = #{record.id}
+            </if>
+            <if test="record.queryKey != null and record.queryKey !='' ">
+                and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(goods_no, #{record.queryKey}))
             </if>
             <if test="record.orderItemId != null and record.orderItemId !='' ">
-                and ORDER_ITEM_ID = #{record.orderItemId}
+                and a.ORDER_ITEM_ID = #{record.orderItemId}
             </if>
             <if test="record.projId != null and record.projId !='' ">
-                and PROJ_ID = #{record.projId}
+                and a.PROJ_ID = #{record.projId}
             </if>
             <if test="record.surplusCount != null and record.surplusCount !='' ">
-                and SURPLUS_COUNT = #{record.surplusCount}
+                and a.SURPLUS_COUNT = #{record.surplusCount}
             </if>
             <if test="record.isOver != null and record.isOver !='' ">
-                and IS_OVER = #{record.isOver}
+                and a.IS_OVER = #{record.isOver}
             </if>
             <!-- 查询具体某一个套餐的使用情况 -->
             <if
                     test="record.taocanId != null and record.taocanId !=-1 and record.taocanId !=-2">
-                and TAOCAN_ID = #{record.taocanId}
+                and a.TAOCAN_ID = #{record.taocanId}
             </if>
             <!-- 查询所有的项目使用情况 -->
             <if test="record.taocanId != null and record.taocanId ==-1 ">
-                and TAOCAN_ID IS NULL
+                and a.TAOCAN_ID IS NULL
             </if>
             <!-- 查询所有的套餐使用情况 -->
             <if test="record.taocanId != null and record.taocanId ==-2 ">
-                and TAOCAN_ID IS NOT NULL
+                and a.TAOCAN_ID IS NOT NULL
             </if>
             <if test="record.vipId != null and record.vipId !='' ">
-                and VIP_ID = #{record.vipId}
+                and a.VIP_ID = #{record.vipId}
+            </if>
+            <if test="record.failTime != null  ">
+                and a.FAIL_TIME = #{record.failTime}
+            </if>
+            <if test="record.targetFailTime != null  ">
+                and date_format(#{record.targetFailTime}, '%Y-%m-%d') > date_format(a.FAIL_TIME, '%Y-%m-%d')
             </if>
             <if test="record.price != null and record.price !='' ">
-                and PRICE = #{record.price}
+                and a.PRICE = #{record.price}
             </if>
             <if test="record.assembleId != null and record.assembleId !='' ">
-                and ASSEMBLE_ID = #{record.assembleId}
+                and a.ASSEMBLE_ID = #{record.assembleId}
             </if>
             <if test="record.source != null and record.source !='' ">
-                and SOURCE like concat('%',#{record.source},'%')
+                and a.SOURCE like concat('%',#{record.source},'%')
             </if>
             <if test="record.status != null and record.status !='' ">
-                and STATUS = #{record.status}
+                and a.STATUS = #{record.status}
             </if>
             <if test="record.platformFlag != null and record.platformFlag !='' ">
-                and PLATFORM_FLAG = #{record.platformFlag}
-            </if>
-            <if test="record.projName != null and record.projName !='' ">
-                and PROJ_NAME like concat('%',#{record.projName},'%')
+                and a.PLATFORM_FLAG = #{record.platformFlag}
             </if>
             <if test="record.type != null and record.type !='' ">
-                and type = #{record.type}
+                and a.type = #{record.type}
+            </if>
+            <if test="record.projName != null and record.projName !='' ">
+                and a.PROJ_NAME like concat('%',#{record.projName},'%')
             </if>
             <if test="record.balance != null and record.balance !='' ">
-                and balance = #{record.balance}
+                and a.balance = #{record.balance}
             </if>
             <if test="record.remark != null and record.remark !='' ">
-                and remark = #{record.remark}
+                and a.remark = #{record.remark}
             </if>
-
             <if test="record.isCourse != null and record.isCourse !='' ">
-                and   is_course = #{record.isCourse},
+                and  a.is_course = #{record.isCourse},
             </if>
         </if>
     </select>
diff --git a/zq-erp/src/main/resources/static/css/styleOne/style.min.css b/zq-erp/src/main/resources/static/css/styleOne/style.min.css
index 5c24529..31088b3 100644
--- a/zq-erp/src/main/resources/static/css/styleOne/style.min.css
+++ b/zq-erp/src/main/resources/static/css/styleOne/style.min.css
@@ -3013,7 +3013,6 @@
 body, body.full-height-layout #page-wrapper, body.full-height-layout #wrapper,
 	html {
 	height: 100%;
-	overflow: hidden;
 }
 
 #page-wrapper {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html
index d016abf..c3b2a39 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html
@@ -111,7 +111,7 @@
 
     <el-row class="table-style"  >
 
-        <el-table id="proj" :data="table.rows"  :height="height" stripe>
+        <el-table id="proj" :data="table.rows"  :height="height" stripe @sort-change="sortChange">
             <el-table-column
                     prop="orderNo"
                     label="订单号"
@@ -125,16 +125,19 @@
             </el-table-column>
             <el-table-column
                     prop="createTime"
+                    sortable="custom"
                     label="交易时间"
                     show-overflow-tooltip
                     width="180">
             </el-table-column>
             <el-table-column
                     prop="flowType"
+                    sortable="custom"
                     label="交易类型">
             </el-table-column>
             <el-table-column
                     prop="amount"
+                    sortable="custom"
                     label="交易金额">
             </el-table-column>
             <el-table-column
@@ -143,6 +146,7 @@
             </el-table-column>
             <el-table-column
                     prop="payMethod"
+                    sortable="custom"
                     label="支付方式">
             </el-table-column>
             <el-table-column
@@ -253,6 +257,17 @@
             resetForm(formName) {
                 this.$refs[formName].resetFields();
             },
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadData();
+                }
+            },
             loadData:function(){
                 let _this = this;
                 let data=_this.getRequestParam();
@@ -270,16 +285,19 @@
             },
             getRequestParam(){
                 let _this = this;
-             return   {
+                return   {
                     name:_this.form.name,
                     payMethod:_this.form.payMethod,
                     flowType:_this.form.flowType,
                     orderNo:_this.form.orderNo,
                     oprationMan:_this.form.oprationMan,
                     queryKey:_this.form.queryKey,
-                    shopId:_this.form.shopId,
                     startTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[0]).format("YYYY-MM-DD HH:mm"):'',
                     endTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[1]).format("YYYY-MM-DD HH:mm"):'',
+                    shopId:_this.form.shopId,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+
                 }
             },
             search:function(){
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
index 02cf774..2238a29 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
@@ -85,13 +85,15 @@
 				<tr>
 					<th data-formatter="MGrid.indexfn" data-align="center"  data-width="30px" >序号</th>
 					<th data-field="SHOP_NAME" >门店</th>
-					<th data-field="consume_time"  data-formatter="MGrid.getTime"  data-sortable="true"   >服务日期</th>
+					<th data-field="yy_time"  data-formatter="MGrid.getTime"  data-sortable="true"   >预约时间</th>
+					<th data-field="consume_time"  data-formatter="MGrid.getTime"  data-sortable="true"   >划扣时间</th>
 					<th data-field="SERVICE_NO" >服务单号</th>
 					<th data-field="PROJ_NAME" >服务名称</th>
 					<th data-field="TYPE_NAME" >分类</th>
 					<th data-field="VIP_NAME" >客户名</th>
-      			    <th data-field="COUNT"  data-sortable="true"     >次数</th>
-      			    <th data-field="PRICE"  data-sortable="true"       >单价</th>
+      			    <th data-field="COUNT"  data-sortable="true">次数</th>
+      			    <th data-field="PRICE"  data-sortable="true">划扣单价</th>
+      			    <th data-field="extract"  data-sortable="true"  >提成</th>
       			    <th data-field="su_name" >美疗师</th>
       			    <th data-field="SOURCE" >来源</th>
 				</tr>
@@ -115,7 +117,9 @@
 			//有删除权限
 			var delUrl="";
 			myGrid=MGrid.initGrid({
-				 url:basePath+"/admin/serviceStatistics/showList"
+				 url:basePath+"/admin/serviceStatistics/showList",
+				sortName:"yy_time",
+				sortOrder:"desc"
 			 });
 		});
 		
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
index 5ee4eca..2be1c8b 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -257,6 +257,7 @@
                                         <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
                                         <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
                                         <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
+                                        <el-button type="text"  @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button>
                                         <el-button  type="text" size="small" @click="openProjUseFlow(scope.$index, scope.row)">操作记录</el-button>
                                     </template>
                                 </el-table-column>
@@ -293,6 +294,7 @@
                                         <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效' && scope.row.taocanId == null" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
                                         <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结' && scope.row.taocanId == null" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
                                         <el-button matrix:btn="vipInfo-cardEdit" v-if="scope.row.taocanId == null" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
+                                        <el-button type="text" v-if="scope.row.orderId != null"  @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button>
                                         <el-button  type="text" size="small" @click="openProjUseFlow(scope.$index, scope.row)">操作记录</el-button>
                                     </template>
                                 </el-table-column>
@@ -333,10 +335,6 @@
                                         label="状态">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="isVipCar"
-                                        label="是否是会籍卡"  :formatter="cardIsVipFormatter">
-                                </el-table-column>
-                                <el-table-column
                                         prop="isOver"
                                         label="是否使用完成" :formatter="cardIsOrderFormatter">
                                 </el-table-column>
@@ -350,10 +348,11 @@
                                 </el-table-column>
                                 <el-table-column label="操作" fixed="right" width="160">
                                     <template slot-scope="scope">
-                                        <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button>
-                                        <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
-                                        <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
+                                        <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效' && scope.row.isVipCar =='N' " type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button>
+                                        <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效' && scope.row.isVipCar =='N'  " type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
+                                        <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结' && scope.row.isVipCar =='N' " type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
                                         <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
+                                        <el-button type="text"  v-if="scope.row.isVipCar =='N'"  @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button>
                                         <el-button  type="text" size="small" @click="openMoneyCardUseFlow(scope.$index, scope.row)">操作记录</el-button>
                                     </template>
                                 </el-table-column>
@@ -717,6 +716,15 @@
             }
         },
         methods : {
+            //打开订单详情页面
+            openOrder(index,row){
+                layer.full(layer.open({
+                    type : 2,
+                    title : "订单详情",
+                    maxmin : true,
+                    content : [ basePath + '/admin/order/orderItem?id=' + row.orderId ]
+                }));
+            },
             querySearch(queryString, cb) {
                 $.AjaxProxy({
                     p: {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html
index 9db97ac..130f97d 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html
@@ -98,7 +98,7 @@
 
     <el-row class="table-style"  >
 
-        <el-table id="proj" :data="table.rows"  :height="height" stripe>
+        <el-table id="proj" :data="table.rows"  :height="height" stripe @sort-change="sortChange">
             <el-table-column
                     prop="orderNo"
                     label="订单号"
@@ -112,16 +112,19 @@
             </el-table-column>
             <el-table-column
                     prop="createTime"
+                    sortable="custom"
                     label="交易时间"
                     show-overflow-tooltip
                     width="180">
             </el-table-column>
             <el-table-column
                     prop="flowType"
+                    sortable="custom"
                     label="交易类型">
             </el-table-column>
             <el-table-column
                     prop="amount"
+                    sortable="custom"
                     label="交易金额">
             </el-table-column>
             <el-table-column
@@ -130,6 +133,7 @@
             </el-table-column>
             <el-table-column
                     prop="payMethod"
+                    sortable="custom"
                     label="支付方式">
             </el-table-column>
             <el-table-column
@@ -191,6 +195,8 @@
                 orderNo:'',
                 oprationMan:'',
                 queryKey:'',
+                order:'',
+                sort:''
             },
             height:'calc(100vh - 240px)',
             flowTypeList:[
@@ -226,6 +232,17 @@
             resetForm(formName) {
                 this.$refs[formName].resetFields();
             },
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadData();
+                }
+            },
             loadData:function(){
                 let _this = this;
                 let data=_this.getRequestParam();
@@ -240,6 +257,22 @@
                         _this.table.total=data.total;
                     }
                 });
+            },
+            getRequestParam(){
+                let _this = this;
+                return   {
+                    name:_this.form.name,
+                    payMethod:_this.form.payMethod,
+                    flowType:_this.form.flowType,
+                    orderNo:_this.form.orderNo,
+                    oprationMan:_this.form.oprationMan,
+                    queryKey:_this.form.queryKey,
+                    startTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[0]).format("YYYY-MM-DD HH:mm"):'',
+                    endTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[1]).format("YYYY-MM-DD HH:mm"):'',
+                    shopId:_this.form.shopId,
+                    order:_this.form.order,
+                    sort:_this.form.sort,
+                }
             },
             search:function(){
                 this.table.currentPage=1;
@@ -258,19 +291,6 @@
                     maxmin : true,
                     content : [ basePath + '/admin/order/orderItem?id=' + row.orderId ]
                 }));
-            },
-            getRequestParam(){
-                let _this = this;
-                return   {
-                    name:_this.form.name,
-                    payMethod:_this.form.payMethod,
-                    flowType:_this.form.flowType,
-                    orderNo:_this.form.orderNo,
-                    oprationMan:_this.form.oprationMan,
-                    queryKey:_this.form.queryKey,
-                    startTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[0]).format("YYYY-MM-DD HH:mm"):'',
-                    endTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[1]).format("YYYY-MM-DD HH:mm"):'',
-                }
             },
             //导出
           exportExcel(){
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
index af8c3ce..80f18c5 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
@@ -77,15 +77,18 @@
 			<thead>
 				<tr>
 					<th data-formatter="MGrid.indexfn" data-align="center"  data-width="30px" >序号</th>
-					<th data-field="consume_time"  data-formatter="MGrid.getTime"  data-sortable="true"   >服务日期</th>
+					<th data-field="SHOP_NAME" >门店</th>
+					<th data-field="yy_time"  data-formatter="MGrid.getTime"  data-sortable="true"   >预约时间</th>
+					<th data-field="consume_time"  data-formatter="MGrid.getTime"  data-sortable="true"   >划扣时间</th>
 					<th data-field="SERVICE_NO" >服务单号</th>
 					<th data-field="PROJ_NAME" >服务名称</th>
 					<th data-field="TYPE_NAME" >分类</th>
 					<th data-field="VIP_NAME" >客户名</th>
-      			    <th data-field="COUNT"  data-sortable="true"     >次数</th>
-      			    <th data-field="PRICE"  data-sortable="true"       >单价</th>
-      			    <th data-field="su_name" >美疗师</th>
-      			    <th data-field="SOURCE" >来源</th>
+					<th data-field="COUNT"  data-sortable="true"     >次数</th>
+					<th data-field="PRICE"  data-sortable="true"       >划扣单价</th>
+					<th data-field="extract"  data-sortable="true"  >提成</th>
+					<th data-field="su_name" >美疗师</th>
+					<th data-field="SOURCE" >来源</th>
 				</tr>
 			</thead>
 		</table>
@@ -107,7 +110,9 @@
 			//有删除权限
 			var delUrl="";
 			myGrid=MGrid.initGrid({
-				 url:basePath+"/admin/serviceStatistics/showList"
+				url:basePath+"/admin/serviceStatistics/showList",
+				sortName:"yy_time",
+				sortOrder:"desc"
 			 });
 		});
 		

--
Gitblit v1.9.1