feat: 견적관리 기능 추가 및 검색조건 확장
- 견적요청등록 팝업 신규 개발 (estimateRegistFormPopup.jsp) * S/N 관리 기능 (개별 추가, 연속번호 생성) * 유/무상, 품번, 품명, 수량, 환율 등 필드 추가 * actionType=view 시 닫기 버튼만 표시 - 견적관리 리스트 검색조건 추가 * 주문유형, 제품구분, 국내/해외, 고객사 * 유/무상, 품번, 품명, S/N * 접수일, 요청납기일 기간 검색 * 결재상태 - 결재상신 버튼 기능 수정 - 결재 상태 컬럼 추가 및 결재 상세 팝업 연동 - contractBase SQL에 견적관리 필드 추가
This commit is contained in:
@@ -74,6 +74,9 @@ $(function(){
|
||||
}else if(targetType == "INVOICE"){
|
||||
url = "/supplyChainMgmt/invoiceFormPopUp.do?checkArr="+targetObjId+"&actionType=view";
|
||||
window.open(url, "", "width=1000,height=880");
|
||||
}else if(targetType == "CONTRACT_ESTIMATE"){
|
||||
url = "/contractMgmt/estimateRegistFormPopup.do?objId="+targetObjId+"&actionType=view";
|
||||
window.open(url, "", "width=650,height=400");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -432,7 +432,9 @@ function openProjectFormPopUp(objId){
|
||||
${code_map.product_cd}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<%-- <td><label for="status_cd">진행사항</label></td>
|
||||
<td>
|
||||
<select name="status_cd" id="status_cd" style="width:130px" class="select2" autocomplete="off">
|
||||
@@ -457,13 +459,13 @@ function openProjectFormPopUp(objId){
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="pm_user_id">PM</label></td>
|
||||
<td>
|
||||
<select name="pm_user_id" id="pm_user_id" style="width:130px" class="select2" autocomplete="off">
|
||||
<option value="">선택</option>
|
||||
${code_map.pm_user_id}
|
||||
</select>
|
||||
</td>
|
||||
<td><label for="pm_user_id">PM</label></td>
|
||||
<td>
|
||||
<select name="pm_user_id" id="pm_user_id" style="width:130px" class="select2" autocomplete="off">
|
||||
<option value="">선택</option>
|
||||
${code_map.pm_user_id}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
1302
WebContent/WEB-INF/view/contractMgmt/estimateRegistFormPopup.jsp
Normal file
1302
WebContent/WEB-INF/view/contractMgmt/estimateRegistFormPopup.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1550,4 +1550,217 @@ public class ContractMgmtController {
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 견적관리 리스트
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/contractMgmt/estimateList_new.do")
|
||||
public String estimateList_new(HttpServletRequest request, @RequestParam Map paramMap){
|
||||
//List list = contractMgmtService.getcontractList(request,paramMap);
|
||||
String actionType = CommonUtils.checkNull(paramMap.get("actionType"));
|
||||
Map code_map = new HashMap();
|
||||
String returnUrl ="/contractMgmt/estimateList_new";
|
||||
|
||||
try{
|
||||
|
||||
if("excel".equals(actionType)){
|
||||
returnUrl = "/contractMgmt/contractListExcel";
|
||||
}
|
||||
|
||||
//구분
|
||||
code_map.put("category_cd" , commonService.bizMakeOptionList("0000167", CommonUtils.nullToEmpty((String)paramMap.get("category_cd")) , "common.getCodeselect"));
|
||||
|
||||
//고객사
|
||||
code_map.put("customer_cd",commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("customer_objid")),"common.getsupplyselect"));
|
||||
|
||||
//제품구분
|
||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", CommonUtils.nullToEmpty((String)paramMap.get("product")),"common.getCodeselect")); //공장
|
||||
|
||||
//진행상황
|
||||
code_map.put("status_cd" , commonService.bizMakeOptionList("0000932", CommonUtils.nullToEmpty((String)paramMap.get("status_cd")) , "common.getCodeselect"));
|
||||
|
||||
//결과
|
||||
code_map.put("result_cd", commonService.bizMakeOptionList("0000963", CommonUtils.nullToEmpty((String)paramMap.get("result_cd")), "common.getCodeselect"));
|
||||
|
||||
//PM
|
||||
code_map.put("pm_user_id", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("pm_user_id")), "common.getUserselect")); //구매 PM
|
||||
|
||||
request.setAttribute("code_map",code_map);
|
||||
request.setAttribute("actionType",actionType);
|
||||
//request.setAttribute("LIST", list);
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return returnUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 견적관리 - 견적관리 목록 페이징
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/contractMgmt/estimateGridList.do")
|
||||
public Map getestimateListPaging(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
commonService.selectListPagingNew("contractMgmt.estimateGridList", request, paramMap);
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 견적요청등록 Form
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@RequestMapping("/contractMgmt/estimateRegistFormPopup.do")
|
||||
public String estimateRegistFormPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
String objId = CommonUtils.checkNull(paramMap.get("objId"));
|
||||
String actionType = CommonUtils.checkNull(paramMap.get("actionType"));
|
||||
Map code_map = new HashMap();
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
try{
|
||||
String category_cd = ""; //구분
|
||||
String customer_cd = ""; //고객사
|
||||
String product_cd = ""; //제품구분
|
||||
String status_cd = ""; //진행상황
|
||||
String facility = ""; //설비방향
|
||||
String bus_cal_cd = ""; //영업구분
|
||||
String category1_cd = ""; //구분1
|
||||
String result_cd = ""; //수주결과
|
||||
String pm_user_id =""; //PM
|
||||
String chg_user_id ="";//담당자
|
||||
String contract_result ="";//검토결과
|
||||
String contract_company ="";//수주회사
|
||||
String manufacture_plant ="";//제작공장
|
||||
String spec_user_id ="";//사양담당자
|
||||
String spec_result_cd ="";//사양결과
|
||||
String est_user_id ="";//제작공장
|
||||
String est_result_cd ="";//제작공장
|
||||
String area_cd ="";//제작공장
|
||||
String contract_currency ="";//통화
|
||||
String target_project_no ="";//대상프로젝트번호
|
||||
String mechanical_type ="";//기계형식
|
||||
String overhaul_order ="";//오버홀차수
|
||||
|
||||
Map info = null;
|
||||
if(paramMap.get("objId")!=null){
|
||||
paramMap.put("objId",objId);
|
||||
info = CommonUtils.keyChangeUpperMap(contractMgmtService.getContractMgmtInfo(paramMap));
|
||||
category_cd = CommonUtils.nullToEmpty((String)info.get("CATEGORY_CD"));
|
||||
customer_cd = CommonUtils.nullToEmpty((String)info.get("CUSTOMER_OBJID"));
|
||||
product_cd = CommonUtils.nullToEmpty((String)info.get("PRODUCT"));
|
||||
status_cd = CommonUtils.nullToEmpty((String)info.get("STATUS_CD"));
|
||||
facility = CommonUtils.nullToEmpty((String)info.get("FACILITY"));
|
||||
bus_cal_cd = CommonUtils.nullToEmpty((String)info.get("BUS_CAL_CD"));
|
||||
category1_cd = CommonUtils.nullToEmpty((String)info.get("CATEGORY1_CD"));
|
||||
result_cd = CommonUtils.nullToEmpty((String)info.get("RESULT_CD"));
|
||||
pm_user_id= CommonUtils.nullToEmpty((String)info.get("PM_USER_ID"));
|
||||
chg_user_id= CommonUtils.nullToEmpty((String)info.get("CHG_USER_ID"));
|
||||
contract_result = CommonUtils.nullToEmpty((String)info.get("CONTRACT_RESULT"));
|
||||
contract_company = CommonUtils.nullToEmpty((String)info.get("CONTRACT_COMPANY"));
|
||||
manufacture_plant = CommonUtils.nullToEmpty((String)info.get("MANUFACTURE_PLANT"));
|
||||
spec_result_cd = CommonUtils.nullToEmpty((String)info.get("SPEC_RESULT_CD"));
|
||||
spec_user_id = CommonUtils.nullToEmpty((String)info.get("SPEC_USER_ID"));
|
||||
est_user_id = CommonUtils.nullToEmpty((String)info.get("EST_USER_ID"));
|
||||
est_result_cd = CommonUtils.nullToEmpty((String)info.get("EST_RESULT_CD"));
|
||||
area_cd = CommonUtils.nullToEmpty((String)info.get("AREA_CD"));
|
||||
contract_currency = CommonUtils.nullToEmpty((String)info.get("CONTRACT_CURRENCY"));
|
||||
target_project_no = CommonUtils.nullToEmpty((String)info.get("TARGET_PROJECT_NO"));
|
||||
mechanical_type = CommonUtils.nullToEmpty((String)info.get("MECHANICAL_TYPE"));
|
||||
overhaul_order = CommonUtils.nullToEmpty((String)info.get("OVERHAUL_ORDER"));
|
||||
}
|
||||
|
||||
if("".equals(objId)) objId = CommonUtils.createObjId();
|
||||
|
||||
|
||||
//구분
|
||||
code_map.put("category_cd" , commonService.bizMakeOptionList("0000167", category_cd , "common.getCodeselect"));
|
||||
|
||||
//고객사
|
||||
code_map.put("customer_cd",commonService.bizMakeOptionList("", customer_cd,"common.getsupplyselect"));
|
||||
|
||||
//제품구분
|
||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", product_cd,"common.getCodeselect")); //공장
|
||||
|
||||
//진행상황
|
||||
code_map.put("status_cd" , commonService.bizMakeOptionList("0000932", status_cd , "common.getCodeselect"));
|
||||
|
||||
//설비방향
|
||||
code_map.put("facility" , commonService.bizMakeOptionList("0000959", facility , "common.getCodeselect"));
|
||||
|
||||
//영업구분
|
||||
code_map.put("bus_cal_cd" , commonService.bizMakeOptionList("0000967", bus_cal_cd , "common.getCodeselect"));
|
||||
|
||||
//구분1
|
||||
//code_map.put("category1_cd", commonService.bizMakeOptionList("0000942", category1_cd, "common.getCodeselect"));
|
||||
|
||||
//검토결과
|
||||
code_map.put("result_cd", commonService.bizMakeOptionList("0001107", result_cd, "common.getCodeselect"));
|
||||
|
||||
//검토결과
|
||||
code_map.put("spec_result_cd", commonService.bizMakeOptionList("0001107", spec_result_cd, "common.getCodeselect"));
|
||||
|
||||
//검토결과
|
||||
code_map.put("est_result_cd", commonService.bizMakeOptionList("0001107", est_result_cd, "common.getCodeselect"));
|
||||
|
||||
//계약담당자
|
||||
code_map.put("chg_user_id", commonService.bizMakeOptionList("", chg_user_id, "common.getUserselect")); //구매 PM
|
||||
|
||||
//계약담당자
|
||||
code_map.put("spec_user_id", commonService.bizMakeOptionList("", spec_user_id, "common.getUserselect")); //구매 PM
|
||||
|
||||
//계약담당자
|
||||
code_map.put("est_user_id", commonService.bizMakeOptionList("", est_user_id, "common.getUserselect")); //구매 PM
|
||||
|
||||
//PM
|
||||
code_map.put("pm_user_id", commonService.bizMakeOptionList("", pm_user_id, "common.getUserselect")); //구매 PM
|
||||
|
||||
//수주결과
|
||||
code_map.put("contract_result", commonService.bizMakeOptionList("0000963", contract_result, "common.getCodeselect"));
|
||||
|
||||
//수주회사
|
||||
code_map.put("contract_company", commonService.bizMakeOptionList("0001098", contract_company, "common.getCodeselect"));
|
||||
|
||||
//제작공장
|
||||
code_map.put("manufacture_plant", commonService.bizMakeOptionList("0001101", manufacture_plant, "common.getCodeselect"));
|
||||
|
||||
//해외.국내
|
||||
code_map.put("area_cd", commonService.bizMakeOptionList("0001219", area_cd, "common.getCodeselect"));
|
||||
//통화
|
||||
code_map.put("contract_currency", commonService.bizMakeOptionList("0001533", contract_currency, "common.getCodeselect"));
|
||||
//당사프로젟트번호
|
||||
code_map.put("project_no",commonService.bizMakeOptionList("", target_project_no,"common.getCusProjectNoList"));
|
||||
//기계형식
|
||||
code_map.put("mechanical_type", commonService.bizMakeOptionList("", mechanical_type,"common.getMechanicalTypeList"));
|
||||
|
||||
|
||||
request.setAttribute("code_map",code_map);
|
||||
request.setAttribute("info", info);
|
||||
request.setAttribute("objId", objId);
|
||||
request.setAttribute("actionType", actionType);
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return "/contractMgmt/estimateRegistFormPopup";
|
||||
}
|
||||
|
||||
@RequestMapping("/contractMgmt/saveEstimateInfo.do")
|
||||
public String saveEstimateInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
try {
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonMap(contractMgmtService.saveContractMgmtInfo(request, paramMap)) );
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,8 +486,57 @@
|
||||
,CODE_NAME(AREA_CD) AS AREA_NAME
|
||||
,MECHANICAL_TYPE
|
||||
,OVERHAUL_ORDER
|
||||
,PAID_TYPE
|
||||
,RECEIPT_DATE
|
||||
,PART_NO
|
||||
,PART_NAME
|
||||
,SERIAL_NO
|
||||
,QUANTITY
|
||||
,CUSTOMER_REQUEST
|
||||
,EXCHANGE_RATE
|
||||
,A.APPR_STATUS
|
||||
,A.APPROVAL_OBJID
|
||||
,A.ROUTE_OBJID
|
||||
FROM
|
||||
CONTRACT_MGMT AS T
|
||||
LEFT OUTER JOIN
|
||||
(
|
||||
SELECT
|
||||
B.OBJID AS ROUTE_OBJID,
|
||||
CASE B.STATUS
|
||||
WHEN 'inProcess' THEN '결재중'
|
||||
WHEN 'complete' THEN '결재완료'
|
||||
WHEN 'reject' THEN '반려'
|
||||
ELSE ''
|
||||
END APPR_STATUS,
|
||||
A.OBJID AS APPROVAL_OBJID,
|
||||
A.TARGET_OBJID,
|
||||
B.ROUTE_SEQ
|
||||
FROM
|
||||
APPROVAL A,
|
||||
(
|
||||
select
|
||||
T1.*
|
||||
from
|
||||
(
|
||||
select
|
||||
TARGET_OBJID,
|
||||
max(T.ROUTE_SEQ) as ROUTE_SEQ
|
||||
from
|
||||
ROUTE T
|
||||
group by
|
||||
T.TARGET_OBJID
|
||||
) T,
|
||||
ROUTE T1
|
||||
where
|
||||
T.TARGET_OBJID = T1.TARGET_OBJID
|
||||
and T.ROUTE_SEQ = T1.ROUTE_SEQ
|
||||
) B
|
||||
WHERE
|
||||
A.OBJID = B.APPROVAL_OBJID
|
||||
AND TARGET_TYPE IN ('CONTRACT_ESTIMATE')
|
||||
) A
|
||||
ON T.OBJID::numeric = A.TARGET_OBJID
|
||||
)
|
||||
</sql>
|
||||
|
||||
@@ -519,21 +568,27 @@
|
||||
<if test="product != null and product !='' ">
|
||||
AND product = #{product}
|
||||
</if>
|
||||
|
||||
|
||||
<if test="status_cd !=null and status_cd !=''">
|
||||
AND status_cd = #{status_cd}
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
<if test="result_cd !=null and result_cd !=''">
|
||||
AND result_cd = #{result_cd}
|
||||
</if>
|
||||
|
||||
<if test="contract_start_date != null and !''.equals(contract_start_date)">
|
||||
AND TO_DATE(CONTRACT_DATE,'YYYY-MM-DD') <![CDATA[ >= ]]> TO_DATE(#{contract_start_date}, 'YYYY-MM-DD')
|
||||
<if test="receipt_start_date != null and !''.equals(receipt_start_date)">
|
||||
AND TO_DATE(RECEIPT_DATE,'YYYY-MM-DD') <![CDATA[ >= ]]> TO_DATE(#{receipt_start_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
<if test="contract_end_date != null and !''.equals(contract_end_date)">
|
||||
AND TO_DATE(CONTRACT_DATE,'YYYY-MM-DD') <![CDATA[ <= ]]> TO_DATE(#{contract_end_date}, 'YYYY-MM-DD')
|
||||
<if test="receipt_end_date != null and !''.equals(receipt_end_date)">
|
||||
AND TO_DATE(RECEIPT_DATE,'YYYY-MM-DD') <![CDATA[ <= ]]> TO_DATE(#{receipt_end_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
|
||||
<if test="due_start_date != null and !''.equals(due_start_date)">
|
||||
AND TO_DATE(RECEIPT_DATE,'YYYY-MM-DD') <![CDATA[ >= ]]> TO_DATE(#{due_start_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
<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="pm_user_id !=null and pm_user_id !=''">
|
||||
@@ -600,7 +655,46 @@
|
||||
</if>
|
||||
<if test="contract_month != null and !''.equals(contract_month)">
|
||||
AND TO_DATE(TO_CHAR(TO_DATE(CONTRACT_DATE,'YYYY-MM-DD'),'YYYY-MM-DD'),'YYYY-MM') <![CDATA[ = ]]> TO_DATE(SUBSTRING(#{contract_month} FROM 1 FOR 4) || '-' || SUBSTRING(#{contract_month} FROM 5 FOR 2), 'YYYY-MM')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<!-- 견적관리 추가 검색조건 -->
|
||||
<if test="appr_status !=null and appr_status != '' ">
|
||||
AND APPR_STATUS = #{appr_status}
|
||||
</if>
|
||||
|
||||
<if test="area_cd != null and area_cd !='' ">
|
||||
AND AREA_CD = #{area_cd}
|
||||
</if>
|
||||
|
||||
<if test="paid_type != null and paid_type !='' ">
|
||||
AND PAID_TYPE = #{paid_type}
|
||||
</if>
|
||||
|
||||
<if test="search_partNo != null and search_partNo != ''">
|
||||
AND UPPER(PART_NO) LIKE UPPER('%${search_partNo}%')
|
||||
</if>
|
||||
|
||||
<if test="search_partName != null and search_partName != ''">
|
||||
AND UPPER(PART_NAME) LIKE UPPER('%${search_partName}%')
|
||||
</if>
|
||||
|
||||
<if test="search_serialNo != null and search_serialNo != ''">
|
||||
AND UPPER(SERIAL_NO) LIKE UPPER('%${search_serialNo}%')
|
||||
</if>
|
||||
|
||||
<if test="receipt_start_date != null and !''.equals(receipt_start_date)">
|
||||
AND TO_DATE(RECEIPT_DATE,'YYYY-MM-DD') <![CDATA[ >= ]]> TO_DATE(#{receipt_start_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
<if test="receipt_end_date != null and !''.equals(receipt_end_date)">
|
||||
AND TO_DATE(RECEIPT_DATE,'YYYY-MM-DD') <![CDATA[ <= ]]> TO_DATE(#{receipt_end_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
|
||||
<if test="due_start_date != null and !''.equals(due_start_date)">
|
||||
AND TO_DATE(RECEIPT_DATE,'YYYY-MM-DD') <![CDATA[ >= ]]> TO_DATE(#{due_start_date}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
<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>
|
||||
ORDER BY REGDATE DESC
|
||||
</select>
|
||||
|
||||
@@ -724,9 +818,193 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="saveContractMgmtInfo" parameterType="map">
|
||||
INSERT INTO CONTRACT_MGMT
|
||||
(
|
||||
OBJID
|
||||
,CATEGORY_CD
|
||||
,CUSTOMER_OBJID
|
||||
,PRODUCT
|
||||
,CUSTOMER_PROJECT_NAME
|
||||
,STATUS_CD
|
||||
,DUE_DATE
|
||||
,LOCATION
|
||||
,SETUP
|
||||
,FACILITY
|
||||
,FACILITY_QTY
|
||||
,FACILITY_TYPE
|
||||
,FACILITY_DEPTH
|
||||
,PRODUCTION_NO
|
||||
,BUS_CAL_CD
|
||||
,CATEGORY1_CD
|
||||
,CHG_USER_ID
|
||||
,PLAN_DATE
|
||||
,COMPLETE_DATE
|
||||
,RESULT_CD
|
||||
,PROJECT_NO
|
||||
,PM_USER_ID
|
||||
,CONTRACT_PRICE
|
||||
,CONTRACT_PRICE_CURRENCY
|
||||
,CONTRACT_CURRENCY
|
||||
,REGDATE
|
||||
,WRITER
|
||||
,CONTRACT_NO
|
||||
,CUSTOMER_EQUIP_NAME
|
||||
,REQ_DEL_DATE
|
||||
,CONTRACT_DEL_DATE
|
||||
,CONTRACT_COMPANY
|
||||
,CONTRACT_DATE
|
||||
,PO_NO
|
||||
,MANUFACTURE_PLANT
|
||||
,CONTRACT_RESULT
|
||||
,PROJECT_NAME
|
||||
,SPEC_USER_ID
|
||||
,SPEC_PLAN_DATE
|
||||
,SPEC_COMP_DATE
|
||||
,SPEC_RESULT_CD
|
||||
,EST_USER_ID
|
||||
,EST_PLAN_DATE
|
||||
,EST_COMP_DATE
|
||||
,EST_RESULT_CD
|
||||
,AREA_CD
|
||||
,TARGET_PROJECT_NO
|
||||
,TARGET_PROJECT_NO_DIRECT
|
||||
,CUSTOMER_PRODUCTION_NO
|
||||
,MECHANICAL_TYPE
|
||||
,OVERHAUL_ORDER
|
||||
,PAID_TYPE
|
||||
,RECEIPT_DATE
|
||||
,PART_NO
|
||||
,PART_NAME
|
||||
,SERIAL_NO
|
||||
,QUANTITY
|
||||
,CUSTOMER_REQUEST
|
||||
,EXCHANGE_RATE
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{objId}
|
||||
,#{category_cd}
|
||||
,#{customer_objid}
|
||||
,#{product}
|
||||
,#{customer_project_name}
|
||||
,#{status_cd}
|
||||
,#{due_date}
|
||||
,#{location}
|
||||
,#{setup}
|
||||
,#{facility}
|
||||
,#{facility_qty}
|
||||
,#{facility_type}
|
||||
,#{facility_depth}
|
||||
,#{production_no}
|
||||
,#{bus_cal_cd}
|
||||
,#{category1_cd}
|
||||
,#{chg_user_id}
|
||||
,#{plan_date}
|
||||
,#{complete_date}
|
||||
,#{result_cd}
|
||||
,#{project_no}
|
||||
,#{pm_user_id}
|
||||
,#{contract_price}
|
||||
,#{contract_price_currency}
|
||||
,#{contract_currency}
|
||||
,NOW()
|
||||
,#{writer}
|
||||
,(SELECT TO_CHAR(NOW(),'yy')::VARCHAR ||'C-'||LPAD((SELECT NEXTVAL('contract_mgmt_seq'))::VARCHAR ,4,'0'))
|
||||
,#{customer_equip_name}
|
||||
,#{req_del_date}
|
||||
,#{contract_del_date}
|
||||
,#{contract_company}
|
||||
,#{contract_date}
|
||||
,#{po_no}
|
||||
,#{manufacture_plant}
|
||||
,#{contract_result}
|
||||
,#{project_name}
|
||||
,#{spec_user_id}
|
||||
,#{spec_plan_date}
|
||||
,#{spec_comp_date}
|
||||
,#{spec_result_cd}
|
||||
,#{est_user_id}
|
||||
,#{est_plan_date}
|
||||
,#{est_comp_date}
|
||||
,#{est_result_cd}
|
||||
,#{area_cd}
|
||||
,#{target_project_no}
|
||||
,#{target_project_no_direct}
|
||||
,#{customer_production_no}
|
||||
,#{mechanical_type}
|
||||
,#{overhaul_order}
|
||||
,#{paid_type}
|
||||
,#{receipt_date}
|
||||
,#{part_no}
|
||||
,#{part_name}
|
||||
,#{serial_no}
|
||||
,#{quantity}
|
||||
,#{customer_request}
|
||||
,#{exchange_rate}
|
||||
)
|
||||
ON CONFLICT (OBJID) DO
|
||||
UPDATE
|
||||
SET
|
||||
CATEGORY_CD = #{category_cd}
|
||||
,CUSTOMER_OBJID = #{customer_objid}
|
||||
,PRODUCT = #{product}
|
||||
,CUSTOMER_PROJECT_NAME = #{customer_project_name}
|
||||
,STATUS_CD = #{status_cd}
|
||||
,DUE_DATE = #{due_date}
|
||||
,LOCATION = #{location}
|
||||
,SETUP = #{setup}
|
||||
,FACILITY = #{facility}
|
||||
,FACILITY_QTY = #{facility_qty}
|
||||
,FACILITY_TYPE = #{facility_type}
|
||||
,FACILITY_DEPTH = #{facility_depth}
|
||||
,PRODUCTION_NO = #{production_no}
|
||||
,BUS_CAL_CD = #{bus_cal_cd}
|
||||
,CATEGORY1_CD = #{category1_cd}
|
||||
,CHG_USER_ID = #{chg_user_id}
|
||||
,PLAN_DATE = #{plan_date}
|
||||
,COMPLETE_DATE = #{complete_date}
|
||||
,RESULT_CD = #{result_cd}
|
||||
,PROJECT_NO = #{project_no}
|
||||
,PM_USER_ID = #{pm_user_id}
|
||||
,CONTRACT_PRICE = #{contract_price}
|
||||
,CONTRACT_PRICE_CURRENCY = #{contract_price_currency}
|
||||
,CONTRACT_CURRENCY = #{contract_currency}
|
||||
,CUSTOMER_EQUIP_NAME = #{customer_equip_name}
|
||||
,REQ_DEL_DATE = #{req_del_date}
|
||||
,CONTRACT_DEL_DATE = #{contract_del_date}
|
||||
,CONTRACT_COMPANY = #{contract_company}
|
||||
,CONTRACT_DATE = #{contract_date}
|
||||
,PO_NO = #{po_no}
|
||||
,MANUFACTURE_PLANT = #{manufacture_plant}
|
||||
,CONTRACT_RESULT = #{contract_result}
|
||||
,PROJECT_NAME = #{project_name}
|
||||
,SPEC_USER_ID = #{spec_user_id}
|
||||
,SPEC_PLAN_DATE = #{spec_plan_date}
|
||||
,SPEC_COMP_DATE = #{spec_comp_date}
|
||||
,SPEC_RESULT_CD = #{spec_result_cd}
|
||||
,EST_USER_ID = #{est_user_id}
|
||||
,EST_PLAN_DATE = #{est_plan_date}
|
||||
,EST_COMP_DATE = #{est_comp_date}
|
||||
,EST_RESULT_CD = #{est_result_cd}
|
||||
,AREA_CD = #{area_cd}
|
||||
,TARGET_PROJECT_NO = #{target_project_no}
|
||||
,TARGET_PROJECT_NO_DIRECT= #{target_project_no_direct}
|
||||
,CUSTOMER_PRODUCTION_NO = #{customer_production_no}
|
||||
,MECHANICAL_TYPE = #{mechanical_type}
|
||||
,OVERHAUL_ORDER = #{overhaul_order}
|
||||
,PAID_TYPE = #{paid_type}
|
||||
,RECEIPT_DATE = #{receipt_date}
|
||||
,PART_NO = #{part_no}
|
||||
,PART_NAME = #{part_name}
|
||||
,SERIAL_NO = #{serial_no}
|
||||
,QUANTITY = #{quantity}
|
||||
,CUSTOMER_REQUEST = #{customer_request}
|
||||
,EXCHANGE_RATE = #{exchange_rate}
|
||||
</update>
|
||||
|
||||
<update id="saveContractMgmtInfo_old" parameterType="map">
|
||||
INSERT INTO CONTRACT_MGMT
|
||||
(
|
||||
OBJID
|
||||
,CATEGORY_CD
|
||||
@@ -1096,6 +1374,14 @@
|
||||
,CUSTOMER_PRODUCTION_NO
|
||||
,MECHANICAL_TYPE
|
||||
,OVERHAUL_ORDER
|
||||
,PAID_TYPE
|
||||
,RECEIPT_DATE
|
||||
,PART_NO
|
||||
,PART_NAME
|
||||
,SERIAL_NO
|
||||
,QUANTITY
|
||||
,CUSTOMER_REQUEST
|
||||
,EXCHANGE_RATE
|
||||
,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID::VARCHAR = A.OBJID AND DOC_TYPE='contractMgmt01' AND UPPER(STATUS) = 'ACTIVE') AS FILE_CNT1
|
||||
,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID::VARCHAR = A.OBJID AND DOC_TYPE='contractMgmt02' AND UPPER(STATUS) = 'ACTIVE') AS FILE_CNT2
|
||||
,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID::VARCHAR = A.OBJID AND DOC_TYPE='contractMgmt03' AND UPPER(STATUS) = 'ACTIVE') AS FILE_CNT3
|
||||
|
||||
@@ -492,8 +492,35 @@ public class ContractMgmtService {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/** 견적등록 저장. 프로젝트 생성은 주문서 등록에서 처리 */
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public Map saveContractMgmtInfo(HttpServletRequest request, Map paramMap){
|
||||
Map resultMap = new HashMap();
|
||||
SqlSession sqlSession = null;
|
||||
Map resultList = null;
|
||||
try{
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
PersonBean person = (PersonBean)request.getSession().getAttribute(Constants.PERSON_BEAN);
|
||||
paramMap.put("writer", person.getUserId());
|
||||
int cnt = sqlSession.update("contractMgmt.saveContractMgmtInfo", paramMap);
|
||||
|
||||
resultMap.put("result", true);
|
||||
resultMap.put("msg", Message.SAVE_SUCCESS);
|
||||
sqlSession.commit();
|
||||
}catch(Exception e){
|
||||
sqlSession.rollback();
|
||||
resultMap.put("result", false);
|
||||
resultMap.put("msg", Message.SAVE_FAILED);
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public Map saveContractMgmtInfo_old(HttpServletRequest request, Map paramMap){
|
||||
Map resultMap = new HashMap();
|
||||
SqlSession sqlSession = null;
|
||||
Map resultList = null;
|
||||
|
||||
Reference in New Issue
Block a user