diff --git a/src/main/java/com/xit/biz/ctgy/v2/controller/ResidentAndDisabledController.java b/src/main/java/com/xit/biz/ctgy/v2/controller/ResidentAndDisabledController.java index 5753e9d..4fb8725 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/controller/ResidentAndDisabledController.java +++ b/src/main/java/com/xit/biz/ctgy/v2/controller/ResidentAndDisabledController.java @@ -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 saveDateStds( + @Valid + @RequestBody + final JudgeDetailDto dto) { + service.saveDateStds(dto); + return RestResponse.of(HttpStatus.OK); + } } diff --git a/src/main/java/com/xit/biz/ctgy/v2/repository/ParkingDao.java b/src/main/java/com/xit/biz/ctgy/v2/repository/ParkingDao.java index c8d0e50..a7db2eb 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/repository/ParkingDao.java +++ b/src/main/java/com/xit/biz/ctgy/v2/repository/ParkingDao.java @@ -117,7 +117,13 @@ public class ParkingDao extends BaseMpowerDaoSupport { Map 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> 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); + } } diff --git a/src/main/java/com/xit/biz/ctgy/v2/repository/ResidentAndDisabledDao.java b/src/main/java/com/xit/biz/ctgy/v2/repository/ResidentAndDisabledDao.java index 64ecf71..45e889a 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/repository/ResidentAndDisabledDao.java +++ b/src/main/java/com/xit/biz/ctgy/v2/repository/ResidentAndDisabledDao.java @@ -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); + } } diff --git a/src/main/java/com/xit/biz/ctgy/v2/service/IResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/v2/service/IResidentAndDisabledService.java index a55b344..8522c0c 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/service/IResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/v2/service/IResidentAndDisabledService.java @@ -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); + } diff --git a/src/main/java/com/xit/biz/ctgy/v2/service/impl/ResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/v2/service/impl/ResidentAndDisabledService.java index c320f6c..1dc5509 100644 --- a/src/main/java/com/xit/biz/ctgy/v2/service/impl/ResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/v2/service/impl/ResidentAndDisabledService.java @@ -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); + } + } } diff --git a/src/main/resources/sql/parking-mapper.xml b/src/main/resources/sql/parking-mapper.xml index c023c0a..6ea44f4 100644 --- a/src/main/resources/sql/parking-mapper.xml +++ b/src/main/resources/sql/parking-mapper.xml @@ -394,4 +394,30 @@ FROM tf680_recall WHERE rc_code = #{msMaincode} + + + /* 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} + + + + /* minuserinfo-mapper|insertErrorLog|jhseo */ + INSERT + INTO min_simsa680_log ( + ms_maincode, + ms_seq, + massage + ) VALUES ( + #{msMaincode}, + #{msSeq}, + #{massage} + ) + + \ No newline at end of file diff --git a/src/main/resources/sql/residentAndDisabled-mapper.xml b/src/main/resources/sql/residentAndDisabled-mapper.xml index ab3fa7e..7aa8ad6 100644 --- a/src/main/resources/sql/residentAndDisabled-mapper.xml +++ b/src/main/resources/sql/residentAndDisabled-mapper.xml @@ -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} @@ -650,5 +651,16 @@ AND msu_userid = #{msuUserid} + + /* 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} + \ No newline at end of file