- Add Docker Compose configurations for dev, prod, and standalone environments - Add database initialization scripts (init-db.sh, init-db-docker.sh) - Add enhanced start-docker-linux.sh with DB init support - Add comprehensive database initialization guide - Support for automatic dbexport.pgsql import on first run - Include safety checks for production environment
770 lines
23 KiB
Java
770 lines
23 KiB
Java
package com.pms.controller;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
import com.pms.common.bean.PersonBean;
|
|
import com.pms.common.utils.CommonUtils;
|
|
import com.pms.common.utils.Constants;
|
|
import com.pms.service.CommonService;
|
|
import com.pms.service.ProductMgmtService;
|
|
import com.pms.service.ProjectConceptService;
|
|
|
|
@Controller
|
|
public class ProductMgmtController {
|
|
|
|
ProjectConceptService service = null;
|
|
|
|
@Autowired
|
|
ProductMgmtService productMgmtService;
|
|
|
|
@Autowired
|
|
CommonService commonService;
|
|
|
|
/**
|
|
* PART 조회및 배포
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/productmgmtList.do")
|
|
public String ordermgmtList(HttpServletRequest request, @RequestParam Map paramMap){
|
|
|
|
List list = null;
|
|
Map code_map = new HashMap();
|
|
try{
|
|
list = productMgmtService.getProductMgntList(request,paramMap);
|
|
|
|
//제품구분
|
|
code_map.put("product_category",commonService.bizMakeOptionList("0000917", (String)paramMap.get("product_category"),"common.getCodeselect"));
|
|
request.setAttribute("code_map",code_map);
|
|
|
|
request.setAttribute("cu01_file", Constants.CUSTOMER_CODE01);
|
|
request.setAttribute("cu02_file", Constants.CUSTOMER_CODE02);
|
|
request.setAttribute("LIST", list);
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
|
|
return "/productmgmt/productmgmtList";
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 제품마스터 상세조회
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/productmgmtUpdateFormPopup.do")
|
|
public String productmgmtUpdateFormPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
String objId = CommonUtils.checkNull(paramMap.get("objId"));
|
|
Map code_map = new HashMap();
|
|
String actionType = CommonUtils.checkNull(paramMap.get("actionType"));
|
|
Map info = null;
|
|
|
|
ArrayList qualityList = new ArrayList();
|
|
|
|
try{
|
|
// 제품양산제품 조회
|
|
if(!"".equals(objId)){
|
|
info = productMgmtService.getProductMgntInfo(paramMap);
|
|
}
|
|
if(info!=null){
|
|
//제품구분
|
|
code_map.put("product_category",commonService.bizMakeOptionList("0000917", (String)info.get("PRODUCT_CATEGORY"),"common.getCodeselect"));
|
|
|
|
//Type
|
|
//code_map.put("product_type",commonService.bizMakeOptionList("ITEM_CD", (String)info.get("PRODUCT_TYPE"),"common.getCodeselect"));
|
|
|
|
//Grade
|
|
code_map.put("product_grade",commonService.bizMakeOptionList("0000012", (String)info.get("PRODUCT_GRADE"),"common.getCodeselect"));
|
|
|
|
//톤(Ton)수
|
|
code_map.put("product_ton",commonService.bizMakeOptionList("0000021", (String)info.get("PRODUCT_TON"),"common.getCodeselect"));
|
|
|
|
//BOOM단수
|
|
code_map.put("product_boom",commonService.bizMakeOptionList("0000029", (String)info.get("PRODUCT_BOOM"),"common.getCodeselect"));
|
|
|
|
//차량
|
|
code_map.put("product_vehicle",commonService.bizMakeOptionList("0000035", (String)info.get("PRODUCT_VEHICLE"),"common.getCodeselect"));
|
|
|
|
//생산여부
|
|
code_map.put("production_flag",commonService.bizMakeOptionList("0000039", (String)info.get("PRODUCTION_FLAG"),"common.getCodeselect"));
|
|
|
|
}else{
|
|
//제품구분
|
|
code_map.put("product_category",commonService.bizMakeOptionList("0000917", "","common.getCodeselect"));
|
|
|
|
//Type
|
|
//code_map.put("product_type",commonService.bizMakeOptionList("ITEM_CD", (String)info.get("PRODUCT_TYPE"),"common.getCodeselect"));
|
|
|
|
//Grade
|
|
code_map.put("product_grade",commonService.bizMakeOptionList("0000012", "","common.getCodeselect"));
|
|
|
|
//톤(Ton)수
|
|
code_map.put("product_ton",commonService.bizMakeOptionList("0000021", "","common.getCodeselect"));
|
|
|
|
//BOOM단수
|
|
code_map.put("product_boom",commonService.bizMakeOptionList("0000029", "","common.getCodeselect"));
|
|
|
|
//차량
|
|
code_map.put("product_vehicle",commonService.bizMakeOptionList("0000035", "","common.getCodeselect"));
|
|
|
|
//생산여부
|
|
code_map.put("production_flag",commonService.bizMakeOptionList("0000039", "","common.getCodeselect"));
|
|
|
|
}
|
|
//object id
|
|
if("".equals(objId)) objId = CommonUtils.createObjId();
|
|
|
|
request.setAttribute("qualityList",qualityList);
|
|
request.setAttribute("code_map",code_map);
|
|
request.setAttribute("info", info);
|
|
request.setAttribute("objId", objId);
|
|
request.setAttribute("actionType", actionType);
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
|
|
return "/productmgmt/productMgmtUpdateFormPopup";
|
|
}
|
|
|
|
|
|
/**
|
|
* 제품마스터 상세조회
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/openSpecificationFormPopup.do")
|
|
public String openSpecificationFormPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
String targetObjId = CommonUtils.checkNull(paramMap.get("targetObjId"));
|
|
|
|
//ArrayList list = new ArrayList();
|
|
Map info = null;
|
|
try{
|
|
|
|
paramMap.put("objId",(String)paramMap.get("targetObjId"));
|
|
info = productMgmtService.getProductMgntInfo(paramMap);
|
|
//list = (ArrayList)productMgmtService.SpecificationList(request, paramMap);
|
|
request.setAttribute("targetObjId", targetObjId);
|
|
request.setAttribute("info", info);
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
|
|
return "/productmgmt/openSpecificationFormPopup";
|
|
}
|
|
|
|
/**
|
|
* 제품 마스터 중복체크
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@ResponseBody
|
|
@RequestMapping("/productmgmt/saveproductMgmtInfo.do")
|
|
public Map<String, Object> saveproductMgmtInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
try {
|
|
result_map.put("RESULT", productMgmtService.saveproductMgmtInfo(request, paramMap));
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
e.printStackTrace();
|
|
}
|
|
return result_map;
|
|
}
|
|
|
|
/**
|
|
* 제품 마스터 저장
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@ResponseBody
|
|
@RequestMapping("/productmgmt/checkDuplicateProductMgmt.do")
|
|
public Map<String, Object> checkDuplicateProductMgmt(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map resultMap = new HashMap();
|
|
try {
|
|
resultMap = productMgmtService.checkDuplicateProductMgmt(request, paramMap);
|
|
|
|
System.out.println("resultMap:"+resultMap);
|
|
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
e.printStackTrace();
|
|
}
|
|
return resultMap;
|
|
}
|
|
|
|
|
|
/**
|
|
* 제품마스터 제원저장
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/SpecificationFormSave.do")
|
|
@ResponseBody
|
|
public String SpecificationFormSave(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap){
|
|
String result = "";
|
|
try{
|
|
productMgmtService.SpecificationFormSave(request, paramMap);
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 제품마스터 삭제
|
|
*/
|
|
@RequestMapping("/productmgmt/productDelete.do")
|
|
@ResponseBody
|
|
public String productDelete(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
String result = "";
|
|
try{
|
|
result_map.put("RESULT", productMgmtService.productDelete(request, paramMap));
|
|
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 제품 배포
|
|
*/
|
|
@RequestMapping("/productmgmt/changeMultiproductStatus.do")
|
|
@ResponseBody
|
|
public String changeMultiPartStatus(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
String result = "";
|
|
try{
|
|
result_map.put("RESULT", productMgmtService.changeMultiPartStatus(request, paramMap));
|
|
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
|
|
/**
|
|
* Excel을 이용한 제품마스터 등록 팝업을 호출한다.
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/openproductmgmtExcelImportPopUp.do")
|
|
public String openproductmgmtExcelImportPopUp(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap){
|
|
Map code_map = new HashMap();
|
|
String projectno = "";
|
|
String objid="";
|
|
try{
|
|
objid = CommonUtils.createObjId();
|
|
//jqGrid내에서 사용할 코드
|
|
Map param = new HashMap();
|
|
|
|
param.put("parentCodeId","CUST_CD");
|
|
code_map.put("customer_cd", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
param.put("parentCodeId", "ITEM_CD");
|
|
code_map.put("item_cd", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//상수
|
|
param.put("parentCodeId","PHASE_CD");
|
|
code_map.put("phase_cd", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//주파수
|
|
param.put("parentCodeId","FRE_CD");
|
|
code_map.put("fre_cd", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//1차전압
|
|
param.put("parentCodeId","PD_CD1");
|
|
code_map.put("pd_cd1", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//결선
|
|
param.put("parentCodeId","PD_CD2");
|
|
code_map.put("pd_cd2", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//도체
|
|
param.put("parentCodeId","PD_CD3");
|
|
code_map.put("pd_cd3", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//디지털온도계
|
|
param.put("parentCodeId","PD_CD4");
|
|
code_map.put("pd_cd4", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//냉각팬
|
|
param.put("parentCodeId","PD_CD5");
|
|
code_map.put("pd_cd5", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//외함
|
|
param.put("parentCodeId","PD_CD6");
|
|
code_map.put("pd_cd6", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//효율
|
|
param.put("parentCodeId","PD_CD7");
|
|
code_map.put("pd_cd7", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//절연등급
|
|
param.put("parentCodeId","PD_CD8");
|
|
code_map.put("pd_cd8", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
//상태
|
|
param.put("parentCodeId","STS_CD");
|
|
code_map.put("status_cd", commonService.getJqGridSelectBoxJsonData("common.getCodeList2", param, "선택"));
|
|
|
|
request.setAttribute("code_map",code_map);
|
|
request.setAttribute("objid",objid);
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
return "/productmgmt/openproductmgmtExcelImportPopUp";
|
|
}
|
|
|
|
|
|
/**
|
|
* 업로드된 Excel File을 통해서 데이터를 Parsing하여 목록으로 return.
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/parsingExcelFile.do")
|
|
public String parsingExcelFile(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
ArrayList parsingPartList = new ArrayList();
|
|
try{
|
|
parsingPartList = (ArrayList)productMgmtService.parsingExcelFile(request, paramMap);
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
|
|
request.setAttribute("RESULT", CommonUtils.getJsonArray(parsingPartList));
|
|
return "/ajax/ajaxResult";
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 파트 저장
|
|
*/
|
|
@RequestMapping("/productmgmt/productApplySave.do")
|
|
@ResponseBody
|
|
public String productApplySave(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap){
|
|
String result = "";
|
|
try{
|
|
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
|
paramMap.put("CONNECTUSERID", CommonUtils.checkNull(person.getUserId()));
|
|
|
|
productMgmtService.productApplySave(request, paramMap);
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* PART 조회및 배포
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/ajxProductmgmtList.do")
|
|
public String ajxProductmgmtList(HttpServletRequest request, @RequestParam Map paramMap){
|
|
List resultList = new ArrayList();
|
|
try{
|
|
resultList = productMgmtService.ajxProductmgmtList(request,paramMap);
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
request.setAttribute("RESULT", CommonUtils.getJsonArray(resultList));
|
|
return "/ajax/ajaxResult";
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 제품 사양 리스트
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/getProductMgntUpgList.do")
|
|
public String getProductMgntUpgList(HttpServletRequest request, @RequestParam Map paramMap){
|
|
|
|
List list = null;
|
|
List productUpgNoList = new ArrayList();
|
|
List productList = null;
|
|
List upgCodeList = new ArrayList();
|
|
List upgNoList = null;
|
|
Map code_map = new HashMap();
|
|
try{
|
|
|
|
|
|
//list = productMgmtService.getProductMgntUpgList(request,paramMap);
|
|
//리스트 상단 사양 표시
|
|
productList = productMgmtService.getProductUpgCodeList(request,paramMap);
|
|
|
|
//matrix 만들기 위해 코드 리스트 가져오기
|
|
if(!"".equals(CommonUtils.nullToEmpty((String)paramMap.get("product_code")))){
|
|
upgCodeList = productMgmtService.getProductUpgcommcodeList(request,paramMap);
|
|
}
|
|
//난중에 지울것
|
|
//productUpgNoList = productMgmtService.getUpgMatrixList(request,paramMap);
|
|
|
|
if(upgCodeList.size() > 0 ){
|
|
|
|
for(int i=0;i<upgCodeList.size();i++){
|
|
List TempList = new ArrayList();
|
|
Map temp_map = new HashMap();
|
|
|
|
HashMap codeMap = (HashMap)upgCodeList.get(i);
|
|
HashMap param = new HashMap();
|
|
param.put("code", CommonUtils.checkNull((String)codeMap.get("UPG_CODE")));
|
|
param.put("product_code", CommonUtils.checkNull((String)paramMap.get("product_code")));
|
|
|
|
temp_map.put("UPG_NAME", CommonUtils.checkNull((String)codeMap.get("UPG_NAME")));
|
|
temp_map.put("UPG_CODE", CommonUtils.checkNull((String)codeMap.get("UPG_CODE")));
|
|
temp_map.put("CODE_ID", CommonUtils.checkNull((String)codeMap.get("CODE_ID")));
|
|
|
|
//코드값으로 하나씩가져오기
|
|
upgNoList = productMgmtService.getUpgOneMatrixList(request,param);
|
|
|
|
for(int j=0;j<upgNoList.size();j++){
|
|
HashMap upgMap = (HashMap)upgNoList.get(j);
|
|
|
|
temp_map.put("UPG_NO"+j, (String)upgMap.get("UPG_NO"));
|
|
}
|
|
System.out.println("temp_map ---->"+temp_map);
|
|
|
|
//TempList.add(temp_map);
|
|
productUpgNoList.add(temp_map);
|
|
}
|
|
|
|
}
|
|
|
|
/*int upgSize = 0;
|
|
if(!"".equals((String)paramMap.get("product_code"))){
|
|
productUpgNoList = productMgmtService.getUpgMatrixList(request,paramMap);
|
|
if(productUpgNoList.size() > 0){
|
|
upgSize = productUpgNoList.size() / productList.size();
|
|
|
|
System.out.println("upgSize -->"+upgSize);
|
|
for(int i=0;i<productUpgNoList.size();i++){
|
|
|
|
if(upgSize % (i+1) ==0){
|
|
|
|
System.out.println("123123213");
|
|
}
|
|
Map sqlmap = new HashMap();
|
|
HashMap masterMap = (HashMap)productUpgNoList.get(i);
|
|
|
|
masterMap.put("Asdasd"+"123", masterMap.get("Asdasd"));
|
|
}
|
|
|
|
}
|
|
}*/
|
|
|
|
code_map.put("product_code",commonService.bizMakeOptionList("", (String)paramMap.get("product_code"),"common.getProductCodeselect"));
|
|
request.setAttribute("code_map",code_map);
|
|
request.setAttribute("LIST", productUpgNoList);
|
|
request.setAttribute("productList", productList);
|
|
request.setAttribute("productListCnt", productList.size());
|
|
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
|
|
return "/productmgmt/productmgmtUpgList";
|
|
}
|
|
|
|
|
|
/**
|
|
* 제품 사양 등록
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/productMgmtUpgInsertFormPopup.do")
|
|
public String productMgmtUpgInsertFormPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map info = null;
|
|
Map code_map = new HashMap();
|
|
//List productUpgList = null;
|
|
String product_objid = CommonUtils.checkNull((String)paramMap.get("product_code"));
|
|
try{
|
|
// UPG마스터 조회
|
|
//info = productMgmtService.getProductMgntUpgInfo(paramMap);
|
|
//UPgLIst 조회
|
|
//productUpgList = productMgmtService.productUpgList(request,paramMap);
|
|
|
|
//제품구분
|
|
//code_map.put("product_category",commonService.bizMakeOptionList("0000001", (String)paramMap.get("product_category"),"common.getCodeselect"));
|
|
//code_map.put("product_code",commonService.UpgMakeOptionList("", (String)paramMap.get("product_code"),"common.getProductUpgMasterselect"));
|
|
code_map.put("product_code",commonService.bizMakeOptionList("", "","common.getProductMasterselect"));
|
|
request.setAttribute("code_map",code_map);
|
|
//request.setAttribute("productUpgList", productUpgList);
|
|
request.setAttribute("product_objid",product_objid);
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
//request.setAttribute("info", info);
|
|
|
|
return "/productmgmt/productMgmtUpgInsertFormPopup";
|
|
}
|
|
|
|
/**
|
|
* 제품 사양 등록
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/productMgmtUpgUpdateFormPopup.do")
|
|
public String productMgmtUpgUpdateFormPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map info = null;
|
|
Map code_map = new HashMap();
|
|
//List productUpgList = null;
|
|
String product_objid = CommonUtils.checkNull((String)paramMap.get("product_code"));
|
|
try{
|
|
// UPG마스터 조회
|
|
info = productMgmtService.getProductMgntUpgInfo(paramMap);
|
|
//UPgLIst 조회
|
|
//productUpgList = productMgmtService.productUpgList(request,paramMap);
|
|
|
|
//제품구분
|
|
//code_map.put("product_category",commonService.bizMakeOptionList("0000001", (String)paramMap.get("product_category"),"common.getCodeselect"));
|
|
//code_map.put("product_code",commonService.UpgMakeOptionList("", (String)paramMap.get("product_code"),"common.getProductUpgMasterselect"));
|
|
code_map.put("product_code",commonService.UpgMakeOptionList("", "","common.getProductUpgMasterselect"));
|
|
request.setAttribute("code_map",code_map);
|
|
request.setAttribute("info",info);
|
|
|
|
|
|
//request.setAttribute("productUpgList", productUpgList);
|
|
request.setAttribute("product_objid",product_objid);
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
//request.setAttribute("info", info);
|
|
|
|
return "/productmgmt/productMgmtUpgUpdateFormPopup";
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* UPG 삭제
|
|
*/
|
|
@RequestMapping("/productmgmt/productUpgDelete.do")
|
|
@ResponseBody
|
|
public String productUpgDelete(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
String result = "";
|
|
try{
|
|
result_map.put("RESULT", productMgmtService.productUpgDelete(request, paramMap));
|
|
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
|
|
/**
|
|
* 등록된 UPG가져오기
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@ResponseBody
|
|
@RequestMapping("/productmgmt/productUpgList.do")
|
|
public Map<String, Object> productUpgList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
List productUpgList = null;
|
|
try {
|
|
|
|
productUpgList = productMgmtService.getProductUpgDetailList(request,paramMap);
|
|
if(productUpgList.size() == 0){
|
|
productUpgList = productMgmtService.UpgCodeList(request,paramMap);
|
|
}
|
|
|
|
result_map.put("RESULT", productUpgList);
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
e.printStackTrace();
|
|
}
|
|
return result_map;
|
|
}
|
|
|
|
|
|
/**
|
|
* 등록된 UPG가져오기
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@ResponseBody
|
|
@RequestMapping("/productmgmt/getUpgNoList.do")
|
|
public Map<String, Object> getUpgNoList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
List UpgNoList = null;
|
|
try {
|
|
|
|
UpgNoList = productMgmtService.getUpgNoList(request,paramMap);
|
|
result_map.put("RESULT", UpgNoList);
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
e.printStackTrace();
|
|
}
|
|
return result_map;
|
|
}
|
|
|
|
|
|
/**
|
|
* 제품 사양 상세조회
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*//*
|
|
@RequestMapping("/productmgmt/productMgmtUpgUpdateFormPopup.do")
|
|
public String productMgmtUpgUpdateFormPopup(HttpSession session, HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map info = null;
|
|
try{
|
|
// 영업활동 조회
|
|
info = productMgmtService.getProductMgntUpgInfo(paramMap);
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
request.setAttribute("info", info);
|
|
|
|
return "/productmgmt/productMgmtUpgUpdateFormPopup";
|
|
}*/
|
|
|
|
|
|
/**
|
|
* 제품 사양 저장
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@ResponseBody
|
|
@RequestMapping("/productmgmt/saveproductMgmtUpgInfo.do")
|
|
public Map<String, Object> saveproductMgmtUpgInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
try {
|
|
result_map.put("RESULT", productMgmtService.saveproductMgmtUpgInfo(request, paramMap));
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
e.printStackTrace();
|
|
}
|
|
return result_map;
|
|
}
|
|
|
|
/**
|
|
* 제품사양 UPG 상세정보 저장
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/productmgmt/saveproductMgmtUpg.do")
|
|
@ResponseBody
|
|
public String saveproductMgmtUpg(HttpSession session, HttpServletRequest request, @RequestParam Map paramMap){
|
|
String result = "";
|
|
try{
|
|
productMgmtService.saveproductMgmtUpg(request, paramMap);
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
|
|
/**
|
|
* UPG 삭제
|
|
*/
|
|
@RequestMapping("/productmgmt/productUpgListDelete.do")
|
|
@ResponseBody
|
|
public String productUpgListDelete(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map result_map = new HashMap();
|
|
String result = "";
|
|
try{
|
|
result_map.put("RESULT", productMgmtService.productUpgListDelete(request, paramMap));
|
|
|
|
result = "SUCCESS";
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
result = "FAIL";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
|
|
|
|
@SuppressWarnings("rawtypes")
|
|
@RequestMapping("/productmgmt/productPriceHistory.do")
|
|
public String optionPriceHistory(HttpServletRequest request, @RequestParam Map paramMap){
|
|
List list = null;
|
|
|
|
try{
|
|
list = productMgmtService.productPriceHistory(request,paramMap);
|
|
request.setAttribute("LIST", list);
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
return "/productmgmt/productPriceHistory";
|
|
}
|
|
|
|
@RequestMapping("/productmgmt/deleteproductMngInfo.do")
|
|
public String deleteOptionMngInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
try {
|
|
request.setAttribute("RESULT", CommonUtils.getJsonMap(productMgmtService.deleteproductMngInfo(request, paramMap)) );
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return "/ajax/ajaxResult";
|
|
}
|
|
|
|
}
|