관리자 환불등록 작업중
@48d78bf3edaecf8ac5a08c820d770c2e339f7527
--- src/main/java/itn/let/mjo/pay/web/RefundController.java
+++ src/main/java/itn/let/mjo/pay/web/RefundController.java
... | ... | @@ -929,13 +929,25 @@ |
| 929 | 929 |
* 결제취소 등록 |
| 930 | 930 |
* @param RefundVO |
| 931 | 931 |
* @param model |
| 932 |
- * @return "/uss/ion/pay/RefundRegist" |
|
| 932 |
+ * @return "/uss/ion/pay/cancelRegist" |
|
| 933 | 933 |
* @throws Exception |
| 934 | 934 |
*/ |
| 935 | 935 |
@RequestMapping(value="/uss/ion/pay/cancelRegist.do") |
| 936 | 936 |
public String cancelRegist(@ModelAttribute("refundVO") RefundVO refundVO) throws Exception{
|
| 937 | 937 |
return "/uss/ion/pay/cancelRegist"; |
| 938 | 938 |
} |
| 939 |
+ |
|
| 940 |
+ /** |
|
| 941 |
+ * 환불 등록 |
|
| 942 |
+ * @param RefundVO |
|
| 943 |
+ * @param model |
|
| 944 |
+ * @return "/uss/ion/pay/RefundRegist" |
|
| 945 |
+ * @throws Exception |
|
| 946 |
+ */ |
|
| 947 |
+ @RequestMapping(value="/uss/ion/pay/refundRegist.do") |
|
| 948 |
+ public String refundRegist(@ModelAttribute("refundVO") RefundVO refundVO) throws Exception{
|
|
| 949 |
+ return "/uss/ion/pay/RefundRegist"; |
|
| 950 |
+ } |
|
| 939 | 951 |
|
| 940 | 952 |
/** |
| 941 | 953 |
* 결제취소 페이지 |
... | ... | @@ -1001,6 +1013,91 @@ |
| 1001 | 1013 |
} |
| 1002 | 1014 |
|
| 1003 | 1015 |
/** |
| 1016 |
+ * 환불요청 등록 Ajax |
|
| 1017 |
+ * @param RefundVO |
|
| 1018 |
+ * @param model |
|
| 1019 |
+ * @return modelAndView |
|
| 1020 |
+ * @throws Exception |
|
| 1021 |
+ */ |
|
| 1022 |
+ @RequestMapping(value = {"/uss/ion/pay/refMonInsAjax.do"})
|
|
| 1023 |
+ public ModelAndView refMonInsAjax(final MultipartHttpServletRequest multiRequest |
|
| 1024 |
+ , RefundVO refundVO , HttpServletRequest request) throws Exception {
|
|
| 1025 |
+ |
|
| 1026 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 1027 |
+ modelAndView.setViewName("jsonView");
|
|
| 1028 |
+ |
|
| 1029 |
+ try {
|
|
| 1030 |
+ String atchFileId = ""; |
|
| 1031 |
+ final Map<String, MultipartFile> files = multiRequest.getFileMap(); |
|
| 1032 |
+ if (!files.isEmpty()) {
|
|
| 1033 |
+ if(files.containsKey("bank")){
|
|
| 1034 |
+ Map<String, MultipartFile> tmpMap = new LinkedHashMap<>(); |
|
| 1035 |
+ tmpMap.put("bank", files.get("bank"));
|
|
| 1036 |
+ List<FileVO> result = fileUtil.parseFileInf(tmpMap, "REFUND_", 0, "", "", ""); |
|
| 1037 |
+ atchFileId = fileMngService.insertFileInfs(result); |
|
| 1038 |
+ refundVO.setBankAtchFileId(atchFileId); |
|
| 1039 |
+ } |
|
| 1040 |
+ if(files.containsKey("docu")){
|
|
| 1041 |
+ Map<String, MultipartFile> tmpMap = new LinkedHashMap<>(); |
|
| 1042 |
+ tmpMap.put("docu", files.get("docu"));
|
|
| 1043 |
+ List<FileVO> result = fileUtil.parseFileInf(tmpMap, "REFUND_", 0, "", "", ""); |
|
| 1044 |
+ atchFileId = fileMngService.insertFileInfs(result); |
|
| 1045 |
+ refundVO.setDocuAtchFileId(atchFileId); |
|
| 1046 |
+ } |
|
| 1047 |
+ } |
|
| 1048 |
+ |
|
| 1049 |
+ refundVO.setFrstRegisterId(refundVO.getMberId()); |
|
| 1050 |
+ refundVO.setRefundStatus("1");
|
|
| 1051 |
+ refundService.insertRefund(refundVO); |
|
| 1052 |
+ |
|
| 1053 |
+ modelAndView.addObject("status", "success");
|
|
| 1054 |
+ }catch (Exception e) {
|
|
| 1055 |
+ System.out.println("REFUND ERROR : " + e.getMessage());
|
|
| 1056 |
+ |
|
| 1057 |
+ modelAndView.addObject("status", "fail");
|
|
| 1058 |
+ } |
|
| 1059 |
+ |
|
| 1060 |
+ return modelAndView; |
|
| 1061 |
+ } |
|
| 1062 |
+ |
|
| 1063 |
+ /** |
|
| 1064 |
+ * 환불신청금액(환불요청 상태) Ajax |
|
| 1065 |
+ * @param RefundVO |
|
| 1066 |
+ * @param model |
|
| 1067 |
+ * @return modelAndView |
|
| 1068 |
+ * @throws Exception |
|
| 1069 |
+ */ |
|
| 1070 |
+ @RequestMapping(value = {"/uss/ion/pay/refMonSumAjax.do"})
|
|
| 1071 |
+ public ModelAndView refMonSumAjax(RefundVO refundVO, HttpServletRequest request) throws Exception {
|
|
| 1072 |
+ |
|
| 1073 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 1074 |
+ modelAndView.setViewName("jsonView");
|
|
| 1075 |
+ |
|
| 1076 |
+ boolean isSuccess = true; |
|
| 1077 |
+ String msg = ""; |
|
| 1078 |
+ int refundMoneySum = 0; |
|
| 1079 |
+ int userMoney = 0; |
|
| 1080 |
+ |
|
| 1081 |
+ try {
|
|
| 1082 |
+ refundVO = refundService.selectRefundMberInfo(refundVO); |
|
| 1083 |
+ userMoney = (int)Double.parseDouble(refundVO.getMberMoney()); // 보유Cash |
|
| 1084 |
+ |
|
| 1085 |
+ refundMoneySum = refundService.selectRefundMoneySum(refundVO); // 환불신청금액(환불요청 상태) |
|
| 1086 |
+ |
|
| 1087 |
+ } catch (Exception e) {
|
|
| 1088 |
+ isSuccess = false; |
|
| 1089 |
+ msg = e.getMessage(); |
|
| 1090 |
+ } |
|
| 1091 |
+ |
|
| 1092 |
+ modelAndView.addObject("isSuccess", isSuccess);
|
|
| 1093 |
+ modelAndView.addObject("msg", msg);
|
|
| 1094 |
+ modelAndView.addObject("userMoney", userMoney);
|
|
| 1095 |
+ modelAndView.addObject("refundMoneySum", refundMoneySum);
|
|
| 1096 |
+ |
|
| 1097 |
+ return modelAndView; |
|
| 1098 |
+ } |
|
| 1099 |
+ |
|
| 1100 |
+ /** |
|
| 1004 | 1101 |
* 캐쉬 환불 처리 |
| 1005 | 1102 |
* @param refundVO |
| 1006 | 1103 |
* @return |
--- src/main/webapp/WEB-INF/jsp/uss/ion/pay/RefundList.jsp
+++ src/main/webapp/WEB-INF/jsp/uss/ion/pay/RefundList.jsp
... | ... | @@ -64,6 +64,14 @@ |
| 64 | 64 |
frm.submit(); |
| 65 | 65 |
} |
| 66 | 66 |
|
| 67 |
+// 환불 등록 |
|
| 68 |
+function fn_refundRegist(){
|
|
| 69 |
+ frm = document.listForm; |
|
| 70 |
+ frm.action = "<c:url value='/uss/ion/pay/refundRegist.do' />"; |
|
| 71 |
+ frm.submit(); |
|
| 72 |
+} |
|
| 73 |
+ |
|
| 74 |
+ |
|
| 67 | 75 |
/* 수정 화면*/ |
| 68 | 76 |
function fn_modify(moid){
|
| 69 | 77 |
var frm = document.modiForm ; |
... | ... | @@ -314,6 +322,9 @@ |
| 314 | 322 |
</table> |
| 315 | 323 |
</div> |
| 316 | 324 |
<div class="btnWrap"> |
| 325 |
+ <%-- |
|
| 326 |
+ <input type="button" class="btnType1" value="환불 등록" onclick="fn_refundRegist(); return false;" > |
|
| 327 |
+ --%> |
|
| 317 | 328 |
<input type="button" class="btnType1" value="결제취소 등록" onclick="fn_insert(); return false;" > |
| 318 | 329 |
<input type="button" class="btnType2" value="삭제" onclick="fn_delete(); return false;"> |
| 319 | 330 |
</div> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?