Bläddra i källkod

修复bug,人员查询详情时,时间格式不正确

Wang-Xiao-Ran 1 år sedan
förälder
incheckning
b4e90d4add

+ 21 - 12
src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java

@@ -8,8 +8,7 @@ import com.ruoyi.common.core.web.page.PageDomain;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.core.web.page.TableSupport;
 import com.ruoyi.common.security.utils.DictUtils;
-import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.OtherPersonInfo;
-import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.PersonBasicInfo;
+import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.*;
 import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.service.RemotePersonBasicInfoService;
 import com.sooka.sponest.data.api.digitalenvironment.domain.EnvironmentBiggas;
 import org.springframework.web.bind.annotation.*;
@@ -85,34 +84,44 @@ public class AppPersonBasicInfoController {
             otherInfo.forEach(bind ->{
                 switch(String.valueOf(bind.get("otherPersonType"))){
                     case "1":
-                        result.put("registeredPopulation", bind);
+                        RegisteredPopulationInfo registeredPopulationInfo = JSONObject.toJavaObject(new JSONObject(bind), RegisteredPopulationInfo.class);
+                        result.put("registeredPopulation", registeredPopulationInfo);
                         break;
                     case "2":
-                        result.put("floatingPopulation", bind);
+                        FloatingPopulationInfo floatingPopulationInfo = JSONObject.toJavaObject(new JSONObject(bind), FloatingPopulationInfo.class);
+                        result.put("floatingPopulation", floatingPopulationInfo);
                         break;
                     case "3":
-                        result.put("leftBehindPerson", bind);
+                        LeftBehindPersonInfo leftBehindPersonInfo = JSONObject.toJavaObject(new JSONObject(bind), LeftBehindPersonInfo.class);
+                        result.put("leftBehindPerson", leftBehindPersonInfo);
                         break;
                     case "4":
-                        result.put("campusAroundPerson", bind);
+                        CampusAroundPersonInfo campusAroundPersonInfo = JSONObject.toJavaObject(new JSONObject(bind), CampusAroundPersonInfo.class);
+                        result.put("campusAroundPerson", campusAroundPersonInfo);
                         break;
                     case "5":
-                        result.put("prisonReleased", bind);
+                        PrisonReleasedInfo prisonReleasedInfo = JSONObject.toJavaObject(new JSONObject(bind), PrisonReleasedInfo.class);
+                        result.put("prisonReleased", prisonReleasedInfo);
                         break;
                     case "6":
-                        result.put("communityCorrectionStaff", bind);
+                        CommunityCorrectionStaffInfo communityCorrectionStaffInfo = JSONObject.toJavaObject(new JSONObject(bind), CommunityCorrectionStaffInfo.class);
+                        result.put("communityCorrectionStaff", communityCorrectionStaffInfo);
                         break;
                     case "7":
-                        result.put("psychosisPopulation", bind);
+                        PsychosisPopulationInfo psychosisPopulationInfo = JSONObject.toJavaObject(new JSONObject(bind), PsychosisPopulationInfo.class);
+                        result.put("psychosisPopulation", psychosisPopulationInfo);
                         break;
                     case "8":
-                        result.put("drugAddict", bind);
+                        DrugAddictInfo drugAddictInfo = JSONObject.toJavaObject(new JSONObject(bind), DrugAddictInfo.class);
+                        result.put("drugAddict", drugAddictInfo);
                         break;
                     case "9":
-                        result.put("aidsRisk", bind);
+                        AidsRiskInfo aidsRiskInfo = JSONObject.toJavaObject(new JSONObject(bind), AidsRiskInfo.class);
+                        result.put("aidsRisk", aidsRiskInfo);
                         break;
                     case "10":
-                        result.put("keyYouth", bind);
+                        KeyYouthInfo keyYouthInfo = JSONObject.toJavaObject(new JSONObject(bind), KeyYouthInfo.class);
+                        result.put("keyYouth", keyYouthInfo);
                         break;
                 }
             });