();
+ totalsMap.put("TOTAL_SUPPLY_PRICE", 0);
+ totalsMap.put("TOTAL_VAT", 0);
+ totalsMap.put("TOTAL_AMOUNT", 0);
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ totalsMap.put("TOTAL_SUPPLY_PRICE", 0);
+ totalsMap.put("TOTAL_VAT", 0);
+ totalsMap.put("TOTAL_AMOUNT", 0);
+ } finally {
+ if(sqlSession != null) {
+ sqlSession.close();
+ }
+ }
+
+ return totalsMap;
+ }
+
/**
*
* 판매 정보 조회
@@ -991,12 +1022,12 @@ public Map saveSaleRegistration(HttpServletRequest request, Map<
Map resultMap = new HashMap();
SqlSession sqlSession = null;
try {
- System.out.println("===== 매출마감 + 아마란스 전표연동 시작 =====");
+ System.out.println("===== 매출마감 + 아마란스 전표연동 시작 (shipment_log 기반) =====");
- String objIdListStr = CommonUtils.checkNull(paramMap.get("objIdList"));
+ String logIdListStr = CommonUtils.checkNull(paramMap.get("logIdList"));
String deadlineDate = CommonUtils.checkNull(paramMap.get("deadlineDate"));
- if (objIdListStr == null || objIdListStr.isEmpty()) {
+ if (logIdListStr == null || logIdListStr.isEmpty()) {
resultMap.put("result", false);
resultMap.put("msg", "선택된 항목이 없습니다.");
return resultMap;
@@ -1007,8 +1038,8 @@ public Map saveSaleRegistration(HttpServletRequest request, Map<
return resultMap;
}
- String[] targetObjIdList = objIdListStr.split(",");
- if (targetObjIdList == null || targetObjIdList.length == 0) {
+ String[] targetLogIdList = logIdListStr.split(",");
+ if (targetLogIdList == null || targetLogIdList.length == 0) {
resultMap.put("result", false);
resultMap.put("msg", "선택된 항목이 없습니다.");
return resultMap;
@@ -1016,39 +1047,36 @@ public Map saveSaleRegistration(HttpServletRequest request, Map<
sqlSession = SqlMapConfig.getInstance().getSqlSession(false);
- // 1) 선택된 항목들의 전표 데이터 조회
+ // 1) 선택된 shipment_log 항목들의 전표 데이터 조회
List