fix : 방첩활동 중간저장

master
TaehunPark 2023-01-06 14:58:37 +09:00
parent cb59ccfd08
commit 90911da1ed
18 changed files with 481 additions and 231 deletions

View File

@ -148,6 +148,9 @@ public class FileController extends BaseService{
case "MajorFile" : case "MajorFile" :
downloadFile = majorStatusService.selectMajorFile(parentKey, fileSeq); downloadFile = majorStatusService.selectMajorFile(parentKey, fileSeq);
break; break;
case "ciActivity":
downloadFile = ciService.selectCiaForeignerFile(parentKey, fileSeq);
break;
} }
return downloadFile; return downloadFile;
} }

View File

@ -3,9 +3,12 @@ package com.dbnt.faisp.main.counterIntelligence;
import com.dbnt.faisp.main.authMgt.service.AuthMgtService; import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService; import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.main.counterIntelligence.model.CiWorkStatistics; import com.dbnt.faisp.main.counterIntelligence.model.CiWorkStatistics;
import com.dbnt.faisp.main.counterIntelligence.model.CiaFile;
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity; import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceActivity;
import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork; import com.dbnt.faisp.main.counterIntelligence.model.CounterIntelligenceWork;
import com.dbnt.faisp.main.counterIntelligence.service.CounterIntelligenceService; import com.dbnt.faisp.main.counterIntelligence.service.CounterIntelligenceService;
import com.dbnt.faisp.main.equip.model.Equip;
import com.dbnt.faisp.main.equip.model.EquipFile;
import com.dbnt.faisp.main.userInfo.model.UserInfo; import com.dbnt.faisp.main.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.annotation.AuthenticationPrincipal;
@ -13,9 +16,15 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/counterIntelligence") @RequestMapping("/counterIntelligence")
@ -119,6 +128,8 @@ public class CounterIntelligenceController {
mav.addObject("sdiList", ciService.selectCiaSaftyDemandList(cia)); mav.addObject("sdiList", ciService.selectCiaSaftyDemandList(cia));
cia.setContentCnt(ciService.selectCiaSaftyDemandListCnt(cia)); cia.setContentCnt(ciService.selectCiaSaftyDemandListCnt(cia));
cia.setPaginationInfo(); cia.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("loginUserSeq", loginUser.getUserSeq());
mav.addObject("searchParams", cia); mav.addObject("searchParams", cia);
return mav; return mav;
} }
@ -184,6 +195,8 @@ public class CounterIntelligenceController {
mav.addObject("mciList", ciService.selectCiaManageCompanyList(cia)); mav.addObject("mciList", ciService.selectCiaManageCompanyList(cia));
cia.setContentCnt(ciService.selectCiaManageCompanyListCnt(cia)); cia.setContentCnt(ciService.selectCiaManageCompanyListCnt(cia));
cia.setPaginationInfo(); cia.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("loginUserSeq", loginUser.getUserSeq());
mav.addObject("searchParams", cia); mav.addObject("searchParams", cia);
return mav; return mav;
} }
@ -218,6 +231,8 @@ public class CounterIntelligenceController {
mav.addObject("fiList", ciService.selectCiaForeignerList(cia)); mav.addObject("fiList", ciService.selectCiaForeignerList(cia));
cia.setContentCnt(ciService.selectCiaForeignerListCnt(cia)); cia.setContentCnt(ciService.selectCiaForeignerListCnt(cia));
cia.setPaginationInfo(); cia.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("loginUserSeq", loginUser.getUserSeq());
mav.addObject("searchParams", cia); mav.addObject("searchParams", cia);
return mav; return mav;
} }
@ -252,6 +267,8 @@ public class CounterIntelligenceController {
mav.addObject("eiList", ciService.selectCiaEduList(cia)); mav.addObject("eiList", ciService.selectCiaEduList(cia));
cia.setContentCnt(ciService.selectCiaEduListCnt(cia)); cia.setContentCnt(ciService.selectCiaEduListCnt(cia));
cia.setPaginationInfo(); cia.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("loginUserSeq", loginUser.getUserSeq());
mav.addObject("searchParams", cia); mav.addObject("searchParams", cia);
return mav; return mav;
} }
@ -277,4 +294,44 @@ public class CounterIntelligenceController {
return mav; return mav;
} }
@PostMapping("/deleteCounterIntelligenceActivity")
public void deleteCounterIntelligenceActivity(@AuthenticationPrincipal UserInfo loginUser, @RequestBody CounterIntelligenceActivity cia){
ciService.deleteCounterIntelligenceActivity(cia);
}
@GetMapping("/getCiaForeignerImg")
public void getCiaForeignerImg(CiaFile cf , HttpServletResponse response) throws Exception {
CiaFile dbImg = ciService.selectCiaForeignerFile(cf.getCiKey(),cf.getFileSeq());
String realFile = dbImg.getSavePath()+"/"+ dbImg.getConvNm();
String fileNm = dbImg.getConvNm();
BufferedOutputStream out = null;
InputStream in = null;
try {
response.setContentType("image/jpeg;charset=UTF-8");
response.setHeader("Content-Disposition", "inline;filename=" + fileNm);
File file = new File(realFile);
// File file = new File(realFile + "/" + fileNm);
if(file.exists()){
in = new FileInputStream(file);
out = new BufferedOutputStream(response.getOutputStream());
int len;
byte[] buf = new byte[1024];
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
}
} catch (Exception e) {
} finally {
if(out != null){ out.flush(); }
if(out != null){ out.close(); }
if(in != null){ in.close(); }
}
}
} }

View File

@ -15,6 +15,8 @@ public interface CiaFileRepository extends JpaRepository<CiaFile, CiaFile.CiaFil
Optional<CiaFile> findTopByCiKeyOrderByFileSeqDesc(Integer ciKey); Optional<CiaFile> findTopByCiKeyOrderByFileSeqDesc(Integer ciKey);
CiaFile findByCiKeyAndFileSeq(Integer ciKey, Integer fileSeq);
} }

View File

@ -22,6 +22,7 @@ import com.dbnt.faisp.main.counterIntelligence.repository.ForeignerInfoRepositor
import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository; import com.dbnt.faisp.main.counterIntelligence.repository.HashTagLinkCiwRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.ManageCompanyInfoRepository; import com.dbnt.faisp.main.counterIntelligence.repository.ManageCompanyInfoRepository;
import com.dbnt.faisp.main.counterIntelligence.repository.SaftyDemandInfoRepository; import com.dbnt.faisp.main.counterIntelligence.repository.SaftyDemandInfoRepository;
import com.dbnt.faisp.main.equip.model.EquipFile;
import com.dbnt.faisp.main.hashTag.service.HashTagService; import com.dbnt.faisp.main.hashTag.service.HashTagService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -311,4 +312,16 @@ public class CounterIntelligenceService extends BaseService {
return dbCia; return dbCia;
} }
public CiaFile selectCiaForeignerFile(Integer ciKey,Integer fileSeq) {
return ciaFileRepository.findByCiKeyAndFileSeq(ciKey,fileSeq);
}
@Transactional
public void deleteCounterIntelligenceActivity(CounterIntelligenceActivity cia) {
CounterIntelligenceActivity dbCia = counterIntelligenceActivityRepository.findById(cia.getCiKey()).orElse(null);
dbCia.setContentStatus(cia.getContentStatus());
counterIntelligenceActivityRepository.save(dbCia);
}
} }

View File

@ -143,16 +143,31 @@
<select id="selectCiaSaftyDemandList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity"> <select id="selectCiaSaftyDemandList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key, select cia.ci_key,
cia.content_status,
cia.ci_type, cia.ci_type,
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ, (select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
sdi.local_info, sdi.local_info,
sdi.outlook_problem, sdi.outlook_problem,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
safty_demand_info sdi safty_demand_info sdi
where cia.ci_key = sdi.ci_key where cia.ci_key = sdi.ci_key
and cia.content_status != 'DST008'
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
and cia.wrt_organ in and cia.wrt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -165,16 +180,31 @@
select count(*) select count(*)
from( from(
select cia.ci_key, select cia.ci_key,
cia.content_status,
cia.ci_type, cia.ci_type,
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ, (select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
sdi.local_info, sdi.local_info,
sdi.outlook_problem, sdi.outlook_problem,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
safty_demand_info sdi safty_demand_info sdi
where cia.ci_key = sdi.ci_key where cia.ci_key = sdi.ci_key
and cia.content_status != 'DST008'
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
and cia.wrt_organ in and cia.wrt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -185,6 +215,7 @@
<select id="selectCiaManageCompanyList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity"> <select id="selectCiaManageCompanyList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key, select cia.ci_key,
cia.content_status,
cia.ci_type, cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ, (select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm, mci.company_nm,
@ -195,11 +226,28 @@
mci.department, mci.department,
mci."name", mci."name",
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
manage_company_info mci manage_company_info mci
where cia.ci_key = mci.ci_key where cia.ci_key = mci.ci_key
and cia.content_status != 'DST008'
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test='companyNm != null and companyNm != ""'>
and mci.company_nm like '%'||#{companyNm}||'%'
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
and mci.mgt_organ in and mci.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -212,6 +260,7 @@
select count(*) select count(*)
from( from(
select cia.ci_key, select cia.ci_key,
cia.content_status,
cia.ci_type, cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ, (select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm, mci.company_nm,
@ -222,11 +271,28 @@
mci.department, mci.department,
mci."name", mci."name",
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
manage_company_info mci manage_company_info mci
where cia.ci_key = mci.ci_key where cia.ci_key = mci.ci_key
and cia.content_status != 'DST008'
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test='companyNm != null and companyNm != ""'>
and mci.company_nm like '%'||#{companyNm}||'%'
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
and mci.mgt_organ in and mci.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -237,6 +303,7 @@
<select id="selectCiaForeignerList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity"> <select id="selectCiaForeignerList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key, select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ, (select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ,
fi.manager, fi.manager,
fi.commu_location, fi.commu_location,
@ -246,11 +313,38 @@
fi.monitoring_info, fi.monitoring_info,
fi.fix_date, fi.fix_date,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
foreigner_info fi foreigner_info fi
where cia.ci_key = fi.ci_key where cia.ci_key = fi.ci_key
and cia.content_status != 'DST008'
<if test='manager != null and manager != ""'>
and fi.manager like '%'||#{manager}||'%'
</if>
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='dateSelector == "fixDate"'>
<if test='startDate != null and startDate != ""'>
and fi.fix_date >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and fi.fix_date &lt;= #{endDate}::date
</if>
</if>
<if test='dateSelector == "wrtDt"'>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
</if>
and fi.mgt_organ in and fi.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -263,6 +357,7 @@
select count(*) select count(*)
from( from(
select cia.ci_key, select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ, (select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ,
fi.manager, fi.manager,
fi.commu_location, fi.commu_location,
@ -272,11 +367,38 @@
fi.monitoring_info, fi.monitoring_info,
fi.fix_date, fi.fix_date,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
foreigner_info fi foreigner_info fi
where cia.ci_key = fi.ci_key where cia.ci_key = fi.ci_key
and cia.content_status != 'DST008'
<if test='manager != null and manager != ""'>
and fi.manager like '%'||#{manager}||'%'
</if>
<if test='wrtOrgan != null and wrtOrgan != ""'>
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='dateSelector == "fixDate"'>
<if test='startDate != null and startDate != ""'>
and fi.fix_date >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and fi.fix_date &lt;= #{endDate}::date
</if>
</if>
<if test='dateSelector == "wrtDt"'>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
</if>
and fi.mgt_organ in and fi.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -287,17 +409,42 @@
<select id="selectCiaEduList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity"> <select id="selectCiaEduList" parameterType="CounterIntelligenceActivity" resultType="CounterIntelligenceActivity">
select cia.ci_key, select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ, (select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ,
ei.edu_date, ei.edu_date,
ei.edu_type, ei.edu_type,
ei.people_cnt, ei.people_cnt,
ei.description, ei.description,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
edu_info ei edu_info ei
where cia.ci_key = ei.ci_key where cia.ci_key = ei.ci_key
and cia.content_status != 'DST008'
<if test='mgtOrgan != null and mgtOrgan != ""'>
and ei.mgt_organ = #{mgtOrgan}
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='dateSelector == "eduDate"'>
<if test='startDate != null and startDate != ""'>
and ei.edu_date >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and ei.edu_date &lt;= #{endDate}::date
</if>
</if>
<if test='dateSelector == "wrtDt"'>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
</if>
and ei.mgt_organ in and ei.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}
@ -310,17 +457,41 @@
select count(*) select count(*)
from( from(
select cia.ci_key, select cia.ci_key,
cia.content_status,
(select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ, (select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ,
ei.edu_date, ei.edu_date,
ei.edu_type, ei.edu_type,
ei.people_cnt, ei.people_cnt,
ei.description, ei.description,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd, (select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm, cia.wrt_user_nm,
cia.wrt_dt cia.wrt_dt
from counter_intelligence_activity cia, from counter_intelligence_activity cia,
edu_info ei edu_info ei
where cia.ci_key = ei.ci_key where cia.ci_key = ei.ci_key
<if test='mgtOrgan != null and mgtOrgan != ""'>
and ei.mgt_organ = #{mgtOrgan}
</if>
<if test='wrtUserNm != null and wrtUserNm != ""'>
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test='dateSelector == "eduDate"'>
<if test='startDate != null and startDate != ""'>
and ei.edu_date >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and ei.edu_date &lt;= #{endDate}::date
</if>
</if>
<if test='dateSelector == "wrtDt"'>
<if test='startDate != null and startDate != ""'>
and cia.wrt_dt >= #{startDate}::date
</if>
<if test='endDate != null and endDate != ""'>
and cia.wrt_dt &lt;= #{endDate}::date+1
</if>
</if>
and ei.mgt_organ in and ei.mgt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")"> <foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item} #{item}

View File

@ -1,3 +1,11 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
})
$(document).on('click', '#addBtn', function (){ $(document).on('click', '#addBtn', function (){
getCiaEduEditModal(null); getCiaEduEditModal(null);
}) })
@ -26,6 +34,17 @@ function getCiaEduEditModal(ciKey){
$(document).on('click', '#saveBtn', function (){ $(document).on('click', '#saveBtn', function (){
if(confirm("저장하시겠습니까?")){ if(confirm("저장하시겠습니까?")){
save('DST007');
}
})
$(document).on('click', '#saveTempBtn', function (){
if(confirm("임시저장 하시겠습니까?")){
save('DST001');
}
})
function save(contentStatus){
const formData = new FormData($("#ciaEduEditForm")[0]); const formData = new FormData($("#ciaEduEditForm")[0]);
for(const file of files) { for(const file of files) {
if(!file.isDelete) if(!file.isDelete)
@ -34,6 +53,7 @@ $(document).on('click', '#saveBtn', function (){
$(".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"));
}) })
formData.append('contentStatus', contentStatus);
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
data : formData, data : formData,
@ -50,9 +70,7 @@ $(document).on('click', '#saveBtn', function (){
contentFade("out"); contentFade("out");
} }
}) })
}
}
})
$(document).on('click', '.eiTr', function (){ $(document).on('click', '.eiTr', function (){
getCiaEduViewModal($(this).find(".ciKey").val()); getCiaEduViewModal($(this).find(".ciKey").val());

View File

@ -1,3 +1,11 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
})
$(document).on('click', '#addBtn', function (){ $(document).on('click', '#addBtn', function (){
getCiaForeignerEditModal(null); getCiaForeignerEditModal(null);
}) })
@ -16,7 +24,6 @@ function getCiaForeignerEditModal(ciKey){
autoclose: true autoclose: true
}); });
setUploadDiv(); setUploadDiv();
setEditor('editor', '400');
$("#ciaForeignerEditModal").modal('show'); $("#ciaForeignerEditModal").modal('show');
}, },
error:function(){ error:function(){
@ -27,6 +34,17 @@ function getCiaForeignerEditModal(ciKey){
$(document).on('click', '#saveBtn', function (){ $(document).on('click', '#saveBtn', function (){
if(confirm("저장하시겠습니까?")){ if(confirm("저장하시겠습니까?")){
save('DST007');
}
})
$(document).on('click', '#saveTempBtn', function (){
if(confirm("임시저장 하시겠습니까?")){
save('DST001');
}
})
function save(contentStatus){
const formData = new FormData($("#ciaForeignerEditForm")[0]); const formData = new FormData($("#ciaForeignerEditForm")[0]);
for(const file of files) { for(const file of files) {
if(!file.isDelete) if(!file.isDelete)
@ -35,7 +53,7 @@ $(document).on('click', '#saveBtn', function (){
$(".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"));
}) })
formData.append('monitoringInfo', CrossEditor.GetBodyValue()); formData.append('contentStatus', contentStatus);
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
data : formData, data : formData,
@ -53,8 +71,7 @@ $(document).on('click', '#saveBtn', function (){
} }
}) })
} }
})
$(document).on('click', '.fiTr', function (){ $(document).on('click', '.fiTr', function (){
getCiaForeignerViewModal($(this).find(".ciKey").val()); getCiaForeignerViewModal($(this).find(".ciKey").val());
@ -81,10 +98,11 @@ $(document).on('click', '#editBtn', function (){
getCiaForeignerEditModal($(this).attr("data-cikey")); getCiaForeignerEditModal($(this).attr("data-cikey"));
}) })
$(document).on('click', '#imgView', function (){
window.open($(this).attr("data-img"));
})
$(document).on('click', '#excelDown', function (){ $(document).on('click', '#excelDown', function (){
exportExcel("외국인 커뮤니티 모니터링 현황","ciaForeignerTb"); exportExcel("외국인 커뮤니티 모니터링 현황","ciaForeignerTb");
}) })
function OnInitCompleted(e){
e.editorTarget.SetBodyValue(document.getElementById("monitoringInfo").value);
}

View File

@ -1,3 +1,11 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
})
$(document).on('click', '#addBtn', function (){ $(document).on('click', '#addBtn', function (){
getCiaManageCompanyEditModal(null); getCiaManageCompanyEditModal(null);
}) })
@ -21,6 +29,17 @@ function getCiaManageCompanyEditModal(ciKey){
$(document).on('click', '#saveBtn', function (){ $(document).on('click', '#saveBtn', function (){
if(confirm("저장하시겠습니까?")){ if(confirm("저장하시겠습니까?")){
save('DST007');
}
})
$(document).on('click', '#saveTempBtn', function (){
if(confirm("임시저장 하시겠습니까?")){
save('DST001');
}
})
function save(contentStatus){
const formData = new FormData($("#ciaManageCompanyEditForm")[0]); const formData = new FormData($("#ciaManageCompanyEditForm")[0]);
for(const file of files) { for(const file of files) {
if(!file.isDelete) if(!file.isDelete)
@ -29,6 +48,7 @@ $(document).on('click', '#saveBtn', function (){
$(".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"));
}) })
formData.append('contentStatus', contentStatus);
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
data : formData, data : formData,
@ -45,9 +65,7 @@ $(document).on('click', '#saveBtn', function (){
contentFade("out"); contentFade("out");
} }
}) })
}
}
})
$(document).on('click', '.mciTr', function (){ $(document).on('click', '.mciTr', function (){
getCiaManageCompanyViewModal($(this).find(".ciKey").val()); getCiaManageCompanyViewModal($(this).find(".ciKey").val());
@ -73,3 +91,7 @@ $(document).on('click', '#editBtn', function (){
$("#ciaManageCompanyViewModal").modal('hide'); $("#ciaManageCompanyViewModal").modal('hide');
getCiaManageCompanyEditModal($(this).attr("data-cikey")); getCiaManageCompanyEditModal($(this).attr("data-cikey"));
}) })
$(document).on('click', '#excelDown', function (){
exportExcel("해양산업보호 관리업체 현황","mciTb");
})

View File

@ -1,3 +1,11 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
})
$(document).on('click', '#addBtn', function (){ $(document).on('click', '#addBtn', function (){
getCiaSaftyDemandEditModal(null); getCiaSaftyDemandEditModal(null);
}) })
@ -21,6 +29,17 @@ function getCiaSaftyDemandEditModal(ciKey){
$(document).on('click', '#saveBtn', function (){ $(document).on('click', '#saveBtn', function (){
if(confirm("저장하시겠습니까?")){ if(confirm("저장하시겠습니까?")){
save('DST007');
}
})
$(document).on('click', '#saveTempBtn', function (){
if(confirm("임시저장 하시겠습니까?")){
save('DST001');
}
})
function save(contentStatus){
const formData = new FormData($("#ciaSaftyDemandEditForm")[0]); const formData = new FormData($("#ciaSaftyDemandEditForm")[0]);
for(const file of files) { for(const file of files) {
if(!file.isDelete) if(!file.isDelete)
@ -29,6 +48,7 @@ $(document).on('click', '#saveBtn', function (){
$(".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"));
}) })
formData.append('contentStatus', contentStatus);
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
data : formData, data : formData,
@ -45,7 +65,27 @@ $(document).on('click', '#saveBtn', function (){
contentFade("out"); contentFade("out");
} }
}) })
}
$(document).on('click', '#deleteBtn', function (){
const ciKey = $(this).attr("data-cikey");
if(confirm("삭제 하시겠습니까?")){
$.ajax({
type : 'POST',
url : "/counterIntelligence/deleteCounterIntelligenceActivity",
data : {ciKey:ciKey,contentStatus:'DST008'},
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function() {
alert("삭제처리 되었습니다.");
location.reload();
},
error : function(xhr, status) {
alert("삭제처리에 실패하였습니다");
}
})
} }
}) })
@ -73,3 +113,7 @@ $(document).on('click', '#editBtn', function (){
$("#ciaSaftyDemandViewModal").modal('hide'); $("#ciaSaftyDemandViewModal").modal('hide');
getCiaSaftyDemandEditModal($(this).attr("data-cikey")); getCiaSaftyDemandEditModal($(this).attr("data-cikey"));
}) })
$(document).on('click', '#excelDown', function (){
exportExcel("치안수요 분석결과","sdiTb");
})

View File

@ -32,50 +32,18 @@
</select> </select>
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- <div class="row"> <div class="row">
<div class="col-11"> <div class="col-11">
<div class="row justify-content-end pb-1">
<div class="col-2" th:if="${accessAuth eq 'ACC003'}">
<select class="form-select form-select-sm" name="wrtOrgan">
<option value="">관서 선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(downOrganCdList, code.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="workRating">
<option value="">등급</option>
<th:block th:each="code:${session.commonCode.get('CIWR')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType1">
<option value="">검거유형1</option>
<th:block th:each="code:${session.commonCode.get('AT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType1}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType2">
<option value="">검거유형2</option>
<th:block th:each="code:${session.commonCode.get(arrestType1)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType2}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-2"> <div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}"> <select class="form-select form-select-sm" name="mgtOrgan">
</div> <option value="">시행관서 선택</option>
<div class="col-2"> <th:block th:each="code:${session.commonCode.get('OG')}">
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}"> <th:block th:if="${#lists.contains(mgtOrganList, code.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.mgtOrgan}"></option>
</th:block>
</th:block>
</select>
</div> </div>
<div class="col-2"> <div class="col-2">
<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}">
@ -83,11 +51,8 @@
<div class="col-4"> <div class="col-4">
<div class="input-group input-daterange" id="dateSelectorDiv"> <div class="input-group input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm w-30" name="dateSelector"> <select class="form-select form-select-sm w-30" name="dateSelector">
<option value="eduDate" th:selected="${searchParams.dateSelector eq 'eduDate'}">시행일자</option>
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option> <option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
<option value="workStartDate" th:selected="${searchParams.dateSelector eq 'workStartDate'}">착수일</option>
<option value="workEndDate" th:selected="${searchParams.dateSelector eq 'workEndDate'}">종결일</option>
<option value="reRatingDate1" th:selected="${searchParams.dateSelector eq 'reRatingDate1'}">1차재평가</option>
<option value="reRatingDate2" th:selected="${searchParams.dateSelector eq 'reRatingDate2'}">2차재평가</option>
</select> </select>
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}"> <input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}"> <input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
@ -98,7 +63,7 @@
<div class="col-1 d-grid gap-2"> <div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색"> <input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div> </div>
</div> --> </div>
</div> </div>
</div> </div>
</form> </form>
@ -113,6 +78,7 @@
<th>교육인원</th> <th>교육인원</th>
<th>비고</th> <th>비고</th>
<th>작성자</th> <th>작성자</th>
<th>작성일</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
@ -123,6 +89,7 @@
<td th:text="${list.peopleCnt}"></td> <td th:text="${list.peopleCnt}"></td>
<td th:utext="${list.description}"></td> <td th:utext="${list.description}"></td>
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td> <td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<th:block> <th:block>
<input type="hidden" class="ciKey" th:value="${list.ciKey}"> <input type="hidden" class="ciKey" th:value="${list.ciKey}">
</th:block> </th:block>
@ -132,7 +99,9 @@
</div> </div>
</div> </div>
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-auto"></div> <div class="col-auto">
<button type="button" class="btn btn-success" id="excelDown">엑셀다운</button>
</div>
<div class="col-auto"> <div class="col-auto">
<nav aria-label="Page navigation"> <nav aria-label="Page navigation">
<ul class="pagination mb-0"> <ul class="pagination mb-0">
@ -160,7 +129,6 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input type="button" class="btn btn-success" value="등록" id="addBtn" th:unless="${accessAuth eq 'ACC001'}"> <input type="button" class="btn btn-success" value="등록" id="addBtn" th:unless="${accessAuth eq 'ACC001'}">
<button type="button" class="btn btn-success" id="excelDown" th:unless="${accessAuth eq 'ACC001'}">엑셀다운</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -68,7 +68,7 @@
<th:block th:each="file:${cia.fileList}"> <th:block th:each="file:${cia.fileList}">
<tr class="fileInfoTr"> <tr class="fileInfoTr">
<td> <td>
<a href="#" class="fileDownLink" data-board="ciWork" <a href="#" class="fileDownLink" data-board="ciActivity"
th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}"
th:text="|${file.origNm}.${file.fileExtn}|"></a> th:text="|${file.origNm}.${file.fileExtn}|"></a>
</td> </td>
@ -86,8 +86,8 @@
<div class="modal-footer justify-content-between bg-light"> <div class="modal-footer justify-content-between bg-light">
<div class="col-auto"> <div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<th:block th:if="${accessAuth eq 'ACC003'}"> <th:block th:if="${accessAuth eq 'ACC003'} or ${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button> <button type="button" class="btn btn-danger" id="deleteBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block> </th:block>
</div> </div>
<div class="col-auto"> <div class="col-auto">

View File

@ -65,8 +65,7 @@
<div class="row mb-1"> <div class="row mb-1">
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center">모니터링 사항</label> <label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center">모니터링 사항</label>
<div class="col-sm-11"> <div class="col-sm-11">
<div id="editor"></div> <textarea class="form-control form-control-sm" rows="5" cols="30" name="monitoringInfo"></textarea>
<textarea class="d-none" id="monitoringInfo"></textarea>
</div> </div>
</div> </div>
</th:block> </th:block>

View File

@ -32,50 +32,21 @@
</select> </select>
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- <div class="row"> <div class="row">
<div class="col-11"> <div class="col-11">
<div class="row justify-content-end pb-1">
<div class="col-2" th:if="${accessAuth eq 'ACC003'}">
<select class="form-select form-select-sm" name="wrtOrgan">
<option value="">관서 선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(downOrganCdList, code.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="workRating">
<option value="">등급</option>
<th:block th:each="code:${session.commonCode.get('CIWR')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType1">
<option value="">검거유형1</option>
<th:block th:each="code:${session.commonCode.get('AT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType1}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType2">
<option value="">검거유형2</option>
<th:block th:each="code:${session.commonCode.get(arrestType1)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType2}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-2"> <div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}"> <select class="form-select form-select-sm" name="mgtOrgan">
<option value="">관리관서 선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, code.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.mgtOrgan}"></option>
</th:block>
</th:block>
</select>
</div> </div>
<div class="col-2"> <div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}"> <input type="text" class="form-control form-control-sm" placeholder="담당관" name="manager" th:value="${searchParams.manager}">
</div> </div>
<div class="col-2"> <div class="col-2">
<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}">
@ -83,11 +54,8 @@
<div class="col-4"> <div class="col-4">
<div class="input-group input-daterange" id="dateSelectorDiv"> <div class="input-group input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm w-30" name="dateSelector"> <select class="form-select form-select-sm w-30" name="dateSelector">
<option value="fixDate" th:selected="${searchParams.dateSelector eq 'fixDate'}">선정일</option>
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option> <option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
<option value="workStartDate" th:selected="${searchParams.dateSelector eq 'workStartDate'}">착수일</option>
<option value="workEndDate" th:selected="${searchParams.dateSelector eq 'workEndDate'}">종결일</option>
<option value="reRatingDate1" th:selected="${searchParams.dateSelector eq 'reRatingDate1'}">1차재평가</option>
<option value="reRatingDate2" th:selected="${searchParams.dateSelector eq 'reRatingDate2'}">2차재평가</option>
</select> </select>
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}"> <input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}"> <input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
@ -98,7 +66,7 @@
<div class="col-1 d-grid gap-2"> <div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색"> <input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div> </div>
</div> --> </div>
</div> </div>
</div> </div>
</form> </form>
@ -143,7 +111,9 @@
</div> </div>
</div> </div>
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-auto"></div> <div class="col-auto">
<button type="button" class="btn btn-success" id="excelDown">엑셀다운</button>
</div>
<div class="col-auto"> <div class="col-auto">
<nav aria-label="Page navigation"> <nav aria-label="Page navigation">
<ul class="pagination mb-0"> <ul class="pagination mb-0">
@ -171,7 +141,6 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input type="button" class="btn btn-success" value="등록" id="addBtn" th:unless="${accessAuth eq 'ACC001'}"> <input type="button" class="btn btn-success" value="등록" id="addBtn" th:unless="${accessAuth eq 'ACC001'}">
<button type="button" class="btn btn-success" id="excelDown" th:unless="${accessAuth eq 'ACC001'}">엑셀다운</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -73,9 +73,18 @@
</th:block> </th:block>
<th:block th:unless="${#lists.isEmpty(cia.fileList)}"> <th:block th:unless="${#lists.isEmpty(cia.fileList)}">
<th:block th:each="file:${cia.fileList}"> <th:block th:each="file:${cia.fileList}">
<th:block th:if="${file.fileExtn eq 'jpg'} or ${file.fileExtn eq 'jpeg'} or ${file.fileExtn eq 'png'} or ${file.fileExtn eq 'gif'} or ${file.fileExtn eq 'bmp'}">
<tr class="fileInfoTr"> <tr class="fileInfoTr">
<td> <td>
<a href="#" class="fileDownLink" data-board="ciWork" <a href="#" th:data-img="|@{/counterIntelligence/getCiaForeignerImg(ciKey=${file.ciKey},fileSeq=${file.fileSeq})}|" id="imgView" th:text="|${file.origNm}.${file.fileExtn}|"></a>
</td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
<th:block th:unless="${file.fileExtn eq 'jpg'} or ${file.fileExtn eq 'jpeg'} or ${file.fileExtn eq 'png'} or ${file.fileExtn eq 'gif'} or ${file.fileExtn eq 'bmp'}">
<tr class="fileInfoTr">
<td>
<a href="#" class="fileDownLink" data-board="ciActivity"
th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}"
th:text="|${file.origNm}.${file.fileExtn}|"></a> th:text="|${file.origNm}.${file.fileExtn}|"></a>
</td> </td>
@ -83,6 +92,7 @@
</tr> </tr>
</th:block> </th:block>
</th:block> </th:block>
</th:block>
</tbody> </tbody>
</table> </table>
</div> </div>
@ -93,7 +103,7 @@
<div class="modal-footer justify-content-between bg-light"> <div class="modal-footer justify-content-between bg-light">
<div class="col-auto"> <div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<th:block th:if="${accessAuth eq 'ACC003'}"> <th:block th:if="${accessAuth eq 'ACC003'} or ${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button> <button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block> </th:block>
</div> </div>

View File

@ -32,63 +32,28 @@
</select> </select>
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- <div class="row"> <div class="row">
<div class="col-11"> <div class="col-11">
<div class="row justify-content-end pb-1"> <div class="row justify-content-end">
<div class="col-2" th:if="${accessAuth eq 'ACC003'}"> <div class="col-2">
<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="code:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(downOrganCdList, code.itemCd)}"> <th:block th:if="${#lists.contains(mgtOrganList, code.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="workRating"> <input type="text" class="form-control form-control-sm" placeholder="업체명" name="companyNm" th:value="${searchParams.companyNm}">
<option value="">등급</option>
<th:block th:each="code:${session.commonCode.get('CIWR')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType1">
<option value="">검거유형1</option>
<th:block th:each="code:${session.commonCode.get('AT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType1}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType2">
<option value="">검거유형2</option>
<th:block th:each="code:${session.commonCode.get(arrestType1)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType2}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end">
<div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
</div>
<div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}">
</div> </div>
<div class="col-2"> <div class="col-2">
<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-4">
<div class="input-group input-daterange" id="dateSelectorDiv"> <div class="input-group input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm w-30" name="dateSelector"> 작성일
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
<option value="workStartDate" th:selected="${searchParams.dateSelector eq 'workStartDate'}">착수일</option>
<option value="workEndDate" th:selected="${searchParams.dateSelector eq 'workEndDate'}">종결일</option>
<option value="reRatingDate1" th:selected="${searchParams.dateSelector eq 'reRatingDate1'}">1차재평가</option>
<option value="reRatingDate2" th:selected="${searchParams.dateSelector eq 'reRatingDate2'}">2차재평가</option>
</select>
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}"> <input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}"> <input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div> </div>
@ -98,45 +63,53 @@
<div class="col-1 d-grid gap-2"> <div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색"> <input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div> </div>
</div> --> </div>
</div> </div>
</div> </div>
</form> </form>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<table class="table table-sm table-bordered table-hover"> <table class="table table-sm table-bordered table-hover" id="mciTb">
<thead> <thead>
<tr class="table-secondary"> <tr class="table-secondary">
<th>문서번호</th> <th>문서번호</th>
<th>관리관서</th> <th>관리관서</th>
<th>업체명</th> <th>업체명</th>
<th>담당자부서</th> <th>소재지</th>
<th>담당자번호</th> <th>관련<br>분야</th>
<th>담당자명</th> <th>특이사항</th>
<th>연락처<br>(부서,이름)</th>
<th>작성자</th> <th>작성자</th>
<th>작성일</th> <th>작성일</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr class="mciTr" th:each="list:${mciList}"> <tr class="mciTr" th:each="list:${mciList}">
<th:block>
<input type="hidden" class="ciKey" th:value="${list.ciKey}">
</th:block>
<td th:text="${list.ciKey}"></td> <td th:text="${list.ciKey}"></td>
<td th:text="${list.mgtOrgan}"></td> <td th:text="${list.mgtOrgan}"></td>
<td th:text="${list.companyNm}"></td> <td th:text="${list.companyNm}"></td>
<td th:text="${list.department}"></td> <td th:text="${list.companyLocation}"></td>
<td th:text="${list.cellPhone}"></td> <td th:text="${list.relatedField}"></td>
<td th:text="${list.name}"></td> <td th:text="${list.description}"></td>
<td th:inline="text">
[[${list.cellPhone}]]
<br>
([[${list.department}]] [[${list.name}]])
</td>
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td> <td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<th:block>
<input type="hidden" class="ciKey" th:value="${list.ciKey}">
</th:block>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-auto"></div> <div class="col-auto">
<button type="button" class="btn btn-success" id="excelDown">엑셀다운</button>
</div>
<div class="col-auto"> <div class="col-auto">
<nav aria-label="Page navigation"> <nav aria-label="Page navigation">
<ul class="pagination mb-0"> <ul class="pagination mb-0">

View File

@ -77,7 +77,7 @@
<th:block th:each="file:${cia.fileList}"> <th:block th:each="file:${cia.fileList}">
<tr class="fileInfoTr"> <tr class="fileInfoTr">
<td> <td>
<a href="#" class="fileDownLink" data-board="ciWork" <a href="#" class="fileDownLink" data-board="ciActivity"
th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}"
th:text="|${file.origNm}.${file.fileExtn}|"></a> th:text="|${file.origNm}.${file.fileExtn}|"></a>
</td> </td>
@ -95,7 +95,7 @@
<div class="modal-footer justify-content-between bg-light"> <div class="modal-footer justify-content-between bg-light">
<div class="col-auto"> <div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<th:block th:if="${accessAuth eq 'ACC003'}"> <th:block th:if="${accessAuth eq 'ACC003'} or ${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button> <button type="button" class="btn btn-danger" id="deleteCiWorkBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block> </th:block>
</div> </div>

View File

@ -32,63 +32,25 @@
</select> </select>
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- <div class="row"> <div class="row">
<div class="col-11"> <div class="col-11">
<div class="row justify-content-end pb-1"> <div class="row justify-content-end">
<div class="col-2" th:if="${accessAuth eq 'ACC003'}"> <div class="col-2">
<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="code:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(downOrganCdList, code.itemCd)}"> <th:block th:if="${#lists.contains(mgtOrganList, code.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.wrtOrgan}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-2">
<select class="form-select form-select-sm" name="workRating">
<option value="">등급</option>
<th:block th:each="code:${session.commonCode.get('CIWR')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.workRating}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType1">
<option value="">검거유형1</option>
<th:block th:each="code:${session.commonCode.get('AT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType1}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestType2">
<option value="">검거유형2</option>
<th:block th:each="code:${session.commonCode.get(arrestType1)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq searchParams.arrestType2}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end">
<div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
</div>
<div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="해시태그" name="hashTags" th:value="${searchParams.hashTags}">
</div>
<div class="col-2"> <div class="col-2">
<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-4">
<div class="input-group input-daterange" id="dateSelectorDiv"> <div class="input-group input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm w-30" name="dateSelector"> 작성일
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">작성일</option>
<option value="workStartDate" th:selected="${searchParams.dateSelector eq 'workStartDate'}">착수일</option>
<option value="workEndDate" th:selected="${searchParams.dateSelector eq 'workEndDate'}">종결일</option>
<option value="reRatingDate1" th:selected="${searchParams.dateSelector eq 'reRatingDate1'}">1차재평가</option>
<option value="reRatingDate2" th:selected="${searchParams.dateSelector eq 'reRatingDate2'}">2차재평가</option>
</select>
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}"> <input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}"> <input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div> </div>
@ -98,13 +60,13 @@
<div class="col-1 d-grid gap-2"> <div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색"> <input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div> </div>
</div> --> </div>
</div> </div>
</div> </div>
</form> </form>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<table class="table table-sm table-bordered table-hover"> <table class="table table-sm table-bordered table-hover" id="sdiTb">
<thead> <thead>
<tr class="table-secondary"> <tr class="table-secondary">
<th>문서번호</th> <th>문서번호</th>
@ -117,9 +79,21 @@
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr class="sdiTr" th:each="list:${sdiList}"> <tr class="sdiTr" th:each="list:${sdiList}">
<th:block> <th:block th:if="${list.contentStatus eq 'DST001'} and ${list.wrtUserSeq eq loginUserSeq}">
<input type="hidden" class="ciKey" th:value="${list.ciKey}"> <td th:text="|[임시저장]${list.ciKey}|"></td>
<td th:text="${list.wrtOrgan}"></td>
<td>
<th:block th:if="${#strings.length(list.localInfo)>35}" th:utext="|${#strings.substring(list.localInfo, 0, 35)}...|"></th:block>
<th:block th:unless="${#strings.length(list.localInfo)>35}" th:utext="${list.localInfo}"></th:block>
</td>
<td>
<th:block th:if="${#strings.length(list.outlookProblem)>35}" th:utext="|${#strings.substring(list.outlookProblem, 0, 35)}...|"></th:block>
<th:block th:unless="${#strings.length(list.outlookProblem)>35}" th:utext="${list.outlookProblem}"></th:block>
</td>
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</th:block> </th:block>
<th:block th:unless="${list.contentStatus eq 'DST001'} and ${list.wrtUserSeq eq loginUserSeq}">
<td th:text="${list.ciKey}"></td> <td th:text="${list.ciKey}"></td>
<td th:text="${list.wrtOrgan}"></td> <td th:text="${list.wrtOrgan}"></td>
<td> <td>
@ -132,13 +106,19 @@
</td> </td>
<td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td> <td th:text="|${list.wrtUserGrd} ${list.wrtUserNm}|"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</th:block>
<th:block>
<input type="hidden" class="ciKey" th:value="${list.ciKey}">
</th:block>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-auto"></div> <div class="col-auto">
<button type="button" class="btn btn-success" id="excelDown">엑셀다운</button>
</div>
<div class="col-auto"> <div class="col-auto">
<nav aria-label="Page navigation"> <nav aria-label="Page navigation">
<ul class="pagination mb-0"> <ul class="pagination mb-0">

View File

@ -56,7 +56,7 @@
<th:block th:each="file:${cia.fileList}"> <th:block th:each="file:${cia.fileList}">
<tr class="fileInfoTr"> <tr class="fileInfoTr">
<td> <td>
<a href="#" class="fileDownLink" data-board="ciWork" <a href="#" class="fileDownLink" data-board="ciActivity"
th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}" th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}"
th:text="|${file.origNm}.${file.fileExtn}|"></a> th:text="|${file.origNm}.${file.fileExtn}|"></a>
</td> </td>
@ -74,6 +74,9 @@
<div class="modal-footer justify-content-between bg-light"> <div class="modal-footer justify-content-between bg-light">
<div class="col-auto"> <div class="col-auto">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<th:block th:if="${accessAuth eq 'ACC003'} or ${viewUserSeq eq cia.wrtUserSeq}">
<button type="button" class="btn btn-danger" id="deleteBtn" th:data-cikey="${cia.ciKey}">삭제</button>
</th:block>
</div> </div>
<div class="col-auto"> <div class="col-auto">
</div> </div>