구매요청서 ui 수정만 해놓음
This commit is contained in:
@@ -9062,15 +9062,15 @@ SELECT
|
||||
</delete>
|
||||
|
||||
<!-- 6. Excel 업로드 - 중복 체크 -->
|
||||
<select id="getDuplicateClientExcel" parameterType="map" resultType="map">
|
||||
<!-- <select id="getDuplicateClientExcel" parameterType="map" resultType="map">
|
||||
SELECT OBJID, CLIENT_CD, CLIENT_NM
|
||||
FROM CLIENT_MNG
|
||||
WHERE UPPER(CLIENT_CD) = UPPER(#{CLIENT_CD})
|
||||
LIMIT 1
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
<!-- 7. Excel 업로드 - 일괄 INSERT -->
|
||||
<insert id="insertClientExcel" parameterType="map">
|
||||
<!-- <insert id="insertClientExcel" parameterType="map">
|
||||
INSERT INTO CLIENT_MNG (
|
||||
OBJID,
|
||||
COMP_CODE,
|
||||
@@ -9300,10 +9300,10 @@ SELECT
|
||||
#{insert_ip},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
</insert> -->
|
||||
|
||||
<!-- 8. Excel 업로드 - 중복/신규 건수 조회 -->
|
||||
<select id="countExcelclient" parameterType="map" resultType="map">
|
||||
<!-- <select id="countExcelclient" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
COUNT(CASE WHEN DUP_YN = 'Y' THEN 1 END) AS DUP_CNT,
|
||||
COUNT(CASE WHEN DUP_YN = 'N' THEN 1 END) AS NOW_CNT
|
||||
@@ -9323,7 +9323,7 @@ SELECT
|
||||
AND DOC_TYPE = 'CLIENT_EXCEL_IMPORT'
|
||||
) T
|
||||
) RESULT
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -502,6 +502,7 @@
|
||||
,EXCHANGE_RATE
|
||||
,EST_PRICE
|
||||
,EST_SUPPLY_PRICE
|
||||
,IS_DIRECT_ORDER
|
||||
,(SELECT COUNT(1) FROM ESTIMATE_TEMPLATE WHERE CONTRACT_OBJID = T.OBJID) AS EST_STATUS
|
||||
,(
|
||||
SELECT IS_SEND
|
||||
@@ -901,6 +902,12 @@
|
||||
<if test="due_end_date != null and !''.equals(due_end_date)">
|
||||
AND TO_DATE(DUE_DATE,'YYYY-MM-DD') <![CDATA[ <= ]]> TO_DATE(#{due_end_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
|
||||
<!-- 통합 등록 건 제외 (견적관리에서는 숨김) -->
|
||||
<if test="list_type != null and 'estimate'.equals(list_type)">
|
||||
AND COALESCE(IS_DIRECT_ORDER, 'N') != 'Y'
|
||||
</if>
|
||||
|
||||
ORDER BY REGDATE DESC
|
||||
</select>
|
||||
|
||||
@@ -4865,6 +4872,88 @@ WHERE
|
||||
WHERE OBJID = #{objId}
|
||||
</update>
|
||||
|
||||
<!-- 수주 합계만 업데이트 -->
|
||||
<update id="updateOrderTotalAmounts" parameterType="map">
|
||||
UPDATE CONTRACT_MGMT
|
||||
SET
|
||||
ORDER_SUPPLY_PRICE = #{order_supply_price},
|
||||
ORDER_VAT = #{order_vat},
|
||||
ORDER_TOTAL_AMOUNT = #{order_total_amount}
|
||||
WHERE OBJID = #{objId}
|
||||
</update>
|
||||
|
||||
<!-- 통합 등록 팝업용 견적요청 및 수주 정보 저장/수정 -->
|
||||
<update id="saveEstimateAndOrderInfo" parameterType="map">
|
||||
INSERT INTO CONTRACT_MGMT
|
||||
(
|
||||
OBJID,
|
||||
CATEGORY_CD,
|
||||
CUSTOMER_OBJID,
|
||||
PRODUCT,
|
||||
AREA_CD,
|
||||
CUSTOMER_EQUIP_NAME,
|
||||
CUSTOMER_PROJECT_NAME,
|
||||
CUSTOMER_PRODUCTION_NO,
|
||||
MECHANICAL_TYPE,
|
||||
PAID_TYPE,
|
||||
RECEIPT_DATE,
|
||||
REQ_DEL_DATE,
|
||||
CONTRACT_RESULT,
|
||||
PO_NO,
|
||||
ORDER_DATE,
|
||||
CONTRACT_CURRENCY,
|
||||
EXCHANGE_RATE,
|
||||
REGDATE,
|
||||
WRITER,
|
||||
CONTRACT_NO,
|
||||
IS_DIRECT_ORDER
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{objId},
|
||||
#{category_cd},
|
||||
#{customer_objid},
|
||||
#{product},
|
||||
#{area_cd},
|
||||
#{customer_equip_name},
|
||||
#{customer_project_name},
|
||||
#{customer_production_no},
|
||||
#{mechanical_type},
|
||||
#{paid_type},
|
||||
#{receipt_date},
|
||||
#{req_del_date},
|
||||
#{contract_result},
|
||||
#{po_no},
|
||||
#{order_date},
|
||||
#{contract_currency},
|
||||
#{exchange_rate},
|
||||
NOW(),
|
||||
#{writer},
|
||||
(SELECT TO_CHAR(NOW(),'yy')::VARCHAR ||'C-'||LPAD((SELECT NEXTVAL('contract_mgmt_seq'))::VARCHAR ,4,'0')),
|
||||
#{is_direct_order}
|
||||
)
|
||||
ON CONFLICT (OBJID) DO
|
||||
UPDATE
|
||||
SET
|
||||
CATEGORY_CD = #{category_cd},
|
||||
CUSTOMER_OBJID = #{customer_objid},
|
||||
PRODUCT = #{product},
|
||||
AREA_CD = #{area_cd},
|
||||
CUSTOMER_EQUIP_NAME = #{customer_equip_name},
|
||||
CUSTOMER_PROJECT_NAME = #{customer_project_name},
|
||||
CUSTOMER_PRODUCTION_NO = #{customer_production_no},
|
||||
MECHANICAL_TYPE = #{mechanical_type},
|
||||
PAID_TYPE = #{paid_type},
|
||||
RECEIPT_DATE = #{receipt_date},
|
||||
REQ_DEL_DATE = #{req_del_date},
|
||||
CONTRACT_RESULT = #{contract_result},
|
||||
PO_NO = #{po_no},
|
||||
ORDER_DATE = #{order_date},
|
||||
CONTRACT_CURRENCY = #{contract_currency},
|
||||
EXCHANGE_RATE = #{exchange_rate},
|
||||
IS_DIRECT_ORDER = #{is_direct_order}
|
||||
</update>
|
||||
|
||||
<!-- 계약 기본 정보 조회 (제품구분 등) -->
|
||||
<select id="getContractBasicInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
@@ -5022,6 +5111,49 @@ WHERE
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 통합 등록 팝업용 품목 저장 (수주 정보 포함) -->
|
||||
<insert id="insertContractItemWithOrder" parameterType="map">
|
||||
INSERT INTO CONTRACT_ITEM (
|
||||
OBJID,
|
||||
CONTRACT_OBJID,
|
||||
SEQ,
|
||||
PART_OBJID,
|
||||
PART_NO,
|
||||
PART_NAME,
|
||||
QUANTITY,
|
||||
DUE_DATE,
|
||||
CUSTOMER_REQUEST,
|
||||
RETURN_REASON,
|
||||
REGDATE,
|
||||
WRITER,
|
||||
STATUS,
|
||||
ORDER_QUANTITY,
|
||||
ORDER_UNIT_PRICE,
|
||||
ORDER_SUPPLY_PRICE,
|
||||
ORDER_VAT,
|
||||
ORDER_TOTAL_AMOUNT
|
||||
) VALUES (
|
||||
#{objId},
|
||||
#{contractObjId},
|
||||
#{seq},
|
||||
#{partObjId},
|
||||
#{partNo},
|
||||
#{partName},
|
||||
CASE WHEN #{quantity} = '' OR #{quantity} IS NULL THEN NULL ELSE #{quantity}::INTEGER END,
|
||||
#{dueDate},
|
||||
#{customerRequest},
|
||||
#{returnReason},
|
||||
NOW(),
|
||||
#{writer},
|
||||
'ACTIVE',
|
||||
#{orderQuantity},
|
||||
#{orderUnitPrice},
|
||||
#{orderSupplyPrice},
|
||||
#{orderVat},
|
||||
#{orderTotalAmount}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 품목별 S/N 저장 -->
|
||||
<insert id="insertContractItemSerial" parameterType="map">
|
||||
INSERT INTO CONTRACT_ITEM_SERIAL (
|
||||
@@ -5058,6 +5190,11 @@ WHERE
|
||||
CI.RETURN_REASON,
|
||||
CI.REGDATE,
|
||||
CI.WRITER,
|
||||
CI.ORDER_QUANTITY,
|
||||
CI.ORDER_UNIT_PRICE,
|
||||
CI.ORDER_SUPPLY_PRICE,
|
||||
CI.ORDER_VAT,
|
||||
CI.ORDER_TOTAL_AMOUNT,
|
||||
STRING_AGG(CIS.SERIAL_NO, ', ' ORDER BY CIS.SEQ) AS SERIAL_NOS,
|
||||
COUNT(CIS.OBJID) AS SERIAL_COUNT
|
||||
FROM
|
||||
@@ -5082,8 +5219,14 @@ WHERE
|
||||
CI.QUANTITY,
|
||||
CI.DUE_DATE,
|
||||
CI.CUSTOMER_REQUEST,
|
||||
CI.RETURN_REASON,
|
||||
CI.REGDATE,
|
||||
CI.WRITER
|
||||
CI.WRITER,
|
||||
CI.ORDER_QUANTITY,
|
||||
CI.ORDER_UNIT_PRICE,
|
||||
CI.ORDER_SUPPLY_PRICE,
|
||||
CI.ORDER_VAT,
|
||||
CI.ORDER_TOTAL_AMOUNT
|
||||
ORDER BY
|
||||
CI.SEQ
|
||||
</select>
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
<!-- 혹시나해서 남겨두는 파일 사실상 필요는 없습니다 -->
|
||||
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@include file= "/init.jsp" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
|
||||
<!-- //JSTL 변수선언 -->
|
||||
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
||||
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
||||
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
||||
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
||||
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
||||
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function(){
|
||||
|
||||
$(document).ready(function(){
|
||||
fnc_datepick();
|
||||
});
|
||||
|
||||
//엔터키로 조회
|
||||
$("input").keyup(function(e){
|
||||
if(e.keyCode == 13){
|
||||
document.form1.page.value = "1";
|
||||
fn_search();
|
||||
}
|
||||
});
|
||||
|
||||
//search
|
||||
$("#btnSearch").click(function(){
|
||||
document.form1.page.value = "1";
|
||||
fn_search();
|
||||
});
|
||||
});
|
||||
//조회 기능
|
||||
function fn_search(){
|
||||
document.form1.action = "/admin/warehouseHistoryList.do";
|
||||
document.form1.submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form name="form1" method="POST">
|
||||
<input type="hidden" name="objId" id="objId" value="${param.objId}" />
|
||||
<section id="commonSection" class="admin1">
|
||||
<div class="admin_title">
|
||||
<h2>창고관리 이력</h2>
|
||||
</div>
|
||||
<div id="adminTableWrap">
|
||||
<div id="tableWrap">
|
||||
<table id="adminTable">
|
||||
<colgroup>
|
||||
<col width="13%" />
|
||||
<col width="16%" />
|
||||
<col width="16%" />
|
||||
<col width="16%" />
|
||||
<col width="18%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
<col width="12%" />
|
||||
</colgroup>
|
||||
<tr id="thead">
|
||||
<td>위치코드</td>
|
||||
<td>위치명</td>
|
||||
<td>위치설명</td>
|
||||
<td>가출고코드</td>
|
||||
<td>가출고거래처명</td>
|
||||
<td>적합여부</td>
|
||||
<td>가용재고여부</td>
|
||||
<td>사용여부</td>
|
||||
<td>BASELOC_CD</td>
|
||||
<td>CO_CD</td>
|
||||
<td>LOC_NMK</td>
|
||||
<td>INSERT_ID</td>
|
||||
<td>INSERT_IP</td>
|
||||
<td>INSERT_DT</td>
|
||||
<td>MODIFY_ID</td>
|
||||
<td>MODIFY_IP</td>
|
||||
<td>MODIFY_DT</td>
|
||||
<td>ATTR_NMK</td>
|
||||
</tr>
|
||||
<c:choose>
|
||||
<c:when test="${!empty LIST}">
|
||||
<c:forEach var="info" items="${LIST}" varStatus="status">
|
||||
<tr>
|
||||
<td>${info.LOCATION_CODE}</td>
|
||||
<td>${info.LOCATION_NAME}</td>
|
||||
<td>${info.LOCATION_DESCRIPTION}</td>
|
||||
<td>${info.OUT_CODE}</td>
|
||||
<td>${info.OUT_CO_NAME}</td>
|
||||
<td>${info.FIT_STATUS}</td>
|
||||
<td>${info.AVAILABLE_STATUS}</td>
|
||||
<td>${info.USE_STATUS}</td>
|
||||
<td>${info.BASE_LOC_CD}</td>
|
||||
<td>${info.CO_CD}</td>
|
||||
<td>${info.LOC_NMK}</td>
|
||||
<td>${info.INSERT_ID}</td>
|
||||
<td>${info.INSERT_IP}</td>
|
||||
<td>${info.INSERT_DT}</td>
|
||||
<td>${info.MODIFY_ID}</td>
|
||||
<td>${info.MODIFY_IP}</td>
|
||||
<td>${info.MODIFY_DT}</td>
|
||||
<td>${info.ATTR_NMK}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td align="center" colspan="18">조회된 정보가 없습니다.</td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pdm_page">
|
||||
<input type="hidden" name="page" id="page" value="${nPage}">
|
||||
<c:if test="${!empty LIST}">
|
||||
<div class="page_pro">
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<c:choose>
|
||||
<c:when test="${nPage > 1}">
|
||||
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
||||
<td> </td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td class="no_more_page">prev</td>
|
||||
<td> </td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
|
||||
<c:if test="${status.index -1 < maxPage}">
|
||||
<c:choose>
|
||||
<c:when test="${status.index eq nPage}">
|
||||
<td><a href="#" class="now_page">${nPage}</a></td>
|
||||
<td> </td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
||||
<td> </td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:choose>
|
||||
<c:when test="${nPage < maxPage}">
|
||||
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td class="no_more_page">next</td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tr>
|
||||
</table>
|
||||
<p id="adminPageCount">총 ${totalCount}건</p>
|
||||
</center>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
166
WebContent/WEB-INF/view/admin/processMng/processMngList.jsp
Normal file
166
WebContent/WEB-INF/view/admin/processMng/processMngList.jsp
Normal file
@@ -0,0 +1,166 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@include file= "/init.jsp" %>
|
||||
<%
|
||||
String searchLocationCode = CommonUtils.checkNull(request.getParameter("searchLocationCode"));
|
||||
String searchLocationName = CommonUtils.checkNull(request.getParameter("searchLocationName"));
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
fnc_datepick();
|
||||
|
||||
//엔터키로 조회
|
||||
$("input").keyup(function(e){
|
||||
if(e.keyCode == 13){
|
||||
$("#page").val("1");
|
||||
fn_search();
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnSearch").click(function(){
|
||||
$("#page").val("1");
|
||||
fn_search();
|
||||
});
|
||||
|
||||
//삭제
|
||||
$("#btnDelete").click(function(){
|
||||
fn_delete();
|
||||
});
|
||||
|
||||
fn_search();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var columns = [
|
||||
{title:'OBJID', field:'OBJID', visible:false},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'50', title:'NO', field:'RNUM'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'작업장코드', field:'PROCESS_CODE',
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick: function(e, cell) {
|
||||
var objid = fnc_checkNull(cell.getData().OBJID);
|
||||
openwarehouseListInfoPopUp(objid);
|
||||
}
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'외주거래처코드', field:'VENDOR_CD'},
|
||||
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'작업장명', field:'LOCATION_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'외주거래처명', field:'VENDOR_NM'},
|
||||
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'작업장설명', field:'LOCATION_DESCRIPTION'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'적합여부', field:'FIT_YN'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'사용여부', field:'USE_YN'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'BASELOC_CD', field:'BASE_LOC_CD'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'CO_CD', field:'CO_CD'},
|
||||
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'AVABSTOCK_YN', field:'AVABSTOCK_YN'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'LOC_NMK', field:'LOC_NMK'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'INSERT_ID', field:'INSERT_ID'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'INSERT_IP', field:'INSERT_IP'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'150', title:'INSERT_DT', field:'INSERT_DT'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'MODIFY_ID', field:'MODIFY_ID'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'MODIFY_IP', field:'MODIFY_IP'},
|
||||
{headerHozAlign:'center', hozAlign:'center', width:'150', title:'MODIFY_DT', field:'MODIFY_DT'},
|
||||
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'ATTR_NMK', field:'ATTR_NMK'}
|
||||
];
|
||||
|
||||
function fn_search(){
|
||||
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/admin/processMngListPagingGridList.do", columns, true);
|
||||
}
|
||||
|
||||
function fn_delete(){
|
||||
var checkedObj = _tabulGrid.getSelectedData();
|
||||
|
||||
if(0 < checkedObj.length){
|
||||
var objId = fnc_checkNull(checkedObj[0].OBJID);
|
||||
Swal.fire({
|
||||
title: '선택한 작업장정보를 삭제하시겠습니까?',
|
||||
text: '',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '확인',
|
||||
cancelButtonText: '취소',
|
||||
reverseButtons: false
|
||||
}).then(result => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/admin/deleteProcessMng.do",
|
||||
data: {"OBJID":objId},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data.result == 'true'){
|
||||
Swal.fire("삭제되었습니다.");
|
||||
fn_search();
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
Swal.fire("선택한 항목이 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
function openprocessMngListInfoPopUp(objid){
|
||||
var popup_width = 400;
|
||||
var popup_height = 800;
|
||||
var target = "openprocessMngListInfoPopUp";
|
||||
var url = "/admin/processMngListFormPopUp.do";
|
||||
|
||||
fn_centerPopup(popup_width, popup_height, url, target);
|
||||
|
||||
var hiddenForm = document.hiddenForm;
|
||||
hiddenForm.objid.value = objid;
|
||||
hiddenForm.target = "openprocessMngListInfoPopUp";
|
||||
hiddenForm.action = "/admin/processMngListFormPopUp.do";
|
||||
hiddenForm.submit();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="overflow-y: hidden;">
|
||||
<form name="hiddenForm" id="hiddenForm">
|
||||
<input type="hidden" name="objid">
|
||||
</form>
|
||||
<form name="form1" id="form1" method="post">
|
||||
<input type="hidden" name="status" id="status">
|
||||
<div class="content-box">
|
||||
<div class="content-box-s">
|
||||
<div class="plm_menu_name_gdnsi">
|
||||
<h2>
|
||||
<span>작업장 관리</span>
|
||||
</h2>
|
||||
<div class="btnArea">
|
||||
<input type="button" value="조회" class="plm_btns" id="btnSearch">
|
||||
<input type="button" value="작업장등록" class="plm_btns" onclick="javascript:openprocessMngListInfoPopUp('');">
|
||||
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
|
||||
</div>
|
||||
</div>
|
||||
<div id="plmSearchZon">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="label"><label>작업장코드</label></td>
|
||||
<td><input type="text" name="searchProcessCode" id="searchProcessCode" value="<%=searchProcessCode%>"></td>
|
||||
<td class="label"><label>작업장명</label></td>
|
||||
<td><input type="text" name="searchProcessName" id="searchProcessName" value="<%=searchProcessName%>"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<%@include file="/WEB-INF/view/common/common_gridArea.jsp" %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,182 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@include file="/init.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
<script type="text/javascript">
|
||||
function saveProcessMng(){
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
var form = document.processMngForm;
|
||||
|
||||
// 날짜 형식 변환 (오후 2:23:33 -> 14:23:33)
|
||||
var insertDt = form.insert_dt.value;
|
||||
var modifyDt = form.modify_dt.value;
|
||||
|
||||
if(insertDt) {
|
||||
form.insert_dt.value = convertToDBFormat(insertDt);
|
||||
}
|
||||
if(modifyDt) {
|
||||
form.modify_dt.value = convertToDBFormat(modifyDt);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/admin/saveProcessMngListInfo.do",
|
||||
data: $(form).serialize(),
|
||||
dataType: "json",
|
||||
success: function(result){
|
||||
alert(result.message);
|
||||
if(result.resultFlag == "true"){
|
||||
opener.fn_search();
|
||||
self.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function convertToDBFormat(dateStr) {
|
||||
// "2021-06-10 오후 2:23:33" -> "2021-06-10 14:23:33"
|
||||
if(!dateStr) return '';
|
||||
|
||||
var parts = dateStr.split(' ');
|
||||
if(parts.length < 3) return dateStr;
|
||||
|
||||
var date = parts[0]; // 2021-06-10
|
||||
var ampm = parts[1]; // 오후 or 오전
|
||||
var time = parts[2]; // 2:23:33
|
||||
|
||||
var timeParts = time.split(':');
|
||||
var hour = parseInt(timeParts[0]);
|
||||
var minute = timeParts[1];
|
||||
var second = timeParts[2];
|
||||
|
||||
// 오후면 12 더하기 (단, 12시는 그대로)
|
||||
if(ampm === '오후' && hour !== 12) {
|
||||
hour += 12;
|
||||
}
|
||||
// 오전 12시는 0시로
|
||||
if(ampm === '오전' && hour === 12) {
|
||||
hour = 0;
|
||||
}
|
||||
|
||||
// 시간을 2자리로 맞추기
|
||||
hour = ('0' + hour).slice(-2);
|
||||
|
||||
return date + ' ' + hour + ':' + minute + ':' + second;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<section id="commonSection" class="admin_option_min">
|
||||
<div class="admin_title">
|
||||
<h2>작업장 등록/수정</h2>
|
||||
</div>
|
||||
<div id="businessPopupFormWrap">
|
||||
<form name="processMngForm" id="processMngForm">
|
||||
<input type="hidden" name="objid" value="${info.OBJID}">
|
||||
<input type="hidden" name="writer" value="<%=session.getAttribute("USER_ID")%>">
|
||||
|
||||
<table class="pmsPopupForm"">
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>작업장코드<label></td>
|
||||
<td><input type="text" name="process_code" value="${info.PROCESS_CODE}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>외주거래처코드<label></td>
|
||||
<td><input type="text" name="vendor_cd" value="${info.VENDOR_CD}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>작업장명<label></td>
|
||||
<td><input type="text" name="process_name" value="${info.PROCESS_NAME}" required></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>외주거래처명<label></td>
|
||||
<td><input type="text" name="vendor_nm" value="${info.VENDOR_NM}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>작업장설명<label></td>
|
||||
<td><input type="text" name="process_description" value="${info.PROCESS_DESCRIPTION}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>적합여부<label></td>
|
||||
<td>
|
||||
<select name="fit_yn">
|
||||
<option value="Y" ${empty info.FIT_YN or info.FIT_YN eq 'Y' ? 'selected' : ''}>적합</option>
|
||||
<option value="N" ${info.FIT_YN eq 'N' ? 'selected' : ''}>부적합</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>사용여부<label></td>
|
||||
<td>
|
||||
<select name="use_status">
|
||||
<option value="Y" ${empty info.USE_STATUS or info.USE_STATUS eq 'Y' ? 'selected' : ''}>사용</option>
|
||||
<option value="N" ${info.USE_STATUS eq 'N' ? 'selected' : ''}>미사용</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>BASELOC_CD<label></td>
|
||||
<td><input type="text" name="base_loc_cd" value="${info.BASE_LOC_CD}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>CO_CD<label></td>
|
||||
<td><input type="text" name="co_cd" value="${info.CO_CD}"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>AVABSTOCK_YN<label></td>
|
||||
<td><input type="text" name="avabstock_yn" value="${info.AVABSTOCK_YN}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>LOC_NMK<label></td>
|
||||
<td><input type="text" name="loc_nmk" value="${info.LOC_NMK}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>INSERT_ID<label></td>
|
||||
<td><input type="text" name="insert_id" value="${info.INSERT_ID}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>INSERT_IP<label></td>
|
||||
<td><input type="text" name="insert_ip" value="${info.INSERT_IP}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>INSERT_DT<label></td>
|
||||
<td><input type="text" name="insert_dt" value="${info.INSERT_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>MODIFY_ID<label></td>
|
||||
<td><input type="text" name="modify_id" value="${info.MODIFY_ID}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>MODIFY_IP<label></td>
|
||||
<td><input type="text" name="modify_ip" value="${info.MODIFY_IP}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>MODIFY_DT<label></td>
|
||||
<td><input type="text" name="modify_dt" value="${info.MODIFY_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>ATTR_NMK<label></td>
|
||||
<td><input type="text" name="attr_nmk" value="${info.ATTR_NMK}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div id="adminPopupBtnWrap">
|
||||
<button type="button" class="btns" onclick="saveProcessMng()">저장</button>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,7 +2,7 @@
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@include file= "/init.jsp" %>
|
||||
<%@include file= "/init_new.jsp" %>
|
||||
<%
|
||||
Map info = (HashMap)(request.getAttribute("resultMap"));
|
||||
boolean isModify = true;
|
||||
@@ -496,139 +496,82 @@ function fn_callbackFnc(){
|
||||
<input type="hidden" name="TARGET_DRAWING_DOWNLOAD" id="TARGET_DRAWING_DOWNLOAD">
|
||||
<section>
|
||||
<div class="plm_menu_name" style="display:flex;">
|
||||
<h2 style="width:60%;height:80px;text-align:center;margin-top:15px;">
|
||||
<span style="font-size:30px;">구매요청서</br>(Purchase request)</span>
|
||||
<h2 style="width:100%;height:80px;text-align:center;margin-top:15px;">
|
||||
<span style="font-size:30px;">구매요청서 (Purchase Request)</span>
|
||||
</h2>
|
||||
<table class="pmsPopupForm" style="width:40%;background:white;">
|
||||
<colgroup>
|
||||
<col width="20%">
|
||||
<col width="20%">
|
||||
<col width="20%">
|
||||
</colgroup>
|
||||
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
||||
<td class="input_title" style="text-align:center;">
|
||||
<label>작성</label>
|
||||
</td>
|
||||
<td class="input_title" style="text-align:center;">
|
||||
<label>검토</label>
|
||||
</td>
|
||||
<td class="input_title" style="text-align:center;">
|
||||
<label>팀장</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align:center;" id="appr0"></td>
|
||||
<td style="text-align:center;" id="appr1"></td>
|
||||
<td style="text-align:center;" id="appr2"></td>
|
||||
</tr>
|
||||
<%--
|
||||
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;">
|
||||
<td class="input_sub_title" style="text-align:center;">
|
||||
${resultMap.WRITER_NAME}<!-- 작성자이름 -->
|
||||
</td>
|
||||
<td class="input_sub_title" style="text-align:center;" id="reviewerName"></td>
|
||||
<td class="input_sub_title" style="text-align:center;" id="reviewerName"></td>
|
||||
</tr>
|
||||
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
||||
<td class="input_sub_title" style="text-align:center;">
|
||||
${resultMap.REGDATE_TITLE}<!-- 작성일자 -->
|
||||
</td>
|
||||
<td class="input_sub_title" style="text-align:center;" id="reviewerDate"></td>
|
||||
<td class="input_sub_title" style="text-align:center;" id="reviewerDate"></td>
|
||||
</tr>
|
||||
--%>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="businessPopupFormWrap" style="z-index:99;">
|
||||
<table class="pmsPopupForm" style="z-index:99;">
|
||||
<tr>
|
||||
<col width="8%">
|
||||
<col width="12%">
|
||||
<col width="8%">
|
||||
<col width="12%">
|
||||
<col width="8%">
|
||||
<col width="12%">
|
||||
<col width="8%">
|
||||
<col width="12%">
|
||||
<col width="8%">
|
||||
<col width="12%">
|
||||
</tr>
|
||||
<colgroup>
|
||||
<col width="10%">
|
||||
<col width="15%">
|
||||
<col width="10%">
|
||||
<col width="15%">
|
||||
<col width="10%">
|
||||
<col width="15%">
|
||||
<col width="10%">
|
||||
<col width="15%">
|
||||
</colgroup>
|
||||
|
||||
<tr>
|
||||
<input type="hidden" name="REQUEST_MNG_NO" id="REQUEST_MNG_NO" reqTitle="날짜" value="${resultMap.REGDATE_TITLE}" readonly="readonly">
|
||||
<td class="input_title"><label for="">구분</label></td>
|
||||
<td class="input_sub_title">
|
||||
<%-- <select name="request_cd" id="request_cd" reqTitle="구매담당자" type="select" ${'create' eq resultMap.STATUS ? '':'readonly style="background-color:#ababab" onFocus="this.initialSelect = this.selectedIndex;" onChange="this.selectedIndex = this.initialSelect;"'} required></select> --%>
|
||||
<select name="REQUEST_CD" id="REQUEST_CD" reqTitle="구분" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.request_cd}
|
||||
<td class="input_title"><label for="">구매유형</label></td>
|
||||
<td>
|
||||
<select name="PURCHASE_TYPE" id="PURCHASE_TYPE" reqTitle="구매유형" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.purchase_type}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">프로젝트번호</label></td>
|
||||
<td>
|
||||
<select name="PROJECT_NO" id="PROJECT_NO" reqTitle="프로젝트번호" type="select" class="select2" disabled>
|
||||
<select name="PROJECT_NO" id="PROJECT_NO" reqTitle="프로젝트번호" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.project_no}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="input_title"><label for="">고객사</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" name="CUSTOMER_NAME" id="CUSTOMER_NAME" value="${resultMap.CUSTOMER_NAME}" readonly>
|
||||
<td class="input_title"><label for="">구매유형</label></td>
|
||||
<td>
|
||||
<select name="PURCHASE_TYPE2" id="PURCHASE_TYPE2" reqTitle="구매유형" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.purchase_type}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">주문유형</label></td>
|
||||
<td>
|
||||
<select name="ORDER_TYPE" id="ORDER_TYPE" reqTitle="주문유형" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.order_type}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="">제품구분</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" name="PRODUCT_NAME" id="PRODUCT_NAME" value="${resultMap.PRODUCT_NAME}" readonly>
|
||||
<td>
|
||||
<select name="PRODUCT_NAME" id="PRODUCT_NAME" reqTitle="제품구분" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.product_name}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">기계형식</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" name="MECHANICAL_TYPE" id="MECHANICAL_TYPE" value="${resultMap.MECHANICAL_TYPE}" readonly>
|
||||
<td class="input_title"><label for="">국내/해외</label></td>
|
||||
<td>
|
||||
<select name="AREA_CD" id="AREA_CD" reqTitle="국내/해외" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.area_cd}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">고객사</label></td>
|
||||
<td>
|
||||
<!-- <input type="text" name="CUSTOMER_NAME" id="CUSTOMER_NAME" value="${resultMap.CUSTOMER_NAME}" readonly> -->
|
||||
<select name="CUSTOMER_OBJID" id="CUSTOMER_OBJID" reqTitle="고객사" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.area_cd}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">유/무상</label></td>
|
||||
<td>
|
||||
<select name="PAYMENT_TYPE" id="PAYMENT_TYPE" reqTitle="유/무상" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.payment_type}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="">프로젝트명</label></td>
|
||||
<td class="input_sub_title" colspan="3">
|
||||
<input type="text" name="PROJECT_NAME" id="PROJECT_NAME" value="${resultMap.PROJECT_NAME}" readonly>
|
||||
</td>
|
||||
<td class="input_title"><label for="">셋업지</label></td>
|
||||
<td class="input_sub_title" colspan="3">
|
||||
<input type="text" name="SETUP" id="SETUP" value="${resultMap.SETUP}" readonly>
|
||||
</td>
|
||||
<td class="input_title"><label for="">출고일</label></td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" name="RELEASE" id="RELEASE" value="${resultMap.RELEASE_DATE}" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for="">요청사유</label></td>
|
||||
<td>
|
||||
<select name="REQUEST_REASONS" id="REQUEST_REASONS" reqTitle="요청사유" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.request_reasons}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">요청인</label></td>
|
||||
<td>
|
||||
<select name="REQUEST_USER_ID" id="REQUEST_USER_ID" reqTitle="요청인" type="select" class="select2" disabled>
|
||||
<option value="">선택</option> ${code_map.request_user_id}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">입고요청일</label></td>
|
||||
<td>
|
||||
<td colspan="7">
|
||||
<input type="text" class="date_icon" name="DELIVERY_REQUEST_DATE" id="DELIVERY_REQUEST_DATE" reqTitle="입고요청일" value="${resultMap.DELIVERY_REQUEST_DATE}" required disabled>
|
||||
</td>
|
||||
<td class="input_title"><label for="">유닛명</label></td>
|
||||
<td colspan="3">
|
||||
<select name="UNIT_NAME" id="UNIT_NAME" required reqTitle="유닛명" type="select" class="select2" disabled>
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for="">제목</label></td>
|
||||
<td class="input_sub_title" colspan="9">
|
||||
<input type="text" name="REMARK" id="REMARK" value="${resultMap.REMARK}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -637,9 +580,14 @@ function fn_callbackFnc(){
|
||||
<% if(isModify){ %>
|
||||
<div class="plm_btn_wrap" style="padding:0 8 0 8; text-align: right;">
|
||||
<input type="button" value="행추가" class="plm_btns" id="btnAddRow" name="btnAddRow" style="background:#dfeffc">
|
||||
<input type="button" value="행삭제" class="plm_btns" id="btnDeleteRow" name="btnDeleteRow" style="background:#dfeffc">
|
||||
<input type="button" value="행삭제" class="plm_btns" id="btnDeleteRow" name="btnDeleteRow" style="background:#dfeffc">
|
||||
<input type="button" value="저장" class="plm_btns" id="btnReg" style="background:#dfeffc">
|
||||
<% }else{ %>
|
||||
<!-- <input type="button" value="공급업체저장" class="plm_btns" id="btnSupplySave" style="background:#dfeffc"> -->
|
||||
<% } %>
|
||||
<input type="button" value="닫기" class="plm_btns" style="background:#dfeffc" onclick="window.close();" >
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="businessPopupFormWrap" style="z-index:99;">
|
||||
@@ -657,8 +605,8 @@ function fn_callbackFnc(){
|
||||
<col width="30px">
|
||||
<col width="200px">
|
||||
<col width="200px">
|
||||
<col width="80px">
|
||||
<col width="200px">
|
||||
<col width="285px">
|
||||
<!-- <col width="200px"> -->
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="plm_thead">
|
||||
@@ -666,7 +614,7 @@ function fn_callbackFnc(){
|
||||
<td>품번</td>
|
||||
<td>품명</td>
|
||||
<td>수량</td>
|
||||
<td>공급업체</td>
|
||||
<!-- <td>공급업체</td> -->
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -677,8 +625,8 @@ function fn_callbackFnc(){
|
||||
<col width="30px">
|
||||
<col width="200px">
|
||||
<col width="200px">
|
||||
<col width="80px">
|
||||
<col width="200px">
|
||||
<col width="285px">
|
||||
<!-- <col width="200px"> -->
|
||||
</colgroup>
|
||||
<tbody id="partListArea">
|
||||
</tbody>
|
||||
@@ -687,20 +635,20 @@ function fn_callbackFnc(){
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="btn_wrap">
|
||||
<%-- <c:if test="${'create' eq resultMap.STATUS}"> --%>
|
||||
<div class="plm_btn_wrap" style="padding:0 8 0 8; text-align: right;">
|
||||
<!-- <div class="btn_wrap"> -->
|
||||
<!-- <%-- <c:if test="${'create' eq resultMap.STATUS}"> --%> -->
|
||||
<!-- <div class="plm_btn_wrap" style="padding:0 8 0 8; text-align: right;"> -->
|
||||
<!-- <input type="button" value="수정" class="plm_btns" id="btnAddRow" name="btnAddRow" style="background:#dfeffc"> -->
|
||||
<% if(isModify){ %>
|
||||
<input type="button" value="결재상신" class="plm_btns" id="btnAppr" name="btnAppr" style="background:#dfeffc">
|
||||
<input type="button" value="저장" class="plm_btns" id="btnReg" style="background:#dfeffc">
|
||||
<% }else{ %>
|
||||
<input type="button" value="공급업체저장" class="plm_btns" id="btnSupplySave" style="background:#dfeffc">
|
||||
<% } %>
|
||||
<input type="button" value="닫기" class="plm_btns" style="background:#dfeffc" onclick="window.close();" >
|
||||
</div>
|
||||
<%-- </c:if> --%>
|
||||
</div>
|
||||
<!-- <% if(isModify){ %> -->
|
||||
<!-- <input type="button" value="결재상신" class="plm_btns" id="btnAppr" name="btnAppr" style="background:#dfeffc"> -->
|
||||
<!-- <input type="button" value="저장" class="plm_btns" id="btnReg" style="background:#dfeffc"> -->
|
||||
<!-- <% }else{ %> -->
|
||||
<!-- <input type="button" value="공급업체저장" class="plm_btns" id="btnSupplySave" style="background:#dfeffc"> -->
|
||||
<!-- <% } %> -->
|
||||
<!-- <input type="button" value="닫기" class="plm_btns" style="background:#dfeffc" onclick="window.close();" > -->
|
||||
<!-- </div> -->
|
||||
<!-- <%-- </c:if> --%> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1646,6 +1646,8 @@ public String deleteClient(HttpServletRequest request, @RequestParam Map<String,
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
// Excel 업로드 기능 미사용 - 주석처리
|
||||
/*
|
||||
@RequestMapping("/admin/clientExcelImportPopUp.do")
|
||||
public String clientExcelImportPopUp(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap){
|
||||
Map code_map = new HashMap();
|
||||
@@ -1672,13 +1674,15 @@ public String clientExcelImportPopUp(HttpSession session, HttpServletRequest req
|
||||
}
|
||||
return "/admin/clientMng/clientExcelImportPopUp";
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* 업로드된 Excel File을 통해서 데이터를 Parsing하여 목록으로 return.
|
||||
* 업로드된 Excel File을 통해서 데이터를 Parsing하여 목록으로 return. (미사용 - 주석처리)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
/*
|
||||
@RequestMapping("/admin/parsingExcelClient.do")
|
||||
public String parsingExcelClient(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
ArrayList parsingClientList = new ArrayList();
|
||||
@@ -1691,10 +1695,12 @@ public String parsingExcelClient(HttpServletRequest request, @RequestParam Map<S
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonArray(parsingClientList));
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* 거래처 저장
|
||||
* 거래처 저장 (미사용 - 주석처리)
|
||||
*/
|
||||
/*
|
||||
@RequestMapping("/admin/clientApplySave.do")
|
||||
@ResponseBody
|
||||
public String clientApplySave(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap){
|
||||
@@ -1711,13 +1717,15 @@ public String clientApplySave(HttpSession session, HttpServletRequest request, @
|
||||
}
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Excel 업로드 시 중복/신규 건수 조회
|
||||
* Excel 업로드 시 중복/신규 건수 조회 (미사용 - 주석처리)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
/*
|
||||
@ResponseBody
|
||||
@RequestMapping("/admin/countExcelclient.do")
|
||||
public Map<String, Object> countExcelclient(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
@@ -1732,13 +1740,15 @@ public Map<String, Object> countExcelclient(HttpServletRequest request, @Request
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Excel 파일 업로드 처리(ajax)
|
||||
* Excel 파일 업로드 처리(ajax) (미사용 - 주석처리)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
/*
|
||||
@RequestMapping("/admin/excelImportFileProc.do")
|
||||
public String excelImportFileProc(HttpServletRequest request, HttpSession session, @RequestParam Map<String, Object> paramMap){
|
||||
System.out.println("excelImportFileProc()..");
|
||||
@@ -1768,13 +1778,15 @@ public String excelImportFileProc(HttpServletRequest request, HttpSession sessio
|
||||
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Client 첨부파일 업로드 처리(ajax)
|
||||
* Client 첨부파일 업로드 처리(ajax) (미사용 - 주석처리)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
/*
|
||||
@RequestMapping("/admin/clientImportFileProc.do")
|
||||
public String clientImportFileProc(HttpServletRequest request, HttpSession session, @RequestParam Map<String, Object> paramMap){
|
||||
System.out.println("clientImportFileProc()..");
|
||||
@@ -1804,11 +1816,63 @@ public String clientImportFileProc(HttpServletRequest request, HttpSession sessi
|
||||
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
*/
|
||||
|
||||
// 일반거래처 11월 20일 이희진
|
||||
// 일반거래처 11월 20일 이희진 / 11월 24일 이희진
|
||||
|
||||
|
||||
// /**
|
||||
// * 공정 관리 데이터를 저장한다. 11월 24일 이희진
|
||||
// * TODO: Service 구현 필요
|
||||
// * @param request
|
||||
// * @param paramMap
|
||||
// * @return
|
||||
// */
|
||||
// @RequestMapping("/admin/saveProcessMngListInfo.do")
|
||||
// public String saveProcessMngListInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
// HashMap resultMap = new HashMap();
|
||||
// try{
|
||||
//
|
||||
// ArrayList existList = adminService.getDuplicateProcessMngListInfo(request, paramMap);
|
||||
// if(null != existList && 0 < existList.size()){
|
||||
// resultMap = CommonUtils.setReqAttrResultMsg(request, "중복된 공정명이 존재 합니다.", "false", null,null);
|
||||
// }else{
|
||||
// adminService.saveProcessMngListInfo(request, paramMap);
|
||||
// resultMap = CommonUtils.setReqAttrResultMsg(request, "저장하였습니다.", "true", null,null);
|
||||
// }
|
||||
// }catch(Exception e){
|
||||
// e.printStackTrace();
|
||||
// resultMap = CommonUtils.setReqAttrResultMsg(request, "오류가 발생하였습니다.", "false", e,null);
|
||||
// }
|
||||
// request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
||||
//
|
||||
// return "/ajax/ajaxResult";
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 공정 관리 삭제 11월 24일 이희진
|
||||
// * TODO: Service 구현 필요
|
||||
// * @param request
|
||||
// * @param paramMap
|
||||
// * @return
|
||||
// */
|
||||
// @RequestMapping("/admin/deleteProcessMng.do")
|
||||
// public String deleteProcessMng(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
// HashMap resultMap = new HashMap();
|
||||
// try{
|
||||
// adminService.deleteProcessMng(request, paramMap);
|
||||
// resultMap.put("result", true);
|
||||
// resultMap.put("msg", "삭제되었습니다.");
|
||||
// }catch(Exception e){
|
||||
// e.printStackTrace();
|
||||
// resultMap.put("result", false);
|
||||
// resultMap.put("msg", "삭제 중 오류가 발생했습니다.");
|
||||
// }
|
||||
// request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
||||
// return "/ajax/ajaxResult";
|
||||
// }
|
||||
|
||||
//----------------------11월 24일 이희진----------------------
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9062,15 +9062,15 @@ SELECT
|
||||
</delete>
|
||||
|
||||
<!-- 6. Excel 업로드 - 중복 체크 -->
|
||||
<select id="getDuplicateClientExcel" parameterType="map" resultType="map">
|
||||
<!-- <select id="getDuplicateClientExcel" parameterType="map" resultType="map">
|
||||
SELECT OBJID, CLIENT_CD, CLIENT_NM
|
||||
FROM CLIENT_MNG
|
||||
WHERE UPPER(CLIENT_CD) = UPPER(#{CLIENT_CD})
|
||||
LIMIT 1
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
<!-- 7. Excel 업로드 - 일괄 INSERT -->
|
||||
<insert id="insertClientExcel" parameterType="map">
|
||||
<!-- <insert id="insertClientExcel" parameterType="map">
|
||||
INSERT INTO CLIENT_MNG (
|
||||
OBJID,
|
||||
COMP_CODE,
|
||||
@@ -9300,10 +9300,10 @@ SELECT
|
||||
#{insert_ip},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
</insert> -->
|
||||
|
||||
<!-- 8. Excel 업로드 - 중복/신규 건수 조회 -->
|
||||
<select id="countExcelclient" parameterType="map" resultType="map">
|
||||
<!-- <select id="countExcelclient" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
COUNT(CASE WHEN DUP_YN = 'Y' THEN 1 END) AS DUP_CNT,
|
||||
COUNT(CASE WHEN DUP_YN = 'N' THEN 1 END) AS NOW_CNT
|
||||
@@ -9323,7 +9323,7 @@ SELECT
|
||||
AND DOC_TYPE = 'CLIENT_EXCEL_IMPORT'
|
||||
) T
|
||||
) RESULT
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -2660,268 +2660,11 @@ public class AdminService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 업로드된 Excel File을 통해 데이터를 Parsing 한다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
/* CLIENT 엑셀 업로드 관련 메서드 주석처리 (2024-11-24)
|
||||
* - parsingExcelClient
|
||||
* - saveClientMaster
|
||||
* - countExcelclient
|
||||
*/
|
||||
public ArrayList parsingExcelClient(HttpServletRequest request,Map paramMap)throws Exception{
|
||||
ArrayList resultList = new ArrayList();
|
||||
ArrayList fileList = commonService.getFileList(paramMap);
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession(false);
|
||||
if(null != fileList && 1 == fileList.size()){
|
||||
HashMap fileMap = (HashMap)fileList.get(0);
|
||||
|
||||
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
|
||||
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
|
||||
|
||||
// OS에 관계없이 올바른 경로 생성 (Linux/Windows 호환)
|
||||
File excelFile = new File(path, fileName);
|
||||
FileInputStream fis = new FileInputStream(excelFile);
|
||||
|
||||
// .xls와 .xlsx 둘 다 지원
|
||||
org.apache.poi.ss.usermodel.Workbook workBook = null;
|
||||
if (fileName.endsWith(".xls") || fileName.endsWith(".XLS")) {
|
||||
workBook = new org.apache.poi.hssf.usermodel.HSSFWorkbook(fis);
|
||||
} else if (fileName.endsWith(".xlsx") || fileName.endsWith(".XLSX")) {
|
||||
workBook = new XSSFWorkbook(fis);
|
||||
}
|
||||
|
||||
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
|
||||
org.apache.poi.ss.usermodel.Sheet sheet = workBook.getSheetAt(0);
|
||||
// 데이터 포멧터
|
||||
DataFormatter formatter = new DataFormatter();
|
||||
int rows = sheet.getPhysicalNumberOfRows();
|
||||
for(int rowIndex= 1 ; rowIndex < rows ; rowIndex++){ // 2번째 행부터 읽기 (헤더 1행 + 데이터)
|
||||
org.apache.poi.ss.usermodel.Row row = sheet.getRow(rowIndex);
|
||||
if(null != row){
|
||||
HashMap clientMap = new HashMap();
|
||||
HashMap sqlMap = new HashMap();
|
||||
for(int columnIndex = 0 ; columnIndex < 110 ; columnIndex++){ // 110개 컬럼
|
||||
org.apache.poi.ss.usermodel.Cell cell = row.getCell(columnIndex);
|
||||
//데이터 유형별 get data
|
||||
String cellValue = "";
|
||||
|
||||
if(null != cell){
|
||||
if(cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_FORMULA){
|
||||
cellValue = formatter.formatCellValue(cell, formulaEval);
|
||||
}else if(cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC){
|
||||
if(DateUtil.isCellDateFormatted(cell)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
cellValue = sdf.format(cell.getDateCellValue());
|
||||
}else{
|
||||
cellValue = formatter.formatCellValue(cell);
|
||||
}
|
||||
}else{
|
||||
cellValue = formatter.formatCellValue(cell);
|
||||
}
|
||||
}
|
||||
|
||||
switch(columnIndex){
|
||||
case 0 : clientMap.put("COMP_CODE", cellValue); break;
|
||||
case 1 : clientMap.put("CLIENT_CD", cellValue); break;
|
||||
case 2 : clientMap.put("CLIENT_NM", cellValue); break;
|
||||
case 3 : clientMap.put("TR_NMK", cellValue); break;
|
||||
case 4 : clientMap.put("CLIENT_NMK", cellValue); break;
|
||||
case 5 : clientMap.put("ATTR_NMK", cellValue); break;
|
||||
case 6 : clientMap.put("CLIENT_TYPE", cellValue); break;
|
||||
case 7 : clientMap.put("BUS_REG_NO", cellValue); break;
|
||||
case 8 : clientMap.put("RESIDENT_NO", cellValue); break;
|
||||
case 9 : clientMap.put("CEO_NM", cellValue); break;
|
||||
case 10 : clientMap.put("CEO_NMK", cellValue); break;
|
||||
case 11 : clientMap.put("BUS_TYPE", cellValue); break;
|
||||
case 12 : clientMap.put("BUS_ITEM", cellValue); break;
|
||||
case 13 : clientMap.put("POST_NO", cellValue); break;
|
||||
case 14 : clientMap.put("ADDR1", cellValue); break;
|
||||
case 15 : clientMap.put("ADDR2", cellValue); break;
|
||||
case 16 : clientMap.put("ADDR_FG", cellValue); break;
|
||||
case 17 : clientMap.put("TEL_NO", cellValue); break;
|
||||
case 18 : clientMap.put("FAX_NO", cellValue); break;
|
||||
case 19 : clientMap.put("HOMEPAGE", cellValue); break;
|
||||
case 20 : clientMap.put("EMAIL", cellValue); break;
|
||||
case 21 : clientMap.put("LIQ_RS", cellValue); break;
|
||||
case 22 : clientMap.put("TR_FG", cellValue); break;
|
||||
case 23 : clientMap.put("COUNTRY_NM", cellValue); break;
|
||||
case 24 : clientMap.put("CLASS_CD", cellValue); break;
|
||||
case 25 : clientMap.put("CLASS_NM", cellValue); break;
|
||||
case 26 : clientMap.put("GRADE_CD", cellValue); break;
|
||||
case 27 : clientMap.put("GRADE_NM", cellValue); break;
|
||||
case 28 : clientMap.put("COLLECT_CLIENT_CD", cellValue); break;
|
||||
case 29 : clientMap.put("COLLECT_CLIENT_NM", cellValue); break;
|
||||
case 30 : clientMap.put("REGION_CD", cellValue); break;
|
||||
case 31 : clientMap.put("REGION_NM", cellValue); break;
|
||||
case 32 : clientMap.put("TRADE_START_DT", cellValue); break;
|
||||
case 33 : clientMap.put("TRADE_END_DT", cellValue); break;
|
||||
case 34 : clientMap.put("USE_YN", cellValue); break;
|
||||
case 35 : clientMap.put("CONTRACT_START_DT", cellValue); break;
|
||||
case 36 : clientMap.put("CONTRACT_END_DT", cellValue); break;
|
||||
case 37 : clientMap.put("TRADE_TYPE", cellValue); break;
|
||||
case 38 : clientMap.put("DISCOUNT_RATE", cellValue); break;
|
||||
case 39 : clientMap.put("CONTRACT_AMT", cellValue); break;
|
||||
case 40 : clientMap.put("MONTHLY_FEE", cellValue); break;
|
||||
case 41 : clientMap.put("PAYMENT_TERM", cellValue); break;
|
||||
case 42 : clientMap.put("RCP_TP", cellValue); break;
|
||||
case 43 : clientMap.put("CREDIT_LIMIT", cellValue); break;
|
||||
case 44 : clientMap.put("LIMIT_RETURN_DAY", cellValue); break;
|
||||
case 45 : clientMap.put("PUR_BANK_CD", cellValue); break;
|
||||
case 46 : clientMap.put("PUR_BANK_NM", cellValue); break;
|
||||
case 47 : clientMap.put("PUR_BRANCH_NM", cellValue); break;
|
||||
case 48 : clientMap.put("PUR_ACCOUNT_NO", cellValue); break;
|
||||
case 49 : clientMap.put("PUR_ACCOUNT_HOLDER", cellValue); break;
|
||||
case 50 : clientMap.put("PUR_PAY_PLAN", cellValue); break;
|
||||
case 51 : clientMap.put("PUR_SLIP_TYPE", cellValue); break;
|
||||
case 52 : clientMap.put("PUR_TAX_TYPE", cellValue); break;
|
||||
case 53 : clientMap.put("SALE_BANK_CD", cellValue); break;
|
||||
case 54 : clientMap.put("SALE_BANK_NM", cellValue); break;
|
||||
case 55 : clientMap.put("SALE_BRANCH_NM", cellValue); break;
|
||||
case 56 : clientMap.put("SALE_ACCOUNT_NO", cellValue); break;
|
||||
case 57 : clientMap.put("SALE_COLLECT_PLAN", cellValue); break;
|
||||
case 58 : clientMap.put("SALE_SLIP_TYPE", cellValue); break;
|
||||
case 59 : clientMap.put("SALE_TAX_TYPE", cellValue); break;
|
||||
case 60 : clientMap.put("VENDOR_DEPT_NM", cellValue); break;
|
||||
case 61 : clientMap.put("VENDOR_POSITION", cellValue); break;
|
||||
case 62 : clientMap.put("VENDOR_DUTY", cellValue); break;
|
||||
case 63 : clientMap.put("VENDOR_MANAGER_NM", cellValue); break;
|
||||
case 64 : clientMap.put("VENDOR_TEL", cellValue); break;
|
||||
case 65 : clientMap.put("VENDOR_EXT", cellValue); break;
|
||||
case 66 : clientMap.put("VENDOR_MOBILE", cellValue); break;
|
||||
case 67 : clientMap.put("VENDOR_EMAIL", cellValue); break;
|
||||
case 68 : clientMap.put("MGR_DEPT_CD", cellValue); break;
|
||||
case 69 : clientMap.put("MGR_DEPT_NM", cellValue); break;
|
||||
case 70 : clientMap.put("MGR_POSITION", cellValue); break;
|
||||
case 71 : clientMap.put("MGR_DUTY", cellValue); break;
|
||||
case 72 : clientMap.put("MGR_EMP_CD", cellValue); break;
|
||||
case 73 : clientMap.put("MGR_EMP_NM", cellValue); break;
|
||||
case 74 : clientMap.put("MGR_TEL", cellValue); break;
|
||||
case 75 : clientMap.put("MGR_EXT", cellValue); break;
|
||||
case 76 : clientMap.put("MGR_MOBILE", cellValue); break;
|
||||
case 77 : clientMap.put("MGR_EMAIL", cellValue); break;
|
||||
case 78 : clientMap.put("MGR_REMARK", cellValue); break;
|
||||
case 79 : clientMap.put("REC_REMARK", cellValue); break;
|
||||
case 80 : clientMap.put("REC_POST_NO", cellValue); break;
|
||||
case 81 : clientMap.put("REC_ADDR1", cellValue); break;
|
||||
case 82 : clientMap.put("REC_ADDR2", cellValue); break;
|
||||
case 83 : clientMap.put("REC_ADDR_FG", cellValue); break;
|
||||
case 84 : clientMap.put("REC_TEL", cellValue); break;
|
||||
case 85 : clientMap.put("REC_FAX", cellValue); break;
|
||||
case 86 : clientMap.put("PROJECT_CD", cellValue); break;
|
||||
case 87 : clientMap.put("PROJECT_NM", cellValue); break;
|
||||
case 88 : clientMap.put("PJT_NMK", cellValue); break;
|
||||
case 89 : clientMap.put("EXT_DATA_CD", cellValue); break;
|
||||
case 90 : clientMap.put("E_TAX_YN", cellValue); break;
|
||||
case 91 : clientMap.put("UNIT_REPORT_CLIENT", cellValue); break;
|
||||
case 92 : clientMap.put("SUB_BUS_NO", cellValue); break;
|
||||
case 93 : clientMap.put("PROCUREMENT_YN", cellValue); break;
|
||||
case 94 : clientMap.put("USER_DEF_DC1", cellValue); break;
|
||||
case 95 : clientMap.put("USER_DEF_DC2", cellValue); break;
|
||||
case 96 : clientMap.put("USE_FG", cellValue); break;
|
||||
case 97 : clientMap.put("USE_NM", cellValue); break;
|
||||
case 98 : clientMap.put("BIZCON_FG", cellValue); break;
|
||||
case 99 : clientMap.put("BIZCON_NM", cellValue); break;
|
||||
case 100 : clientMap.put("SHIP_TP", cellValue); break;
|
||||
case 101 : clientMap.put("SHIP_NM", cellValue); break;
|
||||
case 102 : clientMap.put("PLAN_DAY_TYPE", cellValue); break;
|
||||
case 103 : clientMap.put("PLAN_DAY", cellValue); break;
|
||||
case 104 : clientMap.put("PURPOSE_TYPE", cellValue); break;
|
||||
case 105 : clientMap.put("FOR_YN", cellValue); break;
|
||||
case 106 : clientMap.put("CHECK_DATA", cellValue); break;
|
||||
case 107 : clientMap.put("CHECK_STATE", cellValue); break;
|
||||
case 108 : clientMap.put("CHECK_ORDER", cellValue); break;
|
||||
case 109 : clientMap.put("FIXED_ORDER", cellValue); break; // 110번째 컬럼
|
||||
}
|
||||
}
|
||||
|
||||
sqlMap.put("CLIENT_CD", clientMap.get("CLIENT_CD"));
|
||||
|
||||
Map dupClientMap = sqlSession.selectOne("admin.getDuplicateClientExcel", sqlMap);
|
||||
|
||||
if(null != dupClientMap){
|
||||
clientMap.put("DUP_YN", "Y");
|
||||
}else{
|
||||
clientMap.put("DUP_YN", "N");
|
||||
}
|
||||
|
||||
resultList.add(clientMap);
|
||||
}
|
||||
}
|
||||
|
||||
fis.close();
|
||||
}
|
||||
sqlSession.close();
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 거래처 일괄 저장
|
||||
* @param request
|
||||
* @param paramMap
|
||||
*/
|
||||
public void saveClientMaster(HttpServletRequest request,Map paramMap){
|
||||
SqlSession sqlSession = null;
|
||||
Map tempMap = new HashMap();
|
||||
try{
|
||||
String GridData = CommonUtils.checkNull(paramMap.get("jqGrid"));
|
||||
System.out.println("GridData -------------------------->"+GridData);
|
||||
System.out.println("CommonUtils.checkNull(paramMap.get(jqGrid)) -------------------------->"+CommonUtils.checkNull(paramMap.get("jqGrid")));
|
||||
|
||||
List<Map<String, Object>> gridDataList = JsonUtil.JsonToList(GridData);
|
||||
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession(false);
|
||||
byte[] buf = new byte[1024];
|
||||
System.out.println("gridDataSIZE : " + gridDataList.size());
|
||||
for(int i=0; i<gridDataList.size(); i++){
|
||||
Map insertMap = gridDataList.get(i);
|
||||
Map fileMap = new HashMap();
|
||||
String CLIENT_MGMT_OBJID = CommonUtils.createObjId();
|
||||
|
||||
insertMap.put("OBJID", CLIENT_MGMT_OBJID);
|
||||
insertMap.put("CONNECTUSERID", (String)paramMap.get("CONNECTUSERID"));
|
||||
|
||||
String CLIENT_CD = CommonUtils.checkNull((String)insertMap.get("CLIENT_CD"));
|
||||
String CLIENT_NM = CommonUtils.checkNull((String)insertMap.get("CLIENT_NM"));
|
||||
|
||||
insertMap.put("CLIENT_CD", CLIENT_CD.replace("§", "&"));
|
||||
insertMap.put("CLIENT_NM", CLIENT_NM.replace("§", "&"));
|
||||
|
||||
insertMap.put("CLIENT_CD", CLIENT_CD.replace("※", "%"));
|
||||
insertMap.put("CLIENT_NM", CLIENT_NM.replace("※", "%"));
|
||||
|
||||
String DUP_YN = CommonUtils.checkNull((String)insertMap.get("DUP_YN"));
|
||||
|
||||
if("N".equals(DUP_YN)){
|
||||
sqlSession.insert("admin.insertClientExcel", insertMap);
|
||||
}
|
||||
}
|
||||
sqlSession.commit();
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
sqlSession.rollback();
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* CLIENT 중복/신규 건수 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public Map countExcelclient(Map paramMap){
|
||||
Map resultMap = new HashMap();
|
||||
SqlSession sqlSession = null;
|
||||
|
||||
try{
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
resultMap = sqlSession.selectOne("admin.countExcelclient", paramMap);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
//-------------11월 20일 이희진-------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user