| | |
| | | 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.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | 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.servlet.ModelAndView; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public @ResponseBody AjaxResult confirmServiceOrder(Long id) { |
| | | int i=sysProjServicesService.confirmServiceOrder(id); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "成功"); |
| | | } |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | |
| | | /** |
| | | * 服务单打印 |
| | | */ |
| | | @RequestMapping(value = "/printOrder") |
| | | public @ResponseBody |
| | | ModelAndView printOrder() throws GlobleException { |
| | | ModelAndView mv = new ModelAndView("admin/hive/beautySalon/print-service"); |
| | | SysUsers user=(SysUsers)WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | String comRegisterCode = sysCompanyDao.selectById(user.getCompanyId()).getComRegisterCode(); |
| | | if(StringUtils.isNotBlank(comRegisterCode)){ |
| | | mv.addObject("page",comRegisterCode); |
| | | }else { |
| | | mv.addObject("page","taiyan"); |
| | | } |
| | | return mv; |
| | | } |
| | | |
| | | /** |
| | | * 根据id对服务单进行派单 |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 根据id取消预约 |
| | |
| | | @RequestMapping(value = "/cancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(SysProjServices services) { |
| | | |
| | | SysProjServices checkProjServices = sysProjServicesDao.selectById(services.getId()); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, checkProjServices.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && shopManageAbleCancelDfkOrder.getParamValue().equals(Dictionary.FLAG_YES)) { |
| | | if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY) |
| | | && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DQR)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待预约订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(services); |
| | | } |
| | | /** |
| | | * 根据id取消预约 |
| | | */ |
| | | @RequestMapping(value = "/erpCancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult erpCancelOrder(SysProjServices services) { |
| | | int i = sysProjServicesService.modifyCancelProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置服务单划扣成功 |