|
|
@@ -17,10 +17,10 @@ import com.jzg.commons.entity.vo.SysSystemPermsVo;
|
|
|
import com.jzg.commons.entity.vo.SysSystemVo;
|
|
|
import com.jzg.commons.entity.vo.UpAndDownVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
-import com.jzg.commons.util.AssertionUtils;
|
|
|
import com.jzg.commons.util.MinioUtils;
|
|
|
import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.mapper.*;
|
|
|
+import com.jzg.service.SysAreaBService;
|
|
|
import com.jzg.service.SysSystemService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -62,6 +62,8 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
|
|
|
private SysUserPlateInfoMapper sysUserPlateInfoMapper;
|
|
|
@Value("${minio.bucket-name}")
|
|
|
private String bucketName;
|
|
|
+ @Autowired
|
|
|
+ private SysAreaBService sysAreaService;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@@ -223,7 +225,22 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
|
|
|
int count = deptMap.get(sysSystem.getSysCode()).size();
|
|
|
sysSystem.setDeptCount(count);
|
|
|
}
|
|
|
+
|
|
|
+ List<String> areas = new ArrayList<>();
|
|
|
+ areas.add(sysSystem.getProvinceId());
|
|
|
+ areas.add(sysSystem.getCityId());
|
|
|
+ areas.add(sysSystem.getDistrictId());
|
|
|
+ List<SysArea> sysAreaVos = sysAreaService.queryAllByAreaCode(areas);
|
|
|
+ String areaString = "";
|
|
|
+ for(int i=0;i<sysAreaVos.size();i++){
|
|
|
+ areaString = areaString + sysAreaVos.get(i).getAreaCname() + "-";
|
|
|
+ }
|
|
|
+ if(areaString.length()>0) {
|
|
|
+ sysSystem.setDivision(areaString.substring(0, areaString.length() - 1));
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
return sysPage;
|
|
|
}
|
|
|
@@ -239,6 +256,19 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
|
|
|
vo.setSysIconUrl(MinioUtils.getPresignedObjectUrl(bucketName,files.getFileName()));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ List<String> areas = new ArrayList<>();
|
|
|
+ areas.add(vo.getProvinceId());
|
|
|
+ areas.add(vo.getCityId());
|
|
|
+ areas.add(vo.getDistrictId());
|
|
|
+ List<SysArea> sysAreaVos = sysAreaService.queryAllByAreaCode(areas);
|
|
|
+ String areaString = "";
|
|
|
+ for(int i=0;i<sysAreaVos.size();i++){
|
|
|
+ areaString = areaString + sysAreaVos.get(i).getAreaCname() + "-";
|
|
|
+ }
|
|
|
+ if(areaString.length()>0) {
|
|
|
+ vo.setDivision(areaString.substring(0, areaString.length() - 1));
|
|
|
+ }
|
|
|
SysUser user = sysUserMapper.selectById(system.getUserId());
|
|
|
vo.setUserName(user.getUsername());
|
|
|
vo.setUserAccount(user.getMobile());
|