|
@@ -240,6 +240,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
private SapProjectServiceService sapProjectServiceService;
|
|
|
@Resource
|
|
|
private HolidaySettingService holidaySettingService;
|
|
|
+ @Resource
|
|
|
+ private CompanyDingdingMapper companyDingdingMapper;
|
|
|
|
|
|
@Value(value = "${upload.path}")
|
|
|
private String path;
|
|
@@ -1575,6 +1577,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
finalDeptIds = deptIds;
|
|
|
}
|
|
|
List<Map<String, Object>> membList = projectMapper.getProjectCost(companyId,startDate, endDate, curProjectId,stateKey, userIdList,finalDeptIds,filterDeptIds, true);
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
|
|
|
map.put("membList", membList);
|
|
|
for (Map<String, Object> membMap : membList) {
|
|
|
double pTotalTime = 0;
|
|
@@ -1600,6 +1603,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}else {
|
|
|
membRowData.add((String)("$departmentName="+membMap.get("corpwxDeptId")+"$"));
|
|
|
}
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ membRowData.add((String)("$userName="+membMap.get("name")+"$"));
|
|
|
+ if(membMap.get("departmentName").equals("未分配")){
|
|
|
+ membRowData.add("未分配");
|
|
|
+ }else {
|
|
|
+ membRowData.add((String)("$departmentName="+membMap.get("corpDdDeptId")+"$"));
|
|
|
+ }
|
|
|
}else {
|
|
|
membRowData.add((String)membMap.get("name"));
|
|
|
membRowData.add((String)membMap.get("departmentName"));
|
|
@@ -1656,6 +1666,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User targetUser = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = targetUser.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
//当前用户管理部门
|
|
|
List<Integer> deptIds=null;
|
|
@@ -1901,12 +1912,17 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
membRowData.add("未分配");
|
|
|
}else {
|
|
|
membRowData.add(departmentService.exportWxDepartment(dept,allDepartmentList));
|
|
|
-// membRowData.add((String)("$departmentName="+membMap.get("corpwxDeptId")+"$"));
|
|
|
+ }
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ membRowData.add((String)("$userName="+membMap.get("name")+"$"));
|
|
|
+ if(membMap.get("departmentName").equals("未分配")){
|
|
|
+ membRowData.add("未分配");
|
|
|
+ }else {
|
|
|
+ membRowData.add(departmentService.exportDdDepartment(dept,allDepartmentList));
|
|
|
}
|
|
|
}else {
|
|
|
membRowData.add((String)membMap.get("name"));
|
|
|
membRowData.add(departmentService.getSupDepartment(dept,allDepartmentList));
|
|
|
-// membRowData.add((String)membMap.get("departmentName"));
|
|
|
}
|
|
|
String creatorId = (String)membMap.get("creatorId");
|
|
|
User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
|
|
@@ -2061,6 +2077,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}else {
|
|
|
membRowData.add("");
|
|
|
}
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ membRowData.add((String)("$userName="+user.getName()+"$"));
|
|
|
+ if(first.isPresent()){
|
|
|
+ membRowData.add((String)("$departmentName="+first.get().getDdDeptid()+"$"));
|
|
|
+ }else {
|
|
|
+ membRowData.add("");
|
|
|
+ }
|
|
|
}else {
|
|
|
membRowData.add(user.getName());
|
|
|
if(first.isPresent()){
|
|
@@ -2174,7 +2197,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
fileName = MessageUtils.message("fileName.projectCost")+System.currentTimeMillis();
|
|
|
}
|
|
|
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
|
|
|
} catch (NullPointerException e) {
|
|
|
e.printStackTrace();
|
|
|
//httpRespMsg.setError("验证失败");
|
|
@@ -2743,6 +2766,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User user = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
|
|
|
//判断用户的角色,如果是管理员和负责人,查看全部的。如果是普通员工,只能是看到参与的项目
|
|
|
QueryWrapper<Project> queryWrapper = new QueryWrapper<Project>().eq("company_id", companyId);
|
|
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
@@ -2768,6 +2792,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User incharger = first.get();
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
data.add("$userName="+incharger.getCorpwxUserid()+"$");
|
|
|
+ }if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ data.add("$userName="+incharger.getDingdingUserid()+"$");
|
|
|
}else {
|
|
|
data.add(incharger.getName());
|
|
|
}
|
|
@@ -2792,7 +2818,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目报表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.projectReport")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -2856,6 +2882,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User user = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
|
|
|
QueryWrapper<Project> queryWrapper = new QueryWrapper<Project>().eq("company_id", companyId);
|
|
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
@@ -2916,7 +2943,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
data.add(task.get("group_real_hours") == null?"":task.get("group_real_hours").toString());
|
|
|
}
|
|
|
data.add(task.get("name") != null?task.get("name").toString():"");
|
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ if((wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1)||(dingding!=null&&dingding.getSyncContact()==1)){
|
|
|
String userName = "";
|
|
|
if(task.get("executor_id") != null){
|
|
|
String[] executorIds = task.get("executor_id").toString().split(",");
|
|
@@ -2924,7 +2951,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
String executorId = executorIds[i];
|
|
|
Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(executorId)).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
- userName += "$userName="+(first.get().getCorpwxUserid() == null?"":first.get().getCorpwxUserid())+"$";
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ userName += "$userName="+(first.get().getCorpwxUserid() == null?"":first.get().getCorpwxUserid())+"$";
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ userName += "$userName="+(first.get().getDingdingUserid() == null?"":first.get().getDingdingUserid())+"$";
|
|
|
+ }
|
|
|
if (i < executorIds.length - 1){
|
|
|
userName += ",";
|
|
|
}
|
|
@@ -2945,7 +2976,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目任务报表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.projectTaskReport")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -2959,6 +2990,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User user = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
|
|
|
|
|
|
//该公司下的allday
|
|
@@ -3055,7 +3087,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目任务报表_"+System.currentTimeMillis();
|
|
|
String fileName = "预估工时表"+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
httpRespMsg.setError(e.getMessage());
|
|
@@ -3144,6 +3176,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User user = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
|
|
|
List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
|
|
|
List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目任务报表");
|
|
@@ -3209,7 +3242,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目成本报表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.projectCostReport")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -3297,6 +3330,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
Company company = companyMapper.selectById(companyId);
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
|
|
|
List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
|
|
|
List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目任务报表");
|
|
@@ -3397,7 +3431,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目收支平衡报表(利润表)_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.profitSta")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -3412,6 +3446,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User user = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
List<CustomerProject> projectList = projectMapper.getCustomerProjectInAndOut(companyId, null, null,null,null);
|
|
|
List<List<String>> exportList = new ArrayList<>();
|
|
|
//String[] titles = {"客户名称", "相关项目", "合同金额", "人工成本", "一般费用", "差旅费用","外包费用", "总费用", "利润", "利润率"};
|
|
@@ -3470,7 +3505,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "客户项目利润报表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.cusPro")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -4014,7 +4049,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目阶段工时报表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.ProPeriodWork")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList2(null,fileName, dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList2(null,null,fileName, dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -4094,6 +4129,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id",user.getCompanyId()));
|
|
|
TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
|
|
|
List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全公司加班情况");
|
|
|
List<SysRichFunction> functionDeptList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责部门加班情况");
|
|
@@ -4169,6 +4205,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
rowData.add("$userName="+(map.get("corpwxUserId")==null?"":map.get("corpwxUserId"))+"$");
|
|
|
rowData.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
|
|
|
rowData.add("$departmentName="+(map.get("corpwxDeptId")==null?"":map.get("corpwxDeptId"))+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ rowData.add("$userName="+(String)map.get("username")+"$");
|
|
|
+ rowData.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
|
|
|
+ rowData.add("$departmentName="+rowData.add((String)map.get("departmentName"))+"$");
|
|
|
}else {
|
|
|
rowData.add((String)map.get("username"));
|
|
|
rowData.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
|
|
@@ -4311,6 +4351,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
rowData.add(""+seq);
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
rowData.add("$userName="+(map.get("corpwxUserId")==null?"":map.get("corpwxUserId"))+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ rowData.add("$userName="+(String)map.get("username")+"$");
|
|
|
}else {
|
|
|
rowData.add((String)map.get("username"));
|
|
|
}
|
|
@@ -4345,7 +4387,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
sheetNames[1] = MessageUtils.message("Statistics.ByPro");
|
|
|
sheetNames[2] = MessageUtils.message("Statistics.ByPeople");
|
|
|
try {
|
|
|
- return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,fileName , totalList, path, sheetNames);
|
|
|
+ return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , totalList, path, sheetNames);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -6394,6 +6436,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<String> nameList= (List<String>) resultMap.get("nameList");
|
|
|
Company company = companyMapper.selectById(user.getCompanyId());
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", company.getId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", company.getId()));
|
|
|
List<ProjectCustom> projectCustomList = projectCustomMapper.selectList(new QueryWrapper<ProjectCustom>().eq("company_id", company.getId()));
|
|
|
List<ProjectCustom> customList = projectCustomList.stream().filter(pl -> pl.getCustomType() != 1).collect(Collectors.toList());
|
|
|
TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
|
|
@@ -6517,10 +6560,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//rowData.add(("1".equals(projectVO.getIsPublic())?"是":"否"));
|
|
|
rowData.add(("1".equals(projectVO.getIsPublic())?MessageUtils.message("excel.yes"):MessageUtils.message("excel.no")));
|
|
|
rowData.add(projectVO.getProjectName());
|
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ if((wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1)||(dingding!=null&&dingding.getSyncContact()==1)){
|
|
|
if(projectVO.getInchargerId()!=null){
|
|
|
User us = userList.stream().filter(ul -> ul.getId().equals(projectVO.getInchargerId())).findFirst().get();
|
|
|
- rowData.add("$userName="+us.getCorpwxUserid()+"$");
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ rowData.add("$userName="+us.getCorpwxUserid()+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ rowData.add("$userName="+us.getDingdingUserid()+"$");
|
|
|
+ }
|
|
|
}else {
|
|
|
rowData.add("");
|
|
|
}
|
|
@@ -6536,6 +6583,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}else {
|
|
|
names+="$userName="+(participator.get(i).getCorpwxUserId())+"$"+",";
|
|
|
}
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ if(i==participator.size()-1){
|
|
|
+ names+="$userName="+(participator.get(i).getName())+"$";
|
|
|
+ }else {
|
|
|
+ names+="$userName="+(participator.get(i).getName())+"$"+",";
|
|
|
+ }
|
|
|
}else {
|
|
|
if(i==participator.size()-1){
|
|
|
names+=participator.get(i).getName();
|
|
@@ -6549,10 +6602,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
rowData.add(start==null?"":sdf.format(start));
|
|
|
LocalDate end = projectVO.getPlanEndDate();
|
|
|
rowData.add(end==null?"":sdf.format(end));
|
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ if((wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1)||(dingding!=null&&dingding.getSyncContact()==1)){
|
|
|
Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(projectVO.getCreatorId())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
- rowData.add("$userName="+(first.get().getCorpwxUserid()==null?"":first.get().getCorpwxUserid())+"$");
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ rowData.add("$userName="+(first.get().getCorpwxUserid()==null?"":first.get().getCorpwxUserid())+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ rowData.add("$userName="+(first.get().getDingdingUserid()==null?"":first.get().getDingdingUserid())+"$");
|
|
|
+ }
|
|
|
}else {
|
|
|
rowData.add("");
|
|
|
}
|
|
@@ -6695,7 +6752,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目导出_"+company.getCompanyName()+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.proExport")+company.getCompanyName()+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList,path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,allList,path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -6707,6 +6764,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
//获取全部用户
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").eq("company_id", user.getCompanyId()));
|
|
|
String projectCategorySub=null;
|
|
@@ -6799,7 +6857,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目分组_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.proGroup")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -6845,6 +6903,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
try {
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
|
|
|
TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
|
List<String> headList = new ArrayList<String>();
|
|
@@ -6893,6 +6952,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
String s = String.valueOf(membMap.get("corpwxDeptId") == null ? "" : membMap.get("corpwxDeptId"));
|
|
|
membRowData.add("$departmentName=" + s + "$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(membMap.get("creatorId"))).findFirst();
|
|
|
+ if(first.isPresent()){
|
|
|
+ membRowData.add("$userName="+first.get().getDingdingUserid()+"$");
|
|
|
+ }else {
|
|
|
+ membRowData.add("");
|
|
|
+ }
|
|
|
+ membRowData.add("$departmentName=" + (String)membMap.get("departmentName") + "$");
|
|
|
}else {
|
|
|
membRowData.add((String)membMap.get("name"));
|
|
|
membRowData.add((String)membMap.get("departmentName"));
|
|
@@ -6936,7 +7003,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = timeType.getCustomDataName() + "统计_"+System.currentTimeMillis();
|
|
|
String fileName = timeType.getCustomDataName() + MessageUtils.message("Statistics.tj")+"_"+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -7243,6 +7310,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User user = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId = user.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
boolean viewAll = sysFunctionService.hasPriviledge(user.getRoleId(), "全部工时成本预警表");
|
|
|
boolean incharger = sysFunctionService.hasPriviledge(user.getRoleId(), "负责项目工时成本预警表");
|
|
|
List<HashMap> projectList=new ArrayList();
|
|
@@ -7348,7 +7416,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "工时成本预警表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.hourCostAlert")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -7558,6 +7626,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User targetUser = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId =targetUser.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
//当前用户管理部门
|
|
|
List<Integer> deptIds=null;
|
|
@@ -7726,6 +7795,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<String> membRowData=new ArrayList<>();
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
membRowData.add("$userName"+(user.getCorpwxUserid()==null?"":user.getCorpwxUserid())+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ membRowData.add("$userName"+(user.getName()==null?"":user.getName())+"$");
|
|
|
}else {
|
|
|
membRowData.add(user.getName());
|
|
|
}
|
|
@@ -7784,7 +7855,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目分类工时成本统计_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.proClassLaborCost")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -8022,6 +8093,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
HttpRespMsg userWorkingTimeList = getUserWorkingTimeList(userId,projectId,startDate, endDate, null,null,request,departmentId);
|
|
|
HashMap result = (HashMap) userWorkingTimeList.data;
|
|
|
List<Map<String, Object>> resultList = (List<Map<String, Object>>) result.get("result");
|
|
@@ -8090,7 +8162,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "人员工时分配统计_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.perHoursAllSta")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -8450,6 +8522,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg httpRespMsg=new HttpRespMsg();
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
HttpRespMsg msg = getUserReportTimelinessRate(request, startDate, endDate, null, null, null, null);
|
|
|
HashMap map= (HashMap) msg.data;
|
|
|
List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
|
|
@@ -8462,12 +8535,16 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<String> item=new ArrayList<>();
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
item.add("$userName="+(timelinessRateVO.getCorpwxUserId()==null?"":timelinessRateVO.getCorpwxUserId())+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ item.add("$userName="+timelinessRateVO.getUserName()+"$");
|
|
|
}else {
|
|
|
item.add(timelinessRateVO.getUserName());
|
|
|
}
|
|
|
item.add(timelinessRateVO.getJobNumber());
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
item.add("$departmentName=" + (timelinessRateVO.getCorpwxDeptId()==null?"":timelinessRateVO.getCorpwxDeptId()) + "$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ item.add("$departmentName=" + (timelinessRateVO.getCorpDdDeptId()==null?"":timelinessRateVO.getCorpDdDeptId()) + "$");
|
|
|
}else {
|
|
|
item.add(timelinessRateVO.getDepartmentName());
|
|
|
}
|
|
@@ -8479,7 +8556,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "人员填报及时率统计_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.timePerFill")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -8550,6 +8627,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg msg = getWaitingReviewList(request, stateKey, userId, null, null,startDate,endDate,null);
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
|
|
|
HashMap resultmap= (HashMap) msg.data;
|
|
|
List<Map<String,Object>> list= (List<Map<String, Object>>) resultmap.get("result");
|
|
@@ -8584,7 +8662,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "人员待审核统计_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.perReviewed")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -8704,6 +8782,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
HttpRespMsg httpRespMsg = getUserWorkingTimeStatic(startDate, endDate, null, null, request, userId, departmentId);
|
|
|
Map<String,Object> data = (Map<String, Object>) httpRespMsg.data;
|
|
|
List<Map<String,Object>> resultList= (List<Map<String, Object>>) data.get("result");
|
|
@@ -8728,6 +8807,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
item.add("$userName="+(map.get("corpwxUserId")==null?"":map.get("corpwxUserId"))+"$");
|
|
|
item.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
|
|
|
item.add("$departmentName="+(map.get("corpwxDeptId")==null?"":map.get("corpwxDeptId"))+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ item.add("$userName="+((String) map.get("name"))+"$");
|
|
|
+ item.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
|
|
|
+ item.add("$departmentName="+((String) map.get("departmentName")==null?"":(String) map.get("departmentName"))+"$");
|
|
|
}else {
|
|
|
item.add((String) map.get("name"));
|
|
|
item.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
|
|
@@ -8742,7 +8825,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "人员工时统计_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.perHoursSta")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -9245,6 +9328,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg projectBaseCost = getProjectBaseCost(null, request, null, null);
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
HashMap map= (HashMap) projectBaseCost.data;
|
|
|
List<Project> resultProjectList= (List<Project>) map.get("result");
|
|
|
List<List<String>> dataList=new ArrayList<>();
|
|
@@ -9276,7 +9360,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "项目成本基线表_"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("Statistics.ProjectCostBase")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -9348,6 +9432,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg httpRespMsg=new HttpRespMsg();
|
|
|
User targetUser = userMapper.selectById(request.getHeader("token"));
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", targetUser.getCompanyId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", targetUser.getCompanyId()));
|
|
|
List<SysRichFunction> functionTimeList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看工时统计");
|
|
|
List<SysRichFunction> functionCostList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看成本统计");
|
|
|
HttpRespMsg msg = getTimeCostByUserCustom(startDate, endDate, null, customId, request, fieldName);
|
|
@@ -9381,7 +9466,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = userCustom.getName()+"工时成本统计_"+System.currentTimeMillis();
|
|
|
String fileName = userCustom.getName()+MessageUtils.message("fileName.hourCost")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -10180,6 +10265,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
LocalDate time = LocalDate.parse(month, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
HttpRespMsg httpRespMsg = getEmpMonthHours(null, null,month,departmentId,userId,whether,request);
|
|
|
Map<String,Object> data = (Map<String, Object>) httpRespMsg.data;
|
|
|
List<Map<String,Object>> resultList= (List<Map<String, Object>>) data.get("result");
|
|
@@ -10205,6 +10291,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
item.add("$userName=" + map.get("name") +"$");
|
|
|
item.add("$departmentName="+(map.get("corpwxDeptId")==null?"":map.get("corpwxDeptId"))+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ item.add("$userName=" + map.get("name") +"$");
|
|
|
+ item.add("$departmentName="+((String) map.get("departmentName")==null?"":(String) map.get("departmentName"))+"$");
|
|
|
}else {
|
|
|
item.add((String) map.get("name"));
|
|
|
item.add((String) map.get("departmentName")==null?"":(String) map.get("departmentName"));
|
|
@@ -10226,7 +10315,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "人员"+time.getMonthValue()+"月度工时表"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("entry.personnel") +time.getMonthValue()+MessageUtils.message("fileName.monthWork")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -10369,6 +10458,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
String token = request.getHeader("token");
|
|
|
User user = userMapper.selectById(token);
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
HttpRespMsg httpRespMsg = deptPartInProjects(null, null, month, departmentId, request);
|
|
|
Map<String, Object> data = (Map<String, Object>) (Map<String, Object>) httpRespMsg.data;
|
|
|
List<Map<String, Object>> resultList = (List<Map<String, Object>>) data.get("resultList");
|
|
@@ -10404,7 +10494,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = "部门参与项目情况表"+System.currentTimeMillis();
|
|
|
String fileName = MessageUtils.message("fileName.deptJoinPro")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -10418,6 +10508,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
String startDate=null;
|
|
|
String endDate=null;
|
|
|
LocalDate date1;
|
|
@@ -10501,12 +10592,16 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<String> item=new ArrayList<>();
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
item.add("$userName="+(timelinessRateVO.getCorpwxUserId()==null?"":timelinessRateVO.getCorpwxUserId())+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ item.add("$userName="+(timelinessRateVO.getUserName())+"$");
|
|
|
}else {
|
|
|
item.add(timelinessRateVO.getUserName());
|
|
|
}
|
|
|
item.add(timelinessRateVO.getJobNumber());
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
item.add("$departmentName="+(String.valueOf(timelinessRateVO.getCorpwxDeptId()==null?"":timelinessRateVO.getCorpwxDeptId()))+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ item.add("$departmentName="+(timelinessRateVO.getDepartmentName())+"$");
|
|
|
}else {
|
|
|
item.add(timelinessRateVO.getDepartmentName());
|
|
|
}
|
|
@@ -10531,7 +10626,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//String fileName = year+"人员填报及时率统计_"+System.currentTimeMillis();
|
|
|
String fileName = year+"_"+quarter+MessageUtils.message("fileName.quarter")+MessageUtils.message("fileName.timePerFill")+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -11154,6 +11249,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
User targetUser = userMapper.selectById(request.getHeader("Token"));
|
|
|
Integer companyId =targetUser.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
//当前用户管理部门
|
|
|
List<Integer> deptIds=null;
|
|
@@ -11288,6 +11384,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
// }else {
|
|
|
// membRowData.add((String)("$departmentName="+membMap.get("corpwxDeptId")+"$"));
|
|
|
// }
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ membRowData.add(("$userName="+(String)membMap.get("name")+"$"));
|
|
|
}else {
|
|
|
membRowData.add((String)membMap.get("name"));
|
|
|
// membRowData.add((String)membMap.get("departmentName"));
|
|
@@ -11321,7 +11419,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
//生成excel文件导出
|
|
|
//String fileName = "维度成本工时统计_"+System.currentTimeMillis();
|
|
|
String fileName = timeType.getCustomDegreeName() + MessageUtils.message("fileName.degreeCost")+System.currentTimeMillis();
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
|
|
|
} catch (NullPointerException e) {
|
|
|
e.printStackTrace();
|
|
|
//httpRespMsg.setError("验证失败");
|
|
@@ -11472,6 +11570,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
List<UserCustom> userCustoms = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", user.getCompanyId()).orderByAsc("id"));
|
|
|
String customName = "";
|
|
|
if (userCustoms.size() != 0){
|
|
@@ -11543,6 +11642,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact().equals(1)){
|
|
|
item.add("$userName="+map.get("wxUserId") + "$");
|
|
|
item.add("$departmentName="+map.get("wxdeptId") + "$");
|
|
|
+ }else if (dingding != null && dingding.getSyncContact().equals(1)){
|
|
|
+ item.add("$userName="+map.get("userName") + "$");
|
|
|
+ item.add("$departmentName="+map.get("departmentName") + "$");
|
|
|
}else {
|
|
|
item.add(map.get("userName") + "");
|
|
|
item.add(map.get("departmentName") + "");
|
|
@@ -11567,6 +11669,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact().equals(1)){
|
|
|
item.add("$userName="+maps.get(0).get("wxUserId") + "$");
|
|
|
item.add("$departmentName="+maps.get(0).get("wxdeptId") + "$");
|
|
|
+ }else if (dingding != null && dingding.getSyncContact().equals(1)){
|
|
|
+ item.add("$userName="+maps.get(0).get("userName") + "$");
|
|
|
+ item.add("$departmentName="+maps.get(0).get("departmentName") + "$");
|
|
|
}else {
|
|
|
item.add(maps.get(0).get("userName") + "");
|
|
|
item.add(maps.get(0).get("departmentName") + "");
|
|
@@ -11605,7 +11710,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
String fileName = "FTE报表"+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -12190,6 +12295,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<LaborHourRateVo> resultList= (List<LaborHourRateVo>) msgData.getData();
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
Company company = companyMapper.selectById(companyId);
|
|
|
//1.创建一个workbook,对应一个excel文件
|
|
|
SXSSFWorkbook workBook = new SXSSFWorkbook();
|
|
@@ -12306,6 +12412,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
for (LaborHourRateVo laborHourRateVo : resultList) {
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
list.add("$departmentName="+laborHourRateVo.getDepartment_name()+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ list.add("$departmentName="+laborHourRateVo.getDepartment_name()+"$");
|
|
|
}else {
|
|
|
list.add(laborHourRateVo.getDepartment_name());
|
|
|
}
|
|
@@ -12352,7 +12460,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
|
|
|
try {
|
|
|
- return excelExportService.exportTranForwx(wxCorpInfo, title);
|
|
|
+ return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -12489,6 +12597,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
HttpRespMsg respMsg = getMembProjectCateRatio(startDate, endDate,departmentId,subUserCustomName, onlyShowWarning);
|
|
|
Map<String,Object> resultMap= (Map<String, Object>) respMsg.getData();
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) resultMap.get("userList");
|
|
@@ -12530,7 +12639,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
String title= "项目分类工时占比表_"+System.currentTimeMillis();
|
|
|
String fileName= title+".xlsx";
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,dataList,path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -12634,6 +12743,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
Company company = companyMapper.selectById(companyId);
|
|
|
//1.创建一个workbook,对应一个excel文件
|
|
|
SXSSFWorkbook workBook = new SXSSFWorkbook();
|
|
@@ -12764,8 +12874,16 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
deptIndex+=maps.size();
|
|
|
for (int i = 0; i < maps.size(); i++) {
|
|
|
- list.add("$departmentName="+String.valueOf(maps.get(i).get("corpwxDeptId"))+"$");
|
|
|
- list.add("$userName="+maps.get(i).get("corpwxUserId")+"$");
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ list.add("$departmentName="+String.valueOf(maps.get(i).get("corpwxDeptId"))+"$");
|
|
|
+ list.add("$userName="+maps.get(i).get("corpwxUserId")+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ list.add("$departmentName="+String.valueOf(maps.get(i).get("departmentName"))+"$");
|
|
|
+ list.add("$userName="+String.valueOf(maps.get(i).get("userName"))+"$");
|
|
|
+ }else {
|
|
|
+ list.add(String.valueOf(maps.get(i).get("departmentName")));
|
|
|
+ list.add(String.valueOf(maps.get(i).get("userName")));
|
|
|
+ }
|
|
|
list.add(String.valueOf(maps.get(i).get("projectName")));
|
|
|
list.add(String.valueOf(maps.get(i).get("projectCode")));
|
|
|
list.add(String.valueOf(maps.get(i).get("residueTime")));
|
|
@@ -12808,7 +12926,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
|
|
|
|
|
|
try {
|
|
|
- return excelExportService.exportTranForwx(wxCorpInfo, title);
|
|
|
+ return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -13098,6 +13216,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
Company company = companyMapper.selectById(companyId);
|
|
|
//1.创建一个workbook,对应一个excel文件
|
|
|
SXSSFWorkbook workBook = new SXSSFWorkbook();
|
|
@@ -13244,6 +13363,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
list.add(String.valueOf(map.get("projectName")));
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
list.add("$departmentName="+map.get("corpwxDeptId")+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ list.add("$departmentName="+String.valueOf(map.get("department_name"))+"$");
|
|
|
}else {
|
|
|
list.add(String.valueOf(map.get("department_name")));
|
|
|
}
|
|
@@ -13293,7 +13414,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
|
|
|
|
|
|
try {
|
|
|
- return excelExportService.exportTranForwx(wxCorpInfo, title);
|
|
|
+ return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -13398,6 +13519,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
percentFormat.setMaximumFractionDigits(2);
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
HttpRespMsg resultMsg = projectExpendProcessList(startDate,endDate,projectId,categoryId,userId,null,null);
|
|
|
Map<String, Object> msgData = (Map<String, Object>) resultMsg.getData();
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
|
|
@@ -13451,6 +13573,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if(i==userProgress.size()-1){
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
sb.append("$userName="+String.valueOf(userProgress.get(i).get("userName"))+"$"+String.valueOf(userProgress.get(i).get("progress")));
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ sb.append("$userName="+String.valueOf(userProgress.get(i).get("userName"))+"$"+String.valueOf(userProgress.get(i).get("progress")));
|
|
|
}else {
|
|
|
sb.append(String.valueOf(userProgress.get(i).get("userName"))+String.valueOf(userProgress.get(i).get("progress")));
|
|
|
}
|
|
@@ -13458,6 +13582,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}else {
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
sb.append("$userName="+String.valueOf(userProgress.get(i).get("userName"))+"$"+String.valueOf(userProgress.get(i).get("progress"))+",");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ sb.append("$userName="+String.valueOf(userProgress.get(i).get("userName"))+"$"+String.valueOf(userProgress.get(i).get("progress"))+",");
|
|
|
}else {
|
|
|
sb.append(String.valueOf(userProgress.get(i).get("userName"))+String.valueOf(userProgress.get(i).get("progress"))+",");
|
|
|
}
|
|
@@ -13468,7 +13594,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
String fileName = "项目耗用进度表_"+System.currentTimeMillis();
|
|
|
try {
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -13547,6 +13673,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
|
+ CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
|
|
|
Company company = companyMapper.selectById(companyId);
|
|
|
//1.创建一个workbook,对应一个excel文件
|
|
|
SXSSFWorkbook workBook = new SXSSFWorkbook();
|
|
@@ -13687,8 +13814,16 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
deptIndex+=maps.size();
|
|
|
for (int i = 0; i < maps.size(); i++) {
|
|
|
- list.add("$departmentName="+String.valueOf(maps.get(i).get("corpwxDeptId"))+"$");
|
|
|
- list.add("$userName="+maps.get(i).get("corpwxUserId")+"$");
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ list.add("$departmentName="+String.valueOf(maps.get(i).get("corpwxDeptId"))+"$");
|
|
|
+ list.add("$userName="+maps.get(i).get("corpwxUserId")+"$");
|
|
|
+ }else if(dingding!=null&&dingding.getSyncContact()==1){
|
|
|
+ list.add("$departmentName="+String.valueOf(maps.get(i).get("departmentName"))+"$");
|
|
|
+ list.add("$userName="+String.valueOf(maps.get(i).get("userName"))+"$");
|
|
|
+ }else {
|
|
|
+ list.add(String.valueOf(maps.get(i).get("departmentName")));
|
|
|
+ list.add(String.valueOf(maps.get(i).get("userName")));
|
|
|
+ }
|
|
|
list.add(String.valueOf(maps.get(i).get("projectName")));
|
|
|
list.add(String.valueOf(maps.get(i).get("projectCode")));
|
|
|
list.add(String.valueOf(maps.get(i).get("taskName")));
|
|
@@ -13736,7 +13871,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
|
|
|
|
|
|
try {
|
|
|
- return excelExportService.exportTranForwx(wxCorpInfo, title);
|
|
|
+ return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|