Переглянути джерело

修改参数拼接之间用换行符

Administrator 2 роки тому
батько
коміт
19adc60965

+ 6 - 4
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserInfoServiceImpl.java

@@ -31,6 +31,7 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * 导入人员信息Service业务层处理
@@ -174,7 +175,8 @@ public class UserInfoServiceImpl implements IUserInfoService {
         //从第三方数据库查询人员核酸计录
         List<OdsQssHsjcxx> OdsQssHsjcxxList = qdsQssHsjcxxService.thirdNucleicAcid(startTime, endTime, idCardList);
 
-
+        //把采集时间降序
+        List<OdsQssHsjcxx> OdsQssHsjcxxListSorted = OdsQssHsjcxxList.stream().sorted(Comparator.comparing(OdsQssHsjcxx::getCjsj).reversed()).collect(Collectors.toList());
         List<UserNucleicTime> UserNucleicTimeList = new ArrayList<>();
 
         int index = 0;
@@ -190,7 +192,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
 
             userInfo.setJobStyle(jobStyle);
             userInfo.setFocusCrowdStyle(focusCrowdStyle);
-            userInfo.setDetectionFrequency(detectionNumber + "<br>" + detectionScope);
+            userInfo.setDetectionFrequency(detectionNumber + "/" + detectionScope);
             userInfo.setDetectionNumber(detectionNumber);
             userInfo.setDetectionScope(detectionScope);
             userInfo.setStartTime(startTime);
@@ -201,7 +203,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
             Boolean bl = true;
 
             index = 0;
-            for (OdsQssHsjcxx odsQssHsjcxx : OdsQssHsjcxxList) {
+            for (OdsQssHsjcxx odsQssHsjcxx : OdsQssHsjcxxListSorted) {
                 //判断 核酸采集时间是不是在 startTime和date之间
                 if (userInfo.getIdCard().equals(odsQssHsjcxx.getSfzhm())) {
 
@@ -230,7 +232,7 @@ public class UserInfoServiceImpl implements IUserInfoService {
             userInfo.setCollectPlace(collectPlace.toString());
             userInfo.setNucleicCollectTime(nucleicCollectTime.toString());
             userInfo.setNucleicResultsTime(nucleicResultsTime.toString());
-            userInfo.setDetectionProgress(index + "<br>" + detectionNumber);
+            userInfo.setDetectionProgress(index + "/" + detectionNumber);
 
 
             if (bl) {