등급제 일괄변경 작업중
This commit is contained in:
parent
ea34c56f18
commit
26326c5d6c
@ -1,26 +1,31 @@
|
||||
package itn.let.sym.grd.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MberGrdVO {
|
||||
|
||||
/**
|
||||
* serialVersionUID
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int grdSetNo; // 등급설정번호
|
||||
private String grdSetNm; // 등급설정명
|
||||
private long totAmt; // 누적결제액
|
||||
private String totAmtComma; // 누적결제액(콤마)
|
||||
private float shortPrice; // 단문 단가
|
||||
private float longPrice; //장문 단가
|
||||
private float picturePrice; // 그림 단가
|
||||
private float picture2Price; // 그림 2장단가
|
||||
private float picture3Price; // 그림 3장단가
|
||||
private float totAmt; // 누적결제액
|
||||
private String regId; // 최초등록자 아이디
|
||||
private String regDate; // 최초등록 일자
|
||||
private String editId; // 수정등록자 아이디
|
||||
private String editDate; // 수정등록 일자
|
||||
|
||||
private List<String> grdSetNos;
|
||||
private List<String> totAmts;
|
||||
private List<String> shortPrices;
|
||||
private List<String> longPrices;
|
||||
private List<String> picturePrices;
|
||||
private List<String> picture2Prices;
|
||||
private List<String> picture3Prices;
|
||||
|
||||
public int getGrdSetNo() {
|
||||
return grdSetNo;
|
||||
}
|
||||
@ -33,6 +38,18 @@ public class MberGrdVO {
|
||||
public void setGrdSetNm(String grdSetNm) {
|
||||
this.grdSetNm = grdSetNm;
|
||||
}
|
||||
public long getTotAmt() {
|
||||
return totAmt;
|
||||
}
|
||||
public void setTotAmt(long totAmt) {
|
||||
this.totAmt = totAmt;
|
||||
}
|
||||
public String getTotAmtComma() {
|
||||
return totAmtComma;
|
||||
}
|
||||
public void setTotAmtComma(String totAmtComma) {
|
||||
this.totAmtComma = totAmtComma;
|
||||
}
|
||||
public float getShortPrice() {
|
||||
return shortPrice;
|
||||
}
|
||||
@ -63,12 +80,6 @@ public class MberGrdVO {
|
||||
public void setPicture3Price(float picture3Price) {
|
||||
this.picture3Price = picture3Price;
|
||||
}
|
||||
public float getTotAmt() {
|
||||
return totAmt;
|
||||
}
|
||||
public void setTotAmt(float totAmt) {
|
||||
this.totAmt = totAmt;
|
||||
}
|
||||
public String getRegId() {
|
||||
return regId;
|
||||
}
|
||||
@ -93,9 +104,48 @@ public class MberGrdVO {
|
||||
public void setEditDate(String editDate) {
|
||||
this.editDate = editDate;
|
||||
}
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
|
||||
public List<String> getGrdSetNos() {
|
||||
return grdSetNos;
|
||||
}
|
||||
public void setGrdSetNos(List<String> grdSetNos) {
|
||||
this.grdSetNos = grdSetNos;
|
||||
}
|
||||
public List<String> getTotAmts() {
|
||||
return totAmts;
|
||||
}
|
||||
public void setTotAmts(List<String> totAmts) {
|
||||
this.totAmts = totAmts;
|
||||
}
|
||||
public List<String> getShortPrices() {
|
||||
return shortPrices;
|
||||
}
|
||||
public void setShortPrices(List<String> shortPrices) {
|
||||
this.shortPrices = shortPrices;
|
||||
}
|
||||
public List<String> getLongPrices() {
|
||||
return longPrices;
|
||||
}
|
||||
public void setLongPrices(List<String> longPrices) {
|
||||
this.longPrices = longPrices;
|
||||
}
|
||||
public List<String> getPicturePrices() {
|
||||
return picturePrices;
|
||||
}
|
||||
public void setPicturePrices(List<String> picturePrices) {
|
||||
this.picturePrices = picturePrices;
|
||||
}
|
||||
public List<String> getPicture2Prices() {
|
||||
return picture2Prices;
|
||||
}
|
||||
public void setPicture2Prices(List<String> picture2Prices) {
|
||||
this.picture2Prices = picture2Prices;
|
||||
}
|
||||
public List<String> getPicture3Prices() {
|
||||
return picture3Prices;
|
||||
}
|
||||
public void setPicture3Prices(List<String> picture3Prices) {
|
||||
this.picture3Prices = picture3Prices;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -6,8 +6,12 @@ import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||
import itn.com.cmm.LoginVO;
|
||||
import itn.let.sym.grd.service.MberGrdService;
|
||||
import itn.let.sym.grd.service.MberGrdVO;
|
||||
|
||||
@ -18,7 +22,7 @@ public class MberGrdController {
|
||||
MberGrdService mberGrdService;
|
||||
|
||||
/**
|
||||
* 사용자 등급별 단가조정 화면
|
||||
* 등급제 관리 화면
|
||||
*
|
||||
* @param mberGrdVO
|
||||
* @param model
|
||||
@ -35,4 +39,35 @@ public class MberGrdController {
|
||||
return "/sym/grd/mberGrdSetting";
|
||||
}
|
||||
|
||||
// 등급제 일괄 저장
|
||||
@RequestMapping(value = "/sym/grd/mberGrdSettingMassUpdateAjax.do")
|
||||
public ModelAndView mberGrdSettingMassUpdateAjax(
|
||||
@ModelAttribute("mberGrdVO") MberGrdVO mberGrdVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
boolean isSuccess = true;
|
||||
String msg = "";
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String frstRegisterId = loginVO == null ? "" : loginVO.getId();
|
||||
mberGrdVO.setRegId(frstRegisterId); // 최초등록자ID
|
||||
|
||||
try{
|
||||
// 등급제 업데이트
|
||||
//mberGrdService.updateHashTagList(mberGrdVO);
|
||||
}
|
||||
catch(Exception e) {
|
||||
isSuccess = false;
|
||||
msg = e.getMessage();
|
||||
}
|
||||
|
||||
modelAndView.addObject("isSuccess", isSuccess);
|
||||
modelAndView.addObject("msg", msg);
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,7 +9,8 @@
|
||||
SELECT
|
||||
A.GRD_SET_NO AS grdSetNo
|
||||
, A.GRD_SET_NM AS grdSetNm
|
||||
, A.TOT_AMT AS totAmt
|
||||
, FLOOR(A.TOT_AMT) AS totAmt
|
||||
, FORMAT(FLOOR(A.TOT_AMT),0) AS totAmtComma
|
||||
, A.SHORT_PRICE AS shortPrice
|
||||
, A.LONG_PRICE AS longPrice
|
||||
, A.PICTURE_PRICE AS picturePrice
|
||||
|
||||
@ -14,6 +14,39 @@
|
||||
|
||||
}
|
||||
|
||||
// 등급제 일괄변경
|
||||
function setMassEdit() {
|
||||
if(!confirm("등급별 단가를 변경 하시겠습니까?")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 콤마 제거
|
||||
$('input[name=totAmt]').each(function(index,item){
|
||||
$(this).val($(this).val().replace(/,/gi, ""));
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/sym/grd/mberGrdSettingMassUpdateAjax.do",
|
||||
data: $("#listForm").serialize(),
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if (data.isSuccess) {
|
||||
alert("저장 완료했습니다.");
|
||||
location.reload();
|
||||
}
|
||||
else {
|
||||
alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -24,7 +57,7 @@
|
||||
<p class="tType6 c_999999">등급제 관리 페이지 입니다.</p>
|
||||
</div>
|
||||
<div class="pageCont">
|
||||
<form name="form" id="form" method="post">
|
||||
<form id="listForm" name="listForm" method="post">
|
||||
<div class="tableWrap">
|
||||
<table class="tbType1">
|
||||
<colgroup>
|
||||
@ -49,14 +82,15 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="result" items="${mberGrdSettingList}" varStatus="status">
|
||||
<input type="hidden" name="grdSetNo" value="${result.grdSetNo}"/>
|
||||
<tr>
|
||||
<td><c:out value="${result.grdSetNm}"/></td>
|
||||
<td><c:out value="${result.totAmt}"/></td>
|
||||
<td><c:out value="${result.shortPrice}"/></td>
|
||||
<td><c:out value="${result.longPrice}"/></td>
|
||||
<td><c:out value="${result.picturePrice}"/></td>
|
||||
<td><c:out value="${result.picture2Price}"/></td>
|
||||
<td><c:out value="${result.picture3Price}"/></td>
|
||||
<td><input type="text" name="totAmt" value="<c:out value="${result.totAmtComma}"/>" style="height: 20px; width: 150px; padding: 5px 5px 5px 5px;" /></td>
|
||||
<td><input type="text" name="shortPrice" value="<c:out value="${result.shortPrice}"/>" style="height: 20px; width: 100px; padding: 5px 5px 5px 5px;" /></td>
|
||||
<td><input type="text" name="longPrice" value="<c:out value="${result.longPrice}"/>" style="height: 20px; width: 100px; padding: 5px 5px 5px 5px;" /></td>
|
||||
<td><input type="text" name="picturePrice" value="<c:out value="${result.picturePrice}"/>" style="height: 20px; width: 100px; padding: 5px 5px 5px 5px;" /></td>
|
||||
<td><input type="text" name="picture2Price" value="<c:out value="${result.picture2Price}"/>" style="height: 20px; width: 100px; padding: 5px 5px 5px 5px;" /></td>
|
||||
<td><input type="text" name="picture3Price" value="<c:out value="${result.picture3Price}"/>" style="height: 20px; width: 100px; padding: 5px 5px 5px 5px;" /></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
@ -64,7 +98,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="btnWrap">
|
||||
<input type="button" class="btnType1" value="수정" onclick="javascript:doUpdate(); return false;">
|
||||
<input type="button" class="btnType1" value="수정" onclick="javascript:setMassEdit(); return false;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user