|
@@ -5776,13 +5776,26 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HttpRespMsg exportGroupData(Integer mainProjectId,HttpServletRequest request) {
|
|
|
+ public HttpRespMsg exportGroupData(Integer projectCategorySubId,HttpServletRequest request) {
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
//获取全部用户
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").eq("company_id", user.getCompanyId()));
|
|
|
- List<HashMap<String, Object>> list = projectMapper.getExportGroupData(mainProjectId,user.getCompanyId());
|
|
|
+ String projectCategorySub=null;
|
|
|
+ if(projectCategorySubId!=null){
|
|
|
+ switch (projectCategorySubId){
|
|
|
+ case 1:projectCategorySub="纯软件项目";
|
|
|
+ break;
|
|
|
+ case 2:projectCategorySub="纯硬件项目";
|
|
|
+ break;
|
|
|
+ case 3:projectCategorySub="集成项目";
|
|
|
+ break;
|
|
|
+ case 4:projectCategorySub="服务项目";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<HashMap<String, Object>> list = projectMapper.getExportGroupData(projectCategorySub,user.getCompanyId());
|
|
|
List<List<String>> allList = new ArrayList<>();
|
|
|
List<String> headList = new ArrayList<String>();
|
|
|
// headList.add("项目编号");
|
|
@@ -7966,7 +7979,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HttpRespMsg getTimeCostByGroupProject(String startDate, String endDate, Integer pageIndex, Integer pageSize, Integer groupId, Integer projectId,Integer projectMainId, HttpServletRequest request) {
|
|
|
+ public HttpRespMsg getTimeCostByGroupProject(String startDate, String endDate, Integer pageIndex, Integer pageSize, Integer groupId, Integer projectId,Integer projectCategorySubId, HttpServletRequest request) {
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
Integer companyId = user.getCompanyId();
|
|
@@ -7988,16 +8001,29 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
inchagerIds.add(-1);
|
|
|
}
|
|
|
}
|
|
|
+ String projectCategorySub=null;
|
|
|
+ if(projectCategorySubId!=null){
|
|
|
+ switch (projectCategorySubId){
|
|
|
+ case 1:projectCategorySub="纯软件项目";
|
|
|
+ break;
|
|
|
+ case 2:projectCategorySub="纯硬件项目";
|
|
|
+ break;
|
|
|
+ case 3:projectCategorySub="集成项目";
|
|
|
+ break;
|
|
|
+ case 4:projectCategorySub="服务项目";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
List<Map<String,Object>> record;
|
|
|
long total;
|
|
|
if(pageIndex!=null&&pageSize!=null){
|
|
|
Integer startIndex = (pageIndex-1)*pageSize;
|
|
|
Integer endIndex = pageSize*pageIndex;
|
|
|
- record = projectMapper.selectWithGroupProject(companyId,startDate,endDate, startIndex, endIndex, projectId,projectMainId,inchagerIds,groupId);
|
|
|
+ record = projectMapper.selectWithGroupProject(companyId,startDate,endDate, startIndex, endIndex, projectId,projectCategorySub,inchagerIds,groupId);
|
|
|
}else {
|
|
|
- record=projectMapper.selectWithGroupProject(companyId,startDate,endDate, null, null, projectId,projectMainId,inchagerIds,groupId);
|
|
|
+ record=projectMapper.selectWithGroupProject(companyId,startDate,endDate, null, null, projectId,projectCategorySub,inchagerIds,groupId);
|
|
|
}
|
|
|
- total =projectMapper.selectCountWithGroupProject(companyId,startDate,endDate, null, null, projectId,projectMainId,inchagerIds,groupId);
|
|
|
+ total =projectMapper.selectCountWithGroupProject(companyId,startDate,endDate, null, null, projectId,projectCategorySub,inchagerIds,groupId);
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("records", record);
|
|
|
map.put("total", total);
|
|
@@ -8006,10 +8032,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HttpRespMsg exportGroupWithProjectTimeCost(String startDate, String endDate, Integer pageIndex, Integer pageSize, Integer groupId, Integer projectId,Integer projectMainId, HttpServletRequest request) {
|
|
|
+ public HttpRespMsg exportGroupWithProjectTimeCost(String startDate, String endDate, Integer pageIndex, Integer pageSize, Integer groupId, Integer projectId,Integer projectCategorySubId, HttpServletRequest request) {
|
|
|
HttpRespMsg httpRespMsg=new HttpRespMsg();
|
|
|
HttpRespMsg timeCostByGroup = getTimeCostByGroup(startDate, endDate, null, null, groupId, projectId, request);
|
|
|
- HttpRespMsg timeCostByGroupProject = getTimeCostByGroupProject(startDate, endDate, null, null, groupId, projectId,projectMainId, request);
|
|
|
+ HttpRespMsg timeCostByGroupProject = getTimeCostByGroupProject(startDate, endDate, null, null, groupId, projectId,projectCategorySubId, request);
|
|
|
HashMap<String,Object> timeCostByGroupData = (HashMap<String, Object>) timeCostByGroup.data;
|
|
|
HashMap<String,Object> timeCostByGroupProjectData = (HashMap<String, Object>) timeCostByGroupProject.data;
|
|
|
List<Map<String,Object>> timeCostByGroupList= (List<Map<String, Object>>) timeCostByGroupData.get("records");
|