| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.app.dto.IdSubmitDto; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | 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 org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | |
| | | @Autowired |
| | | SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private OperationLogService operationLogService; |
| | | |
| | | |
| | | /** |
| | | * 根据id查询服务单信息 |
| | | */ |
| | |
| | | SysProjUse item = sysBeauticianState.getProjUse(); |
| | | |
| | | // 若项目/套餐无效,则打印时,不显示余次 |
| | | if ("无效".equals(item.getStatus())) { |
| | | 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())) { |
| | | if (!"无效".equals(sysProjUse.getStatus())) { |
| | | item.setRemainCount(sysProjUse.getSurplusCount()); |
| | | } else { |
| | | item.setRemainCount(null); |
| | |
| | | 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; |
| | |
| | | */ |
| | | @RequestMapping(value = "/updateOrderTime") |
| | | public @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | AjaxResult updateOrderTime(@RequestBody ServiceOrderTimeDto serviceOrderTimeDto) { |
| | | sysProjServicesDao.updateOrderTime(serviceOrderTimeDto); |
| | | // 更新业绩时间 |
| | |
| | | achieveNew.setServiceOrderId(serviceOrderTimeDto.getId()); |
| | | achieveNew.setDatatime(serviceOrderTimeDto.getConsumeTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | SysProjServices projServices = sysProjServicesDao.selectById(serviceOrderTimeDto.getId()); |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),getMe().getSuId(), |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.ORDER_UPDATE_TIME, |
| | | projServices.getId(), |
| | | projServices.getServiceNo(), |
| | | projServices.getVipId(), |
| | | "更新参数: "+JSON.toJSONString(serviceOrderTimeDto)); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | | |
| | |
| | | return mv; |
| | | } |
| | | |
| | | /** |
| | | * 根据id对服务单进行派单 |
| | | */ |
| | | @RequestMapping(value = "/paidan") |
| | | public @ResponseBody |
| | | AjaxResult paidan(Long id) { |
| | | SysProjServices services = sysProjServicesService.findById(id); |
| | | int i = sysProjServicesService.modifyPDProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "派单成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "派单失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/addServiceProj") |
| | | @ResponseBody |
| | | public AjaxResult addServiceProj(SysProjServices sysProjServices) { |
| | | |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | /** |
| | | * 删除服务单项目/套餐 |
| | |
| | | |
| | | |
| | | private void doExportServiceOrder(HttpServletResponse response, SysProjServices projServices) throws IOException { |
| | | |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(getMe().getCompanyId(), getMe().getShopId(),getMe().getSuId(), |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.EXPORT, |
| | | String.format("导出参数:%s" , JSON.toJSONString(projServices))); |
| | | |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "服务订单明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "所属门店"}; |
| | | String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","状态","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "划扣人", "所属门店"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | List<SysProjServices> dataList = projServicesSerivce.findByModel(projServices); |
| | |
| | | temp.add(item.getBeautiName()); |
| | | temp.add(item.getPlsName()); |
| | | temp.add(item.getCreateStaffName()); |
| | | temp.add(item.getCashierName()); |
| | | temp.add(item.getShopName()); |
| | | list.add(temp); |
| | | } |