fix:민간통역인 수정권한 수정

TaehunPark 2022-09-27 13:43:38 +09:00
parent a6f69d3e5c
commit 04d9e4695d
7 changed files with 24 additions and 11 deletions

View File

@ -74,6 +74,8 @@ public class TranslatorController {
ModelAndView mav = new ModelAndView("translator/translatorEditModal");
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/translator/info").get(0).getAccessAuth();
mav.addObject("wrtId", translatorSevice.selectTrFristId(translator.getTranslatorKey()));
mav.addObject("userId", loginUser.getUserId());
mav.addObject("trInfo", translatorSevice.selectTranslatorView(translator));
mav.addObject("accessAuth", accessAuth);
return mav;
@ -109,6 +111,8 @@ public class TranslatorController {
mav.addObject("policeCrr", translatorSevice.selectMaritimePoliceCareer(translatorCrr));
mav.addObject("anotherCrr", translatorSevice.selectAnotherOrganizationCareer(translatorCrr));
mav.addObject("trKey", translatorCrr.getTranslatorKey());
mav.addObject("wrtId", translatorSevice.selectTrFristId(translatorCrr.getTranslatorKey()));
mav.addObject("userId", loginUser.getUserId());
mav.addObject("accessAuth", accessAuth);
return mav;
}

View File

@ -2,7 +2,6 @@ package com.dbnt.faisp.translator.mapper;
import com.dbnt.faisp.translator.model.Translator;
import com.dbnt.faisp.translator.model.TranslatorCrr;
import com.dbnt.faisp.userInfo.model.UserInfo;
import com.dbnt.faisp.util.ParamMap;
import org.apache.ibatis.annotations.Mapper;
@ -28,4 +27,6 @@ public interface TranslatorMapper {
List<ParamMap> selectTranslatorListEx(Translator translator);
String selectTrFristId(int translatorKey);
}

View File

@ -140,4 +140,8 @@ public class TranslatorService {
return translatorMapper.selectTranslatorListEx(translator);
}
public String selectTrFristId(int translatorKey) {
return translatorMapper.selectTrFristId(translatorKey);
}
}

View File

@ -312,5 +312,13 @@
</if>
order by translator_key desc
</select>
<select id="selectTrFristId" resultType="String" parameterType="int">
select wrt_nm
from translator_info
where translator_key = #{translatorKey}
order by version_no asc
limit 1
</select>
</mapper>

View File

@ -133,12 +133,8 @@
<td th:text="${trInfo.trEdu}"></td>
<td th:text="${trInfo.trCft}"></td>
<td th:text="${trInfo.trVisa}"></td>
<th:block th:if="${trInfo.dmlYn == 'O'}">
<td></td>
</th:block>
<th:block th:if="${trInfo.dmlYn == 'X'}">
<td></td>
</th:block>
<td th:if="${trInfo.dmlYn == 'O'}"></td>
<td th:unless="${trInfo.dmlYn == 'O'}"></td>
<td th:text="${trInfo.aptDt}"></td>
<td th:text="${trInfo.trPhone}"></td>
</tr>

View File

@ -29,7 +29,7 @@
<td th:text="${crrInfo.tcDt}"></td>
<td th:text="${crrInfo.contents}"></td>
<td th:text="${crrInfo.remark}"></td>
<td><button type="button" class="btn btn-danger m-0" id="deleteCareerBtn" th:onclick="|javascript:deleteCareerBtn('${crrInfo.careerSeq}','${crrInfo.translatorKey}')|" th:unless="${accessAuth eq 'ACC001'}">삭제</button></td>
<td><button type="button" class="btn btn-danger m-0" id="deleteCareerBtn" th:onclick="|javascript:deleteCareerBtn('${crrInfo.careerSeq}','${crrInfo.translatorKey}')|" th:if="${accessAuth eq 'ACC003'} or ${wrtId eq userId}">삭제</button></td>
</tr>
</tbody>
</table>
@ -52,7 +52,7 @@
<td th:text="${crrInfo.tcDt}"></td>
<td th:text="${crrInfo.contents}"></td>
<td th:text="${crrInfo.remark}"></td>
<td><button type="button" class="btn btn-danger m-0" id="deleteCareerBtn" th:onclick="|javascript:deleteCareerBtn('${crrInfo.careerSeq}','${crrInfo.translatorKey}')|" th:unless="${accessAuth eq 'ACC001'}">삭제</button></td>
<td><button type="button" class="btn btn-danger m-0" id="deleteCareerBtn" th:onclick="|javascript:deleteCareerBtn('${crrInfo.careerSeq}','${crrInfo.translatorKey}')|" th:if="${accessAuth eq 'ACC003'} or ${wrtId eq userId}">삭제</button></td>
</tr>
</tbody>
</table>
@ -61,7 +61,7 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="crrInsertBtn" th:unless="${accessAuth eq 'ACC001'}">이력등록</button>
<button type="button" class="btn btn-primary" id="crrInsertBtn" th:if="${accessAuth eq 'ACC003'} or ${wrtId eq userId}">이력등록</button>
</div>
</div>
</div>

View File

@ -113,7 +113,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" id="trDeleteBtn" th:unless="${accessAuth eq 'ACC001'}">해임</button>
<button type="button" class="btn btn-primary" id="updateBtn" th:unless="${accessAuth eq 'ACC001'}">수정</button>
<button type="button" class="btn btn-primary" id="updateBtn" th:if="${accessAuth eq 'ACC003'} or ${wrtId eq userId}">수정</button>
</div>
</form>
</div>