공지사항 5개 불러오는 JSON 추가
parent
1ee135bf9c
commit
3997f3d262
|
|
@ -48,6 +48,7 @@ import geoinfo.drilling.home.service.DrillingHomeService;
|
||||||
import geoinfo.drilling.input.service.DrillingInputService;
|
import geoinfo.drilling.input.service.DrillingInputService;
|
||||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||||
import geoinfo.main.login.service.LoginService;
|
import geoinfo.main.login.service.LoginService;
|
||||||
|
import geoinfo.main.notice.service.NoticeService;
|
||||||
import geoinfo.map.mapControl.service.MapControlService;
|
import geoinfo.map.mapControl.service.MapControlService;
|
||||||
import geoinfo.regi.selectClassInfo.service.SelectClassService;
|
import geoinfo.regi.selectClassInfo.service.SelectClassService;
|
||||||
import geoinfo.regi.status.service.RegiPageService;
|
import geoinfo.regi.status.service.RegiPageService;
|
||||||
|
|
@ -73,51 +74,62 @@ public class DrillingHomeController {
|
||||||
@Autowired
|
@Autowired
|
||||||
DrillingInquiryService drillingInquiryService;
|
DrillingInquiryService drillingInquiryService;
|
||||||
|
|
||||||
@RequestMapping(value = "/drilling/index.do")
|
@Autowired
|
||||||
public String drillingInquiry(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
private NoticeService noticeService;
|
||||||
|
|
||||||
if(request.getSession().getAttribute("USERNAME") == null){
|
@RequestMapping(value = "/drilling/index.do")
|
||||||
return "redirect:/index.do";
|
public ModelAndView drillingInquiry(@RequestParam HashMap<String, Object> params, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
|
ModelAndView mav = new ModelAndView();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
params.put("firstIndex", 0);
|
||||||
|
params.put("recordCountPerPage", 5);
|
||||||
|
List<?> noticeList = noticeService.selectInfoList(params);
|
||||||
|
|
||||||
|
if (request.getSession().getAttribute("USERNAME") == null) {
|
||||||
|
mav.setViewName("redirect:/index.do");
|
||||||
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||||
|
String cls = MyUtil.getStringFromObject(request.getSession().getAttribute("CLS"));
|
||||||
|
|
||||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
mav.addObject("userId", userId);
|
||||||
String cls = MyUtil.getStringFromObject( request.getSession().getAttribute("CLS") );
|
mav.addObject("cls", cls);
|
||||||
|
|
||||||
model.addAttribute("userId", userId);
|
|
||||||
model.addAttribute("cls", cls);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (request.getSession().getAttribute("USERNAME") == null) {
|
||||||
|
mav.setViewName("isError");
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
if(request.getSession().getAttribute("USERNAME") == null){
|
mav.addObject("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
||||||
return "isError";
|
mav.addObject("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
||||||
}
|
mav.addObject("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||||
|
|
||||||
model.put("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
Map<String, Object> map = new HashMap<>();
|
||||||
model.put("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
||||||
model.put("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
|
||||||
|
|
||||||
|
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
mav.addObject("masterCompanyCode", result.get("master_company_code"));
|
||||||
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
|
||||||
|
|
||||||
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
|
||||||
|
|
||||||
model.put("masterCompanyCode", result.get("master_company_code"));
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
|
||||||
String strTxt =
|
String strTxt =
|
||||||
"---------- BUG REPORTING START ----------" + "\n" +
|
"---------- BUG REPORTING START ----------" + "\n" +
|
||||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||||
"params:[\n" + params.toString() + "\n]\n" +
|
"params:[\n" + params.toString() + "\n]\n" +
|
||||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||||
"---------- BUG REPORTING END ----------" + "\n" +
|
"---------- BUG REPORTING END ----------" + "\n";
|
||||||
"";
|
|
||||||
System.out.println(strTxt);
|
System.out.println(strTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "/drilling/home/drilling_index";
|
mav.addObject("noticeList", noticeList);
|
||||||
|
mav.setViewName("/drilling/home/drilling_index");
|
||||||
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지도에서 발주기관 소속 시추공 표시
|
// 지도에서 발주기관 소속 시추공 표시
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,28 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="drilling-index">
|
<div class="drilling-index">
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
function noticeDetail(idx, src) {
|
||||||
|
var documentFrmAction = "topMenuSelect.do?url=noticeView";
|
||||||
|
if( src ) {
|
||||||
|
documentFrmAction += "&" + "src=" + src;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.frm.idx.value = idx;
|
||||||
|
document.frm.action = documentFrmAction;
|
||||||
|
document.frm.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- 공지사항 상세화면 이동 -->
|
||||||
|
<form name="frm" method="post" action="/topMenuSelect.do?url=noticeView">
|
||||||
|
<input type="hidden" name="pageIndex" id="pageIndex" value="">
|
||||||
|
<input type="hidden" name="idx" id="idx" value="">
|
||||||
|
</form>
|
||||||
|
<c:out value="${masterCompanyCode}" />
|
||||||
<!-- wrap_container -->
|
<!-- wrap_container -->
|
||||||
<div id="wrap_container" class="main">
|
<div id="wrap_container" class="main">
|
||||||
<div id="content" class="wrap_cont">
|
<div id="content" class="wrap_cont">
|
||||||
|
|
@ -118,11 +140,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="recent-datas">
|
<div class="recent-datas">
|
||||||
<ul class="project-list">
|
<ul class="project-list">
|
||||||
<li class="project-list-item">서비스 패치로 인한 중단 예정</li>
|
<c:forEach items="${noticeList}" var="noticeList">
|
||||||
<li class="project-list-item">2024년 건설 시추정보 홍보 브로슈어 배포</li>
|
<li class="project-list-item"><a href="javascript:noticeDetail('${noticeList.idx }');">${noticeList.subject }</a></li>
|
||||||
<li class="project-list-item">2023년 활용통계집 배포</li>
|
</c:forEach>
|
||||||
<li class="project-list-item">종무식 안내</li>
|
|
||||||
<li class="project-list-item">시스템 패치로 인한 간헐적 중단 안내</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue