생산계획&실적관리 중간 커밋
This commit is contained in:
@@ -6,6 +6,7 @@ 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;
|
||||
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.pms.common.bean.PersonBean;
|
||||
import com.pms.common.service.BaseService;
|
||||
import com.pms.common.utils.CommonUtils;
|
||||
import com.pms.common.utils.Constants;
|
||||
@@ -1630,4 +1632,149 @@ public class ProductionPlanningController extends BaseService {
|
||||
}
|
||||
return "/productionplanning/mBomHistoryPopup";
|
||||
}
|
||||
|
||||
/**
|
||||
* 생산관리 -> 생산계획&실적관리 목록
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/productionplanning/prodPlanResultMgmtList.do")
|
||||
public String prodPlanResultMgmtList(HttpServletRequest request, @RequestParam Map paramMap){
|
||||
Map code_map = new HashMap();
|
||||
try{
|
||||
// 프로젝트번호
|
||||
code_map.put("project_no", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("project_no")), "common.getCusProjectNoList"));
|
||||
|
||||
// 제품구분
|
||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", CommonUtils.nullToEmpty((String)paramMap.get("product_code")), "common.getCodeselect"));
|
||||
|
||||
// 주문유형
|
||||
code_map.put("category_cd", commonService.bizMakeOptionList("0000167", CommonUtils.nullToEmpty((String)paramMap.get("category_code")), "common.getCodeselect"));
|
||||
|
||||
// 생산유형
|
||||
code_map.put("production_type_cd", commonService.bizMakeOptionList("0001832", CommonUtils.nullToEmpty((String)paramMap.get("production_type")), "common.getCodeselect"));
|
||||
|
||||
// 고객사
|
||||
code_map.put("customer_cd", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("customer_objid")), "common.getClientMngSupplySelect"));
|
||||
|
||||
request.setAttribute("code_map", code_map);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "/productionplanning/prodPlanResultMgmtList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 생산관리 -> 생산계획&실적관리 그리드 목록
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/productionplanning/prodPlanResultMgmtGridList.do")
|
||||
public Map prodPlanResultMgmtGridList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
commonService.selectListPagingNew("productionplanning.prodPlanResultMgmtGridList", request, paramMap);
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 생산계획 생성 팝업
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/productionplanning/prodPlanFormPopup.do")
|
||||
public String prodPlanFormPopup(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
Map code_map = new HashMap();
|
||||
try {
|
||||
String projectObjid = CommonUtils.nullToEmpty((String)paramMap.get("projectObjid"));
|
||||
String prodPlanObjid = CommonUtils.nullToEmpty((String)paramMap.get("prodPlanObjid"));
|
||||
|
||||
// 프로젝트번호
|
||||
code_map.put("project_no", commonService.bizMakeOptionList("", projectObjid, "common.getCusProjectNoList"));
|
||||
|
||||
// 제품구분
|
||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", "", "common.getCodeselect"));
|
||||
|
||||
// 주문유형
|
||||
code_map.put("category_cd", commonService.bizMakeOptionList("0000167", "", "common.getCodeselect"));
|
||||
|
||||
// 생산유형
|
||||
code_map.put("production_type_cd", commonService.bizMakeOptionList("0001832", "", "common.getCodeselect"));
|
||||
|
||||
// 고객사
|
||||
code_map.put("customer_cd", commonService.bizMakeOptionList("", "", "common.getClientMngSupplySelect"));
|
||||
|
||||
request.setAttribute("code_map", code_map);
|
||||
request.setAttribute("projectObjid", projectObjid);
|
||||
|
||||
// 수정 모드일 경우 기존 데이터 조회
|
||||
if(!"".equals(prodPlanObjid)) {
|
||||
Map resultMap = productionPlanningService.getProdPlanInfo(prodPlanObjid);
|
||||
request.setAttribute("resultMap", resultMap);
|
||||
request.setAttribute("actionType", "modify");
|
||||
} else {
|
||||
request.setAttribute("actionType", "regist");
|
||||
}
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "/productionplanning/prodPlanFormPopup";
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로젝트 정보 조회 (생산계획 폼용)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/productionplanning/getProdPlanProjectInfo.do")
|
||||
public Map getProdPlanProjectInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
try {
|
||||
Map info = productionPlanningService.getProdPlanProjectInfo(paramMap);
|
||||
resultMap.put("result", "success");
|
||||
resultMap.put("info", info);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
resultMap.put("result", "fail");
|
||||
resultMap.put("msg", "프로젝트 정보 조회 실패");
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 생산계획 저장
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/productionplanning/saveProdPlan.do")
|
||||
public Map saveProdPlan(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
try {
|
||||
HttpSession session = request.getSession();
|
||||
PersonBean person = (PersonBean) session.getAttribute(Constants.PERSON_BEAN);
|
||||
paramMap.put("userId", person.getUserId());
|
||||
|
||||
boolean success = productionPlanningService.saveProdPlan(paramMap);
|
||||
if(success) {
|
||||
resultMap.put("result", "success");
|
||||
resultMap.put("msg", "저장되었습니다.");
|
||||
} else {
|
||||
resultMap.put("result", "fail");
|
||||
resultMap.put("msg", "저장에 실패했습니다.");
|
||||
}
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
resultMap.put("result", "fail");
|
||||
resultMap.put("msg", "저장 중 오류가 발생했습니다.");
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user