From 28d2d010f0dda4c11c024d516287aeee6094548b Mon Sep 17 00:00:00 2001 From: wzy <wzy19931122ai@163.com> Date: Sun, 13 Dec 2020 19:04:45 +0800 Subject: [PATCH] finish daily-list-new --- zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java | 11 +++++ zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html | 27 +++++++++++++ zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml | 21 ++++++++++ zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java | 9 ++++ zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml | 6 +- 5 files changed, 70 insertions(+), 4 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java index 47e7a0b..755216d 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java @@ -7,6 +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.hive.action.util.QueryUtil; import com.matrix.system.hive.bean.SysShopInfo; @@ -108,6 +109,16 @@ QueryUtil.setQueryLimitCom(shopInfo); return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); } + + @RequestMapping(value = "/findAllWithPermi" ) + public @ResponseBody AjaxResult findAllWithPermi(SysShopInfo shopInfo) { + QueryUtil.setQueryLimitCom(shopInfo); + SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); + if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ + shopInfo.setId(sysUsers.getShopId()); + } + return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); + } /** * 查询非总店 商城店铺的门店 * TODO 微商城不应该调用这里的接口 diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java index fee903f..cb92933 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java @@ -200,6 +200,8 @@ private String day; + private String vipQueryKey; + /** * 订单编号 @@ -250,6 +252,13 @@ @Extend private Double achieveMoney; + public String getVipQueryKey() { + return vipQueryKey; + } + + public void setVipQueryKey(String vipQueryKey) { + this.vipQueryKey = vipQueryKey; + } public Long getCompanyId() { return companyId; diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml index 361aeb2..e0e4c58 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml @@ -113,8 +113,20 @@ <if test="(record.endTime!=null )"> and a.datatime <![CDATA[ < ]]> #{record.endTime} </if> + <if test="record.beaultId != null and record.beaultId !='' "> + and a.beault_id = #{record.beaultId} + </if> <if test="record.companyId != null and record.companyId !='' "> and a.company_id = #{record.companyId} + </if> + <if test="record.beaultId != null and record.beaultId !='' "> + and a.beault_id = #{record.beaultId} + </if> + <if test="record.vipQueryKey != null and record.vipQueryKey != '' "> + and c.VIP_NAME like concat('%',#{record.vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{record.vipQueryKey},'%') + or c.PHONE like concat('%',#{record.vipQueryKey},'%') + ) </if> </if> </where> @@ -169,6 +181,15 @@ <if test="record.companyId != null and record.companyId !='' "> and a.company_id = #{record.companyId} </if> + <if test="record.beaultId != null and record.beaultId !='' "> + and a.beault_id = #{record.beaultId} + </if> + <if test="record.vipQueryKey != null and record.vipQueryKey != '' "> + and c.VIP_NAME like concat('%',#{record.vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{record.vipQueryKey},'%') + or c.PHONE like concat('%',#{record.vipQueryKey},'%') + ) + </if> </if> </where> </select> 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 b03d791..b632b39 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml @@ -517,9 +517,9 @@ and c.shop_id =#{shopId} </if> <if test="vipQueryKey != null and vipQueryKey != '' "> - and e.VIP_NAME like concat('%',#{vipQueryKey},'%') - or (e.VIP_NO like concat('%',#{vipQueryKey},'%') - or e.PHONE like concat('%',#{vipQueryKey},'%') + and c.VIP_NAME like concat('%',#{vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{vipQueryKey},'%') + or c.PHONE like concat('%',#{vipQueryKey},'%') ) </if> <if test="goodsName != null and goodsName != '' "> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html index cb72dd9..e833811 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html @@ -71,6 +71,31 @@ <input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">- <input name="endTime" type="text" class="form-control datetimepicker" id="endTime"> </div> + + <div class="form-group mr-20"> + <label>会员</label> + <input autocomplete="off" placeholder="姓名/编号/电话" name="vipQueryKey" type="text" class="form-control" > + </div> + + <div class="form-group mr-20"> + <label>美疗师</label> + <select class="form-control autoFull select2" + th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}" + data-value="suId" + data-filed="suName" + name="beaultId" + id="beaultId"> + <option value="">--请选择美容师--</option> + </select> + </div> + + <div class="form-group mr-20"> + <label>门店</label> + <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId" + th:data-url="@{/admin/shopInfo/findAllWithPermi}"> + <option value=''>--请选择部所属门店--</option> + </select> + </div> </form> @@ -136,7 +161,7 @@ } MTools.ininDatetimepicker(initParam); //限制结束时间不小于开始时间 - MTools.limitStartEndTime({}); + MTools.limitStartEndTime({}); var date = new Date(); var year = date.getFullYear(); -- Gitblit v1.9.1