package com.bonus.canteen.core.order.deprecated.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.common.base.BaseController;
import com.bonus.canteen.core.common.base.BasePageParam;
import com.bonus.canteen.core.common.constant.NuclearModeEnum;
import com.bonus.canteen.core.common.enums.FileNameSuffixEnum;
import com.bonus.canteen.core.common.page.PageDTO;
import com.bonus.canteen.core.common.page.PageVO;
import com.bonus.canteen.core.common.page.QueryParseHelper;
import com.bonus.canteen.core.device.api.DeviceApi;
import com.bonus.canteen.core.device.manage.model.DeviceInfo;
import com.bonus.canteen.core.order.android.business.OrderDishesAndroidBusiness;
import com.bonus.canteen.core.order.android.dto.MacOrderImageSaveDTO;
import com.bonus.canteen.core.order.android.dto.OrderCallQueryDTO;
import com.bonus.canteen.core.order.android.vo.OrderCallListVO;
import com.bonus.canteen.core.order.common.business.OrderRefundBusiness;
import com.bonus.canteen.core.order.common.constants.CheckStateEnum;
import com.bonus.canteen.core.order.common.constants.OrderRefundBizEnum;
import com.bonus.canteen.core.order.common.dto.OrderDetailRefundDTO;
import com.bonus.canteen.core.order.common.dto.OrderPartRefundDTO;
import com.bonus.canteen.core.order.common.service.OrderPhotoService;
import com.bonus.canteen.core.order.common.vo.OrderRefundResultVO;
import com.bonus.canteen.core.order.deprecated.dto.*;
import com.bonus.canteen.core.order.deprecated.model.OrdAppInfo;
import com.bonus.canteen.core.order.deprecated.model.OrdExportModel;
import com.bonus.canteen.core.order.deprecated.param.MacOrdParam;
import com.bonus.canteen.core.order.deprecated.param.OrdParam;
import com.bonus.canteen.core.order.deprecated.service.MacOrdBusiness;
import com.bonus.canteen.core.order.deprecated.service.OrdInfoBusiness;
import com.bonus.canteen.core.order.deprecated.service.OrdInfoMachineBusiness;
import com.bonus.canteen.core.order.deprecated.vo.*;
import com.bonus.canteen.core.report.api.ReportOrderApi;
import com.bonus.canteen.core.report.api.dto.ReportOrderSumQueryDTO;
import com.bonus.canteen.core.report.api.vo.ReportDeviceOrderSumVO;
import com.bonus.canteen.core.report.api.vo.ReportOrderDetaiVO;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.houqin.constant.LeConstants;
import com.bonus.common.houqin.constant.RetCodeEnum;
import com.bonus.common.houqin.i18n.I18n;
import com.google.gson.Gson;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@RestController
@Api(
   tags = {"lsh_设备订单控制器"},
   value = "设备订单"
)
public class MacOrdController extends BaseController {
   private static final Logger log = LoggerFactory.getLogger(MacOrdController.class);
   private final MacOrdBusiness macOrdBusiness;
   private final OrdInfoBusiness ordInfoBusiness;
   private final DeviceApi deviceApi;
   private final OrderRefundBusiness orderRefundBusiness;
   private final OrdInfoMachineBusiness ordInfoMachineBusiness;
   private final OrderPhotoService orderPhotoService;
   private final ReportOrderApi reportOrderApi;
   private final OrderDishesAndroidBusiness orderDishesAndroidBusiness;

   @PostMapping({"/api/v1/android/ord/query/page/callnum"})
//   @RequiresGuest
   @ApiOperation("叫号订单列表查询")
   public AjaxResult list(@RequestHeader Map<String, String> headers,
                                               @RequestBody @Valid BasePageParam<OrdCallListDto> basePageParam) {
      log.info("------------叫号2.0-------------------");
      OrdCallListDto ordCallListDto = (OrdCallListDto)basePageParam.getParam();
      if (CharSequenceUtil.isBlank(ordCallListDto.getMachineSn())) {
         ordCallListDto.setMachineSn(this.getCompatibleSnByHeaders(headers));
      }

      OrderCallQueryDTO orderCallQueryDTO = ordCallListDto.convertToOrderCallQueryDTO();
      PageVO<OrderCallListVO> orderCallListVOPageVO = this.orderDishesAndroidBusiness.queryOrderCallPage(PageDTO.of(basePageParam.getPage().getCurrent(), basePageParam.getPage().getSize()), orderCallQueryDTO);
      List<OrdCallListVO> resultVoList = (List)orderCallListVOPageVO.getRecords().stream().map(OrdCallListVO::of).collect(Collectors.toList());
      return AjaxResult.success(resultVoList);
   }

   @PostMapping({"/api/v1/android/ord/query/page/callnum/new/3.0"})
//   @RequiresGuest
   @ApiOperation("叫号、核销3.0列表新接口查询")
   public AjaxResult listCallNum(@RequestHeader Map<String, String> headers,
                                                      @RequestBody @Valid OrdCallListNewDTO callListNewDTO) {
      log.info("------------叫号核销3.0-------------------");
      if (CollUtil.isEmpty(callListNewDTO.getShopstallIds())) {
         String sourceType = (String)headers.get("source-type");
         String machineSn = this.getCompatibleSnByHeaders(headers);
         callListNewDTO.setSourceType(sourceType);
         callListNewDTO.setMachineSn(machineSn);
      }

      OrderCallQueryDTO orderCallQueryDTO = callListNewDTO.convertToOrderCallQueryDTO();
      PageVO<OrderCallListVO> orderCallListVOPageVO = this.orderDishesAndroidBusiness.queryOrderCallPage(PageDTO.of(callListNewDTO.getCurrent(), callListNewDTO.getSize()), orderCallQueryDTO);
      List<OrdCallListVO> resultVoList = orderCallListVOPageVO.getRecords().stream().map(OrdCallListVO::of).collect(Collectors.toList());
      return AjaxResult.success(resultVoList);
   }

   @PostMapping({"/api/v1/android/ord/write/off"})
//   @RequiresGuest
   @ApiOperation("设备订单核销")
   public AjaxResult updateCallOrd(@RequestHeader Map<String, String> headers,
                                   @RequestBody @Valid OrdCallUpdateDTO ordCallListDto) {
      String machineSn = this.getCompatibleSnByHeaders(headers);
      log.info("[设备订单核销]入参{}", JSON.toJSONString(ordCallListDto));

      try {
         ordCallListDto.setMachineSn(machineSn);
         this.orderDishesAndroidBusiness.updateCallOrd(ordCallListDto);
         return AjaxResult.success();
      } catch (ServiceException var6) {
         log.error("[设备]订单核销_异常,异常明细:" + var6.getMessage(), var6);
         return AjaxResult.error(var6.getMessage());
      } catch (Exception var7) {
         log.error("[设备]订单核销_异常,异常明细:" + var7.getMessage(), var7);
         return AjaxResult.error("设备订单核销异常,请联系管理员");
      }
   }

   @ApiOperation("设备查询指定来源的订单")
   @PostMapping({"/api/v1/android/ord/query/assign/soruce"})
//   @RequiresGuest
   public AjaxResult queryAssignSourceOrd(@RequestHeader Map<String, String> headers,
                                          @RequestBody MacOrdParam macOrdParam) {
      try {
         macOrdParam.setHeaderSourceType(this.getSourceTypeByHeaders(headers));
         macOrdParam.setMachineSn(this.getCompatibleSnByHeaders(headers));
         if (macOrdParam.getNuClearMode() == null) {
            return AjaxResult.error("上送参数错误,核身方式不能为空", RetCodeEnum.CORE_PARAM_ERROR.getKey());
         } else if (NuclearModeEnum.NUCLEAR_MODE_CREDIT.getKey().equals(macOrdParam.getNuClearMode()) && CharSequenceUtil.isBlank(macOrdParam.getSerialNum())) {
            return AjaxResult.error("上送参数错误,刷卡时,卡序列号不能为空", RetCodeEnum.CORE_PARAM_ERROR.getKey());
         } else if (NuclearModeEnum.NUCLEAR_MODE_BRUSH.getKey().equals(macOrdParam.getNuClearMode()) && macOrdParam.getCustId() == null) {
            return AjaxResult.error("上送参数错误,刷脸时,人员id不能为空", RetCodeEnum.CORE_PARAM_ERROR.getKey());
         } else if (NuclearModeEnum.NUCLEAR_MODE_QRCODE.getKey().equals(macOrdParam.getNuClearMode()) && CharSequenceUtil.isBlank(macOrdParam.getAuthCode())) {
            return AjaxResult.error("上送参数错误,扫码时,二维码不能为空", RetCodeEnum.CORE_PARAM_ERROR.getKey());
         } else {
            List<OrdAssignSrcMacVO> macQueryOrdList = this.macOrdBusiness.queryAssignSourceOrd(macOrdParam, this.getMachineSnHeaders(headers));
            return CollUtil.isNotEmpty(macQueryOrdList) ? AjaxResult.success(macQueryOrdList) : AjaxResult.error("该客户没有订单！");
         }
      } catch (ServiceException var5) {
         log.error("[设备]查询指定来源的订单_异常,异常明细:" + var5.getMessage(), var5);
         return AjaxResult.error(var5.getMessage());
      } catch (Exception var6) {
         log.error("[设备]查询指定来源的订单_异常,异常明细:" + var6.getMessage(), var6);
         return AjaxResult.error("设备查询指定来源的订单,请联系管理员");
      }
   }

   @ApiOperation("设备查询当餐单笔预订订单")
   @PostMapping({"/api/v1/android/ord/get/current/reserve"})
//   @RequiresGuest
   public AjaxResult getCurrentReserve(@RequestHeader Map<String, String> headers,
                                       @RequestBody MacOrdParam macOrdParam) {
      try {
         if (CharSequenceUtil.isBlank(macOrdParam.getSerialNum()) && ObjectUtil.isNull(macOrdParam.getCustId())) {
            return AjaxResult.error("上送参数错误,卡序列号与人员id,不能同时为空", RetCodeEnum.CORE_PARAM_ERROR.getKey());
         } else if (CollUtil.isEmpty(macOrdParam.getSourceTypeList())) {
            return AjaxResult.error("上送参数错误,订单来源,不能同时为空", RetCodeEnum.CORE_PARAM_ERROR.getKey());
         } else {
            macOrdParam.setMachineSn(this.getCompatibleSnByHeaders(headers));
            OrdCurrentReserveMacVO macQueryOrd = this.macOrdBusiness.getCurrentReserve(macOrdParam);
            return ObjectUtil.isNotEmpty(macQueryOrd) ? AjaxResult.success(macQueryOrd) : AjaxResult.error("该客户没有订单！");
         }
      } catch (ServiceException var5) {
         log.error("[设备]设备查询当餐单笔预订订单_异常,异常明细:" + var5.getMessage(), var5);
         return AjaxResult.error(var5.getMessage());
      } catch (Exception var6) {
         log.error("[设备]设备查询当餐单笔预订订单_异常,异常明细:" + var6.getMessage(), var6);
         return AjaxResult.error("设备查询当餐单笔预订订单,请联系管理员");
      }
   }

   @ApiOperation("根据设备订单号查询订单信息")
   @PostMapping({"/api/v1/android/ord/query/ordInfo/by/mac/ordid"})
//   @RequiresGuest
   public AjaxResult queryOrdInfoByMacOrdId(@RequestHeader Map<String, String> headers,
                                            @RequestBody @Valid MacQueryOrdByMacOrdIdDTO queryDto) {
      queryDto.setMachineSn(this.getCompatibleSnByHeaders(headers));
      return this.macOrdBusiness.queryOrdInfoByMacOrdId(queryDto);
   }

   @PostMapping({"/api/v1/android/ord/trade/page/list"})
//   @RequiresGuest
   @ApiOperation("自助注册机查询人员交易流水")
   public AjaxResult queryCustTradePageList(@RequestBody BasePageParam<OrdInfoMachineDto> content) {
      PageVO<QueryOrdTradeForAppVO> tradePageList = this.macOrdBusiness.queryCustTradePageList((OrdInfoMachineDto)content.getParam(), PageDTO.of(content.getPage().getCurrent(), content.getPage().getSize()));
      return AjaxResult.success(tradePageList);
   }

   @ApiOperation(
      value = "[订单中心-订单明细]分页查询",
      notes = "[]分页查询"
   )
   @PostMapping({"/api/v1/android/ord/queryPageOrdInfoDetail"})
//   @RequiresGuest
   public AjaxResult queryPageOrdInfoDetail(@RequestBody OrdExportModel ordExportModel) {
      OrdParam ordParam = ordExportModel.getOrdParam();
      this.ordDateCheck(ordParam);
      ordParam.setCheckStateList(Arrays.asList(CheckStateEnum.WAIT.getKey(), CheckStateEnum.PASS.getKey()));
      Page page = ordExportModel.getPage();
      Page<OrdInfoVO> resultPage = this.ordInfoBusiness.queryPageOrdInfoDetail(page, ordParam);
      return AjaxResult.success(resultPage);
   }

   private void ordDateCheck(OrdParam ordParam) {
      if (ordParam.getOrdDateMin() != null && ordParam.getOrdDateMax() != null || ordParam.getOrdTimeMin() != null && ordParam.getOrdTimeMax() != null) {
         if (ordParam.getOrdDateMin() != null && ordParam.getOrdDateMax() != null && (ordParam.getOrdTimeMin() != null || ordParam.getOrdTimeMax() != null)) {
            throw new ServiceException(I18n.getMessage("order.mac.date-only-one"));
         }
      } else {
         throw new ServiceException(I18n.getMessage("order.mac.date-empty"));
      }
   }

   @PostMapping({"/api/v1/android/ord/refund/page/list"})
//   @RequiresAuthentication
   @ApiOperation(
      value = "分页查询退款订单明1细",
      notes = "cmt - 退款订单明细"
   )
   public AjaxResult queryPageRefundOrdInfoDetail(@RequestBody OrdExportModel ordExport) {
      OrdParam ordParam = ordExport.getOrdParam();
      this.ordDateCheck(ordParam);
      ordParam.setIfReverse(LeConstants.COMMON_YES);
      Page page = ordExport.getPage();
      Page<OrdInfoVO> resultPage = this.ordInfoBusiness.queryPageOrdInfoDetail(page, ordParam);
      return AjaxResult.success(resultPage);
   }

   @PostMapping({"/api/v1/android/ord/sn/list"})
//   @RequiresGuest
   @ApiOperation(
      value = "查询当前设备订单列表",
      notes = "cmt-查询当前设备订单列表"
   )
   public AjaxResult queryOrdListBySn(@RequestHeader Map<String, String> headers,
                                      @RequestBody MacOrdRefundQueryDTO ordRefundQueryDTO) {
      ordRefundQueryDTO.setMachineSn(this.getCompatibleSnByHeaders(headers));
      List<OrdAssignSrcMacOldVO> ordList = this.macOrdBusiness.queryOrdListBySn(ordRefundQueryDTO);
      return AjaxResult.success(ordList);
   }

   @PostMapping({"/api/v1/android/ord/interval/detail/stat"})
//   @RequiresGuest
   @ApiOperation("获取订单餐次详情统计")
   public AjaxResult getOrdIntervalDetailStat(@RequestBody OrdIntervalDetailStatDTO request) {
      PageVO<ReportOrderDetaiVO> orderMealtimeDetail = this.reportOrderApi.getOrderMealtimeDetail(request.convertToReportOrderDetailDTO());
      PageVO<OrdIntervalDetailStatVO> pageVO = PageVO.of(orderMealtimeDetail.getCurrent(), orderMealtimeDetail.getSize(), orderMealtimeDetail.getTotal());
      pageVO.setRecords(orderMealtimeDetail.getRecords().stream().map(OrdIntervalDetailStatVO::of).collect(Collectors.toList()));
      return AjaxResult.success(pageVO);
   }

   @PostMapping({"/api/v1/android/ord/image/save"})
//   @RequiresGuest
   @ApiOperation("订单图片批量保存")
   public AjaxResult orderImageSave(@RequestBody List<MacOrderImageSaveDTO> request) {
      this.macOrdBusiness.orderImageSave(request);
      return AjaxResult.success();
   }

   @ApiOperation("分页查询设备订单号")
   @PostMapping({"/api/v1/android/ordInfo/MachineOrdInfo"})
//   @RequiresGuest
   public AjaxResult queryPageOrdInfo(@RequestHeader Map<String, String> headers, @RequestBody String content) {
      Page<OrdInfoVO> page = QueryParseHelper.getPageFromContent(content, OrdInfoVO.class);
      OrdInfoMachineDto infoMachine = (OrdInfoMachineDto)QueryParseHelper.getParamFromContent(content, OrdInfoMachineDto.class);
      infoMachine.setMachineSn(this.getMachineSnHeaders(headers));
      infoMachine.setMchNum(this.getMachineNumHeaders(headers));
      Page<OrdInfoVO> resultPage = this.ordInfoMachineBusiness.queryPageOrdInfoMachine(page, infoMachine);
      return AjaxResult.success(resultPage);
   }

   @ApiOperation(
      value = "设备查询订单详情",
      notes = "分页查询设备订单号"
   )
   @PostMapping({"/api/v1/android/ordInfo/MachineOrdInfoDetail"})
//   @RequiresGuest
   public AjaxResult queryOrdInfoDetail(@RequestBody OrdAppInfo ordAppInfo) {
      List<OrdDetaillVO> ordDetailList = this.ordInfoMachineBusiness.queryOrdInfoDetail(ordAppInfo);
      return AjaxResult.success(ordDetailList);
   }

   @ApiOperation("查询金额和笔数")
   @PostMapping({"/api/v1/android/ordInfo/MachineOrdMoneyNumber"})
//   @RequiresGuest
   public AjaxResult queryOrdMoneyNumber(@RequestHeader Map<String, String> headers, @RequestBody String content) {
      Gson var10001 = this.gson;
      log.info("[订单信息]查询金额和笔数:" + var10001.toJson(content));
      ReportOrderSumQueryDTO reportOrderSumQueryDTO = new ReportOrderSumQueryDTO();
      reportOrderSumQueryDTO.setMachineSn(this.getCompatibleSnByHeaders(headers));
      ReportDeviceOrderSumVO reportDeviceOrderSumVO = this.reportOrderApi.reportDeviceOrderSum(reportOrderSumQueryDTO);
      return AjaxResult.success(OrdMoneyNumberMachineVo.of(reportDeviceOrderSumVO));
   }

   @ApiOperation("超市收银系统设备查询订单明细")
   @PostMapping({"/api/v1/android/ordInfo/page/markerOrdInfo"})
   public Page<MacMarketOrdInfoVO> pageMacOrdInfoDetailByConditon(@RequestHeader Map<String, String> headers,
                                                                  @RequestBody MacMarketOrdDTO marketOrdDTO) {
      marketOrdDTO.setMachineSn(this.getMachineSnHeaders(headers));
      marketOrdDTO.setMachineNum(this.getMachineNumHeaders(headers));
      return this.ordInfoMachineBusiness.pageMacOrdInfoDetailByConditon(marketOrdDTO);
   }

   @ApiOperation("超市收银系统设备查询未核销订单")
   @PostMapping({"/api/v1/android/ordInfo/page/notwriteoff/list"})
   public Page<MacMarketOrdInfoVO> pageMacOrdInfoNotWriteOff(@RequestHeader Map<String, String> headers,
                                                             @RequestBody MacMarketNotWriteOffDTO marketOrdDTO) {
      marketOrdDTO.setMachineSn(this.getMachineSnHeaders(headers));
      marketOrdDTO.setMachineNum(this.getMachineNumHeaders(headers));
      if (marketOrdDTO.getNuClearMode() == null) {
         throw new ServiceException(I18n.getMessage("order.mac.lack-nu-clare-mode"));
      } else if (NuclearModeEnum.NUCLEAR_MODE_CREDIT.getKey().equals(marketOrdDTO.getNuClearMode()) && CharSequenceUtil.isBlank(marketOrdDTO.getSerialNum())) {
         throw new ServiceException(I18n.getMessage("order.mac.lack-card-num"));
      } else if (NuclearModeEnum.NUCLEAR_MODE_BRUSH.getKey().equals(marketOrdDTO.getNuClearMode()) && marketOrdDTO.getCustId() == null) {
         throw new ServiceException(I18n.getMessage("order.mac.lack-face-cust-id"));
      } else if (NuclearModeEnum.NUCLEAR_MODE_QRCODE.getKey().equals(marketOrdDTO.getNuClearMode()) && CharSequenceUtil.isBlank(marketOrdDTO.getAuthCode())) {
         throw new ServiceException(I18n.getMessage("order.mac.lack-code", new Object[0]));
      } else {
         return this.ordInfoMachineBusiness.pageMacOrdInfoNotWriteOff(marketOrdDTO);
      }
   }

   @PostMapping({"/api/v1/android/ordInfo/mac/upload"})
//   @RequiresGuest
   @ApiOperation("文件上传")
   public AjaxResult upload(@RequestParam("file") MultipartFile file, String macOrdId) {
      String originalFilename = file.getOriginalFilename();
      if (originalFilename == null) {
         return AjaxResult.error("接收参数错误,请上传正确的文件格式");
      } else {
         String suffix = originalFilename.substring(originalFilename.lastIndexOf(".") + 1);
         if (!FileNameSuffixEnum.getAllFileNameList().contains(suffix.toUpperCase())) {
            return AjaxResult.error("接收参数错误,请上传正确的文件格式");
         } else {
            try {
               this.orderPhotoService.macUploadImage(file, macOrdId);
            } catch (Exception var6) {
               return AjaxResult.error("上传失败,请重试");
            }

            return AjaxResult.success();
         }
      }
   }

   @PostMapping({"/ordInfo/app/new/mac/part/refund"})
//   @RequiresGuest
   @ApiOperation("订单部分退款（设备端）")
   public AjaxResult macOrdPartRefundHandler(@RequestBody OrdPartRefundDTO content) {
      OrderPartRefundDTO orderPartRefundDTO = (OrderPartRefundDTO)BeanUtil.copyProperties(content, OrderPartRefundDTO.class, new String[0]);
      List<OrderDetailRefundDTO> orderDetailRefunds = BeanUtil.copyToList(content.getDetailRefundList(), OrderDetailRefundDTO.class);
      orderPartRefundDTO.setOrderId(Long.parseLong(content.getOrdId()));
      orderPartRefundDTO.setDetailRefundList(orderDetailRefunds);
      OrderRefundResultVO orderRefundResultVO = this.orderRefundBusiness.orderRefund(orderPartRefundDTO.convertToOrderRefundParam(), OrderRefundBizEnum.ANDROID_PART);
      return orderRefundResultVO.ifSuccess() ? AjaxResult.success() : AjaxResult.error(orderRefundResultVO.getResultCode(), orderRefundResultVO.getResultMsg());
   }

   @PostMapping({"/ordInfo/order/back/forMac"})
//   @RequiresGuest
   @ApiOperation("通过设备订单id，整单退单")
   public AjaxResult orderBackForMac(@RequestBody @Valid OrderBackForMacDTO content) {
      try {
         this.ordInfoBusiness.orderBackForMac(content);
      } catch (ServiceException var4) {
         return AjaxResult.error(var4.getCode(), var4.getMessage());
      } catch (Exception var5) {
         log.info("[设备退单]异常明细", var5);
         return AjaxResult.error("退单异常，请联系管理员");
      }

      return AjaxResult.success();
   }

   private String getCompatibleSnByHeaders(Map<String, String> headers) {
      String machineSn = (String)headers.get("machine-sn");
      if (CharSequenceUtil.isBlank(machineSn)) {
         String machineNum = (String)headers.get("machine-num");
         DeviceInfo deviceInfo = this.deviceApi.getByNum(machineNum);
         machineSn = deviceInfo != null ? deviceInfo.getDeviceSn() : null;
      }

      return machineSn;
   }

   public MacOrdController(final MacOrdBusiness macOrdBusiness, final OrdInfoBusiness ordInfoBusiness, final DeviceApi deviceApi, final OrderRefundBusiness orderRefundBusiness, final OrdInfoMachineBusiness ordInfoMachineBusiness, final OrderPhotoService orderPhotoService, final ReportOrderApi reportOrderApi, final OrderDishesAndroidBusiness orderDishesAndroidBusiness) {
      this.macOrdBusiness = macOrdBusiness;
      this.ordInfoBusiness = ordInfoBusiness;
      this.deviceApi = deviceApi;
      this.orderRefundBusiness = orderRefundBusiness;
      this.ordInfoMachineBusiness = ordInfoMachineBusiness;
      this.orderPhotoService = orderPhotoService;
      this.reportOrderApi = reportOrderApi;
      this.orderDishesAndroidBusiness = orderDishesAndroidBusiness;
   }
}
