Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-api into feature/qcast-api-002
This commit is contained in:
commit
fc05df1e3e
@ -0,0 +1,41 @@
|
|||||||
|
package com.interplug.qcast.biz.specialNote;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest;
|
||||||
|
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/special-note")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Tag(name = "SpecialNoteController", description = "견적 특이사항 관련 API")
|
||||||
|
public class SpecialNoteController {
|
||||||
|
|
||||||
|
private final SpecialNoteService specialNoteService;
|
||||||
|
|
||||||
|
@Operation(description = "견적 특이사항 정보를 등록/수정한다. (동기화)")
|
||||||
|
@PostMapping("/special-note-save")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public void setSpecialNoteSave(@RequestBody SpecialNoteRequest specialNoteRequest)
|
||||||
|
throws Exception {
|
||||||
|
specialNoteService.setSpecialNoteSave(specialNoteRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "견적 특이사항 ITEM 정보를 등록/수정한다. (동기화)")
|
||||||
|
@PostMapping("/special-note-item-save")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public void setSpecialNoteItemSave(@RequestBody SpecialNoteItemRequest specialNoteItemRequest)
|
||||||
|
throws Exception {
|
||||||
|
specialNoteService.setSpecialNoteItemSave(specialNoteItemRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.interplug.qcast.biz.specialNote;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest;
|
||||||
|
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SpecialNoteMapper {
|
||||||
|
|
||||||
|
void setSpecialNoteSave(SpecialNoteRequest specialNoteRequest) throws Exception;
|
||||||
|
|
||||||
|
void setSpecialNoteItemSave(SpecialNoteItemRequest specialNoteItemRequest) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.interplug.qcast.biz.specialNote;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest;
|
||||||
|
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SpecialNoteService {
|
||||||
|
|
||||||
|
private final SpecialNoteMapper specialNoteMapper;
|
||||||
|
|
||||||
|
public void setSpecialNoteSave(SpecialNoteRequest specialNoteRequest) throws Exception {
|
||||||
|
specialNoteMapper.setSpecialNoteSave(specialNoteRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecialNoteItemSave(SpecialNoteItemRequest specialNoteItemRequest)
|
||||||
|
throws Exception {
|
||||||
|
specialNoteMapper.setSpecialNoteItemSave(specialNoteItemRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.interplug.qcast.biz.specialNote.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class SpecialNoteItemRequest {
|
||||||
|
|
||||||
|
/** Special Note Type Code */
|
||||||
|
private String spnTypeCd;
|
||||||
|
|
||||||
|
/** Special Note Attribute */
|
||||||
|
private String spnAttrCd;
|
||||||
|
|
||||||
|
/** Item Id */
|
||||||
|
private String itemId;
|
||||||
|
|
||||||
|
/** Del Flag */
|
||||||
|
private String delFlg;
|
||||||
|
|
||||||
|
/** Inputted Date */
|
||||||
|
private String registDatetime;
|
||||||
|
|
||||||
|
/** Updated Date */
|
||||||
|
private String lastEditDatetime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.interplug.qcast.biz.specialNote.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class SpecialNoteRequest {
|
||||||
|
|
||||||
|
/** Special Note Type Code */
|
||||||
|
private String spnTypeCd;
|
||||||
|
|
||||||
|
/** Special Note Attribute */
|
||||||
|
private String spnAttrCd;
|
||||||
|
|
||||||
|
/** Used Flg */
|
||||||
|
private String useFlg;
|
||||||
|
|
||||||
|
/** Remarks */
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
/** Del Flag */
|
||||||
|
private String delFlg;
|
||||||
|
|
||||||
|
/** Inputted Date */
|
||||||
|
private String registDatetime;
|
||||||
|
|
||||||
|
/** Updated Date */
|
||||||
|
private String lastEditDatetime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ public interface UserMapper {
|
|||||||
|
|
||||||
int setStoreSapCdSave(StoreRequest storeReq) throws Exception;
|
int setStoreSapCdSave(StoreRequest storeReq) throws Exception;
|
||||||
|
|
||||||
int setUserSave(UserRequest userReqList) throws Exception;
|
int setStoreNorthModuleSave(StoreRequest storeReq) throws Exception;
|
||||||
|
|
||||||
|
int setUserSave(UserRequest userReqList) throws Exception;
|
||||||
}
|
}
|
||||||
@ -2,11 +2,10 @@ package com.interplug.qcast.biz.user;
|
|||||||
|
|
||||||
import com.interplug.qcast.biz.user.dto.StoreRequest;
|
import com.interplug.qcast.biz.user.dto.StoreRequest;
|
||||||
import com.interplug.qcast.biz.user.dto.UserRequest;
|
import com.interplug.qcast.biz.user.dto.UserRequest;
|
||||||
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class UserService {
|
public class UserService {
|
||||||
@ -15,6 +14,7 @@ public class UserService {
|
|||||||
public int setStoreSave(StoreRequest storeReq) throws Exception {
|
public int setStoreSave(StoreRequest storeReq) throws Exception {
|
||||||
int resultCnt = userMapper.setStoreSave(storeReq);
|
int resultCnt = userMapper.setStoreSave(storeReq);
|
||||||
userMapper.setStoreSapCdSave(storeReq);
|
userMapper.setStoreSapCdSave(storeReq);
|
||||||
|
userMapper.setStoreNorthModuleSave(storeReq);
|
||||||
return resultCnt;
|
return resultCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,66 +7,94 @@ import lombok.Data;
|
|||||||
public class StoreRequest {
|
public class StoreRequest {
|
||||||
@Schema(description = "SAP Store Code")
|
@Schema(description = "SAP Store Code")
|
||||||
private String sapSalesStoreCd;
|
private String sapSalesStoreCd;
|
||||||
|
|
||||||
@Schema(description = "판매점 ID")
|
@Schema(description = "판매점 ID")
|
||||||
private String saleStoreId;
|
private String saleStoreId;
|
||||||
|
|
||||||
@Schema(description = "판매대리점명")
|
@Schema(description = "판매대리점명")
|
||||||
private String saleStoreName;
|
private String saleStoreName;
|
||||||
|
|
||||||
@Schema(description = "후리가나")
|
@Schema(description = "후리가나")
|
||||||
private String saleStoreNameKana;
|
private String saleStoreNameKana;
|
||||||
|
|
||||||
@Schema(description = "우편번호")
|
@Schema(description = "우편번호")
|
||||||
private String zipNo;
|
private String zipNo;
|
||||||
|
|
||||||
@Schema(description = "주소")
|
@Schema(description = "주소")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@Schema(description = "연락처")
|
@Schema(description = "연락처")
|
||||||
private String tel;
|
private String tel;
|
||||||
|
|
||||||
@Schema(description = "팩스번호")
|
@Schema(description = "팩스번호")
|
||||||
private String fax;
|
private String fax;
|
||||||
|
|
||||||
@Schema(description = "법인번호")
|
@Schema(description = "법인번호")
|
||||||
private String bizNo;
|
private String bizNo;
|
||||||
|
|
||||||
@Schema(description = "요청일시")
|
@Schema(description = "요청일시")
|
||||||
private String applicationDate;
|
private String applicationDate;
|
||||||
|
|
||||||
@Schema(description = "승인상태 변경일시")
|
@Schema(description = "승인상태 변경일시")
|
||||||
private String approvalDate;
|
private String approvalDate;
|
||||||
|
|
||||||
@Schema(description = "승인상태")
|
@Schema(description = "승인상태")
|
||||||
private String approveFlg;
|
private String approveFlg;
|
||||||
|
|
||||||
@Schema(description = "지불형태")
|
@Schema(description = "지불형태")
|
||||||
private String paymentTerms;
|
private String paymentTerms;
|
||||||
|
|
||||||
@Schema(description = "1차점여부")
|
@Schema(description = "1차점여부")
|
||||||
private String firstAgentFlg;
|
private String firstAgentFlg;
|
||||||
|
|
||||||
@Schema(description = "2차점ㅇ여부")
|
@Schema(description = "2차점ㅇ여부")
|
||||||
private String secondAgentFlg;
|
private String secondAgentFlg;
|
||||||
|
|
||||||
@Schema(description = "1차점 판매점 ID")
|
@Schema(description = "1차점 판매점 ID")
|
||||||
private String firstAgentId;
|
private String firstAgentId;
|
||||||
|
|
||||||
@Schema(description = "부모 판매점 ID")
|
@Schema(description = "부모 판매점 ID")
|
||||||
private String parentSaleAgentId;
|
private String parentSaleAgentId;
|
||||||
|
|
||||||
@Schema(description = "영업사원명")
|
@Schema(description = "영업사원명")
|
||||||
private String businessCharger;
|
private String businessCharger;
|
||||||
|
|
||||||
@Schema(description = "영업사원 코드")
|
@Schema(description = "영업사원 코드")
|
||||||
private String businessChargerCd;
|
private String businessChargerCd;
|
||||||
|
|
||||||
@Schema(description = "회사명")
|
@Schema(description = "회사명")
|
||||||
private String dispCompanyName;
|
private String dispCompanyName;
|
||||||
|
|
||||||
@Schema(description = "회사 우편번호")
|
@Schema(description = "회사 우편번호")
|
||||||
private String dispZipNo;
|
private String dispZipNo;
|
||||||
|
|
||||||
@Schema(description = "회사 주소")
|
@Schema(description = "회사 주소")
|
||||||
private String dispAddress;
|
private String dispAddress;
|
||||||
|
|
||||||
@Schema(description = "회사 연락처")
|
@Schema(description = "회사 연락처")
|
||||||
private String dispTel;
|
private String dispTel;
|
||||||
|
|
||||||
@Schema(description = "회사 팩스번호")
|
@Schema(description = "회사 팩스번호")
|
||||||
private String dispFax;
|
private String dispFax;
|
||||||
|
|
||||||
@Schema(description = "회사 이메일주소")
|
@Schema(description = "회사 이메일주소")
|
||||||
private String dispMail;
|
private String dispMail;
|
||||||
|
|
||||||
@Schema(description = "판매점 LEVEL")
|
@Schema(description = "판매점 LEVEL")
|
||||||
private String saleStoreLevel;
|
private String saleStoreLevel;
|
||||||
|
|
||||||
@Schema(description = "삭제여부")
|
@Schema(description = "삭제여부")
|
||||||
private String delFlg;
|
private String delFlg;
|
||||||
|
|
||||||
@Schema(description = "등록일시")
|
@Schema(description = "등록일시")
|
||||||
private String registDatetime;
|
private String registDatetime;
|
||||||
|
|
||||||
@Schema(description = "수정일시")
|
@Schema(description = "수정일시")
|
||||||
private String lastEditDatetime;
|
private String lastEditDatetime;
|
||||||
|
|
||||||
@Schema(description = "수정자")
|
@Schema(description = "수정자")
|
||||||
private String lastEditUser;
|
private String lastEditUser;
|
||||||
|
|
||||||
|
@Schema(description = "북쪽 모듈 여부")
|
||||||
|
private String northModuleFlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -269,7 +269,6 @@
|
|||||||
|
|
||||||
<select id="selectNtrCtsCmpExclDownData" parameterType="com.interplug.qcast.biz.excelDown.dto.NtrCtsCmpRequest" resultType="com.interplug.qcast.biz.excelDown.dto.NtrCtsCmpResponse">
|
<select id="selectNtrCtsCmpExclDownData" parameterType="com.interplug.qcast.biz.excelDown.dto.NtrCtsCmpRequest" resultType="com.interplug.qcast.biz.excelDown.dto.NtrCtsCmpResponse">
|
||||||
/* sqlid : com.interplug.qcast.api.excelDown.selectNtrCtsCmpExclDownData (자연재해보상입력 엑셀 다운로드 데이터 조회)*/
|
/* sqlid : com.interplug.qcast.api.excelDown.selectNtrCtsCmpExclDownData (자연재해보상입력 엑셀 다운로드 데이터 조회)*/
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
A.GUARANTEE_RECEIVE_USER /* 구매자 성명購入者 */
|
A.GUARANTEE_RECEIVE_USER /* 구매자 성명購入者 */
|
||||||
, A.OBJECT_NO /* 물건번호 お客様コード */
|
, A.OBJECT_NO /* 물건번호 お客様コード */
|
||||||
@ -347,7 +346,7 @@
|
|||||||
ON A.SETUP_PLACE_PREF_ID = C.PREF_ID
|
ON A.SETUP_PLACE_PREF_ID = C.PREF_ID
|
||||||
LEFT OUTER JOIN T_OBJECT D
|
LEFT OUTER JOIN T_OBJECT D
|
||||||
ON A.OBJECT_NO = D.OBJECT_NO
|
ON A.OBJECT_NO = D.OBJECT_NO
|
||||||
WHERE D.DEL_FLG != 1
|
WHERE D.DEL_FLG = 0
|
||||||
<if test="sch_dtType != null and sch_dtType != ''">
|
<if test="sch_dtType != null and sch_dtType != ''">
|
||||||
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''">
|
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''">
|
||||||
<choose>
|
<choose>
|
||||||
|
|||||||
82
src/main/resources/mappers/specialNote/specialNoteMapper.xml
Normal file
82
src/main/resources/mappers/specialNote/specialNoteMapper.xml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<?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.specialNote.SpecialNoteMapper">
|
||||||
|
|
||||||
|
<insert id="setSpecialNoteSave" parameterType="com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest" >
|
||||||
|
/* sqlid : com.interplug.qcast.specialNote.setSpecialNoteSave (견적 특이사항 정보 등록/수정 - 동기화) */
|
||||||
|
MERGE T_OBJECT_SPECIAL_NOTE AS A
|
||||||
|
USING
|
||||||
|
(
|
||||||
|
SELECT #{spnAttrCd} AS SPN_ATTR_CD
|
||||||
|
, #{spnTypeCd} AS SPN_TYPE_CD
|
||||||
|
) AS T
|
||||||
|
ON (
|
||||||
|
A.SPN_ATTR_CD = T.SPN_ATTR_CD
|
||||||
|
AND A.SPN_TYPE_CD = T.SPN_TYPE_CD
|
||||||
|
)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET
|
||||||
|
USE_FLG = #{useFlg}
|
||||||
|
, REMARKS = #{remarks}
|
||||||
|
, DEL_FLG = #{delFlg}
|
||||||
|
, REGIST_DATETIME = #{registDatetime}
|
||||||
|
, LAST_EDIT_DATETIME = #{lastEditDatetime}
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (
|
||||||
|
SPN_ATTR_CD
|
||||||
|
, SPN_TYPE_CD
|
||||||
|
, USE_FLG
|
||||||
|
, REMARKS
|
||||||
|
, DEL_FLG
|
||||||
|
, REGIST_DATETIME
|
||||||
|
, LAST_EDIT_DATETIME
|
||||||
|
) VALUES (
|
||||||
|
#{spnAttrCd}
|
||||||
|
, #{SpnTypeCd}
|
||||||
|
, #{useFlg}
|
||||||
|
, #{remarks}
|
||||||
|
, #{delFlg}
|
||||||
|
, #{registDatetime}
|
||||||
|
, #{lastEditDatetime}
|
||||||
|
);
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="setSpecialNoteItemSave" parameterType="com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest" >
|
||||||
|
/* sqlid : com.interplug.qcast.specialNote.setStoreDisplayItemSave (견적 특이사항 ITEM 정보 등록/수정 - 동기화) */
|
||||||
|
MERGE T_OBJECT_SPECIAL_NOTE_ITEM AS A
|
||||||
|
USING
|
||||||
|
(
|
||||||
|
SELECT #{spnAttrCd} AS SPN_ATTR_CD
|
||||||
|
, #{spnTypeCd} AS SPN_TYPE_CD
|
||||||
|
, #{itemId} AS ITEM_ID
|
||||||
|
) AS T
|
||||||
|
ON (
|
||||||
|
A.SPN_ATTR_CD = T.SPN_ATTR_CD
|
||||||
|
AND A.SPN_TYPE_CD = T.SPN_TYPE_CD
|
||||||
|
AND A.ITEM_ID = T.ITEM_ID
|
||||||
|
)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET
|
||||||
|
DEL_FLG = #{delFlg}
|
||||||
|
, REGIST_DATETIME = #{registDatetime}
|
||||||
|
, LAST_EDIT_DATETIME = #{lastEditDatetime}
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (
|
||||||
|
SPN_ATTR_CD
|
||||||
|
, SPN_TYPE_CD
|
||||||
|
, ITEM_ID
|
||||||
|
, DEL_FLG
|
||||||
|
, REGIST_DATETIME
|
||||||
|
, LAST_EDIT_DATETIME
|
||||||
|
) VALUES (
|
||||||
|
#{spnAttrCd}
|
||||||
|
, #{spnTypeCd}
|
||||||
|
, #{itemId}
|
||||||
|
, #{delFlg}
|
||||||
|
, #{registDatetime}
|
||||||
|
, #{lastEditDatetime}
|
||||||
|
);
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -231,4 +231,22 @@
|
|||||||
);
|
);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<insert id="setStoreNorthModuleSave" parameterType="com.interplug.qcast.biz.user.dto.StoreRequest" >
|
||||||
|
/* sqlid : com.interplug.qcast.user.setStoreNorthModuleSave */
|
||||||
|
MERGE INTO M_SALES_STORE_NORTH_MODULE AS A
|
||||||
|
USING ( SELECT #{saleStoreId} AS SALE_STORE_ID ) AS D
|
||||||
|
ON A.SALE_STORE_ID = D.SALE_STORE_ID
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET
|
||||||
|
DEL_FLG = #{northModuleFlg}
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (
|
||||||
|
SALE_STORE_ID
|
||||||
|
, DEL_FLG
|
||||||
|
) VALUES (
|
||||||
|
#{saleStoreId}
|
||||||
|
, #{northModuleFlg}
|
||||||
|
);
|
||||||
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user