|
@@ -12,6 +12,7 @@ import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.IdcardUtil;
|
|
|
+import cn.hutool.core.util.RandomUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
@@ -865,8 +866,15 @@ public class ApiController {
|
|
|
mapOne.put("deptName", sysDept.getName());
|
|
|
|
|
|
// 获取csm信息
|
|
|
- SysDeptCsm deptCsm = deptCsmService.getOne(Wrappers.<SysDeptCsm>lambdaQuery().eq(SysDeptCsm::getDeptId, sysU.getDeptId()));
|
|
|
- mapOne.put("csm", deptCsm);
|
|
|
+ List<SysDeptCsm> deptCsms = deptCsmService.list(Wrappers.<SysDeptCsm>lambdaQuery()
|
|
|
+ .eq(SysDeptCsm::getDeptId, sysU.getDeptId())
|
|
|
+ .isNotNull(SysDeptCsm::getCorpId)
|
|
|
+ .isNotNull(SysDeptCsm::getQrCodeId));
|
|
|
+ if (CollUtil.isNotEmpty(deptCsms)) {
|
|
|
+ // 如果有多个,随机获取一个
|
|
|
+ SysDeptCsm deptCsm = RandomUtil.randomEle(deptCsms);
|
|
|
+ mapOne.put("csm", deptCsm);
|
|
|
+ }
|
|
|
|
|
|
String management;
|
|
|
if (sysDept.getLevel() == 2) {
|