parent
7c572897ec
commit
617fbfd212
|
|
@ -41,6 +41,7 @@ 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 {
|
||||||
//페이지 렌더링 후 실행.
|
//페이지 렌더링 후 실행.
|
||||||
|
if(handler instanceof HandlerMethod){
|
||||||
String uri = request.getRequestURI();
|
String uri = request.getRequestURI();
|
||||||
UserRequestLog log = new UserRequestLog();
|
UserRequestLog log = new UserRequestLog();
|
||||||
log.setContactIp(Utils.getClientIP(request));
|
log.setContactIp(Utils.getClientIP(request));
|
||||||
|
|
@ -52,4 +53,5 @@ public class FaispInterceptor implements HandlerInterceptor {
|
||||||
log.setUserBelong((String) request.getSession().getAttribute("belongValue"));
|
log.setUserBelong((String) request.getSession().getAttribute("belongValue"));
|
||||||
userLogService.saveRequestLog(log);
|
userLogService.saveRequestLog(log);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,14 @@ public class ProcessResultController {
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
||||||
processResult.setQueryInfo();
|
processResult.setQueryInfo();
|
||||||
|
if(processResult.getYear()==null){
|
||||||
|
processResult.setYear(LocalDateTime.now().getYear());
|
||||||
|
}
|
||||||
|
List<Integer> yearList = processResultService.selectProcessResultYearParam(processResult);
|
||||||
|
if(!yearList.contains(processResult.getYear())){
|
||||||
|
yearList.add(processResult.getYear());
|
||||||
|
}
|
||||||
|
|
||||||
List<ProcessResult> processResultList = processResultService.selectProcessResultList(processResult);
|
List<ProcessResult> processResultList = processResultService.selectProcessResultList(processResult);
|
||||||
|
|
||||||
for (ProcessResult pr:processResultList) {
|
for (ProcessResult pr:processResultList) {
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,6 @@ import java.util.List;
|
||||||
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>
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,9 @@
|
||||||
<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>
|
||||||
|
fb.status <> 'DST008'
|
||||||
<if test='year != null and year != ""'>
|
<if test='year != null and year != ""'>
|
||||||
And EXTRACT(YEAR FROM pr.wrt_dt) = EXTRACT(YEAR FROM CAST(#{year} AS DATE)::TIMESTAMP)
|
And EXTRACT(YEAR FROM pr.wrt_dt) = ${year}
|
||||||
</if>
|
</if>
|
||||||
<if test='caseNum != null and caseNum != ""'>
|
<if test='caseNum != null and caseNum != ""'>
|
||||||
AND caseNum = #{caseNum}
|
AND caseNum = #{caseNum}
|
||||||
|
|
@ -84,4 +85,10 @@
|
||||||
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>
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
and status <> 'DST008'
|
||||||
<if test='trLang != null and trLang != ""'>
|
<if test='trLang != null and trLang != ""'>
|
||||||
and tr_lang = #{trLang}
|
and tr_lang = #{trLang}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -191,7 +192,9 @@
|
||||||
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
|
||||||
|
where a.status <> 'DST008'
|
||||||
|
) d
|
||||||
inner join code_mgt cm on d.lang=cm.item_cd
|
inner join code_mgt cm on d.lang=cm.item_cd
|
||||||
group by cm.item_value
|
group by cm.item_value
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -238,7 +241,8 @@
|
||||||
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
|
||||||
|
where a.status <> 'DST008') d
|
||||||
inner join code_mgt cm on d.lang=cm.item_cd
|
inner join code_mgt cm on d.lang=cm.item_cd
|
||||||
group by cm.item_value
|
group by cm.item_value
|
||||||
) a
|
) a
|
||||||
|
|
@ -275,6 +279,7 @@
|
||||||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
and status <> 'DST008'
|
||||||
<if test='trLang != null and trLang != ""'>
|
<if test='trLang != null and trLang != ""'>
|
||||||
and tr_lang = #{trLang}
|
and tr_lang = #{trLang}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue