Merge branch 'main' of http://10.dbnt.co.kr:50501/DBNT/geoinfo_eGov_work
commit
8fb9d954e8
|
|
@ -48,6 +48,7 @@ import geoinfo.drilling.home.service.DrillingHomeService;
|
|||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
import geoinfo.main.notice.service.NoticeService;
|
||||
import geoinfo.map.mapControl.service.MapControlService;
|
||||
import geoinfo.regi.selectClassInfo.service.SelectClassService;
|
||||
import geoinfo.regi.status.service.RegiPageService;
|
||||
|
|
@ -72,52 +73,63 @@ public class DrillingHomeController {
|
|||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@Autowired
|
||||
private NoticeService noticeService;
|
||||
|
||||
@RequestMapping(value = "/drilling/index.do")
|
||||
public String drillingInquiry(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
public ModelAndView drillingInquiry(@RequestParam HashMap<String, Object> params, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
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") );
|
||||
|
||||
model.addAttribute("userId", userId);
|
||||
model.addAttribute("cls", cls);
|
||||
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
String cls = MyUtil.getStringFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
mav.addObject("userId", userId);
|
||||
mav.addObject("cls", cls);
|
||||
|
||||
try {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "isError";
|
||||
}
|
||||
if (request.getSession().getAttribute("USERNAME") == null) {
|
||||
mav.setViewName("isError");
|
||||
return mav;
|
||||
}
|
||||
|
||||
model.put("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
||||
model.put("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
||||
model.put("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||
|
||||
mav.addObject("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
||||
mav.addObject("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
||||
mav.addObject("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
||||
|
||||
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
||||
|
||||
mav.addObject("masterCompanyCode", result.get("master_company_code"));
|
||||
|
||||
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
||||
|
||||
model.put("masterCompanyCode", result.get("master_company_code"));
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
"---------- BUG REPORTING END ----------" + "\n";
|
||||
System.out.println(strTxt);
|
||||
}
|
||||
|
||||
return "/drilling/home/drilling_index";
|
||||
mav.addObject("noticeList", noticeList);
|
||||
mav.setViewName("/drilling/home/drilling_index");
|
||||
return mav;
|
||||
}
|
||||
|
||||
// 지도에서 발주기관 소속 시추공 표시
|
||||
|
|
|
|||
|
|
@ -17,6 +17,28 @@
|
|||
<!-- //javascript -->
|
||||
|
||||
<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 -->
|
||||
<div id="wrap_container" class="main">
|
||||
<div id="content" class="wrap_cont">
|
||||
|
|
@ -124,11 +146,9 @@
|
|||
</div>
|
||||
<div class="recent-datas">
|
||||
<ul class="project-list">
|
||||
<li class="project-list-item">서비스 패치로 인한 중단 예정</li>
|
||||
<li class="project-list-item">2024년 건설 시추정보 홍보 브로슈어 배포</li>
|
||||
<li class="project-list-item">2023년 활용통계집 배포</li>
|
||||
<li class="project-list-item">종무식 안내</li>
|
||||
<li class="project-list-item">시스템 패치로 인한 간헐적 중단 안내</li>
|
||||
<c:forEach items="${noticeList}" var="noticeList">
|
||||
<li class="project-list-item"><a href="javascript:noticeDetail('${noticeList.idx }', 'drilling');">${noticeList.subject }</a></li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -117,22 +117,29 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
|
||||
|
||||
|
||||
let pagingEleHTML = `
|
||||
<ul>
|
||||
<li><a href="#"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-prev" class="page-prev"></a></li>
|
||||
`;
|
||||
|
||||
for( let i = 1; i<Math.floor(obj.count / nCount)+2; i++ ) {
|
||||
if( i === nPage ) {
|
||||
pagingEleHTML += `<li data-npage="` + i + `" class="page-button is-active"><a href="#">` + i + `</a></li>`;
|
||||
} else {
|
||||
pagingEleHTML += `<li data-npage="` + i + `" class="page-button" ><a href="#">` + i + `</a></li>`;
|
||||
}
|
||||
let firstIndicator = (Math.floor((nPage - 1) / nCount) * nCount) + 1; // 현재 페이지의 첫번째 페이지인디케이터 번호
|
||||
let lastIndicator = Math.ceil(nPage / nCount) * 10; // 현재 페이지의 마지막 페이지인디케이터 번호
|
||||
let totalIndicator = Math.ceil(obj.count / nCount); // 총 페이지인디케이터 번호
|
||||
let pagingEleHTML = "<ul>"
|
||||
if (!(firstIndicator-1) < 1) {
|
||||
pagingEleHTML += `<li data-npage="` + (firstIndicator-1) +`" class="page-button"><a href="#"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-prev" class="page-prev"></a></li>
|
||||
`;
|
||||
}
|
||||
|
||||
for( let i = firstIndicator; i<lastIndicator+1; i++ ) {
|
||||
if (i <= totalIndicator) {
|
||||
if( i === nPage ) {
|
||||
pagingEleHTML += `<li data-npage="` + i + `" class="page-button is-active"><a href="#">` + i + `</a></li>`;
|
||||
} else {
|
||||
pagingEleHTML += `<li data-npage="` + i + `" class="page-button" ><a href="#">` + i + `</a></li>`;
|
||||
}
|
||||
}
|
||||
}
|
||||
pagingEleHTML += `
|
||||
<li><a href="#"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-next" class="page-next"></a></li>
|
||||
</ul>
|
||||
`;
|
||||
|
||||
if (lastIndicator < totalIndicator) {
|
||||
pagingEleHTML += `<li data-npage="` + (lastIndicator+1) +`" class="page-button"><a href="#"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-next" class="page-next"></a></li>`;
|
||||
}
|
||||
pagingEleHTML += "</ul>";
|
||||
pagingEle.innerHTML = pagingEleHTML;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue