|
@@ -12,10 +12,7 @@ import com.management.platform.entity.*;
|
|
|
import com.management.platform.entity.vo.DdLeaveQtVo;
|
|
|
import com.management.platform.entity.vo.SysRichFunction;
|
|
|
import com.management.platform.mapper.*;
|
|
|
-import com.management.platform.service.CompanyDingdingService;
|
|
|
-import com.management.platform.service.DingDingService;
|
|
|
-import com.management.platform.service.ExcelExportService;
|
|
|
-import com.management.platform.service.UserYearleaveSettingService;
|
|
|
+import com.management.platform.service.*;
|
|
|
import com.management.platform.service.impl.ProjectServiceImpl;
|
|
|
import com.management.platform.util.HttpRespMsg;
|
|
|
import com.management.platform.util.ListUtil;
|
|
@@ -69,6 +66,8 @@ public class UserYearleaveSettingController {
|
|
|
private SysFunctionMapper sysFunctionMapper;
|
|
|
@Resource
|
|
|
private WxCorpInfoMapper wxCorpInfoMapper;
|
|
|
+ @Resource
|
|
|
+ private DepartmentService departmentService;
|
|
|
|
|
|
@Value(value = "${upload.path}")
|
|
|
private String path;
|
|
@@ -213,18 +212,6 @@ public class UserYearleaveSettingController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //递归获取企业微信所有上级部门字符串,格式:"上级部门/上级部门/部门"
|
|
|
- private String getWxDepartment(Department department) {
|
|
|
- String depHierarchy = "$departmentName="+department.getCorpwxDeptid()+"$";
|
|
|
- //搜到父部门进行添加
|
|
|
- if (department.getCorpwxDeptpid()==null || department.getCorpwxDeptpid()==1) {
|
|
|
- return depHierarchy;
|
|
|
- }else{
|
|
|
- Department supDep = departmentMapper.selectOne(new QueryWrapper<Department>().eq("corpwx_deptid",department.getCorpwxDeptpid()).eq("company_id",department.getCompanyId()));
|
|
|
- return getWxDepartment(supDep) + "/" + depHierarchy;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//导出剩余假期
|
|
|
@RequestMapping("/exportDingDingLeaveQt")
|
|
|
public HttpRespMsg exportDingDingLeaveQt(DdLeaveQtVo ddLeaveQtVo){
|
|
@@ -241,7 +228,7 @@ public class UserYearleaveSettingController {
|
|
|
List<User> user = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
|
|
|
List<HashMap<String,Object>> deptMap = new ArrayList<>();
|
|
|
for (Department department : deptName) {
|
|
|
- department.setDepartmentName(getSupDepartment(department));
|
|
|
+ department.setDepartmentName(departmentService.getSupDepartment(department,deptName));
|
|
|
for (User userItem : user) {
|
|
|
if (userItem.getDepartmentId().equals(department.getDepartmentId())){
|
|
|
HashMap<String, Object> mapItem = new HashMap<>();
|