package com.zcloud.fire.check.app;


import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.fire.check.api.FireCheckRecordServiceI;
import com.zcloud.fire.check.dto.*;
import com.zcloud.fire.check.dto.clientobject.FireBackCheckRecordCO;
import com.zcloud.fire.check.dto.clientobject.FireCheckRecordCO;
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.*;

import java.util.ArrayList;

/**
 * web-adapter
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:10:58
 */
@Api(tags = "App消防点位检查记录表")
@RequestMapping("/${application.gateway}/app/fireCheckRecord")
@RestController
@AllArgsConstructor
public class AppFireCheckRecordController {
    private final FireCheckRecordServiceI fireCheckRecordService;

    @ApiOperation("总检查提交")
    @PostMapping("/saveCheckRecord")
    public SingleResponse<FireCheckRecordCO> saveCheckRecord(@RequestBody AppCheckRecordAddCmd appCheckRecordAddCmd) {
        return SingleResponse.of(fireCheckRecordService.saveCheckRecord(appCheckRecordAddCmd));
    }


    @ApiOperation("获取消防点检记录检查列表 (包括已打回和所有)")
    @PostMapping("/getCheckRecordList")
    public PageResponse<FireBackCheckRecordCO> getCheckRecordList(@RequestBody FireBackCheckRecordPageQry qry) {
        return fireCheckRecordService.getCheckRecordList(qry);
    }

/*
    @ApiOperation("获取消防点检记录详情信息")
    @GetMapping("/getChecKRecordInfo/{fireRecordId}")
    public SingleResponse<FireCheckRecordCO> getChecKRecordInfo(@PathVariable("fireRecordId") String fireRecordId) {
        return SingleResponse.of(fireCheckRecordService.getChecKRecordInfo(fireRecordId));
    }
*/


}

