From ecbc9879142993ab2e99e2712b5d5bba282c4b72 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Tue, 22 Feb 2022 23:40:21 +0800
Subject: [PATCH] fead:新增服务单划扣人
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml | 7 ++-
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml | 25 +++++++++++-
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html | 1
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java | 2 +
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java | 5 ++
zq-erp/pom.xml | 4 +-
zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java | 12 ++++--
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
zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html | 1
10 files changed, 84 insertions(+), 13 deletions(-)
diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index e2607e6..a4dbca9 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -413,11 +413,11 @@
<exclude>config/xcx/*</exclude>
<exclude>config/xcshop/*</exclude>
- <!---->
+ <!--
<exclude>config/config.json</exclude>
<exclude>config/application.properties</exclude>
<exclude>config/system.properties</exclude>
-
+-->
<exclude>**/*.woff</exclude>
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 0217131..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,6 +57,12 @@
* 员工编号(美容顾问) 下单人id
*/
private Long staffId;
+ /**
+ * 收银员姓名
+ */
+ @Extend
+ private String cashierName;
+
/**
* 收银员
@@ -147,10 +154,7 @@
/* 会员手机号
*/
private String vipPhone;
- /**
- * 收银员姓名
- */
- private String cashierName;
+
private String staffName;
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/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 6b6dfc9..eb2c3aa 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -14,7 +14,7 @@
<result property="orderNo" column="ORDER_NO"/>
<result property="activity" column="ACTIVITY"/>
<result property="total" column="TOTAL"/>
- <result property="cashierName" column="cashierName"/>
+
<result property="statu" column="STATU"/>
<result property="zkTotal" column="ZK_TOTAL"/>
@@ -31,7 +31,7 @@
<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"/>
@@ -347,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,
@@ -355,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>
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/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/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