| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.pojo.TaoCanVo; |
| | | import com.matrix.system.hive.service.*; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.jsoup.helper.DataUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | |
| | | } |
| | | //补充服务单扩展信息=============== |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(id); |
| | | if (CollUtil.isNotEmpty(beauticianStateList)) { |
| | | for (SysBeauticianState sysBeauticianState : beauticianStateList) { |
| | | if (sysBeauticianState.getProjUse().getTaocanId() != null) { |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId()); |
| | | sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName()+"--"+sysBeauticianState.getProjInfo().getName()); |
| | | } |
| | | } |
| | | } |
| | | projServices.setServiceItems(beauticianStateList); |
| | | SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId()); |
| | | projServices.setBedState(sysBedState); |
| | |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | |
| | | SysProjUse queryUse = new SysProjUse(); |
| | | if(Objects.nonNull(vipId)){ |
| | | queryUse.setVipId(vipId); |
| | | }else{ |
| | | SysVipInfo vipInfo = getCurrentVioInfo(); |
| | | queryUse.setVipId(vipInfo.getId()); |
| | | } |
| | | |
| | | queryUse.setVipId(vipId); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | queryUse.setTaocanId(-1L); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); |
| | | List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null); |
| | | taoCanList.forEach(item->{ |
| | | item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId())); |
| | | item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus())); |
| | | item.setProjInfo(shoppingGoodsDao.selectById(item.getProjId())); |
| | | }); |
| | | result.putInMap("projList", projList); |
| | |
| | | return "admin/hive/beautySalon/yypb-form"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 进入预约排班详情 |
| | | * |
| | |
| | | |
| | | //补充服务单扩展信息=============== |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId()); |
| | | if (CollUtil.isNotEmpty(beauticianStateList)) { |
| | | for (SysBeauticianState sysBeauticianState : beauticianStateList) { |
| | | if (sysBeauticianState.getProjUse().getTaocanId() != null) { |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId()); |
| | | if(sysProjUse != null) { |
| | | sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName() + "--" + sysBeauticianState.getProjInfo().getName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | projServices.setServiceItems(beauticianStateList); |
| | | |
| | | SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId()); |
| | |
| | | public @ResponseBody |
| | | AjaxResult updateOrderTime(SysProjServices serviceQuery) { |
| | | SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId()); |
| | | sysProjServicesDao.updateOrderTime(serviceQuery.getCreateTime(), serviceQuery.getId()); |
| | | sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId()); |
| | | // 更新业绩时间 |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | achieveNew.setServiceOrderId(serviceQuery.getId()); |
| | | achieveNew.setDatatime(serviceQuery.getCreateTime()); |
| | | achieveNew.setDatatime(serviceQuery.getConsumeTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id取消预约 |
| | | */ |
| | |
| | | @RequestMapping(value = "/addService") |
| | | public @ResponseBody |
| | | AjaxResult servicceAdd(@RequestBody SysProjServices sysProjServices) { |
| | | SysVipInfo vipInfo = getCurrentVioInfo(); |
| | | sysProjServices.setVipId(vipInfo.getId()); |
| | | |
| | | |
| | | if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目"); |
| | |
| | | if (balanceverifyResult.isError()) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg()); |
| | | } |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_YYCG); |
| | | if (StrUtil.isEmpty(sysProjServices.getState())) { |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_DYY); |
| | | } |
| | | SysProjServices newSysProjServices = sysProjServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(newSysProjServices)); |
| | |
| | | @RequestMapping(value = "/addServiceForForm") |
| | | public @ResponseBody |
| | | AjaxResult servicceAddForForm(SysProjServices sysProjServices) { |
| | | SysVipInfo vipInfo = getCurrentVioInfo(); |
| | | sysProjServices.setVipId(vipInfo.getId()); |
| | | |
| | | |
| | | |
| | | if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目"); |
| | |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/addServiceProj") |
| | | @ResponseBody |
| | | public AjaxResult addServiceProj(SysProjServices sysProjServices) { |
| | | |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | /** |
| | | * 删除服务单项目/套餐 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/delServiceOrderItems") |
| | | @ResponseBody |
| | | public AjaxResult delServiceOrderItems(Long id) { |
| | | sysProjServicesService.deleteProjServiceItemById(id); |
| | | return AjaxResult.buildSuccessInstance("删除成功"); |
| | | } |
| | | |
| | | |
| | | // 准备页面数据 |
| | | private void pageDate() { |
| | | // 根据岗位名称查询员工 |