판매관리, 매출관리 업데이트
This commit is contained in:
@@ -175,14 +175,13 @@ public class SalesNcollectMgmtController {
|
||||
// 수주상태
|
||||
codeMap.put("orderStatusList",
|
||||
commonService.bizMakeOptionList("0000932", "", "common.getCodeselect"));
|
||||
// 출하대기 상태
|
||||
codeMap.put("shippingStatusList",
|
||||
salesMgmtCommonService.bizMakeOptionList("SH", "", "salesMgmtCommon.getCodeList"));
|
||||
// 담당자
|
||||
codeMap.put("managerList",
|
||||
salesMgmtCommonService.bizMakeOptionList("", "", "salesMgmtCommon.getSalesmanList"));
|
||||
|
||||
request.setAttribute("codeMap", codeMap);
|
||||
// 출하대기 상태
|
||||
codeMap.put("shippingStatusList",
|
||||
salesMgmtCommonService.bizMakeOptionList("SH", "", "salesMgmtCommon.getCodeList"));
|
||||
// 담당자
|
||||
codeMap.put("managerList", commonService.bizMakeOptionList("", "", "common.getUserselect"));
|
||||
|
||||
request.setAttribute("codeMap", codeMap);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -200,39 +199,27 @@ public class SalesNcollectMgmtController {
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/revenueMgmt/revenueGridList.do", method = RequestMethod.POST)
|
||||
public Map<String, Object> salesMgmtGridList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap) {
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
System.out.println("===== revenueGridList.do 파라미터 =====");
|
||||
System.out.println("paramMap: " + paramMap);
|
||||
// commonService.selectListPagingNew를 사용하여 페이지네이션 처리
|
||||
commonService.selectListPagingNew("salesNcollectMgmt.getSalesMgmtGridList", request, paramMap);
|
||||
|
||||
List<Map<String, Object>> list = salesNcollectMgmtService.getSalesMgmtGridList(request, paramMap);
|
||||
int totalCount = salesNcollectMgmtService.getSalesMgmtGridListCount(paramMap);
|
||||
// Total 합계 조회 (기존 로직 유지)
|
||||
Map<String, Object> totals = salesNcollectMgmtService.getSalesMgmtTotals(paramMap);
|
||||
|
||||
System.out.println("list size: " + list.size());
|
||||
System.out.println("totalCount: " + totalCount);
|
||||
System.out.println("totals: " + totals);
|
||||
|
||||
resultMap.put("RESULTLIST", list);
|
||||
resultMap.put("last_page", (int) Math.ceil((double)totalCount / Integer.parseInt(CommonUtils.checkNull(request.getParameter("size"), "10"))));
|
||||
resultMap.put("TOTALS", totals); // Total 공급가액, 부가세, 총액
|
||||
paramMap.put("TOTALS", totals);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
// Tabulator는 에러 발생 시 빈 배열을 기대합니다.
|
||||
resultMap.put("RESULTLIST", new java.util.ArrayList<>());
|
||||
resultMap.put("last_page", 0);
|
||||
// 에러 발생 시 빈 데이터 설정
|
||||
paramMap.put("RESULTLIST", new java.util.ArrayList<>());
|
||||
|
||||
// Total 초기화
|
||||
Map<String, Object> emptyTotals = new HashMap<String, Object>();
|
||||
|
||||
emptyTotals.put("TOTAL_SUPPLY_PRICE", 0);
|
||||
emptyTotals.put("TOTAL_VAT", 0);
|
||||
emptyTotals.put("TOTAL_AMOUNT", 0);
|
||||
resultMap.put("TOTALS", emptyTotals);
|
||||
paramMap.put("TOTALS", emptyTotals);
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -264,8 +251,7 @@ public class SalesNcollectMgmtController {
|
||||
Map<String, Object> codeMap = new HashMap<String, Object>();
|
||||
|
||||
// 담당자
|
||||
codeMap.put("managerList",
|
||||
salesMgmtCommonService.bizMakeOptionList("", "", "salesMgmtCommon.getSalesmanList"));
|
||||
codeMap.put("managerList", commonService.bizMakeOptionList("", "", "common.getUserselect"));
|
||||
|
||||
// 기존 판매 정보 조회 후 환종(통화) 공통코드 세팅
|
||||
Map<String, Object> saleInfo = null;
|
||||
@@ -293,22 +279,9 @@ public class SalesNcollectMgmtController {
|
||||
@RequestMapping(value = "/salesMgmt/salesMgmtGridList.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Map<String, Object> getSalesMgmtGridList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap) {
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
List<Map<String, Object>> list = salesNcollectMgmtService.getSalesMgmtGridList(request, paramMap);
|
||||
int totalCount = salesNcollectMgmtService.getSalesMgmtGridListCount(paramMap);
|
||||
|
||||
resultMap.put("RESULTLIST", list);
|
||||
resultMap.put("last_page", (int) Math.ceil((double)totalCount / Integer.parseInt(CommonUtils.checkNull(request.getParameter("size"), "10"))));
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
// Tabulator는 에러 발생 시 빈 배열을 기대합니다.
|
||||
resultMap.put("RESULTLIST", new java.util.ArrayList<>());
|
||||
resultMap.put("last_page", 0);
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
// commonService.selectListPagingNew를 사용하여 페이지네이션 HTML 생성
|
||||
commonService.selectListPagingNew("salesNcollectMgmt.getSalesMgmtGridList", request, paramMap);
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/salesMgmt/saveSales.do", method = RequestMethod.POST)
|
||||
|
||||
Reference in New Issue
Block a user