견적관리, 주문서관리 수정
This commit is contained in:
@@ -1698,6 +1698,7 @@ public class ContractMgmtController {
|
||||
String target_project_no ="";//대상프로젝트번호
|
||||
String mechanical_type ="";//기계형식
|
||||
String overhaul_order ="";//오버홀차수
|
||||
String return_reason_cd ="";//반납사유
|
||||
|
||||
Map info = null;
|
||||
List<Map<String, Object>> itemList = new ArrayList<Map<String, Object>>();
|
||||
@@ -1727,7 +1728,7 @@ public class ContractMgmtController {
|
||||
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"));
|
||||
|
||||
return_reason_cd = CommonUtils.nullToEmpty((String)info.get("RETURN_REASON_CD"));
|
||||
// 품목 목록 조회
|
||||
itemList = contractMgmtService.getContractItemList(objId);
|
||||
}
|
||||
@@ -1794,7 +1795,8 @@ public class ContractMgmtController {
|
||||
code_map.put("project_no",commonService.bizMakeOptionList("", target_project_no,"common.getCusProjectNoList"));
|
||||
//기계형식
|
||||
code_map.put("mechanical_type", commonService.bizMakeOptionList("", mechanical_type,"common.getMechanicalTypeList"));
|
||||
|
||||
//반납사유
|
||||
code_map.put("return_reason_cd", commonService.bizMakeOptionList("0001810", return_reason_cd, "common.getCodeselect"));
|
||||
|
||||
// 품번 목록은 AJAX로 검색하므로 제거
|
||||
|
||||
@@ -1858,6 +1860,7 @@ public class ContractMgmtController {
|
||||
try{
|
||||
Map estimate = null;
|
||||
List<Map> items = new ArrayList<Map>();
|
||||
Map<String, String> code_map = new HashMap<String, String>();
|
||||
|
||||
// templateObjId가 있으면 기존 견적서 조회 (견적현황에서 클릭한 경우)
|
||||
if(!"".equals(templateObjId) && !"-1".equals(templateObjId)){
|
||||
@@ -1871,8 +1874,16 @@ public class ContractMgmtController {
|
||||
items = contractMgmtService.getEstimateTemplateItems(paramMap);
|
||||
}
|
||||
|
||||
// 고객사 코드맵 추가
|
||||
String customer_cd = "";
|
||||
if(estimate != null && estimate.get("CUSTOMER_OBJID") != null) {
|
||||
customer_cd = CommonUtils.nullToEmpty((String)estimate.get("CUSTOMER_OBJID"));
|
||||
}
|
||||
code_map.put("customer_cd", commonService.bizMakeOptionList("", customer_cd, "common.getsupplyselect"));
|
||||
|
||||
request.setAttribute("estimate", estimate);
|
||||
request.setAttribute("items", items);
|
||||
request.setAttribute("code_map", code_map);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -1881,6 +1892,49 @@ public class ContractMgmtController {
|
||||
return "/contractMgmt/estimateTemplate1";
|
||||
}
|
||||
|
||||
/**
|
||||
* 고객사 담당자 정보 조회 (AJAX)
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value="/contractMgmt/getCustomerContactInfo.do", method=RequestMethod.POST)
|
||||
public Map getCustomerContactInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
Map resultMap = new HashMap();
|
||||
|
||||
try {
|
||||
String customerObjId = CommonUtils.checkNull(paramMap.get("customerObjId"));
|
||||
|
||||
if(!"".equals(customerObjId)) {
|
||||
// 고객사 담당자 정보 조회
|
||||
Map customerInfo = contractMgmtService.getCustomerContactInfo(paramMap);
|
||||
|
||||
if(customerInfo != null) {
|
||||
// 소문자 우선 시도 (MyBatis가 소문자로 변환)
|
||||
String contactPerson = CommonUtils.checkNull(customerInfo.get("contact_person"));
|
||||
if("".equals(contactPerson)) {
|
||||
contactPerson = CommonUtils.checkNull(customerInfo.get("CONTACT_PERSON"));
|
||||
}
|
||||
|
||||
if(!"".equals(contactPerson)) {
|
||||
resultMap.put("contactPerson", contactPerson);
|
||||
resultMap.put("result", "success");
|
||||
} else {
|
||||
resultMap.put("result", "no_contact");
|
||||
}
|
||||
} else {
|
||||
resultMap.put("result", "no_data");
|
||||
}
|
||||
} else {
|
||||
resultMap.put("result", "no_customer");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
resultMap.put("result", "error");
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 견적서 양식2 (장비 견적서) 팝업
|
||||
* @param session
|
||||
|
||||
Reference in New Issue
Block a user