package com.uas.eis.controller;

import com.uas.eis.sdk.entity.ApiResult;
import com.uas.eis.sdk.resp.ApiResponse;
import com.uas.eis.service.MESHelperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author xiaost
 * @date 2022/8/16 11:35
 **/
@RestController
@RequestMapping("/MES/helper")
public class MESHelperController {
    @Autowired
    private MESHelperService mesHelperService;

    @RequestMapping(value="/dllMain")
    public ApiResult<Map<Object,Object>> DLLMain(HttpServletRequest request, String data){
        Map<String, Object> modelMap = new HashMap<String, Object>();
        String accessKey = request.getHeader("AccessKey");
        String requestId = request.getHeader("RequestId");
        Map<Object,Object> map = mesHelperService.DLLMain(accessKey,requestId,data);
        return ApiResponse.successRsp(requestId,map);
    }

}
