|
|
@@ -91,6 +91,11 @@ public class CommonBLOimpl extends BLOImpl implements CommonBLO {
|
|
|
public Map<String, Object> getNums() {
|
|
|
Map<String, Object> numMap = new HashMap<>();
|
|
|
CurrentUser currentUser = getCurrentUser();
|
|
|
+ // 安全获取用户ID
|
|
|
+ if (currentUser == null || StringUtils.isBlank(currentUser.getUserid())) {
|
|
|
+ numMap.put("rc", "0");
|
|
|
+ return numMap;
|
|
|
+ }
|
|
|
String userid = currentUser.getUserid();
|
|
|
//待办事项个数
|
|
|
int grdb = VSSgDictMapper.getDnnums(userid);
|
|
|
@@ -101,28 +106,30 @@ public class CommonBLOimpl extends BLOImpl implements CommonBLO {
|
|
|
// 获取操作人的组织机构,行政区划
|
|
|
VRsSyOrgAreaPO orgareapo = vRsSyOrgAreaMapper.selectOne(new QueryWrapper<VRsSyOrgAreaPO>()
|
|
|
.eq("user_id", userid));
|
|
|
- String orgid = orgareapo.getOrgid();
|
|
|
- String areaid = orgareapo.getAreaid();
|
|
|
- long totalcnt = 0;
|
|
|
- // 日程个数--个人日程
|
|
|
- if (StringUtils.isNotBlank(userid)) {
|
|
|
- long grrccnt = vRsSyRcglMapper.selectCount(new QueryWrapper<VRsSyRcglPO>()
|
|
|
- .apply("to_date(rcsj,'YY-MM-DD HH24:MI:SS')>sysdate"));
|
|
|
- totalcnt = totalcnt + grrccnt;
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(orgid)) {
|
|
|
- // 日程个数--同科室
|
|
|
- long ksrccnt = vSsSyRcglOrgMapper.selectCount(new QueryWrapper<VSsSyRcglOrgPO>()
|
|
|
- .apply("to_date(rcsj,'YY-MM-DD HH24:MI:SS')>sysdate"));
|
|
|
- totalcnt = totalcnt + ksrccnt;
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(areaid)) {
|
|
|
- // 日程个数--全局
|
|
|
- long qjrccnt = vRrsSyRcglAreaMapper.selectCount(new QueryWrapper<VRrsSyRcglAreaPO>()
|
|
|
- .apply("to_date(rcsj,'YY-MM-DD HH24:MI:SS')>sysdate"));
|
|
|
- totalcnt = totalcnt + qjrccnt;
|
|
|
+ if (orgareapo != null) {
|
|
|
+ String orgid = orgareapo.getOrgid();
|
|
|
+ String areaid = orgareapo.getAreaid();
|
|
|
+ long totalcnt = 0;
|
|
|
+ // 日程个数--个人日程
|
|
|
+ if (StringUtils.isNotBlank(userid)) {
|
|
|
+ long grrccnt = vRsSyRcglMapper.selectCount(new QueryWrapper<VRsSyRcglPO>()
|
|
|
+ .apply("to_date(rcsj,'YY-MM-DD HH24:MI:SS')>sysdate"));
|
|
|
+ totalcnt = totalcnt + grrccnt;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(orgid)) {
|
|
|
+ // 日程个数--同科室
|
|
|
+ long ksrccnt = vSsSyRcglOrgMapper.selectCount(new QueryWrapper<VSsSyRcglOrgPO>()
|
|
|
+ .apply("to_date(rcsj,'YY-MM-DD HH24:MI:SS')>sysdate"));
|
|
|
+ totalcnt = totalcnt + ksrccnt;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(areaid)) {
|
|
|
+ // 日程个数--全局
|
|
|
+ long qjrccnt = vRrsSyRcglAreaMapper.selectCount(new QueryWrapper<VRrsSyRcglAreaPO>()
|
|
|
+ .apply("to_date(rcsj,'YY-MM-DD HH24:MI:SS')>sysdate"));
|
|
|
+ totalcnt = totalcnt + qjrccnt;
|
|
|
+ }
|
|
|
+ numMap.put("rc", totalcnt + "");
|
|
|
}
|
|
|
- numMap.put("rc", totalcnt + "");
|
|
|
return numMap;
|
|
|
}
|
|
|
|