package com.malk.fenggefushi.service;


import com.fasterxml.jackson.core.JacksonException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.malk.server.common.McR;
import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface HeiHuOrderService {
    /*获取登录黑湖工单token*/
    McR HeiHuAccessToken() throws JacksonException;

    /*发起宜搭审批流程：销售订单*/
    McR StartYidaAproval(@RequestParam String OrderNo,@RequestParam String formUuid) throws JacksonException;

    /*根据客户名字搜索userid*/
    String getDDToken(@RequestParam String Name);

    /*发起宜搭审批流程：采购订单*/
    McR startYidaProcurementAproval(@RequestParam String OrderNo,@RequestParam String FromUuType) throws JsonProcessingException;

    /*回传销售订单状态*/
    McR SyncOrderStatus(@RequestParam  String formInstanceId,@RequestParam String Approvalresult) throws JsonProcessingException;

    /*回传采购订单状态*/
    McR SyncPurchaseOrderStatus(@RequestParam String formInstanceId,@RequestParam String Approvalresult) throws JsonProcessingException;

    /*【新】销售订单*/
    McR salesAproval(Map body) throws JacksonException;

    /*【新】采购订单*/
    McR Procurement(Map body) throws JacksonException;

    /*销售订单修改*/
    McR salesUpdate(Map body) throws JacksonException;

    /*查询产品颜色*/
    String getProductColor(@RequestParam List list) throws JacksonException;

    /*采购订单定时同步*/
    McR purchaseSchedule(List<Map<String, Object>> dataList) throws JacksonException;

    @SneakyThrows
    McR purchaseScheduleTest(List<Map<String, Object>> dataList);

    List<Map<String, Object>> queryAllPurchase();

    McR purchaseUpdateSchedule() throws JacksonException;


}
