|
|
|
@ -1,9 +1,14 @@
|
|
|
|
|
package com.xit.biz.ctgy.controller;
|
|
|
|
|
|
|
|
|
|
import com.xit.biz.ctgy.dto.GnRecallScDto;
|
|
|
|
|
import com.xit.biz.ctgy.dto.MinInfoBoard680Dto;
|
|
|
|
|
import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
|
|
|
|
|
import com.xit.biz.ctgy.entity.MinInfoBoard680;
|
|
|
|
|
import com.xit.biz.ctgy.service.IResidentService;
|
|
|
|
|
import com.xit.core.api.IRestResponse;
|
|
|
|
|
import com.xit.core.api.RestResponse;
|
|
|
|
|
import com.xit.core.util.AssertUtils;
|
|
|
|
|
import com.xit.core.util.Checks;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameters;
|
|
|
|
@ -12,11 +17,14 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.mapstruct.factory.Mappers;
|
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
|
|
|
|
|
|
@Tag(name = "ResidentController", description = "거주자의견진술 관리")
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/api/v1/ctgy/resident")
|
|
|
|
@ -41,6 +49,16 @@ public class ResidentController {
|
|
|
|
|
return RestResponse.of(service.findResidentDatas(pageable));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "거주자 의견진술 자료 등록", description = "거주자 의견진술 자료 등록")
|
|
|
|
|
@PostMapping(value = "/data", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> saveResidentData(@Nonnull GnRecallScDto dto) {
|
|
|
|
|
AssertUtils.isTrue(!Checks.isEmpty(dto), "등록할 거주자 의견진술 자료가 존재하지 않습니다.");
|
|
|
|
|
|
|
|
|
|
service.saveResidentData(mapstruct.toEntity(dto), dto.getPicadFiles(), dto.getFrecadFiles(), dto.getContadFiles());
|
|
|
|
|
return RestResponse.of(HttpStatus.OK);
|
|
|
|
|
// return RestResponse.of(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "거주자의견진술 상세" , description = "거주자의견진술 상세")
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.PATH, name = "scCode", description = "의견진술번호", required = true, example = "3778"),
|
|
|
|
|