15928045575 2 лет назад
Родитель
Сommit
a12bc0371a

+ 2 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/entity/KwmAddress.java

@@ -60,6 +60,8 @@ public class KwmAddress implements Serializable {
      */
     private String cityName;
 
+
+
     /**
      * 详细地址
      */

+ 5 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/QueryByEntReqVo.java

@@ -25,4 +25,9 @@ public class QueryByEntReqVo implements Serializable {
      * 地址名
      */
     private String cityName;
+
+    /**
+     * 地址名
+     */
+    private String cityTrueName;
 }

+ 16 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java

@@ -27,9 +27,12 @@ import com.sckw.manage.model.entity.KwmAddress;
 import com.sckw.manage.model.vo.req.*;
 import com.sckw.manage.model.vo.res.AddressDetailResVo;
 import com.sckw.manage.model.vo.res.AddressQueryResVo;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -51,6 +54,9 @@ public class KwmAddressService {
 
     @Autowired
     private RemoteManageServiceImpl remoteManageService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteSystemService remoteSystemService;
     /**
      * @param reqVo 分页入参
      * @return HttpResult
@@ -341,9 +347,17 @@ public class KwmAddressService {
      */
     public List<AddressQueryResVo> queryByEnt(QueryByEntReqVo reqVo) {
         LambdaQueryWrapper<KwmAddress> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(KwmAddress::getEntId, reqVo.getId());
+        //wrapper.eq(KwmAddress::getEntId, reqVo.getId());
         wrapper.eq(KwmAddress::getDelFlag, Global.NO);
-
+        List<Long> ids = new ArrayList<>();
+        ids.add(reqVo.getId());
+        Map<Long, EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntTreeByIds(ids);
+        EntCacheResDto id = entCacheResDtos.get(reqVo.getId());
+        wrapper.eq(KwmAddress::getEntId, id.getId());
+        //entCacheResDtos.get();
+        if (StringUtils.isNotBlank(reqVo.getCityTrueName())) {
+            wrapper.and(wp -> wp.eq(KwmAddress::getName, reqVo.getCityTrueName()));
+        }
         if (StringUtils.isNotBlank(reqVo.getCityName())) {
             wrapper.and(wp -> wp.like(KwmAddress::getCityName, reqVo.getCityName()).or().
                     like(KwmAddress::getDetailAddress, reqVo.getCityName()));

+ 9 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsRoleService.java

@@ -8,6 +8,7 @@ import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
+import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.IdWorker;
 import com.sckw.core.utils.StringUtils;
@@ -258,6 +259,14 @@ public class KwsRoleService {
         roleBindMenuReqVo.setEntId(kwsDept.getEntId());
         roleBindMenuReqVo.setMenuIds(reqVo.getMenuIds());
         kwsMenuService.roleBindMenu(roleBindMenuReqVo);
+        //修改权限名称与备注信息
+        KwsRole kwsRoleTable = new KwsRole();
+        kwsRoleTable.setId(reqVo.getId());
+        kwsRoleTable.setName(reqVo.getName());
+        kwsRoleTable.setRemark(reqVo.getRemark());
+        if (kwsRoleDao.update(kwsRoleTable) <= 0) {
+            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
+        }
 //        List<KwsUser> kwsUsers = kwsUserDao.selectByRoleIds(Collections.singletonList(reqVo.getId()));
 //
 //        //删除以前的角色