fix: 단속내용 답변 내용 수정, 심의목록 심사기간 및 마감일시 수정 기능, 심의 처리 시 에러나면 Exception나는 부분 제거 후 log insert 처리

main
sjh88 2 years ago
parent 5e5d10b993
commit 8228468a10

@ -1,9 +1,6 @@
package com.xit.biz.ctgy.v2.controller;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeStdDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.biz.ctgy.dto.*;
import com.xit.biz.ctgy.v2.service.IResidentAndDisabledService;
import com.xit.core.annotation.Secured;
import com.xit.core.annotation.SecurityPolicy;
@ -222,4 +219,15 @@ public class ResidentAndDisabledController {
service.saveJudgeResult(dto);
return RestResponse.of(HttpStatus.OK);
}
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "관리자 심사 기간 및 마감일시 처리" , description = "관리자 심사 기간 및 마감일시 처리")
@PostMapping(value="/admin/date", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> saveDateStds(
@Valid
@RequestBody
final JudgeDetailDto dto) {
service.saveDateStds(dto);
return RestResponse.of(HttpStatus.OK);
}
}

@ -117,7 +117,13 @@ public class ParkingDao extends BaseMpowerDaoSupport {
Map<String,Object> rslt = executeSp(spSql, inParams, outParams);
if(!"1".equals(rslt.get("result"))){
log.error("{}", rslt);
throw new CustomBaseException(String.valueOf(rslt.get("message")));
//throw new CustomBaseException(String.valueOf(rslt.get("message")));
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "insertErrorLog")
.setParameter("msMaincode", msMaincode)
.setParameter("msSeq", msSeq)
.setParameter("message", (String) rslt.get("message"))
.getQueryString();
update(sql);
}
/*
@ -252,4 +258,16 @@ public class ParkingDao extends BaseMpowerDaoSupport {
public List<Map<String, Object>> findContadImageByRcMaincode(@NotNull final Long rcMaincode) {
return getParkingJudgeImgList(String.valueOf(rcMaincode), "contad");
}
public void updateDateByMsuYear(@NotNull final JudgeDetailDto dto) {
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "updateDateByMsuYear")
.setParameter("msYear", dto.getMsYear())
.setParameter("msChasu", dto.getMsChasu())
.setParameter("msSdate", dto.getMsSdate())
.setParameter("msEdate", dto.getMsEdate())
.setParameter("msCdate", dto.getMsCdate())
.setParameter("msClosesi", dto.getMsClosesi())
.getQueryString();
update(sql);
}
}

@ -1,10 +1,6 @@
package com.xit.biz.ctgy.v2.repository;
import com.xit.biz.ctgy.dto.DashboardJudgeListDto;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.biz.ctgy.dto.MinSimsaUser680ScDto;
import com.xit.biz.ctgy.dto.*;
import com.xit.core.config.database.BaseMpowerDaoSupport;
import com.xit.core.oauth2.config.properties.MasterDatabaseProperties;
import com.xit.core.oauth2.config.properties.SlaveDatabaseProperties;
@ -296,6 +292,7 @@ public class ResidentAndDisabledDao extends BaseMpowerDaoSupport {
.setParameter("scContad6", dto.getScContad6())
.setParameter("scContad7", dto.getScContad7())
.setParameter("scContad8", dto.getScContad8())
.setParameter("scAnswer", dto.getScAnswer())
.getQueryString();
}
@ -333,4 +330,17 @@ public class ResidentAndDisabledDao extends BaseMpowerDaoSupport {
.getQueryString();
update(sql);
}
public void updateDateByMsuYear(@NotNull final JudgeDetailDto dto) {
final String sql = QueryGenerator.createNamedQuery(NAME_SPACE, "updateDateByMsuYear")
.setParameter("msDatagb", dto.getMsDatagb())
.setParameter("msYear", dto.getMsYear())
.setParameter("msChasu", dto.getMsChasu())
.setParameter("msSdate", dto.getMsSdate())
.setParameter("msEdate", dto.getMsEdate())
.setParameter("msCdate", dto.getMsCdate())
.setParameter("msClosesi", dto.getMsClosesi())
.getQueryString();
update(sql);
}
}

@ -1,9 +1,6 @@
package com.xit.biz.ctgy.v2.service;
import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.JudgeListDto;
import com.xit.biz.ctgy.dto.JudgeStdDto;
import com.xit.biz.ctgy.dto.JudgeTargetDto;
import com.xit.biz.ctgy.dto.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@ -89,4 +86,6 @@ public interface IResidentAndDisabledService {
void saveJudgeResult(JudgeListDto dto);
void saveDateStds(final JudgeDetailDto dto);
}

@ -332,4 +332,14 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
public void saveJudgeResult(JudgeListDto dto){
residentAndDisabledDao.updateMsuResonAndMsuResultByMsuCode(dto);
}
@Override
//@Transactional
public void saveDateStds(JudgeDetailDto dto){
if (Checks.isEmpty(dto.getMsDatagb())) {
parkingDao.updateDateByMsuYear(dto);
}else{
residentAndDisabledDao.updateDateByMsuYear(dto);
}
}
}

@ -394,4 +394,30 @@
FROM tf680_recall
WHERE rc_code = #{msMaincode}
</native-query>
<native-query id="updateDateByMsuYear">
/* parking-mapper|updateDateByMsuYear|jhseo */
UPDATE min_simsa680
SET MS_SDATE = #{msSdate}
, MS_EDATE = #{msEdate}
, MS_CDATE = #{msCdate}
, MS_CLOSESI = #{msClosesi}
WHERE MS_YEAR = #{msYear}
AND MS_CHASU = #{msChasu}
</native-query>
<native-query id="insertErrorLog">
/* minuserinfo-mapper|insertErrorLog|jhseo */
INSERT
INTO min_simsa680_log (
ms_maincode,
ms_seq,
massage
) VALUES (
#{msMaincode},
#{msSeq},
#{massage}
)
</native-query>
</entity-mappings>

@ -242,6 +242,7 @@
, sc_contad6 = NVL(#{scContad6}, sc_contad6)
, sc_contad7 = NVL(#{scContad7}, sc_contad7)
, sc_contad8 = NVL(#{scContad8}, sc_contad8)
, sc_answer = NVL(#{scAnswer}, sc_answer)
WHERE sc_code = #{scCode}
</native-query>
@ -650,5 +651,16 @@
AND msu_userid = #{msuUserid}
</native-query>
<native-query id="updateDateByMsuYear">
/* residentAndDisabled-mapper|updateDateByMsuYear|jhseo */
UPDATE min_simsa680_sc
SET MS_SDATE = #{msSdate}
, MS_EDATE = #{msEdate}
, MS_CDATE = #{msCdate}
, MS_CLOSESI = #{msClosesi}
WHERE MS_YEAR = #{msYear}
AND MS_CHASU = #{msChasu}
AND MS_DATAGB = #{msDatagb}
</native-query>
</entity-mappings>
Loading…
Cancel
Save