Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
niohe·erbao 1 year ago
parent
commit
96872e2849
7 changed files with 25 additions and 17 deletions
  1. +8
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  2. +0
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml
  4. +6
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/user/entity/enumeration/RoleEnum.java
  5. +10
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java
  6. BIN
      template/丽水市2023年数字化项目年度计划编辑表(空).xls
  7. BIN
      template/丽水市2023年数字化项目年度计划编辑表.xls

+ 8
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java View File

@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
@@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
@@ -288,7 +290,7 @@ public class AnnualPlanLibManage {
return project;
}).collect(Collectors.toList());
// 保存到项目库中
projectService.saveBatch(projectList);
projectService.saveOrUpdateBatch(projectList);

// 筛选出导入的续建项目
List<AnnualLibImportDTO> continuedList = list.stream()
@@ -414,9 +416,9 @@ public class AnnualPlanLibManage {
temp.setSheetName(new String[] {"实施类(新建)", "实施类(续建)"});
Map<String, Object> map = new HashMap<>(4);
map.put("mapList", list);
map.put("mapList1", null);
map.put("mapList1", Lists.newArrayList());
Workbook workbook = ExcelExportUtil.exportExcel(temp, map);
if (workbook == null) {
if (CollUtil.isEmpty(list)) {
// 输出空模板
// 获取本地目录的年度计划编辑表空Excel模板
String emptyTemplate = "丽水市" + year + "年数字化项目年度计划编辑表(空)";
@@ -443,6 +445,9 @@ public class AnnualPlanLibManage {
}
return;
}
if (workbook == null){
throw new BizException("读取编辑表模板失败!");
}
// 重置响应对象
response.reset();
try {


+ 0
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -805,7 +805,6 @@ public class TodoCenterManage {
req.setUserId(String.valueOf(userId));
req.setEmployeeCode(employeeCode);
req.setInstCodes(instCodes);
BeanUtils.copyProperties(param,req);
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(req);

if (CollUtil.isEmpty(ccMeList)) {
@@ -874,7 +873,6 @@ public class TodoCenterManage {
req.setUserId(String.valueOf(userId));
req.setEmployeeCode(employeeCode);
req.setInstCodes(instCodes);
BeanUtils.copyProperties(param,req);
ccMeList = processInstanceService.getCcMeList(req);
}



+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml View File

@@ -70,6 +70,6 @@
count(0) ccmeNum
FROM
wflow_cc_tasks cc
where cc.employee_code = #{employeeCode}
where cc.user_id = #{employeeCode}
</select>
</mapper>

+ 6
- 6
pmapi/src/main/java/com/ningdatech/pmapi/user/entity/enumeration/RoleEnum.java View File

@@ -20,19 +20,19 @@ public enum RoleEnum {
/**
* 系统角色枚举
*/
NORMAL_MEMBER("普通用户", 6),
NORMAL_MEMBER("普通用户", 7),

EXPERT("专家", 5),
EXPERT("专家", 6),

COMPANY_MANAGER("单位管理员", 4),
COMPANY_MANAGER("单位管理员", 5),

EXPERT_ADMIN("专家管理员", 2),
EXPERT_ADMIN("专家管理员", 3),

REGION_MANAGER("区域管理员", 3),
REGION_MANAGER("区域管理员", 4),

SUPER_ADMIN("超级管理员", 1),

VISITOR("访客", 7),
VISITOR("访客", 2),

DASHBOARD("工作台", 8);



+ 10
- 5
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java View File

@@ -1,7 +1,6 @@
package com.ningdatech.pmapi.user.manage;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -208,7 +207,7 @@ public class UserInfoManage {
return new ArrayList<>();
}
return iUserInfoService.list(Wrappers.lambdaQuery(UserInfo.class)
.in(UserInfo::getId, compliantUserIdList))
.in(UserInfo::getId, compliantUserIdList))
.stream().map(UserInfo::getId).collect(Collectors.toList());

}
@@ -315,8 +314,8 @@ public class UserInfoManage {
}
userId = generateUserId(employeeCode);
}

UserInfo userInfo = iUserInfoService.getById(userId);
String oldUserStatus = userInfo.getAvailable();
// 绑定用户手机号
bandUserMobile(userInfo, reqUserDetailEditPO);

@@ -337,8 +336,14 @@ public class UserInfoManage {
}).collect(Collectors.toList());
iUserRoleService.saveBatch(userRoleList);
}
// 刷新用户权限
userAuthManage.refreshSession(userId);
// 刷新用户权限 仅原状态为正常才需要刷新session
if ("ENABLE".equals(oldUserStatus)) {
if (oldUserStatus.equals(userInfo.getAvailable())) {
userAuthManage.refreshSession(userId);
} else {
userAuthManage.kickOff(userId);
}
}
}

/**


BIN
template/丽水市2023年数字化项目年度计划编辑表(空).xls View File


BIN
template/丽水市2023年数字化项目年度计划编辑表.xls View File


Loading…
Cancel
Save