jiHyung 2022-10-27 08:57:36 +09:00
commit 66d1fccd26
37 changed files with 1595 additions and 451 deletions

View File

@ -1,5 +1,6 @@
package com.dbnt.faisp.config;
import com.dbnt.faisp.faRpt.service.FaRptService;
import com.dbnt.faisp.fpiMgt.affair.service.AffairService;
import com.dbnt.faisp.fpiMgt.affairPlan.service.PlanService;
import com.dbnt.faisp.fpiMgt.affairResult.service.ResultService;
@ -19,6 +20,7 @@ import java.net.URLEncoder;
@RequiredArgsConstructor
public class FileController {
private final FaRptService faRptService;
private final PlanService planService;
private final PublicBoardService publicBoardService;
private final AffairService affairService;
@ -33,6 +35,9 @@ public class FileController {
Integer fileSeq) {
FileInfo downloadFile = null;
switch (board){
case "faRpt":
downloadFile = faRptService.selectFaRptFile(parentKey, fileSeq);
break;
case "affairPlan":
downloadFile = planService.selectPlanFile(parentKey, fileSeq);
break;

View File

@ -14,6 +14,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@RestController
@ -44,14 +45,17 @@ public class FaRptController {
if(faRptBoard.getActiveTab().equals("send")){
faRptBoard.setWrtUserSeq(loginUser.getUserSeq());
}else if(faRptBoard.getActiveTab().equals("receive")){
faRptBoard.setStatus("DST007");
faRptBoard.setReceiveUserSeq(loginUser.getUserSeq());
}else if(faRptBoard.getActiveTab().equals("all") && accessAuth.equals("ACC003")){
faRptBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
}else if(faRptBoard.getActiveTab().equals("all")){
faRptBoard.setActiveTab("send");
faRptBoard.setWrtUserSeq(loginUser.getUserSeq());
}
if(accessAuth.equals("ACC003")){
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
}
faRptBoard.setQueryInfo();
mav.addObject("faRptList", faRptService.selectFaRptList(faRptBoard));
@ -65,11 +69,21 @@ public class FaRptController {
public ModelAndView faRptEditModal(@AuthenticationPrincipal UserInfo loginUser, FaRptBoard faRptBoard){
ModelAndView mav = new ModelAndView("faRpt/faRptEditModal");
if(faRptBoard.getFaRptKey()!=null){
faRptBoard = faRptService.selectFaRptBoard(faRptBoard.getFaRptKey());
faRptBoard = faRptService.selectFaRptBoard(faRptBoard.getFaRptKey(), null);
}else{
if(faRptBoard.getRefKey()!=null){
FaRptReadUser readUser = new FaRptReadUser();
readUser.setUserSeq(faRptBoard.getWrtUserSeq());
readUser.setOgCd(faRptBoard.getWrtOrgan());
readUser.setOfcCd(faRptBoard.getWrtPart());
readUser.setTitleCd(faRptBoard.getWrtUserGrd());
readUser.setUserNm(faRptBoard.getWrtUserNm());
faRptBoard.setReadUserList(new ArrayList<>());
faRptBoard.getReadUserList().add(readUser);
}
faRptBoard.setWrtUserSeq(loginUser.getUserSeq());
faRptBoard.setWrtOrgan(loginUser.getOgCd());
faRptBoard.setWrtPart(loginUser.getOfcCd());
faRptBoard.setWrtUserSeq(loginUser.getUserSeq());
faRptBoard.setWrtUserGrd(loginUser.getTitleCd());
faRptBoard.setWrtUserNm(loginUser.getUserNm());
faRptBoard.setWrtDt(LocalDateTime.now());
@ -82,8 +96,7 @@ public class FaRptController {
@GetMapping("/faRptViewModal")
public ModelAndView faRptViewModal(@AuthenticationPrincipal UserInfo loginUser, FaRptBoard faRptBoard){
ModelAndView mav = new ModelAndView("faRpt/faRptViewModal");
faRptBoard = faRptService.selectFaRptBoard(faRptBoard.getFaRptKey());
mav.addObject("faRpt", faRptBoard);
mav.addObject("faRpt", faRptService.selectFaRptBoard(faRptBoard.getFaRptKey(), loginUser.getUserSeq()));
mav.addObject("userSeq",loginUser.getUserSeq());
//메뉴권한 확인
mav.addObject("accessAuth", authMgtService.selectAccessConfigList

View File

@ -12,4 +12,6 @@ public interface FaRptMapper {
List<FaRptBoard> selectFaRptList(FaRptBoard faRptBoard);
Integer selectFaRptCnt(FaRptBoard faRptBoard);
String selectHashTags(Integer faRptKey);
}

View File

@ -60,6 +60,10 @@ public class FaRptBoard extends BaseModel {
@Transient
private Integer fileCnt;
@Transient
private Integer readCnt;
@Transient
private Integer userCnt;
@Transient
private List<FaRptFile> fileList;
@Transient
private List<FaRptReadUser> readUserList;

View File

@ -0,0 +1,37 @@
package com.dbnt.faisp.faRpt.model;
import com.dbnt.faisp.config.FileInfo;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "hash_tag_link_fa_rpt")
@IdClass(HashTagLinkFaRpt.HashTagLinkFaRptId.class)
public class HashTagLinkFaRpt extends FileInfo {
@Id
@Column(name = "fa_rpt_key")
private Integer faRptKey;
@Id
@Column(name = "tag_key")
private Integer tagKey;
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class HashTagLinkFaRptId implements Serializable {
private Integer faRptKey;
private Integer tagKey;
}
}

View File

@ -0,0 +1,9 @@
package com.dbnt.faisp.faRpt.repository;
import com.dbnt.faisp.faRpt.model.HashTagLinkFaRpt;
import org.springframework.data.jpa.repository.JpaRepository;
public interface HashTagLinkFaRptRepository extends JpaRepository<HashTagLinkFaRpt, HashTagLinkFaRpt.HashTagLinkFaRptId> {
void deleteByFaRptKey(Integer faRptKey);
}

View File

@ -6,12 +6,12 @@ import com.dbnt.faisp.faRpt.mapper.FaRptMapper;
import com.dbnt.faisp.faRpt.model.FaRptBoard;
import com.dbnt.faisp.faRpt.model.FaRptFile;
import com.dbnt.faisp.faRpt.model.FaRptReadUser;
import com.dbnt.faisp.faRpt.model.HashTagLinkFaRpt;
import com.dbnt.faisp.faRpt.repository.FaRptBoardRepository;
import com.dbnt.faisp.faRpt.repository.FaRptFileRepository;
import com.dbnt.faisp.faRpt.repository.FaRptReadUserRepository;
import com.dbnt.faisp.publicBoard.model.PublicBoard;
import com.dbnt.faisp.publicBoard.model.PublicComment;
import com.dbnt.faisp.publicBoard.model.PublicFile;
import com.dbnt.faisp.faRpt.repository.HashTagLinkFaRptRepository;
import com.dbnt.faisp.hashTag.service.HashTagService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -25,9 +25,11 @@ import java.util.UUID;
@Service
@RequiredArgsConstructor
public class FaRptService extends BaseService {
private final HashTagService hashTagService;
private final FaRptBoardRepository faRptBoardRepository;
private final FaRptFileRepository faRptFileRepository;
private final FaRptReadUserRepository faRptReadUserRepository;
private final HashTagLinkFaRptRepository hashTagLinkFaRptRepository;
private final FaRptMapper faRptMapper;
@ -51,13 +53,28 @@ public class FaRptService extends BaseService {
if(faRptBoard.getReadUserList() != null){
saveFaRptReadUser(faRptKey, faRptBoard.getReadUserList());
}
if(!faRptBoard.getHashTags().isEmpty()){
saveHashTagLink(faRptKey, faRptBoard.getHashTags().split(" "));
}
return faRptKey;
}
public FaRptBoard selectFaRptBoard(Integer faRptKey) {
@Transactional
public FaRptBoard selectFaRptBoard(Integer faRptKey, Integer userSeq) {
FaRptBoard faRptBoard = faRptBoardRepository.findById(faRptKey).orElse(null);
faRptBoard.setFileList(faRptFileRepository.findByFaRptKey(faRptKey));
faRptBoard.setReadUserList(faRptReadUserRepository.findByFaRptKey(faRptKey));
if(faRptBoard != null){
faRptBoard.setFileList(faRptFileRepository.findByFaRptKey(faRptKey));
faRptBoard.setHashTags(faRptMapper.selectHashTags(faRptKey));
faRptBoard.setReadUserList(faRptReadUserRepository.findByFaRptKey(faRptKey));
if(faRptBoard.getStatus().equals("DST007")){
for(FaRptReadUser readUser: faRptBoard.getReadUserList()){
if(readUser.getUserSeq().equals(userSeq)){
readUser.setReadYn("T");
faRptReadUserRepository.save(readUser);
}
}
}
}
return faRptBoard;
}
@ -102,4 +119,18 @@ public class FaRptService extends BaseService {
}
}
}
private void saveHashTagLink(Integer faRptKey, String[] hashTagAry){
hashTagLinkFaRptRepository.deleteByFaRptKey(faRptKey);
for(String tagNm: hashTagAry){
HashTagLinkFaRpt hashTagLink = new HashTagLinkFaRpt();
hashTagLink.setFaRptKey(faRptKey);
hashTagLink.setTagKey(hashTagService.selectTagKey(tagNm));
hashTagLinkFaRptRepository.save(hashTagLink);
}
}
public FileInfo selectFaRptFile(Integer faRptKey, Integer fileSeq) {
return faRptFileRepository.findById(new FaRptFile.FaRptFileId(faRptKey, fileSeq)).orElse(null);
}
}

View File

@ -6,6 +6,7 @@ import com.dbnt.faisp.fipTarget.model.PartInfo;
import com.dbnt.faisp.fipTarget.model.PartInfoFile;
import com.dbnt.faisp.fipTarget.model.PartWork;
import com.dbnt.faisp.fipTarget.model.PartWorkFile;
import com.dbnt.faisp.fipTarget.model.ShipInfo;
import com.dbnt.faisp.fipTarget.model.VulnFile;
import com.dbnt.faisp.fipTarget.model.Vulnerable;
import com.dbnt.faisp.fipTarget.service.FipTargetService;
@ -466,8 +467,33 @@ public class FipTargetController {
public void deleteVulnerable(@RequestBody Vulnerable vulnerable) {
fipTargetService.deleteVulnerable(vulnerable);
}
//외사취약지 끝
//외사취약지 끝
//국제여객선 시작
@GetMapping("/ipShipList")
public ModelAndView ipShipList(@AuthenticationPrincipal UserInfo loginUser,ShipInfo shipInfo, HttpServletResponse response) {
ModelAndView mav = new ModelAndView("fipTarget/ipShipList");
shipInfo.setDownOrganCdList(loginUser.getDownOrganCdList());
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/ipShipList?siType="+shipInfo.getSiType()).get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
shipInfo.setQueryInfo();
shipInfo.setPaginationInfo();
mav.addObject("uesrId", loginUser.getUserId());
mav.addObject("searchParams", shipInfo);
return mav;
}
@GetMapping("/ipShipEditModal")
public ModelAndView ipShipEditModal(@AuthenticationPrincipal UserInfo loginUser,ShipInfo shipInfo) {
ModelAndView mav = new ModelAndView("fipTarget/ipShipEditModal");
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partWorkList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
return mav;
}

View File

@ -0,0 +1,130 @@
package com.dbnt.faisp.fipTarget.model;
import com.dbnt.faisp.config.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@IdClass(ShipInfo.ShipInfoId.class)
@Table(name = "ship_info")
public class ShipInfo extends BaseModel implements Serializable{
@Id
@Column(name = "si_seq")
private Integer siSeq;
@Id
@Column(name = "si_type")
private String siType;
@Id
@Column(name = "version_no")
private Integer versionNo;
@Column(name = "start_point")
private String startPoint;
@Column(name = "end_point")
private Integer endPoint;
@Column(name = "distance_nm")
private String distanceNm;
@Column(name = "distance_km")
private String distanceKm;
@Column(name = "owner_nm")
private String ownerNm;
@Column(name = "ship_nm")
private String shipNm;
@Column(name = "operation_cnt")
private String operationCnt;
@Column(name = "ship_weight")
private Integer shipWeight;
@Column(name = "passenger_cnt")
private Integer passengerCnt;
@Column(name = "freight_cnt")
private Integer freightCnt;
@Column(name = "close_yn")
private String closeYn;
@Column(name = "description")
private String description;
@Column(name = "wrt_organ")
private String wrtOrgan;
@Column(name = "wrt_part")
private String wrtPart;
@Column(name = "wrt_user_seq")
private Integer wrtUserSeq;
@Column(name = "wrt_title")
private String wrtTitle;
@Column(name = "wrt_nm")
private String wrtNm;
@Column(name = "wrt_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt;
@Transient
private String excel;
@Override
public String toString() {
return "ShipInfo [siSeq=" + siSeq + ", siType=" + siType + ", versionNo=" + versionNo + ", startPoint=" + startPoint
+ ", endPoint=" + endPoint + ", distanceNm=" + distanceNm + ", distanceKm=" + distanceKm + ", ownerNm="
+ ownerNm + ", shipNm=" + shipNm + ", operationCnt=" + operationCnt + ", shipWeight=" + shipWeight
+ ", passengerCnt=" + passengerCnt + ", freightCnt=" + freightCnt + ", description=" + description
+ ", wrtOrgan=" + wrtOrgan + ", wrtPart=" + wrtPart + ", wrtUserSeq=" + wrtUserSeq + ", wrtTitle="
+ wrtTitle + ", wrtNm=" + wrtNm + ", wrtDt=" + wrtDt + ", excel=" + excel + "]";
}
@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ShipInfoId implements Serializable {
private Integer siSeq;
private String siType;
private Integer versionNo;
}
}

View File

@ -234,10 +234,15 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
@GetMapping("/statistics")
public ModelAndView statistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/affairStatistics");
List<TypeStatistics> type1 = affairService.selectType1List(typeStatistics);
List<TypeStatistics> type2 = affairService.selectType2List(typeStatistics);
List<TypeStatistics> type3 = affairService.selectType3List(typeStatistics);
List<TypeStatistics> type4 = affairService.selectType4List(typeStatistics);
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("searchParams", typeStatistics);
return mav;
}
@PostMapping("/fieldStatistics")
public ModelAndView fieldStatistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/fieldStatistics");
List<TypeStatistics> totalList = affairService.selectStatusTotal(typeStatistics);
List<TypeStatistics> type1List = affairService.selecType1ListCnt(typeStatistics);
List<TypeStatistics> type2List = affairService.selecType2ListCnt(typeStatistics);
@ -254,30 +259,59 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
totalList.add(total);
}
mav.addObject("totalList", totalList);
type1List = addTotalRow(type1, type1List);
type2List = addTotalRow(type2, type2List);
type3List = addTotalRow(type3, type3List);
type4List = addTotalRow(type4, type4List);
mav.addObject("type1", type1);
mav.addObject("type2", type2);
mav.addObject("type3", type3);
mav.addObject("type4", type4);
if(typeStatistics.getCategory1() != null) {
type1List = addTotalRow(typeStatistics.getCategory1(), type1List);
}
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("type2List", type2List);
mav.addObject("type3List", type3List);
mav.addObject("type4List", type4List);
mav.addObject("searchParams", typeStatistics);
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/translator/info").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("searchParams", typeStatistics);
return mav;
}
private List<TypeStatistics> addTotalRow(List<TypeStatistics> type, List<TypeStatistics> typeList){
@PostMapping("/ratingStatistics")
public ModelAndView ratingStatistics(@AuthenticationPrincipal UserInfo loginUser, TypeStatistics typeStatistics){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/ratingStatistics");
List<TypeStatistics> totalList = affairService.selectRatingStatusTotal(typeStatistics);
List<TypeStatistics> sangboCntList = affairService.selectSangboTotal(typeStatistics);
List<TypeStatistics> arrCntList = affairService.selectArrCntList(typeStatistics);
if(!totalList.isEmpty()) {
TypeStatistics total = new TypeStatistics();
total.setItemValue("누계");
total.setWrtOrgan("total");
total.setCnt(0);
for(TypeStatistics stat: totalList) {
total.setCnt(total.getCnt()+stat.getCnt());
}
totalList.add(total);
}
if(typeStatistics.getSangbo() != null) {
sangboCntList = addTotalRow(typeStatistics.getSangbo(), sangboCntList);
}
if(typeStatistics.getRating() != null) {
arrCntList = addTotalRow(typeStatistics.getRating(), arrCntList);
}
mav.addObject("totalList", totalList);
mav.addObject("sangboList", sangboCntList);
mav.addObject("arrCntList", arrCntList);
mav.addObject("searchParams", typeStatistics);
return mav;
}
private List<TypeStatistics> addTotalRow(List<String> type, List<TypeStatistics> typeList){
Map<String, Integer> totalMap = new HashMap<>();
for(TypeStatistics t: type) {
totalMap.put(t.getAffairType(), 0);
for(String t: type) {
totalMap.put(t, 0);
}
for(TypeStatistics t: typeList) {
totalMap.put(t.getAffairType(), totalMap.get(t.getAffairType())+t.getCnt());
@ -291,9 +325,9 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
total.setAffairType(affairType);
total.setCnt(cnt);
typeList.add(total);
}
}
return typeList;
}
}

View File

@ -16,13 +16,6 @@ public interface AffairMapper {
String selectHashTags(Integer affairKey);
List<TypeStatistics> selectType1List(TypeStatistics typeStatistics);
List<TypeStatistics> selectType2List(TypeStatistics typeStatistics);
List<TypeStatistics> selectType3List(TypeStatistics typeStatistics);
List<TypeStatistics> selectType4List(TypeStatistics typeStatistics);
List<TypeStatistics> selectStatusTotal(TypeStatistics typeStatistics);
@ -33,4 +26,10 @@ public interface AffairMapper {
List<TypeStatistics> selecType3ListCnt(TypeStatistics typeStatistics);
List<TypeStatistics> selecType4ListCnt(TypeStatistics typeStatistics);
List<TypeStatistics> selectRatingStatusTotal(TypeStatistics typeStatistics);
List<TypeStatistics> selectSangboTotal(TypeStatistics typeStatistics);
List<TypeStatistics> selectArrCntList(TypeStatistics typeStatistics);
}

View File

@ -24,6 +24,10 @@ public class TypeStatistics extends BaseModel {
@Transient
private Integer cnt;
@Transient
private String userNm;
@Transient
private List<String> rating;
@Transient
private List<String> category1;
@Transient
private List<String> category2;
@ -33,11 +37,18 @@ public class TypeStatistics extends BaseModel {
private List<String> category4;
@Transient
private List<String> organList;
@Transient
private List<String> sangbo;
@Override
public String toString() {
return "TypeStatistics [wrtOrgan=" + wrtOrgan + ", itemValue=" + itemValue + ", affairType=" + affairType + ", cnt="
+ cnt + ", category1=" + category1 + "]";
+ cnt + ", rating=" + rating + ", category1=" + category1 + ", category2=" + category2 + ", category3="
+ category3 + ", category4=" + category4 + ", organList=" + organList + "]";
}
}

View File

@ -6,6 +6,7 @@ import com.dbnt.faisp.config.FileInfo;
import com.dbnt.faisp.fpiMgt.affair.mapper.AffairMapper;
import com.dbnt.faisp.fpiMgt.affair.model.*;
import com.dbnt.faisp.fpiMgt.affair.repository.*;
import com.dbnt.faisp.hashTag.service.HashTagService;
import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@ -20,10 +21,10 @@ import java.util.UUID;
@Service
@RequiredArgsConstructor
public class AffairService extends BaseService { // 견문보고
private final HashTagService hashTagService;
private final AffairBoardRepository affairBoardRepository;
private final AffairFileRepository affairFileRepository;
private final AffairRatingRepository affairRatingRepository;
private final HashTagRepository hashTagRepository;
private final HashTagLinkRepository hashTagLinkRepository;
private final AffairMapper affairMapper;
@ -46,9 +47,8 @@ public class AffairService extends BaseService { // 견문보고
@Transactional
public Integer saveAffairBoard(AffairBoard affair, List<Integer> deleteFileSeq){
Integer affairKey = affairBoardRepository.save(affair).getAffairKey();
String[] hashTagAry = affair.getHashTags().split(" ");
if(hashTagAry.length>0){
saveHashTagLink(affairKey, hashTagAry);
if(!affair.getHashTags().isEmpty()){
saveHashTagLink(affairKey, affair.getHashTags().split(" "));
}
if(deleteFileSeq != null && deleteFileSeq.size()>0){
deleteAffairFile(affairKey, deleteFileSeq);
@ -72,18 +72,9 @@ public class AffairService extends BaseService { // 견문보고
private void saveHashTagLink(Integer affairKey, String[] hashTagAry){
hashTagLinkRepository.deleteByAffairKey(affairKey);
for(String tagNm : hashTagAry){
HashTag savedTag = hashTagRepository.findByTagNm(tagNm).orElse(null);
Integer tagKey;
if(savedTag==null){
HashTag tag = new HashTag();
tag.setTagNm(tagNm);
tagKey = hashTagRepository.save(tag).getTagKey();
}else{
tagKey = savedTag.getTagKey();
}
HashTagLink hashTagLink = new HashTagLink();
hashTagLink.setAffairKey(affairKey);
hashTagLink.setTagKey(tagKey);
hashTagLink.setTagKey(hashTagService.selectTagKey(tagNm));
hashTagLinkRepository.save(hashTagLink);
}
}
@ -157,22 +148,6 @@ public class AffairService extends BaseService { // 견문보고
return affairFileRepository.findById(new AffairFile.AffairFileId(parentKey, fileSeq)).orElse(null);
}
public List<TypeStatistics> selectType1List(TypeStatistics typeStatistics) {
return affairMapper.selectType1List(typeStatistics);
}
public List<TypeStatistics> selectType2List(TypeStatistics typeStatistics) {
return affairMapper.selectType2List(typeStatistics);
}
public List<TypeStatistics> selectType3List(TypeStatistics typeStatistics) {
return affairMapper.selectType3List(typeStatistics);
}
public List<TypeStatistics> selectType4List(TypeStatistics typeStatistics) {
return affairMapper.selectType4List(typeStatistics);
}
public List<TypeStatistics> selectStatusTotal(TypeStatistics typeStatistics) {
return affairMapper.selectStatusTotal(typeStatistics);
}
@ -192,4 +167,13 @@ public class AffairService extends BaseService { // 견문보고
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);
}
}

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.fpiMgt.affair.model;
package com.dbnt.faisp.hashTag.model;
import lombok.Getter;
import lombok.NoArgsConstructor;

View File

@ -1,6 +1,6 @@
package com.dbnt.faisp.fpiMgt.affair.repository;
package com.dbnt.faisp.hashTag.repository;
import com.dbnt.faisp.fpiMgt.affair.model.HashTag;
import com.dbnt.faisp.hashTag.model.HashTag;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;

View File

@ -0,0 +1,25 @@
package com.dbnt.faisp.hashTag.service;
import com.dbnt.faisp.hashTag.model.HashTag;
import com.dbnt.faisp.hashTag.repository.HashTagRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@RequiredArgsConstructor
public class HashTagService {
private final HashTagRepository hashTagRepository;
@Transactional
public Integer selectTagKey(String tagNm){
HashTag savedTag = hashTagRepository.findByTagNm(tagNm).orElse(null);
if(savedTag==null){
HashTag tag = new HashTag();
tag.setTagNm(tagNm);
return hashTagRepository.save(tag).getTagKey();
}else{
return savedTag.getTagKey();
}
}
}

View File

@ -3,8 +3,7 @@ package com.dbnt.faisp.ivsgtMgt.boardInvestigation.service;
import com.dbnt.faisp.config.BaseService;
import com.dbnt.faisp.config.FileInfo;
import com.dbnt.faisp.fpiMgt.affair.model.HashTag;
import com.dbnt.faisp.fpiMgt.affair.repository.HashTagRepository;
import com.dbnt.faisp.hashTag.service.HashTagService;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.*;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.*;
@ -21,11 +20,11 @@ import java.util.UUID;
@Service
@RequiredArgsConstructor
public class BoardInvestigationService extends BaseService {
private final HashTagService hashTagService;
private final BoardInvestigationRepository boardInvestigationRepository;
private final IvsgtFileRepository ivsgtFileRepository;
private final ArrestTypeRepository arrestTypeRepository;
private final RelatedReportsRepository relatedReportsRepository;
private final HashTagRepository hashTagRepository;
private final HashTagLinkIvsgtRepository hashTagLinkIvsgtRepository;
private final BoardInvestigationMapper boardInvestigationMapper;
@ -120,18 +119,9 @@ public class BoardInvestigationService extends BaseService {
private void saveHashTagLink(Integer ivsgtKey, String[] hashTagAry){
hashTagLinkIvsgtRepository.deleteByIvsgtKey(ivsgtKey);
for(String tagNm : hashTagAry){
HashTag savedTag = hashTagRepository.findByTagNm(tagNm).orElse(null);
Integer tagKey;
if(savedTag==null){
HashTag tag = new HashTag();
tag.setTagNm(tagNm);
tagKey = hashTagRepository.save(tag).getTagKey();
}else{
tagKey = savedTag.getTagKey();
}
HashTagLinkIvsgt hashTagLinkIvsgt = new HashTagLinkIvsgt();
hashTagLinkIvsgt.setIvsgtKey(ivsgtKey);
hashTagLinkIvsgt.setTagKey(tagKey);
hashTagLinkIvsgt.setTagKey(hashTagService.selectTagKey(tagNm));
hashTagLinkIvsgtRepository.save(hashTagLinkIvsgt);
}
}

View File

@ -109,90 +109,102 @@
<include refid="selectAffairBoardWhere"></include>
</select>
<select id="selectHashTags" resultType="string" parameterType="int">
select aa.hashTags
from (select a.affair_key,
array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from hash_tag_link a
inner join hash_tag b on a.tag_key = b.tag_key
where a.affair_key = #{affairKey}
group by a.affair_key) aa
select array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from hash_tag_link a
inner join hash_tag b on a.tag_key = b.tag_key
where a.affair_key = #{affairKey}
</select>
<select id="selectType1List" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as affairType,
item_value
from code_mgt
where category_cd = 'DC01'
<choose>
<when test='category1 != null and category1 != ""'>
and item_cd in
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC01')
</otherwise>
</choose>
order by affairType asc
</select>
<sql id="searchStatistics">
<if test='userNm != null and userNm != ""'>
and wrt_user_nm like '%'||#{userNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='rating != null and rating != "" or sangbo != null and sangbo != ""'>
and ab.affair_key in (
select affair_key
from affair_rating ar2
inner join organ_config oc2
on ar2.rating_organ = oc2.organ_cd
<where>
<if test='rating != null and rating != ""'>
and ar2.affair_rate in
<foreach collection="rating" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='sangbo != null and sangbo != ""'>
and ar2.organ_up = 'T'
and oc2.organ_type in
<foreach collection="sangbo" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
)
</if>
</sql>
<select id="selectType2List" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as affairType,
item_value
from code_mgt
where category_cd = 'DC02'
<choose>
<when test='category2 != null and category2 != ""'>
and item_cd in
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC02')
</otherwise>
</choose>
order by affairType asc
</select>
<sql id="statisticsCategory1">
<choose>
<when test='category1 != null and category1 != ""'>
and item_cd in
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC01')
</otherwise>
</choose>
</sql>
<select id="selectType3List" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as affairType,
item_value
from code_mgt
where category_cd = 'DC03'
<choose>
<when test='category3 != null and category3 != ""'>
and item_cd in
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC03')
</otherwise>
</choose>
order by affairType asc
</select>
<sql id="statisticsCategory2">
<choose>
<when test='category2 != null and category2 != ""'>
and item_cd in
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC02')
</otherwise>
</choose>
</sql>
<select id="selectType4List" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as affairType,
item_value
from code_mgt
where category_cd = 'DC04'
<choose>
<when test='category4 != null and category4 != ""'>
and item_cd in
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC04')
</otherwise>
</choose>
order by affairType asc
</select>
<sql id="statisticsCategory3">
<choose>
<when test='category3 != null and category3 != ""'>
and item_cd in
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC03')
</otherwise>
</choose>
</sql>
<sql id="statisticsCategory4">
<choose>
<when test='category4 != null and category4 != ""'>
and item_cd in
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC04')
</otherwise>
</choose>
</sql>
<select id="selectStatusTotal" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as wrt_organ,
@ -218,33 +230,66 @@
order by item_cd asc) a left outer join
(select wrt_organ,
count(*) as cnt
from affair_board
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test='category1 != null and category1 != ""'>
or affair_type1 in
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<if test='userNm != null and userNm != ""'>
and wrt_user_nm like '%'||#{userNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='rating != null and rating != "" or sangbo != null and sangbo != ""'>
and ab.affair_key in (
select affair_key
from affair_rating ar2
inner join organ_config oc2
on ar2.rating_organ = oc2.organ_cd
<where>
<if test='rating != null and rating != ""'>
and ar2.affair_rate in
<foreach collection="rating" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='sangbo != null and sangbo != ""'>
and ar2.organ_up = 'T'
and oc2.organ_type in
<foreach collection="sangbo" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
)
</if>
<if test='category2 != null and category2 != ""'>
or affair_type2 in
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category3 != null and category3 != ""'>
or affair_type3 in
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category4 != null and category4 != ""'>
or affair_type4 in
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</trim>
<if test='category1 != null and category1 != ""'>
and affair_type1 in
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category2 != null and category2 != ""'>
and affair_type2 in
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category3 != null and category3 != ""'>
and affair_type3 in
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category4 != null and category4 != ""'>
and affair_type4 in
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
group by wrt_organ)b on
a.item_cd = b.wrt_organ
order by wrt_organ asc
@ -260,17 +305,7 @@
item_value
from code_mgt
where category_cd = 'DC01'
<choose>
<when test='category1 != null and category1 != ""'>
and item_cd in
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC01')
</otherwise>
</choose>
<include refid="statisticsCategory1"></include>
)a left join
(select item_cd,
item_value
@ -288,7 +323,11 @@
(select wrt_organ,
affair_type1 as affair_type,
count(*) as cnt
from affair_board
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="searchStatistics"></include>
group by wrt_organ,affair_type1) c
on a.item_cd = c.affair_type and b.item_cd = c.wrt_organ
order by wrt_organ,affair_type asc
@ -304,17 +343,7 @@
item_value
from code_mgt
where category_cd = 'DC02'
<choose>
<when test='category2 != null and category2 != ""'>
and item_cd in
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC02')
</otherwise>
</choose>
<include refid="statisticsCategory2"></include>
)a left join
(select item_cd,
item_value
@ -332,7 +361,11 @@
(select wrt_organ,
affair_type2 as affair_type,
count(*) as cnt
from affair_board
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="searchStatistics"></include>
group by wrt_organ,affair_type2) c
on a.item_cd = c.affair_type and b.item_cd = c.wrt_organ
order by wrt_organ,affair_type asc
@ -348,17 +381,7 @@
item_value
from code_mgt
where category_cd = 'DC03'
<choose>
<when test='category3 != null and category3 != ""'>
and item_cd in
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC03')
</otherwise>
</choose>
<include refid="statisticsCategory3"></include>
)a left join
(select item_cd,
item_value
@ -376,7 +399,11 @@
(select wrt_organ,
affair_type3 as affair_type,
count(*) as cnt
from affair_board
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="searchStatistics"></include>
group by wrt_organ,affair_type3) c
on a.item_cd = c.affair_type and b.item_cd = c.wrt_organ
order by wrt_organ,affair_type asc
@ -392,17 +419,7 @@
item_value
from code_mgt
where category_cd = 'DC04'
<choose>
<when test='category4 != null and category4 != ""'>
and item_cd in
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'DC04')
</otherwise>
</choose>
<include refid="statisticsCategory4"></include>
)a left join
(select item_cd,
item_value
@ -420,9 +437,190 @@
(select wrt_organ,
affair_type4 as affair_type,
count(*) as cnt
from affair_board
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="searchStatistics"></include>
group by wrt_organ,affair_type4) c
on a.item_cd = c.affair_type and b.item_cd = c.wrt_organ
order by wrt_organ,affair_type asc
</select>
<sql id="raitingSearch">
<if test='userNm != null and userNm != ""'>
and wrt_user_nm like '%'||#{userNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='rating != null and rating != "" or sangbo != null and sangbo != ""'>
and ab.affair_key in (
select affair_key
from affair_rating ar2
inner join organ_config oc2
on ar2.rating_organ = oc2.organ_cd
<where>
<if test='rating != null and rating != ""'>
and ar2.affair_rate in
<foreach collection="rating" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='sangbo != null and sangbo != ""'>
and ar2.organ_up = 'T'
and oc2.organ_type in
<foreach collection="sangbo" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
)
</if>
<if test='category1 != null and category1 != ""'>
and affair_type1 in
<foreach collection="category1" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category2 != null and category2 != ""'>
and affair_type2 in
<foreach collection="category2" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category3 != null and category3 != ""'>
and affair_type3 in
<foreach collection="category3" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test='category4 != null and category4 != ""'>
and affair_type4 in
<foreach collection="category4" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</sql>
<select id="selectRatingStatusTotal" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as wrt_organ,
item_value,
coalesce(cnt,0) as cnt
from
(select item_cd,
item_value
from code_mgt
where category_cd = 'OG'
and use_chk = 'T'
<choose>
<when test='organList != null and organList != ""'>
and item_cd in
<foreach collection="organList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd = 'OG' and use_chk = 'T')
</otherwise>
</choose>
) a
left outer join
(select ab.wrt_organ,
count(*) as cnt
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="raitingSearch"></include>
group by ab.wrt_organ) c
on a.item_cd = c.wrt_organ
order by item_cd asc
</select>
<select id="selectSangboTotal" resultType="TypeStatistics" parameterType="TypeStatistics">
select item_cd as wrt_organ,
item_value,
b.organ_type as affairType,
coalesce(cnt,0) as cnt
from
(select item_cd,
item_value
from code_mgt
where category_cd = 'OG'
and use_chk = 'T') a left join
(select organ_type
from organ_config
<where>
<choose>
<when test='sangbo != null and sangbo != ""'>
organ_type in
<foreach collection="sangbo" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
organ_type not in (select organ_type from organ_config)
</otherwise>
</choose>
</where>
group by organ_type) b on 1=1
left outer join
(select ab.wrt_organ,
oc.organ_type,
count(*) as cnt
from affair_board ab,
affair_rating ar,
organ_config oc
where ab.affair_key = ar.affair_key
and ar.rating_organ = oc.organ_cd
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="raitingSearch"></include>
group by ab.wrt_organ,oc.organ_type) c
on a.item_cd = c.wrt_organ and b.organ_type = c.organ_type
order by item_cd, affairType asc
</select>
<select id="selectArrCntList" resultType="TypeStatistics" parameterType="TypeStatistics">
select a.item_cd as wrt_organ,
b.item_cd as affairType,
coalesce(cnt,0) as cnt
from
(select item_cd,
item_value
from code_mgt
where category_cd = 'OG'
and use_chk = 'T') a left join
(select item_cd
from code_mgt
where category_cd='AAR'
<choose>
<when test='rating != null and rating != ""'>
and item_cd in
<foreach collection="rating" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</when>
<otherwise>
and item_cd not in (select item_cd from code_mgt where category_cd='AAR')
</otherwise>
</choose>
) b on 1=1
left outer join
(select ab.wrt_organ,
ar.affair_rate,
count(*) as cnt
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="raitingSearch"></include>
group by ab.wrt_organ,ar.affair_rate) c
on c.wrt_organ = a.item_cd and c.affair_rate = b.item_cd
order by wrt_organ,affairType asc
</select>
</mapper>

View File

@ -71,14 +71,10 @@
<include refid="selectBoardInvestigationListWhere"></include>
</select>
<select id="selectHashTags" resultType="string" parameterType="int">
SELECT aa.hashTags
FROM (
SELECT
array_to_string(array_agg(b.tag_nm), ' ') AS hashTags
FROM hash_tag_link_ivsgt a
INNER JOIN hash_tag b ON a.tag_key = b.tag_key
WHERE a.ivsgt_key = #{ivsgtKey}
GROUP BY a.ivsgt_key) aa
SELECT array_to_string(array_agg(b.tag_nm), ' ') AS hashTags
FROM hash_tag_link_ivsgt a
INNER JOIN hash_tag b ON a.tag_key = b.tag_key
WHERE a.ivsgt_key = #{ivsgtKey}
</select>
<select id="selectArrestType" resultType="ArrestType" parameterType="int">
SELECT

View File

@ -10,7 +10,7 @@
and a.wrt_user_seq = #{wrtUserSeq}
</if>
<if test='receiveUserSeq != null and receiveUserSeq != ""'>
and a.fa_rpt_key = (select fa_rpt_key
and a.fa_rpt_key in (select fa_rpt_key
from fa_rpt_read_user
where user_seq = #{receiveUserSeq})
</if>
@ -29,6 +29,17 @@
<if test='endDate != null and endDate != ""'>
and a.wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='status != null and status != ""'>
and a.status = #{status}
</if>
<if test='hashTags != null and hashTags != ""'>
and a.fa_rpt_key in (
select aa.fa_rpt_key
from hash_tag_link_fa_rpt aa
inner join hash_tag ab on aa.tag_key = ab.tag_key
where ab.tag_nm like '%'||#{hashTags}||'%'
)
</if>
<if test="downOrganCdList != null">
and a.wrt_organ in
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
@ -40,19 +51,29 @@
<select id="selectFaRptList" resultType="FaRptBoard" parameterType="FaRptBoard">
select a.fa_rpt_key,
a.title,
a.fa_rpt_type,
a.status,
a.wrt_organ,
a.wrt_part,
a.wrt_user_nm,
a.wrt_user_grd,
a.wrt_user_seq,
a.wrt_dt,
b.fileCnt
b.fileCnt,
c.readCnt,
c.userCnt
from fa_rpt_board a
left outer join (select fa_rpt_key,
count(file_seq) as fileCnt
from fa_rpt_file
group by fa_rpt_key) b
on a.fa_rpt_key = b.fa_rpt_key
on a.fa_rpt_key = b.fa_rpt_key
left outer join (select fa_rpt_key,
count(read_yn='T') as readCnt,
count(*) as userCnt
from fa_rpt_read_user
group by fa_rpt_key) c
on a.fa_rpt_key = c.fa_rpt_key
<include refid="selectFaRptWhere"></include>
order by fa_rpt_key desc
limit #{rowCnt} offset #{firstIndex}
@ -62,4 +83,11 @@
from fa_rpt_board a
<include refid="selectFaRptWhere"></include>
</select>
<select id="selectHashTags" resultType="string" parameterType="int">
select array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from hash_tag_link_fa_rpt a
inner join hash_tag b on a.tag_key = b.tag_key
where a.fa_rpt_key = #{faRptKey}
</select>
</mapper>

View File

@ -0,0 +1,6 @@
/*로그인 폼*/
.affair-scroll{
max-height: 200px;
overflow-y: auto;
}

View File

@ -16,6 +16,24 @@
background-color: #ffffff;
}
#fadeSearchDiv{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: #00000050;
z-index: 2090;
}
#fadeSearchDiv > div{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background-color: #ffffff;
}
.activeTr{
--bs-bg-opacity: 0.25;
background-color: rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important;

View File

@ -8,6 +8,14 @@ function contentFade(action){
}
}
function searchFade(action){
if(action === "in"){
$("#fadeSearchDiv").show()
}else{
$("#fadeSearchDiv").hide()
}
}
$(document).on('click', '.allChk', function (){
$(this).parents('table').find('[type="checkbox"]').prop("checked", this.checked);
})

View File

@ -17,20 +17,44 @@ $(document).on('click', '#allTab', function (){
})
$(document).on('click', '#addFaRptBtn', function (){
getFaRptEditModal(null)
getFaRptEditModal({faRptKey: null})
})
$(document).on('click', '#editFaRptBtn', function (){
$("#faRptViewModal").modal('hide');
getFaRptEditModal(Number($(this).attr("data-farptkey")));
getFaRptEditModal({faRptKey: Number($(this).attr("data-farptkey"))});
})
$(document).on('click', '#addReadUserBtn', function (){
searchModalSubmit(1);
$("#userModal").modal('show');
})
$(document).on('click', '.rowDeleteBtn', function (){
$(this).parents(".readUserRow").remove()
setReadUserRowNum();
})
$(document).on('click', '#getMenuBtn', function (){
$.ajax({
type : 'POST',
url : "/faRpt/selectedUserTable",
data : JSON.stringify(selectedList),
contentType: 'application/json',
dataType:"html",
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function(html) {
$("#readUserRow").empty().append(html);
setReadUserRowNum();
$("#userModal").modal("hide");
},
error : function(xhr, status) {
}
})
})
$(document).on('click', '#saveFaRptBtn', function (){
saveFaRpt('DST002')
saveFaRpt('DST007')
})
$(document).on('click', '#saveTempBtn', function (){
@ -45,7 +69,18 @@ $(document).on('click', '.faRptTr', function (){
}
getFaRptViewModal(Number($(this).find(".faRptKey").val()));
})
$(document).on('click', '#reSendBtn', function (){
$("#faRptViewModal").modal('hide');
const faRpt = {
refKey: Number($(this).attr("data-farptkey")),
wrtUserSeq: $("#wrtUserSeq").val(),
wrtOrgan: $("#wrtOrgan").val(),
wrtPart: $("#wrtPart").val(),
wrtUserGrd: $("#wrtUserGrd").val(),
wrtUserNm: $("#wrtUserNm").val()
}
getFaRptEditModal(faRpt);
})
function getFaRptViewModal(faRptKey){
$.ajax({
@ -63,10 +98,10 @@ function getFaRptViewModal(faRptKey){
});
}
function getFaRptEditModal(faRptKey){
function getFaRptEditModal(faRpt){
$.ajax({
url: '/faRpt/faRptEditModal',
data: {faRptKey: faRptKey},
data: faRpt,
type: 'GET',
dataType:"html",
success: function(html){
@ -99,13 +134,20 @@ function getFaRptEditModal(faRptKey){
function saveFaRpt(faRptState){
if(contentCheck()){
if(confirm("저장하시겠습니까?")){
$("#faRptState").val(faRptState);
$("#status").val(faRptState);
contentFade("in");
const formData = new FormData($("#faRptEditForm")[0]);
for(const file of files) {
if(!file.isDelete)
formData.append('uploadFiles', file, file.name);
}
$.each($(".readUserRow"), function (idx, row){
formData.append('readUserList['+idx+'].userSeq', $(row).find('.userSeq').val());
formData.append('readUserList['+idx+'].ogCd', $(row).find('.ogCd').val());
formData.append('readUserList['+idx+'].ofcCd', $(row).find('.ofcCd').val());
formData.append('readUserList['+idx+'].titleCd', $(row).find('.titleCd').val());
formData.append('readUserList['+idx+'].userNm', $(row).find('.userNm').val());
});
$(".text-decoration-line-through").each(function (idx, el){
formData.append('fileSeq', $(el).attr("data-fileseq"));
})
@ -130,6 +172,11 @@ function saveFaRpt(faRptState){
}
}
function setReadUserRowNum(){
$.each($(".readUserRow"), function (idx, row){
$(row).find(".rowSeq")[0].innerText = idx+1;
})
}
function contentCheck(){
let flag = true;

View File

@ -0,0 +1,25 @@
$(document).on('click', '#krcnTab', function (){
location.href="/target/ipShipList?siType=KRCN";
})
$(document).on('click', '#krjpruTab', function (){
location.href="/target/ipShipList?siType=KRJPRU";
})
$(document).on('click', '#addKRCN', function (){
const siType = 'KRCN';
$.ajax({
url: '/target/ipShipEditModal',
data: {siType: siType},
type: 'GET',
dataType:"html",
success: function(html){
$("#ipShipModalContent").empty().append(html);
$("#ipShipModal").modal('show');
},
error:function(){
}
});
})

View File

@ -1,9 +1,33 @@
$(document).on('click', '#downExcel', function (){
exportExcel();
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
})
function exportExcel(){
$(document).on('click', '#fieldDownExcel', function (){
exportExcel('분야별');
})
$(document).on('click', '#ratingDownExcel', function (){
exportExcel('평가별');
})
function exportExcel(name){
var excelHandler = {
getExcelFileName : function(){
return '견문통계'+'_'+name+'_'+getToday()+'.xlsx'; //파일명
},
getSheetName : function(){
return '견문통계'+'_'+name;
},
getExcelData : function(){
return document.getElementById('tableData'); //TABLE id
},
getWorksheet : function(){
return XLSX.utils.table_to_sheet(this.getExcelData());
}
}
// step 1. workbook 생성
var wb = XLSX.utils.book_new();
@ -20,21 +44,6 @@ function exportExcel(){
saveAs(new Blob([s2ab(wbout)],{type:"application/octet-stream"}), excelHandler.getExcelFileName());
}
var excelHandler = {
getExcelFileName : function(){
return '견문통계'+'_'+getToday()+'.xlsx'; //파일명
},
getSheetName : function(){
return 'Table Test Sheet'; //시트명
},
getExcelData : function(){
return document.getElementById('tableData'); //TABLE id
},
getWorksheet : function(){
return XLSX.utils.table_to_sheet(this.getExcelData());
}
}
function s2ab(s) {
var buf = new ArrayBuffer(s.length); //convert s to arrayBuffer
var view = new Uint8Array(buf); //create uint8array as viewer
@ -49,4 +58,123 @@ function getToday(){
var day = ("0" + date.getDate()).slice(-2);
return year + "-" + month + "-" + day;
}
}
$(document).on('click', '#fieldSearch', function (){
goFieldStatistics();
})
$(document).on('click', '#fieldTab', function (){
goFieldStatistics();
})
function goFieldStatistics(){
searchFade("in");
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();
searchFade("out");
},
error:function(){
searchFade("out");
}
});
}
$(document).on('click', '#ratingSearch', function (){
if($('input:checkbox[name=rating]:checked').length < 1){
alert("평가항목을 선택해주세요");
return false;
}
goRatingStatistics();
})
$(document).on('click', '#ratingTab', function (){
if($('input:checkbox[name=rating]:checked').length < 1){
alert("평가항목을 선택해주세요");
return false;
}
goRatingStatistics();
})
function goRatingStatistics(){
searchFade("in");
const formData = new FormData($("#searchFm")[0]);
$.ajax({
url: '/affair/ratingStatistics',
data: formData,
type: 'POST',
dataType:"html",
contentType: false,
processData: false,
success: function(html){
$("#statisticsBody").empty().append(html)
$("#statisticsBody").show();
$(".statisticsMenu").hide();
searchFade("out");
},
error:function(){
searchFade("out");
}
});
}
$(document).on('click', '#showMenu', function (){
$(".statisticsMenu").show();
})
$(document).ready(function() {
$("#organAll").click(function() {
if($("#organAll").is(":checked")){
$("input[name=organList]").prop("checked", true);
} else{
$("input[name=organList]").prop("checked", false);
}
});
$("#ratingAll").click(function() {
if($("#ratingAll").is(":checked")){
$("input[name=rating]").prop("checked", true);
} else{
$("input[name=rating]").prop("checked", false);
}
});
$("#category1All").click(function() {
if($("#category1All").is(":checked")){
$("input[name=category1]").prop("checked", true);
} else{
$("input[name=category1]").prop("checked", false);
}
});
$("#category2All").click(function() {
if($("#category2All").is(":checked")){
$("input[name=category2]").prop("checked", true);
} else{
$("input[name=category2]").prop("checked", false);
}
});
$("#category3All").click(function() {
if($("#category3All").is(":checked")){
$("input[name=category3]").prop("checked", true);
} else{
$("input[name=category3]").prop("checked", false);
}
});
$("#category4All").click(function() {
if($("#category4All").is(":checked")){
$("input[name=category4]").prop("checked", true);
} else{
$("input[name=category4]").prop("checked", false);
}
});
});

View File

@ -22,26 +22,6 @@ $(document).on('click', '.userInfoTr', function (){
}
})
$(document).on('click', '#getMenuBtn', function (){
$.ajax({
type : 'POST',
url : "/faRpt/selectedUserTable",
data : JSON.stringify(selectedList),
contentType: 'application/json',
dataType:"html",
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function(html) {
$("#readUserRow").empty().append(html);
$("#userModal").modal("hide");
},
error : function(xhr, status) {
}
})
})
function setSelectedChkBox(){
$.each(selectedList, function (idx, item){
$(".userInfoCheckBox[value="+item.userSeq+"]").prop("checked", true);

View File

@ -42,23 +42,24 @@
</div>
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
<div class="col-auto" th:if="${searchParams.activeTab ne 'send'}">
<select class="form-select form-select-sm" name="wrtOrgan">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
</th:block>
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}">
</div>
<div class="col-auto" th:if="${accessAuth eq 'ACC003'}">
<input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
</div>
<div class="col-4">
<div class="col-auto">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
@ -78,18 +79,31 @@
<thead>
<tr>
<th></th>
<th th:if="${searchParams.status ne 'receive'}">상태</th>
<th>분류</th>
<th>제목</th>
<th>관서</th>
<th>부서</th>
<th>작성자</th>
<th>작성일시</th>
<th>첨부파일</th>
<th>열람수</th>
</tr>
</thead>
<tbody>
<tr class="faRptTr" th:each="faRpt:${faRptList}">
<input type="hidden" class="faRptKey" th:value="${faRpt.faRptKey}">
<td><input type="checkbox" class="trChkBox"></td>
<td th:if="${faRpt.status ne 'receive'}">
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<th:text th:if="${commonCode.itemCd eq faRpt.status}" th:text="${commonCode.itemValue}"></th:text>
</th:block>
</td>
<td>
<th:block th:each="commonCode:${session.commonCode.get('FRC')}">
<th:text th:if="${commonCode.itemCd eq faRpt.faRptType}" th:text="${commonCode.itemValue}"></th:text>
</th:block>
</td>
<td th:text="${faRpt.title}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${faRpt.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
@ -100,6 +114,7 @@
<td th:text="${faRpt.wrtUserNm}"></td>
<td th:text="${#temporals.format(faRpt.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${faRpt.fileCnt eq null?'파일 없음':#strings.concat(faRpt.fileCnt,' 건')}"></td>
<td th:text="|${faRpt.readCnt}/${faRpt.userCnt}|"></td>
</tr>
</tbody>
</table>

View File

@ -14,6 +14,7 @@
<input type="hidden" name="wrtUserSeq" th:value="${faRpt.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${faRpt.wrtUserGrd}">
<input type="hidden" name="status" id="status" th:value="${faRpt.status}">
<input type="hidden" name="refKey" th:value="${faRpt.refKey}">
<div class="row">
<div class="col-8">
<div class="mb-3 row">
@ -52,7 +53,7 @@
<div class="mb-3 row">
<label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm" id="hashTags" name="hashTags"
<input type="text" class="form-control form-control-sm" id="hashTags" name="hashTags" th:value="${faRpt.hashTags}"
placeholder="띄어쓰기로 각 태그를 구분합니다. 한 태그 내에서는 띄어쓰기 없이 입력해주세요. ex)태그1 태그2">
</div>
</div>
@ -89,6 +90,31 @@
<hr class="my-1">
<div class="row">
<div class="col-12" id="readUserRow">
<th:block th:each="readUser, idx:${faRpt.readUserList}">
<div class="row my-1 readUserRow">
<input type="hidden" class="userSeq" th:value="${readUser.userSeq}">
<input type="hidden" class="ogCd" th:value="${readUser.ogCd}">
<input type="hidden" class="ofcCd" th:value="${readUser.ofcCd}">
<input type="hidden" class="titleCd" th:value="${readUser.titleCd}">
<input type="hidden" class="userNm" th:value="${readUser.userNm}">
<div class="col-1 rowSeq" th:text="${idx.index+1}"></div>
<div class="col-9">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd eq readUser.ogCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<th:block th:if="${commonCode.itemCd eq readUser.ofcCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<!--<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq readUser.titleCd}" th:text="|${commonCode.itemValue} ${readUser.userNm}|"></th:block>
</th:block>-->
<th:block th:text="${readUser.userNm}"></th:block>
</div>
<div class="col-2">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>
</th:block>
</div>
</div>
</div>

View File

@ -10,76 +10,117 @@
<div class="mb-3 row">
<label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-4">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" name="wrtUserNm" th:value="${faRpt.wrtUserNm}" readonly>
<input type="hidden" id="faRptKey" th:value="${faRpt.faRptKey}">
<input type="hidden" id="wrtUserSeq" th:value="${faRpt.wrtUserSeq}">
<input type="hidden" id="wrtOrgan" th:value="${faRpt.wrtOrgan}">
<input type="hidden" id="wrtPart" th:value="${faRpt.wrtPart}">
<input type="hidden" id="wrtUserGrd" th:value="${faRpt.wrtUserGrd}">
<input type="text" class="form-control form-control-sm border-0" id="wrtUserNm" name="wrtUserNm" th:value="${faRpt.wrtUserNm}" readonly>
</div>
<label for="wrtDt" class="col-sm-2 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-4">
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(faRpt.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
<input type="text" class="form-control form-control-sm border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(faRpt.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="faRptType" name="faRptType">
<option value="">선택해주세요.</option>
<th:block th:each="frCategory:${frCategoryList}">
<option th:value="${frCategory.itemCd}" th:text="${frCategory.itemValue}" th:selected="${frCategory.itemCd eq faRpt.faRptType}"></option>
<th:block th:each="code:${session.commonCode.get('FRC')}">
<th:block th:if="${code.itemCd eq faRpt.faRptType}">
<input type="text" class="form-control form-control-sm border-0" id="faRptType" th:value="${code.itemValue}" readonly>
</th:block>
</select>
</th:block>
</div>
<label for="status" class="col-sm-2 col-form-label col-form-label-sm text-center">상태</label>
<div class="col-sm-4">
<th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq faRpt.status}">
<input type="text" class="form-control form-control-sm border-0" id="status" th:value="${code.itemValue}" readonly>
</th:block>
</th:block>
</div>
</div>
<div class="mb-3 row">
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm" id="title" name="title" th:value="${faRpt.title}">
<input type="text" class="form-control form-control-sm border-0" id="title" name="title" th:value="${faRpt.title}" readonly>
</div>
</div>
<div class="mb-3 row justify-content-center">
<label for="content" class="col-sm-2 col-form-label col-form-label-sm text-center">내용</label>
<div class="col-sm-10">
<textarea type='text' id="content" name='content' th:utext="${faRpt.content}"></textarea>
<div class="col-sm-10" id="content" th:utext="${faRpt.content}">
</div>
</div>
<div class="mb-3 row">
<label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm" id="hashTags" name="hashTags"
placeholder="띄어쓰기로 각 태그를 구분합니다. 한 태그 내에서는 띄어쓰기 없이 입력해주세요. ex)태그1 태그2">
<input type="text" class="form-control form-control-sm border-0" id="hashTags" name="hashTags" th:value="${faRpt.hashTags}" readonly>
</div>
</div>
<div class="row mb-3">
<label for="fileInputer" class="col-sm-2 col-form-label col-form-label-sm text-center">업로드 자료</label>
<div class="col-sm-10" style="min-height: 70px;">
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
<th:block th:if="${#arrays.isEmpty(faRpt.fileList)}">
<br>파일을 업로드 해주세요.
<label for="fileTable" class="col-sm-2 col-form-label col-form-label-sm text-center">업로드 자료</label>
<div class="col-sm-10">
<table class="table" id="fileTable">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(faRpt.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#arrays.isEmpty(faRpt.fileList)}">
<div class='row-col-6' th:each="faRptFile:${faRpt.fileList}">
<span th:data-fileseq="${faRptFile.fileSeq}" th:text="|${faRptFile.origNm}.${faRptFile.fileExtn} ${faRptFile.fileSize}|"></span>
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
</div>
<th:block th:unless="${#lists.isEmpty(faRpt.fileList)}">
<th:block th:each="file:${faRpt.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="faRpt"
th:data-parentkey="${file.faRptKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
</th:block>
</div>
</tbody>
</table>
</div>
<input type="file" class="d-none" id="fileInputer" multiple>
</div>
</div>
<div class="col-4">
<div class="row">
<div class="col-12 pb-2">
<div class="row justify-content-between">
<div class="row justify-content-start">
<div class="col-auto">■ 수신자</div>
<div class="col-auto"><button type="button" class="btn btn-sm btn-info" id="addReadUserBtn">추가</button></div>
</div>
</div>
<div class="col-1">no</div>
<div class="col-9">수신자</div>
<div class="col-2">삭제</div>
<div class="col-2">열람</div>
</div>
<hr class="my-1">
<div class="row">
<div class="col-12" id="readUserRow">
<div class="col-12">
<th:block th:each="readUser, idx:${faRpt.readUserList}">
<div class="row my-1">
<div class="col-1" th:text="${idx.index+1}"></div>
<div class="col-9">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd eq readUser.ogCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<th:block th:if="${commonCode.itemCd eq readUser.ofcCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<!--<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq readUser.titleCd}" th:text="|${commonCode.itemValue} ${readUser.userNm}|"></th:block>
</th:block>-->
<th:block th:text="${readUser.userNm}"></th:block>
</div>
<div class="col-2">
<th:block th:text="${readUser.readYn eq 'T'?'O':'X'}"></th:block>
</div>
</div>
</th:block>
</div>
</div>
</div>
@ -89,5 +130,8 @@
<th:block th:if="${userSeq eq faRpt.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editFaRptBtn" th:data-farptkey="${faRpt.faRptKey}">수정</button>
</th:block>
<th:block th:if="${userSeq ne faRpt.wrtUserSeq}">
<button type="button" class="btn btn-success" id="reSendBtn" th:data-farptkey="${faRpt.faRptKey}">회신</button>
</th:block>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>

View File

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<th:block th:each="readUser, idx:${userList}">
<div class="row my-1 readUserRow" th:id="|row${idx.index}|">
<input type="hidden" class="userSeq" th:name="${#strings.concat('readUserList[', idx.index,'].userSeq')}" th:value="${readUser.userSeq}">
<input type="hidden" class="ogCd" th:name="${#strings.concat('readUserList[', idx.index,'].ogCd')}" th:value="${readUser.ogCd}">
<input type="hidden" class="ofcCd" th:name="${#strings.concat('readUserList[', idx.index,'].ofcCd')}" th:value="${readUser.ofcCd}">
<input type="hidden" class="titleCd" th:name="${#strings.concat('readUserList[', idx.index,'].titleCd')}" th:value="${readUser.titleCd}">
<input type="hidden" class="userNm" th:name="${#strings.concat('readUserList[', idx.index,'].userNm')}" th:value="${readUser.userNm}">
<div class="col-1 rowSeq" th:text="${idx.index+1}"></div>
<th:block th:each="readUser:${userList}">
<div class="row my-1 readUserRow">
<input type="hidden" class="userSeq" th:value="${readUser.userSeq}">
<input type="hidden" class="ogCd" th:value="${readUser.ogCd}">
<input type="hidden" class="ofcCd" th:value="${readUser.ofcCd}">
<input type="hidden" class="titleCd" th:value="${readUser.titleCd}">
<input type="hidden" class="userNm" th:value="${readUser.userNm}">
<div class="col-1 rowSeq"></div>
<div class="col-9">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd eq readUser.ogCd}" th:text="${commonCode.itemValue}"></th:block>

View File

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">국제여객선 등록</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="partInfoSave" method="post">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<h5 class="text-center">항로</h5>
<div class="mb-2 row">
<label for="startPoint" class="col-sm-2 col-form-label text-center">출발</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="startPoint" name="startPoint" placeholder="직접입력">
</div>
<label for="endPoint" class="col-sm-2 col-form-label text-center">도착</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="endPoint" name="endPoint" placeholder="직접입력">
</div>
</div>
<div class="mb-2 row">
<label for="distanceNm" class="col-sm-2 col-form-label text-center">거리(해리)</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="distanceNm" name="distanceNm" placeholder="직접입력">
</div>
<label for="distanceKm" class="col-sm-2 col-form-label text-center">거리(KM)</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="distanceKm" name="distanceKm" placeholder="직접입력">
</div>
</div>
<br><br>
<div class="mb-3 row">
<label for="shipWeight" class="col-sm-2 col-form-label text-center">국제총톤 수</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="shipWeight" name="shipWeight" placeholder="직접입력">
</div>
<label for="passengerCnt" class="col-sm-2 col-form-label text-center">여객</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="passengerCnt" name="passengerCnt" placeholder="직접입력">
</div>
<label for="freightCnt" class="col-sm-2 col-form-label text-center">화물</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="freightCnt" name="freightCnt" placeholder="직접입력">
</div>
</div>
<br><br>
<div class="mb-4 row">
<label for="ownerNm" class="col-sm-2 col-form-label text-center">사업자</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="ownerNm" name="ownerNm" placeholder="직접입력">
</div>
<label for="shipNm" class="col-sm-2 col-form-label text-center">선명</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="shipNm" name="shipNm" placeholder="직접입력">
</div>
<label for="operationCnt" class="col-sm-2 col-form-label text-center">운항횟수</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="operationCnt" name="operationCnt" placeholder="직접입력">
</div>
</div>
<div class="mb-1 row">
<label for="closeYn" class="col-sm-2 col-form-label text-center">휴항</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="closeYn" name="closeYn" placeholder="직접입력">
</div>
</div>
<div class="mb-1 row">
<label for="description" class="col-sm-2 col-form-label text-center">비고</label>
<div class="col-sm-4">
<textarea id="description" name="description" rows="4" cols="50"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer justify-content-between">
<div class="col-auto">
<button type="button" id="btn-close" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" id="savePartInfo">저장</button>
</div>
</div>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/fipTarget/shipInfo.js}"></script>
</th:block>
<div layout:fragment="content">
<main class="pt-3">
<h4>국제여객선 목록</h4>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row mx-0">
<div class="col-12 card text-center">
<div class="card-body">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${searchParams.siType eq 'KRCN'?' active':''}" id="krcnTab" data-bs-toggle="tab" type="button" role="tab">한-중 국제여객선 현황</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${searchParams.siType eq 'KRJPRU'?' active':''}" id="krjpruTab" data-bs-toggle="tab" type="button" role="tab">한-일,러 국제여객선 현황</button>
</li>
</ul>
<form method="get" th:action="@{/equip/List}">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between pe-3 py-1">
<div class="col-auto">
<select class="form-select" name="rowCnt" id="rowCnt">
<th:block th:each="num : ${#numbers.sequence(1,5)}">
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<input type="text" class="form-control form-control-sm">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
<div class="row justify-content-start">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th>항로</th>
<th>사업자<br>(한국대리점)</th>
<th>선명</th>
<th>국제<br>총톤수</th>
<th>수송능력</th>
<th>운항횟수</th>
<th>휴항</th>
<th>최종수정일</th>
</tr>
</thead>
<tbody>
<tr>
</tr>
</tbody>
</table>
</div>
<div class="row justify-content-center">
<div class="col-auto">
<nav aria-label="Page navigation">
<ul class="pagination">
<th:block th:if="${searchParams.pageIndex>3}">
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
</th:block>
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex==num?'active':''}">
<a class="page-link" href="#" th:text="${num}"></a>
</li>
</th:block>
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</nav>
</div>
</div>
<div class="col-auto">
<input type="button" class="btn btn-primary" value="등록" id="addKRCN" th:if="${accessAuth != 'ACC001'} and ${searchParams.siType eq 'KRCN'}">
<input type="button" class="btn btn-primary" value="등록" id="addKRJPRU" th:if="${accessAuth != 'ACC001'} and ${searchParams.siType eq 'KRJPRU'}">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<div class="modal fade" id="ipShipModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content" id="ipShipModalContent">
</div>
</div>
</div>
</div>
</html>

View File

@ -5,6 +5,9 @@
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/affair/statistics.js}"></script>
</th:block>
<th:block layout:fragment="css">
<link rel="stylesheet" th:href="@{/css/affair/affair.css}">
</th:block>
<div layout:fragment="content">
<main class="pt-3">
<h4>견문통계</h4>
@ -14,10 +17,11 @@
<div class="col-12 card text-center">
<div class="card-body">
<div class="col-auto">
<button id="downExcel">엑셀다운</button>
</div>
<div class="tab-content border border-top-0 p-2">
<form id="searchFm" method="get" th:action="@{/affair/statistics}">
<form id="searchFm" class="statisticsMenu">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row pe-3 py-1">
<div class="col-auto">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
@ -25,146 +29,82 @@
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div>
</div>
<div class="col-auto">
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userNm" placeholder="보고자명" autocomplete="off">
</div>
</div>
<div class="row pe-3 py-1">
<div class="col-auto affair-scroll">
<h4>소속<input id="organAll" type="checkbox" checked></h4>
<ul class="select_list" th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<li>
<input id="category11" name="organList" type="checkbox" th:value="${commonCode.itemCd}" th:if="${#lists.isEmpty(searchParams.organList)}">
<input id="category11" name="organList" type="checkbox" th:value="${commonCode.itemCd}" th:checked="${#lists.contains(searchParams.organList, commonCode.itemCd)}" th:unless="${#lists.isEmpty(searchParams.organList)}">
<label th:text="${commonCode.itemValue}"></label>
<input th:id="|organ${commonCode.itemCd}|" name="organList" type="checkbox" th:value="${commonCode.itemCd}" checked>
<label th:for="|organ${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
</li>
</th:block>
</ul>
</th:block>
</div>
<div class="row justify-content-end pb-1">
<div class="col-auto" style="overflow: auto">
<div class="col-auto affair-scroll">
<h4>평가<input id="ratingAll" type="checkbox" checked></h4>
<ul class="select_list" th:each="commonCode:${session.commonCode.get('AAR')}">
<li>
<input th:id="|rating${commonCode.itemCd}|" name="rating" type="checkbox" th:value="${commonCode.itemCd}" checked>
<label th:for="|rating${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
</li>
</ul>
</div>
<div class="col-auto affair-scroll">
<h4>분야1<input id="category1All" type="checkbox" checked></h4>
<ul class="select_list" th:each="commonCode:${session.commonCode.get('DC01')}">
<li>
<input th:id="|category1${commonCode.itemCd}|" name="category1" type="checkbox" th:value="${commonCode.itemCd}" th:if="${#lists.isEmpty(searchParams.category1)}">
<input th:id="|category1${commonCode.itemCd}|" name="category1" type="checkbox" th:value="${commonCode.itemCd}" th:checked="${#lists.contains(searchParams.category1, commonCode.itemCd)}" th:unless="${#lists.isEmpty(searchParams.category1)}">
<input th:id="|category1${commonCode.itemCd}|" name="category1" type="checkbox" th:value="${commonCode.itemCd}" checked>
<label th:for="|category1${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
</li>
</ul>
</div>
<div class="col-auto">
<div class="col-auto affair-scroll">
<h4>분야2<input id="category2All" type="checkbox" checked></h4>
<ul class="select_list" th:each="commonCode:${session.commonCode.get('DC02')}">
<li>
<input id="category11" name="category2" type="checkbox" th:value="${commonCode.itemCd}" th:if="${#lists.isEmpty(searchParams.category2)}">
<input id="category11" name="category2" type="checkbox" th:value="${commonCode.itemCd}" th:checked="${#lists.contains(searchParams.category2, commonCode.itemCd)}" th:unless="${#lists.isEmpty(searchParams.category2)}">
<label th:text="${commonCode.itemValue}"></label>
<input th:id="|category2${commonCode.itemCd}|" name="category2" type="checkbox" th:value="${commonCode.itemCd}" checked>
<label th:for="|category2${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
</li>
</ul>
</div>
<div class="col-auto">
<div class="col-auto affair-scroll">
<h4>분야3<input id="category3All" type="checkbox" checked></h4>
<ul class="select_list" th:each="commonCode:${session.commonCode.get('DC03')}">
<li>
<input id="category11" name="category3" type="checkbox" th:value="${commonCode.itemCd}" th:if="${#lists.isEmpty(searchParams.category3)}">
<input id="category11" name="category3" type="checkbox" th:value="${commonCode.itemCd}" th:checked="${#lists.contains(searchParams.category3, commonCode.itemCd)}" th:unless="${#lists.isEmpty(searchParams.category3)}">
<label th:text="${commonCode.itemValue}"></label>
<input th:id="|category3${commonCode.itemCd}|" name="category3" type="checkbox" th:value="${commonCode.itemCd}" checked>
<label th:for=|category3${commonCode.itemCd}| th:text="${commonCode.itemValue}"></label>
</li>
</ul>
</div>
<div class="col-auto affair-scroll">
<h4>분야4<input id="category4All" type="checkbox" checked></h4>
<ul class="select_list" th:each="commonCode:${session.commonCode.get('DC04')}">
<li>
<input th:id="|category4${commonCode.itemCd}|" name="category4" type="checkbox" th:value="${commonCode.itemCd}" checked>
<label th:for="|category4${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
</li>
</ul>
</div>
<div class="col-auto">
<ul class="select_list" th:each="commonCode:${session.commonCode.get('DC04')}">
<li>
<input id="category11" name="category4" type="checkbox" th:value="${commonCode.itemCd}" th:if="${#lists.isEmpty(searchParams.category4)}">
<input id="category11" name="category4" type="checkbox" th:value="${commonCode.itemCd}" th:checked="${#lists.contains(searchParams.category4, commonCode.itemCd)}" th:unless="${#lists.isEmpty(searchParams.category4)}">
<label th:text="${commonCode.itemValue}"></label>
</li>
</ul>
<input id="category11" name="sangbo" type="checkbox" value="OGC003">경찰서상보<br>
<input id="category11" name="sangbo" type="checkbox" value="OGC002">지방청상보
</div>
</div>
<div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-lg btn-primary col-auto" id="searchBtn" value="검색">
<button type="button" id="fieldSearch" class="btn btn-lg btn-primary col-auto">분야별 검색</button>
<button type="button" id="ratingSearch" class="btn btn-lg btn-primary col-auto">평가별 검색</button>
</div>
</div>
</form>
<div class="row justify-content-start">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-hover" id="tableData">
<thead>
<tr>
<th rowspan="2">구분</th>
<th rowspan="2">누계</th>
<th:block th:unless="${#lists.isEmpty(type1)}">
<th th:colspan="${type1.size()}">분류1</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(type2)}">
<th th:colspan="${type2.size()}">분류2</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(type3)}">
<th th:colspan="${type3.size()}">분류3</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(type4)}">
<th th:colspan="${type4.size()}">분류4</th>
</th:block>
</tr>
<tr>
<th:block th:unless="${#lists.isEmpty(type1)}">
<th:block th:each="type1:${type1}">
<th th:text="${type1.itemValue}"></th>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(type2)}">
<th:block th:each="type2:${type2}">
<th th:text="${type2.itemValue}"></th>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(type3)}">
<th:block th:each="type3:${type3}">
<th th:text="${type3.itemValue}"></th>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(type4)}">
<th:block th:each="type4:${type4}">
<th th:text="${type4.itemValue}"></th>
</th:block>
</th:block>
</tr>
</thead>
<tbody>
<th:block th:each="total:${totalList}">
<tr>
<td th:text="${total.itemValue}"></td>
<td th:text="${total.cnt}"></td>
<th:block th:each="commonCode:${type1}">
<th:block th:each="type1:${type1List}">
<th:block th:if="${type1.affairType eq commonCode.affairType} and ${total.wrtOrgan eq type1.wrtOrgan}">
<td th:text="${type1.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="commonCode:${type2}">
<th:block th:each="type2:${type2List}">
<th:block th:if="${type2.affairType eq commonCode.affairType} and ${total.wrtOrgan eq type2.wrtOrgan}">
<td th:text="${type2.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="commonCode:${type3}">
<th:block th:each="type3:${type3List}">
<th:block th:if="${type3.affairType eq commonCode.affairType} and ${total.wrtOrgan eq type3.wrtOrgan}">
<td th:text="${type3.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="commonCode:${type4}">
<th:block th:each="type4:${type4List}">
<th:block th:if="${type4.affairType eq commonCode.affairType} and ${total.wrtOrgan eq type4.wrtOrgan}">
<td th:text="${type4.cnt}"></td>
</th:block>
</th:block>
</th:block>
</tr>
</th:block>
</tbody>
</table>
</div>
</div>
<div class="card" id="statisticsBody" style="display:none;">
</div>
</div>
</div>

View File

@ -0,0 +1,111 @@
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" 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>
</ul>
<div class="card-body">
<button id="showMenu">검색조건열기</button>
<button id="fieldDownExcel">엑셀다운</button>
<div class="row" id="statisticsDiv">
<table class="table table-hover table-bordered border-dark"
id="tableData">
<thead>
<tr>
<th rowspan="2">구분</th>
<th rowspan="2">누계</th>
<th:block th:unless="${#lists.isEmpty(searchParams.category1)}">
<th th:colspan="${searchParams.category1.size()}">분류1</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.category2)}">
<th th:colspan="${searchParams.category2.size()}">분류2</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.category3)}">
<th th:colspan="${searchParams.category3.size()}">분류3</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.category4)}">
<th th:colspan="${searchParams.category4.size()}">분류4</th>
</th:block>
</tr>
<tr>
<th:block th:unless="${#lists.isEmpty(searchParams.category1)}">
<th:block th:each="commonCode:${session.commonCode.get('DC01')}">
<th:block
th:if="${#lists.contains(searchParams.category1, commonCode.itemCd)}">
<th th:text="${commonCode.itemValue}"></th>
</th:block>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.category2)}">
<th:block th:each="commonCode:${session.commonCode.get('DC02')}">
<th:block
th:if="${#lists.contains(searchParams.category2, commonCode.itemCd)}">
<th th:text="${commonCode.itemValue}"></th>
</th:block>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.category3)}">
<th:block th:each="commonCode:${session.commonCode.get('DC03')}">
<th:block
th:if="${#lists.contains(searchParams.category3, commonCode.itemCd)}">
<th th:text="${commonCode.itemValue}"></th>
</th:block>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.category4)}">
<th:block th:each="commonCode:${session.commonCode.get('DC04')}">
<th:block
th:if="${#lists.contains(searchParams.category4, commonCode.itemCd)}">
<th th:text="${commonCode.itemValue}"></th>
</th:block>
</th:block>
</th:block>
</tr>
</thead>
<tbody>
<th:block th:each="total:${totalList}">
<tr>
<td th:text="${total.itemValue}"></td>
<td th:text="${total.cnt}"></td>
<th:block th:each="category1:${searchParams.category1}">
<th:block th:each="type1List:${type1List}">
<th:block
th:if="${type1List.affairType eq category1} and ${total.wrtOrgan eq type1List.wrtOrgan}">
<td th:text="${type1List.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="category2:${searchParams.category2}">
<th:block th:each="type2List:${type2List}">
<th:block
th:if="${type2List.affairType eq category2} and ${total.wrtOrgan eq type2List.wrtOrgan}">
<td th:text="${type2List.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="category3:${searchParams.category3}">
<th:block th:each="type3List:${type3List}">
<th:block
th:if="${type3List.affairType eq category3} and ${total.wrtOrgan eq type3List.wrtOrgan}">
<td th:text="${type3List.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="category4:${searchParams.category4}">
<th:block th:each="type4List:${type4List}">
<th:block
th:if="${type4List.affairType eq category4} and ${total.wrtOrgan eq type4List.wrtOrgan}">
<td th:text="${type4List.cnt}"></td>
</th:block>
</th:block>
</th:block>
</tr>
</th:block>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,71 @@
<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 active" id="ratingTab" data-bs-toggle="tab"
type="button" role="tab">평가별</button>
</li>
</ul>
<div class="card-body">
<button id="showMenu">검색조건열기</button>
<button id="ratingDownExcel">엑셀다운</button>
<div class="row" id="statisticsDiv">
<table class="table table-hover table-bordered border-dark"
id="tableData">
<thead>
<tr>
<th rowspan="2">구분</th>
<th rowspan="2">누계</th>
<th:block th:unless="${#lists.isEmpty(searchParams.sangbo)}">
<th th:colspan="${searchParams.sangbo.size()}">상보</th>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.rating)}">
<th th:colspan="${searchParams.rating.size()}">평과결과별</th>
</th:block>
</tr>
<tr>
<th:block th:unless="${#lists.isEmpty(searchParams.sangbo)}">
<th:block th:each="sangbo:${searchParams.sangbo}">
<th th:if="${sangbo eq 'OGC002'}">지방청</th>
<th th:if="${sangbo eq 'OGC003'}">경찰서</th>
</th:block>
</th:block>
<th:block th:unless="${#lists.isEmpty(searchParams.rating)}">
<th:block th:each="commonCode:${session.commonCode.get('AAR')}">
<th:block
th:if="${#lists.contains(searchParams.rating, commonCode.itemCd)}">
<th th:text="${commonCode.itemValue}"></th>
</th:block>
</th:block>
</th:block>
</tr>
</thead>
<tbody>
<th:block th:each="total:${totalList}">
<tr>
<td th:text="${total.itemValue}"></td>
<td th:text="${total.cnt}"></td>
<th:block th:each="sangbo:${searchParams.sangbo}">
<th:block th:each="sangboList:${sangboList}">
<th:block
th:if="${sangboList.affairType eq sangbo} and ${total.wrtOrgan eq sangboList.wrtOrgan}">
<td th:text="${sangboList.cnt}"></td>
</th:block>
</th:block>
</th:block>
<th:block th:each="rating:${searchParams.rating}">
<th:block th:each="arrCntList:${arrCntList}">
<th:block
th:if="${arrCntList.affairType eq rating} and ${total.wrtOrgan eq arrCntList.wrtOrgan}">
<td th:text="${arrCntList.cnt}"></td>
</th:block>
</th:block>
</th:block>
</tr>
</th:block>
</tbody>
</table>
</div>
</div>

View File

@ -63,6 +63,9 @@
<div id="fadeDiv" style="display: none;">
<div class="p-5 rounded"><h1>저장중입니다.</h1></div>
</div>
<div id="fadeSearchDiv" style="display: none;">
<div class="p-5 rounded"><h1>조회중입니다.</h1></div>
</div>
<th:block layout:fragment="modal"></th:block>
</body>
</html>