From d65675232238852047ffcea0a0a2230104c7a4e5 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Wed, 02 Mar 2022 22:50:00 +0800
Subject: [PATCH] Merge branch '配置文件改造' into developer
---
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java | 55 +++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 45 insertions(+), 10 deletions(-)
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 86db596..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
@@ -1,5 +1,6 @@
package com.matrix.system.hive.action;
+import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.matrix.core.anotations.RemoveRequestToken;
@@ -24,19 +25,19 @@
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;
import com.matrix.system.hive.service.*;
+import com.matrix.system.hive.vo.ServiceOrderInfoVo;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
@@ -124,9 +125,28 @@
List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(id);
if (CollUtil.isNotEmpty(beauticianStateList)) {
for (SysBeauticianState sysBeauticianState : beauticianStateList) {
+ SysProjUse item = sysBeauticianState.getProjUse();
+
+ // 若项目/套餐无效,则打印时,不显示余次
+ if (!"无效".equals(item.getStatus())) {
+ item.setRemainCount(item.getSurplusCount());
+ } else {
+ item.setRemainCount(null);
+ }
+
if (sysBeauticianState.getProjUse().getTaocanId() != null) {
SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId());
+ if (!"无效".equals(sysProjUse.getStatus())) {
+ item.setRemainCount(sysProjUse.getSurplusCount());
+ } else {
+ item.setRemainCount(null);
+ }
+
sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName()+"--"+sysBeauticianState.getProjInfo().getName());
+ if ("Y".equals(sysProjUse.getIsCourse()) && "Y".equals(sysProjUse.getIsInfinite())) {
+ int count = projUseService.findTaocanCountForCourseAndInfinite(sysBeauticianState.getProjUse().getTaocanId(), projServices.getVipId());
+ item.setRemainCount(count);
+ }
}
}
}
@@ -143,6 +163,20 @@
result.setStatus(AjaxResult.STATUS_SUCCESS);
return result;
+ }
+
+ /**
+ * 根据id查询服务单简单信息
+ */
+ @RequestMapping(value = "/findServiceOrderInfoVo/{id}")
+ public @ResponseBody
+ AjaxResult findServiceOrderInfoVo(@PathVariable Long id) {
+ // 获取服务单信息
+ SysProjServices projServices = sysProjServicesService.findById(id);
+
+ ServiceOrderInfoVo serviceOrderInfoVo= BeanUtil.copyProperties(projServices,ServiceOrderInfoVo.class);
+
+ return AjaxResult.buildSuccessInstance(serviceOrderInfoVo);
}
@@ -162,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;
@@ -429,13 +464,12 @@
*/
@RequestMapping(value = "/updateOrderTime")
public @ResponseBody
- AjaxResult updateOrderTime(SysProjServices serviceQuery) {
- SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId());
- sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId());
+ AjaxResult updateOrderTime(@RequestBody ServiceOrderTimeDto serviceOrderTimeDto) {
+ sysProjServicesDao.updateOrderTime(serviceOrderTimeDto);
// 更新业绩时间
AchieveNew achieveNew = new AchieveNew();
- achieveNew.setServiceOrderId(serviceQuery.getId());
- achieveNew.setDatatime(serviceQuery.getConsumeTime());
+ achieveNew.setServiceOrderId(serviceOrderTimeDto.getId());
+ achieveNew.setDatatime(serviceOrderTimeDto.getConsumeTime());
achieveNewService.modifyAchieveTime(achieveNew);
return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
}
@@ -696,7 +730,7 @@
String title = "服务订单明细";
orderSheet.setSheetName(title);
orderSheet.setTitle(title);
- String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "所属门店"};
+ String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","状态","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "划扣人", "所属门店"};
orderSheet.setHeaders(header);
List<SysProjServices> dataList = projServicesSerivce.findByModel(projServices);
@@ -717,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);
}
--
Gitblit v1.9.1