가격조사 상세 수정

This commit is contained in:
2025-05-29 03:43:34 +00:00
parent 19d7bbf3b3
commit 37938d7483
2 changed files with 17 additions and 0 deletions

View File

@@ -103,6 +103,22 @@ public class CommonUtils {
return result.format(cal.getTime());
}
public static String stringToPlusDay(String str, String pattern, int day) {
SimpleDateFormat sdf = new SimpleDateFormat( pattern);
Date dt = null;
try {
dt = sdf.parse(str);
} catch (ParseException e) {
throw new RuntimeException(e);
}
Calendar cal = Calendar.getInstance();
cal.setTime(dt);
cal.add(Calendar.DAY_OF_MONTH, day);
SimpleDateFormat result = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return result.format(cal.getTime());
}
public static Date stringToDate(String dd) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Date result = null;

View File

@@ -98,6 +98,7 @@ public class PrcsServiceImpl implements PrcsService {
user.getAuthorities().stream().forEach(auth -> {
if(auth.getAuthority().equals("ROLE_ADMIN")) isAdmin.set(true);
});
regEdt = CommonUtils.stringToPlusDay(regEdt, "yyyy-MM-dd", 1);
Page<Prcs> prcsPage = null;
if(isAdmin.get()) {