From bbe0a2fd03063316e50cf141986bda984599bbda Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Tue, 22 Feb 2022 23:41:42 +0800 Subject: [PATCH] Merge branch 'developer' --- zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml | 32 ++++++++-- zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml | 25 +++++++- zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html | 1 zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java | 3 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java | 2 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html | 1 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 5 + zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html | 1 zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html | 1 zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java | 5 + zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java | 31 ++++++++++ zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java | 39 +++++++++++++ zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html | 1 13 files changed, 135 insertions(+), 12 deletions(-) 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 68cd634..9113db7 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 @@ -537,7 +537,7 @@ String title = "订单记录"; orderSheet.setSheetName(title); orderSheet.setTitle(title); - String[] header = {"订单号", "客户姓名", "客户手机", "下单时间", "订单总价", "折后价", "现金付款", "卡付款", "顾问姓名", "所属门店", "订单状态"}; + String[] header = {"订单号", "客户姓名", "客户手机", "下单时间", "订单总价", "折后价", "现金付款", "卡付款", "顾问姓名", "收银员", "所属门店", "订单状态"}; orderSheet.setHeaders(header); //门店只能查询本店自己的订单 List<SysOrder> dataList = orderService.findInPage(sysOrder, null); @@ -554,6 +554,7 @@ temp.add(item.getCashPay()); temp.add(item.getCardPay()); temp.add(item.getStaffName()); + temp.add(item.getCashierName()); temp.add(item.getShopName()); temp.add(item.getStatu()); list.add(temp); 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 020b110..f8b24a4 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 @@ -25,6 +25,7 @@ import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.common.tools.ResponseHeadUtil; import com.matrix.system.constance.Dictionary; +import com.matrix.system.hive.action.util.QueryUtil; import com.matrix.system.hive.bean.*; import com.matrix.system.hive.dao.*; import com.matrix.system.hive.dto.ServiceOrderTimeDto; @@ -195,6 +196,7 @@ if (!DataAuthUtil.hasAllShopAuth()) { projService.setShopId(getMe().getShopId()); } + QueryUtil.setQueryLimitCom(projService); List<SysProjServices> dataList = projServicesSerivce.findInPage(projService, pageVo); AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, projServicesSerivce.findTotal(projService)); return result; @@ -728,7 +730,7 @@ String title = "服务订单明细"; orderSheet.setSheetName(title); orderSheet.setTitle(title); - String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "所属门店"}; + String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","状态","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "划扣人", "所属门店"}; orderSheet.setHeaders(header); List<SysProjServices> dataList = projServicesSerivce.findByModel(projServices); @@ -749,6 +751,7 @@ temp.add(item.getBeautiName()); temp.add(item.getPlsName()); temp.add(item.getCreateStaffName()); + temp.add(item.getCashierName()); temp.add(item.getShopName()); list.add(temp); } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java index f160d12..62d0769 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java @@ -1,5 +1,6 @@ package com.matrix.system.hive.bean; +import com.matrix.core.anotations.Extend; import com.matrix.core.tools.DateUtil; import org.springframework.format.annotation.DateTimeFormat; @@ -56,7 +57,18 @@ * 员工编号(美容顾问) 下单人id */ private Long staffId; - + /** + * 收银员姓名 + */ + @Extend + private String cashierName; + + + /** + * 收银员 + */ + private Long cashierId; + /** * 商机id */ @@ -143,6 +155,7 @@ */ private String vipPhone; + private String staffName; private String shopName; @@ -200,6 +213,22 @@ */ private Integer isHasRefund; + public String getCashierName() { + return cashierName; + } + + public void setCashierName(String cashierName) { + this.cashierName = cashierName; + } + + public Long getCashierId() { + return cashierId; + } + + public void setCashierId(Long cashierId) { + this.cashierId = cashierId; + } + public Integer getIsHasRefund() { return isHasRefund; } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java index 628ca52..a974e87 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java @@ -73,6 +73,22 @@ private Long beauticianId; /** + * 员工编号(美容顾问) 下单人id + */ + private Long staffId; + /** + * 收银员姓名 + */ + @Extend + private String cashierName; + + + /** + * 收银员 + */ + private Long cashierId; + + /** * 仪器 */ private Long deviceId; @@ -336,6 +352,29 @@ @Extend private String pageFlae; + public Long getStaffId() { + return staffId; + } + + public void setStaffId(Long staffId) { + this.staffId = staffId; + } + + public String getCashierName() { + return cashierName; + } + + public void setCashierName(String cashierName) { + this.cashierName = cashierName; + } + + public Long getCashierId() { + return cashierId; + } + + public void setCashierId(Long cashierId) { + this.cashierId = cashierId; + } public Integer getOvertimeNotice() { return overtimeNotice; 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 4827111..e42eaaf 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 @@ -519,7 +519,12 @@ * @param pageOrder */ private void updateOrderInfo(SysOrder pageOrder) { + + SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); + pageOrder.setCashierId(user.getSuId()); + pageOrder.setPayTime(new Date()); + pageOrder.setStatu(Dictionary.ORDER_STATU_YFK); List<SysOrderFlow> flows = pageOrder.getFlows(); diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java index 51fea08..28a71f0 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java @@ -680,6 +680,7 @@ @Transactional(rollbackFor = Exception.class) @Override public int modifyHKProjServices(SysProjServices projServices) throws GlobleException { + SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); projServices = sysProjServicesDao.selectById(projServices.getId()); if (!projServices.getState().equals(Dictionary.SERVICE_STATU_FWWC)) { throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!"); @@ -708,6 +709,7 @@ projServices.setState(Dictionary.SERVICE_STATU_FFJS); projServices.setConsumeTime(new Date()); + projServices.setCashierId(sysUsers.getSuId()); int result = sysProjServicesDao.update(projServices); achieveNewService.addAchieveByServiceOrder(projServices); diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml index 955e108..eb2c3aa 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml @@ -15,6 +15,7 @@ <result property="activity" column="ACTIVITY"/> <result property="total" column="TOTAL"/> + <result property="statu" column="STATU"/> <result property="zkTotal" column="ZK_TOTAL"/> <result property="shopId" column="SHOP_ID"/> @@ -29,7 +30,8 @@ <result property="cardPay" column="card_Pay"/> <result property="arrears" column="arrears"/> <result property="payTime" column="pay_time"/> - + <result property="cashierId" column="cashier_id"/> + <result property="cashierName" column="cashierName"/> <!-- 扩展字段 --> <result property="shopName" column="SHOP_NAME"/> <result property="shopShortName" column="SHOP_SHORT_NAME"/> @@ -64,7 +66,8 @@ pay_time, company_id, orderType, - is_has_refund + is_has_refund, + cashier_id ) VALUES ( #{id}, @@ -88,7 +91,8 @@ #{payTime}, #{companyId}, #{orderType}, - #{isHasRefund} + #{isHasRefund}, + #{cashierId} ) </insert> @@ -151,7 +155,9 @@ <if test="isHasRefund != null "> is_has_refund = #{isHasRefund}, </if> - + <if test="cashierId != null "> + cashier_id = #{cashierId}, + </if> </set> WHERE id=#{id} </update> @@ -174,11 +180,12 @@ <!-- 分页查询 --> <select id="selectInPage" resultMap="SysOrderMap"> select - a.*, b.VIP_NAME, c.su_name as STAFF_NAME, + a.*, b.VIP_NAME, c.su_name as STAFF_NAME, e.su_name as cashierName, d.SHOP_NAME, b.PHONE from sys_order a LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID left JOIN sys_users c on c.su_id=a.STAFF_ID + left JOIN sys_users e on e.su_id=a.cashier_id left JOIN sys_shop_info d on d.ID=a.SHOP_ID where 1=1 <if test="record!=null"> @@ -208,6 +215,9 @@ </if> <if test="record.staffId != null and record.staffId !='' "> and a.STAFF_ID = #{record.staffId} + </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} </if> <if test="record.isCross != null and record.isCross !='' "> and a.IS_CROSS = #{record.isCross} @@ -290,6 +300,9 @@ <if test="record.staffId != null and record.staffId !='' "> and a.STAFF_ID = #{record.staffId} </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} + </if> <if test="(record.companyId!=null and record.companyId!='') "> and a.company_id = #{record.companyId} </if> @@ -334,7 +347,7 @@ <select id="selectById" resultMap="SysOrderMap"> select a.*, - c.su_name as STAFF_NAME, + c.su_name as STAFF_NAME, e.su_name as cashierName, d.SHOP_NAME, d.shop_short_name, b.PHONE, @@ -342,6 +355,7 @@ from sys_order a LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID left JOIN sys_users c on c.su_id=a.STAFF_ID + left JOIN sys_users e on e.su_id=a.cashier_id left JOIN sys_shop_info d on d.ID=a.SHOP_ID where a.id=#{id} </select> @@ -384,6 +398,9 @@ <if test="record.staffId != null and record.staffId !='' "> and a.STAFF_ID = #{record.staffId} + </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} </if> <if test="record.isCross != null and record.isCross !='' "> and a.IS_CROSS = #{record.isCross} @@ -441,6 +458,9 @@ <if test="record.staffId != null and record.staffId !='' "> and a.STAFF_ID = #{record.staffId} </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} + </if> <if test="record.isCross != null and record.isCross !='' "> and a.IS_CROSS = #{record.isCross} </if> diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml index 558112d..902cbc7 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml @@ -41,7 +41,8 @@ <result property="comment" column="comment"/> <result property="reply" column="reply"/> <result property="overtimeNotice" column="overtime_notice"/> - + <result property="cashierId" column="cashier_id"/> + <result property="cashierName" column="cashierName"/> <result property="beautiName" column="beautiName"/> @@ -50,6 +51,7 @@ <result property="createStaffName" column="createStaffName"/> <result property="bedName" column="bedName"/> <result property="vipName" column="VIP_Name"/> + <association property="vipInfo" resultMap="com.matrix.system.hive.dao.SysVipInfoDao.SysVipInfoMapSimple" ></association> @@ -95,7 +97,8 @@ company_id, comment, reply, - overtime_notice + overtime_notice, + cashier_id ) VALUES ( #{id}, @@ -133,7 +136,8 @@ #{companyId}, #{comment}, #{reply}, - #{overtimeNotice} + #{overtimeNotice}, + #{cashierId} ) </insert> @@ -265,6 +269,9 @@ <if test="overtimeNotice != null "> overtime_notice = #{overtimeNotice}, </if> + <if test="cashierId != null "> + cashier_id = #{cashierId}, + </if> </set> WHERE id=#{id} </update> @@ -294,6 +301,7 @@ (select su_name from sys_users f where a.CREATE_STAFF_ID=f.su_id ) as createStaffName, (select su_name from sys_users j where a.BEAUTICIAN_ID=j.su_id ) as beautiName, (select su_name from sys_users k where a.devision_id=k.su_id ) as plsName, + (select su_name from sys_users l where a.cashier_id=l.su_id ) as cashierName, (select shop_name from sys_shop_info h where a.SHOP_ID=h.ID ) as shopName, (select bed_name from sys_bed_info i where a.BED_ID=i.ID ) as bedName FROM sys_proj_services a @@ -325,6 +333,9 @@ </if> <if test="record.state != null and record.state !='' "> and a.STATE = #{record.state} + </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} </if> <if test="record.shopId != null and record.shopId !='' "> AND a.SHOP_ID = #{record.shopId} @@ -387,6 +398,9 @@ and a.STATE = #{record.state} </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} + </if> <if test="(record.companyId!=null and record.companyId!='') "> and a.company_id = #{record.companyId} </if> @@ -423,6 +437,7 @@ (select su_name from sys_users f where a.CREATE_STAFF_ID=f.su_id ) as createStaffName, (select su_name from sys_users j where a.BEAUTICIAN_ID=j.su_id ) as beautiName, (select su_name from sys_users k where a.devision_id=k.su_id ) as plsName, + (select su_name from sys_users l where a.cashier_id=l.su_id ) as cashierName, (select shop_name from sys_shop_info h where a.SHOP_ID=h.ID ) as shopName, (select bed_name from sys_bed_info i where a.BED_ID=i.ID ) as bedName FROM sys_proj_services a @@ -455,6 +470,7 @@ (select su_name from sys_users f where a.CREATE_STAFF_ID=f.su_id ) as createStaffName, (select su_name from sys_users j where a.BEAUTICIAN_ID=j.su_id ) as beautiName, (select su_name from sys_users k where a.devision_id=k.su_id ) as plsName, + (select su_name from sys_users l where a.cashier_id=l.su_id ) as cashierName, (select shop_name from sys_shop_info h where a.SHOP_ID=h.ID ) as shopName, (select bed_name from sys_bed_info i where a.BED_ID=i.ID ) as bedName FROM sys_proj_services a @@ -483,6 +499,9 @@ <if test="record.state != null and record.state !='' "> and a.STATE = #{record.state} </if> + <if test="record.cashierId != null and record.cashierId !='' "> + and a.cashier_id = #{record.cashierId} + </if> <if test="record.shopId != null and record.shopId !='' "> AND a.SHOP_ID = #{record.shopId} </if> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html index c1f81ad..db60893 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html @@ -95,6 +95,7 @@ <th data-field="bedName">床位</th> <th data-field="plsName" >配料师</th> <th data-field="createStaffName">创建人</th> + <th data-field="cashierName">划扣人</th> <th data-field="shopName">所属门店</th> </tr> </thead> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html index eb8abf4..1d42fa1 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html @@ -106,6 +106,7 @@ <th data-field="total">订单总价</th> <th data-field="zkTotal">折后价</th> <th data-field="staffName">顾问姓名</th> + <th data-field="cashierName">收银员</th> <th data-field="cashPay">现金付款</th> <th data-field="cardPay">卡付款</th> <th data-field="arrears">欠款</th> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html index 6f356c3..a5dc90e 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html @@ -121,6 +121,7 @@ <th data-field="totalTime" data-sortable="true">服务时长</th> <th data-field="isOverTime" data-formatter="overTime">超时时间</th> <th data-field="createStaffName">下单顾问</th> + <th data-field="cashierName">划扣人</th> <th data-field="shopName">门店</th> <th data-sortable="true" data-field="id" data-formatter="buidOperate">操作</th> </tr> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html index 5bc8e86..b002fc6 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html @@ -91,6 +91,7 @@ <th data-field="payTime" data-formatter="MGrid.getTime" data-sortable="true">支付时间</th> <th data-field="staffName">下单顾问</th> + <th data-field="cashierName">收银员</th> <th data-field="cashPay">现金支付金额</th> <th data-field="cardPay">卡支付金额</th> <th data-field="arrears">欠款金额</th> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html index df57798..2e0ac9b 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html @@ -85,6 +85,7 @@ <th data-field="bedName">床位</th> <th data-field="plsName" >配料师</th> <th data-field="createStaffName">创建人</th> + <th data-field="cashierName">划扣人</th> <th data-field="shopName">所属门店</th> </tr> </thead> -- Gitblit v1.9.1