package com.zcloud.fire.check.app;


import com.zcloud.fire.check.api.FireCheckRecordPointServiceI;
import com.zcloud.fire.check.dto.AppCheckRecordPointAddCmd;
import com.zcloud.fire.check.dto.CheckRecordPointListQry;
import com.zcloud.fire.check.dto.clientobject.AppFireCheckRecordCO;
import com.zcloud.fire.check.dto.clientobject.FireCheckRecordPointCO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
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.alibaba.cola.dto.SingleResponse;
/**
 * web-adapter
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:10:58
 */
@Api(tags = "App消防点位检查记录点位表")
@RequestMapping("/${application.gateway}/app/fireCheckRecord")
@RestController
@AllArgsConstructor
public class AppFireCheckRecordPointController {
    private final FireCheckRecordPointServiceI fireCheckRecordPointService;

    @ApiOperation("点位检查提交")
    @PostMapping("/saveCheckRecordPoint")
    public SingleResponse<FireCheckRecordPointCO> saveCheckRecordPoint(@RequestBody AppCheckRecordPointAddCmd appCheckRecordPointAddCmd) {
        return SingleResponse.of(fireCheckRecordPointService.saveCheckRecordPoint(appCheckRecordPointAddCmd));
    }

    @ApiOperation("获取消防点检记录点位列表(已打回根据状态传入)")
    @PostMapping("/getCheckRecordPointList")
    public SingleResponse<AppFireCheckRecordCO> getCheckRecordPointList(@RequestBody CheckRecordPointListQry qry) {
        return SingleResponse.of(fireCheckRecordPointService.getCheckRecordPointList(qry));

    }


}

