견문통계 개인실적탭 작업중.

master
강석 최 2023-04-05 18:11:24 +09:00
parent 17ad411b38
commit b2f516ce1e
16 changed files with 216 additions and 170 deletions

View File

@ -41,18 +41,15 @@ public class FaispInterceptor implements HandlerInterceptor {
@Override @Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
//페이지 렌더링 후 실행. //페이지 렌더링 후 실행.
if(request.getParameter("dashboardFlag") == null){ String uri = request.getRequestURI();
// 대시보드 ajax 조회 로그 저장시 키 중첩으로 오류 발생. UserRequestLog log = new UserRequestLog();
// 대시보드 ajax 조회는 로그를 쌓지 않음. log.setContactIp(Utils.getClientIP(request));
UserRequestLog log = new UserRequestLog(); log.setRequestUrl(uri);
log.setContactIp(Utils.getClientIP(request)); log.setRequestMethod(request.getMethod());
log.setRequestUrl(request.getRequestURI()); log.setSearchParams(request.getQueryString());
log.setRequestMethod(request.getMethod()); log.setHandlerDescription(((HandlerMethod) handler).toString());
log.setSearchParams(request.getQueryString()); log.setUserOrgan((String) request.getSession().getAttribute("userOrgan"));
log.setHandlerDescription(((HandlerMethod) handler).toString()); log.setUserBelong((String) request.getSession().getAttribute("belongValue"));
log.setUserOrgan((String) request.getSession().getAttribute("userOrgan")); userLogService.saveRequestLog(log);
log.setUserBelong((String) request.getSession().getAttribute("belongValue"));
userLogService.saveRequestLog(log);
}
} }
} }

View File

@ -22,6 +22,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
"/fileDisplay", "/fileDisplay",
"/css/**", "/css/**",
"/img/**", "/img/**",
"/font/**",
"/js/**", "/js/**",
"/vendor/**", "/vendor/**",
"/Crosseditor/**", "/Crosseditor/**",

View File

@ -1,33 +1,23 @@
package com.dbnt.faisp.main.fpiMgt.affair; package com.dbnt.faisp.main.fpiMgt.affair;
import com.dbnt.faisp.config.FileInfo;
import com.dbnt.faisp.main.authMgt.service.AuthMgtService; import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
import com.dbnt.faisp.main.codeMgt.model.CodeMgt; import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.main.fpiMgt.affair.model.AffairBoard; import com.dbnt.faisp.main.fpiMgt.affair.model.AffairBoard;
import com.dbnt.faisp.main.fpiMgt.affair.model.AffairFile;
import com.dbnt.faisp.main.fpiMgt.affair.model.AffairRating; import com.dbnt.faisp.main.fpiMgt.affair.model.AffairRating;
import com.dbnt.faisp.main.fpiMgt.affair.model.TypeStatistics; import com.dbnt.faisp.main.fpiMgt.affair.model.TypeStatistics;
import com.dbnt.faisp.main.fpiMgt.affair.service.AffairService; import com.dbnt.faisp.main.fpiMgt.affair.service.AffairService;
import com.dbnt.faisp.main.organMgt.service.OrganConfigService; import com.dbnt.faisp.main.organMgt.service.OrganConfigService;
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
import com.dbnt.faisp.util.Utils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.io.*;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@ -184,8 +174,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
@PostMapping("/saveAffair") @PostMapping("/saveAffair")
public Integer saveAffair(AffairBoard affairBoard, public Integer saveAffair(AffairBoard affairBoard,
MultipartHttpServletRequest request, MultipartHttpServletRequest request,
@RequestParam(value = "fileSeq", required = false) List<Integer> deleteFileSeq){ @RequestParam(value = "fileSeq", required = false) List<Integer> deleteFileSeq){
affairBoard.setMultipartFileList(request.getMultiFileMap().get("uploadFiles")); affairBoard.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
return affairService.saveAffairBoard(affairBoard, deleteFileSeq); return affairService.saveAffairBoard(affairBoard, deleteFileSeq);
} }
@ -210,44 +200,44 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
@GetMapping("/statistics") @GetMapping("/statistics")
public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){ public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/affairStatistics"); ModelAndView mav = new ModelAndView("igActivities/fpiMgt/statistics/affairStatistics");
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList()); mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("searchParams", typeStatistics); mav.addObject("searchParams", typeStatistics);
return mav; return mav;
} }
@PostMapping("/fieldStatistics") @PostMapping("/fieldStatistics")
public ModelAndView fieldStatistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){ public ModelAndView fieldStatistics(TypeStatistics typeStatistics){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/fieldStatistics"); ModelAndView mav = new ModelAndView("igActivities/fpiMgt/statistics/fieldStatistics");
List<TypeStatistics> totalList = affairService.selectStatusTotal(typeStatistics); List<TypeStatistics> totalList = affairService.selectStatusTotal(typeStatistics);
List<TypeStatistics> type1List = affairService.selecType1ListCnt(typeStatistics); List<TypeStatistics> type1List = affairService.selectType1ListCnt(typeStatistics);
List<TypeStatistics> type2List = affairService.selecType2ListCnt(typeStatistics); List<TypeStatistics> type2List = affairService.selectType2ListCnt(typeStatistics);
List<TypeStatistics> type3List = affairService.selecType3ListCnt(typeStatistics); List<TypeStatistics> type3List = affairService.selectType3ListCnt(typeStatistics);
List<TypeStatistics> type4List = affairService.selecType4ListCnt(typeStatistics); List<TypeStatistics> type4List = affairService.selectType4ListCnt(typeStatistics);
if(!totalList.isEmpty()) { if(!totalList.isEmpty()) {
TypeStatistics total = new TypeStatistics(); TypeStatistics total = new TypeStatistics();
total.setItemValue("누계"); total.setItemValue("누계");
total.setWrtOrgan("total"); total.setWrtOrgan("total");
total.setCnt(0); total.setCnt(0);
for(TypeStatistics stat: totalList) { for(TypeStatistics stat: totalList) {
total.setCnt(total.getCnt()+stat.getCnt()); total.setCnt(total.getCnt()+stat.getCnt());
} }
totalList.add(total); totalList.add(total);
} }
mav.addObject("totalList", totalList); mav.addObject("totalList", totalList);
if(typeStatistics.getCategory1() != null) { if(typeStatistics.getCategory1() != null) {
type1List = addTotalRow(typeStatistics.getCategory1(), type1List); addTotalRow(typeStatistics.getCategory1(), type1List);
}
if(typeStatistics.getCategory2() != null) {
addTotalRow(typeStatistics.getCategory2(), type2List);
}
if(typeStatistics.getCategory3() != null) {
addTotalRow(typeStatistics.getCategory3(), type3List);
}
if(typeStatistics.getCategory4() != null) {
addTotalRow(typeStatistics.getCategory4(), type4List);
} }
if(typeStatistics.getCategory2() != null) {
type2List = addTotalRow(typeStatistics.getCategory2(), type2List);
}
if(typeStatistics.getCategory3() != null) {
type3List = addTotalRow(typeStatistics.getCategory3(), type3List);
}
if(typeStatistics.getCategory4() != null) {
type4List = addTotalRow(typeStatistics.getCategory4(), type4List);
}
mav.addObject("type1List", type1List); mav.addObject("type1List", type1List);
mav.addObject("type2List", type2List); mav.addObject("type2List", type2List);
mav.addObject("type3List", type3List); mav.addObject("type3List", type3List);
@ -255,28 +245,28 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
mav.addObject("searchParams", typeStatistics); mav.addObject("searchParams", typeStatistics);
return mav; return mav;
} }
@PostMapping("/ratingStatistics") @PostMapping("/ratingStatistics")
public ModelAndView ratingStatistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){ public ModelAndView ratingStatistics(TypeStatistics typeStatistics){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/ratingStatistics"); ModelAndView mav = new ModelAndView("igActivities/fpiMgt/statistics/ratingStatistics");
List<TypeStatistics> totalList = affairService.selectRatingStatusTotal(typeStatistics); List<TypeStatistics> totalList = affairService.selectRatingStatusTotal(typeStatistics);
List<TypeStatistics> sangboCntList = affairService.selectSangboTotal(typeStatistics); List<TypeStatistics> sangboCntList = affairService.selectSangboTotal(typeStatistics);
List<TypeStatistics> arrCntList = affairService.selectArrCntList(typeStatistics); List<TypeStatistics> arrCntList = affairService.selectArrCntList(typeStatistics);
if(!totalList.isEmpty()) { if(!totalList.isEmpty()) {
TypeStatistics total = new TypeStatistics(); TypeStatistics total = new TypeStatistics();
total.setItemValue("누계"); total.setItemValue("누계");
total.setWrtOrgan("total"); total.setWrtOrgan("total");
total.setCnt(0); total.setCnt(0);
for(TypeStatistics stat: totalList) { for(TypeStatistics stat: totalList) {
total.setCnt(total.getCnt()+stat.getCnt()); total.setCnt(total.getCnt()+stat.getCnt());
} }
totalList.add(total); totalList.add(total);
} }
if(typeStatistics.getSangbo() != null) { if(typeStatistics.getSangbo() != null) {
sangboCntList = addTotalRow(typeStatistics.getSangbo(), sangboCntList); addTotalRow(typeStatistics.getSangbo(), sangboCntList);
} }
if(typeStatistics.getRating() != null) { if(typeStatistics.getRating() != null) {
arrCntList = addTotalRow(typeStatistics.getRating(), arrCntList); addTotalRow(typeStatistics.getRating(), arrCntList);
} }
mav.addObject("totalList", totalList); mav.addObject("totalList", totalList);
mav.addObject("sangboList", sangboCntList); mav.addObject("sangboList", sangboCntList);
@ -285,25 +275,31 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
return mav; return mav;
} }
private List<TypeStatistics> addTotalRow(List<String> type, List<TypeStatistics> typeList){ @PostMapping("/personalStatistics")
Map<String, Integer> totalMap = new HashMap<>(); public ModelAndView personalStatistics(TypeStatistics typeStatistics){
for(String t: type) { ModelAndView mav = new ModelAndView("igActivities/fpiMgt/statistics/personalStatistics");
totalMap.put(t, 0); List<TypeStatistics> totalList = affairService.selectPersonalStatusTotal(typeStatistics);
} mav.addObject("totalList", totalList);
for(TypeStatistics t: typeList) { mav.addObject("searchParams", typeStatistics);
totalMap.put(t.getAffairType(), totalMap.get(t.getAffairType())+t.getCnt()); return mav;
} }
Iterator<String> keys = totalMap.keySet().iterator();
while(keys.hasNext()) { private void addTotalRow(List<String> type, List<TypeStatistics> typeList){
String affairType = keys.next(); Map<String, Integer> totalMap = new HashMap<>();
Integer cnt = totalMap.get(affairType); for(String t: type) {
TypeStatistics total = new TypeStatistics(); totalMap.put(t, 0);
total.setWrtOrgan("total"); }
total.setAffairType(affairType); for(TypeStatistics t: typeList) {
total.setCnt(cnt); totalMap.put(t.getAffairType(), totalMap.get(t.getAffairType())+t.getCnt());
typeList.add(total); }
} for (String affairType : totalMap.keySet()) {
return typeList; Integer cnt = totalMap.get(affairType);
TypeStatistics total = new TypeStatistics();
total.setWrtOrgan("total");
total.setAffairType(affairType);
total.setCnt(cnt);
typeList.add(total);
}
} }

View File

@ -21,13 +21,13 @@ public interface AffairMapper {
List<TypeStatistics> selectStatusTotal(TypeStatistics typeStatistics); List<TypeStatistics> selectStatusTotal(TypeStatistics typeStatistics);
List<TypeStatistics> selecType1ListCnt(TypeStatistics typeStatistics); List<TypeStatistics> selectType1ListCnt(TypeStatistics typeStatistics);
List<TypeStatistics> selecType2ListCnt(TypeStatistics typeStatistics); List<TypeStatistics> selectType2ListCnt(TypeStatistics typeStatistics);
List<TypeStatistics> selecType3ListCnt(TypeStatistics typeStatistics); List<TypeStatistics> selectType3ListCnt(TypeStatistics typeStatistics);
List<TypeStatistics> selecType4ListCnt(TypeStatistics typeStatistics); List<TypeStatistics> selectType4ListCnt(TypeStatistics typeStatistics);
List<TypeStatistics> selectRatingStatusTotal(TypeStatistics typeStatistics); List<TypeStatistics> selectRatingStatusTotal(TypeStatistics typeStatistics);

View File

@ -39,16 +39,7 @@ public class TypeStatistics extends BaseModel {
private List<String> organList; private List<String> organList;
@Transient @Transient
private List<String> sangbo; private List<String> sangbo;
@Override
public String toString() {
return "TypeStatistics [wrtOrgan=" + wrtOrgan + ", itemValue=" + itemValue + ", affairType=" + affairType + ", cnt="
+ cnt + ", rating=" + rating + ", category1=" + category1 + ", category2=" + category2 + ", category3="
+ category3 + ", category4=" + category4 + ", organList=" + organList + "]";
}
} }

View File

@ -294,35 +294,6 @@ public class AffairService extends BaseService { // 견문보고
public List<FileInfo> selectAffairFileList(List<Integer> affairKeyList) { public List<FileInfo> selectAffairFileList(List<Integer> affairKeyList) {
return affairFileRepository.findByAffairKeyIn(affairKeyList); return affairFileRepository.findByAffairKeyIn(affairKeyList);
} }
public List<TypeStatistics> selectStatusTotal(TypeStatistics typeStatistics) {
return affairMapper.selectStatusTotal(typeStatistics);
}
public List<TypeStatistics> selecType1ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selecType1ListCnt(typeStatistics);
}
public List<TypeStatistics> selecType2ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selecType2ListCnt(typeStatistics);
}
public List<TypeStatistics> selecType3ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selecType3ListCnt(typeStatistics);
}
public List<TypeStatistics> selecType4ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selecType4ListCnt(typeStatistics);
}
public List<TypeStatistics> selectRatingStatusTotal(TypeStatistics typeStatistics) {
return affairMapper.selectRatingStatusTotal(typeStatistics);
}
public List<TypeStatistics> selectSangboTotal(TypeStatistics typeStatistics) {
return affairMapper.selectSangboTotal(typeStatistics);
}
public List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics) {
return affairMapper.selectArrCntList(typeStatistics);
}
public AffairBoard getPrintTypeAffairBoard(AffairBoard affair, Map<String, List<CodeMgt>> codeMap) { public AffairBoard getPrintTypeAffairBoard(AffairBoard affair, Map<String, List<CodeMgt>> codeMap) {
affair.setWrtPart(Utils.searchCodeValue(affair.getWrtPart(), codeMap.get(affair.getWrtOrgan()))); affair.setWrtPart(Utils.searchCodeValue(affair.getWrtPart(), codeMap.get(affair.getWrtOrgan())));
@ -382,4 +353,37 @@ public class AffairService extends BaseService { // 견문보고
return affairRating; return affairRating;
} }
public List<TypeStatistics> selectStatusTotal(TypeStatistics typeStatistics) {
return affairMapper.selectStatusTotal(typeStatistics);
}
public List<TypeStatistics> selectType1ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selectType1ListCnt(typeStatistics);
}
public List<TypeStatistics> selectType2ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selectType2ListCnt(typeStatistics);
}
public List<TypeStatistics> selectType3ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selectType3ListCnt(typeStatistics);
}
public List<TypeStatistics> selectType4ListCnt(TypeStatistics typeStatistics) {
return affairMapper.selectType4ListCnt(typeStatistics);
}
public List<TypeStatistics> selectRatingStatusTotal(TypeStatistics typeStatistics) {
return affairMapper.selectRatingStatusTotal(typeStatistics);
}
public List<TypeStatistics> selectSangboTotal(TypeStatistics typeStatistics) {
return affairMapper.selectSangboTotal(typeStatistics);
}
public List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics) {
return affairMapper.selectArrCntList(typeStatistics);
}
public List<TypeStatistics> selectPersonalStatusTotal(TypeStatistics typeStatistics) {
return new ArrayList<>();
}
} }

View File

@ -187,7 +187,7 @@ public class UserInfo extends BaseModel implements UserDetails{
@Override @Override
public boolean isEnabled() { public boolean isEnabled() {
return userStatus.equals("USC003"); return userStatus.equals("USC003")||userStatus.equals("USC007");
} }
@Override @Override

View File

@ -329,7 +329,7 @@
order by wrt_organ asc order by wrt_organ asc
</select> </select>
<select id="selecType1ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics"> <select id="selectType1ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics">
select b.item_cd as wrt_organ , select b.item_cd as wrt_organ ,
b.item_value, b.item_value,
a.item_cd as affair_type, a.item_cd as affair_type,
@ -367,7 +367,7 @@
order by wrt_organ,affair_type asc order by wrt_organ,affair_type asc
</select> </select>
<select id="selecType2ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics"> <select id="selectType2ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics">
select b.item_cd as wrt_organ , select b.item_cd as wrt_organ ,
b.item_value, b.item_value,
a.item_cd as affair_type, a.item_cd as affair_type,
@ -405,7 +405,7 @@
order by wrt_organ,affair_type asc order by wrt_organ,affair_type asc
</select> </select>
<select id="selecType3ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics"> <select id="selectType3ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics">
select b.item_cd as wrt_organ , select b.item_cd as wrt_organ ,
b.item_value, b.item_value,
a.item_cd as affair_type, a.item_cd as affair_type,
@ -443,7 +443,7 @@
order by wrt_organ,affair_type asc order by wrt_organ,affair_type asc
</select> </select>
<select id="selecType4ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics"> <select id="selectType4ListCnt" resultType="TypeStatistics" parameterType="TypeStatistics">
select b.item_cd as wrt_organ , select b.item_cd as wrt_organ ,
b.item_value, b.item_value,
a.item_cd as affair_type, a.item_cd as affair_type,

View File

@ -235,7 +235,7 @@
} }
@font-face { @font-face {
font-family: 'GmarketSansMedium'; font-family: 'GmarketSansMedium';
src: url("/img/GmarketSansTTFMedium.ttf"); src: url("/font/GmarketSansTTFMedium.ttf");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }

View File

@ -55,7 +55,7 @@ div {margin:0px;padding:0px;box-sizing:border-box;}
@font-face { @font-face {
font-family: 'Montserrat-Bold'; font-family: 'Montserrat-Bold';
src: url("/font/Montserrat-Bold.ttf"); src: url("../../font/Montserrat-Bold.ttf");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }

View File

@ -22,29 +22,6 @@ $(document).on('click', '#fieldTab', function (){
goFieldStatistics(); goFieldStatistics();
}) })
function goFieldStatistics(){
const formData = new FormData($("#searchFm")[0]);
$.ajax({
url: '/affair/fieldStatistics',
data: formData,
type: 'POST',
dataType:"html",
contentType: false,
processData: false,
success: function(html){
$("#statisticsBody").empty().append(html)
$("#statisticsBody").show();
$(".statisticsMenu").hide();
},
error:function(e){
ajaxErrorAction(e);
}
});
}
$(document).on('click', '#ratingSearch', function (){ $(document).on('click', '#ratingSearch', function (){
if($('input:checkbox[name=rating]:checked').length < 1){ if($('input:checkbox[name=rating]:checked').length < 1){
alert("평가항목을 선택해주세요"); alert("평가항목을 선택해주세요");
@ -53,15 +30,45 @@ $(document).on('click', '#ratingSearch', function (){
goRatingStatistics(); goRatingStatistics();
}) })
$(document).on('click', '#ratingTab', function (){ $(document).on('click', '#ratingTab', function (){
if($('input:checkbox[name=rating]:checked').length < 1){ if($('input:checkbox[name=rating]:checked').length < 1){
alert("평가항목을 선택해주세요"); alert("평가항목을 선택해주세요");
return false; return false;
} }
goRatingStatistics(); goRatingStatistics();
}) })
$(document).on('click', '#personalSearch', function (){
goPersonalStatistics();
})
$(document).on('click', '#personalTab', function (){
goPersonalStatistics();
})
function goFieldStatistics(){
contentFade("in")
const formData = new FormData($("#searchFm")[0]);
$.ajax({
url: '/affair/fieldStatistics',
data: formData,
type: 'POST',
dataType:"html",
contentType: false,
processData: false,
success: function(html){
contentFade("out")
$("#statisticsBody").empty().append(html).show();
$(".statisticsMenu").hide();
},
error:function(e){
contentFade("out")
ajaxErrorAction(e);
}
});
}
function goRatingStatistics(){ function goRatingStatistics(){
contentFade("in")
const formData = new FormData($("#searchFm")[0]); const formData = new FormData($("#searchFm")[0]);
$.ajax({ $.ajax({
url: '/affair/ratingStatistics', url: '/affair/ratingStatistics',
@ -71,13 +78,34 @@ function goRatingStatistics(){
contentType: false, contentType: false,
processData: false, processData: false,
success: function(html){ success: function(html){
$("#statisticsBody").empty().append(html) contentFade("out")
$("#statisticsBody").show(); $("#statisticsBody").empty().append(html).show();
$(".statisticsMenu").hide(); $(".statisticsMenu").hide();
}, },
error:function(e){ error:function(e){
contentFade("out")
ajaxErrorAction(e);
}
});
}
function goPersonalStatistics(){
contentFade("in")
const formData = new FormData($("#searchFm")[0]);
$.ajax({
url: '/affair/personalStatistics',
data: formData,
type: 'GET',
dataType:"html",
contentType: false,
processData: false,
success: function(html){
contentFade("out")
$("#statisticsBody").empty().append(html).show();
$(".statisticsMenu").hide();
},
error:function(e){
contentFade("out")
ajaxErrorAction(e); ajaxErrorAction(e);
} }
}); });

View File

@ -3,7 +3,7 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}"> layout:decorate="~{layout/layout}">
<th:block layout:fragment="script"> <th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/affair/statistics.js}"></script> <script type="text/javascript" th:src="@{/js/igActivities/statistics.js}"></script>
</th:block> </th:block>
<th:block layout:fragment="css"> <th:block layout:fragment="css">
<link rel="stylesheet" th:href="@{/css/affair/affair.css}"> <link rel="stylesheet" th:href="@{/css/affair/affair.css}">
@ -133,6 +133,7 @@
<div class="col-1 d-grid gap-2"> <div class="col-1 d-grid gap-2">
<button type="button" id="fieldSearch" class="btn btn-primary">분야별 검색</button> <button type="button" id="fieldSearch" class="btn btn-primary">분야별 검색</button>
<button type="button" id="ratingSearch" class="btn btn-primary">평가별 검색</button> <button type="button" id="ratingSearch" class="btn btn-primary">평가별 검색</button>
<button type="button" id="personalSearch" class="btn btn-primary">개인실적 검색</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -5,6 +5,9 @@
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link" id="ratingTab" data-bs-toggle="tab" type="button" role="tab">평가별</button> <button class="nav-link" id="ratingTab" data-bs-toggle="tab" type="button" role="tab">평가별</button>
</li> </li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="personalTab" data-bs-toggle="tab" type="button" role="tab">개인실적</button>
</li>
</ul> </ul>
<div class="tab-content bg-white border border-top-0 p-2"> <div class="tab-content bg-white border border-top-0 p-2">
<div class="row justify-content-end"> <div class="row justify-content-end">

View File

@ -0,0 +1,22 @@
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="fieldTab" data-bs-toggle="tab" type="button" role="tab">분야별</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="ratingTab" data-bs-toggle="tab" type="button" role="tab">평가별</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="personalTab" data-bs-toggle="tab" type="button" role="tab">개인실적</button>
</li>
</ul>
<div class="tab-content bg-white border border-top-0 p-2">
<div class="row justify-content-end">
<div class="col-auto">
<button class="btn btn-primary" id="showMenu">검색조건열기</button>
<button class="btn btn-success" id="fieldDownExcel">엑셀다운</button>
</div>
</div>
<div class="row pt-2" id="statisticsDiv">
</div>
</div>

View File

@ -5,6 +5,9 @@
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link active" id="ratingTab" data-bs-toggle="tab" type="button" role="tab">평가별</button> <button class="nav-link active" id="ratingTab" data-bs-toggle="tab" type="button" role="tab">평가별</button>
</li> </li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="personalTab" data-bs-toggle="tab" type="button" role="tab">개인실적</button>
</li>
</ul> </ul>
<div class="tab-content bg-white border border-top-0 p-2"> <div class="tab-content bg-white border border-top-0 p-2">
<div class="row justify-content-end"> <div class="row justify-content-end">

View File

@ -25,9 +25,9 @@
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${activeTab ne 'dashboard'?'active':''}" id="infoTab" data-bs-toggle="tab" data-bs-target="#infoTabPanel" type="button" role="tab" aria-controls="infoTabPanel" th:aria-selected="${activeTab ne 'dashboard'?'true':'false'}">개인정보</button> <button class="nav-link" th:classappend="${activeTab ne 'dashboard'?'active':''}" id="infoTab" data-bs-toggle="tab" data-bs-target="#infoTabPanel" type="button" role="tab" aria-controls="infoTabPanel" th:aria-selected="${activeTab ne 'dashboard'?'true':'false'}">개인정보</button>
</li> </li>
<li class="nav-item" role="presentation"> <!--<li class="nav-item" role="presentation">
<button class="nav-link disabled" th:classappend="${activeTab eq 'dashboard'?'active':''}" id="dashboardTab" data-bs-toggle="tab" data-bs-target="#dashboardTabPanel" type="button" role="tab" aria-controls="dashboardTabPanel" th:aria-selected="${activeTab eq 'dashboard'?'true':'false'}">대시보드</button> <button class="nav-link disabled" th:classappend="${activeTab eq 'dashboard'?'active':''}" id="dashboardTab" data-bs-toggle="tab" data-bs-target="#dashboardTabPanel" type="button" role="tab" aria-controls="dashboardTabPanel" th:aria-selected="${activeTab eq 'dashboard'?'true':'false'}">대시보드</button>
</li> </li>-->
</ul> </ul>
<div class="tab-content bg-white border border-top-0 p-2"> <div class="tab-content bg-white border border-top-0 p-2">
<div class="tab-pane fade p-2" th:classappend="${activeTab ne 'dashboard'?'show active':''}" id="infoTabPanel" role="tabpanel" aria-labelledby="infoTabPanel" tabindex="0"> <div class="tab-pane fade p-2" th:classappend="${activeTab ne 'dashboard'?'show active':''}" id="infoTabPanel" role="tabpanel" aria-labelledby="infoTabPanel" tabindex="0">