불필요 파일 삭제 처리
This commit is contained in:
parent
afefd68cdd
commit
453cf1ee12
@ -1,41 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.canvasGridSetting;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.canvasGridSetting.dto.CanvasGridSettingInfo;
|
|
||||||
import com.interplug.qcast.config.Exception.QcastException;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import java.util.Map;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/api/canvas-management")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Tag(name = "CanvasGridSettingController", description = "Canvas Grid Setting 관련 API")
|
|
||||||
public class CanvasGridSettingController {
|
|
||||||
private final CanvasGridSettingService canvasGridSettingService;
|
|
||||||
|
|
||||||
@Operation(description = "Canvas Grid Setting 정보를 조회 한다.")
|
|
||||||
@GetMapping("/canvas-grid-settings/by-object/{objectNo}")
|
|
||||||
public CanvasGridSettingInfo selectCanvasGridSetting(@PathVariable String objectNo)
|
|
||||||
throws QcastException {
|
|
||||||
|
|
||||||
log.debug("Grid Setting 조회 ::::: " + objectNo);
|
|
||||||
|
|
||||||
return canvasGridSettingService.selectCanvasGridSetting(objectNo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(description = "Canvas Grid Setting 정보를 등록 한다.")
|
|
||||||
@PostMapping("/canvas-grid-settings")
|
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
|
||||||
public Map<String, String> insertCanvasGridStatus(@RequestBody CanvasGridSettingInfo csi)
|
|
||||||
throws QcastException {
|
|
||||||
|
|
||||||
log.debug("Grid Setting 등록 ::::: " + csi.getObjectNo());
|
|
||||||
|
|
||||||
return canvasGridSettingService.insertCanvasGridSetting(csi);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.canvasGridSetting;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.canvasGridSetting.dto.CanvasGridSettingInfo;
|
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface CanvasGridSettingMapper {
|
|
||||||
|
|
||||||
// Canvas Grid Setting 조회(objectNo)
|
|
||||||
public CanvasGridSettingInfo selectCanvasGridSetting(String objectNo);
|
|
||||||
|
|
||||||
// Canvas Grid Setting 등록
|
|
||||||
public void insertCanvasGridSetting(CanvasGridSettingInfo csi);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.canvasGridSetting;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.canvasGridSetting.dto.CanvasGridSettingInfo;
|
|
||||||
import com.interplug.qcast.config.Exception.ErrorCode;
|
|
||||||
import com.interplug.qcast.config.Exception.QcastException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CanvasGridSettingService {
|
|
||||||
private final CanvasGridSettingMapper canvasGridSettingMapper;
|
|
||||||
|
|
||||||
// Canvas Setting 조회(objectNo)
|
|
||||||
public CanvasGridSettingInfo selectCanvasGridSetting(String objectNo) throws QcastException {
|
|
||||||
try {
|
|
||||||
return canvasGridSettingMapper.selectCanvasGridSetting(objectNo);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Canvas Setting 등록
|
|
||||||
public Map<String, String> insertCanvasGridSetting(CanvasGridSettingInfo csi)
|
|
||||||
throws QcastException {
|
|
||||||
|
|
||||||
Map<String, String> response = new HashMap<>();
|
|
||||||
|
|
||||||
try {
|
|
||||||
canvasGridSettingMapper.insertCanvasGridSetting(csi);
|
|
||||||
|
|
||||||
response.put("objectNo", csi.getObjectNo());
|
|
||||||
response.put("returnMessage", "common.message.confirm.mark");
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 생성된 objectNo 반환
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.canvasGridSetting.dto;
|
|
||||||
|
|
||||||
import java.sql.Date;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class CanvasGridSettingInfo {
|
|
||||||
|
|
||||||
private String objectNo; //견적서 번호
|
|
||||||
private boolean dotGridDisplay; //점 그리드 표시
|
|
||||||
private boolean lineGridDisplay; //선 그리드 표시
|
|
||||||
private Integer gridType; //그리드 설정 타입
|
|
||||||
private Integer gridHorizon; //가로 간격
|
|
||||||
private Integer gridVertical; //세로 간격
|
|
||||||
private Integer gridRatio; //비율 간격
|
|
||||||
private String gridDimen; //치수 간격
|
|
||||||
private Date registDatetime; //생성일시
|
|
||||||
private Date lastEditDatetime; //수정일시
|
|
||||||
private String returnMessage; //return message
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.canvasGridSetting.CanvasGridSettingMapper">
|
|
||||||
|
|
||||||
<select id="selectCanvasGridSetting" parameterType="string"
|
|
||||||
resultType="com.interplug.qcast.biz.canvasGridSetting.dto.CanvasGridSettingInfo">
|
|
||||||
/* sqlid : com.interplug.qcast.canvasGridSetting.selectCanvasGridSetting Canvas Grid Setting 조회 */
|
|
||||||
SELECT object_no
|
|
||||||
, dot_grid_display
|
|
||||||
, line_grid_display
|
|
||||||
, grid_type
|
|
||||||
, grid_horizon
|
|
||||||
, grid_vertical
|
|
||||||
, grid_ratio
|
|
||||||
, grid_dimen
|
|
||||||
, regist_datetime
|
|
||||||
, last_edit_datetime
|
|
||||||
FROM TB_CANVAS_GRID_SETTING
|
|
||||||
WHERE object_no = #{objectNo}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertCanvasGridSetting" parameterType="com.interplug.qcast.biz.canvasGridSetting.dto.CanvasGridSettingInfo">
|
|
||||||
/* sqlid : com.interplug.qcast.canvasGridSetting.insertCanvasGridSetting Canvas Grid Setting 등록 */
|
|
||||||
MERGE TB_CANVAS_GRID_SETTING AS target
|
|
||||||
USING (SELECT #{objectNo} AS object_no) AS source
|
|
||||||
ON (target.object_no = source.object_no)
|
|
||||||
WHEN MATCHED THEN
|
|
||||||
UPDATE
|
|
||||||
SET dot_grid_display = #{dotGridDisplay}
|
|
||||||
, line_grid_display = #{lineGridDisplay}
|
|
||||||
, grid_type = #{gridType}
|
|
||||||
, grid_horizon = #{gridHorizon}
|
|
||||||
, grid_vertical = #{gridVertical}
|
|
||||||
, grid_ratio = #{gridRatio}
|
|
||||||
, grid_dimen = #{gridDimen}
|
|
||||||
, last_edit_datetime = GETDATE()
|
|
||||||
|
|
||||||
WHEN NOT MATCHED THEN
|
|
||||||
INSERT
|
|
||||||
(
|
|
||||||
object_no
|
|
||||||
, dot_grid_display
|
|
||||||
, line_grid_display
|
|
||||||
, grid_type
|
|
||||||
, grid_horizon
|
|
||||||
, grid_vertical
|
|
||||||
, grid_ratio
|
|
||||||
, grid_dimen
|
|
||||||
, regist_datetime
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
#{objectNo}
|
|
||||||
, #{dotGridDisplay}
|
|
||||||
, #{lineGridDisplay}
|
|
||||||
, #{gridType}
|
|
||||||
, #{gridHorizon}
|
|
||||||
, #{gridVertical}
|
|
||||||
, #{gridRatio}
|
|
||||||
, #{gridDimen}
|
|
||||||
, GETDATE()
|
|
||||||
);
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user