Merge pull request 'feature/estimate-template-improvements' (#64) from feature/estimate-template-improvements into main
Reviewed-on: #64
This commit was merged in pull request #64.
This commit is contained in:
@@ -1830,6 +1830,40 @@ public class ContractMgmtController {
|
||||
return "/contractMgmt/estimateRegistFormPopup";
|
||||
}
|
||||
|
||||
/**
|
||||
* 견적요청 조회 전용 팝업 (View Only)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@RequestMapping("/contractMgmt/estimateViewPopup.do")
|
||||
public String estimateViewPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
String objId = CommonUtils.checkNull(paramMap.get("objId"));
|
||||
|
||||
try{
|
||||
Map info = null;
|
||||
List<Map<String, Object>> itemList = new ArrayList<Map<String, Object>>();
|
||||
|
||||
if(paramMap.get("objId")!=null){
|
||||
paramMap.put("objId",objId);
|
||||
info = CommonUtils.keyChangeUpperMap(contractMgmtService.getContractMgmtInfo(paramMap));
|
||||
|
||||
// 품목 목록 조회
|
||||
itemList = contractMgmtService.getContractItemList(objId);
|
||||
}
|
||||
|
||||
request.setAttribute("info", info);
|
||||
request.setAttribute("objId", objId);
|
||||
request.setAttribute("itemList", itemList);
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return "/contractMgmt/estimateViewPopup";
|
||||
}
|
||||
|
||||
/**
|
||||
* 품번 검색 (AJAX용)
|
||||
*/
|
||||
@@ -2623,4 +2657,43 @@ public class ContractMgmtController {
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로젝트 존재 여부 확인 (AJAX)
|
||||
* @param request
|
||||
* @param paramMap - contractObjId
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value="/contractMgmt/checkProjectExists.do", method=RequestMethod.POST)
|
||||
public Map checkProjectExists(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
Map resultMap = new HashMap();
|
||||
|
||||
try {
|
||||
String contractObjId = CommonUtils.checkNull(paramMap.get("contractObjId"));
|
||||
|
||||
if(StringUtils.isBlank(contractObjId)) {
|
||||
System.out.println("contractObjId가 비어있음 - exists: false");
|
||||
resultMap.put("exists", false);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
paramMap.put("objId", contractObjId);
|
||||
Map projectInfo = contractMgmtService.checkProjectExists(paramMap);
|
||||
|
||||
if(projectInfo != null) {
|
||||
resultMap.put("exists", true);
|
||||
resultMap.put("projectInfo", projectInfo);
|
||||
} else {
|
||||
resultMap.put("exists", false);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
resultMap.put("exists", false);
|
||||
resultMap.put("error", e.getMessage());
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user