Browse Source

更改bug

xie.kaifeng 7 tháng trước cách đây
mục cha
commit
10e48d7e86

+ 5 - 5
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/CommonController.java

@@ -126,7 +126,7 @@ public class CommonController {
             }
             return iCommonService.queryOrganSelect(vo, request);
         } catch (Exception e) {
-            log.error("机构下拉查询加载 会员、经纪人信息失败,失败原因:"  + Arrays.toString(e.getStackTrace()));
+            log.error("机构下拉查询加载 会员、经纪人信息失败,失败原因:" + Arrays.toString(e.getStackTrace()));
             return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
@@ -136,7 +136,7 @@ public class CommonController {
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult<OrganSelectResult> queryExchSonOrgin(OrganSelectParam vo, HttpServletRequest request) {
         log.debug("vo.parentuserid={}", vo.getParentuserid());
-        return iCommonService.queryExchSonOrgin(vo,request);
+        return iCommonService.queryExchSonOrgin(vo, request);
     }
 
     @ApiOperation("获取省、市、县信息")
@@ -319,8 +319,8 @@ public class CommonController {
     @ApiOperation("子机构管理-->获取机构及所有子机构")
     @RequestMapping(method = RequestMethod.GET, value = "/getAreaAndAllChilds")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<UserAccountRspResult> getAreaAndAllChilds(HttpServletRequest request) {
-        return iOrganSonService.getAreaAndAllChilds(request);
+    private AjaxResult<UserAccountRspResult> getAreaAndAllChilds(HttpServletRequest request, Long areauserid) {
+        return iOrganSonService.getAreaAndAllChilds(request, areauserid);
     }
 
     @ApiOperation("子机构管理-->获取机构及所有子机构")
@@ -408,7 +408,7 @@ public class CommonController {
         return iCommonService.queryTAAccountList(param, request);
     }
 
-    @RequestMapping(method = RequestMethod.GET, value ="/common/queryOrganSelectRole")
+    @RequestMapping(method = RequestMethod.GET, value = "/common/queryOrganSelectRole")
     @ApiOperation("按角色加载机构")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult<OrganSelectResult> queryOrganSelectRole(OrganSelectParam vo, HttpServletRequest request) {

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IOrganSonService.java

@@ -13,7 +13,7 @@ public interface IOrganSonService {
 
     PageResult<UserAccountRspResult> querySon(UserAccountReqParam param, HttpServletRequest request);
 
-    AjaxResult<UserAccountRspResult> getAreaAndAllChilds(HttpServletRequest request);
+    AjaxResult<UserAccountRspResult> getAreaAndAllChilds(HttpServletRequest request,Long areauserid);
 
     AjaxResult<OrganSonDetailResult> viewson(Long areaid, Integer modifystatus, HttpServletRequest request);
 

+ 7 - 4
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/OrganSonServiceService.java

@@ -133,9 +133,12 @@ public class OrganSonServiceService implements IOrganSonService {
     }
 
     @Override
-    public AjaxResult<UserAccountRspResult> getAreaAndAllChilds(HttpServletRequest request) {
+    public AjaxResult<UserAccountRspResult> getAreaAndAllChilds(HttpServletRequest request, Long userid) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        List<UserAccountRspResult> result = iUseraccountMapper.getAreaAndAllChilds(systemmanager.getAreauserid());
+        if (systemmanager.getReletype() != 1) {
+            userid = systemmanager.getAreauserid();
+        }
+        List<UserAccountRspResult> result = iUseraccountMapper.getAreaAndAllChilds(userid);
         for (UserAccountRspResult userAccountVo : result) {
             //最大层级数
             Object maxLev = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, "069");
@@ -1275,7 +1278,7 @@ public class OrganSonServiceService implements IOrganSonService {
         UserAccountDetailVo userAccountDetailVo = iUseraccountMapper.selectNewDetail(userid);
         detailResult.setUserAccountDetailVo(userAccountDetailVo);
         UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoNewDetail(userid);
-        userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName()+userinfoDetailVo.getPathName());
+        userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName() + userinfoDetailVo.getPathName());
         detailResult.setUserinfoDetailVo(userinfoDetailVo);
         return detailResult;
     }
@@ -1285,7 +1288,7 @@ public class OrganSonServiceService implements IOrganSonService {
         UserAccountDetailVo userAccountDetailVo = iUseraccountMapper.selectDetail(userid);
         detailResult.setUserAccountDetailVo(userAccountDetailVo);
         UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoDetail(userid);
-        userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName()+userinfoDetailVo.getPathName());
+        userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName() + userinfoDetailVo.getPathName());
         detailResult.setUserinfoDetailVo(userinfoDetailVo);
         //开户地址
         if (userAccountDetailVo.getUsertype() != 5) {