|
@@ -47,6 +47,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.io.*;
|
|
import java.io.*;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.math.RoundingMode;
|
|
import java.math.RoundingMode;
|
|
|
|
+import java.sql.Array;
|
|
import java.sql.Timestamp;
|
|
import java.sql.Timestamp;
|
|
import java.text.DecimalFormat;
|
|
import java.text.DecimalFormat;
|
|
import java.text.NumberFormat;
|
|
import java.text.NumberFormat;
|
|
@@ -9683,4 +9684,65 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = projects;
|
|
httpRespMsg.data = projects;
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //获取FTE报表数据
|
|
|
|
+ @Override
|
|
|
|
+ public HttpRespMsg getFTEData(Integer pageIndex, Integer pageSize, String month, HttpServletRequest request) {
|
|
|
|
+
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //导出FTE报表数据
|
|
|
|
+ @Override
|
|
|
|
+ public HttpRespMsg exportFTEData(String month, HttpServletRequest request) {
|
|
|
|
+ HttpRespMsg msg=new HttpRespMsg();
|
|
|
|
+// User user = userMapper.selectById(request.getHeader("token"));
|
|
|
|
+// Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
|
+// List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
|
|
|
|
+// List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部子项目工时成本");
|
|
|
|
+// List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目子项目工时成本");
|
|
|
|
+// //判断查看权限
|
|
|
|
+// List<Integer> inchagerIds=null;
|
|
|
|
+// if(functionAllList.size()==0){
|
|
|
|
+// inchagerIds=new ArrayList<>();
|
|
|
|
+// if(functionInchargeList.size()>0){
|
|
|
|
+// List<Project> list = projectList.stream().filter(pl -> (pl.getInchargerId()==null?0:pl.getInchargerId()).equals(user.getId())).collect(Collectors.toList());
|
|
|
|
+// if(list!=null){
|
|
|
|
+// List<Integer> collect = list.stream().map(li -> li.getId()).collect(Collectors.toList());
|
|
|
|
+// inchagerIds.addAll(collect);
|
|
|
|
+// }
|
|
|
|
+// }else {
|
|
|
|
+// inchagerIds.add(-1);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ List<List<String>> dataList=new ArrayList<>();
|
|
|
|
+ List<String> titleList=new ArrayList<>();
|
|
|
|
+ List<List<Integer>> mergeCellList = new ArrayList<>();
|
|
|
|
+ titleList.add("地区");
|
|
|
|
+ titleList.add("序号");
|
|
|
|
+ titleList.add("CRC姓名");
|
|
|
|
+ titleList.add("项目号");
|
|
|
|
+ titleList.add("项目名称");
|
|
|
|
+ titleList.add("子项目成本/元");
|
|
|
|
+ dataList.add(titleList);
|
|
|
|
+ ArrayList<Integer> cell = new ArrayList<>();
|
|
|
|
+ cell.add(0);
|
|
|
|
+ cell.add(2);
|
|
|
|
+ cell.add(0);
|
|
|
|
+ cell.add(0);
|
|
|
|
+ mergeCellList.add(cell);
|
|
|
|
+
|
|
|
|
+ ArrayList<Integer> cell1 = new ArrayList<>();
|
|
|
|
+ cell1.add(0);
|
|
|
|
+ cell1.add(2);
|
|
|
|
+ cell1.add(1);
|
|
|
|
+ cell1.add(1);
|
|
|
|
+
|
|
|
|
+ mergeCellList.add(cell1);
|
|
|
|
+ String fileName = "FTE报表"+System.currentTimeMillis();
|
|
|
|
+ String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName, dataList, path,mergeCellList);
|
|
|
|
+ msg.data=resp;
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
}
|
|
}
|