Compare commits

...

10 Commits

16 changed files with 126 additions and 22 deletions

View File

@ -1369,7 +1369,8 @@ public class EstimateService {
// file Name 명이 없는경우 // file Name 명이 없는경우
if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) { if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) {
estimateRequest.setFileName(estimateResponse.getObjectNo() + "_" estimateRequest.setFileName(StringUtils.defaultString(estimateResponse.getObjectNo()) + "_"
+ StringUtils.defaultString(estimateResponse.getPlanNo()) + "_"
+ new SimpleDateFormat("yyyyMMdd").format(new Date())); + new SimpleDateFormat("yyyyMMdd").format(new Date()));
} }
@ -2446,7 +2447,7 @@ public class EstimateService {
"<td style='width:60px;'>" + StringUtils.defaultString(itemResponse.getNo()) + "</td>"); "<td style='width:60px;'>" + StringUtils.defaultString(itemResponse.getNo()) + "</td>");
sb.append("<td style='width:120px;text-align:left;'>" sb.append("<td style='width:120px;text-align:left;'>"
+ StringUtils.defaultString(itemResponse.getItemName()) + "</td>"); + StringUtils.defaultString(itemResponse.getItemName()) + "</td>");
sb.append("<td style='width:120px;'>" + StringUtils.defaultString(itemResponse.getItemNo()) sb.append("<td style='width:120px;text-align:left;'>" + StringUtils.defaultString(itemResponse.getItemNo())
+ "</td>"); + "</td>");
sb.append( sb.append(
"<td class='hide-column' style='width:80px;text-align:right;'>" "<td class='hide-column' style='width:80px;text-align:right;'>"
@ -2464,7 +2465,7 @@ public class EstimateService {
sb.append("<tr>"); sb.append("<tr>");
sb.append("<td style='width:60px;'>" + StringUtils.defaultString(data.getPkgNo()) + "</td>"); sb.append("<td style='width:60px;'>" + StringUtils.defaultString(data.getPkgNo()) + "</td>");
sb.append("<td style='width:120px;text-align:left;'>住宅 PKG</td>"); sb.append("<td style='width:120px;text-align:left;'>住宅 PKG</td>");
sb.append("<td style='width:120px;'>-</td>"); sb.append("<td style='width:120px;text-align:left;'>-</td>");
sb.append("<td style='width:80px;text-align:right;'>" sb.append("<td style='width:80px;text-align:right;'>"
+ StringUtils.defaultString(data.getPkgAsp()) + "</td>"); + StringUtils.defaultString(data.getPkgAsp()) + "</td>");
sb.append("<td style='width:60px;text-align:right;'>" sb.append("<td style='width:60px;text-align:right;'>"
@ -2745,7 +2746,7 @@ public class EstimateService {
sb.append("<td style='width:120px;text-align:left;'>") sb.append("<td style='width:120px;text-align:left;'>")
.append(StringUtils.defaultString(itemResponse.getItemName())) .append(StringUtils.defaultString(itemResponse.getItemName()))
.append("</td>"); .append("</td>");
sb.append("<td style='width:120px;'>") sb.append("<td style='width:120px;text-align:left;'>")
.append(StringUtils.defaultString(itemResponse.getItemNo())) .append(StringUtils.defaultString(itemResponse.getItemNo()))
.append("</td>"); .append("</td>");
sb.append("<td style='width:60px;text-align:right;'>").append(amountStr).append("</td>"); sb.append("<td style='width:60px;text-align:right;'>").append(amountStr).append("</td>");
@ -3180,6 +3181,10 @@ public class EstimateService {
SimulationEstimateListResponse response = new SimulationEstimateListResponse(); SimulationEstimateListResponse response = new SimulationEstimateListResponse();
if (!"T01".equals(objectRequest.getSaleStoreId())) {
objectRequest.setSchSelSaleStoreId("");
}
// 견적서 목록 조회 // 견적서 목록 조회
List<ObjectResponse> objectList = estimateMapper.selectSimulationEstimateList(objectRequest); List<ObjectResponse> objectList = estimateMapper.selectSimulationEstimateList(objectRequest);

View File

@ -34,14 +34,22 @@ public class ExcelDownController {
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
public QuotResponse quotExclDownData(@RequestBody QuotRequest quotRequest) throws Exception { public QuotResponse quotExclDownData(@RequestBody QuotRequest quotRequest) throws Exception {
List<QuotPlanResponse> quotPlanExclDownData =
excelDownService.selectQuotPlanExclDownData(quotRequest);
List<QuotItemResponse> quotItemExclDownData =
excelDownService.selectQuotItemExclDownData(quotRequest);
QuotResponse quotRes = new QuotResponse(); QuotResponse quotRes = new QuotResponse();
quotRes.setQuotPlanList(quotPlanExclDownData);
quotRes.setQuotItemList(quotItemExclDownData); if ("1".equals(quotRequest.getSch_select_type())) {
List<QuotPlanResponse> quotPlanExclDownData =
excelDownService.selectQuotPlanExclDownData(quotRequest);
List<QuotItemResponse> quotItemExclDownData =
excelDownService.selectQuotItemExclDownData(quotRequest);
quotRes.setQuotPlanList(quotPlanExclDownData);
quotRes.setQuotItemList(quotItemExclDownData);
} else {
List<QuotPlanResponse> quotPlanExclDownData =
excelDownService.selectQuotPlanExclDownData2(quotRequest);
quotRes.setQuotPlanList(quotPlanExclDownData);
}
return quotRes; return quotRes;
} }

View File

@ -23,6 +23,15 @@ interface ExcelDownMapper {
*/ */
List<QuotPlanResponse> selectQuotPlanExclDownData(QuotRequest quotRequest) throws Exception; List<QuotPlanResponse> selectQuotPlanExclDownData(QuotRequest quotRequest) throws Exception;
/**
* 과거데이터_견적 엑셀다운로드 조회 - 심플모드
*
* @param quotRequest
* @return
* @throws Exception
*/
List<QuotPlanResponse> selectQuotPlanExclDownData2(QuotRequest quotRequest) throws Exception;
/** /**
* 과거데이터_견적 엑셀다운로드 조회(아이템) * 과거데이터_견적 엑셀다운로드 조회(아이템)
* *

View File

@ -38,6 +38,18 @@ public class ExcelDownService {
return excelDownMapper.selectQuotPlanExclDownData(quotRequest); return excelDownMapper.selectQuotPlanExclDownData(quotRequest);
} }
/**
* 과거데이터_견적 엑셀다운로드 조회
*
* @param quotRequest
* @return
* @throws Exception
*/
public List<QuotPlanResponse> selectQuotPlanExclDownData2(QuotRequest quotRequest)
throws Exception {
return excelDownMapper.selectQuotPlanExclDownData2(quotRequest);
}
/** /**
* 과거데이터_견적 엑셀다운로드 조회(아이템) * 과거데이터_견적 엑셀다운로드 조회(아이템)
* *

View File

@ -117,5 +117,8 @@ public class QuotPlanResponse {
private String saleOther; private String saleOther;
@Schema(description = "가대판매가격 架台販売価格") @Schema(description = "가대판매가격 架台販売価格")
private String saleStand; private String saleStand;
@Schema(description = "플랜정보 등록일시 プラン情報登録日時")
private String createDatetime;
@Schema(description = "플랜정보 등록자 プラン情報登録者")
private String createUser;
} }

View File

@ -11,6 +11,8 @@ import lombok.Setter;
public class QuotRequest { public class QuotRequest {
@Schema(description = "Language Code") @Schema(description = "Language Code")
private String langCd; private String langCd;
@Schema(description = "조회타입")
private String sch_select_type;
@Schema(description = "시작일") @Schema(description = "시작일")
private String sch_startDt; private String sch_startDt;
@Schema(description = "종료일") @Schema(description = "종료일")

View File

@ -26,4 +26,7 @@ public class ApiPcsConnResponse {
@Schema(description = "승압병렬수", maxLength = 10) @Schema(description = "승압병렬수", maxLength = 10)
private Integer vStuParalCnt; private Integer vStuParalCnt;
@Schema(description = "모듈타입코드", maxLength = 20)
private String moduleTpCd;
} }

View File

@ -13,4 +13,10 @@ public class ApiQuotationItemPcsConnectionRequest {
@Schema(description = "연결함(접속함)아이템ID") @Schema(description = "연결함(접속함)아이템ID")
@NotNull @NotNull
public String connItemId; public String connItemId;
@Schema(description = "병렬수(회로수)")
public Integer connMaxParalCnt;
@Schema(description = "모듈타입코드")
public String moduleTpCd;
} }

View File

@ -2503,7 +2503,9 @@ public class PwrGnrSimService {
// file Name 명이 없는경우 // file Name 명이 없는경우
if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) { if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) {
estimateRequest.setFileName( estimateRequest.setFileName(
estimateResponse.getObjectNo() StringUtils.defaultString(estimateResponse.getObjectNo())
+ "_"
+ StringUtils.defaultString(estimateResponse.getPlanNo())
+ "_" + "_"
+ new SimpleDateFormat("yyyyMMdd").format(new Date())); + new SimpleDateFormat("yyyyMMdd").format(new Date()));
} }

View File

@ -4,6 +4,7 @@ import com.interplug.qcast.biz.user.dto.StoreRequest;
import com.interplug.qcast.biz.user.dto.StoreSyncResquest; import com.interplug.qcast.biz.user.dto.StoreSyncResquest;
import com.interplug.qcast.biz.user.dto.UserRequest; import com.interplug.qcast.biz.user.dto.UserRequest;
import com.interplug.qcast.biz.user.dto.UserResponse; import com.interplug.qcast.biz.user.dto.UserResponse;
import io.micrometer.common.util.StringUtils;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List; import java.util.List;
@ -41,6 +42,14 @@ public class UserController {
public UserResponse setStoreSave(@RequestBody StoreRequest storeReq) throws Exception { public UserResponse setStoreSave(@RequestBody StoreRequest storeReq) throws Exception {
UserResponse userResponse = new UserResponse(); UserResponse userResponse = new UserResponse();
// 판매점의 우편번호 등록시 하이픈이 없다면 셋제짜리 이후에 하이픈 조합으로 등록처리(2026.04.30 이병곤 과장 추가 요청)
String zipNo = storeReq.getZipNo();
if (!StringUtils.isEmpty(zipNo)
&& !zipNo.contains("-")
&& zipNo.length() >= 4
&& zipNo.length() <= 9) {
storeReq.setZipNo(zipNo.substring(0, 3) + "-" + zipNo.substring(3));
}
int resultCnt = userService.setStoreSave(storeReq); int resultCnt = userService.setStoreSave(storeReq);
if (resultCnt > 0) userResponse.setCode("200"); if (resultCnt > 0) userResponse.setCode("200");

View File

@ -93,6 +93,12 @@ public class UserService {
? "" ? ""
: storeRequest.getSaleStoreLevel(); : storeRequest.getSaleStoreLevel();
// 판매점의 우편번호 등록시 하이픈이 없다면 셋제짜리 이후에 하이픈 조합으로 등록처리(2026.04.30 이병곤 과장 추가 요청)
String zipNo = storeRequest.getZipNo();
if (!StringUtils.isEmpty(zipNo) && !zipNo.contains("-") && zipNo.length() >= 4 && zipNo.length() <= 9) {
storeRequest.setZipNo(zipNo.substring(0, 3) + "-" + zipNo.substring(3));
}
userMapper.setStoreSave(storeRequest); userMapper.setStoreSave(storeRequest);
userMapper.setStoreInfoSave(storeRequest); userMapper.setStoreInfoSave(storeRequest);
userMapper.setStoreSapCdSave(storeRequest); userMapper.setStoreSapCdSave(storeRequest);
@ -186,6 +192,12 @@ public class UserService {
? "" ? ""
: storeRequest.getSaleStoreLevel(); : storeRequest.getSaleStoreLevel();
// 판매점의 우편번호 등록시 하이픈이 없다면 셋제짜리 이후에 하이픈 조합으로 등록처리(2026.04.30 이병곤 과장 추가 요청)
String zipNo = storeRequest.getZipNo();
if (!StringUtils.isEmpty(zipNo) && !zipNo.contains("-") && zipNo.length() >= 4 && zipNo.length() <= 9) {
storeRequest.setZipNo(zipNo.substring(0, 3) + "-" + zipNo.substring(3));
}
userMapper.setStoreSave(storeRequest); userMapper.setStoreSave(storeRequest);
userMapper.setStoreInfoSave(storeRequest); userMapper.setStoreInfoSave(storeRequest);
userMapper.setStoreSapCdSave(storeRequest); userMapper.setStoreSapCdSave(storeRequest);

View File

@ -138,7 +138,7 @@
<select id="selectItemBomList" parameterType="String" resultType="com.interplug.qcast.biz.displayItem.dto.ItemResponse" > <select id="selectItemBomList" parameterType="String" resultType="com.interplug.qcast.biz.displayItem.dto.ItemResponse" >
/* sqlid : com.interplug.qcast.displayItem.selectItemBomList */ /* sqlid : com.interplug.qcast.displayItem.selectItemBomList */
SELECT SELECT
PI.ITEM_ID PI.PACKAGE_ITEM_ID AS ITEM_ID
, PI.AMOUNT AS BOM_AMOUNT , PI.AMOUNT AS BOM_AMOUNT
, MI.ITEM_NO , MI.ITEM_NO
, MI.ITEM_NAME , MI.ITEM_NAME
@ -157,10 +157,10 @@
, '0' AS OPEN_FLG , '0' AS OPEN_FLG
FROM M_PACKAGE_ITEM PI WITH (NOLOCK) FROM M_PACKAGE_ITEM PI WITH (NOLOCK)
INNER JOIN M_ITEM MI WITH (NOLOCK) INNER JOIN M_ITEM MI WITH (NOLOCK)
ON PI.ITEM_ID = MI.ITEM_ID ON PI.PACKAGE_ITEM_ID = MI.ITEM_ID
LEFT OUTER JOIN M_ITEM_INFO MII LEFT OUTER JOIN M_ITEM_INFO MII
ON MI.ITEM_ID = MII.ITEM_ID ON MI.ITEM_ID = MII.ITEM_ID
WHERE PI.PACKAGE_ITEM_ID = #{itemId} WHERE PI.ITEM_ID = #{itemId}
AND MI.DEL_FLG = 0 AND MI.DEL_FLG = 0
</select> </select>

View File

@ -376,7 +376,7 @@
<select id="selectItemMasterBomList" parameterType="String" resultType="com.interplug.qcast.biz.estimate.dto.ItemResponse"> <select id="selectItemMasterBomList" parameterType="String" resultType="com.interplug.qcast.biz.estimate.dto.ItemResponse">
/* sqlid : com.interplug.qcast.displayItem.selectItemBomList */ /* sqlid : com.interplug.qcast.displayItem.selectItemBomList */
SELECT SELECT
PI.ITEM_ID PI.PACKAGE_ITEM_ID AS ITEM_ID
, PI.AMOUNT AS BOM_AMOUNT , PI.AMOUNT AS BOM_AMOUNT
, I.ITEM_NO , I.ITEM_NO
, I.ITEM_NAME , I.ITEM_NAME
@ -391,10 +391,10 @@
, '0' AS SALE_PRICE , '0' AS SALE_PRICE
FROM M_PACKAGE_ITEM PI WITH (NOLOCK) FROM M_PACKAGE_ITEM PI WITH (NOLOCK)
INNER JOIN M_ITEM I WITH (NOLOCK) INNER JOIN M_ITEM I WITH (NOLOCK)
ON PI.ITEM_ID = I.ITEM_ID ON PI.PACKAGE_ITEM_ID = I.ITEM_ID
INNER JOIN M_ITEM_INFO II WITH (NOLOCK) INNER JOIN M_ITEM_INFO II WITH (NOLOCK)
ON I.ITEM_ID = II.ITEM_ID ON I.ITEM_ID = II.ITEM_ID
WHERE PI.PACKAGE_ITEM_ID = #{itemId} WHERE PI.ITEM_ID = #{itemId}
AND I.DEL_FLG = 0 AND I.DEL_FLG = 0
</select> </select>
@ -1612,9 +1612,6 @@
<if test='schObjectNo != null and schObjectNo != ""'> <if test='schObjectNo != null and schObjectNo != ""'>
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%' AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
</if> </if>
<if test='schSaleStoreId != null and schSaleStoreId != ""'>
AND O.SALE_STORE_ID = #{schSaleStoreId}
</if>
<if test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'> <if test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'>
/* 2차점까지 고름 */ /* 2차점까지 고름 */
AND O.SALE_STORE_ID = #{schOtherSelSaleStoreId} AND O.SALE_STORE_ID = #{schOtherSelSaleStoreId}

View File

@ -192,6 +192,42 @@
</if> </if>
</select> </select>
<select id="selectQuotPlanExclDownData2" parameterType="com.interplug.qcast.biz.excelDown.dto.QuotRequest"
resultType="com.interplug.qcast.biz.excelDown.dto.QuotPlanResponse">
/* sqlid : com.interplug.qcast.api.excelDown.selectQuotPlanExclDownData2 (견적엑셀다운로드 플랜정보 데이터 조회) */
SELECT
O.OBJECT_NO
, P.PLAN_NO
, P.LAST_EDIT_DATETIME
, P.LAST_EDIT_USER
, PI.CREATE_DATETIME
, PI.CREATE_USER
FROM T_OBJECT O WITH (NOLOCK)
LEFT OUTER JOIN T_OBJECT_INFO OI WITH (NOLOCK)
ON O.OBJECT_NO = OI.OBJECT_NO
LEFT OUTER JOIN T_PLAN P WITH (NOLOCK)
ON O.OBJECT_NO = P.OBJECT_NO
LEFT OUTER JOIN T_PLAN_INFO PI WITH (NOLOCK)
ON P.OBJECT_NO = PI.OBJECT_NO
AND P.PLAN_NO = PI.PLAN_NO
LEFT OUTER JOIN M_SALES_STORE SS
ON O.SALE_STORE_ID = SS.SALE_STORE_ID
WHERE P.DEL_FLG = '0'
AND (O.DEL_FLG = '0' OR (OI.SOURCE_ORIGIN = 'QCAST_III' AND OI.ORG_DEL_FLG = '0' AND OI.TEMP_FLG = '0'))
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''"> <!-- 견적일 -->
AND (
(P.LAST_EDIT_DATETIME <![CDATA[>=]]> #{sch_startDt} + ' 00:00:00' AND P.LAST_EDIT_DATETIME <![CDATA[<=]]> #{sch_endDt} + ' 23:59:59') OR
(PI.CREATE_DATETIME <![CDATA[>=]]> #{sch_startDt} + ' 00:00:00' AND PI.CREATE_DATETIME <![CDATA[<=]]> #{sch_endDt} + ' 23:59:59')
)
</if>
<if test="sch_saleStoreId != null and sch_saleStoreId != ''"> <!-- 판매대리점명/ID -->
AND O.SALE_STORE_ID = #{sch_saleStoreId}
</if>
<if test="sch_businessChargerCd != null and sch_businessChargerCd != ''"> <!-- 영업담당자 -->
AND SS.BUSINESS_CHARGER_CD = #{sch_businessChargerCd}
</if>
</select>
<select id="selectQuotItemExclDownData" parameterType="com.interplug.qcast.biz.excelDown.dto.QuotRequest" <select id="selectQuotItemExclDownData" parameterType="com.interplug.qcast.biz.excelDown.dto.QuotRequest"
resultType="com.interplug.qcast.biz.excelDown.dto.QuotItemResponse"> resultType="com.interplug.qcast.biz.excelDown.dto.QuotItemResponse">
/* sqlid : com.interplug.qcast.api.excelDown.selectQuotItemExclDownData (견적엑셀다운로드 품목단위 데이터 조회) */ /* sqlid : com.interplug.qcast.api.excelDown.selectQuotItemExclDownData (견적엑셀다운로드 품목단위 데이터 조회) */