package kcc.kccadr.accdnt.ass.web;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import kcc.com.cmm.LoginVO;
import kcc.com.utl.fcc.service.EgovStringUtil;
import kcc.kccadr.accdnt.ai.service.AdjstIncidentVO;
import kcc.kccadr.accdnt.ass.service.AdjustSchStatusService;
import kcc.kccadr.accdnt.ass.service.AdjustSchStatusVO;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 대국민(사용자)
* 조정일정현황에 관한 controller 클래스를 정의한다.
* @author 김봉호
* @since 2021.08.11
* @version 1.0
* @see
*
*
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 수정내용
* ------- -------- ---------------------------
* 2021.08.11 김봉호 최초 생성
*
*
*/
@Controller
public class AdjustSchStatusController {
@Resource(name = "adjustSchStatusService")
private AdjustSchStatusService adjustSchStatusService;
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
/**
* 저정일정현황 달력 화면
*/
@RequestMapping("/web/kccadr/accdnt/ass/AdjustSchStatusList.do")
public String adjustSchStatusList(@ModelAttribute("statusVO") AdjustSchStatusVO statusVO, ModelMap model) throws Exception {
return "/web/kccadr/accdnt/ass/AdjustSchStatusList";
}
@RequestMapping(value = "/web/kccadr/accdnt/ajaxLoadData.do")
@ResponseBody
public List ajaxLoadData(@ModelAttribute("statusVO") AdjustSchStatusVO statusVO, ModelMap model) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
statusVO.setRpplId(userId);
return adjustSchStatusService.selectWebSchList(statusVO);
}
@RequestMapping(value = "/web/kccadr/accdnt/ass/popup/AdjustSchStatusDtailPop.do")
public String adjustSchStatusDtailPop(@ModelAttribute("statusVO") AdjustSchStatusVO statusVO, ModelMap model , HttpSession session) throws Exception {
AdjustSchStatusVO info = adjustSchStatusService.selectWebSchDetail(statusVO);
decryptInfomation(null, info);
model.addAttribute("info", info);
return "/web/kccadr/accdnt/ass/popup/AdjustSchStatusDtailPop";
}
@RequestMapping(value = "/web/kccadr/accdnt/ass/ajaxLoadDataTest.do")
@ResponseBody
public List