瀏覽代碼

Merge branch 'dev'

lyq 1 年之前
父節點
當前提交
fddb344f53
共有 21 個文件被更改,包括 284 次插入494 次删除
  1. 6 5
      pom.xml
  2. 9 16
      src/main/java/com/sooka/sponest/mobile/SookaMobileApplication.java
  3. 25 14
      src/main/java/com/sooka/sponest/mobile/appbigdata/controller/AppBigDataController.java
  4. 29 59
      src/main/java/com/sooka/sponest/mobile/appbigdata/controller/AppBigDataCountController.java
  5. 0 18
      src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSource.java
  6. 0 35
      src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSourceAspect.java
  7. 0 45
      src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSourceSwitcher.java
  8. 0 4
      src/main/java/com/sooka/sponest/mobile/base/database/GlobalTransactionalRabbitMQ.java
  9. 0 145
      src/main/java/com/sooka/sponest/mobile/base/database/MultipleDataSourceConfig.java
  10. 0 14
      src/main/java/com/sooka/sponest/mobile/base/database/MyDataSource.java
  11. 53 48
      src/main/java/com/sooka/sponest/mobile/comprehensive/organizationAndInstitutionController/AppRoomController.java
  12. 100 88
      src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java
  13. 8 0
      src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java
  14. 13 0
      src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteSystemBaseServiceFallbackFactory.java
  15. 7 0
      src/main/java/com/sooka/sponest/mobile/system/login/controller/AppLoginController.java
  16. 1 0
      src/main/java/com/sooka/sponest/mobile/system/login/domain/AppLoginBO.java
  17. 10 0
      src/main/java/com/sooka/sponest/mobile/system/login/domain/AppUpPwd.java
  18. 4 0
      src/main/java/com/sooka/sponest/mobile/system/login/service/AppLoginService.java
  19. 9 2
      src/main/java/com/sooka/sponest/mobile/system/login/service/impl/AppLoginServiceImpl.java
  20. 9 0
      src/main/resources/banner.txt
  21. 1 1
      src/main/resources/bootstrap.yml

+ 6 - 5
pom.xml

@@ -13,6 +13,7 @@
     <artifactId>sooka-mobile</artifactId>
 
     <dependencies>
+
         <!-- SpringCloud Alibaba Nacos -->
         <dependency>
             <groupId>com.alibaba.cloud</groupId>
@@ -31,10 +32,10 @@
             <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         </dependency>
 
-        <!-- Sentinel Datasource Nacos -->
+        <!-- SpringBoot Actuator -->
         <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-datasource-nacos</artifactId>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
 
         <!-- Swagger UI -->
@@ -76,13 +77,13 @@
 
         <dependency>
             <groupId>com.ruoyi</groupId>
-            <artifactId>sooka-sponest-api-data</artifactId>
+            <artifactId>sooka-sponest-api-comprehensive</artifactId>
             <version>3.4.0</version>
         </dependency>
 
         <dependency>
             <groupId>com.ruoyi</groupId>
-            <artifactId>sooka-sponest-api-comprehensive</artifactId>
+            <artifactId>sooka-sponest-api-data</artifactId>
             <version>3.4.0</version>
         </dependency>
 

+ 9 - 16
src/main/java/com/sooka/sponest/mobile/SookaMobileApplication.java

@@ -3,12 +3,8 @@ package com.sooka.sponest.mobile;
 import com.ruoyi.common.security.annotation.EnableCustomConfig;
 import com.ruoyi.common.security.annotation.EnableRyFeignClients;
 import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
-import com.sooka.sponest.mobile.remoteapi.EnableSookaFeignClients;
-import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.web.servlet.MultipartConfigFactory;
 import org.springframework.context.annotation.Bean;
 import org.springframework.util.unit.DataSize;
@@ -17,26 +13,23 @@ import javax.servlet.MultipartConfigElement;
 
 @EnableCustomConfig
 @EnableCustomSwagger2
-@EnableSookaFeignClients
-@SpringBootApplication
 @EnableRyFeignClients
-@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
-@MapperScan("com.sooka.sponest.mobile.**.mapper")
+@SpringBootApplication
+public class SookaMobileApplication {
 
-public class SookaMobileApplication{
-    public static void main(String[] args)
-    {
+    public static void main(String[] args) {
         SpringApplication.run(SookaMobileApplication.class, args);
         System.out.println("(♥◠‿◠)ノ゙  首佳科技 手机端 启动成功   ლ(´ڡ`ლ)゙  \n" +
-                "  __________   ____ |  | _______          ____________   ____   ____   ____   _______/  |_\n"+
-                " /  ___/  _ \\ /  _ \\|  |/ /\\__  \\        /  ___/\\____ \\ /  _ \\ /    \\_/ __ \\ /  ___/\\   __\\\n"+
-                " \\___ (  <_> |  <_> )    <  / __ \\_      \\___ \\ |  |_> >  <_> )   |  \\  ___/ \\___ \\  |  |\n"+
-                "/____  >____/ \\____/|__|_ \\(____  /     /____  >|   __/ \\____/|___|  /\\___  >____  > |__|\n"+
+                "  __________   ____ |  | _______          ____________   ____   ____   ____   _______/  |_\n" +
+                " /  ___/  _ \\ /  _ \\|  |/ /\\__  \\        /  ___/\\____ \\ /  _ \\ /    \\_/ __ \\ /  ___/\\   __\\\n" +
+                " \\___ (  <_> |  <_> )    <  / __ \\_      \\___ \\ |  |_> >  <_> )   |  \\  ___/ \\___ \\  |  |\n" +
+                "/____  >____/ \\____/|__|_ \\(____  /     /____  >|   __/ \\____/|___|  /\\___  >____  > |__|\n" +
                 "     \\/                  \\/     \\/           \\/ |__|               \\/     \\/     \\/\n"
         );
     }
+
     @Bean
-    public MultipartConfigElement multipartConfigElement(){
+    public MultipartConfigElement multipartConfigElement() {
         MultipartConfigFactory factory = new MultipartConfigFactory();
         factory.setMaxFileSize(DataSize.parse("10240000KB"));
         factory.setMaxRequestSize(DataSize.parse("10240000KB"));

+ 25 - 14
src/main/java/com/sooka/sponest/mobile/appbigdata/controller/AppBigDataController.java

@@ -40,13 +40,13 @@ public class AppBigDataController extends VisuBaseService {
     @Resource
     RemoteSystemBaseService remoteSystemBaseService;
 
-    public final static String EVENT_TYPE = "eventType";
-    public final static String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
-    public final static String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
-    public final static String NAME_CHINESE = "name_chinese";
-    public final static String NAME_ORIGINAL = "name_original";
-    public final static String EVENT = "event";
-    public final static String PHOTO_ID = "photoId";
+    public static final String EVENT_TYPE = "eventType";
+    public static final String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
+    public static final String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
+    public static final String NAME_CHINESE = "name_chinese";
+    public static final String NAME_ORIGINAL = "name_original";
+    public static final String EVENT = "event";
+    public static final String PHOTO_ID = "photoId";
 
 
     /**
@@ -340,12 +340,12 @@ public class AppBigDataController extends VisuBaseService {
      */
     @ApiOperation(value = "获取重点工程(无分页,无筛选)", notes = "获取重点工程(无分页,无筛选)")
     @GetMapping("getKeyProjects")
-    public AjaxResult getKeyProjects(Long deptId,String state) {
-        AjaxResult ajaxResult = remoteDataBaseService.getKeyProjects(deptId,state);
+    public AjaxResult getKeyProjects(Long deptId, String state) {
+        AjaxResult ajaxResult = remoteDataBaseService.getKeyProjects(deptId, state);
         if ("200".equals(ajaxResult.get("code").toString())) {
             List<LinkedHashMap<String, Object>> list = (List<LinkedHashMap<String, Object>>) ajaxResult.get("data");
-            list.forEach(map->{
-                if(null != map.get("cameraCode")){
+            list.forEach(map -> {
+                if (null != map.get("cameraCode")) {
                     map.put("cameraCode", map.get("cameraCode").toString().split(","));
                 }
             });
@@ -368,8 +368,8 @@ public class AppBigDataController extends VisuBaseService {
         TableDataInfo keyProjectsByParams = remoteDataBaseService.getKeyProjectsByParams(bo.getPageNum(), bo.getPageSize(), bo.getDeptId(), bo.getPark(), bo.getProjectName(), bo.getTerritoriality(), bo.getNature(), bo.getState());
         if (HttpStatus.SUCCESS == keyProjectsByParams.getCode()) {
             List<LinkedHashMap<String, Object>> list = (List<LinkedHashMap<String, Object>>) keyProjectsByParams.getRows();
-            list.forEach(map->{
-                if(null != map.get("cameraCode")){
+            list.forEach(map -> {
+                if (null != map.get("cameraCode")) {
                     map.put("cameraCode", map.get("cameraCode").toString().split(","));
                 }
             });
@@ -396,6 +396,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 获取重点区域
+     *
      * @return
      * @Version 1.0
      * @author wang_xy
@@ -423,6 +424,7 @@ public class AppBigDataController extends VisuBaseService {
     /**
      * 获取重点区域
      * 带筛选,带分页
+     *
      * @return
      * @Version 1.0
      * @author wang_xy
@@ -445,7 +447,7 @@ public class AppBigDataController extends VisuBaseService {
                 area.put("projectLevelLabel", projectLevel.get(area.get("projectLevel")));
             }
             return AjaxResult.success(list);
-        }else{
+        } else {
             return AjaxResult.error(importAreaListByParams.getCode(), importAreaListByParams.getMsg());
         }
     }
@@ -475,6 +477,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * app事件统计
+     *
      * @param deptId
      * @return
      */
@@ -486,6 +489,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 四长统计
+     *
      * @param deptId
      * @return
      */
@@ -497,6 +501,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 四长概况点击事件
+     *
      * @param CommandCenterBO
      * @return
      */
@@ -516,6 +521,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 手机端四长接口
+     *
      * @param CommandCenterBO
      * @return
      */
@@ -528,6 +534,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 通讯录组织机构
+     *
      * @return
      */
     @ApiOperation(value = "通讯录组织机构", notes = "通讯录组织机构")
@@ -538,6 +545,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 根据部门id获取通讯录列表
+     *
      * @param deptId
      * @param pageNum
      * @param pageSize
@@ -552,6 +560,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 大事迹按部门搜索
+     *
      * @param deptId
      * @return
      */
@@ -564,6 +573,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 防火队发送短信
+     *
      * @param visuFireSendingSMSVo
      * @return
      */
@@ -576,6 +586,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 防火队列表
+     *
      * @param dataBO
      * @return
      */

+ 29 - 59
src/main/java/com/sooka/sponest/mobile/appbigdata/controller/AppBigDataCountController.java

@@ -11,9 +11,9 @@ import com.sooka.sponest.mobile.appbigdata.domain.CenterdataTEnvironmentRyList;
 import com.sooka.sponest.mobile.appbigdata.domain.ForestCloudRYList;
 import com.sooka.sponest.mobile.appbigdata.domain.bo.EnvironmentCloudRYBO;
 import com.sooka.sponest.mobile.appbigdata.domain.bo.ForestCloudRYBO;
+import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
 import com.sooka.sponest.mobile.appbigdata.domain.vo.ForestCloudMapVO;
 import com.sooka.sponest.mobile.appbigdata.domain.vo.VisuForestCloudMapVO;
-import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
 import com.sooka.sponest.mobile.base.service.AppAttendanceService;
 import com.sooka.sponest.mobile.data.digitalagriculture.domain.VisuBaseService;
 import com.sooka.sponest.mobile.remoteapi.RemoteDataBaseService;
@@ -21,35 +21,30 @@ import com.sooka.sponest.mobile.remoteapi.RemoteEventBaseService;
 import com.sooka.sponest.mobile.remoteapi.RemoteMiddlewareService;
 import com.sooka.sponest.mobile.remoteapi.domain.DataVO;
 import com.sooka.sponest.mobile.utils.PictureReplaceAll;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import javax.annotation.Resource;
 import java.util.*;
 
 @RestController
 @RequestMapping("/AppBigDataCountController")
 public class AppBigDataCountController extends VisuBaseService {
 
-    public final static String EVENT_TYPE = "eventType";
-    public final static String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
-    public final static String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
-    public final static String EVENT = "event";
-    public final static String NAME_CHINESE = "name_chinese";
-    public final static String NAME_ORIGINAL = "name_original";
+    public static final String EVENT_TYPE = "eventType";
+    public static final String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
+    public static final String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
+    public static final String EVENT = "event";
+    public static final String NAME_CHINESE = "name_chinese";
+    public static final String NAME_ORIGINAL = "name_original";
 
     @Autowired
     private RemoteMiddlewareService middlewareService;
-    @Resource
-    AppAttendanceService appAttendanceService;
-    @Resource
-    RemoteEventBaseService remoteEventBaseService;
-
-    @Resource
-    RemoteDataBaseService dataBaseService;
-    ;
-
+    @Autowired
+    private AppAttendanceService appAttendanceService;
+    @Autowired
+    private RemoteEventBaseService remoteEventBaseService;
+    @Autowired
+    private RemoteDataBaseService dataBaseService;
 
     /**
      * 查询落点集合接口
@@ -78,9 +73,9 @@ public class AppBigDataCountController extends VisuBaseService {
         R resultData = middlewareService.getResourcePointById(vb.getId(), vb.getType());
         if (HttpStatus.SUCCESS == resultData.getCode()) {
             Map<String, Object> data = (Map<String, Object>) resultData.getData();
-            if(data.containsKey("pictures")){
+            if (data.containsKey("pictures")) {
                 List<String> pictures = (List<String>) data.get("pictures");
-                if(!pictures.isEmpty()){
+                if (!pictures.isEmpty()) {
                     List<String> strList = PictureReplaceAll.replacePicturesList(pictures);
                     data.put("pictures", strList);
                 }
@@ -162,8 +157,8 @@ public class AppBigDataCountController extends VisuBaseService {
         JSONArray result = new JSONArray();
         for (Object data : list) {
             JSONObject jsonObject = (JSONObject) JSONObject.toJSON(data);
-            if(jsonObject.containsKey("dictType")){
-                jsonObject.put("jobValue",jsonObject.remove("dictType"));
+            if (jsonObject.containsKey("dictType")) {
+                jsonObject.put("jobValue", jsonObject.remove("dictType"));
             }
             result.add(jsonObject);
         }
@@ -171,39 +166,26 @@ public class AppBigDataCountController extends VisuBaseService {
     }
 
     /**
+     * @throws
      * @description
      * @author LG
      * @param[1] deptId
      * @param[2] leadType
-     * @throws
      * @Api 河长,路长,田长,获取人员类型
      * @time 2023/8/16 18:29
      */
-    private ArrayList<Map<String, Object>> getRyListByJob(Long deptId, String leadType){
+    private ArrayList<Map<String, Object>> getRyListByJob(Long deptId, String leadType) {
         AjaxResult waterResult = dataBaseService.getRyListToWaterConservancyViewByType(deptId, leadType);
         LinkedHashMap<String, Object> data = (LinkedHashMap<String, Object>) waterResult.get("data");
-        ArrayList<Map<String, Object>> list = (ArrayList<Map<String, Object>>) data.get("ryList");
-        return list;
+        return (ArrayList<Map<String, Object>>) data.get("ryList");
     }
 
     /**
-     * @throws 手机端:人员巡查轨迹五级联动
-     * @description
-     * @author LG
-     * @param[1] null
-     * @time 2023/8/16 11:08
-     */
-
-    //1. 获取航管局列表
-    //字典值,调用/AppCameraController/getSortByType  传dictType(字典值的key) 获取数据
-
-    //2. 获取航管局对应的人员类型
-
-    /**
      * 获取航管局对应的人员类型
+     *
      * @param dictValue 行管局类型 1:林业;2:农业;3:水利;4:环保;5:应急;6:交通;7:资源;8:消防
-     * @param deptId 部门id
-     * @param leadType 人员类型
+     * @param deptId    部门id
+     * @param leadType  人员类型
      * @return AjaxResult
      */
     @GetMapping("/getPersonTypeBySystem")
@@ -213,54 +195,42 @@ public class AppBigDataCountController extends VisuBaseService {
         switch (dictValue) {
             case "1"://林业
                 R<ForestCloudRYList> ryListToForestView = dataBaseService.getRyListToForestView(forestMapVo);
-                if(HttpStatus.SUCCESS == ryListToForestView.getCode()){
+                if (HttpStatus.SUCCESS == ryListToForestView.getCode()) {
                     ArrayList<ForestCloudRYBO> visuForestCloudRYBO = (ArrayList<ForestCloudRYBO>) ryListToForestView.getData().getVisuForestCloudRYBO();
                     return AjaxResult.success(typeUnity(visuForestCloudRYBO));
-                }else{
+                } else {
                     return AjaxResult.error(ryListToForestView.getCode(), ryListToForestView.getMsg());
                 }
             case "2"://农业
                 //无
                 return AjaxResult.success(new JSONArray());
-
             case "3"://水利
                 return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
-
             case "4"://环保
                 R<CenterdataTEnvironmentRyList> ryListToEnvironmentView = dataBaseService.getRyListToEnvironmentView(forestMapVo);
-                if(HttpStatus.SUCCESS == ryListToEnvironmentView.getCode()){
+                if (HttpStatus.SUCCESS == ryListToEnvironmentView.getCode()) {
                     ArrayList<EnvironmentCloudRYBO> userList = (ArrayList<EnvironmentCloudRYBO>) ryListToEnvironmentView.getData().getUser();
                     return AjaxResult.success(typeUnity(userList));
-                }else{
+                } else {
                     return AjaxResult.error(ryListToEnvironmentView.getCode(), ryListToEnvironmentView.getMsg());
                 }
             case "5"://应急
                 return AjaxResult.success(new JSONArray());
-
             case "6"://交通
                 return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
-
             case "7"://资源
                 return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
-
             case "8"://消防
                 R<Map<String, Object>> ryListToFireControlView = dataBaseService.getRyListToFireControlView(deptId);
-                if(HttpStatus.SUCCESS == ryListToFireControlView.getCode()){
+                if (HttpStatus.SUCCESS == ryListToFireControlView.getCode()) {
                     ArrayList<Map<String, Object>> fireControlList = (ArrayList<Map<String, Object>>) ryListToFireControlView.getData().get("ryList");
                     return AjaxResult.success(typeUnity(fireControlList));
-                }else{
+                } else {
                     return AjaxResult.error(ryListToFireControlView.getCode(), ryListToFireControlView.getMsg());
                 }
-
             default: {
                 return AjaxResult.error(500, "航管局类型错误");
             }
         }
     }
-
-    //3. 获取类型对应的人员信息
-
-    //4. 获取人员对应的巡护任务列表
-
-    //5. 根据巡护任务查询任务详情轨迹
 }

+ 0 - 18
src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSource.java

@@ -1,18 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
-
-
-public class DynamicDataSource extends AbstractRoutingDataSource {
-
-    Logger logger = LoggerFactory.getLogger(DynamicDataSource.class);
-
-    @Override
-    protected Object determineCurrentLookupKey() {
-        logger.info("------------------当前数据源 {}", DynamicDataSourceSwitcher.getDataSource());
-        return DynamicDataSourceSwitcher.getDataSource();
-    }
-}

+ 0 - 35
src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSourceAspect.java

@@ -1,35 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-import org.aspectj.lang.annotation.After;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.aspectj.lang.annotation.Pointcut;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-
-@Aspect
-@Component
-@Order(1)
-public class DynamicDataSourceAspect {
-
-    /**
-     * 切入点只对@Service注解的类上的@DataSource方法生效
-     * @param myDataSource
-     */
-    @Pointcut(value="(@within(org.springframework.stereotype.Service) ||@within(org.springframework.stereotype.Repository)) && @annotation(myDataSource)" )
-    public void dynamicDataSourcePointCut(MyDataSource myDataSource){}
-
-    @Before(value = "dynamicDataSourcePointCut(myDataSource)")
-    public void switchDataSource(MyDataSource myDataSource) {
-        DynamicDataSourceSwitcher.setDataSource(myDataSource.value());
-    }
-
-    /**
-     * 切点执行完后 切换成主数据库
-     * @param myDataSource
-     */
-    @After(value="dynamicDataSourcePointCut(myDataSource)")
-    public void after(MyDataSource myDataSource){
-        DynamicDataSourceSwitcher.cleanDataSource();
-    }
-}

+ 0 - 45
src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSourceSwitcher.java

@@ -1,45 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class DynamicDataSourceSwitcher {
-
-    static Logger logger = LoggerFactory.getLogger(DynamicDataSourceSwitcher.class);
-
-    public static final String Master = "master";
-    public static final String dbCenterTtranmanager = "db-center-tranmanager";
-    public static final String dbCenterData = "db-center-data";
-    public static final String dbCenterEvent = "db-center-event";
-    public static final String dbCenterMonitor = "db-center-monitor";
-    public static final String dbCenterTask = "db-center-task";
-    public static final String dbCenterEvaluation = "db-center-evaluation";
-    public static final String dbCenterFire = "db-center-fire";
-    public static final String dbCenterStraw = "db-center-straw";
-    public static final String dbCenterPests = "db-center-pests";
-    public static final String dbCenterComprehensive = "db-center-comprehensive";
-    public static final String dbCenterOnest = "db-center-onest";
-    public static final String dbSystemData = "db-system";
-    public static final String dbCenterMessage = "db-center-message";
-
-    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();
-
-    public static void setDataSource(String name){
-        logger.info("-------- 设置数据源数据源为 :{} ", name);
-        contextHolder.set(name);
-    }
-
-    public static String getDataSource(){
-        if (StringUtils.isEmpty(contextHolder.get())) {
-            setDataSource(Master);
-        }
-        return contextHolder.get();
-    }
-
-    public static void cleanDataSource(){
-        contextHolder.remove();
-    }
-
-}

+ 0 - 4
src/main/java/com/sooka/sponest/mobile/base/database/GlobalTransactionalRabbitMQ.java

@@ -1,4 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-public @interface GlobalTransactionalRabbitMQ {
-}

+ 0 - 145
src/main/java/com/sooka/sponest/mobile/base/database/MultipleDataSourceConfig.java

@@ -1,145 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-
-import javax.sql.DataSource;
-import java.util.HashMap;
-import java.util.Map;
-
-@Configuration
-public class MultipleDataSourceConfig {
-
-    @Bean("master")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.master")
-    public DataSource createMasterDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbSystemData")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-system")
-    public DataSource createSystemDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterTranmanager")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-tranmanager")
-    public DataSource createTranmanagerDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterData")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-data")
-    public DataSource createDataDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterMessage")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-message")
-    public DataSource createMessageDataSource() {
-        return new DruidDataSource();
-    }
-
-
-    @Bean("dbCenterEvent")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-event")
-    public DataSource createEventDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterMonitor")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-monitor")
-    public DataSource createMonitorDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterTask")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-task")
-    public DataSource createTaskDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterEvaluation")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-evaluation")
-    public DataSource createEvaluationDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterFire")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-fire")
-    public DataSource createFireDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterStraw")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-straw")
-    public DataSource createStrawDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterPests")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-pests")
-    public DataSource createPestsDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterComprehensive")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-comprehensive")
-    public DataSource createComprehensiveDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterOnest")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-onest")
-    public DataSource createOnestDataSource() {
-        return new DruidDataSource();
-    }
-
-    /**
-     * 设置动态数据源,通过@Primary 来确定主DataSource
-     *
-     * @return
-     */
-    @Bean
-    @Primary
-    public DataSource createDynamicDataSource(@Qualifier("master") DataSource master,
-                                              @Qualifier("dbSystemData") DataSource dbSystemData,
-                                              @Qualifier("dbCenterData") DataSource dbCenterData,
-                                              @Qualifier("dbCenterMessage") DataSource dbCenterMessage,
-                                              @Qualifier("dbCenterEvent") DataSource dbCenterEvent,
-                                              @Qualifier("dbCenterMonitor") DataSource dbCenterMonitor,
-                                              @Qualifier("dbCenterTask") DataSource dbCenterTask,
-                                              @Qualifier("dbCenterEvaluation") DataSource dbCenterEvaluation,
-                                              @Qualifier("dbCenterFire") DataSource dbCenterFire,
-                                              @Qualifier("dbCenterStraw") DataSource dbCenterStraw,
-                                              @Qualifier("dbCenterPests") DataSource dbCenterPests,
-                                              @Qualifier("dbCenterComprehensive") DataSource dbCenterComprehensive,
-                                              @Qualifier("dbCenterOnest") DataSource dbCenterOnest,
-                                              @Qualifier("dbCenterTranmanager") DataSource dbCenterTranmanager) {
-        DynamicDataSource dynamicDataSource = new DynamicDataSource();
-        //设置默认数据源
-        dynamicDataSource.setDefaultTargetDataSource(master);
-        //配置多数据源
-        Map<Object, Object> map = new HashMap<>();
-        map.put("master", master);
-        map.put("db-system", dbSystemData);
-        map.put("db-center-tranmanager", dbCenterTranmanager);
-        map.put("db-center-data", dbCenterData);
-        map.put("db-center-message", dbCenterMessage);
-        map.put("db-center-event", dbCenterEvent);
-        map.put("db-center-monitor", dbCenterMonitor);
-        map.put("db-center-task", dbCenterTask);
-        map.put("db-center-evaluation", dbCenterEvaluation);
-        map.put("db-center-fire", dbCenterFire);
-        map.put("db-center-straw", dbCenterStraw);
-        map.put("db-center-pests", dbCenterPests);
-        map.put("db-center-comprehensive", dbCenterComprehensive);
-        map.put("db-center-onest", dbCenterOnest);
-        dynamicDataSource.setTargetDataSources(map);
-        return dynamicDataSource;
-    }
-}

+ 0 - 14
src/main/java/com/sooka/sponest/mobile/base/database/MyDataSource.java

@@ -1,14 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({
-        ElementType.METHOD
-})
-public @interface MyDataSource {
-    String value() default "";
-}

+ 53 - 48
src/main/java/com/sooka/sponest/mobile/comprehensive/organizationAndInstitutionController/AppRoomController.java

@@ -2,7 +2,6 @@ package com.sooka.sponest.mobile.comprehensive.organizationAndInstitutionControl
 
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.core.constant.HttpStatus;
-import com.ruoyi.common.core.domain.DictKeys;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
@@ -13,12 +12,17 @@ import com.ruoyi.common.core.web.page.TableSupport;
 import com.ruoyi.common.security.utils.DictUtils;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.domain.ComprehensiveRoom;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.RemoteRoomService;
+import org.apache.commons.collections4.MapUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import static com.ruoyi.common.core.domain.DictKeys.*;
+
 /**
  * 房间管理
  *
@@ -37,40 +41,30 @@ public class AppRoomController extends BaseController {
      */
     @GetMapping("/comprehensiveroom/list")
     public AjaxResult list(ComprehensiveRoom comprehensiveroom) {
+        System.out.println("start --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
         PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        TableDataInfo tableDataInfo = remoteRoomService.selectComprehensiveRoomList(pageNum, pageSize,comprehensiveroom.getName(),comprehensiveroom.getEstateId());
-        if(HttpStatus.SUCCESS == tableDataInfo.getCode()){
+        TableDataInfo tableDataInfo = remoteRoomService.selectComprehensiveRoomList(
+                pageDomain.getPageNum(),
+                pageDomain.getPageSize(),
+                comprehensiveroom.getName(),
+                comprehensiveroom.getEstateId(),
+                comprehensiveroom.getTotal()
+        );
+        if (HttpStatus.SUCCESS == tableDataInfo.getCode()) {
             List<ComprehensiveRoom> rows = (List<ComprehensiveRoom>) tableDataInfo.getRows();
-            Map<String, Object> dictCacheToMap = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_GLFS);
-            Map<String, Object> dictCacheToMap1 = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_WYH);
-            Map<String, Object> dictCacheToMap2 = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_FJXZ);
-            Map<String, Object> dictCacheToMap3 = DictUtils.getDictCacheToMap(DictKeys.RFH_FJ_SHLX);
+            String[] dictArray = new String[]{RFH_FJ_GLFS, RFH_FJ_WYH, RFH_FJ_FJXZ, RFH_FJ_SHLX};
+            Map<String, Map<String, Object>> dictMaps = DictUtils.getDictCacheToMapByArray(dictArray);
             String s = JSON.toJSONString(rows);
             rows = JSON.parseArray(s, ComprehensiveRoom.class);
-            if(StringUtils.isNotEmpty(rows)) {
+            if (StringUtils.isNotEmpty(rows)) {
                 for (ComprehensiveRoom data : rows) {
-                    data.setRoomSfpfLabel("1".equals(data.getRoomSfpf()) ? "是" : "否");
-                    data.setRoomSfydxsLabel("1".equals(data.getRoomSfydxs()) ? "是" : "否");
-                    data.setRoomSfzrLabel("1".equals(data.getRoomSfzr()) ? "是" : "否");
-                    data.setRoomSffwLabel("1".equals(data.getRoomSffw()) ? "是" : "否");
-                    data.setRoomWfjzLabel("1".equals(data.getRoomWfjz()) ? "是" : "否");
-                    data.setRoomSfcwLabel("1".equals(data.getRoomSfcw()) ? "是" : "否");
-                    data.setRoomSfgzLabel("1".equals(data.getRoomSfgz()) ? "是" : "否");
-                    data.setRoomSfmsfLabel("1".equals(data.getRoomSfmsf()) ? "是" : "否");
-                    data.setRoomSfgkpyLabel("1".equals(data.getRoomSfgkpy()) ? "是" : "否");
-                    data.setRoomSfjhqLabel("1".equals(data.getRoomSfjhq()) ? "是" : "否");
-                    data.setRoomSfslzLabel("1".equals(data.getRoomSfslz()) ? "是" : "否");
-                    data.setRoomGlfsLabel(dictCacheToMap.get(data.getRoomGlfs()).toString());
-                    data.setRoomWyhLabel(dictCacheToMap1.get(data.getRoomWyh()).toString());
-                    data.setRoomTypeLabel(dictCacheToMap2.get(data.getRoomType()).toString());
-                    data.setRoomShlxLabel(dictCacheToMap3.get(data.getRoomShlx()).toString());
+                    setDictValue(data, dictMaps);
                 }
             }
+            System.out.println("end --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
             return AjaxResult.success(rows);
-        }else{
-            return AjaxResult.error(tableDataInfo.getCode(),tableDataInfo.getMsg());
+        } else {
+            return AjaxResult.error(tableDataInfo.getCode(), tableDataInfo.getMsg());
         }
     }
 
@@ -81,30 +75,37 @@ public class AppRoomController extends BaseController {
     public AjaxResult getInfo(String id) {
         R<ComprehensiveRoom> edit = remoteRoomService.selectComprehensiveRoomById(id);
         ComprehensiveRoom data = edit.getData();
-        data.setRoomSfpfLabel("1".equals(data.getRoomSfpf())? "是":"否");
-        data.setRoomSfydxsLabel("1".equals(data.getRoomSfydxs())? "是":"否");
-        data.setRoomSfzrLabel("1".equals(data.getRoomSfzr())? "是":"否");
-        data.setRoomSffwLabel("1".equals(data.getRoomSffw())? "是":"否");
-        data.setRoomWfjzLabel("1".equals(data.getRoomWfjz())? "是":"否");
-        data.setRoomSfcwLabel("1".equals(data.getRoomSfcw())? "是":"否");
-        data.setRoomSfgzLabel("1".equals(data.getRoomSfgz())? "是":"否");
-        data.setRoomSfmsfLabel("1".equals(data.getRoomSfmsf())? "是":"否");
-        data.setRoomSfgkpyLabel("1".equals(data.getRoomSfgkpy())? "是":"否");
-        data.setRoomSfjhqLabel("1".equals(data.getRoomSfjhq())? "是":"否");
-        data.setRoomSfslzLabel("1".equals(data.getRoomSfslz())? "是":"否");
-        if (HttpStatus.SUCCESS == edit.getCode()){
-            data.setRoomGlfsLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_GLFS,data.getRoomGlfs()));
-            data.setRoomWyhLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_WYH,data.getRoomWyh()));
-            data.setRoomTypeLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_FJXZ,data.getRoomType()));
-            data.setRoomShlxLabel(DictUtils.getDictDataByValue(DictKeys.RFH_FJ_SHLX,data.getRoomShlx()));
+        if (HttpStatus.SUCCESS == edit.getCode()) {
             data.setIsEdit(true);
-        }else if (HttpStatus.ERROR == edit.getCode() && null != edit.getData()) {
+        } else if (HttpStatus.ERROR == edit.getCode() && null != edit.getData()) {
             data.setIsEdit(false);
-        }else {
+        } else {
             return AjaxResult.error(edit.getCode(), edit.getMsg());
         }
+        setDictValue(data, null);
         return AjaxResult.success(data);
+    }
 
+    private void setDictValue(ComprehensiveRoom data, Map<String, Map<String, Object>> dictMaps) {
+        if (StringUtils.isEmpty(dictMaps)) {
+            String[] dictArray = new String[]{RFH_FJ_GLFS, RFH_FJ_WYH, RFH_FJ_FJXZ, RFH_FJ_SHLX};
+            dictMaps = DictUtils.getDictCacheToMapByArray(dictArray);
+        }
+        data.setRoomSfpfLabel("1".equals(data.getRoomSfpf()) ? "是" : "否");
+        data.setRoomSfydxsLabel("1".equals(data.getRoomSfydxs()) ? "是" : "否");
+        data.setRoomSfzrLabel("1".equals(data.getRoomSfzr()) ? "是" : "否");
+        data.setRoomSffwLabel("1".equals(data.getRoomSffw()) ? "是" : "否");
+        data.setRoomWfjzLabel("1".equals(data.getRoomWfjz()) ? "是" : "否");
+        data.setRoomSfcwLabel("1".equals(data.getRoomSfcw()) ? "是" : "否");
+        data.setRoomSfgzLabel("1".equals(data.getRoomSfgz()) ? "是" : "否");
+        data.setRoomSfmsfLabel("1".equals(data.getRoomSfmsf()) ? "是" : "否");
+        data.setRoomSfgkpyLabel("1".equals(data.getRoomSfgkpy()) ? "是" : "否");
+        data.setRoomSfjhqLabel("1".equals(data.getRoomSfjhq()) ? "是" : "否");
+        data.setRoomSfslzLabel("1".equals(data.getRoomSfslz()) ? "是" : "否");
+        data.setRoomGlfsLabel(MapUtils.getString((Map<String, Object>) MapUtils.getMap(dictMaps, RFH_FJ_GLFS), data.getRoomGlfs()));
+        data.setRoomWyhLabel(MapUtils.getString((Map<String, Object>) MapUtils.getMap(dictMaps, RFH_FJ_WYH), data.getRoomWyh()));
+        data.setRoomTypeLabel(MapUtils.getString((Map<String, Object>) MapUtils.getMap(dictMaps, RFH_FJ_FJXZ), data.getRoomType()));
+        data.setRoomShlxLabel(MapUtils.getString((Map<String, Object>) MapUtils.getMap(dictMaps, RFH_FJ_SHLX), data.getRoomShlx()));
     }
 
     /**
@@ -114,6 +115,7 @@ public class AppRoomController extends BaseController {
     public AjaxResult add(@RequestBody String json) {
         return remoteRoomService.insertComprehensiveRoom(json);
     }
+
     /**
      * 修改房间管理
      */
@@ -132,21 +134,23 @@ public class AppRoomController extends BaseController {
 
     /**
      * 楼栋的单元数
+     *
      * @param num
      * @return
      */
     @GetMapping("/comprehensiveroom/getunitList")
-    public AjaxResult getunitList(@RequestParam("num") String num){
+    public AjaxResult getunitList(@RequestParam("num") String num) {
         return remoteRoomService.getunitList(num);
     }
 
     /**
      * 房间id
+     *
      * @param id
      * @return
      */
     @GetMapping("/comprehensiveroom/getAllUserInfo")
-    public AjaxResult getAllUserInfo(@RequestParam("id") String id){
+    public AjaxResult getAllUserInfo(@RequestParam("id") String id) {
         return remoteRoomService.getAllUserInfo(id);
     }
 
@@ -160,11 +164,12 @@ public class AppRoomController extends BaseController {
 
     /**
      * 查询出租屋列表
+     *
      * @param
      * @return
      */
     @GetMapping("/comprehensiveroom/getLet")
-    public AjaxResult getLet(){
+    public AjaxResult getLet() {
         return remoteRoomService.selectComprehensiveLet();
     }
 

+ 100 - 88
src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java

@@ -4,19 +4,22 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.constant.HttpStatus;
 import com.ruoyi.common.core.domain.DictKeys;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 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.*;
 import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.service.RemotePersonBasicInfoService;
 import com.sooka.sponest.data.api.digitalenvironment.domain.EnvironmentBiggas;
+import org.apache.commons.collections4.MapUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
+import static com.ruoyi.common.core.domain.DictKeys.*;
 import static com.ruoyi.common.security.utils.DictUtils.getComprehensiveDictCacheToMap;
 
 /**
@@ -34,30 +37,20 @@ public class AppPersonBasicInfoController {
      */
     @GetMapping("/PersonBasicInfo/list")
     public AjaxResult list(PersonBasicInfo info) {
+        System.out.println("start --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
         PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        Integer delFlag = info.getDelFlag();
-        List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getList(info.getName(), pageNum, pageSize, delFlag).getRows();
-        Map<String, Object> comprehensiveSexMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);//性别字典值
-        Map<String, Object> comprehensiveNationMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);//民族字典值
-        Map<String, Object> comprehensiveMaritalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_MARITAL_STATUS);//婚姻状况字典值
-        Map<String, Object> comprehensiveEducationalBackgroundMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);//学历字典值
-        Map<String, Object> comprehensiveReligiousBeliefMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF);//宗教信仰字典值
-        Map<String, Object> comprehensivePoliticalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);//政治面貌字典值
-        Map<String, Object> comprehensiveOccupationalCategoryMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY);//职业类别字典值
-        Map<String, Object> comprehensiveCityCodeMap = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
-        for (HashMap<String, Object> row : rows) {
-            row.put("genderLabel", comprehensiveSexMap.get(row.get("gender")));//性别字典值
-            row.put("nationLabel", comprehensiveNationMap.get(row.get("nation")));//民族字典值
-            row.put("maritalStatusLabel", comprehensiveMaritalStatusMap.get(row.get("maritalStatus")));//婚姻状况字典值
-            row.put("educationLabel", comprehensiveEducationalBackgroundMap.get(row.get("education")));//学历字典值
-            row.put("religiousBeliefLabel", null == row.get("religiousBelief") ? null : comprehensiveReligiousBeliefMap.get(row.get("religiousBelief")));//宗教信仰字典值
-            row.put("politicalOutlookLabel", comprehensivePoliticalStatusMap.get(row.get("politicalOutlook")));//政治面貌字典值
-            row.put("occupationalCategoryLabel", comprehensiveOccupationalCategoryMap.get(row.get("occupationalCategory")));//职业类别字典值
-            row.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(row.get("householdRegistration")));//户籍地 2260
-            row.put("nativePlaceLabel", comprehensiveCityCodeMap.get(row.get("nativePlace")));//籍贯 2260
+        //noinspection unchecked
+        List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getList(
+                info.getName(),
+                pageDomain.getPageNum(),
+                pageDomain.getPageSize(),
+                info.getDelFlag(),
+                info.getTotal()
+        ).getRows();
+        if (StringUtils.isNotEmpty(rows)) {
+            setDictValue(rows);
         }
+        System.out.println("end --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
         return AjaxResult.success(rows);
     }
 
@@ -71,19 +64,19 @@ public class AppPersonBasicInfoController {
         if ("200".equals(ajaxResult.get("code").toString())) {
             Map<String, Object> data = (Map<String, Object>) ajaxResult.get("data");
             HashMap<String, Object> basicInfo = (HashMap<String, Object>) data.get("basicInfo");
-            setPersonBasicInfo(basicInfo);
+            setPersonBasicInfo(basicInfo, null, null);
             List<HashMap<String, Object>> userBinds = (List<HashMap<String, Object>>) basicInfo.get("userBinds");
             ArrayList<HashMap<String, Object>> otherInfo = (ArrayList<HashMap<String, Object>>) data.get("otherInfo");
             Map<String, Object> result = new HashMap<>();
-            result.put("basicInfo",data.get("basicInfo"));
+            result.put("basicInfo", data.get("basicInfo"));
             userBinds.forEach(bind -> {
                 otherInfo.stream()
                         .filter(info -> info.get("id").equals(bind.get("otherPersonId")))
                         .findFirst()
                         .ifPresent(info -> setLabel(info, (Integer) bind.get("otherPersonType")));
             });
-            otherInfo.forEach(bind ->{
-                switch(String.valueOf(bind.get("otherPersonType"))){
+            otherInfo.forEach(bind -> {
+                switch (String.valueOf(bind.get("otherPersonType"))) {
                     case "1":
                         setRegisteredPopulation(bind);
                         RegisteredPopulationInfo registeredPopulationInfo = JSONObject.toJavaObject(new JSONObject(bind), RegisteredPopulationInfo.class);
@@ -201,7 +194,7 @@ public class AppPersonBasicInfoController {
     /**
      * 数据格式转换,将JSONString类型替换为List
      */
-    private String dataToList(String json){
+    private String dataToList(String json) {
         JSONObject jsonObject = JSONObject.parseObject(json);
         Set<String> strings = jsonObject.keySet();
         JSONArray list = new JSONArray();
@@ -226,25 +219,59 @@ public class AppPersonBasicInfoController {
      * state = 2 通过,  state = 1 拒绝
      */
     @GetMapping("/PersonBasicInfo/delInfo")
-    public AjaxResult delInfo(@RequestParam("id") String id, @RequestParam("state") String state){
+    public AjaxResult delInfo(@RequestParam("id") String id, @RequestParam("state") String state) {
         return personBasicInfoService.delInfo(id, state);
     }
 
     /**
      * 设置人员基础信息字典值
      */
-    private void setPersonBasicInfo(HashMap<String, Object> basicInfo) {//0
-        Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);
-        basicInfo.put("genderLabel", getDictData(DictKeys.COMPREHENSIVE_SEX, String.valueOf(basicInfo.get("gender"))));//性别字典值
-        basicInfo.put("nationLabel", getDictData(DictKeys.COMPREHENSIVE_NATION, String.valueOf(basicInfo.get("nation"))));//民族字典值
-        basicInfo.put("maritalStatusLabel", getDictData(DictKeys.COMPREHENSIVE_MARITAL_STATUS, String.valueOf(basicInfo.get("maritalStatus"))));//婚姻状况字典值
-        basicInfo.put("educationLabel", getDictData(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, String.valueOf(basicInfo.get("education"))));//学历字典值
-        basicInfo.put("religiousBeliefLabel", null == basicInfo.get("religiousBelief") ? null : getDictData(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF, String.valueOf(basicInfo.get("religiousBelief"))));//宗教信仰字典值
-        basicInfo.put("politicalOutlookLabel", getDictData(DictKeys.COMPREHENSIVE_POLITICAL_STATUS, String.valueOf(basicInfo.get("politicalOutlook"))));//政治面貌字典值
-        basicInfo.put("occupationalCategoryLabel", getDictData(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY, String.valueOf(basicInfo.get("occupationalCategory"))));//职业类别字典值
-        basicInfo.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("householdRegistration"))));
-        basicInfo.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("nativePlace"))));
-        basicInfo.put("currentResidencePlaceLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("currentResidencePlace"))));
+    private void setPersonBasicInfo(HashMap<String, Object> basicInfo, Map<String, Map<String, Object>> dictMaps, Map<String, Object> cityMaps) {//0
+        if(StringUtils.isEmpty(dictMaps)){
+            String[] dictKeys = {
+                    COMPREHENSIVE_SEX, //性别
+                    COMPREHENSIVE_NATION, //民族
+                    COMPREHENSIVE_MARITAL_STATUS, //婚姻状况
+                    COMPREHENSIVE_EDUCATIONAL_BACKGROUND, //学历
+                    COMPREHENSIVE_RELIGIOUS_BELIEF, //宗教信仰
+                    COMPREHENSIVE_POLITICAL_STATUS, //政治面貌
+                    COMPREHENSIVE_OCCUPATIONAL_CATEGORY //职业类别
+            };
+            dictMaps = DictUtils.getDictCacheToMapByArray(dictKeys);
+        }
+        if(StringUtils.isEmpty(cityMaps)){
+            cityMaps = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);
+        }
+        basicInfo.put("genderLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_SEX).get(mapUtilsGetString(basicInfo, "gender")));//性别字典值
+        basicInfo.put("nationLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_NATION).get(mapUtilsGetString(basicInfo, "nation")));//民族字典值
+        basicInfo.put("maritalStatusLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_MARITAL_STATUS).get(mapUtilsGetString(basicInfo, "maritalStatus")));//婚姻状况字典值
+        basicInfo.put("educationLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_EDUCATIONAL_BACKGROUND).get(mapUtilsGetString(basicInfo, "education")));//学历字典值
+        basicInfo.put("religiousBeliefLabel", null == MapUtils.getString(basicInfo, "religiousBelief") ? null : MapUtils.getMap(dictMaps, COMPREHENSIVE_RELIGIOUS_BELIEF).get(MapUtils.getString(basicInfo, "religiousBelief")));//宗教信仰字典值
+        basicInfo.put("politicalOutlookLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_POLITICAL_STATUS).get(mapUtilsGetString(basicInfo, "politicalOutlook")));//政治面貌字典值
+        basicInfo.put("occupationalCategoryLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_OCCUPATIONAL_CATEGORY).get(mapUtilsGetString(basicInfo, "occupationalCategory")));//职业类别字典值
+        basicInfo.put("householdRegistrationLabel", cityMaps.get(mapUtilsGetString(basicInfo, "householdRegistration")));//户籍地 2260
+        basicInfo.put("nativePlaceLabel", cityMaps.get(mapUtilsGetString(basicInfo, "nativePlace")));//籍贯 2260
+        basicInfo.put("currentResidencePlaceLabel", cityMaps.get(mapUtilsGetString(basicInfo,"currentResidencePlace")));
+        basicInfo.put("isResidentLabel", "1".equals(MapUtils.getString(basicInfo, "isResident"))? "是":"否");
+    }
+
+    private void setDictValue(List<HashMap<String, Object>> rows){
+        String[] dictKeys = {
+                COMPREHENSIVE_SEX, //性别
+                COMPREHENSIVE_NATION, //民族
+                COMPREHENSIVE_MARITAL_STATUS, //婚姻状况
+                COMPREHENSIVE_EDUCATIONAL_BACKGROUND, //学历
+                COMPREHENSIVE_RELIGIOUS_BELIEF, //宗教信仰
+                COMPREHENSIVE_POLITICAL_STATUS, //政治面貌
+                COMPREHENSIVE_OCCUPATIONAL_CATEGORY //职业类别
+        };
+        Map<String, Map<String, Object>> dictMaps = DictUtils.getDictCacheToMapByArray(dictKeys);
+        Map<String, Object> cityMaps = getComprehensiveDictCacheToMap(COMPREHENSIVE_CITY_CODE);// 2260
+        if (null != rows && !rows.isEmpty()) {
+            for (HashMap<String, Object> row : rows) {
+                setPersonBasicInfo(row, dictMaps, cityMaps);
+            }
+        }
     }
 
     /**
@@ -354,11 +381,11 @@ public class AppPersonBasicInfoController {
      * 设置重点青少年字典值
      */
     private void setKeyYouth(HashMap<String, Object> json) {//10
-        json.put("personTypeLabel", null == json.get("personType") ? null : getDictData(DictKeys.COMPREHENSIVE_TYPE_OF_PERSON, String.valueOf(json.get("personType"))));//人员类型
-        json.put("familySituationLabel", getDictData(DictKeys.COMPREHENSIVE_FAMILY_INERTIA, String.valueOf(json.get("familySituation"))));//家庭情况
-        json.put("guardianRelationLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("guardianRelation"))));//与监护人关系
-        json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否违法犯罪
-        json.put("meansAssistanceLabel", getDictData(DictKeys.COMPREHENSIVE_MEANS_OF_HELP, String.valueOf(json.get("meansAssistance"))));//帮扶手段
+        json.put("personTypeLabel", null == json.get("personType") ? null : getDictData(COMPREHENSIVE_TYPE_OF_PERSON, mapUtilsGetString(json,"personType")));//人员类型
+        json.put("familySituationLabel", getDictData(COMPREHENSIVE_FAMILY_INERTIA, mapUtilsGetString(json,"familySituation")));//家庭情况
+        json.put("guardianRelationLabel", getDictData(COMPREHENSIVE_RELATION, mapUtilsGetString(json,"guardianRelation")));//与监护人关系
+        json.put("reoffendLabel", "1".equals(MapUtils.getString(json,"reoffend")) ? "是" : "否");//是否违法犯罪
+        json.put("meansAssistanceLabel", getDictData(COMPREHENSIVE_MEANS_OF_HELP, mapUtilsGetString(json,"meansAssistance")));//帮扶手段
     }
 
     private String getDictData(String dictKey, String value) {
@@ -369,53 +396,40 @@ public class AppPersonBasicInfoController {
         return DictUtils.getDictDataListByValue(dictKey, values);
     }
 
+    private String mapUtilsGetString(Map<String, Object> map, String key) {
+        return MapUtils.getString(map,key);
+    }
+
     /**
      * 查询其他人员类型列表
      */
     @GetMapping("/PersonBasicInfo/getOtherList")
-    public AjaxResult getOtherList(PersonBasicInfo personBasicInfo){
+    public AjaxResult getOtherList(PersonBasicInfo personBasicInfo) {
         PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        Integer delFlag = personBasicInfo.getDelFlag();
-        Integer personType = personBasicInfo.getPersonType();
-        List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType).getRows();
-        Map<String, Object> comprehensiveSexMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);//性别字典值
-        Map<String, Object> comprehensiveNationMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);//民族字典值
-        Map<String, Object> comprehensiveMaritalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_MARITAL_STATUS);//婚姻状况字典值
-        Map<String, Object> comprehensiveEducationalBackgroundMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);//学历字典值
-        Map<String, Object> comprehensiveReligiousBeliefMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF);//宗教信仰字典值
-        Map<String, Object> comprehensivePoliticalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);//政治面貌字典值
-        Map<String, Object> comprehensiveOccupationalCategoryMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY);//职业类别字典值
-        Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
-        if( null != rows && !rows.isEmpty()){
-            for (HashMap row : rows) {
-                row.put("genderLabel", comprehensiveSexMap.get(row.get("gender")));//性别字典值
-                row.put("nationLabel", comprehensiveNationMap.get(row.get("nation")));//民族字典值
-                row.put("maritalStatusLabel", comprehensiveMaritalStatusMap.get(row.get("maritalStatus")));//婚姻状况字典值
-                row.put("educationLabel", comprehensiveEducationalBackgroundMap.get(row.get("education")));//学历字典值
-                row.put("religiousBeliefLabel", null == row.get("religiousBelief") ? null : comprehensiveReligiousBeliefMap.get(row.get("religiousBelief")));//宗教信仰字典值
-                row.put("politicalOutlookLabel", comprehensivePoliticalStatusMap.get(row.get("politicalOutlook")));//政治面貌字典值
-                row.put("occupationalCategoryLabel", comprehensiveOccupationalCategoryMap.get(row.get("occupationalCategory")));//职业类别字典值
-                row.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(row.get("householdRegistration")));//户籍地 2260
-                row.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(row.get("nativePlace")));//籍贯 2260
-            }
-            return AjaxResult.success(rows);
-        }else{
-            return AjaxResult.error(500, "list is null!");
+        //noinspection unchecked
+        List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getOtherList(
+                pageDomain.getPageNum(),
+                pageDomain.getPageSize(),
+                personBasicInfo.getDelFlag(),
+                personBasicInfo.getPersonType(),
+                personBasicInfo.getTotal()
+        ).getRows();
+        if (null != rows && !rows.isEmpty()) {
+            setDictValue(rows);
         }
+        return AjaxResult.success(rows);
     }
 
     /**
      * 查询其他类型人员详情
      */
     @GetMapping("/PersonBasicInfo/getOtherEdit")
-    public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo){
+    public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo) {
         AjaxResult otherEdit = personBasicInfoService.getOtherEdit(otherPersonInfo.getBasicId(), otherPersonInfo.getPersonType());
-        if ("200".equals(otherEdit.get("code").toString())){
+        if ("200".equals(otherEdit.get("code").toString())) {
             Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
             HashMap<String, HashMap<String, Object>> data = (HashMap<String, HashMap<String, Object>>) otherEdit.get("data");
-            setPersonBasicInfo(data.get("basicInfo"));
+            setPersonBasicInfo(data.get("basicInfo"), null , null);
             if (!comprehensiveDictCacheToMap.isEmpty()) {
                 data.computeIfPresent("basicInfo", (key, basicInfo) -> {
                     basicInfo.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(basicInfo.get("householdRegistration")));// 户籍地 2260
@@ -423,7 +437,7 @@ public class AppPersonBasicInfoController {
                     return basicInfo;
                 });
             }
-            switch (otherPersonInfo.getPersonType()){
+            switch (otherPersonInfo.getPersonType()) {
                 case 1:
                     setRegisteredPopulation(data.get("otherInfo"));
                     data.put("registeredPopulation", data.remove("otherInfo"));
@@ -468,7 +482,7 @@ public class AppPersonBasicInfoController {
                     break;
             }
             return AjaxResult.success(data);
-        }else{
+        } else {
             return AjaxResult.error(otherEdit.get("code").toString(), otherEdit.get("msg"));
         }
     }
@@ -477,15 +491,13 @@ public class AppPersonBasicInfoController {
      * 查询全部有效的用户信息
      */
     @GetMapping("/PersonBasicInfo/getAllUserInfo")
-    public AjaxResult getAllUserInfo(PersonBasicInfo personBasicInfo){
+    public AjaxResult getAllUserInfo(PersonBasicInfo personBasicInfo) {
         PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        AjaxResult allUserInfo = personBasicInfoService.getAllUserInfo(personBasicInfo.getName(), pageNum, pageSize);
-        if (HttpStatus.SUCCESS == Integer.valueOf(allUserInfo.get("code").toString())){
+        AjaxResult allUserInfo = personBasicInfoService.getAllUserInfo(personBasicInfo.getName(), pageDomain.getPageNum(), pageDomain.getPageSize());
+        if (HttpStatus.SUCCESS == Integer.valueOf(allUserInfo.get("code").toString())) {
             Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
             List<Map<String, Object>> data = (List<Map<String, Object>>) allUserInfo.get("data");
-            if(null != data){
+            if (null != data) {
                 for (Map<String, Object> map : data) {
                     map.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(map.get("householdRegistration")));// 户籍地 2260
                     map.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(map.get("nativePlace")));// 籍贯 2260
@@ -493,8 +505,8 @@ public class AppPersonBasicInfoController {
                 }
             }
             return AjaxResult.success(allUserInfo.get("rows"));
-        }else{
-            return AjaxResult.error(allUserInfo.get("code").toString(),allUserInfo.get("msg"));
+        } else {
+            return AjaxResult.error(allUserInfo.get("code").toString(), allUserInfo.get("msg"));
         }
     }
 

+ 8 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java

@@ -1,5 +1,6 @@
 package com.sooka.sponest.mobile.remoteapi;
 
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -13,6 +14,7 @@ import com.sooka.sponest.mobile.base.domain.SysAttendance;
 import com.sooka.sponest.mobile.event.domain.SysUserSystem;
 import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteSystemBaseServiceFallbackFactory;
+import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
@@ -250,4 +252,10 @@ public interface RemoteSystemBaseService {
     @PostMapping("/dept/getDeptsByDeptType")
     @LogFeignCall
     AjaxResult getDeptsByDeptType(@RequestBody SysDept sysDept);
+
+    @GetMapping("/user/forceUpdatePwd/{username}")
+    AjaxResult forceUpdatePwd(@PathVariable("username")String username);
+
+    @PutMapping("/user/profile/updateAppPwd")
+    AjaxResult updatPwd(@RequestBody AppUpPwd appUpPwd);
 }

+ 13 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteSystemBaseServiceFallbackFactory.java

@@ -1,5 +1,6 @@
 package com.sooka.sponest.mobile.remoteapi.factory;
 
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -11,12 +12,14 @@ import com.ruoyi.system.api.model.LoginUser;
 import com.sooka.sponest.mobile.base.domain.SysAttendance;
 import com.sooka.sponest.mobile.event.domain.SysUserSystem;
 import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
+import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 import java.util.Map;
@@ -191,6 +194,16 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             public AjaxResult getDeptsByDeptType(SysDept sysDept) {
                 return null;
             }
+
+            @Override
+            public AjaxResult forceUpdatePwd(String username) {
+                return null;
+            }
+
+            @Override
+            public AjaxResult updatPwd(AppUpPwd appUpPwd) {
+                return null;
+            }
         };
     }
 

+ 7 - 0
src/main/java/com/sooka/sponest/mobile/system/login/controller/AppLoginController.java

@@ -1,8 +1,10 @@
 package com.sooka.sponest.mobile.system.login.controller;
 
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.redis.service.RedisService;
 import com.sooka.sponest.mobile.system.login.domain.AppLoginVO;
+import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import com.sooka.sponest.mobile.system.login.domain.SysMenuApp;
 import com.sooka.sponest.mobile.system.login.service.AppLoginService;
 import io.swagger.annotations.ApiOperation;
@@ -90,4 +92,9 @@ public class AppLoginController {
         return ajaxResult;
     }
 
+    @PostMapping("/updatePwd")
+    public AjaxResult updatePwd(@RequestBody AppUpPwd appUpPwd){
+        return appLoginService.updatePwd(appUpPwd);
+    }
+
 }

+ 1 - 0
src/main/java/com/sooka/sponest/mobile/system/login/domain/AppLoginBO.java

@@ -16,6 +16,7 @@ public class AppLoginBO {
     private String accessToken;
     private Userinfo userinfo;
     private ArrayList deptList;
+    private Boolean updatePwd;
 
     @Getter
     @Setter

+ 10 - 0
src/main/java/com/sooka/sponest/mobile/system/login/domain/AppUpPwd.java

@@ -0,0 +1,10 @@
+package com.sooka.sponest.mobile.system.login.domain;
+
+import lombok.Data;
+
+@Data
+public class AppUpPwd {
+    private String un;
+    private String op;
+    private String np;
+}

+ 4 - 0
src/main/java/com/sooka/sponest/mobile/system/login/service/AppLoginService.java

@@ -1,7 +1,9 @@
 package com.sooka.sponest.mobile.system.login.service;
 
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.mobile.system.login.domain.AppLoginVO;
+import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import com.sooka.sponest.mobile.system.login.domain.SysMenuApp;
 
 import javax.servlet.http.HttpServletRequest;
@@ -21,4 +23,6 @@ public interface AppLoginService {
     public AjaxResult selectRoleMenuVisuTreest();
 
     AjaxResult getAppChildrenMenuOrButtonByParentId(SysMenuApp sysMenuApp);
+
+    AjaxResult updatePwd(AppUpPwd appUpPwd);
 }

+ 9 - 2
src/main/java/com/sooka/sponest/mobile/system/login/service/impl/AppLoginServiceImpl.java

@@ -13,6 +13,7 @@ import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
 import com.sooka.sponest.mobile.remoteapi.domain.LoginBody;
 import com.sooka.sponest.mobile.system.login.domain.AppLoginBO;
 import com.sooka.sponest.mobile.system.login.domain.AppLoginVO;
+import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import com.sooka.sponest.mobile.system.login.domain.SysMenuApp;
 import com.sooka.sponest.mobile.system.login.service.AppLoginService;
 import org.slf4j.Logger;
@@ -58,6 +59,8 @@ public class AppLoginServiceImpl implements AppLoginService {
             if(StringUtils.isNotEmpty(appLoginVO.getDeviceid())){
                 remoteSystemBaseService.updateUserJg(appLoginVO.getUsername(),appLoginVO.getDeviceid());
             }
+            //
+            Boolean flag = Boolean.parseBoolean(remoteSystemBaseService.forceUpdatePwd(appLoginVO.getUsername()).get("data").toString());
             LoginBody loginBody = new LoginBody();
             loginBody.setUsername(appLoginVO.getUsername());
             loginBody.setPassword(appLoginVO.getPassword());
@@ -69,6 +72,7 @@ public class AppLoginServiceImpl implements AppLoginService {
                 AppLoginBO bo = JSON.parseObject(json, AppLoginBO.class);
                 ArrayList deptList = (ArrayList)((LinkedHashMap) remoteSystemBaseService.deptselector(bo.getUserinfo().getUsername()).get("data")).get("depts");
                 bo.setDeptList(deptList);
+                bo.setUpdatePwd(flag);
                 return AjaxResult.success(bo);
             }else{
                 return AjaxResult.error(map.getCode(),map.getMsg());
@@ -77,8 +81,6 @@ public class AppLoginServiceImpl implements AppLoginService {
             log.error(e.getMessage());
             return AjaxResult.error(R.FAIL,"登录失败");
         }
-
-
     }
 
     /**
@@ -114,4 +116,9 @@ public class AppLoginServiceImpl implements AppLoginService {
     public AjaxResult getAppChildrenMenuOrButtonByParentId(SysMenuApp sysMenuApp) {
         return remoteSystemBaseService.getAppChildrenMenuOrButtonByParentId(sysMenuApp.getParentId(),sysMenuApp.getMenuType());
     }
+
+    @Override
+    public AjaxResult updatePwd(AppUpPwd appUpPwd){
+        return remoteSystemBaseService.updatPwd(appUpPwd);
+    }
 }

+ 9 - 0
src/main/resources/banner.txt

@@ -0,0 +1,9 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
+
+  __________   ____ |  | _______          ____________   ____   ____   ____   _______/  |_
+
+ /  ___/  _ \ /  _ \|  |/ /\__  \        /  ___/\____ \ /  _ \ /    \_/ __ \ /  ___/\   __\
+ \___ (  <_> |  <_> )    <  / __ \_      \___ \ |  |_> >  <_> )   |  \  ___/ \___ \  |  |
+/____  >____/ \____/|__|_ \(____  /     /____  >|   __/ \____/|___|  /\___  >____  > |__|
+     \/                  \/     \/           \/ |__|               \/     \/     \/

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -21,4 +21,4 @@ spring:
         file-extension: yml
         # 共享配置
         shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}