/*
 * Author: wangjian
 * 生成controller
 */
package com.tofly.znb.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.tofly.common.core.entity.ResultRespone;
import com.tofly.znb.entity.Vo.SprData1Vo;
import com.tofly.znb.entity.Vo.SprDataVo;
import com.tofly.znb.entity.ZnbCbLog;
import com.tofly.znb.service.ZnbCbLogService;
import com.tofly.znb.utils.HttpRequestUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.Arrays;


/**
 * 智能表抄表同步
 *
 * @author admin
 * @date Fri Aug 01 00:00:00 CST 2025
 */
@RestController
@AllArgsConstructor
@RequestMapping("/api/znb/znbcblog")
@Slf4j
public class ZnbCbLogController {

    private final ZnbCbLogService znbCbLogService;

    /**
     * 测试接口
     *
     * @return ResultRespone
     */
    @GetMapping("/getTest")
    public ResultRespone getTest() throws JsonProcessingException {
        String pch =   znbCbLogService.CreateZnbPlanBySblbTask("3");
        log.info("生成智能表档案完成");

        znbCbLogService.ZnbPlanCb(pch);
        log.info("完成抄表程序");

        return ResultRespone.success("成功");
    }

}
