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