parent
7c572897ec
commit
617fbfd212
|
|
@ -41,15 +41,17 @@ public class FaispInterceptor implements HandlerInterceptor {
|
||||||
@Override
|
@Override
|
||||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
|
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
|
||||||
//페이지 렌더링 후 실행.
|
//페이지 렌더링 후 실행.
|
||||||
String uri = request.getRequestURI();
|
if(handler instanceof HandlerMethod){
|
||||||
UserRequestLog log = new UserRequestLog();
|
String uri = request.getRequestURI();
|
||||||
log.setContactIp(Utils.getClientIP(request));
|
UserRequestLog log = new UserRequestLog();
|
||||||
log.setRequestUrl(uri);
|
log.setContactIp(Utils.getClientIP(request));
|
||||||
log.setRequestMethod(request.getMethod());
|
log.setRequestUrl(uri);
|
||||||
log.setSearchParams(request.getQueryString());
|
log.setRequestMethod(request.getMethod());
|
||||||
log.setHandlerDescription(((HandlerMethod) handler).toString());
|
log.setSearchParams(request.getQueryString());
|
||||||
log.setUserOrgan((String) request.getSession().getAttribute("userOrgan"));
|
log.setHandlerDescription(((HandlerMethod) handler).toString());
|
||||||
log.setUserBelong((String) request.getSession().getAttribute("belongValue"));
|
log.setUserOrgan((String) request.getSession().getAttribute("userOrgan"));
|
||||||
userLogService.saveRequestLog(log);
|
log.setUserBelong((String) request.getSession().getAttribute("belongValue"));
|
||||||
|
userLogService.saveRequestLog(log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,132 +21,140 @@ import java.util.List;
|
||||||
@RequestMapping("/faStatistics")
|
@RequestMapping("/faStatistics")
|
||||||
public class ProcessResultController {
|
public class ProcessResultController {
|
||||||
|
|
||||||
private final AuthMgtService authMgtService;
|
private final AuthMgtService authMgtService;
|
||||||
private final ProcessResultService processResultService;
|
private final ProcessResultService processResultService;
|
||||||
private final ViolationRepository violationRepository;
|
private final ViolationRepository violationRepository;
|
||||||
private final CrackdownStatusRepository crackdownStatusRepository;
|
private final CrackdownStatusRepository crackdownStatusRepository;
|
||||||
private final FishingBoatRepository fishingBoatRepository;
|
private final FishingBoatRepository fishingBoatRepository;
|
||||||
private final ProcessResultRepository processResultRepository;
|
private final ProcessResultRepository processResultRepository;
|
||||||
|
|
||||||
@RequestMapping("/processResult")
|
@RequestMapping("/processResult")
|
||||||
public ModelAndView processResult(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult) {
|
public ModelAndView processResult(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult) {
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResult");
|
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResult");
|
||||||
|
|
||||||
//메뉴권한 확인
|
//메뉴권한 확인
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth();
|
||||||
|
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
||||||
processResult.setQueryInfo();
|
processResult.setQueryInfo();
|
||||||
List<ProcessResult> processResultList = processResultService.selectProcessResultList(processResult);
|
if(processResult.getYear()==null){
|
||||||
|
processResult.setYear(LocalDateTime.now().getYear());
|
||||||
for (ProcessResult pr:processResultList) {
|
}
|
||||||
pr.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(pr.getCdsKey()).orElse(null));
|
List<Integer> yearList = processResultService.selectProcessResultYearParam(processResult);
|
||||||
pr.setFishingBoat(fishingBoatRepository.findByCdsKey(pr.getCdsKey()).orElse(null));
|
if(!yearList.contains(processResult.getYear())){
|
||||||
pr.setViolationList(violationRepository.findByFbKey(pr.getFishingBoat().getFbKey()));
|
yearList.add(processResult.getYear());
|
||||||
}
|
|
||||||
|
|
||||||
mav.addObject("processResultList", processResultList);
|
|
||||||
mav.addObject("searchParams", processResult);
|
|
||||||
return mav;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/processResult/processResultViewModal")
|
List<ProcessResult> processResultList = processResultService.selectProcessResultList(processResult);
|
||||||
public ModelAndView processResultViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultViewModal");
|
|
||||||
processResult = processResultService.selectProcessResult(processResult.getPrKey());
|
|
||||||
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
|
||||||
processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getFbKey());
|
|
||||||
processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getBoatNameKr());
|
|
||||||
processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey()));
|
|
||||||
|
|
||||||
mav.addObject("processResult", processResult);
|
for (ProcessResult pr:processResultList) {
|
||||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
pr.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(pr.getCdsKey()).orElse(null));
|
||||||
//메뉴권한 확인
|
pr.setFishingBoat(fishingBoatRepository.findByCdsKey(pr.getCdsKey()).orElse(null));
|
||||||
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth());
|
pr.setViolationList(violationRepository.findByFbKey(pr.getFishingBoat().getFbKey()));
|
||||||
return mav;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/processResult/processResultEditModal")
|
mav.addObject("processResultList", processResultList);
|
||||||
public ModelAndView crackdownStatusEditModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
mav.addObject("searchParams", processResult);
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultEditModal");
|
return mav;
|
||||||
if(processResult.getPrKey()!=null){
|
}
|
||||||
processResult = processResultService.selectProcessResult(processResult.getPrKey());
|
|
||||||
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
@GetMapping("/processResult/processResultViewModal")
|
||||||
processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getFbKey());
|
public ModelAndView processResultViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||||
processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getBoatNameKr());
|
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultViewModal");
|
||||||
processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey()));
|
processResult = processResultService.selectProcessResult(processResult.getPrKey());
|
||||||
}else{
|
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
||||||
processResult.setWrtOrgan(loginUser.getOgCd());
|
processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getFbKey());
|
||||||
processResult.setWrtPart(loginUser.getOfcCd());
|
processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getBoatNameKr());
|
||||||
processResult.setWrtUserGrd(loginUser.getGroupCd());
|
processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey()));
|
||||||
processResult.setWrtUserNm(loginUser.getUserNm());
|
|
||||||
processResult.setWrtDt(LocalDateTime.now());
|
mav.addObject("processResult", processResult);
|
||||||
}
|
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||||
mav.addObject("processResult", processResult);
|
//메뉴권한 확인
|
||||||
return mav;
|
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth());
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/processResult/processResultEditModal")
|
||||||
|
public ModelAndView crackdownStatusEditModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||||
|
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultEditModal");
|
||||||
|
if(processResult.getPrKey()!=null){
|
||||||
|
processResult = processResultService.selectProcessResult(processResult.getPrKey());
|
||||||
|
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
||||||
|
processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getFbKey());
|
||||||
|
processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null).getBoatNameKr());
|
||||||
|
processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey()));
|
||||||
|
}else{
|
||||||
|
processResult.setWrtOrgan(loginUser.getOgCd());
|
||||||
|
processResult.setWrtPart(loginUser.getOfcCd());
|
||||||
|
processResult.setWrtUserGrd(loginUser.getGroupCd());
|
||||||
|
processResult.setWrtUserNm(loginUser.getUserNm());
|
||||||
|
processResult.setWrtDt(LocalDateTime.now());
|
||||||
}
|
}
|
||||||
|
mav.addObject("processResult", processResult);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/processResult/processResultHistoryViewModal")
|
@GetMapping("/processResult/processResultHistoryViewModal")
|
||||||
public ModelAndView processResultHistoryViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
public ModelAndView processResultHistoryViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultHistoryViewModal");
|
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultHistoryViewModal");
|
||||||
List<ProcessResultVersion> processReulstVersionList = processResultService.selectProcessResultVersionList(processResult.getPrKey());
|
List<ProcessResultVersion> processReulstVersionList = processResultService.selectProcessResultVersionList(processResult.getPrKey());
|
||||||
|
|
||||||
mav.addObject("processReulstVersionList", processReulstVersionList);
|
mav.addObject("processReulstVersionList", processReulstVersionList);
|
||||||
mav.addObject("processResult", processResult);
|
mav.addObject("processResult", processResult);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/processResult/processResultHistoryDetail")
|
@GetMapping("/processResult/processResultHistoryDetail")
|
||||||
public ModelAndView processResultHistoryDetail(@AuthenticationPrincipal UserInfo loginUser, ProcessResultVersion processResultVersion){
|
public ModelAndView processResultHistoryDetail(@AuthenticationPrincipal UserInfo loginUser, ProcessResultVersion processResultVersion){
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultHistoryDetail");
|
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultHistoryDetail");
|
||||||
|
|
||||||
Integer cdsKey = processResultVersion.getCdsKey();
|
Integer cdsKey = processResultVersion.getCdsKey();
|
||||||
Integer fbKey = processResultVersion.getFbKey();
|
Integer fbKey = processResultVersion.getFbKey();
|
||||||
|
|
||||||
processResultVersion = processResultService.selectProcessResultVersion(processResultVersion.getVersionNo(), processResultVersion.getPrKey());
|
processResultVersion = processResultService.selectProcessResultVersion(processResultVersion.getVersionNo(), processResultVersion.getPrKey());
|
||||||
processResultVersion.setFishingBoat(fishingBoatRepository.findByFbKey(fbKey).orElse(null));
|
processResultVersion.setFishingBoat(fishingBoatRepository.findByFbKey(fbKey).orElse(null));
|
||||||
processResultVersion.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(cdsKey).orElse(null));
|
processResultVersion.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(cdsKey).orElse(null));
|
||||||
processResultVersion.setViolationList(violationRepository.findByFbKey(fbKey));
|
processResultVersion.setViolationList(violationRepository.findByFbKey(fbKey));
|
||||||
|
|
||||||
mav.addObject("processResultVersion", processResultVersion);
|
mav.addObject("processResultVersion", processResultVersion);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/processResult/processResultAddModal")
|
@GetMapping("/processResult/processResultAddModal")
|
||||||
public ModelAndView sailorAddModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
public ModelAndView sailorAddModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultAddModal");
|
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultAddModal");
|
||||||
|
|
||||||
processResult.setCrackdownStatusList(crackdownStatusRepository.findAll());
|
processResult.setCrackdownStatusList(crackdownStatusRepository.findAll());
|
||||||
|
|
||||||
processResult.setWrtOrgan(loginUser.getOgCd());
|
processResult.setWrtOrgan(loginUser.getOgCd());
|
||||||
processResult.setWrtUserNm(loginUser.getUserNm());
|
processResult.setWrtUserNm(loginUser.getUserNm());
|
||||||
processResult.setWrtDt(LocalDateTime.now());
|
processResult.setWrtDt(LocalDateTime.now());
|
||||||
|
|
||||||
mav.addObject("processResult", processResult);
|
mav.addObject("processResult", processResult);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/processResult/getProcessResult")
|
@PostMapping("/processResult/getProcessResult")
|
||||||
public ProcessResult getProcessResult(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
public ProcessResult getProcessResult(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||||
processResult = processResultRepository.findByCdsKey(processResult.getCdsKey()).orElse(null);
|
processResult = processResultRepository.findByCdsKey(processResult.getCdsKey()).orElse(null);
|
||||||
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
||||||
processResult.setFishingBoat(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
processResult.setFishingBoat(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).orElse(null));
|
||||||
|
|
||||||
processResult.setWrtOrgan(loginUser.getOgCd());
|
processResult.setWrtOrgan(loginUser.getOgCd());
|
||||||
processResult.setWrtUserNm(loginUser.getUserNm());
|
processResult.setWrtUserNm(loginUser.getUserNm());
|
||||||
processResult.setWrtDt(LocalDateTime.now());
|
processResult.setWrtDt(LocalDateTime.now());
|
||||||
return processResult;
|
return processResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/processResult/saveProcessResult")
|
@PostMapping("/processResult/saveProcessResult")
|
||||||
public Integer saveProcessResult(@AuthenticationPrincipal UserInfo loginUser,
|
public Integer saveProcessResult(@AuthenticationPrincipal UserInfo loginUser,
|
||||||
CrackdownStatus crackdownStatus,
|
CrackdownStatus crackdownStatus,
|
||||||
FishingBoat fishingBoat,
|
FishingBoat fishingBoat,
|
||||||
ProcessResult processResult){
|
ProcessResult processResult){
|
||||||
processResult.setWrtUserSeq(loginUser.getUserSeq());
|
processResult.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
processResult.setFishingBoat(fishingBoat);
|
processResult.setFishingBoat(fishingBoat);
|
||||||
processResult.setCrackdownStatus(crackdownStatus);
|
processResult.setCrackdownStatus(crackdownStatus);
|
||||||
return processResultService.saveProcessResult(processResult);
|
return processResultService.saveProcessResult(processResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface ProcessResultMapper {
|
public interface ProcessResultMapper {
|
||||||
List<ProcessResult> selectProcessResultList(ProcessResult processResult);
|
List<ProcessResult> selectProcessResultList(ProcessResult processResult);
|
||||||
Integer selectProcessResultListCnt(ProcessResult processResult);
|
Integer selectProcessResultListCnt(ProcessResult processResult);
|
||||||
|
|
||||||
|
List<Integer> selectProcessResultYearParam(ProcessResult processResult);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public class ProcessResult extends ProcessResultBaseEntity {
|
||||||
@Transient
|
@Transient
|
||||||
private String crackdownPolice;
|
private String crackdownPolice;
|
||||||
@Transient
|
@Transient
|
||||||
private String year;
|
private Integer year;
|
||||||
@Transient
|
@Transient
|
||||||
private String violation;
|
private String violation;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,4 +102,8 @@ public class ProcessResultService extends BaseService {
|
||||||
processResultVersionRepository.save(processResultVersion);
|
processResultVersionRepository.save(processResultVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Integer> selectProcessResultYearParam(ProcessResult processResult) {
|
||||||
|
return processResultMapper.selectProcessResultYearParam(processResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ public class Translator extends BaseModel implements Serializable{
|
||||||
private String naturalization;
|
private String naturalization;
|
||||||
@Column(name = "info_share_chk")
|
@Column(name = "info_share_chk")
|
||||||
private String infoShareChk;
|
private String infoShareChk;
|
||||||
|
@Column(name = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private List<TranslatorFile> translatorFileList = new ArrayList<>();
|
private List<TranslatorFile> translatorFileList = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.main.translator.repository;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.translator.model.Translator;
|
import com.dbnt.faisp.main.translator.model.Translator;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
|
|
@ -22,4 +23,8 @@ public interface TranslatorRepository extends JpaRepository<Translator, Translat
|
||||||
List<Translator> findByTranslatorKeyOrderByVersionNoDesc(Integer translatorKey);
|
List<Translator> findByTranslatorKeyOrderByVersionNoDesc(Integer translatorKey);
|
||||||
|
|
||||||
Optional<Translator> findTop1ByTranslatorKeyOrderByVersionNoDesc(Integer translatorKey);
|
Optional<Translator> findTop1ByTranslatorKeyOrderByVersionNoDesc(Integer translatorKey);
|
||||||
|
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query("update Translator set status = :status where translatorKey = :trKey")
|
||||||
|
void bulkModifyingByTrKeyToStatus(int trKey, String status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ public class TranslatorService extends BaseService {
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void saveTranslatorInfo(Translator translator) {
|
public void saveTranslatorInfo(Translator translator) {
|
||||||
|
translator.setStatus("DST007");
|
||||||
if(translator.getTranslatorKey()==null){
|
if(translator.getTranslatorKey()==null){
|
||||||
Translator dbTranslator = translatorRepository.findFirstByOrderByTranslatorKeyDesc().orElse(null);
|
Translator dbTranslator = translatorRepository.findFirstByOrderByTranslatorKeyDesc().orElse(null);
|
||||||
translator.setTranslatorKey(dbTranslator == null?1:(dbTranslator.getTranslatorKey()+1));
|
translator.setTranslatorKey(dbTranslator == null?1:(dbTranslator.getTranslatorKey()+1));
|
||||||
|
|
@ -157,8 +158,7 @@ public class TranslatorService extends BaseService {
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void deleteTranslatorInfo(int trKey) {
|
public void deleteTranslatorInfo(int trKey) {
|
||||||
translatorCareerRepository.deleteByTranslatorKey(trKey);
|
translatorRepository.bulkModifyingByTrKeyToStatus(trKey, "DST008");
|
||||||
translatorRepository.deleteByTranslatorKey(trKey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TranslatorFile selectTranslatorFile(Integer translatorKey, Integer versionNo, Integer fileSeq) {
|
public TranslatorFile selectTranslatorFile(Integer translatorKey, Integer versionNo, Integer fileSeq) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper">
|
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper">
|
||||||
<sql id="selectCrackdownStatusListWhere">
|
<sql id="selectCrackdownStatusListWhere">
|
||||||
<where>
|
<where>
|
||||||
|
c.status <> 'DST008'
|
||||||
<if test='year != null and year != ""'>
|
<if test='year != null and year != ""'>
|
||||||
and extract(year from a.napo_dt) = #{year}::numeric
|
and extract(year from a.napo_dt) = #{year}::numeric
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -4,84 +4,91 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.ProcessResultMapper">
|
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.ProcessResultMapper">
|
||||||
<sql id="selectProcessResultListWhere">
|
<sql id="selectProcessResultListWhere">
|
||||||
<where>
|
<where>
|
||||||
<if test='year != null and year != ""'>
|
fb.status <> 'DST008'
|
||||||
And EXTRACT(YEAR FROM pr.wrt_dt) = EXTRACT(YEAR FROM CAST(#{year} AS DATE)::TIMESTAMP)
|
<if test='year != null and year != ""'>
|
||||||
</if>
|
And EXTRACT(YEAR FROM pr.wrt_dt) = ${year}
|
||||||
<if test='caseNum != null and caseNum != ""'>
|
</if>
|
||||||
AND caseNum = #{caseNum}
|
<if test='caseNum != null and caseNum != ""'>
|
||||||
</if>
|
AND caseNum = #{caseNum}
|
||||||
<if test='crackdownPolice != null and crackdownPolice != ""'>
|
</if>
|
||||||
AND crackdown_police = #{crackdownPolice}
|
<if test='crackdownPolice != null and crackdownPolice != ""'>
|
||||||
</if>
|
AND crackdown_police = #{crackdownPolice}
|
||||||
<if test='boatNameKr != null and boatNameKr != ""'>
|
</if>
|
||||||
AND boat_name_kr LIKE CONCAT('%', #{boatNameKr}, '%')
|
<if test='boatNameKr != null and boatNameKr != ""'>
|
||||||
</if>
|
AND boat_name_kr LIKE CONCAT('%', #{boatNameKr}, '%')
|
||||||
<if test='violation != null and violation != ""'>
|
</if>
|
||||||
AND violation = #{violation}
|
<if test='violation != null and violation != ""'>
|
||||||
</if>
|
AND violation = #{violation}
|
||||||
<if test='sentencingCourt != null and sentencingCourt != ""'>
|
</if>
|
||||||
AND sentencing_court LIKE CONCAT('%', #{sentencingCourt}, '%')
|
<if test='sentencingCourt != null and sentencingCourt != ""'>
|
||||||
</if>
|
AND sentencing_court LIKE CONCAT('%', #{sentencingCourt}, '%')
|
||||||
<if test='sentencingDetail != null and sentencingDetail != ""'>
|
</if>
|
||||||
AND sentencing_detail LIKE CONCAT('%', #{sentencingDetail}, '%')
|
<if test='sentencingDetail != null and sentencingDetail != ""'>
|
||||||
</if>
|
AND sentencing_detail LIKE CONCAT('%', #{sentencingDetail}, '%')
|
||||||
<if test='executionDetail != null and executionDetail != ""'>
|
</if>
|
||||||
AND execution_detail = #{executionDetail}
|
<if test='executionDetail != null and executionDetail != ""'>
|
||||||
</if>
|
AND execution_detail = #{executionDetail}
|
||||||
<if test='returnDt != null'>
|
</if>
|
||||||
AND return_dt = #{returnDt}::DATE
|
<if test='returnDt != null'>
|
||||||
</if>
|
AND return_dt = #{returnDt}::DATE
|
||||||
<if test='consignmentStartDt != null'>
|
</if>
|
||||||
AND consignment_start_dt = #{consignmentStartDt}::DATE
|
<if test='consignmentStartDt != null'>
|
||||||
</if>
|
AND consignment_start_dt = #{consignmentStartDt}::DATE
|
||||||
<if test='consignmentEndDt != null'>
|
</if>
|
||||||
AND consignment_end_dt = #{consignmentEndDt}::DATE
|
<if test='consignmentEndDt != null'>
|
||||||
</if>
|
AND consignment_end_dt = #{consignmentEndDt}::DATE
|
||||||
<if test='confiscationDt != null'>
|
</if>
|
||||||
AND confiscation_dt = #{confiscationDt}::DATE
|
<if test='confiscationDt != null'>
|
||||||
</if>
|
AND confiscation_dt = #{confiscationDt}::DATE
|
||||||
<if test='boatDisposalDt != null'>
|
</if>
|
||||||
AND boat_disposal_dt = #{boatDisposalDt}::DATE
|
<if test='boatDisposalDt != null'>
|
||||||
</if>
|
AND boat_disposal_dt = #{boatDisposalDt}::DATE
|
||||||
</where>
|
</if>
|
||||||
</sql>
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="selectProcessResultList" resultType="ProcessResult" parameterType="ProcessResult">
|
<select id="selectProcessResultList" resultType="ProcessResult" parameterType="ProcessResult">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
pr.pr_key
|
pr.pr_key
|
||||||
, cs.cds_key
|
, cs.cds_key
|
||||||
, cs.case_num
|
, cs.case_num
|
||||||
, cs.napo_sea_point_lon
|
, cs.napo_sea_point_lon
|
||||||
, cs.napo_sea_point_lat
|
, cs.napo_sea_point_lat
|
||||||
, cs.napo_sea_point_detail
|
, cs.napo_sea_point_detail
|
||||||
, fb.boat_name_kr
|
, fb.boat_name_kr
|
||||||
, pr.sentencing_court
|
, pr.sentencing_court
|
||||||
, pr.sentencing_detail
|
, pr.sentencing_detail
|
||||||
, pr.execution_detail
|
, pr.execution_detail
|
||||||
, pr.return_dt
|
, pr.return_dt
|
||||||
, pr.consignment_start_dt
|
, pr.consignment_start_dt
|
||||||
, pr.consignment_end_dt
|
, pr.consignment_end_dt
|
||||||
, pr.confiscation_dt
|
, pr.confiscation_dt
|
||||||
, pr.boat_disposal_dt
|
, pr.boat_disposal_dt
|
||||||
, pr.wrt_dt
|
, pr.wrt_dt
|
||||||
, prv.upd_dt AS updDt
|
, prv.upd_dt AS updDt
|
||||||
FROM process_result pr
|
FROM process_result pr
|
||||||
INNER JOIN crackdown_status cs
|
INNER JOIN crackdown_status cs
|
||||||
ON pr.cds_key = cs.cds_key
|
ON pr.cds_key = cs.cds_key
|
||||||
INNER JOIN fishing_boat fb
|
INNER JOIN fishing_boat fb
|
||||||
ON pr.cds_key = fb.cds_key
|
ON pr.cds_key = fb.cds_key
|
||||||
LEFT JOIN violation v
|
LEFT JOIN violation v
|
||||||
ON fb.fb_key = v.fb_key
|
ON fb.fb_key = v.fb_key
|
||||||
INNER JOIN (
|
INNER JOIN (
|
||||||
SELECT pr_key ,MAX(wrt_dt) AS upd_dt
|
SELECT pr_key ,MAX(wrt_dt) AS upd_dt
|
||||||
FROM process_result_version
|
FROM process_result_version
|
||||||
GROUP BY pr_key
|
GROUP BY pr_key
|
||||||
) prv
|
) prv
|
||||||
ON pr.pr_key = prv.pr_key
|
ON pr.pr_key = prv.pr_key
|
||||||
<include refid="selectProcessResultListWhere"></include>
|
<include refid="selectProcessResultListWhere"></include>
|
||||||
ORDER BY pr.pr_key DESC
|
ORDER BY pr.pr_key DESC
|
||||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectProcessResultYearParam" resultType="int" parameterType="ProcessResult">
|
||||||
|
select distinct extract(year from wrt_dt) as year
|
||||||
|
from process_result
|
||||||
|
where wrt_dt is not null
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -4,307 +4,312 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.dbnt.faisp.main.translator.mapper.TranslatorMapper">
|
<mapper namespace="com.dbnt.faisp.main.translator.mapper.TranslatorMapper">
|
||||||
<sql id="selectTranslatorListWhere">
|
<sql id="selectTranslatorListWhere">
|
||||||
<where>
|
<where>
|
||||||
ogdp1 in
|
ogdp1 in
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test='trLang != null and trLang != ""'>
|
and status <> 'DST008'
|
||||||
and tr_lang = #{trLang}
|
<if test='trLang != null and trLang != ""'>
|
||||||
</if>
|
and tr_lang = #{trLang}
|
||||||
<if test='ogdp1 != null and ogdp1 != ""'>
|
</if>
|
||||||
and ogdp1 = #{ogdp1}
|
<if test='ogdp1 != null and ogdp1 != ""'>
|
||||||
</if>
|
and ogdp1 = #{ogdp1}
|
||||||
<if test='trName != null and trName != ""'>
|
</if>
|
||||||
and tr_name = #{trName}
|
<if test='trName != null and trName != ""'>
|
||||||
</if>
|
and tr_name = #{trName}
|
||||||
<if test='trNny != null and trNny != ""'>
|
</if>
|
||||||
and tr_nny = #{trNny}
|
<if test='trNny != null and trNny != ""'>
|
||||||
</if>
|
and tr_nny = #{trNny}
|
||||||
<if test='trVisa != null and trVisa != ""'>
|
</if>
|
||||||
and tr_visa = #{trVisa}
|
<if test='trVisa != null and trVisa != ""'>
|
||||||
</if>
|
and tr_visa = #{trVisa}
|
||||||
<if test='startDate != null and startDate != ""'>
|
</if>
|
||||||
and apt_dt >= #{startDate}::date
|
<if test='startDate != null and startDate != ""'>
|
||||||
</if>
|
and apt_dt >= #{startDate}::date
|
||||||
<if test='endDate != null and endDate != ""'>
|
</if>
|
||||||
and apt_dt <= #{endDate}::date+1
|
<if test='endDate != null and endDate != ""'>
|
||||||
</if>
|
and apt_dt <= #{endDate}::date+1
|
||||||
<if test='dmlYn != null and dmlYn != ""'>
|
</if>
|
||||||
and dml_yn = #{dmlYn}
|
<if test='dmlYn != null and dmlYn != ""'>
|
||||||
</if>
|
and dml_yn = #{dmlYn}
|
||||||
</where>
|
</if>
|
||||||
</sql>
|
</where>
|
||||||
<select id="selectTranslatorList" resultType="Translator" parameterType="Translator">
|
</sql>
|
||||||
select a.translator_key,
|
<select id="selectTranslatorList" resultType="Translator" parameterType="Translator">
|
||||||
version_no,
|
select a.translator_key,
|
||||||
c.item_value as ogdp1,
|
version_no,
|
||||||
d.item_value as tr_lang,
|
c.item_value as ogdp1,
|
||||||
tr_career,
|
d.item_value as tr_lang,
|
||||||
tr_name,
|
tr_career,
|
||||||
e.item_value as tr_sex,
|
tr_name,
|
||||||
tr_age,
|
e.item_value as tr_sex,
|
||||||
f.item_value as tr_nny,
|
tr_age,
|
||||||
g.item_value as tr_edu,
|
f.item_value as tr_nny,
|
||||||
tr_cft,
|
g.item_value as tr_edu,
|
||||||
h.item_value as tr_visa,
|
tr_cft,
|
||||||
dml_yn,
|
h.item_value as tr_visa,
|
||||||
apt_dt,
|
dml_yn,
|
||||||
tr_phone
|
apt_dt,
|
||||||
|
tr_phone
|
||||||
from translator_info a
|
from translator_info a
|
||||||
inner join (select translator_key, max(version_no) as lastVer
|
inner join (select translator_key, max(version_no) as lastVer
|
||||||
from translator_info
|
from translator_info
|
||||||
group by translator_key) b
|
group by translator_key) b
|
||||||
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
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 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 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 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 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 g on a.tr_edu = g.item_cd
|
||||||
left outer join code_mgt h on a.tr_visa = h.item_cd
|
left outer join code_mgt h on a.tr_visa = h.item_cd
|
||||||
<include refid="selectTranslatorListWhere"></include>
|
<include refid="selectTranslatorListWhere"></include>
|
||||||
order by translator_key desc
|
order by translator_key desc
|
||||||
limit #{rowCnt} offset #{firstIndex}
|
limit #{rowCnt} offset #{firstIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTranslatorListCnt" resultType="int" parameterType="Translator">
|
<select id="selectTranslatorListCnt" resultType="int" parameterType="Translator">
|
||||||
select count(*)
|
select count(*)
|
||||||
from(
|
from(
|
||||||
select a.translator_key,
|
select a.translator_key,
|
||||||
version_no,
|
version_no,
|
||||||
c.item_value as ogdp1,
|
c.item_value as ogdp1,
|
||||||
d.item_value as tr_lang,
|
d.item_value as tr_lang,
|
||||||
tr_career,
|
tr_career,
|
||||||
tr_name,
|
tr_name,
|
||||||
e.item_value as tr_sex,
|
e.item_value as tr_sex,
|
||||||
tr_age,
|
tr_age,
|
||||||
f.item_value as tr_nny,
|
f.item_value as tr_nny,
|
||||||
g.item_value as tr_edu,
|
g.item_value as tr_edu,
|
||||||
tr_cft,
|
tr_cft,
|
||||||
h.item_value as tr_visa,
|
h.item_value as tr_visa,
|
||||||
dml_yn,
|
dml_yn,
|
||||||
apt_dt,
|
apt_dt,
|
||||||
tr_phone
|
tr_phone
|
||||||
from translator_info a
|
from translator_info a
|
||||||
inner join (select translator_key, max(version_no) as lastVer
|
inner join (select translator_key, max(version_no) as lastVer
|
||||||
from translator_info
|
from translator_info
|
||||||
group by translator_key) b
|
group by translator_key) b
|
||||||
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
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 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 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 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 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 g on a.tr_edu = g.item_cd
|
||||||
left outer join code_mgt h on a.tr_visa = h.item_cd
|
left outer join code_mgt h on a.tr_visa = h.item_cd
|
||||||
<include refid="selectTranslatorListWhere"></include>
|
<include refid="selectTranslatorListWhere"></include>
|
||||||
) a
|
) a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectHistoryList" resultType="Translator" parameterType="Translator">
|
<select id="selectHistoryList" resultType="Translator" parameterType="Translator">
|
||||||
select translator_key,
|
select translator_key,
|
||||||
version_no,
|
version_no,
|
||||||
wrt_organ,
|
wrt_organ,
|
||||||
wrt_part,
|
wrt_part,
|
||||||
(select item_value from code_mgt where item_cd = wrt_title) as wrt_title,
|
(select item_value from code_mgt where item_cd = wrt_title) as wrt_title,
|
||||||
wrt_nm,
|
wrt_nm,
|
||||||
wrt_dt
|
wrt_dt
|
||||||
from translator_info
|
from translator_info
|
||||||
where translator_key = #{translatorKey}
|
where translator_key = #{translatorKey}
|
||||||
order by wrt_dt desc
|
order by wrt_dt desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="HistoryView" resultType="Translator" parameterType="Translator">
|
<select id="HistoryView" resultType="Translator" parameterType="Translator">
|
||||||
select a.translator_key,
|
select a.translator_key,
|
||||||
version_no,
|
version_no,
|
||||||
c.item_value as ogdp1,
|
c.item_value as ogdp1,
|
||||||
d.item_value as tr_lang,
|
d.item_value as tr_lang,
|
||||||
tr_career,
|
tr_career,
|
||||||
tr_name,
|
tr_name,
|
||||||
e.item_value as tr_sex,
|
e.item_value as tr_sex,
|
||||||
tr_age,
|
tr_age,
|
||||||
f.item_value as tr_nny,
|
f.item_value as tr_nny,
|
||||||
g.item_value as tr_edu,
|
g.item_value as tr_edu,
|
||||||
tr_cft,
|
tr_cft,
|
||||||
h.item_value as tr_visa,
|
h.item_value as tr_visa,
|
||||||
dml_yn,
|
dml_yn,
|
||||||
apt_dt,
|
apt_dt,
|
||||||
tr_phone,
|
tr_phone,
|
||||||
remark
|
remark
|
||||||
from translator_info a
|
from translator_info a
|
||||||
left outer join code_mgt c on a.ogdp1 = c.item_cd
|
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 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 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 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 g on a.tr_edu = g.item_cd
|
||||||
left outer join code_mgt h on a.tr_visa = h.item_cd
|
left outer join code_mgt h on a.tr_visa = h.item_cd
|
||||||
where translator_key = #{translatorKey}
|
where translator_key = #{translatorKey}
|
||||||
and version_no = #{versionNo}
|
and version_no = #{versionNo}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCareerList" resultType="TranslatorCrr" parameterType="TranslatorCrr">
|
<select id="selectCareerList" resultType="TranslatorCrr" parameterType="TranslatorCrr">
|
||||||
select career_seq,
|
select career_seq,
|
||||||
translator_key,
|
translator_key,
|
||||||
his_gubun,
|
his_gubun,
|
||||||
contents,
|
contents,
|
||||||
remark,
|
remark,
|
||||||
tc_dt
|
tc_dt
|
||||||
from translator_career
|
from translator_career
|
||||||
where translator_key = #{translatorKey}
|
where translator_key = #{translatorKey}
|
||||||
and his_gubun = #{hisGubun}
|
and his_gubun = #{hisGubun}
|
||||||
order by career_seq desc
|
order by career_seq desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStatisticsLangCnt" resultType="com.dbnt.faisp.util.ParamMap">
|
<select id="selectStatisticsLangCnt" resultType="com.dbnt.faisp.util.ParamMap">
|
||||||
select (ROW_NUMBER() OVER()) AS rownum,
|
select (ROW_NUMBER() OVER()) AS rownum,
|
||||||
cm.item_value as lang ,
|
cm.item_value as lang ,
|
||||||
sum(center+west+south+east+jeju) as cnt_total,
|
sum(center+west+south+east+jeju) as cnt_total,
|
||||||
sum(center) as cnt_center,
|
sum(center) as cnt_center,
|
||||||
sum(west) as cnt_west,
|
sum(west) as cnt_west,
|
||||||
sum(south) as cnt_south,
|
sum(south) as cnt_south,
|
||||||
sum(east) as cnt_east,
|
sum(east) as cnt_east,
|
||||||
sum(jeju) as cnt_jeju
|
sum(jeju) as cnt_jeju
|
||||||
from (select
|
from (select
|
||||||
a.tr_lang as lang,
|
a.tr_lang as lang,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG002' or c.parent_organ = 'OG002' then 1
|
when c.organ_cd = 'OG002' or c.parent_organ = 'OG002' then 1
|
||||||
else 0
|
else 0
|
||||||
end as center,
|
end as center,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG003' or c.parent_organ = 'OG003' then 1
|
when c.organ_cd = 'OG003' or c.parent_organ = 'OG003' then 1
|
||||||
else 0
|
else 0
|
||||||
end as west,
|
end as west,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG004' or c.parent_organ = 'OG004' then 1
|
when c.organ_cd = 'OG004' or c.parent_organ = 'OG004' then 1
|
||||||
else 0
|
else 0
|
||||||
end as south,
|
end as south,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG005' or c.parent_organ = 'OG005' then 1
|
when c.organ_cd = 'OG005' or c.parent_organ = 'OG005' then 1
|
||||||
else 0
|
else 0
|
||||||
end as east,
|
end as east,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG006' or c.parent_organ = 'OG006' then 1
|
when c.organ_cd = 'OG006' or c.parent_organ = 'OG006' then 1
|
||||||
else 0
|
else 0
|
||||||
end as jeju
|
end as jeju
|
||||||
from translator_info a
|
from translator_info a
|
||||||
inner join (select translator_key, max(version_no) as lastVer
|
inner join (select translator_key, max(version_no) as lastVer
|
||||||
from translator_info
|
from translator_info
|
||||||
group by translator_key) b
|
group by translator_key) b
|
||||||
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
||||||
inner join organ_config c on a.ogdp1 = c.organ_cd) d
|
inner join organ_config c on a.ogdp1 = c.organ_cd
|
||||||
inner join code_mgt cm on d.lang=cm.item_cd
|
where a.status <> 'DST008'
|
||||||
group by cm.item_value
|
) d
|
||||||
|
inner join code_mgt cm on d.lang=cm.item_cd
|
||||||
|
group by cm.item_value
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStatisticsLangTotal" resultType="com.dbnt.faisp.util.ParamMap">
|
<select id="selectStatisticsLangTotal" resultType="com.dbnt.faisp.util.ParamMap">
|
||||||
select sum(cnt_total) as total_total,
|
select sum(cnt_total) as total_total,
|
||||||
sum(cnt_center) as total_center,
|
sum(cnt_center) as total_center,
|
||||||
sum(cnt_west) as total_west,
|
sum(cnt_west) as total_west,
|
||||||
sum(cnt_south) as total_south,
|
sum(cnt_south) as total_south,
|
||||||
sum(cnt_east) as total_east,
|
sum(cnt_east) as total_east,
|
||||||
sum(jeju) as total_jeju
|
sum(jeju) as total_jeju
|
||||||
from(
|
from(
|
||||||
select cm.item_value ,
|
select cm.item_value ,
|
||||||
sum(center+west+south+east+jeju) as cnt_total,
|
sum(center+west+south+east+jeju) as cnt_total,
|
||||||
sum(center) as cnt_center,
|
sum(center) as cnt_center,
|
||||||
sum(west) as cnt_west,
|
sum(west) as cnt_west,
|
||||||
sum(south) as cnt_south,
|
sum(south) as cnt_south,
|
||||||
sum(east) as cnt_east,
|
sum(east) as cnt_east,
|
||||||
sum(jeju) as jeju
|
sum(jeju) as jeju
|
||||||
from (select
|
from (select
|
||||||
a.tr_lang as lang,
|
a.tr_lang as lang,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG002' or c.parent_organ = 'OG002' then 1
|
when c.organ_cd = 'OG002' or c.parent_organ = 'OG002' then 1
|
||||||
else 0
|
else 0
|
||||||
end as center,
|
end as center,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG003' or c.parent_organ = 'OG003' then 1
|
when c.organ_cd = 'OG003' or c.parent_organ = 'OG003' then 1
|
||||||
else 0
|
else 0
|
||||||
end as west,
|
end as west,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG004' or c.parent_organ = 'OG004' then 1
|
when c.organ_cd = 'OG004' or c.parent_organ = 'OG004' then 1
|
||||||
else 0
|
else 0
|
||||||
end as south,
|
end as south,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG005' or c.parent_organ = 'OG005' then 1
|
when c.organ_cd = 'OG005' or c.parent_organ = 'OG005' then 1
|
||||||
else 0
|
else 0
|
||||||
end as east,
|
end as east,
|
||||||
case
|
case
|
||||||
when c.organ_cd = 'OG006' or c.parent_organ = 'OG006' then 1
|
when c.organ_cd = 'OG006' or c.parent_organ = 'OG006' then 1
|
||||||
else 0
|
else 0
|
||||||
end as jeju
|
end as jeju
|
||||||
from translator_info a
|
from translator_info a
|
||||||
inner join (select translator_key, max(version_no) as lastVer
|
inner join (select translator_key, max(version_no) as lastVer
|
||||||
from translator_info
|
from translator_info
|
||||||
group by translator_key) b
|
group by translator_key) b
|
||||||
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
||||||
inner join organ_config c on a.ogdp1 = c.organ_cd) d
|
inner join organ_config c on a.ogdp1 = c.organ_cd
|
||||||
inner join code_mgt cm on d.lang=cm.item_cd
|
where a.status <> 'DST008') d
|
||||||
group by cm.item_value
|
inner join code_mgt cm on d.lang=cm.item_cd
|
||||||
) a
|
group by cm.item_value
|
||||||
|
) a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTranslatorListEx" resultType="com.dbnt.faisp.util.ParamMap" parameterType="Translator">
|
<select id="selectTranslatorListEx" resultType="com.dbnt.faisp.util.ParamMap" parameterType="Translator">
|
||||||
select a.translator_key,
|
select a.translator_key,
|
||||||
version_no,
|
version_no,
|
||||||
c.item_value as ogdp1,
|
c.item_value as ogdp1,
|
||||||
d.item_value as tr_lang,
|
d.item_value as tr_lang,
|
||||||
tr_career,
|
tr_career,
|
||||||
tr_name,
|
tr_name,
|
||||||
e.item_value as tr_sex,
|
e.item_value as tr_sex,
|
||||||
tr_age,
|
tr_age,
|
||||||
f.item_value as tr_nny,
|
f.item_value as tr_nny,
|
||||||
g.item_value as tr_edu,
|
g.item_value as tr_edu,
|
||||||
tr_cft,
|
tr_cft,
|
||||||
h.item_value as tr_visa,
|
h.item_value as tr_visa,
|
||||||
dml_yn,
|
dml_yn,
|
||||||
apt_dt,
|
apt_dt,
|
||||||
tr_phone
|
tr_phone
|
||||||
from translator_info a
|
from translator_info a
|
||||||
inner join (select translator_key, max(version_no) as lastVer
|
inner join (select translator_key, max(version_no) as lastVer
|
||||||
from translator_info
|
from translator_info
|
||||||
group by translator_key) b
|
group by translator_key) b
|
||||||
on a.translator_key =b.translator_key and a.version_no = b.lastVer
|
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 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 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 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 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 g on a.tr_edu = g.item_cd
|
||||||
left outer join code_mgt h on a.tr_visa = h.item_cd
|
left outer join code_mgt h on a.tr_visa = h.item_cd
|
||||||
where wrt_organ in
|
where 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}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test='trLang != null and trLang != ""'>
|
and status <> 'DST008'
|
||||||
and tr_lang = #{trLang}
|
<if test='trLang != null and trLang != ""'>
|
||||||
</if>
|
and tr_lang = #{trLang}
|
||||||
<if test='ogdp1 != null and ogdp1 != ""'>
|
</if>
|
||||||
and ogdp1 = #{ogdp1}
|
<if test='ogdp1 != null and ogdp1 != ""'>
|
||||||
</if>
|
and ogdp1 = #{ogdp1}
|
||||||
<if test='trName != null and trName != ""'>
|
</if>
|
||||||
and tr_name = #{trName}
|
<if test='trName != null and trName != ""'>
|
||||||
</if>
|
and tr_name = #{trName}
|
||||||
<if test='trNny != null and trNny != ""'>
|
</if>
|
||||||
and tr_nny = #{trNny}
|
<if test='trNny != null and trNny != ""'>
|
||||||
</if>
|
and tr_nny = #{trNny}
|
||||||
<if test='trVisa != null and trVisa != ""'>
|
</if>
|
||||||
and tr_visa = #{trVisa}
|
<if test='trVisa != null and trVisa != ""'>
|
||||||
</if>
|
and tr_visa = #{trVisa}
|
||||||
<if test='aptDt != null'>
|
</if>
|
||||||
and to_char(apt_dt,'YYYY-MM-DD') = #{aptDt}::VARCHAR
|
<if test='aptDt != null'>
|
||||||
</if>
|
and to_char(apt_dt,'YYYY-MM-DD') = #{aptDt}::VARCHAR
|
||||||
<if test='dmlYn != null and dmlYn != ""'>
|
</if>
|
||||||
and dml_yn = #{dmlYn}
|
<if test='dmlYn != null and dmlYn != ""'>
|
||||||
</if>
|
and dml_yn = #{dmlYn}
|
||||||
order by translator_key desc
|
</if>
|
||||||
|
order by translator_key desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTrFristUserSeq" resultType="String" parameterType="int">
|
<select id="selectTrFristUserSeq" resultType="String" parameterType="int">
|
||||||
select wrt_user_seq
|
select wrt_user_seq
|
||||||
from translator_info
|
from translator_info
|
||||||
where translator_key = #{translatorKey}
|
where translator_key = #{translatorKey}
|
||||||
order by version_no asc
|
order by version_no asc
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue