Merge pull request '[1423]설계 가져오기 기능에 대해' (#455) from dev into dev-deploy
Reviewed-on: #455
This commit is contained in:
commit
cc568ee38d
@ -63,6 +63,13 @@ public class ObjectController {
|
||||
return objectService.selectSaleStoreList(saleStoreId, firstFlg, userId);
|
||||
}
|
||||
|
||||
@Operation(description = "1차점 ID 및 판매점명을 조회한다. (saleStoreLevel=2 인 경우)")
|
||||
@GetMapping("/saleStore/{saleStoreId}/firstAgent")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public SaleStoreResponse selectFirstAgentInfo(@PathVariable String saleStoreId) throws Exception {
|
||||
return objectService.selectFirstAgentInfo(saleStoreId);
|
||||
}
|
||||
|
||||
@Operation(description = "물건정보 목록을 조회한다.")
|
||||
@GetMapping("/list")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
@ -25,6 +25,9 @@ public interface ObjectMapper {
|
||||
// 판매점 정보 조회
|
||||
public SaleStoreResponse selectSaleStoreInfo(String saleStoreId);
|
||||
|
||||
// 1차점 ID/명 조회 (saleStoreLevel = '2' 인 경우)
|
||||
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId);
|
||||
|
||||
// 물건정보 메인 목록 조회
|
||||
public List<ObjectResponse> selectObjectMainList(ObjectRequest objectRequest);
|
||||
|
||||
|
||||
@ -166,6 +166,14 @@ public class ObjectService {
|
||||
return objectMapper.selectSaleStoreInfo(saleStoreId);
|
||||
}
|
||||
|
||||
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId) throws Exception {
|
||||
SaleStoreResponse result = objectMapper.selectFirstAgentInfo(saleStoreId);
|
||||
if (result == null) {
|
||||
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 물건정보 메인 목록 조회
|
||||
*
|
||||
|
||||
@ -24,6 +24,9 @@ public class SaleStoreResponse {
|
||||
@Schema(description = "1차점판매점ID")
|
||||
private String firstAgentId;
|
||||
|
||||
@Schema(description = "1차점판매점명")
|
||||
private String firstAgentName;
|
||||
|
||||
@Schema(description = "영업사원명")
|
||||
private String businessCharger;
|
||||
|
||||
|
||||
@ -140,6 +140,17 @@
|
||||
WHERE A.SALE_STORE_ID = #{saleStoreId}
|
||||
</select>
|
||||
|
||||
<select id="selectFirstAgentInfo" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
|
||||
/* sqlid : com.interplug.qcast.biz.object.selectFirstAgentInfo */
|
||||
SELECT
|
||||
A.FIRST_AGENT_ID
|
||||
, (SELECT SALE_STORE_NAME FROM M_SALES_STORE WITH(NOLOCK) WHERE SALE_STORE_ID = A.FIRST_AGENT_ID AND APPROVE_FLG = '2' AND DEL_FLG = '0') AS FIRST_AGENT_NAME
|
||||
FROM M_SALES_STORE A WITH(NOLOCK)
|
||||
WHERE A.SALE_STORE_ID = #{saleStoreId}
|
||||
AND A.SALE_STORE_LEVEL = '2'
|
||||
AND A.DEL_FLG = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectObjectMainList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
|
||||
/* sqlid : com.interplug.qcast.biz.object.selectObjectMainList */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user