package com.zjrs.zwnw.sxgl.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.mohrss.leaf.core.framework.web.controller.AjaxResponse;
import com.zjrs.zwnw.sxgl.bpo.XtpzBPO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;
import java.util.Map;

@Api("系统配置")
@RestController
@RequestMapping("/api/sxgl/xtpz")
public class XtpzController {
    private static final Logger LOG = LoggerFactory.getLogger(XtpzController.class);

    @Resource
    private XtpzBPO xtpzBPO;

    @ApiOperation(value = "获取附件id", notes = "获取附件id")
    @GetMapping("/getFjId")
    public AjaxResponse getFjId() {
        LOG.info("获取附件id开始");
        AjaxResponse ajaxResponse = new AjaxResponse();
        try {
            Map<String, String> resultMap = xtpzBPO.getFjId();
            ajaxResponse.setData("data", resultMap);
        } catch (Exception e) {
            LOG.error(e.getMessage());
            ajaxResponse.setAppcode("1");
            ajaxResponse.setErrorMsg("系统异常");
        }
        LOG.info("获取附件id结束");
        return ajaxResponse;
    }
}
