Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

zhengqiang 3 éve
szülő
commit
f03fbdc186

+ 44 - 16
web/src/main/java/com/jpsoft/shinestar/modules/business/controller/RequestForLeaveInfoController.java

@@ -467,23 +467,29 @@ public class RequestForLeaveInfoController {
         for (int j=0;j<totalMapList.size();j++) {
 
             Sheet sheet;
+
+            String[] titles;
+
             if(j==0){
                 sheet = workbook.createSheet("请假中");
+                titles = new String[]{"序号","姓名","工号","部门",
+                        "请假类型","销假时间","销假审核人","开始时间","结束时间","请假时长","请假事由","审批状态","审核备注","申请时间"};
             }
             else if(j==1){
                 sheet = workbook.createSheet("待销假");
+                titles = new String[]{"序号","姓名","工号","部门",
+                        "请假类型","销假时间","销假审核人","开始时间","结束时间","请假时长","请假事由","审批状态","审核备注","申请时间"};
             }
             else{
                 sheet = workbook.createSheet("已销假");
+                titles = new String[]{"序号","部门","工号","姓名","请假类型","开始时间","结束时间","请假时长","请假事由","销假时间",
+                        "审核备注","销假审核人","审批状态","审批时间","申请时间"};
             }
 
 
             //表头
             Row rowTitle = sheet.createRow(0);
 
-            String[] titles = new String[]{"序号","姓名","工号","部门",
-                    "请假类型","销假时间","销假审核人","开始时间","结束时间","请假时长","请假事由","审批状态","审核备注","申请时间"};
-
             for (int i=0;i<titles.length;i++) {
                 Cell cell = rowTitle.createCell(i);
                 cell.setCellValue(titles[i]);
@@ -496,19 +502,41 @@ public class RequestForLeaveInfoController {
 
                 int colIndex = 0;
                 row.createCell(colIndex++).setCellValue(i+1);
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("name"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("jobNumber"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("className"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("leaveTypeN"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("cancelTime"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("approvalPersonIdStr"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("startTime"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("endTime"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("days"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("reason"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("statusN"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("approvalExplain"),""));
-                row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("createTime"),""));
+
+                if(j==0||j==1){
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("name"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("jobNumber"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("className"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("leaveTypeN"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("cancelTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("approvalPersonIdStr"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("startTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("endTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("days"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("reason"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("statusN"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("approvalExplain"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("createTime"),""));
+                }
+                else{
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("className"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("jobNumber"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("name"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("leaveTypeN"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("startTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("endTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("days"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("reason"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("cancelTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("approvalExplain"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("approvalPersonIdStr"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("statusN"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("updateTime"),""));
+                    row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("createTime"),""));
+                }
+
+
+
             }