구매관리-입고일별입고관리 마감정보입력 모달 기능 추가
This commit is contained in:
@@ -1633,6 +1633,16 @@ public class PurchaseOrderController {
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 입고건별 마감정보 저장
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/purchaseOrder/saveArrivalPlanDeadlineInfo.do")
|
||||
public Map saveArrivalPlanDeadlineInfo(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap) {
|
||||
return purchaseOrderService.saveArrivalPlanDeadlineInfo(request, paramMap);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매입마감 관리 화면 (입고일별 입고관리)
|
||||
*/
|
||||
|
||||
@@ -1168,6 +1168,21 @@
|
||||
WHERE OBJID = #{OBJID}
|
||||
</update>
|
||||
|
||||
<!-- arrival_plan 마감정보 저장 -->
|
||||
<update id="saveArrivalPlanDeadlineInfo" parameterType="map">
|
||||
/* purchaseOrder.saveArrivalPlanDeadlineInfo - 입고건별 마감정보 저장 */
|
||||
UPDATE arrival_plan SET
|
||||
tax_type = #{taxType}
|
||||
<if test="taxInvoiceDate != null and taxInvoiceDate != ''">, tax_invoice_date = #{taxInvoiceDate}</if>
|
||||
<if test="exportDeclNo != null">, export_decl_no = #{exportDeclNo}</if>
|
||||
<if test="loadingDate != null and loadingDate != ''">, loading_date = #{loadingDate}</if>
|
||||
<if test="foreignType != null and foreignType != ''">, foreign_type = #{foreignType}</if>
|
||||
<if test="duty != null and duty != ''">, duty = CAST(#{duty} AS NUMERIC)</if>
|
||||
<if test="exchangeRate != null and exchangeRate != ''">, exchange_rate = CAST(#{exchangeRate} AS NUMERIC)</if>
|
||||
<if test="importVat != null and importVat != ''">, import_vat = CAST(#{importVat} AS NUMERIC)</if>
|
||||
WHERE OBJID = #{OBJID}
|
||||
</update>
|
||||
|
||||
<update id="updatePurchaseOrderMasterPriceAll" parameterType="map">
|
||||
UPDATE PURCHASE_ORDER_MASTER SET
|
||||
TOTAL_PRICE_TXT_ALL = NUM_TO_KOR((T.REAL_SUPPLY_PRICE_VAT)::varchar,'일금 ',' 원정 (₩ ') || TRIM(TO_CHAR((T.REAL_SUPPLY_PRICE_VAT), '999,999,999,999')) ||')'
|
||||
@@ -6608,6 +6623,16 @@ FROM(
|
||||
<!-- 매입마감일 (입고건 단위) -->
|
||||
,AP.PURCHASE_CLOSE_DATE
|
||||
|
||||
<!-- 마감정보 -->
|
||||
,COALESCE(AP.tax_type, '') AS TAX_TYPE
|
||||
,COALESCE(AP.tax_invoice_date, '') AS TAX_INVOICE_DATE
|
||||
,COALESCE(AP.export_decl_no, '') AS EXPORT_DECL_NO
|
||||
,COALESCE(AP.loading_date, '') AS LOADING_DATE
|
||||
,COALESCE(AP.foreign_type, '') AS FOREIGN_TYPE
|
||||
,COALESCE(AP.duty, 0) AS DUTY
|
||||
,COALESCE(AP.exchange_rate, 0) AS EXCHANGE_RATE
|
||||
,COALESCE(AP.import_vat, 0) AS IMPORT_VAT
|
||||
|
||||
FROM ARRIVAL_PLAN AP
|
||||
INNER JOIN PURCHASE_ORDER_MASTER POM ON POM.OBJID = AP.PARENT_OBJID
|
||||
INNER JOIN PURCHASE_ORDER_PART POP ON POP.PURCHASE_ORDER_MASTER_OBJID = POM.OBJID::VARCHAR
|
||||
|
||||
@@ -3443,4 +3443,62 @@ public class PurchaseOrderService {
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 입고건별 마감정보 저장
|
||||
* @param request
|
||||
* @param paramMap - objIdList, taxType, taxInvoiceDate, exportDeclNo, loadingDate, foreignType, duty, exchangeRate, importVat
|
||||
* @return 처리 결과
|
||||
*/
|
||||
public Map saveArrivalPlanDeadlineInfo(HttpServletRequest request, Map paramMap) {
|
||||
Map resultMap = new HashMap();
|
||||
SqlSession sqlSession = null;
|
||||
try {
|
||||
String objIdListStr = CommonUtils.checkNull(paramMap.get("objIdList"));
|
||||
String taxType = CommonUtils.checkNull(paramMap.get("taxType"));
|
||||
String taxInvoiceDate = CommonUtils.checkNull(paramMap.get("taxInvoiceDate"));
|
||||
String exportDeclNo = CommonUtils.checkNull(paramMap.get("exportDeclNo"));
|
||||
String loadingDate = CommonUtils.checkNull(paramMap.get("loadingDate"));
|
||||
String foreignType = CommonUtils.checkNull(paramMap.get("foreignType"));
|
||||
String duty = CommonUtils.checkNull(paramMap.get("duty"));
|
||||
String exchangeRate = CommonUtils.checkNull(paramMap.get("exchangeRate"));
|
||||
String importVat = CommonUtils.checkNull(paramMap.get("importVat"));
|
||||
|
||||
if (objIdListStr == null || objIdListStr.isEmpty()) {
|
||||
resultMap.put("result", false);
|
||||
resultMap.put("msg", "선택된 항목이 없습니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
String[] targetObjIdList = objIdListStr.split(",");
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession(false);
|
||||
|
||||
for (int i = 0; i < targetObjIdList.length; i++) {
|
||||
HashMap sqlParamMap = new HashMap();
|
||||
sqlParamMap.put("OBJID", CommonUtils.checkNull(targetObjIdList[i]).trim());
|
||||
sqlParamMap.put("taxType", taxType);
|
||||
sqlParamMap.put("taxInvoiceDate", taxInvoiceDate);
|
||||
sqlParamMap.put("exportDeclNo", exportDeclNo);
|
||||
sqlParamMap.put("loadingDate", loadingDate);
|
||||
sqlParamMap.put("foreignType", foreignType);
|
||||
sqlParamMap.put("duty", duty);
|
||||
sqlParamMap.put("exchangeRate", exchangeRate);
|
||||
sqlParamMap.put("importVat", importVat);
|
||||
|
||||
sqlSession.update("purchaseOrder.saveArrivalPlanDeadlineInfo", sqlParamMap);
|
||||
}
|
||||
sqlSession.commit();
|
||||
resultMap.put("result", true);
|
||||
resultMap.put("msg", targetObjIdList.length + "건의 마감정보가 저장되었습니다.");
|
||||
} catch (Exception e) {
|
||||
resultMap.put("result", false);
|
||||
resultMap.put("msg", "마감정보 저장 중 오류가 발생했습니다.");
|
||||
if (sqlSession != null) sqlSession.rollback();
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (sqlSession != null) sqlSession.close();
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user