package com.malk.huagao.controller;

import cn.hutool.core.date.DateUtil;
import com.malk.huagao.service.KdHuaGaoService;
import com.malk.server.common.McR;
import com.malk.utils.UtilHttp;
import com.malk.utils.UtilMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

@RestController
@RequestMapping("/kd")
public class KdHuagaoController {
    @Autowired
    private KdHuaGaoService kdHuaGaoService;

    //更新看板
    @RequestMapping("/syncReport")
    @ResponseBody
    public McR syncReport(String type, String userId){
        kdHuaGaoService.syncReport(type,userId);

        return McR.success();
    }

    //更新采购订单
    @RequestMapping("/syncPUROrder")
    @ResponseBody
    public McR syncPUROrder(String userId){
        kdHuaGaoService.syncPUROrder(userId);

        return McR.success();
    }
}
