- 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
208 lines
6.3 KiB
Java
208 lines
6.3 KiB
Java
package com.pms.controller;
|
|
|
|
import java.io.File;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
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 com.pms.common.utils.CommonUtils;
|
|
import com.pms.common.utils.Constants;
|
|
import com.pms.service.AdminService;
|
|
import com.pms.service.ApprovalService;
|
|
import com.pms.service.CommonService;
|
|
import com.pms.service.CheckReportMngService;
|
|
|
|
@Controller
|
|
public class CheckReportMngController {
|
|
|
|
@Autowired
|
|
AdminService adminService;
|
|
|
|
@Autowired
|
|
CommonService commonService;
|
|
|
|
@Autowired
|
|
CheckReportMngService service;
|
|
|
|
@Autowired
|
|
ApprovalService approvalService;
|
|
|
|
/**
|
|
* 검수관리 목록조회
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/checkReportMngList.do")
|
|
public String checkReportMngList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
HashMap codeMap = new HashMap();
|
|
List list = service.getCheckReportMngList(request,paramMap);
|
|
try{
|
|
//거래처
|
|
codeMap.put("customerList",commonService.bizMakeOptionList(Constants.CUSTOMER_CD, (String)paramMap.get("search_customer"),"common.getCodeselect")); //고객사
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
|
|
request.setAttribute("codeMap", codeMap);
|
|
request.setAttribute("LIST", list);
|
|
return "/checkReportMng/checkReportMngList";
|
|
}
|
|
|
|
/**
|
|
* 중고관리 목록조회
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/checkReportMngListPopUp.do")
|
|
public String checkReportMngListPopUp(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
List list = service.getCheckReportMngList(request,paramMap);
|
|
request.setAttribute("LIST", list);
|
|
return "/checkReportMng/checkReportMngListPopUp";
|
|
}
|
|
|
|
/**
|
|
* 중고관리 삭제
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/deleteCheckReportMng.do")
|
|
public String deleteCheckReportMng(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
Map resultMap = service.deleteCheckReportMng(request,paramMap);
|
|
request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
|
return "/ajax/ajaxResult";
|
|
}
|
|
|
|
/**
|
|
* 중고관리 현황
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/checkReportMngDashBoard.do")
|
|
public String checkReportMngDashBoard(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
List list = new ArrayList();
|
|
try{
|
|
list = service.getCheckReportMngDashBoard(request,paramMap);
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
request.setAttribute("LIST", list);
|
|
return "/checkReportMng/checkReportMngDashBoard";
|
|
}
|
|
|
|
/**
|
|
* 중고관리 form
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/checkReportMngFormPopUp.do")
|
|
public String checkReportMngFormPopUp(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
HashMap resultMap = new HashMap();
|
|
HashMap codeMap = new HashMap();
|
|
ArrayList approvalList = new ArrayList();
|
|
|
|
try{
|
|
String objId = CommonUtils.checkNull(paramMap.get("OBJID"));
|
|
|
|
paramMap.put("objId",objId);
|
|
|
|
String division = CommonUtils.checkNull(paramMap.get("division"));
|
|
String status = CommonUtils.checkNull(paramMap.get("status"));
|
|
|
|
if(!"".equals(objId)){
|
|
resultMap = service.getCheckReportMngInfo(request, paramMap);
|
|
approvalList = approvalService.getApprovalLine(request, paramMap);
|
|
}else{
|
|
objId = CommonUtils.createObjId();
|
|
resultMap.put("OBJID", objId);
|
|
resultMap.put("DIVISION", division);
|
|
resultMap.put("STATUS", status);
|
|
}
|
|
|
|
//제작팀
|
|
ArrayList makingTeamList = commonService.getCodeList("","common.searchDeptList");
|
|
//거래처
|
|
codeMap.put("customerList",commonService.bizMakeOptionList(Constants.CUSTOMER_CD, (String)resultMap.get("CUSTOMER"),"common.getCodeselect")); //고객사
|
|
codeMap.put("makingTeamList",makingTeamList);
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
request.setAttribute("resultMap", resultMap);
|
|
request.setAttribute("codeMap", codeMap);
|
|
request.setAttribute("approvalList", approvalList);
|
|
return "/checkReportMng/checkReportMngFormPopUp";
|
|
}
|
|
|
|
/**
|
|
* 중고관리 저장
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/saveCheckReportMng.do")
|
|
public String saveCheckReportMng(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
HashMap resultMap = new HashMap();
|
|
try{
|
|
service.mergeCheckReportMng(request, paramMap);
|
|
resultMap.put("message", "저장되었습니다.");
|
|
}catch(Exception e){
|
|
resultMap.put("message", "오류가 발생하였습니다.");
|
|
e.printStackTrace();
|
|
}
|
|
request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
|
return "/ajax/ajaxResult";
|
|
}
|
|
|
|
/**
|
|
* 중고관리 detail
|
|
* @param request
|
|
* @param paramMap
|
|
* @return
|
|
*/
|
|
@RequestMapping("/checkReportMng/checkReportMngDetailPopUp.do")
|
|
public String checkReportMngDetailPopUp(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
|
HashMap resultMap = new HashMap();
|
|
ArrayList approvalList = new ArrayList();
|
|
|
|
try{
|
|
String objId = CommonUtils.checkNull(paramMap.get("OBJID"));
|
|
|
|
paramMap.put("objId",objId);
|
|
|
|
String division = CommonUtils.checkNull(paramMap.get("division"));
|
|
String status = CommonUtils.checkNull(paramMap.get("status"));
|
|
|
|
if(!"".equals(objId)){
|
|
//기존에 정보가 있을경우 금형관리 상세 정보와 일정 목록을 가져온다.
|
|
resultMap = service.getCheckReportMngInfo(request, paramMap);
|
|
approvalList = approvalService.getApprovalLine(request, paramMap);
|
|
}else{
|
|
objId = CommonUtils.createObjId();
|
|
resultMap.put("OBJID", objId);
|
|
resultMap.put("DIVISION", division);
|
|
resultMap.put("STATUS", status);
|
|
}
|
|
|
|
}catch(Exception e){
|
|
e.printStackTrace();
|
|
}
|
|
request.setAttribute("resultMap", resultMap);
|
|
request.setAttribute("approvalList", approvalList);
|
|
return "/checkReportMng/checkReportMngDetailPopUp";
|
|
}
|
|
}
|