북쪽모듈여부 테이블 동기화 API 추가

This commit is contained in:
DESKTOP-6ARNG1Q\dlsgk 2024-09-27 14:44:17 +09:00
parent f7a41332d5
commit 6efd3d5426
5 changed files with 118 additions and 72 deletions

View File

@ -7,10 +7,11 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UserMapper {
int setStoreSave(StoreRequest storeReq) throws Exception;
int setStoreSave(StoreRequest storeReq) throws Exception;
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;
}

View File

@ -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.UserRequest;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@RequiredArgsConstructor
public class UserService {
@ -15,6 +14,7 @@ public class UserService {
public int setStoreSave(StoreRequest storeReq) throws Exception {
int resultCnt = userMapper.setStoreSave(storeReq);
userMapper.setStoreSapCdSave(storeReq);
userMapper.setStoreNorthModuleSave(storeReq);
return resultCnt;
}

View File

@ -5,68 +5,96 @@ import lombok.Data;
@Data
public class StoreRequest {
@Schema(description = "SAP Store Code")
private String sapSalesStoreCd;
@Schema(description = "판매점 ID")
private String saleStoreId;
@Schema(description = "판매대리점명")
private String saleStoreName;
@Schema(description = "후리가나")
private String saleStoreNameKana;
@Schema(description = "우편번호")
private String zipNo;
@Schema(description = "주소")
private String address;
@Schema(description = "연락처")
private String tel;
@Schema(description = "팩스번호")
private String fax;
@Schema(description = "법인번호")
private String bizNo;
@Schema(description = "요청일시")
private String applicationDate;
@Schema(description = "승인상태 변경일시")
private String approvalDate;
@Schema(description = "승인상태")
private String approveFlg;
@Schema(description = "지불형태")
private String paymentTerms;
@Schema(description = "1차점여부")
private String firstAgentFlg;
@Schema(description = "2차점ㅇ여부")
private String secondAgentFlg;
@Schema(description = "1차점 판매점 ID")
private String firstAgentId;
@Schema(description = "부모 판매점 ID")
private String parentSaleAgentId;
@Schema(description = "영업사원명")
private String businessCharger;
@Schema(description = "영업사원 코드")
private String businessChargerCd;
@Schema(description = "회사명")
private String dispCompanyName;
@Schema(description = "회사 우편번호")
private String dispZipNo;
@Schema(description = "회사 주소")
private String dispAddress;
@Schema(description = "회사 연락처")
private String dispTel;
@Schema(description = "회사 팩스번호")
private String dispFax;
@Schema(description = "회사 이메일주소")
private String dispMail;
@Schema(description = "판매점 LEVEL")
private String saleStoreLevel;
@Schema(description = "삭제여부")
private String delFlg;
@Schema(description = "등록일시")
private String registDatetime;
@Schema(description = "수정일시")
private String lastEditDatetime;
@Schema(description = "수정자")
private String lastEditUser;
@Schema(description = "SAP Store Code")
private String sapSalesStoreCd;
@Schema(description = "판매점 ID")
private String saleStoreId;
@Schema(description = "판매대리점명")
private String saleStoreName;
@Schema(description = "후리가나")
private String saleStoreNameKana;
@Schema(description = "우편번호")
private String zipNo;
@Schema(description = "주소")
private String address;
@Schema(description = "연락처")
private String tel;
@Schema(description = "팩스번호")
private String fax;
@Schema(description = "법인번호")
private String bizNo;
@Schema(description = "요청일시")
private String applicationDate;
@Schema(description = "승인상태 변경일시")
private String approvalDate;
@Schema(description = "승인상태")
private String approveFlg;
@Schema(description = "지불형태")
private String paymentTerms;
@Schema(description = "1차점여부")
private String firstAgentFlg;
@Schema(description = "2차점ㅇ여부")
private String secondAgentFlg;
@Schema(description = "1차점 판매점 ID")
private String firstAgentId;
@Schema(description = "부모 판매점 ID")
private String parentSaleAgentId;
@Schema(description = "영업사원명")
private String businessCharger;
@Schema(description = "영업사원 코드")
private String businessChargerCd;
@Schema(description = "회사명")
private String dispCompanyName;
@Schema(description = "회사 우편번호")
private String dispZipNo;
@Schema(description = "회사 주소")
private String dispAddress;
@Schema(description = "회사 연락처")
private String dispTel;
@Schema(description = "회사 팩스번호")
private String dispFax;
@Schema(description = "회사 이메일주소")
private String dispMail;
@Schema(description = "판매점 LEVEL")
private String saleStoreLevel;
@Schema(description = "삭제여부")
private String delFlg;
@Schema(description = "등록일시")
private String registDatetime;
@Schema(description = "수정일시")
private String lastEditDatetime;
@Schema(description = "수정자")
private String lastEditUser;
@Schema(description = "북쪽 모듈 여부")
private String northModuleFlg;
}

View File

@ -269,7 +269,6 @@
<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 (자연재해보상입력 엑셀 다운로드 데이터 조회)*/
SELECT
A.GUARANTEE_RECEIVE_USER /* 구매자 성명購入者 */
, A.OBJECT_NO /* 물건번호 お客様コード */
@ -347,7 +346,7 @@
ON A.SETUP_PLACE_PREF_ID = C.PREF_ID
LEFT OUTER JOIN T_OBJECT D
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_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''">
<choose>
@ -378,7 +377,7 @@
</select>
<select id="selectWarrantyIssuedCmpExclDownData" parameterType="com.interplug.qcast.biz.excelDown.dto.WrntIsncCmplRequest" resultType="com.interplug.qcast.biz.excelDown.dto.WrntIsncCmplResponse">
/* sqlid : com.interplug.qcast.api.excelDown.selectWarrantyIssuedCmpExclDownData (보증서발행완료 물건 엑셀 다운로드 데이터 조회)*/
/* sqlid : com.interplug.qcast.api.excelDown.selectWarrantyIssuedCmpExclDownData (보증서발행완료 물건 엑셀 다운로드 데이터 조회)*/
SELECT
A.OBJECT_NO /* 부동산 관리 번호 */
, A.PLAN_NO /* 계획 */

View File

@ -231,4 +231,22 @@
);
</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>