Compare commits

..

2 Commits

21 changed files with 368 additions and 128 deletions

View File

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

View File

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

View File

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

View File

@ -60,6 +60,10 @@ public class FaRptBoard extends BaseModel {
@Transient @Transient
private Integer fileCnt; private Integer fileCnt;
@Transient @Transient
private Integer readCnt;
@Transient
private Integer userCnt;
@Transient
private List<FaRptFile> fileList; private List<FaRptFile> fileList;
@Transient @Transient
private List<FaRptReadUser> readUserList; 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.FaRptBoard;
import com.dbnt.faisp.faRpt.model.FaRptFile; import com.dbnt.faisp.faRpt.model.FaRptFile;
import com.dbnt.faisp.faRpt.model.FaRptReadUser; 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.FaRptBoardRepository;
import com.dbnt.faisp.faRpt.repository.FaRptFileRepository; import com.dbnt.faisp.faRpt.repository.FaRptFileRepository;
import com.dbnt.faisp.faRpt.repository.FaRptReadUserRepository; import com.dbnt.faisp.faRpt.repository.FaRptReadUserRepository;
import com.dbnt.faisp.publicBoard.model.PublicBoard; import com.dbnt.faisp.faRpt.repository.HashTagLinkFaRptRepository;
import com.dbnt.faisp.publicBoard.model.PublicComment; import com.dbnt.faisp.hashTag.service.HashTagService;
import com.dbnt.faisp.publicBoard.model.PublicFile;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -25,9 +25,11 @@ import java.util.UUID;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class FaRptService extends BaseService { public class FaRptService extends BaseService {
private final HashTagService hashTagService;
private final FaRptBoardRepository faRptBoardRepository; private final FaRptBoardRepository faRptBoardRepository;
private final FaRptFileRepository faRptFileRepository; private final FaRptFileRepository faRptFileRepository;
private final FaRptReadUserRepository faRptReadUserRepository; private final FaRptReadUserRepository faRptReadUserRepository;
private final HashTagLinkFaRptRepository hashTagLinkFaRptRepository;
private final FaRptMapper faRptMapper; private final FaRptMapper faRptMapper;
@ -51,13 +53,28 @@ public class FaRptService extends BaseService {
if(faRptBoard.getReadUserList() != null){ if(faRptBoard.getReadUserList() != null){
saveFaRptReadUser(faRptKey, faRptBoard.getReadUserList()); saveFaRptReadUser(faRptKey, faRptBoard.getReadUserList());
} }
if(!faRptBoard.getHashTags().isEmpty()){
saveHashTagLink(faRptKey, faRptBoard.getHashTags().split(" "));
}
return faRptKey; return faRptKey;
} }
public FaRptBoard selectFaRptBoard(Integer faRptKey) { @Transactional
public FaRptBoard selectFaRptBoard(Integer faRptKey, Integer userSeq) {
FaRptBoard faRptBoard = faRptBoardRepository.findById(faRptKey).orElse(null); FaRptBoard faRptBoard = faRptBoardRepository.findById(faRptKey).orElse(null);
if(faRptBoard != null){
faRptBoard.setFileList(faRptFileRepository.findByFaRptKey(faRptKey)); faRptBoard.setFileList(faRptFileRepository.findByFaRptKey(faRptKey));
faRptBoard.setHashTags(faRptMapper.selectHashTags(faRptKey));
faRptBoard.setReadUserList(faRptReadUserRepository.findByFaRptKey(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; 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.config.FileInfo;
import com.dbnt.faisp.fpiMgt.affair.mapper.AffairMapper; import com.dbnt.faisp.fpiMgt.affair.mapper.AffairMapper;
import com.dbnt.faisp.fpiMgt.affair.model.*; import com.dbnt.faisp.fpiMgt.affair.model.*;
import com.dbnt.faisp.fpiMgt.affair.repository.*; import com.dbnt.faisp.fpiMgt.affair.repository.*;
import com.dbnt.faisp.hashTag.service.HashTagService;
import com.dbnt.faisp.userInfo.model.UserInfo; import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -20,10 +21,10 @@ import java.util.UUID;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class AffairService extends BaseService { // 견문보고 public class AffairService extends BaseService { // 견문보고
private final HashTagService hashTagService;
private final AffairBoardRepository affairBoardRepository; private final AffairBoardRepository affairBoardRepository;
private final AffairFileRepository affairFileRepository; private final AffairFileRepository affairFileRepository;
private final AffairRatingRepository affairRatingRepository; private final AffairRatingRepository affairRatingRepository;
private final HashTagRepository hashTagRepository;
private final HashTagLinkRepository hashTagLinkRepository; private final HashTagLinkRepository hashTagLinkRepository;
private final AffairMapper affairMapper; private final AffairMapper affairMapper;
@ -46,9 +47,8 @@ public class AffairService extends BaseService { // 견문보고
@Transactional @Transactional
public Integer saveAffairBoard(AffairBoard affair, List<Integer> deleteFileSeq){ public Integer saveAffairBoard(AffairBoard affair, List<Integer> deleteFileSeq){
Integer affairKey = affairBoardRepository.save(affair).getAffairKey(); Integer affairKey = affairBoardRepository.save(affair).getAffairKey();
String[] hashTagAry = affair.getHashTags().split(" "); if(!affair.getHashTags().isEmpty()){
if(hashTagAry.length>0){ saveHashTagLink(affairKey, affair.getHashTags().split(" "));
saveHashTagLink(affairKey, hashTagAry);
} }
if(deleteFileSeq != null && deleteFileSeq.size()>0){ if(deleteFileSeq != null && deleteFileSeq.size()>0){
deleteAffairFile(affairKey, deleteFileSeq); deleteAffairFile(affairKey, deleteFileSeq);
@ -72,18 +72,9 @@ public class AffairService extends BaseService { // 견문보고
private void saveHashTagLink(Integer affairKey, String[] hashTagAry){ private void saveHashTagLink(Integer affairKey, String[] hashTagAry){
hashTagLinkRepository.deleteByAffairKey(affairKey); hashTagLinkRepository.deleteByAffairKey(affairKey);
for(String tagNm : hashTagAry){ 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 hashTagLink = new HashTagLink();
hashTagLink.setAffairKey(affairKey); hashTagLink.setAffairKey(affairKey);
hashTagLink.setTagKey(tagKey); hashTagLink.setTagKey(hashTagService.selectTagKey(tagNm));
hashTagLinkRepository.save(hashTagLink); hashTagLinkRepository.save(hashTagLink);
} }
} }

View File

@ -1,4 +1,4 @@
package com.dbnt.faisp.fpiMgt.affair.model; package com.dbnt.faisp.hashTag.model;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; 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 org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional; 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.BaseService;
import com.dbnt.faisp.config.FileInfo; import com.dbnt.faisp.config.FileInfo;
import com.dbnt.faisp.fpiMgt.affair.model.HashTag; import com.dbnt.faisp.hashTag.service.HashTagService;
import com.dbnt.faisp.fpiMgt.affair.repository.HashTagRepository;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper; import com.dbnt.faisp.ivsgtMgt.boardInvestigation.mapper.BoardInvestigationMapper;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.*; import com.dbnt.faisp.ivsgtMgt.boardInvestigation.model.*;
import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.*; import com.dbnt.faisp.ivsgtMgt.boardInvestigation.repository.*;
@ -21,11 +20,11 @@ import java.util.UUID;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class BoardInvestigationService extends BaseService { public class BoardInvestigationService extends BaseService {
private final HashTagService hashTagService;
private final BoardInvestigationRepository boardInvestigationRepository; private final BoardInvestigationRepository boardInvestigationRepository;
private final IvsgtFileRepository ivsgtFileRepository; private final IvsgtFileRepository ivsgtFileRepository;
private final ArrestTypeRepository arrestTypeRepository; private final ArrestTypeRepository arrestTypeRepository;
private final RelatedReportsRepository relatedReportsRepository; private final RelatedReportsRepository relatedReportsRepository;
private final HashTagRepository hashTagRepository;
private final HashTagLinkIvsgtRepository hashTagLinkIvsgtRepository; private final HashTagLinkIvsgtRepository hashTagLinkIvsgtRepository;
private final BoardInvestigationMapper boardInvestigationMapper; private final BoardInvestigationMapper boardInvestigationMapper;
@ -120,18 +119,9 @@ public class BoardInvestigationService extends BaseService {
private void saveHashTagLink(Integer ivsgtKey, String[] hashTagAry){ private void saveHashTagLink(Integer ivsgtKey, String[] hashTagAry){
hashTagLinkIvsgtRepository.deleteByIvsgtKey(ivsgtKey); hashTagLinkIvsgtRepository.deleteByIvsgtKey(ivsgtKey);
for(String tagNm : hashTagAry){ 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 hashTagLinkIvsgt = new HashTagLinkIvsgt();
hashTagLinkIvsgt.setIvsgtKey(ivsgtKey); hashTagLinkIvsgt.setIvsgtKey(ivsgtKey);
hashTagLinkIvsgt.setTagKey(tagKey); hashTagLinkIvsgt.setTagKey(hashTagService.selectTagKey(tagNm));
hashTagLinkIvsgtRepository.save(hashTagLinkIvsgt); hashTagLinkIvsgtRepository.save(hashTagLinkIvsgt);
} }
} }

View File

@ -109,13 +109,10 @@
<include refid="selectAffairBoardWhere"></include> <include refid="selectAffairBoardWhere"></include>
</select> </select>
<select id="selectHashTags" resultType="string" parameterType="int"> <select id="selectHashTags" resultType="string" parameterType="int">
select aa.hashTags select array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from (select a.affair_key,
array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from hash_tag_link a from hash_tag_link a
inner join hash_tag b on a.tag_key = b.tag_key inner join hash_tag b on a.tag_key = b.tag_key
where a.affair_key = #{affairKey} where a.affair_key = #{affairKey}
group by a.affair_key) aa
</select> </select>
<sql id="searchStatistics"> <sql id="searchStatistics">

View File

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

View File

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

View File

@ -17,20 +17,44 @@ $(document).on('click', '#allTab', function (){
}) })
$(document).on('click', '#addFaRptBtn', function (){ $(document).on('click', '#addFaRptBtn', function (){
getFaRptEditModal(null) getFaRptEditModal({faRptKey: null})
}) })
$(document).on('click', '#editFaRptBtn', function (){ $(document).on('click', '#editFaRptBtn', function (){
$("#faRptViewModal").modal('hide'); $("#faRptViewModal").modal('hide');
getFaRptEditModal(Number($(this).attr("data-farptkey"))); getFaRptEditModal({faRptKey: Number($(this).attr("data-farptkey"))});
}) })
$(document).on('click', '#addReadUserBtn', function (){ $(document).on('click', '#addReadUserBtn', function (){
searchModalSubmit(1); searchModalSubmit(1);
$("#userModal").modal('show'); $("#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 (){ $(document).on('click', '#saveFaRptBtn', function (){
saveFaRpt('DST002') saveFaRpt('DST007')
}) })
$(document).on('click', '#saveTempBtn', function (){ $(document).on('click', '#saveTempBtn', function (){
@ -45,7 +69,18 @@ $(document).on('click', '.faRptTr', function (){
} }
getFaRptViewModal(Number($(this).find(".faRptKey").val())); 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){ function getFaRptViewModal(faRptKey){
$.ajax({ $.ajax({
@ -63,10 +98,10 @@ function getFaRptViewModal(faRptKey){
}); });
} }
function getFaRptEditModal(faRptKey){ function getFaRptEditModal(faRpt){
$.ajax({ $.ajax({
url: '/faRpt/faRptEditModal', url: '/faRpt/faRptEditModal',
data: {faRptKey: faRptKey}, data: faRpt,
type: 'GET', type: 'GET',
dataType:"html", dataType:"html",
success: function(html){ success: function(html){
@ -99,13 +134,20 @@ function getFaRptEditModal(faRptKey){
function saveFaRpt(faRptState){ function saveFaRpt(faRptState){
if(contentCheck()){ if(contentCheck()){
if(confirm("저장하시겠습니까?")){ if(confirm("저장하시겠습니까?")){
$("#faRptState").val(faRptState); $("#status").val(faRptState);
contentFade("in"); contentFade("in");
const formData = new FormData($("#faRptEditForm")[0]); const formData = new FormData($("#faRptEditForm")[0]);
for(const file of files) { for(const file of files) {
if(!file.isDelete) if(!file.isDelete)
formData.append('uploadFiles', file, file.name); 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){ $(".text-decoration-line-through").each(function (idx, el){
formData.append('fileSeq', $(el).attr("data-fileseq")); 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(){ function contentCheck(){
let flag = true; let flag = true;

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(){ function setSelectedChkBox(){
$.each(selectedList, function (idx, item){ $.each(selectedList, function (idx, item){
$(".userInfoCheckBox[value="+item.userSeq+"]").prop("checked", true); $(".userInfoCheckBox[value="+item.userSeq+"]").prop("checked", true);

View File

@ -42,23 +42,24 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<div class="row justify-content-end"> <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"> <select class="form-select form-select-sm" name="wrtOrgan">
<option value="">관서 선택</option> <option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <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> <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
</th:block> </th:block>
</th:block>
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}"> <input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
</div> </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'}"> <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}"> <input type="text" class="form-control form-control-sm" placeholder="작성자" name="wrtUserNm" th:value="${searchParams.wrtUserNm}">
</div> </div>
<div class="col-4"> <div class="col-auto">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv"> <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="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}"> <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> <thead>
<tr> <tr>
<th></th> <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> <th>작성자</th>
<th>작성일시</th> <th>작성일시</th>
<th>첨부파일</th> <th>첨부파일</th>
<th>열람수</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="faRptTr" th:each="faRpt:${faRptList}"> <tr class="faRptTr" th:each="faRpt:${faRptList}">
<input type="hidden" class="faRptKey" th:value="${faRpt.faRptKey}"> <input type="hidden" class="faRptKey" th:value="${faRpt.faRptKey}">
<td><input type="checkbox" class="trChkBox"></td> <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> <td th:text="${faRpt.title}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${faRpt.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <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="${faRpt.wrtUserNm}"></td>
<td th:text="${#temporals.format(faRpt.wrtDt, 'yyyy-MM-dd HH:mm')}"></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.fileCnt eq null?'파일 없음':#strings.concat(faRpt.fileCnt,' 건')}"></td>
<td th:text="|${faRpt.readCnt}/${faRpt.userCnt}|"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -14,6 +14,7 @@
<input type="hidden" name="wrtUserSeq" th:value="${faRpt.wrtUserSeq}"> <input type="hidden" name="wrtUserSeq" th:value="${faRpt.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${faRpt.wrtUserGrd}"> <input type="hidden" name="wrtUserGrd" th:value="${faRpt.wrtUserGrd}">
<input type="hidden" name="status" id="status" th:value="${faRpt.status}"> <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="row">
<div class="col-8"> <div class="col-8">
<div class="mb-3 row"> <div class="mb-3 row">
@ -52,7 +53,7 @@
<div class="mb-3 row"> <div class="mb-3 row">
<label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label> <label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label>
<div class="col-sm-10"> <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"> placeholder="띄어쓰기로 각 태그를 구분합니다. 한 태그 내에서는 띄어쓰기 없이 입력해주세요. ex)태그1 태그2">
</div> </div>
</div> </div>
@ -89,6 +90,31 @@
<hr class="my-1"> <hr class="my-1">
<div class="row"> <div class="row">
<div class="col-12" id="readUserRow"> <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> </div>
</div> </div>

View File

@ -10,76 +10,117 @@
<div class="mb-3 row"> <div class="mb-3 row">
<label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label> <label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-4"> <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> </div>
<label for="wrtDt" class="col-sm-2 col-form-label col-form-label-sm text-center">작성일시</label> <label for="wrtDt" class="col-sm-2 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-4"> <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> </div>
<div class="mb-3 row"> <div class="mb-3 row">
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label> <label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-select form-select-sm" id="faRptType" name="faRptType"> <th:block th:each="code:${session.commonCode.get('FRC')}">
<option value="">선택해주세요.</option> <th:block th:if="${code.itemCd eq faRpt.faRptType}">
<th:block th:each="frCategory:${frCategoryList}"> <input type="text" class="form-control form-control-sm border-0" id="faRptType" th:value="${code.itemValue}" readonly>
<option th:value="${frCategory.itemCd}" th:text="${frCategory.itemValue}" th:selected="${frCategory.itemCd eq faRpt.faRptType}"></option> </th:block>
</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> </th:block>
</select>
</div> </div>
</div> </div>
<div class="mb-3 row"> <div class="mb-3 row">
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label> <label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
<div class="col-sm-10"> <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> </div>
<div class="mb-3 row justify-content-center"> <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> <label for="content" class="col-sm-2 col-form-label col-form-label-sm text-center">내용</label>
<div class="col-sm-10"> <div class="col-sm-10" id="content" th:utext="${faRpt.content}">
<textarea type='text' id="content" name='content' th:utext="${faRpt.content}"></textarea>
</div> </div>
</div> </div>
<div class="mb-3 row"> <div class="mb-3 row">
<label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label> <label for="hashTags" class="col-sm-2 col-form-label col-form-label-sm text-center">해시태그</label>
<div class="col-sm-10"> <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 border-0" id="hashTags" name="hashTags" th:value="${faRpt.hashTags}" readonly>
placeholder="띄어쓰기로 각 태그를 구분합니다. 한 태그 내에서는 띄어쓰기 없이 입력해주세요. ex)태그1 태그2">
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<label for="fileInputer" class="col-sm-2 col-form-label col-form-label-sm text-center">업로드 자료</label> <label for="fileTable" 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="col-sm-10">
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv"> <table class="table" id="fileTable">
<th:block th:if="${#arrays.isEmpty(faRpt.fileList)}"> <thead>
<br>파일을 업로드 해주세요. <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:block th:unless="${#arrays.isEmpty(faRpt.fileList)}"> <th:block th:unless="${#lists.isEmpty(faRpt.fileList)}">
<div class='row-col-6' th:each="faRptFile:${faRpt.fileList}"> <th:block th:each="file:${faRpt.fileList}">
<span th:data-fileseq="${faRptFile.fileSeq}" th:text="|${faRptFile.origNm}.${faRptFile.fileExtn} ${faRptFile.fileSize}|"></span> <tr class="fileInfoTr">
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a> <td><a href="#" class="fileDownLink" data-board="faRpt"
</div> 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>
</th:block>
</tbody>
</table>
</div> </div>
</div> </div>
<input type="file" class="d-none" id="fileInputer" multiple>
</div>
</div> </div>
<div class="col-4"> <div class="col-4">
<div class="row"> <div class="row">
<div class="col-12 pb-2"> <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">■ 수신자</div>
<div class="col-auto"><button type="button" class="btn btn-sm btn-info" id="addReadUserBtn">추가</button></div>
</div> </div>
</div> </div>
<div class="col-1">no</div> <div class="col-1">no</div>
<div class="col-9">수신자</div> <div class="col-9">수신자</div>
<div class="col-2">삭제</div> <div class="col-2">열람</div>
</div> </div>
<hr class="my-1"> <hr class="my-1">
<div class="row"> <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> </div>
</div> </div>
@ -89,5 +130,8 @@
<th:block th:if="${userSeq eq faRpt.wrtUserSeq}"> <th:block th:if="${userSeq eq faRpt.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editFaRptBtn" th:data-farptkey="${faRpt.faRptKey}">수정</button> <button type="button" class="btn btn-warning" id="editFaRptBtn" th:data-farptkey="${faRpt.faRptKey}">수정</button>
</th:block> </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> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div> </div>

View File

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