민간통역인

- 목록 조회 쿼리 수정.
- 엑셀 양식 수정.
- 통계 쿼리 수정.
master
강석 최 2024-03-25 17:16:35 +09:00
parent 41617b234d
commit 1eac869608
3 changed files with 88 additions and 69 deletions

View File

@ -42,15 +42,37 @@ public class TranslatorController {
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/translator/info").get(0).getAccessAuth();
if(accessAuth.equals("ACC003") && loginUser.getOgCd().equals("OG001")){
if(translator.getInfoShareChk()==null || translator.getInfoShareChk().isEmpty()){
translator.setInfoShareChk("T");
}
}else{
translator.setInfoShareChk("T");
}
translator.setDownOrganCdList(loginUser.getDownOrganCdList());
translator.setWrtOrgan(loginUser.getOgCd());
translator.setAccessAuth(accessAuth);
//엑셀다운
if(translator.getExcel() != null && translator.getExcel().equals("Y")){
String[] headers = { "translator_key", "ogdp1", "tr_lang", "tr_career", "tr_name", "tr_age", "tr_nny", "tr_edu", "tr_cft", "dml_yn", "apt_dt", "tr_phone"};
String[] headerNames = { "연번", "관서명", "언어", "경력", "성명", "나이", "국적", "학력", "자격증", "해촉", "위촉일", "연락처" };
String[] columnType = { "String", "String", "String", "String", "String", "String", "String", "String", "String", "String", "String", "String"};
String[] headers = {
"translator_key", "ogdp1", "tr_lang",
"tr_career", "tr_name", "tr_sex",
"tr_age", "tr_nny", "tr_edu",
"tr_visa", "info_share_chk", "edu_chk",
"dml_yn", "apt_dt", "tr_phone"};
String[] headerNames = {
"연번", "관서명", "언어",
"경력", "성명", "성별",
"나이", "국적", "학력",
"비자", "개인정보 동의여부", "교육이수여부",
"해촉", "위촉일", "연락처" };
String[] columnType = {
"String", "String", "String",
"String", "String", "String",
"String", "String", "String",
"String", "String", "String",
"String", "String", "String"};
String sheetName = "민간 통역인 현황";
String excelFileName = "민간 통역인 현황";
List<ParamMap> translatorInfoList= translatorSevice.selectTranslatorListEx(translator);

View File

@ -32,17 +32,17 @@
<if test='dmlYn != null and dmlYn != ""'>
and dml_yn = #{dmlYn}
</if>
<if test='accessAuth == "ACC003"'>
and ogdp1 in <foreach collection="downOrganCdList" item="item" separator="," open="(" close=")">#{item}</foreach>
</if>
<if test='accessAuth != "ACC003"'>
and (
info_share_chk = 'T'
) or (
(info_share_chk &lt;> 'T' or info_share_chk is null)
and ogdp1 = #{wrtOrgan}
)
</if>
<choose>
<when test='infoShareChk == "T"'>
and info_share_chk = 'T'
</when>
<when test='infoShareChk == "F"'>
and (info_share_chk &lt;> 'T' or info_share_chk is null)
</when>
<otherwise>
and info_share_chk = 'T'
</otherwise>
</choose>
</where>
</sql>
<select id="selectTranslatorList" resultType="Translator" parameterType="Translator">
@ -75,7 +75,7 @@
left outer join code_mgt g on a.tr_edu = g.item_cd
left outer join code_mgt h on a.tr_visa = h.item_cd
<include refid="selectTranslatorListWhere"></include>
order by ogdp1, translator_key desc
order by a.ogdp1 asc, translator_key desc
limit #{rowCnt} offset #{firstIndex}
</select>
@ -205,6 +205,7 @@
inner join organ_config c on a.ogdp1 = c.organ_cd
where a.status &lt;> 'DST008'
and a.dml_yn &lt;>'O'
and info_share_chk = 'T'
) d
inner join code_mgt cm on d.lang=cm.item_cd
group by cm.item_value
@ -255,6 +256,7 @@
inner join organ_config c on a.ogdp1 = c.organ_cd
where a.status &lt;> 'DST008'
and a.dml_yn &lt;> 'O'
and info_share_chk = 'T'
) d
inner join code_mgt cm on d.lang=cm.item_cd
group by cm.item_value
@ -262,59 +264,46 @@
</select>
<select id="selectTranslatorListEx" resultType="com.dbnt.faisp.util.ParamMap" parameterType="Translator">
select a.translator_key,
version_no,
c.item_value as ogdp1,
d.item_value as tr_lang,
tr_career,
tr_name,
e.item_value as tr_sex,
tr_age,
f.item_value as tr_nny,
g.item_value as tr_edu,
tr_cft,
h.item_value as tr_visa,
dml_yn,
to_char(apt_dt, 'YYYY-MM-DD') as apt_dt,
tr_phone
from translator_info a
inner join (select translator_key, max(version_no) as lastVer
from translator_info
group by translator_key) b
on a.translator_key =b.translator_key and a.version_no = b.lastVer
left outer join code_mgt c on a.ogdp1 = c.item_cd
left outer join code_mgt d on a.tr_lang = d.item_cd
left outer join code_mgt e on a.tr_sex = e.item_cd
left outer join code_mgt f on a.tr_nny = f.item_cd
left outer join code_mgt g on a.tr_edu = g.item_cd
left outer join code_mgt h on a.tr_visa = h.item_cd
where wrt_organ in
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
and status &lt;> 'DST008'
<if test='trLang != null and trLang != ""'>
and tr_lang = #{trLang}
</if>
<if test='ogdp1 != null and ogdp1 != ""'>
and ogdp1 = #{ogdp1}
</if>
<if test='trName != null and trName != ""'>
and tr_name = #{trName}
</if>
<if test='trNny != null and trNny != ""'>
and tr_nny = #{trNny}
</if>
<if test='trVisa != null and trVisa != ""'>
and tr_visa = #{trVisa}
</if>
<if test='aptDt != null'>
and to_char(apt_dt,'YYYY-MM-DD') = #{aptDt}::VARCHAR
</if>
<if test='dmlYn != null and dmlYn != ""'>
and dml_yn = #{dmlYn}
</if>
order by translator_key desc
select (ROW_NUMBER() OVER()) AS translator_key,
aa.*
from (
select a.translator_key,
version_no,
c.item_value as ogdp1,
d.item_value as tr_lang,
tr_career,
tr_name,
e.item_value as tr_sex,
tr_age,
f.item_value as tr_nny,
g.item_value as tr_edu,
tr_cft,
h.item_value as tr_visa,
dml_yn,
case
when info_share_chk = 'T' then 'O'
else 'X'
end as info_share_chk,
case
when edu_chk = 'T' then 'O'
else 'X'
end as edu_chk,
to_char(apt_dt, 'YYYY-MM-DD') as apt_dt,
tr_phone
from translator_info a
inner join (select translator_key, max(version_no) as lastVer
from translator_info
group by translator_key) b
on a.translator_key =b.translator_key and a.version_no = b.lastVer
left outer join code_mgt c on a.ogdp1 = c.item_cd
left outer join code_mgt d on a.tr_lang = d.item_cd
left outer join code_mgt e on a.tr_sex = e.item_cd
left outer join code_mgt f on a.tr_nny = f.item_cd
left outer join code_mgt g on a.tr_edu = g.item_cd
left outer join code_mgt h on a.tr_visa = h.item_cd
<include refid="selectTranslatorListWhere"></include>
order by a.ogdp1 asc, translator_key desc
) aa
</select>
<select id="selectTrFristUserSeq" resultType="String" parameterType="int">

View File

@ -71,6 +71,14 @@
</div>
</div>
<div class="row justify-content-end">
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<div class="col-2">
<select class="form-select form-select-sm" name="infoShareChk">
<option value="T" th:selected="${searchParams.infoShareChk eq 'T'}">개인정보 공개</option>
<option value="F" th:selected="${searchParams.infoShareChk ne 'T'}">개인정보 비공개</option>
</select>
</div>
</th:block>
<div class="col-2">
<select class="form-select form-select-sm" name="trNny">
<option value="">국적선택</option>