|
@@ -37,7 +37,9 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
@@ -143,7 +145,7 @@ public class WhitelistManagementServiceImpl extends MPJBaseServiceImpl<Whitelist
|
|
|
|
|
|
List<WhitelistManagement> whitelistManagements = new ArrayList<>();
|
|
|
List<String> errorLogs = new ArrayList<>();
|
|
|
-
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
for (Map<Integer, Object> vo : savedDataList) {
|
|
|
if(vo.get(0) == null || vo.get(1) == null || vo.get(2) == null){
|
|
|
errorList.add(vo);
|
|
@@ -158,6 +160,7 @@ public class WhitelistManagementServiceImpl extends MPJBaseServiceImpl<Whitelist
|
|
|
Long userId = this.getUserId(credentialNumber);
|
|
|
String phone = vo.get(2).toString();
|
|
|
|
|
|
+
|
|
|
if (!name.isEmpty() && !credentialNumber.isEmpty() && !phone.isEmpty()) {
|
|
|
WhitelistManagement whitelistManagement = new WhitelistManagement();
|
|
|
whitelistManagement.setCreateDate(new Date());
|
|
@@ -168,6 +171,11 @@ public class WhitelistManagementServiceImpl extends MPJBaseServiceImpl<Whitelist
|
|
|
whitelistManagement.setCredentialNumber(credentialNumber);
|
|
|
whitelistManagement.setPhone(phone);
|
|
|
whitelistManagements.add(whitelistManagement);
|
|
|
+ if(vo.get(3) != null && "".equals(vo.get(3).toString())){
|
|
|
+ LocalDate date = LocalDate.parse(vo.get(3).toString(), formatter);
|
|
|
+ whitelistManagement.setEndTime(date);
|
|
|
+ whitelistManagement.setIsTemporary(1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|