| 
					
				 | 
			
			
				@@ -5,10 +5,7 @@ import com.ym.mec.auth.api.entity.SysUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dao.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dto.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.CourseStatusEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.GroupType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.dal.enums.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.page.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.controller.BaseController; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -107,9 +104,9 @@ public class ExportController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<StudentBuyPracticeDto> rows = practiceGroupService.studentBuys(queryInfo).getRows(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         OutputStream outputStream = response.getOutputStream(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员编号", "学员名称", "所属分部","课程老师","课程组老师", "购买网管课", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员编号", "学员名称", "所属分部", "课程老师", "课程组老师", "购买网管课", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "免费课结束日期", "首次购买日期", "时间差"}, new String[]{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "studentId", "studentName", "organName","teacherName","courseGroupTeacherName" ,"buyPractice.msg", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "studentId", "studentName", "organName", "teacherName", "courseGroupTeacherName", "buyPractice.msg", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "lastClassDate", "firstBuyTime", "intervalDay"}, rows); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.setContentType("application/octet-stream"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -949,7 +946,7 @@ public class ExportController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String[] header = {"分部", "学生编号", "学生姓名", "网管课老师id", "网管课老师", "有效期截止时间", "课程截止时间", "总课时", "剩余课时", "是否购买"}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String[] body = {"organName", "studentId", "studentName", "teacherIds", "teacherName", "expireDate", "classEndDate", "totalClassTimes", "noStartClassTimes","buyPractice.msg"}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String[] body = {"organName", "studentId", "studentName", "teacherIds", "teacherName", "expireDate", "classEndDate", "totalClassTimes", "noStartClassTimes", "buyPractice.msg"}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupExports); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.setContentType("application/octet-stream"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1183,13 +1180,110 @@ public class ExportController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.flushBuffer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (TeacherCourseSalaryDetail4WebDto row : rows) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (Objects.isNull(row.getSignInTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setSignInStatusStr("未签到"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                String signInTimeStr = DateUtil.dateToString(row.getSignInTime(), "yyyy-MM-dd HH:mm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (YesOrNoEnum.YES.equals(row.getSignInStatus())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    row.setSignInStatusStr(signInTimeStr + "(正常签到)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    row.setSignInStatusStr(signInTimeStr + "(异常签到)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (Objects.isNull(row.getSignOutTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setSignOutStatusStr("未签退"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                String signOutTimeStr = DateUtil.dateToString(row.getSignOutTime(), "yyyy-MM-dd HH:mm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (YesOrNoEnum.YES.equals(row.getSignOutStatus())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    row.setSignOutStatusStr(signOutTimeStr + "(正常签退)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    row.setSignOutStatusStr(signOutTimeStr + "(异常签退)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         OutputStream ouputStream = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             HSSFWorkbook workbook = POIUtil.exportExcel( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     new String[]{"分部", "课程组类型", "课程编号", "时间", "课程名称", "老师编号", "老师姓名", "签到时间", "签退时间", "应发课酬", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                 "课酬扣款", "结算课酬", "结算课酬", "状态", "备注"}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    new String[]{"organName", "groupType", "courseScheduleId", "startClassTime", "courseName", "teacherId", "teacherName", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "signInTime", "signOutTime", "actualSalary", "reduceSalary", "finalSalary", "confirmStatus", "memo"}, rows); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "课酬扣款", "结算课酬", "状态", "备注"}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    new String[]{"organName", "groupType.desc", "courseScheduleId", "startClassTime", "courseName", "teacherId", "teacherName", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "signInStatusStr", "signOutStatusStr", "actualSalary", "reduceSalary", "finalSalary", "confirmStatus.desc", "memo"}, rows); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            response.setContentType("application/octet-stream"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ouputStream = response.getOutputStream(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            workbook.write(ouputStream); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ouputStream.flush(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } finally { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (ouputStream != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ouputStream.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } catch (IOException e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "课外训练-教学导出") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping("export/operatingStudents") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@pcs.hasPermissions('export/operatingStudents')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void operatingStudents(StudentOperatingQueryInfo queryInfo, HttpServletResponse response) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        queryInfo.setRows(999999); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SysUser sysUser = sysUserFeignService.queryUserInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (sysUser == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BizException("用户信息获取失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!sysUser.getIsSuperAdmin()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Employee employee = employeeDao.get(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (StringUtils.isEmpty(queryInfo.getOrganId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                queryInfo.setOrganId(employee.getOrganIdList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                throw new BizException("用户所在分部异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<String> list = Arrays.asList(employee.getOrganIdList().split(",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    throw new BizException("非法请求"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PageInfo<Student4operating> PageOperatingStudents = studentManageService.getOperatingStudents(queryInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (PageOperatingStudents.getTotal() <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BizException("导出记录不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Student4operating> rows = PageOperatingStudents.getRows(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (Student4operating row : rows) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(row.getOperatingTag() != null && row.getOperatingTag()==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setOperatingTagStr("是"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setOperatingTagStr("否"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(row.getVipTimes() != null && row.getVipTimes() >0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setVipTimesStr("有"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setVipTimesStr("无"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(row.getFreePracticeTimes() != null && row.getFreePracticeTimes() >0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setFreePracticeTimesStr("有"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setFreePracticeTimesStr("无"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(row.getBuyPracticeTimes() != null && row.getBuyPracticeTimes() >0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setBuyPracticeTimesStr("有"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                row.setBuyPracticeTimesStr("无"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        OutputStream ouputStream = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            HSSFWorkbook workbook = POIUtil.exportExcel( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    new String[]{"分部", "学生", "学生编号", "指导老师","指导老师id", "运营指标", "VIP课", "免费网管课", "付费网管课"}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    new String[]{"organName", "studentName", "studentId", "teacherName","teacherId", "operatingTagStr", "vipTimesStr", "freePracticeTimesStr", "buyPracticeTimesStr"}, rows); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.setContentType("application/octet-stream"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ouputStream = response.getOutputStream(); 
			 |