package com.siwei.rsmonitoring.controller;

import com.siwei.rsmonitoring.service.ITFieldworkTjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.siwei.common.log.annotation.Log;
import com.siwei.common.log.enums.BusinessType;
import com.siwei.rsmonitoring.domain.TDkjbxxHc;
import com.siwei.rsmonitoring.service.ITDkjbxxHcService;
import com.siwei.common.core.web.controller.BaseController;
import com.siwei.common.core.web.domain.AjaxResult;

/**
 * 地块基本信息核查判定Controller
 *
 * @author siwei
 * @date 2025-03-03
 */
@RestController
@RequestMapping("/fieldwork/hc")
public class TFieldworkHcController extends BaseController {
    @Autowired
    private ITDkjbxxHcService tDkjbxxHcService;
    @Autowired
    private ITFieldworkTjService tFieldworkTjService;

    @GetMapping(value = "/info")
    public AjaxResult getInfo(String fieldworkId, String dkid, String auditflowStep, String auditflowId) {
        return success(tDkjbxxHcService.selectTDkjbxxHcInfo(fieldworkId, dkid, auditflowStep, auditflowId));
    }


    //    @RequiresPermissions("rsmonitoring:hc:add")
    @Log(title = "地块基本信息核查判定", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TDkjbxxHc tDkjbxxHc) {
        return toAjax(tDkjbxxHcService.addTDkjbxxHc(tDkjbxxHc));
    }

}