Compare commits
2 Commits
d9f223960a
...
5d87831386
| Author | SHA1 | Date |
|---|---|---|
|
|
5d87831386 | |
|
|
bcaf14dfc3 |
|
|
@ -234,7 +234,7 @@ function StandardResearchEditor(props) {
|
|||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("삭제 되었습니다.");
|
||||
navigate(URL.ADMIN__CONTENTS__POP_UP ,{ replace: true });
|
||||
navigate(URL.ADMIN__CONTENTS__STANDARDS_RESEARCH ,{ replace: true });
|
||||
} else {
|
||||
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ function StandardResearchEditor(props) {
|
|||
const onClickList = (e) => {
|
||||
|
||||
const requestTask = () => {
|
||||
navigate(URL.ADMIN__CONTENTS__POP_UP ,{ replace: true });
|
||||
navigate(URL.ADMIN__CONTENTS__STANDARDS_RESEARCH ,{ replace: true });
|
||||
};
|
||||
|
||||
if( purpose !== purposeOriginal ) {
|
||||
|
|
|
|||
|
|
@ -172,11 +172,11 @@ public class AdminStandardResearchController {
|
|||
(
|
||||
@AuthenticationPrincipal LoginVO user,
|
||||
HttpServletRequest request,
|
||||
@PathVariable("rsId") String strPopupId
|
||||
@PathVariable("rsId") String strRsId
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Long rsId = Long.valueOf(strPopupId);
|
||||
Long rsId = Long.valueOf(strRsId);
|
||||
try {
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchDelete(resultVO, request, user, rsId);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
package com.dbnt.kcscbackend.admin.standardResearch.repository;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.standardResearch.model.TnResearchLightweight;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface TnResearchRepositoryLightweight extends JpaRepository<TnResearchLightweight, Long> {
|
||||
@Query(value = "SELECT COUNT(1) FROM tn_research tr WHERE tr.use_yn = :use_yn", nativeQuery = true)
|
||||
Long countByUseYn(@Param("use_yn") String useYn);
|
||||
|
||||
List<TnResearchLightweight> findByUseYn( String useYn, Pageable pageable);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
);
|
||||
|
||||
|
||||
long totalRecordCount = tnResearchRepositoryLightweight.count();
|
||||
List<Map<String, Object>> list = tnResearchRepositoryLightweight.findAll(pageable)
|
||||
long totalRecordCount = tnResearchRepositoryLightweight.countByUseYn("Y");
|
||||
List<Map<String, Object>> list = tnResearchRepositoryLightweight.findByUseYn("Y", pageable)
|
||||
.stream()
|
||||
.map(item -> {
|
||||
Map<String, Object> codeMap = new HashMap<>();
|
||||
|
|
@ -64,11 +64,11 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
codeMap.put("researchStartDate", item.getRsStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
codeMap.put("researchEndDate", item.getRsEndDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
codeMap.put("director", item.getRsDirector());
|
||||
codeMap.put("createDate", item.getFrstCrtDt());
|
||||
codeMap.put("createUserId", item.getFrstCrtId());
|
||||
codeMap.put("updateDate", item.getLastChgDt());
|
||||
codeMap.put("updateUserId", item.getLastChgId());
|
||||
codeMap.put("useYn", item.getUseYn());
|
||||
//codeMap.put("createDate", item.getFrstCrtDt());
|
||||
//codeMap.put("createUserId", item.getFrstCrtId());
|
||||
//codeMap.put("updateDate", item.getLastChgDt());
|
||||
//codeMap.put("updateUserId", item.getLastChgId());
|
||||
//codeMap.put("useYn", item.getUseYn());
|
||||
return codeMap;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -165,10 +165,6 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
dto.put("updateUserId", tnResearch.getLastChgId());
|
||||
dto.put("useYn", tnResearch.getUseYn());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
resultVO.setResult(dto);
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||
|
|
@ -222,6 +218,7 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
|
||||
@Override
|
||||
public ResultVO contentsStandardResearchDelete(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long rsId) throws Exception {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
|
|
@ -231,10 +228,6 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Map<String, Object> dto = new HashMap<String, Object>();
|
||||
|
||||
Map<String, Object> response = tnResearchRepository.spDeleteTnResearch(
|
||||
|
|
|
|||
Loading…
Reference in New Issue