//package org.springblade.modules.nh.factory.aiswei;
//
//import org.springblade.modules.nh.factory.aiswei.dto.getdevicelistpro.GetDeviceListProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getinvertercurrenterrorpro.GetInverterCurrentErrorProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getinverterdatapagepro.GetInverterDataPageProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getinverteretodaypro.GetInverterETodayProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getinverterhiserrorpagepro.GetInverterHisErrorPageProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getinverteroverviewpro.GetInverterOverviewProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getinverterrecoverstatuspro.GetInverterRecoverStatusProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getlasttsdatapro.GetLastTsDataProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getplanlistpro.GetPlanListProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getplantoutputpro.GetPlantOutputProReq;
//import org.springblade.modules.nh.factory.aiswei.dto.getplantoverviewpro.GetPlantOverviewProReq;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/as")
//@Slf4j
//public class AisweiTestController {
//
//    @Autowired
//    AisweiApi aisweiApi;
//
//    @GetMapping(value = "getPlanListPro")
//    public Object getPlanListPro() {
//        GetPlanListProReq req = new GetPlanListProReq();
//        req.setOrder(0);
//        req.setPageNum(1);
//        req.setPageSize(10);
//        req.setToken("");
//        return aisweiApi.getPlanListPro(req);
//    }
//
//    @GetMapping(value = "getPlantOverviewPro")
//    public Object getPlantOverviewPro() {
//        GetPlantOverviewProReq req = new GetPlantOverviewProReq();
//        req.setApikey("0b6c59b2174d4226a8f8f2bcc344218f");
//        req.setToken("");
//        return aisweiApi.getPlantOverviewPro(req);
//    }
//
//    @GetMapping(value = "getPlantOutputPro")
//    public Object getPlantOutputPro(HttpServletRequest request) {
//        GetPlantOutputProReq req = new GetPlantOutputProReq();
//        req.setApikey("2c855c9b742e4a5ba37817321cc6ef1f");
//        req.setDate("2024-04-17");
//        String date = request.getParameter("d");
//        if (StringUtils.isNotBlank(date)) {
//            req.setDate(date);
//        }
//        req.setPeriod("bydays"); // "time": "07:10",
////        req.setDate("2024-04");
////        req.setPeriod("bymonth"); // "time": "2024-04-02",
////        req.setDate("2024");
////        req.setPeriod("byyear"); // "time": "2024-01",
//        req.setToken("");
//        return aisweiApi.getPlantOutputPro(req);
//    }
//
//    @GetMapping(value = "getDeviceListPro")
//    public Object getDeviceListPro() {
//        GetDeviceListProReq req = new GetDeviceListProReq();
//        req.setApiKey("0b6c59b2174d4226a8f8f2bcc344218f,cf8943bb6ece49958bb7cef73b310b31,46d95dc6bbe142fda71dabc1d2e34204,b7bcde84430b4206bbb2b4e3d8640ffc,49138cdf45014f6c956ab88195fa3768");
//        req.setToken("");
//        return aisweiApi.getDeviceListPro(req);
//    }
//
//    @GetMapping(value = "getInverterDataPagePro")
//    public Object getInverterDataPagePro() {
//        GetInverterDataPageProReq req = new GetInverterDataPageProReq();
//        req.setApiKey("0b6c59b2174d4226a8f8f2bcc344218f");
//        req.setToken("");
//        req.setIsnos("TA004095N2410077"); // TA004095N2410077
//        req.setStartDate("2024-04-16 14:00:00");
//        req.setEndDate("2024-04-17 10:59:59");
//        req.setPageNum(1);
//        req.setPageSize(1);
//        return aisweiApi.getInverterDataPagePro(req);
//    }
//
//    @GetMapping(value = "getLastTsDataPro")
//    public Object getLastTsDataPro() {
//        GetLastTsDataProReq req = new GetLastTsDataProReq();
//        req.setToken("");
//        req.setIsnos("TA004095N2410077");
//        return aisweiApi.getLastTsDataPro(req);
//    }
//
//    @GetMapping(value = "getInverterETodayPro")
//    public Object getInverterETodayPro() {
//        GetInverterETodayProReq req = new GetInverterETodayProReq();
//        req.setToken("");
//        req.setIsnos("TA004095N2410077");
//        req.setApikey("0b6c59b2174d4226a8f8f2bcc344218f");
//        req.setDate("2024-04-11");
//        return aisweiApi.getInverterETodayPro(req);
//    }
//
//    @GetMapping(value = "getInverterHisErrorPagePro")
//    public Object getInverterHisErrorPagePro() {
//        GetInverterHisErrorPageProReq req = new GetInverterHisErrorPageProReq();
//        req.setToken("");
//        req.setIsno("TA004095N2410085");
//        req.setApikey("49138cdf45014f6c956ab88195fa3768");
//        req.setStartDate("2024-04-05 00:00:00");
//        req.setEndDate("2024-04-11 00:00:00");
//        req.setPageNum(1);
//        req.setPageSize(500);
//        return aisweiApi.getInverterHisErrorPagePro(req);
//    }
//
//    @GetMapping(value = "getInverterCurrentErrorPro")
//    public Object getInverterCurrentErrorPro() {
//        GetInverterCurrentErrorProReq req = new GetInverterCurrentErrorProReq();
//        req.setToken("");
//        req.setIsno("TA004095N2410085");
//        req.setApikey("49138cdf45014f6c956ab88195fa3768");
//        return aisweiApi.getInverterCurrentErrorPro(req);
//    }
//
//    @GetMapping(value = "getInverterOverviewPro")
//    public Object getInverterOverviewPro(HttpServletRequest request) {
//        GetInverterOverviewProReq req = new GetInverterOverviewProReq();
//        req.setToken("");
//        req.setDate(request.getParameter("d"));
//        req.setApikey("0b6c59b2174d4226a8f8f2bcc344218f");
//        return aisweiApi.getInverterOverviewPro(req);
//    }
//
//    @GetMapping(value = "getInverterRecoverStatusPro")
//    public Object getInverterRecoverStatusPro() {
//        GetInverterRecoverStatusProReq req = new GetInverterRecoverStatusProReq();
//        req.setToken("");
//        req.setFaultCodes("abc");
//        return aisweiApi.getInverterRecoverStatusPro(req);
//    }
//
//    @GetMapping(value = "mock/pro/getInverterHisErrorPagePro")
//    public Object getInverterHisErrorPageProMock() {
//        return "{\n" +
//                "    \"status\": 200,\n" +
//                "    \"info\": \"success\",\n" +
//                "    \"time\": \"2024-04-16 11:11:11\",\n" +
//                "    \"data\": {\n" +
//                "        \"totalPages\": 1,\n" +
//                "        \"totalElements\": 1,\n" +
//                "        \"pageNum\": 1,\n" +
//                "        \"pageSize\": 1,\n" +
//                "        \"result\": [\n" +
//                "            {\n" +
//                "                \"errorDate\": 1713237071000,\n" +
//                "                \"errorCode\": 235,\n" +
//                "                \"errorType\": 3,\n" +
//                "                \"context\": \"235 - 设置丢失\",\n" +
//                "                \"isno\": \"TA004095N2410077\"\n" +
//                "            }\n" +
//                "        ]\n" +
//                "    }\n" +
//                "}";
//    }
//
//    @GetMapping(value = "mock/pro/getInverterCurrentErrorPro")
//    public Object getInverterCurrentErrorProMock() {
//        return "{\n" +
//                "    \"status\": 200,\n" +
//                "    \"info\": \"success\",\n" +
//                "    \"time\": \"2024-04-16 13:10:10\",\n" +
//                "    \"data\": [\n" +
//                "        {\n" +
//                "            \"context\": \"335 - 网络神经错乱\",\n" +
//                "            \"errorCode\": 335,\n" +
//                "            \"errorType\": 3,\n" +
//                "            \"faultCode\": \"Q0gwMDUwMDAxMjI1MDA5MnwzNHwxNjU2MDQzNzMzMDAw\",\n" +
//                "            \"isno\": \"TA004095N2410077\",\n" +
//                "            \"errorDate\": 1713244210000\n" +
//                "        }\n" +
//                "    ]\n" +
//                "}\n";
//    }
//
//    @GetMapping(value = "mock/pro/getInverterRecoverStatusPro")
//    public Object getInverterRecoverStatusProMock() {
//        return "{\n" +
//                "    \"status\": 200,\n" +
//                "    \"info\": \"success\",\n" +
//                "    \"time\": \"2022-06-24 16:56:36\",\n" +
//                "    \"data\": [\n" +
//                "        {\n" +
//                "            \"recoverTime\": 1713244220000,\n" +
//                "            \"recover\": 1,\n" +
//                "            \"faultCode\": \"Q0gwMDUwMDAxMjI1MDA5MnwzNHwxNjU2MDQzNzMzMDAw\"\n" +
//                "        },\n" +
//                "        {\n" +
//                "            \"recoverTime\": null,\n" +
//                "            \"recover\": 0,\n" +
//                "            \"faultCode\": \"U1AwMDIzMDAyMjI1MDQwM3wzNXwxNjU1NzU4MDkwMDAw\"\n" +
//                "        }\n" +
//                "    ]\n" +
//                "}\n";
//    }
//
//}
