parent
7c572897ec
commit
617fbfd212
|
|
@ -41,6 +41,7 @@ public class FaispInterceptor implements HandlerInterceptor {
|
|||
@Override
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
|
||||
//페이지 렌더링 후 실행.
|
||||
if(handler instanceof HandlerMethod){
|
||||
String uri = request.getRequestURI();
|
||||
UserRequestLog log = new UserRequestLog();
|
||||
log.setContactIp(Utils.getClientIP(request));
|
||||
|
|
@ -53,3 +54,4 @@ public class FaispInterceptor implements HandlerInterceptor {
|
|||
userLogService.saveRequestLog(log);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,14 @@ public class ProcessResultController {
|
|||
mav.addObject("accessAuth", accessAuth);
|
||||
|
||||
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);
|
||||
|
||||
for (ProcessResult pr:processResultList) {
|
||||
|
|
|
|||
|
|
@ -9,4 +9,6 @@ import java.util.List;
|
|||
public interface ProcessResultMapper {
|
||||
List<ProcessResult> selectProcessResultList(ProcessResult processResult);
|
||||
Integer selectProcessResultListCnt(ProcessResult processResult);
|
||||
|
||||
List<Integer> selectProcessResultYearParam(ProcessResult processResult);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class ProcessResult extends ProcessResultBaseEntity {
|
|||
@Transient
|
||||
private String crackdownPolice;
|
||||
@Transient
|
||||
private String year;
|
||||
private Integer year;
|
||||
@Transient
|
||||
private String violation;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,4 +102,8 @@ public class ProcessResultService extends BaseService {
|
|||
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;
|
||||
@Column(name = "info_share_chk")
|
||||
private String infoShareChk;
|
||||
@Column(name = "status")
|
||||
private String status;
|
||||
|
||||
@Transient
|
||||
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 org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
|
|
@ -22,4 +23,8 @@ public interface TranslatorRepository extends JpaRepository<Translator, Translat
|
|||
List<Translator> findByTranslatorKeyOrderByVersionNoDesc(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
|
||||
public void saveTranslatorInfo(Translator translator) {
|
||||
translator.setStatus("DST007");
|
||||
if(translator.getTranslatorKey()==null){
|
||||
Translator dbTranslator = translatorRepository.findFirstByOrderByTranslatorKeyDesc().orElse(null);
|
||||
translator.setTranslatorKey(dbTranslator == null?1:(dbTranslator.getTranslatorKey()+1));
|
||||
|
|
@ -157,8 +158,7 @@ public class TranslatorService extends BaseService {
|
|||
|
||||
@Transactional
|
||||
public void deleteTranslatorInfo(int trKey) {
|
||||
translatorCareerRepository.deleteByTranslatorKey(trKey);
|
||||
translatorRepository.deleteByTranslatorKey(trKey);
|
||||
translatorRepository.bulkModifyingByTrKeyToStatus(trKey, "DST008");
|
||||
}
|
||||
|
||||
public TranslatorFile selectTranslatorFile(Integer translatorKey, Integer versionNo, Integer fileSeq) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper">
|
||||
<sql id="selectCrackdownStatusListWhere">
|
||||
<where>
|
||||
c.status <> 'DST008'
|
||||
<if test='year != null and year != ""'>
|
||||
and extract(year from a.napo_dt) = #{year}::numeric
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.ProcessResultMapper">
|
||||
<sql id="selectProcessResultListWhere">
|
||||
<where>
|
||||
fb.status <> 'DST008'
|
||||
<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 test='caseNum != null and caseNum != ""'>
|
||||
AND caseNum = #{caseNum}
|
||||
|
|
@ -84,4 +85,10 @@
|
|||
ORDER BY pr.pr_key DESC
|
||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||
</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>
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and status <> 'DST008'
|
||||
<if test='trLang != null and trLang != ""'>
|
||||
and tr_lang = #{trLang}
|
||||
</if>
|
||||
|
|
@ -191,7 +192,9 @@
|
|||
from translator_info
|
||||
group by translator_key) b
|
||||
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
|
||||
group by cm.item_value
|
||||
</select>
|
||||
|
|
@ -238,7 +241,8 @@
|
|||
from translator_info
|
||||
group by translator_key) b
|
||||
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
|
||||
group by cm.item_value
|
||||
) a
|
||||
|
|
@ -275,6 +279,7 @@
|
|||
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and status <> 'DST008'
|
||||
<if test='trLang != null and trLang != ""'>
|
||||
and tr_lang = #{trLang}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue