관리자 사용자 정보 팝업 문자전송 금액 마진율 수정
- 전용 전송사 선택시 전송사 원가에 대한 마진율일 계산되도록 수정
This commit is contained in:
parent
8a1a3ad6be
commit
7d056aff37
@ -45,4 +45,10 @@ public interface MjonMsgAgentStsService {
|
|||||||
|
|
||||||
//회원 전용 전송사 정보 조회
|
//회원 전용 전송사 정보 조회
|
||||||
public List<MjonMsgAgentStsVO> selectMsgAgentListByAgentCode(MjonMsgAgentStsVO mjonMsgAgentStsVO) throws Exception;
|
public List<MjonMsgAgentStsVO> selectMsgAgentListByAgentCode(MjonMsgAgentStsVO mjonMsgAgentStsVO) throws Exception;
|
||||||
|
|
||||||
|
//회원 전용 전송사 발송 단가 정보 조회
|
||||||
|
public List<MjonMsgAgentStsVO> selectHotLineAgentPriceList(String hotLineAgentCode) throws Exception;
|
||||||
|
|
||||||
|
//회원 전용 전송사 발송 원가 정보 조회
|
||||||
|
public MjonMsgAgentStsVO selectHotLineAgentCost(String hotLineAgentCode) throws Exception;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,16 @@ public class MjonMsgAgentStsVO {
|
|||||||
private String searchUseYn ;
|
private String searchUseYn ;
|
||||||
private String blineYn;
|
private String blineYn;
|
||||||
|
|
||||||
|
private String costId;
|
||||||
|
private double shortCost;
|
||||||
|
private double longCost;
|
||||||
|
private double pictureCost;
|
||||||
|
private double kakaoAtCost;
|
||||||
|
private double kakaoFtCost;
|
||||||
|
private double kakaoFt2Cost;
|
||||||
|
private double kakaoft3Cost;
|
||||||
|
private double faxCost;
|
||||||
|
|
||||||
public String getBlineYn() {
|
public String getBlineYn() {
|
||||||
return blineYn;
|
return blineYn;
|
||||||
}
|
}
|
||||||
@ -195,6 +205,60 @@ public class MjonMsgAgentStsVO {
|
|||||||
public void setAgentCodes(List<String> agentCodes) {
|
public void setAgentCodes(List<String> agentCodes) {
|
||||||
this.agentCodes = agentCodes;
|
this.agentCodes = agentCodes;
|
||||||
}
|
}
|
||||||
|
public String getCostId() {
|
||||||
|
return costId;
|
||||||
|
}
|
||||||
|
public void setCostId(String costId) {
|
||||||
|
this.costId = costId;
|
||||||
|
}
|
||||||
|
public double getShortCost() {
|
||||||
|
return shortCost;
|
||||||
|
}
|
||||||
|
public void setShortCost(double shortCost) {
|
||||||
|
this.shortCost = shortCost;
|
||||||
|
}
|
||||||
|
public double getLongCost() {
|
||||||
|
return longCost;
|
||||||
|
}
|
||||||
|
public void setLongCost(double longCost) {
|
||||||
|
this.longCost = longCost;
|
||||||
|
}
|
||||||
|
public double getPictureCost() {
|
||||||
|
return pictureCost;
|
||||||
|
}
|
||||||
|
public void setPictureCost(double pictureCost) {
|
||||||
|
this.pictureCost = pictureCost;
|
||||||
|
}
|
||||||
|
public double getKakaoAtCost() {
|
||||||
|
return kakaoAtCost;
|
||||||
|
}
|
||||||
|
public void setKakaoAtCost(double kakaoAtCost) {
|
||||||
|
this.kakaoAtCost = kakaoAtCost;
|
||||||
|
}
|
||||||
|
public double getKakaoFtCost() {
|
||||||
|
return kakaoFtCost;
|
||||||
|
}
|
||||||
|
public void setKakaoFtCost(double kakaoFtCost) {
|
||||||
|
this.kakaoFtCost = kakaoFtCost;
|
||||||
|
}
|
||||||
|
public double getKakaoFt2Cost() {
|
||||||
|
return kakaoFt2Cost;
|
||||||
|
}
|
||||||
|
public void setKakaoFt2Cost(double kakaoFt2Cost) {
|
||||||
|
this.kakaoFt2Cost = kakaoFt2Cost;
|
||||||
|
}
|
||||||
|
public double getKakaoft3Cost() {
|
||||||
|
return kakaoft3Cost;
|
||||||
|
}
|
||||||
|
public void setKakaoft3Cost(double kakaoft3Cost) {
|
||||||
|
this.kakaoft3Cost = kakaoft3Cost;
|
||||||
|
}
|
||||||
|
public double getFaxCost() {
|
||||||
|
return faxCost;
|
||||||
|
}
|
||||||
|
public void setFaxCost(double faxCost) {
|
||||||
|
this.faxCost = faxCost;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,4 +111,39 @@ public class MjonMsgAgentStsDAO extends EgovAbstractDAO {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//회원 전용 전송사 발송 단가 정보 조회
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<MjonMsgAgentStsVO> selectHotLineAgentPriceList(String hotLineAgentCode) throws Exception{
|
||||||
|
|
||||||
|
List<MjonMsgAgentStsVO> resultList = new ArrayList<MjonMsgAgentStsVO>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
resultList = (List<MjonMsgAgentStsVO>) list("mjonMsgAgentStsDAO.selectHotLineAgentPriceList", hotLineAgentCode);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("+++++++++++ selectHotLineAgentPriceList Service DAO Error!!! " + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//회원 전용 전송사 발송 원가 정보 조회
|
||||||
|
public MjonMsgAgentStsVO selectHotLineAgentCost(String hotLineAgentCode) throws Exception{
|
||||||
|
|
||||||
|
MjonMsgAgentStsVO resultCost = new MjonMsgAgentStsVO();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
resultCost = (MjonMsgAgentStsVO) select("mjonMsgAgentStsDAO.selectHotLineAgentCost", hotLineAgentCode);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("+++++++++++ selectHotLineAgentCost Service DAO Error!!! " + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultCost;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,4 +213,40 @@ public class MjonMsgAgentStsServiceImpl extends EgovAbstractServiceImpl implemen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//회원 전용 전송사 발송 단가 정보 조회
|
||||||
|
@Override
|
||||||
|
public List<MjonMsgAgentStsVO> selectHotLineAgentPriceList(String hotLineAgentCode) throws Exception{
|
||||||
|
|
||||||
|
List<MjonMsgAgentStsVO> resultList = new ArrayList<MjonMsgAgentStsVO>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
resultList = mjonMsgAgentStsDAO.selectHotLineAgentPriceList(hotLineAgentCode);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("+++++++++++ selectHotLineAgentPriceList Service Imple Error!!! " + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//회원 전용 전송사 발송 원가 정보 조회
|
||||||
|
@Override
|
||||||
|
public MjonMsgAgentStsVO selectHotLineAgentCost(String hotLineAgentCode) throws Exception{
|
||||||
|
|
||||||
|
MjonMsgAgentStsVO resultCost = new MjonMsgAgentStsVO();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
resultCost = mjonMsgAgentStsDAO.selectHotLineAgentCost(hotLineAgentCode);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("+++++++++++ selectHotLineAgentCostList Service Imple Error!!! " + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultCost;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1371,6 +1371,57 @@ public class EgovUserManageController {
|
|||||||
model.addAttribute("faxMargin", faxMargin);
|
model.addAttribute("faxMargin", faxMargin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{//전용전송사 선택시 마진율 계산을 위한 데이터 조회
|
||||||
|
|
||||||
|
String hotLineAgentCode = mberManageVO.getHotlineAgentCode();
|
||||||
|
double agentPriceS = 0.00; //전송사 단문 발송 단가
|
||||||
|
double agentPriceL = 0.00; //전송사 장문 발송 단가
|
||||||
|
double agentPriceP = 0.00; //전송사 그림 발송 단가
|
||||||
|
double agentCostS = 0.00; //전송사 단문 발송 원가
|
||||||
|
double agentCostL = 0.00; //전송사 장문 발송 원가
|
||||||
|
double agentCostP = 0.00; //전송사 그림 발송 원가
|
||||||
|
String agentCodeNm = "";
|
||||||
|
|
||||||
|
|
||||||
|
if(!hotLineAgentCode.equals("00")) {
|
||||||
|
|
||||||
|
//전용 전송사 발송 단가 조회
|
||||||
|
List<MjonMsgAgentStsVO> resultAgentPriceList = mjonMsgAgentStsService.selectHotLineAgentPriceList(hotLineAgentCode);
|
||||||
|
agentCodeNm = resultAgentPriceList.get(0).getAgentCodeNm();
|
||||||
|
|
||||||
|
for(MjonMsgAgentStsVO hotLineVO : resultAgentPriceList) {
|
||||||
|
|
||||||
|
String msgType = hotLineVO.getMsgType();
|
||||||
|
|
||||||
|
if(msgType.equals("S")) {
|
||||||
|
agentPriceS = Double.parseDouble(hotLineVO.getAgentPrice());
|
||||||
|
}else if(msgType.equals("L")) {
|
||||||
|
agentPriceL = Double.parseDouble(hotLineVO.getAgentPrice());
|
||||||
|
}else {
|
||||||
|
agentPriceP = Double.parseDouble(hotLineVO.getAgentPrice());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//전용 전송사 발송 단가 조회
|
||||||
|
MjonMsgAgentStsVO resultAgentCost = mjonMsgAgentStsService.selectHotLineAgentCost(hotLineAgentCode);
|
||||||
|
|
||||||
|
agentCostS = resultAgentCost.getShortCost();
|
||||||
|
agentCostL = resultAgentCost.getLongCost();
|
||||||
|
agentCostP = resultAgentCost.getPictureCost();
|
||||||
|
|
||||||
|
model.addAttribute("agentPriceS", agentPriceS);
|
||||||
|
model.addAttribute("agentPriceL", agentPriceL);
|
||||||
|
model.addAttribute("agentPriceP", agentPriceP);
|
||||||
|
model.addAttribute("agentCostS", agentCostS);
|
||||||
|
model.addAttribute("agentCostL", agentCostL);
|
||||||
|
model.addAttribute("agentCostP", agentCostP);
|
||||||
|
model.addAttribute("agentCodeNm", agentCodeNm);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
{//첫결제 내역 정보 불러오기
|
{//첫결제 내역 정보 불러오기
|
||||||
|
|
||||||
MjonPayVO resultMjonFrstPayVO = mjonPayService.selectFrstPayInfoByUserId(userId);
|
MjonPayVO resultMjonFrstPayVO = mjonPayService.selectFrstPayInfoByUserId(userId);
|
||||||
|
|||||||
@ -189,6 +189,45 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="mjonMsgAgentStsDAO.selectHotLineAgentPriceList" parameterClass="String" resultClass="mjonMsgAgentStsVO">
|
||||||
|
|
||||||
|
SELECT ASR.AGENT_CODE AS agentCode,
|
||||||
|
ASR.AGENT_PRICE AS agentPrice,
|
||||||
|
ASR.MSG_TYPE AS msgType,
|
||||||
|
ASR.USE_YN AS useYn,
|
||||||
|
LCD.CODE_NM AS agentCodeNm,
|
||||||
|
LCD.CODE_DC AS agetnCodeDc
|
||||||
|
FROM MJ_AGENT_SEND_RATE ASR
|
||||||
|
INNER JOIN LETTCCMMNDETAILCODE LCD
|
||||||
|
ON ASR.AGENT_CODE = LCD.CODE
|
||||||
|
INNER JOIN LETTCCMMNCODE LCC
|
||||||
|
ON LCD.CODE_ID = LCC.CODE_ID
|
||||||
|
AND LCC.CODE_ID = 'ITN019'
|
||||||
|
WHERE ASR.AGENT_CODE = #hotLineAgentCode#
|
||||||
|
ORDER BY ASR.AGENT_CODE
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="mjonMsgAgentStsDAO.selectHotLineAgentCost" parameterClass="String" resultClass="mjonMsgAgentStsVO">
|
||||||
|
|
||||||
|
SELECT COST_ID AS costId,
|
||||||
|
AGENT_CODE AS agentCode,
|
||||||
|
SHORT_COST AS shortCost,
|
||||||
|
LONG_COST AS longCost,
|
||||||
|
PICTURE_COST AS pictureCost,
|
||||||
|
KAKAO_AT_COST AS kakaoAtCost,
|
||||||
|
KAKAO_FT_COST AS kakaoFtCost,
|
||||||
|
KAKAO_FT2_COST AS kakaoFt2Cost,
|
||||||
|
KAKAO_FT3_COST AS kakaoFt3Cost,
|
||||||
|
FAX_COST AS faxCost
|
||||||
|
FROM MJ_MSG_COST
|
||||||
|
WHERE AGENT_CODE = #hotLineAgentCode#
|
||||||
|
ORDER BY COST_ID DESC
|
||||||
|
LIMIT 1
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5065,6 +5065,9 @@ function kakaoATDelayCancel(msgGroupId){
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<%-- 전용 전송사가 없는 경우 전체 전송사의 최소 값 ~ 최대값을 표시, 전용 전송사가 있는 경우 해당 전송사의 전송 원가를 표시해줌 --%>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${mberManageVO.hotlineAgentCode eq '00'}">
|
||||||
<tr>
|
<tr>
|
||||||
<td>문자온 원가</td>
|
<td>문자온 원가</td>
|
||||||
<td><c:out value="${minPriceS}"/>~<c:out value="${maxPriceS}"/></td>
|
<td><c:out value="${minPriceS}"/>~<c:out value="${maxPriceS}"/></td>
|
||||||
@ -5073,6 +5076,19 @@ function kakaoATDelayCancel(msgGroupId){
|
|||||||
<td><c:out value="${minPriceP}"/>~<c:out value="${maxPriceP}"/></td>
|
<td><c:out value="${minPriceP}"/>~<c:out value="${maxPriceP}"/></td>
|
||||||
<td><c:out value="${minPriceP}"/>~<c:out value="${maxPriceP}"/></td>
|
<td><c:out value="${minPriceP}"/>~<c:out value="${maxPriceP}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<tr>
|
||||||
|
<td>문자온 원가(<c:out value="${agentCodeNm}"/>)</td>
|
||||||
|
<td><c:out value="${agentCostS}"/></td>
|
||||||
|
<td><c:out value="${agentCostL}"/></td>
|
||||||
|
<td><c:out value="${agentCostP}"/></td>
|
||||||
|
<td><c:out value="${agentCostP}"/></td>
|
||||||
|
<td><c:out value="${agentCostP}"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
<!-- 문자 발송 단가 표시 - 이벤트 대상자 이벤트 최저가 단가 적용 -->
|
<!-- 문자 발송 단가 표시 - 이벤트 대상자 이벤트 최저가 단가 적용 -->
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${eventMberInfo.eventStatus == 'Y' && eventDiffDate >= 0}">
|
<c:when test="${eventMberInfo.eventStatus == 'Y' && eventDiffDate >= 0}">
|
||||||
@ -5127,13 +5143,25 @@ function kakaoATDelayCancel(msgGroupId){
|
|||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
<!-- (판매가격 - 구매가격) / 판매가격 x 100 -->
|
<!-- (판매가격 - 구매가격) / 판매가격 x 100 -->
|
||||||
|
<%-- 전용전송사가 없는 경우 전체전송사의 평균 원가를 기준으로 마진률을 계산, 전용 전송사가 있는 경우 해당 전송사의 전송 원가를 기준으로 마진률을 계산 --%>
|
||||||
<tr>
|
<tr>
|
||||||
<td>마진률</td>
|
<td>마진률</td>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${mberManageVO.hotlineAgentCode eq '00'}">
|
||||||
<td><fmt:formatNumber value="${(userPriceS - avgPriceS) / userPriceS * 100}" pattern=".0" />%</td>
|
<td><fmt:formatNumber value="${(userPriceS - avgPriceS) / userPriceS * 100}" pattern=".0" />%</td>
|
||||||
<td><fmt:formatNumber value="${(userPriceL - avgPriceL) / userPriceL * 100}" pattern=".0" />%</td>
|
<td><fmt:formatNumber value="${(userPriceL - avgPriceL) / userPriceL * 100}" pattern=".0" />%</td>
|
||||||
<td><fmt:formatNumber value="${(userPriceP - avgPriceP) / userPriceP * 100}" pattern=".0" />%</td>
|
<td><fmt:formatNumber value="${(userPriceP - avgPriceP) / userPriceP * 100}" pattern=".0" />%</td>
|
||||||
<td><fmt:formatNumber value="${(userPriceP2 - avgPriceP) / userPriceP2 * 100}" pattern=".0" />%</td>
|
<td><fmt:formatNumber value="${(userPriceP2 - avgPriceP) / userPriceP2 * 100}" pattern=".0" />%</td>
|
||||||
<td><fmt:formatNumber value="${(userPriceP3 - avgPriceP) / userPriceP3 * 100}" pattern=".0" />%</td>
|
<td><fmt:formatNumber value="${(userPriceP3 - avgPriceP) / userPriceP3 * 100}" pattern=".0" />%</td>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<td><fmt:formatNumber value="${(userPriceS - agentCostS) / userPriceS * 100}" pattern=".0" />%</td>
|
||||||
|
<td><fmt:formatNumber value="${(userPriceL - agentCostL) / userPriceL * 100}" pattern=".0" />%</td>
|
||||||
|
<td><fmt:formatNumber value="${(userPriceP - agentCostP) / userPriceP * 100}" pattern=".0" />%</td>
|
||||||
|
<td><fmt:formatNumber value="${(userPriceP2 - agentCostP) / userPriceP2 * 100}" pattern=".0" />%</td>
|
||||||
|
<td><fmt:formatNumber value="${(userPriceP3 - agentCostP) / userPriceP3 * 100}" pattern=".0" />%</td>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user