|
|
@@ -26,6 +26,8 @@ import org.springframework.util.MultiValueMap;
|
|
|
import org.springframework.web.client.RestClientException;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -186,7 +188,16 @@ public class PortalOaFlow {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("userId", oaId);
|
|
|
if (oaNoticeDO != null) {
|
|
|
- params.put("dateTime", oaNoticeDO.getOaCreateTime());
|
|
|
+ if (StringUtils.isNotBlank(oaNoticeDO.getOaCreateTime())) {
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ // 2. 字符串转时间对象
|
|
|
+ LocalDateTime dateTime = LocalDateTime.parse(oaNoticeDO.getOaCreateTime(), formatter);
|
|
|
+ // 3. 往前推 1 秒(核心)
|
|
|
+ LocalDateTime newTime = dateTime.plusSeconds(1);
|
|
|
+ // 4. 转回字符串输出
|
|
|
+ String result = newTime.format(formatter);
|
|
|
+ params.put("dateTime", result);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
HttpEntity<Map<String, Object>> requestEntityOut = new HttpEntity<>(params, headersOut);
|