mirror of
https://git.hmsn.ink/kospo/svcm/api.git
synced 2026-03-20 00:32:17 +09:00
등록기간 종료 처리
This commit is contained in:
@@ -115,6 +115,18 @@ public class CommonUtils {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Date stringToDate(String dd, String pattern) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
|
||||||
|
Date result = null;
|
||||||
|
try {
|
||||||
|
result = sdf.parse(dd);
|
||||||
|
System.out.println(sdf.format(result));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static String generateFileName() {
|
public static String generateFileName() {
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSSSSSS");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSSSSSS");
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ public class EstimateServiceImpl implements EstimateService {
|
|||||||
|
|
||||||
Prcs prcs = optionalPrcs.get();
|
Prcs prcs = optionalPrcs.get();
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
if(CommonUtils.stringToDate(prcs.getRegEdat()).getTime() <= now.getTime()) throw new CustomMessageException(CustomMessageException.CusMessage.builder()
|
Date end = CommonUtils.stringToDate(prcs.getRegEdat(), "yyyy-MM-dd");
|
||||||
|
System.out.println(end.getTime() +"///"+ now.getTime());
|
||||||
|
if(end.getTime() <= now.getTime()) throw new CustomMessageException(CustomMessageException.CusMessage.builder()
|
||||||
.code("999999")
|
.code("999999")
|
||||||
.message("등록기간이 종료 되었습니다.")
|
.message("등록기간이 종료 되었습니다.")
|
||||||
.build());
|
.build());
|
||||||
|
|||||||
Reference in New Issue
Block a user