130 lines
4.5 KiB
Java
130 lines
4.5 KiB
Java
package seed.com.gtm.cases;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
import org.apache.ibatis.logging.Log;
|
|
import org.apache.ibatis.logging.LogFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
|
import seed.com.gtm.code.CodeService;
|
|
import seed.com.gtm.seedfile.SeedFileService;
|
|
import seed.com.gtm.service.BaseService;
|
|
import seed.com.gtm.util.JSONView;
|
|
import seed.com.gtm.util.JSPUtil;
|
|
import seed.com.user.mypage.CaseAuthService;
|
|
import seed.com.user.mypage.CaseAuthVO;
|
|
|
|
|
|
@Controller
|
|
public class CaseController {
|
|
protected Log log = LogFactory.getLog(this.getClass());
|
|
|
|
@Autowired
|
|
private CodeService service;
|
|
|
|
@Autowired
|
|
private BaseService bservice;
|
|
|
|
@Autowired
|
|
private SeedFileService fileService;
|
|
|
|
@Autowired
|
|
private CaseAuthService caseAuthService;
|
|
|
|
/**
|
|
* 접수 -> 사건 이관
|
|
* @param request
|
|
* @param session
|
|
* @param map
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
@RequestMapping(value="/gtm/case/CaseMoveTotalAjax.do")
|
|
public ModelAndView searchMove(HttpServletRequest request, HttpSession session, Map<String, Object> map) throws Exception{
|
|
ModelAndView mavjson = new ModelAndView(new JSONView());
|
|
String message = "success";
|
|
EgovMap params;
|
|
params = JSPUtil.makeRequestParams(request, session, true);
|
|
session.setAttribute("siteIdx", "case");
|
|
|
|
//시큐어코딩 관련 파라미터는 삭제
|
|
params.remove("SpringSecurityFiltersecurityinterceptorFilterapplied");
|
|
params.remove("SpringSecuritySessionMgmtFilterApplied");
|
|
params.remove("springSecurityContext");
|
|
params.remove("SpringSecurityScpfApplied");
|
|
params.remove("springSecuritySavedRequest");
|
|
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseAppLcntMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseRespondentMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseAppAgentMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseResAgentMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseSttusMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseSubCntrSttusMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCaseRceptMoveInsert");
|
|
params.put("data", JSPUtil.fixNull(bservice.insert(params)));
|
|
|
|
params.put("sql", "trublreqstmng.trublreqstmngCfrnctrnsfer");
|
|
params.put("data", JSPUtil.fixNull(bservice.update(params)));
|
|
|
|
mavjson.addObject("message", message);
|
|
|
|
return mavjson;
|
|
}
|
|
|
|
@RequestMapping(value = "/gtm/login.do")
|
|
public ModelAndView getManagerLayOutPage(HttpServletRequest request,
|
|
HttpSession session, Map<String, Object> map
|
|
//, @PathVariable(value="pageFolder") String pageFolder,
|
|
// @PathVariable(value="pageName") String pageName
|
|
)throws Exception{
|
|
|
|
return new ModelAndView("redirect:/uat/uia/EgovLoginUsr.do");
|
|
}
|
|
|
|
/**
|
|
* 사용자 사건권한 승인 변경 처리
|
|
* @param request
|
|
* @param session
|
|
* @param map
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
@RequestMapping(value="/gtm/case/updateCaseAuthAjax.do")
|
|
public ResponseEntity<?> updateCaseAuthAjax(HttpServletRequest request, HttpSession session, CaseAuthVO caseAuthVO) throws Exception{
|
|
Map<String, String> returnData = new HashMap<String, String>();
|
|
try {
|
|
caseAuthService.updateCaseAuth(caseAuthVO);
|
|
returnData.put("result", "success");
|
|
returnData.put("msg", "변경되었습니다.");
|
|
|
|
}catch(Exception e) {
|
|
returnData.put("result", "faile");
|
|
returnData.put("msg", "실패하였습니다.");
|
|
}
|
|
return new ResponseEntity<>(returnData, HttpStatus.OK);
|
|
}
|
|
} |