[SonarQube][FindBugs] duplicating this literal, Stream.toList(), TODO, Unused "private" methods should be removed
This commit is contained in:
@@ -49,7 +49,7 @@ class GetNoticeDao implements GetNoticePortOut {
|
|||||||
|
|
||||||
return uploadFile;
|
return uploadFile;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList()));
|
.toList());
|
||||||
|
|
||||||
return Optional.of(secArticle);
|
return Optional.of(secArticle);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package app.module.admin.usecase.communication.notice.getNotice.adapters.web;
|
package app.module.admin.usecase.communication.notice.getNotice.adapters.web;
|
||||||
|
|
||||||
import app.module.admin.usecase.communication.notice.getNotice.ports.GetNoticePortIn;
|
import app.module.admin.usecase.communication.notice.getNotice.ports.GetNoticePortIn;
|
||||||
|
import app.module.admin.usecase.communication.notice.getNotice.ports.application.domain.GetNotice;
|
||||||
import app.module.admin.usecase.communication.notice.getNotice.ports.application.domain.GetNoticeCmd;
|
import app.module.admin.usecase.communication.notice.getNotice.ports.application.domain.GetNoticeCmd;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -15,7 +16,7 @@ class GetNoticeController {
|
|||||||
private final GetNoticePortIn getNoticePortIn;
|
private final GetNoticePortIn getNoticePortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/api/communication/notices/{id}")
|
@GetMapping(path = "/api/communication/notices/{id}")
|
||||||
ResponseEntity<?> operate(@PathVariable Long id) {
|
ResponseEntity<GetNotice> operate(@PathVariable Long id) {
|
||||||
return ResponseEntity.status(HttpStatus.OK)
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
.body(getNoticePortIn.operate(new GetNoticeCmd(id)).orElseThrow());
|
.body(getNoticePortIn.operate(new GetNoticeCmd(id)).orElseThrow());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ public class FrontURIInterceptor implements HandlerInterceptor {
|
|||||||
private final URIAncestryPortIn uriAncestryPortIn;
|
private final URIAncestryPortIn uriAncestryPortIn;
|
||||||
private final URITopTierPortIn topTierPortIn;
|
private final URITopTierPortIn topTierPortIn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AttributeName: currentURI
|
||||||
|
*/
|
||||||
|
private static final String ATTR_NAME_URI = "currentURI";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
|
||||||
Object handler)
|
Object handler)
|
||||||
@@ -47,7 +52,7 @@ public class FrontURIInterceptor implements HandlerInterceptor {
|
|||||||
throw new NoMatchingURIException(String.format("매핑되는 않은 URI - %s", requestURI));
|
throw new NoMatchingURIException(String.format("매핑되는 않은 URI - %s", requestURI));
|
||||||
}
|
}
|
||||||
|
|
||||||
request.setAttribute("currentURI", currentURI);
|
request.setAttribute(ATTR_NAME_URI, currentURI);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -69,8 +74,8 @@ public class FrontURIInterceptor implements HandlerInterceptor {
|
|||||||
URITopTier topTierOutput = topTierPortIn.connect(AppType.FRONT);
|
URITopTier topTierOutput = topTierPortIn.connect(AppType.FRONT);
|
||||||
modelAndView.addObject("topNode", recursiveMapping(topTierOutput));
|
modelAndView.addObject("topNode", recursiveMapping(topTierOutput));
|
||||||
|
|
||||||
if (modelAndView.getModelMap().getAttribute("currentURI") == null) {
|
if (modelAndView.getModelMap().getAttribute(ATTR_NAME_URI) == null) {
|
||||||
modelAndView.addObject("currentURI", request.getAttribute("currentURI"));
|
modelAndView.addObject(ATTR_NAME_URI, request.getAttribute(ATTR_NAME_URI));
|
||||||
}
|
}
|
||||||
|
|
||||||
modelAndView.addObject(
|
modelAndView.addObject(
|
||||||
@@ -86,6 +91,6 @@ public class FrontURIInterceptor implements HandlerInterceptor {
|
|||||||
output.getShowOnNavi(),
|
output.getShowOnNavi(),
|
||||||
CollectionUtils.emptyIfNull(output.getChildren()).stream()
|
CollectionUtils.emptyIfNull(output.getChildren()).stream()
|
||||||
.map(this::recursiveMapping)
|
.map(this::recursiveMapping)
|
||||||
.collect(Collectors.toList()));
|
.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class FrontDetailService implements UserDetailsService {
|
|||||||
private Collection<? extends GrantedAuthority> getAuthorities(Collection<CoreRole> roles) {
|
private Collection<? extends GrantedAuthority> getAuthorities(Collection<CoreRole> roles) {
|
||||||
return Stream.concat(getRoles(roles), getPrivileges(roles))
|
return Stream.concat(getRoles(roles), getPrivileges(roles))
|
||||||
.map(SimpleGrantedAuthority::new)
|
.map(SimpleGrantedAuthority::new)
|
||||||
.collect(Collectors.toList());
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stream<String> getRoles(Collection<CoreRole> roles) {
|
private Stream<String> getRoles(Collection<CoreRole> roles) {
|
||||||
@@ -70,17 +70,4 @@ public class FrontDetailService implements UserDetailsService {
|
|||||||
.flatMap(roleOutput -> roleOutput.getPrivileges().stream())
|
.flatMap(roleOutput -> roleOutput.getPrivileges().stream())
|
||||||
.map(CorePrivilege::getId);
|
.map(CorePrivilege::getId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 패스워드 만료 여부체크. 이 기능이 필요하지 않다면 항상 true 를 반환하도록 변경하면 된다.
|
|
||||||
private boolean isCredentialsNonExpired(LocalDateTime passwordUpdatedAt) {
|
|
||||||
// return passwordValidPeriodDays == -1
|
|
||||||
// || getDaysPassedFrom(passwordUpdatedAt) <= passwordValidPeriodDays;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 패스워드 만료일 정보를 반환. 이 기능이 필요하지 않다면 항상 0L 을 반환하도록 변경하면 된다.
|
|
||||||
private long getDaysPassedFrom(LocalDateTime passwordUpdatedAt) {
|
|
||||||
// return Duration.between(passwordUpdatedAt, LocalDateTime.now()).toDays();
|
|
||||||
return 0L;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,19 +8,23 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class AuthUtil {
|
public class AuthUtil {
|
||||||
public static Long getUserSeq() {
|
private AuthUtil() {
|
||||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
throw new IllegalStateException("AuthUtil class");
|
||||||
if (authentication == null) {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Object principal = authentication.getPrincipal();
|
public static Long getUserSeq() {
|
||||||
Long userseq = null;
|
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||||
|
if (authentication == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (principal instanceof UserDetails) {
|
Object principal = authentication.getPrincipal();
|
||||||
userseq = ((FrontHouseholdUser) principal).getHouseholdSeq();
|
Long userseq = null;
|
||||||
|
|
||||||
|
if (principal instanceof UserDetails) {
|
||||||
|
userseq = ((FrontHouseholdUser) principal).getHouseholdSeq();
|
||||||
|
}
|
||||||
|
|
||||||
|
return userseq;
|
||||||
}
|
}
|
||||||
|
|
||||||
return userseq;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class DailyExpenseController {
|
|||||||
formVO.setGroupNo(Integer.parseInt(groupNo));
|
formVO.setGroupNo(Integer.parseInt(groupNo));
|
||||||
formVO.setId(Long.parseLong(id));
|
formVO.setId(Long.parseLong(id));
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("createFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyExpensePortIn.create(formVO);
|
dailyExpensePortIn.create(formVO);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ public class DailyExpenseController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyExpensePortIn.remove(formVO);
|
dailyExpensePortIn.remove(formVO);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class DailyExpenseController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeAllFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyExpensePortIn.remove(formVO);
|
dailyExpensePortIn.remove(formVO);
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class DailyFarmingController {
|
|||||||
formVO.setGroupNo(Integer.parseInt(groupNo));
|
formVO.setGroupNo(Integer.parseInt(groupNo));
|
||||||
formVO.setId(Long.parseLong(id));
|
formVO.setId(Long.parseLong(id));
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("createFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyFarmingPortIn.create(formVO);
|
dailyFarmingPortIn.create(formVO);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ public class DailyFarmingController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyFarmingPortIn.remove(formVO);
|
dailyFarmingPortIn.remove(formVO);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class DailyFarmingController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeAllFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyFarmingPortIn.remove(formVO);
|
dailyFarmingPortIn.remove(formVO);
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class DailyForestryController {
|
|||||||
formVO.setGroupNo(Integer.parseInt(groupNo));
|
formVO.setGroupNo(Integer.parseInt(groupNo));
|
||||||
formVO.setId(Long.parseLong(id));
|
formVO.setId(Long.parseLong(id));
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("createFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyForestryPortIn.create(formVO);
|
dailyForestryPortIn.create(formVO);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ public class DailyForestryController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyForestryPortIn.remove(formVO);
|
dailyForestryPortIn.remove(formVO);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class DailyForestryController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeAllFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyForestryPortIn.remove(formVO);
|
dailyForestryPortIn.remove(formVO);
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class DailyIncomeController {
|
|||||||
formVO.setGroupNo(Integer.parseInt(groupNo));
|
formVO.setGroupNo(Integer.parseInt(groupNo));
|
||||||
formVO.setId(Long.parseLong(id));
|
formVO.setId(Long.parseLong(id));
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("createFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyIncomePortIn.create(formVO);
|
dailyIncomePortIn.create(formVO);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ public class DailyIncomeController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyIncomePortIn.remove(formVO);
|
dailyIncomePortIn.remove(formVO);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class DailyIncomeController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeAllFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyIncomePortIn.remove(formVO);
|
dailyIncomePortIn.remove(formVO);
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class DailyPowerController {
|
|||||||
formVO.setGroupNo(Integer.parseInt(groupNo));
|
formVO.setGroupNo(Integer.parseInt(groupNo));
|
||||||
formVO.setId(Long.parseLong(id));
|
formVO.setId(Long.parseLong(id));
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("createFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyPowerPortIn.create(formVO);
|
dailyPowerPortIn.create(formVO);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ public class DailyPowerController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyPowerPortIn.remove(formVO);
|
dailyPowerPortIn.remove(formVO);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class DailyPowerController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeAllFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyPowerPortIn.remove(formVO);
|
dailyPowerPortIn.remove(formVO);
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class DailyWorkController {
|
|||||||
formVO.setGroupNo(Integer.parseInt(groupNo));
|
formVO.setGroupNo(Integer.parseInt(groupNo));
|
||||||
formVO.setId(Long.parseLong(id));
|
formVO.setId(Long.parseLong(id));
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("createFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyWorkPortIn.create(formVO);
|
dailyWorkPortIn.create(formVO);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public class DailyWorkController {
|
|||||||
ResponseEntity<?> remove(@PathVariable("searchMonth") String searchMonth, @PathVariable("groupNo") String groupNo
|
ResponseEntity<?> remove(@PathVariable("searchMonth") String searchMonth, @PathVariable("groupNo") String groupNo
|
||||||
, @Valid @RequestBody RemoveDailyWorkReqVO formVO, BindingResult bindingResult) {
|
, @Valid @RequestBody RemoveDailyWorkReqVO formVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
safeLogger.debug("before formVO: {}", formVO);
|
safeLogger.debug("beforeFormVO: {}", formVO);
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY)
|
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY)
|
||||||
.body(bindingResult.getFieldErrors());
|
.body(bindingResult.getFieldErrors());
|
||||||
@@ -87,7 +87,7 @@ public class DailyWorkController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyWorkPortIn.remove(formVO);
|
dailyWorkPortIn.remove(formVO);
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ public class DailyWorkController {
|
|||||||
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
formVO.setGroupNo(dailyRecord.getGroupNo());
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
formVO.setDailyRecordSeq(dailyRecord.getId());
|
formVO.setDailyRecordSeq(dailyRecord.getId());
|
||||||
safeLogger.debug("formVO: {}", formVO);
|
safeLogger.debug("removeAllFormVO: {}", formVO);
|
||||||
|
|
||||||
dailyWorkPortIn.remove(formVO);
|
dailyWorkPortIn.remove(formVO);
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class GetBanksDao implements GetBanksPortOut {
|
|||||||
article.getCreatedBy(),
|
article.getCreatedBy(),
|
||||||
article.getUpdatedAt(),
|
article.getUpdatedAt(),
|
||||||
article.getUpdatedBy()))
|
article.getUpdatedBy()))
|
||||||
.collect(Collectors.toList()),
|
.toList(),
|
||||||
pageable,
|
pageable,
|
||||||
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ import java.time.format.DateTimeFormatter;
|
|||||||
@Controller
|
@Controller
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class GetBankInputUIController {
|
class GetBankInputUIController {
|
||||||
|
/**
|
||||||
|
* 자동이체종류의 수입 코드
|
||||||
|
*/
|
||||||
|
public static final String BANK_INPUT_CODE = "code.bank.input";
|
||||||
|
|
||||||
private final GetPrevMonthlyInputStatusPortIn prevMonthlyInputStatusPortIn;
|
private final GetPrevMonthlyInputStatusPortIn prevMonthlyInputStatusPortIn;
|
||||||
private final GetMonthlyInputStatusPortIn getMonthlyInputStatusPortIn;
|
private final GetMonthlyInputStatusPortIn getMonthlyInputStatusPortIn;
|
||||||
@@ -64,14 +67,14 @@ class GetBankInputUIController {
|
|||||||
if (pastMonthlyInfo != null) {
|
if (pastMonthlyInfo != null) {
|
||||||
pastList = getBanksPortIn.operate(
|
pastList = getBanksPortIn.operate(
|
||||||
pageable,
|
pageable,
|
||||||
new GetBanksCmd(pastMonthlyInfo.getId(), AuthUtil.getUserSeq(),"code.bank.input"));
|
new GetBanksCmd(pastMonthlyInfo.getId(), AuthUtil.getUserSeq(), BANK_INPUT_CODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<GetBanks> currentList = Page.empty();
|
Page<GetBanks> currentList = Page.empty();
|
||||||
if (currentMonthlyInfo != null) {
|
if (currentMonthlyInfo != null) {
|
||||||
currentList = getBanksPortIn.operate(
|
currentList = getBanksPortIn.operate(
|
||||||
pageable,
|
pageable,
|
||||||
new GetBanksCmd(currentMonthlyInfo.getId(), AuthUtil.getUserSeq(),"code.bank.input"));
|
new GetBanksCmd(currentMonthlyInfo.getId(), AuthUtil.getUserSeq(), BANK_INPUT_CODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +96,7 @@ class GetBankInputUIController {
|
|||||||
model.addAttribute("bankList", currentList);
|
model.addAttribute("bankList", currentList);
|
||||||
|
|
||||||
|
|
||||||
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect("code.bank.input"));
|
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect(BANK_INPUT_CODE));
|
||||||
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
||||||
|
|
||||||
@@ -110,7 +113,7 @@ class GetBankInputUIController {
|
|||||||
public String operateForm(Model model) {
|
public String operateForm(Model model) {
|
||||||
|
|
||||||
|
|
||||||
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect("code.bank.input"));
|
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect(BANK_INPUT_CODE));
|
||||||
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
||||||
|
|
||||||
|
|||||||
@@ -29,16 +29,16 @@ import java.time.format.DateTimeFormatter;
|
|||||||
@Controller
|
@Controller
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class GetBankOutputUIController {
|
class GetBankOutputUIController {
|
||||||
|
/**
|
||||||
|
* 자동이체종류의 지출 코드
|
||||||
|
*/
|
||||||
|
public static final String BANK_OUTPUT_CODE = "code.bank.output";
|
||||||
|
|
||||||
private final GetPrevMonthlyInputStatusPortIn prevMonthlyInputStatusPortIn;
|
private final GetPrevMonthlyInputStatusPortIn prevMonthlyInputStatusPortIn;
|
||||||
private final GetMonthlyInputStatusPortIn getMonthlyInputStatusPortIn;
|
private final GetMonthlyInputStatusPortIn getMonthlyInputStatusPortIn;
|
||||||
private final GetBanksPortIn getBanksPortIn;
|
private final GetBanksPortIn getBanksPortIn;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(path = "/info/bank/create/output/{id}")
|
@GetMapping(path = "/info/bank/create/output/{id}")
|
||||||
public String operate(Model model,
|
public String operate(Model model,
|
||||||
@PathVariable Long id
|
@PathVariable Long id
|
||||||
@@ -66,14 +66,14 @@ class GetBankOutputUIController {
|
|||||||
if (pastMonthlyInfo != null) {
|
if (pastMonthlyInfo != null) {
|
||||||
pastList = getBanksPortIn.operate(
|
pastList = getBanksPortIn.operate(
|
||||||
pageable,
|
pageable,
|
||||||
new GetBanksCmd(pastMonthlyInfo.getId(), AuthUtil.getUserSeq(),"code.bank.output"));
|
new GetBanksCmd(pastMonthlyInfo.getId(), AuthUtil.getUserSeq(), BANK_OUTPUT_CODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<GetBanks> currentList = Page.empty();
|
Page<GetBanks> currentList = Page.empty();
|
||||||
if (currentMonthlyInfo != null) {
|
if (currentMonthlyInfo != null) {
|
||||||
currentList = getBanksPortIn.operate(
|
currentList = getBanksPortIn.operate(
|
||||||
pageable,
|
pageable,
|
||||||
new GetBanksCmd(currentMonthlyInfo.getId(), AuthUtil.getUserSeq(),"code.bank.output"));
|
new GetBanksCmd(currentMonthlyInfo.getId(), AuthUtil.getUserSeq(), BANK_OUTPUT_CODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class GetBankOutputUIController {
|
|||||||
model.addAttribute("bankList", currentList);
|
model.addAttribute("bankList", currentList);
|
||||||
|
|
||||||
|
|
||||||
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect("code.bank.output"));
|
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect(BANK_OUTPUT_CODE));
|
||||||
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ class GetBankOutputUIController {
|
|||||||
public String operateForm(Model model) {
|
public String operateForm(Model model) {
|
||||||
|
|
||||||
|
|
||||||
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect("code.bank.output"));
|
model.addAttribute("transferCategoryList", uiCodeListPortIn.connect(BANK_OUTPUT_CODE));
|
||||||
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
model.addAttribute("codeRecordCropList", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
model.addAttribute("countList", uiCodeListPortIn.connect("code.count.unit"));
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ class GetBanksUIController {
|
|||||||
.orElseThrow(() -> new NoSuchElementException("해당 월의 데이터가 없습니다."));
|
.orElseThrow(() -> new NoSuchElementException("해당 월의 데이터가 없습니다."));
|
||||||
|
|
||||||
model.addAttribute("monthStatus", monthStatus);
|
model.addAttribute("monthStatus", monthStatus);
|
||||||
|
|
||||||
// TODO 페키지명이 넘무 길어서 그냥
|
|
||||||
model.addAttribute("MonthStatus", MonthStatus.class);
|
model.addAttribute("MonthStatus", MonthStatus.class);
|
||||||
|
|
||||||
return "info/bank/banks";
|
return "info/bank/banks";
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class GetMonthlyInputStatussDao implements GetMonthlyInputStatussPortOut {
|
|||||||
article.getUpdatedAt(),
|
article.getUpdatedAt(),
|
||||||
article.getUpdatedBy()
|
article.getUpdatedBy()
|
||||||
))
|
))
|
||||||
.collect(Collectors.toList()),
|
.toList(),
|
||||||
pageable,
|
pageable,
|
||||||
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class GetForestProductsDao implements GetForestProductsPortOut {
|
|||||||
article.getCreatedBy(),
|
article.getCreatedBy(),
|
||||||
article.getUpdatedAt(),
|
article.getUpdatedAt(),
|
||||||
article.getUpdatedBy()))
|
article.getUpdatedBy()))
|
||||||
.collect(Collectors.toList()),
|
.toList(),
|
||||||
pageable,
|
pageable,
|
||||||
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class GetMonthlyForestProductsDao implements GetMonthlyForestProductsPortOut {
|
|||||||
article.getCreatedBy(),
|
article.getCreatedBy(),
|
||||||
article.getUpdatedAt(),
|
article.getUpdatedAt(),
|
||||||
article.getUpdatedBy()))
|
article.getUpdatedBy()))
|
||||||
.collect(Collectors.toList()),
|
.toList(),
|
||||||
pageable,
|
pageable,
|
||||||
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ class GetMonthlysUIController {
|
|||||||
reqVO.getSearchField(), reqVO.getSearchValue(), AuthUtil.getUserSeq()));
|
reqVO.getSearchField(), reqVO.getSearchValue(), AuthUtil.getUserSeq()));
|
||||||
|
|
||||||
model.addAttribute("list", list);
|
model.addAttribute("list", list);
|
||||||
|
|
||||||
// TODO 페키지명이 넘무 길어서 그냥
|
|
||||||
model.addAttribute("MonthStatus", MonthStatus.class);
|
model.addAttribute("MonthStatus", MonthStatus.class);
|
||||||
|
|
||||||
return "info/monthly/monthlys";
|
return "info/monthly/monthlys";
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class GetNoticeDao implements GetNoticePortOut {
|
|||||||
|
|
||||||
return uploadFile;
|
return uploadFile;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList()));
|
.toList());
|
||||||
|
|
||||||
return Optional.of(secArticle);
|
return Optional.of(secArticle);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class GetNoticesDao implements GetNoticesPortOut {
|
|||||||
: ListUtils.emptyIfNull(
|
: ListUtils.emptyIfNull(
|
||||||
mapper.getUploadFiles(
|
mapper.getUploadFiles(
|
||||||
contents.stream().map(GetNoticesDto::getId)
|
contents.stream().map(GetNoticesDto::getId)
|
||||||
.collect(Collectors.toList()),
|
.toList(),
|
||||||
FileUploadType.NOTICE));
|
FileUploadType.NOTICE));
|
||||||
|
|
||||||
return new PageImpl<>(
|
return new PageImpl<>(
|
||||||
@@ -60,7 +60,7 @@ class GetNoticesDao implements GetNoticesPortOut {
|
|||||||
.filter(file -> file.getNoticeId().equals(article.getId()))
|
.filter(file -> file.getNoticeId().equals(article.getId()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null)))
|
.orElse(null)))
|
||||||
.collect(Collectors.toList()),
|
.toList(),
|
||||||
pageable,
|
pageable,
|
||||||
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
contents.isEmpty() ? 0 : contents.get(0).getTotal());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user