물건정보 조회 API 변경(기준풍속)
This commit is contained in:
parent
0bb248aa4f
commit
28702e9b2f
@ -33,6 +33,13 @@ public class ObjectController {
|
|||||||
return objectService.selectPrefAreaList(prefId);
|
return objectService.selectPrefAreaList(prefId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(description = "물건정보 지역 기준풍속을 조회한다.")
|
||||||
|
@GetMapping("/windSpeed/{city}/list")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public List<WindSpeedResponse> selectWindSpeedList(@PathVariable String city) throws Exception {
|
||||||
|
return objectService.selectWindSpeedList(city);
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(description = "판매점 목록을 조회한다.")
|
@Operation(description = "판매점 목록을 조회한다.")
|
||||||
@GetMapping("/saleStore/{saleStoreId}/list")
|
@GetMapping("/saleStore/{saleStoreId}/list")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
|||||||
@ -13,6 +13,9 @@ interface ObjectMapper {
|
|||||||
// 도도부현 지역 조회
|
// 도도부현 지역 조회
|
||||||
public List<PrefResponse> selectPrefAreaList(String prefId);
|
public List<PrefResponse> selectPrefAreaList(String prefId);
|
||||||
|
|
||||||
|
// 지역 기준풍속 조회
|
||||||
|
public List<WindSpeedResponse> selectWindSpeedList(String city);
|
||||||
|
|
||||||
// 모든 판매점 목록 조회
|
// 모든 판매점 목록 조회
|
||||||
public List<SaleStoreResponse> selectSaleStoreAllList();
|
public List<SaleStoreResponse> selectSaleStoreAllList();
|
||||||
|
|
||||||
|
|||||||
@ -36,6 +36,10 @@ public class ObjectService {
|
|||||||
return objectMapper.selectPrefAreaList(prefId);
|
return objectMapper.selectPrefAreaList(prefId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<WindSpeedResponse> selectWindSpeedList(String city) throws Exception {
|
||||||
|
return objectMapper.selectWindSpeedList(city);
|
||||||
|
}
|
||||||
|
|
||||||
public List<SaleStoreResponse> selectSaleStoreList(String saleStoreId) throws Exception {
|
public List<SaleStoreResponse> selectSaleStoreList(String saleStoreId) throws Exception {
|
||||||
if ("T01".equals(saleStoreId)) {
|
if ("T01".equals(saleStoreId)) {
|
||||||
return objectMapper.selectSaleStoreAllList();
|
return objectMapper.selectSaleStoreAllList();
|
||||||
@ -115,6 +119,7 @@ public class ObjectService {
|
|||||||
planRequest.setDelFlg("0");
|
planRequest.setDelFlg("0");
|
||||||
planRequest.setNorthArrangement("0");
|
planRequest.setNorthArrangement("0");
|
||||||
planRequest.setDiffRoofEnabled("0");
|
planRequest.setDiffRoofEnabled("0");
|
||||||
|
planRequest.setOrderFlg("0");
|
||||||
planRequest.setUserId(objectRequest.getUserId());
|
planRequest.setUserId(objectRequest.getUserId());
|
||||||
result += objectMapper.insertPlan(planRequest);
|
result += objectMapper.insertPlan(planRequest);
|
||||||
|
|
||||||
@ -352,6 +357,7 @@ public class ObjectService {
|
|||||||
planRequest.setDelFlg("0");
|
planRequest.setDelFlg("0");
|
||||||
planRequest.setNorthArrangement("0");
|
planRequest.setNorthArrangement("0");
|
||||||
planRequest.setDiffRoofEnabled("0");
|
planRequest.setDiffRoofEnabled("0");
|
||||||
|
planRequest.setOrderFlg("0");
|
||||||
|
|
||||||
objectMapper.insertPlan(planRequest);
|
objectMapper.insertPlan(planRequest);
|
||||||
|
|
||||||
|
|||||||
@ -85,6 +85,8 @@ public class ObjectRequest {
|
|||||||
private String schObjectNo;
|
private String schObjectNo;
|
||||||
@Schema(description = "검색 - 판매점ID")
|
@Schema(description = "검색 - 판매점ID")
|
||||||
private String schSaleStoreId;
|
private String schSaleStoreId;
|
||||||
|
@Schema(description = "검색 - 선택판매점ID")
|
||||||
|
private String schSelSaleStoreId;
|
||||||
@Schema(description = "검색 - 주소")
|
@Schema(description = "검색 - 주소")
|
||||||
private String schAddress;
|
private String schAddress;
|
||||||
@Schema(description = "검색 - 안건명")
|
@Schema(description = "검색 - 안건명")
|
||||||
|
|||||||
@ -41,10 +41,10 @@ public class ObjectResponse {
|
|||||||
private String receiveCompanyName;
|
private String receiveCompanyName;
|
||||||
@Schema(description = "담당자")
|
@Schema(description = "담당자")
|
||||||
private String receiveUser;
|
private String receiveUser;
|
||||||
|
@Schema(description = "사양확정일")
|
||||||
|
private String specificationConfirmDate;
|
||||||
@Schema(description = "컨텐츠 파일경로")
|
@Schema(description = "컨텐츠 파일경로")
|
||||||
private String contentsPath;
|
private String contentsPath;
|
||||||
@Schema(description = "사양확정일")
|
|
||||||
private String specDate;
|
|
||||||
@Schema(description = "견적처")
|
@Schema(description = "견적처")
|
||||||
private String dispCompanyName;
|
private String dispCompanyName;
|
||||||
@Schema(description = "임시저장여부")
|
@Schema(description = "임시저장여부")
|
||||||
|
|||||||
@ -71,4 +71,6 @@ public class PlanRequest {
|
|||||||
private String supportMeakerMulti;
|
private String supportMeakerMulti;
|
||||||
@Schema(description = "다른 지붕재여부")
|
@Schema(description = "다른 지붕재여부")
|
||||||
private String diffRoofEnabled;
|
private String diffRoofEnabled;
|
||||||
|
@Schema(description = "발주여부")
|
||||||
|
private String orderFlg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,4 +71,6 @@ public class PlanResponse {
|
|||||||
private String supportMeakerMulti;
|
private String supportMeakerMulti;
|
||||||
@Schema(description = "다른 지붕재여부")
|
@Schema(description = "다른 지붕재여부")
|
||||||
private String diffRoofEnabled;
|
private String diffRoofEnabled;
|
||||||
|
@Schema(description = "발주여부")
|
||||||
|
private String orderFlg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,4 +17,6 @@ public class SaleStoreResponse {
|
|||||||
private String saleStoreName;
|
private String saleStoreName;
|
||||||
@Schema(description = "판매점레벨")
|
@Schema(description = "판매점레벨")
|
||||||
private String saleStoreLevel;
|
private String saleStoreLevel;
|
||||||
|
@Schema(description = "1차점판매점ID")
|
||||||
|
private String firstAgentId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
//@Data
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class WindSpeedResponse {
|
||||||
|
// 기준풍속정보
|
||||||
|
@Schema(description = "도시명")
|
||||||
|
private String city;
|
||||||
|
@Schema(description = "풍속")
|
||||||
|
private String windSpeed;
|
||||||
|
@Schema(description = "메모")
|
||||||
|
private String remarks;
|
||||||
|
}
|
||||||
@ -21,14 +21,28 @@
|
|||||||
ORDER BY A.AREA_ID ASC
|
ORDER BY A.AREA_ID ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWindSpeedList" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.WindSpeedResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectWindSpeedList */
|
||||||
|
SELECT
|
||||||
|
A.CITY
|
||||||
|
, A.WIND_SPEED
|
||||||
|
, A.REMARKS
|
||||||
|
FROM M_WIND_SPEED A WITH (NOLOCK)
|
||||||
|
WHERE A.CITY = #{city}
|
||||||
|
ORDER BY A.WIND_SPEED ASC, A.CITY ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectSaleStoreAllList" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
|
<select id="selectSaleStoreAllList" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
|
||||||
/* sqlid : com.interplug.qcast.biz.object.selectSaleStoreList */
|
/* sqlid : com.interplug.qcast.biz.object.selectSaleStoreList */
|
||||||
SELECT
|
SELECT
|
||||||
SALE_STORE_ID
|
CASE WHEN SALE_STORE_LEVEL = '1' THEN 'Y' ELSE 'N' END AS FIRST_AGENT_YN
|
||||||
|
, SALE_STORE_ID
|
||||||
, SALE_STORE_NAME
|
, SALE_STORE_NAME
|
||||||
, SALE_STORE_LEVEL
|
, SALE_STORE_LEVEL
|
||||||
|
, FIRST_AGENT_ID
|
||||||
FROM M_SALES_STORE WITH(NOLOCK)
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
WHERE DEL_FLG = '0'
|
WHERE APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
ORDER BY SALE_STORE_LEVEL ASC, SALE_STORE_ID ASC
|
ORDER BY SALE_STORE_LEVEL ASC, SALE_STORE_ID ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -40,8 +54,10 @@
|
|||||||
SALE_STORE_ID
|
SALE_STORE_ID
|
||||||
, SALE_STORE_NAME
|
, SALE_STORE_NAME
|
||||||
, SALE_STORE_LEVEL
|
, SALE_STORE_LEVEL
|
||||||
|
, FIRST_AGENT_ID
|
||||||
FROM M_SALES_STORE WITH(NOLOCK)
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
WHERE DEL_FLG = '0'
|
WHERE APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
AND SALE_STORE_ID = #{saleStoreId}
|
AND SALE_STORE_ID = #{saleStoreId}
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
@ -49,10 +65,12 @@
|
|||||||
A.SALE_STORE_ID
|
A.SALE_STORE_ID
|
||||||
, A.SALE_STORE_NAME
|
, A.SALE_STORE_NAME
|
||||||
, A.SALE_STORE_LEVEL
|
, A.SALE_STORE_LEVEL
|
||||||
|
, A.FIRST_AGENT_ID
|
||||||
FROM M_SALES_STORE A WITH(NOLOCK)
|
FROM M_SALES_STORE A WITH(NOLOCK)
|
||||||
INNER JOIN SALES_STORE_CTE B
|
INNER JOIN SALES_STORE_CTE B
|
||||||
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
||||||
WHERE A.DEL_FLG = '0'
|
WHERE A.APPROVE_FLG = '2'
|
||||||
|
AND A.DEL_FLG = '0'
|
||||||
)
|
)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
@ -60,15 +78,18 @@
|
|||||||
, A.SALE_STORE_ID
|
, A.SALE_STORE_ID
|
||||||
, A.SALE_STORE_NAME
|
, A.SALE_STORE_NAME
|
||||||
, A.SALE_STORE_LEVEL
|
, A.SALE_STORE_LEVEL
|
||||||
|
, A.FIRST_AGENT_ID
|
||||||
FROM M_SALES_STORE A
|
FROM M_SALES_STORE A
|
||||||
WHERE (SALE_STORE_ID = (SELECT FIRST_AGENT_ID FROM M_SALES_STORE WHERE SALE_STORE_ID = #{saleStoreId} AND DEL_FLG = '0') OR (SALE_STORE_ID = #{saleStoreId} AND SALE_STORE_LEVEL = '1'))
|
WHERE SALE_STORE_ID = (SELECT FIRST_AGENT_ID FROM M_SALES_STORE WHERE SALE_STORE_ID = #{saleStoreId} AND DEL_FLG = '0')
|
||||||
|
AND APPROVE_FLG = '2'
|
||||||
AND DEL_FLG = '0'
|
AND DEL_FLG = '0'
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT
|
SELECT
|
||||||
'N' AS FIRST_AGENT_YN
|
CASE WHEN SALE_STORE_LEVEL = '1' THEN 'Y' ELSE 'N' END AS FIRST_AGENT_YN
|
||||||
, A.SALE_STORE_ID
|
, A.SALE_STORE_ID
|
||||||
, A.SALE_STORE_NAME
|
, A.SALE_STORE_NAME
|
||||||
, A.SALE_STORE_LEVEL
|
, A.SALE_STORE_LEVEL
|
||||||
|
, A.FIRST_AGENT_ID
|
||||||
FROM SALES_STORE_CTE A
|
FROM SALES_STORE_CTE A
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -81,7 +102,8 @@
|
|||||||
, SALE_STORE_LEVEL
|
, SALE_STORE_LEVEL
|
||||||
, PARENT_SALE_AGENT_ID
|
, PARENT_SALE_AGENT_ID
|
||||||
FROM M_SALES_STORE WITH(NOLOCK)
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
WHERE DEL_FLG = '0'
|
WHERE APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
AND SALE_STORE_ID = #{saleStoreId}
|
AND SALE_STORE_ID = #{saleStoreId}
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
@ -92,7 +114,8 @@
|
|||||||
FROM M_SALES_STORE A WITH(NOLOCK)
|
FROM M_SALES_STORE A WITH(NOLOCK)
|
||||||
INNER JOIN SALES_STORE_CTE B
|
INNER JOIN SALES_STORE_CTE B
|
||||||
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
||||||
WHERE A.DEL_FLG = '0'
|
WHERE A.APPROVE_FLG = '2'
|
||||||
|
AND A.DEL_FLG = '0'
|
||||||
)
|
)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
@ -118,7 +141,7 @@
|
|||||||
, O.ZIP_NO
|
, O.ZIP_NO
|
||||||
, O.ADDRESS
|
, O.ADDRESS
|
||||||
, O.RECEIVE_USER
|
, O.RECEIVE_USER
|
||||||
, O.SPEC_DATE
|
, O.SPECIFICATION_CONFIRM_DATE
|
||||||
, O.CREATE_DATETIME
|
, O.CREATE_DATETIME
|
||||||
, O.LAST_EDIT_DATETIME
|
, O.LAST_EDIT_DATETIME
|
||||||
, S.SALE_STORE_NAME
|
, S.SALE_STORE_NAME
|
||||||
@ -138,6 +161,9 @@
|
|||||||
<if test='schSaleStoreId != null and schSaleStoreId != ""'>
|
<if test='schSaleStoreId != null and schSaleStoreId != ""'>
|
||||||
AND O.SALE_STORE_ID LIKE '%' + #{schSaleStoreId} + '%'
|
AND O.SALE_STORE_ID LIKE '%' + #{schSaleStoreId} + '%'
|
||||||
</if>
|
</if>
|
||||||
|
<if test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
|
||||||
|
AND O.SALE_STORE_ID = #{schSelSaleStoreId}
|
||||||
|
</if>
|
||||||
<if test='schAddress != null and schAddress != ""'>
|
<if test='schAddress != null and schAddress != ""'>
|
||||||
AND O.ADDRESS LIKE '%' + #{schAddress} + '%'
|
AND O.ADDRESS LIKE '%' + #{schAddress} + '%'
|
||||||
</if>
|
</if>
|
||||||
@ -149,10 +175,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<choose>
|
<choose>
|
||||||
<when test='schSpecDateYn != null and schSpecDateYn == "Y"'>
|
<when test='schSpecDateYn != null and schSpecDateYn == "Y"'>
|
||||||
AND O.SPEC_DATE IS NOT NULL
|
AND O.SPECIFICATION_CONFIRM_DATE IS NOT NULL
|
||||||
</when>
|
</when>
|
||||||
<when test='schSpecDateYn != null and schSpecDateYn == "N"'>
|
<when test='schSpecDateYn != null and schSpecDateYn == "N"'>
|
||||||
AND O.SPEC_DATE IS NULL
|
AND O.SPECIFICATION_CONFIRM_DATE IS NULL
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
<if test='schReceiveUser != null and schReceiveUser != ""'>
|
<if test='schReceiveUser != null and schReceiveUser != ""'>
|
||||||
@ -195,6 +221,7 @@
|
|||||||
, O.SAME_OBJECT_INFO
|
, O.SAME_OBJECT_INFO
|
||||||
, O.RECEIVE_COMPANY_NAME
|
, O.RECEIVE_COMPANY_NAME
|
||||||
, O.RECEIVE_USER
|
, O.RECEIVE_USER
|
||||||
|
, O.SPECIFICATION_CONFIRM_DATE
|
||||||
, O.CONTENTS_PATH
|
, O.CONTENTS_PATH
|
||||||
, O.TEMP_FLG
|
, O.TEMP_FLG
|
||||||
FROM T_OBJECT O WITH (NOLOCK)
|
FROM T_OBJECT O WITH (NOLOCK)
|
||||||
@ -255,6 +282,7 @@
|
|||||||
, T.SUPPORT_METHOD_ID_MULTI
|
, T.SUPPORT_METHOD_ID_MULTI
|
||||||
, T.SUPPORT_MEAKER_MULTI
|
, T.SUPPORT_MEAKER_MULTI
|
||||||
, T.DIFF_ROOF_ENABLED
|
, T.DIFF_ROOF_ENABLED
|
||||||
|
, T.ORDER_FLG
|
||||||
FROM T_PLAN T WITH (NOLOCK)
|
FROM T_PLAN T WITH (NOLOCK)
|
||||||
WHERE T.OBJECT_NO = #{objectNo}
|
WHERE T.OBJECT_NO = #{objectNo}
|
||||||
AND T.DEL_FLG = '0'
|
AND T.DEL_FLG = '0'
|
||||||
@ -441,42 +469,44 @@
|
|||||||
, SUPPORT_METHOD_ID_MULTI
|
, SUPPORT_METHOD_ID_MULTI
|
||||||
, SUPPORT_MEAKER_MULTI
|
, SUPPORT_MEAKER_MULTI
|
||||||
, DIFF_ROOF_ENABLED
|
, DIFF_ROOF_ENABLED
|
||||||
|
, ORDER_FLG
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{objectNo}
|
#{objectNo}
|
||||||
, #{planNo}
|
, #{planNo}
|
||||||
, #{constructSpecification}
|
, #{constructSpecification}
|
||||||
, #{setupHeight}
|
, #{setupHeight}
|
||||||
, #{weatherPoint}
|
, #{weatherPoint}
|
||||||
, #{roofKindId}
|
, #{roofKindId}
|
||||||
, #{slope}
|
, #{slope}
|
||||||
, #{roofMaterialClassId}
|
, #{roofMaterialClassId}
|
||||||
, #{roofMaterialId}
|
, #{roofMaterialId}
|
||||||
, #{supportMethodId}
|
, #{supportMethodId}
|
||||||
, #{moduleModel}
|
, #{moduleModel}
|
||||||
, (SELECT RECEIVE_USER FROM T_OBJECT WHERE OBJECT_NO = #{objectNo})
|
, (SELECT RECEIVE_USER FROM T_OBJECT WHERE OBJECT_NO = #{objectNo})
|
||||||
, #{estimateValidityTerm}
|
, #{estimateValidityTerm}
|
||||||
, CASE WHEN #{planNo} = '1' THEN '1' ELSE '0' END
|
, CASE WHEN #{planNo} = '1' THEN '1' ELSE '0' END
|
||||||
, #{number}
|
, #{number}
|
||||||
, #{capacity}
|
, #{capacity}
|
||||||
, #{snowfall}
|
, #{snowfall}
|
||||||
, #{standardWindSpeedCheck}
|
, #{standardWindSpeedCheck}
|
||||||
, #{optionCover}
|
, #{optionCover}
|
||||||
, #{hanwfaFlg}
|
, #{hanwfaFlg}
|
||||||
, #{standKindId}
|
, #{standKindId}
|
||||||
, #{standardWindSpeedId}
|
, #{standardWindSpeedId}
|
||||||
, #{supportMeaker}
|
, #{supportMeaker}
|
||||||
, #{consumptionTaxId}
|
, #{consumptionTaxId}
|
||||||
, #{status}
|
, #{status}
|
||||||
, GETDATE()
|
, GETDATE()
|
||||||
, #{userId}
|
, #{userId}
|
||||||
, #{delFlg}
|
, #{delFlg}
|
||||||
, #{pcTypeNo}
|
, #{pcTypeNo}
|
||||||
, #{northArrangement}
|
, #{northArrangement}
|
||||||
, #{roofMaterialIdMulti}
|
, #{roofMaterialIdMulti}
|
||||||
, #{supportMethodIdMulti}
|
, #{supportMethodIdMulti}
|
||||||
, #{supportMeakerMulti}
|
, #{supportMeakerMulti}
|
||||||
, #{diffRoofEnabled}
|
, #{diffRoofEnabled}
|
||||||
)
|
, #{orderFlg}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deletePlan" parameterType="com.interplug.qcast.biz.object.dto.PlanRequest">
|
<delete id="deletePlan" parameterType="com.interplug.qcast.biz.object.dto.PlanRequest">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user