zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java
@@ -7,8 +7,7 @@ import com.matrix.core.pojo.PaginationVO; import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.constance.Dictionary; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.hive.action.util.QueryUtil; import com.matrix.system.hive.bean.SysShopInfo; import com.matrix.system.hive.service.SysShopInfoService; @@ -114,7 +113,7 @@ public @ResponseBody AjaxResult findAllWithPermi(SysShopInfo shopInfo) { QueryUtil.setQueryLimitCom(shopInfo); SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { shopInfo.setId(sysUsers.getShopId()); } return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
@@ -62,7 +62,7 @@ public List<AchieveNew> findSumDailyInfoNew(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); List<AchieveNew> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); List<Map<String, Object>> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); int selectVipConsumeStatisticsTotal(@Param("record") AchieveNew achieveNew); zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java
@@ -1,14 +1,14 @@ package com.matrix.system.hive.service; import java.util.List; import com.matrix.core.pojo.PaginationVO; import com.matrix.system.app.vo.UserAchieveVo; import com.matrix.system.hive.bean.AchieveNew; import com.matrix.system.hive.bean.SysOrder; import com.matrix.system.hive.bean.SysProjServices; import com.matrix.core.pojo.PaginationVO; import com.matrix.system.hive.plugin.util.BaseServices; import java.util.List; import java.util.Map; /** * @@ -109,7 +109,7 @@ public void modifyAchieveTime(AchieveNew achieveNew); List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); List<Map<String, Object>> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); int findVipConsumeStatisticsTotal(AchieveNew achieveNew); zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
@@ -390,7 +390,7 @@ } @Override public List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { public List<Map<String, Object>> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { return achieveNewDao.selectVipConsumeStatisticsList(achieveNew, pageVo); } zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -11,8 +11,8 @@ import com.matrix.core.tools.excl.ExcelVersion; import com.matrix.system.common.bean.CustomerDataDictionary; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.common.tools.ResponseHeadUtil; import com.matrix.system.hive.action.util.QueryUtil; import com.matrix.system.hive.bean.AchieveNew; @@ -78,7 +78,7 @@ public @ResponseBody AjaxResult findSumDailyInfoNew(@RequestBody AchieveNew achieveNew) { SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { achieveNew.setShopId(sysUsers.getShopId()); } AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, achieveNewService.findSumDailyInfoNew(achieveNew, null), @@ -95,7 +95,7 @@ AjaxResult findDailyInfoNew(@RequestBody AchieveNew achieveNew) { SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); achieveNew.setCompanyId(sysUsers.getCompanyId()); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { achieveNew.setShopId(sysUsers.getShopId()); } PaginationVO pageVo = new PaginationVO(); @@ -121,7 +121,7 @@ , "服务提成", "人头", "项目个数", "服务时间", "订单类型"}; orderSheet.setHeaders(header); SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { queryDto.setShopId(sysUsers.getShopId()); } queryDto.setCompanyId(sysUsers.getCompanyId()); @@ -198,7 +198,7 @@ orderSheet.setHeaders(header); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { achieveNew.setShopId(sysUsers.getShopId()); } zq-erp/src/main/java/com/matrix/system/hive/statistics/SysBusinessDataAction.java
@@ -6,7 +6,7 @@ import com.matrix.core.tools.DateUtil; import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.hive.dao.SysBusinessDataDao; import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam; import com.matrix.system.hiveErp.analysUtil.StatisticsTimeUtil; @@ -39,7 +39,7 @@ public @ResponseBody AjaxResult showList(BusinessDataShowVo businessDataShowVo, PaginationVO pageVo) { SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { businessDataShowVo.setShopId(sysUsers.getShopId()+""); } pageVo.setSort("createTime"); zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java
@@ -5,7 +5,7 @@ import com.matrix.core.pojo.PaginationVO; import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.hive.bean.AchieveNew; import com.matrix.system.hive.service.AchieveNewService; import org.springframework.beans.factory.annotation.Autowired; @@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 客户数据统计 @@ -33,10 +33,10 @@ @ResponseBody public AjaxResult vipConsumeStatistics(AchieveNew achieveNew, PaginationVO pageVo) { SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ if (!DataAuthUtil.hasAllShopAuth()) { achieveNew.setShopId(sysUsers.getShopId()); } List<AchieveNew> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); List<Map<String, Object>> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); int total = achieveNewService.findVipConsumeStatisticsTotal(achieveNew); return AjaxResult.buildSuccessInstance(list, total); } zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -865,40 +865,36 @@ </select> <select id="selectVipConsumeStatisticsList" resultMap="AchieveNewMap"> <select id="selectVipConsumeStatisticsList" resultType="java.util.HashMap"> select a.VIP_NAME, a.VIP_NAME vipName, a.PHONE t9, GROUP_CONCAT(DISTINCT e.su_name) meiliao, d.cnt arrive_cnt, sum(b.buyConsume) goods_cash, sum(b.freeConsume) free_consume, sum(b.hisConsume) his_consume b.su_name meiliao, (SELECT sum(IFNULL(goods_cash,0)) from achieve_new where pay_method='现金' and VIP_ID=a.id <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'goodsCash' , (SELECT sum(IFNULL(goods_cash,0)) from achieve_new where pay_method='划扣' and VIP_ID=a.id <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if>) as 'cardCash' , (SELECT sum(IFNULL(free_consume,0)) from achieve_new where VIP_ID=a.id <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'freeConsume' , (SELECT sum(IFNULL(number_of_people,0)) from achieve_new where VIP_ID=a.id <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'arriveCnt' , (SELECT sum(IFNULL(his_consume,0)) from achieve_new where VIP_ID=a.id <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'hisConsume' from sys_vip_info a inner join ( select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) )) buyConsume from achieve_new a group by vip_id ) b on a.ID = b.vip_id inner join ( select vip_id, count(1) cnt from ( select vip_id, date_format(datatime, '%Y-%m-%d') from achieve_new group by date_format(datatime, '%Y-%m-%d'), vip_id ) c group by vip_id ) d on a.ID=d.vip_id left join sys_users b on a.BEATUY_ID=b.su_id inner join sys_shop_info c on c.id=a.SHOP_ID <where> left join sys_users e on find_in_set(e.su_id, a.BEATUY_ID) where 1=1 <if test="record.vipName != null and record.vipName !=''"> and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) </if> <if test="record.shopId != null"> and a.shop_id=#{record.shopId} </if> <if test="record.beginTime != null"> and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime!=null"> and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.endTime}, '%Y-%m-%d') </if> <if test="record.beaultId != null and record.beaultId!=''"> and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) @@ -906,7 +902,7 @@ <if test='record.t1 == "on"'> and a.BEATUY_ID is not null </if> group by a.PHONE </where> <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> <if test="pageVo.sort !=null and pageVo.order !=null"> order by @@ -922,30 +918,15 @@ <select id="selectVipConsumeStatisticsTotal" resultType="java.lang.Integer"> select count(1) from sys_vip_info a inner join ( select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) ) buyConsume from achieve_new a group by vip_id ) b on a.ID = b.vip_id inner join ( select vip_id, count(1) cnt from ( select vip_id, date_format(datatime, '%Y-%m-%d') from achieve_new group by date_format(datatime, '%Y-%m-%d'), vip_id ) c group by vip_id ) d on a.ID=d.vip_id left join sys_users b on a.BEATUY_ID=b.su_id inner join sys_shop_info c on c.id=a.SHOP_ID <where> left join sys_users e on find_in_set(e.su_id, a.BEATUY_ID) where 1=1 <if test="record.vipName != null and record.vipName !=''"> and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) </if> <if test="record.shopId != null"> and a.shop_id=#{record.shopId} </if> <if test="record.beginTime != null"> and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> <if test="record.endTime!=null"> and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.endTime}, '%Y-%m-%d') </if> <if test="record.beaultId != null and record.beaultId!=''"> and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) @@ -953,6 +934,7 @@ <if test='record.t1 == "on"'> and a.BEATUY_ID is not null </if> </where> </select> zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
@@ -122,7 +122,7 @@ </tr> <tr v-for="(item,index) in projService.serviceItems"> <td>{{item.projInfo.name}}</td> <td>{{item.projInfo.name}}【{{item.projUse.source}}】</td> <td>{{item.count}}</td> <td>{{item.projUse.price * item.count}}</td> <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td> zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-meidu.html
@@ -65,7 +65,7 @@ </tr> <template v-for="item in projService.serviceItems"> <tr > <td style="text-align: left;" colspan="4" >{{item.projInfo.name }}</td> <td style="text-align: left;" colspan="4" >{{item.projInfo.name }}【{{item.projUse.source}}】</td> </tr> <tr > <td>{{item.count }}</td>