| 
					
				 | 
			
			
				@@ -44,6 +44,8 @@ import org.jeecg.modules.geke.attendanceRule.entity.AttendanceRule; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.geke.attendanceRule.service.IAttendanceRuleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.geke.historyWages.entity.HistoryWages; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.geke.historyWages.service.IHistoryWagesService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.jeecg.modules.geke.shift.entity.Shift; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.jeecg.modules.geke.shift.service.IShiftService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.geke.sysFile.entity.SysFile; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.geke.sysFile.service.ISysFileService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.geke.userRule.service.IUserRuleService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -91,6 +93,7 @@ import javax.annotation.Resource; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import javax.servlet.http.HttpServletRequest; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import javax.servlet.http.HttpServletResponse; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.io.IOException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.math.BigDecimal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.text.ParseException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.time.LocalDateTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.time.format.DateTimeFormatter; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -190,6 +193,9 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private  IWeixinUserService weixinUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private IShiftService shiftService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -335,6 +341,8 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderItem.setColumn("one_dept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }if (s[0].equals("del3")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderItem.setColumn("last_dept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }if (s[0].equals("cend_date")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                orderItem.setColumn("cu.end_date"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             orderItems.add(orderItem); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -392,11 +400,11 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(userIds!=null && userIds.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Map<String,String>  useDepNames = sysUserService.getDepNamesByUserIds(userIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             pageList.getRecords().forEach(item->{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                List<UserContract> list = userContractService.list(item.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               /* List<UserContract> list = userContractService.list(item.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (list!=null&&list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     item.setContractType(list.get(0).getContractType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     item.setCEndDate(list.get(0).getEndDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 String bankCard = item.getBankCard(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 item.setOrgCodeTxt(useDepNames.get(item.getId())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<UserQuit> userIds1 = userQuitService.getUserIds(item.getId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -557,6 +565,9 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }if (f){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     user.setIsSalary("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }if (!user.getCategory().equals(105)&&!user.getCategory().equals(106)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    user.setEpibolyType(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                   sysUserService.editType(user.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				sysUserService.editUserWithRole(user, roles); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sysUserService.editUserWithDepart(user, departs); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -889,6 +900,8 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderItem.setColumn("one_dept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }if (s[0].equals("del3")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orderItem.setColumn("last_dept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }if (s[0].equals("cend_date")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                orderItem.setColumn("cu.end_date"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             orderItems.add(orderItem); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -905,11 +918,11 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String rzEndDate=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String syStartDate=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String syEndDate=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (oConvertUtils.isNotEmpty(sysUser.getRzDate())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (oConvertUtils.isNotEmpty(sysUser.getRzDate())&&!sysUser.getRzDate().equals(",")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String[] split = sysUser.getRzDate().split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             rzStartDate=split[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             rzEndDate=split[1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }if (oConvertUtils.isNotEmpty(sysUser.getSyDate())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }if (oConvertUtils.isNotEmpty(sysUser.getSyDate())&&!sysUser.getSyDate().equals(",")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String[] split = sysUser.getSyDate().split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             syStartDate=split[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             syEndDate=split[1]; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -979,6 +992,10 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            item.setIsAttendance("否"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                   }if (oConvertUtils.isNotEmpty(item.getEntryDate())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       int year = getYear(item.getEntryDate(), new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       item.setDivisionMoth(String.valueOf(year)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       item.setWorkMoth(String.valueOf(Integer.parseInt(item.getWorkMoth())+year)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    List<String> orgName = sysUserService.getOrgName(item.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    List<SysUserDepVo> depNamesByUserIds = sysUserMapper.getDepNamesByUserIds(Arrays.asList(item.getId().split(","))); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1061,6 +1078,15 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public  int getYear(Date start,Date end){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int yearCount=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double seconds = Math.floor((end.getTime() - start.getTime()) / 1000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double minutes = Math.floor(seconds / 60); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double hours = Math.floor(minutes / 60); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double days = Math.floor(hours / 24); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        double months = Math.floor(days / 30); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return (int)months; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 导出excel 员工年假调休 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1320,14 +1346,25 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 pageList.add(us); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Page<Shift> pages = new Page<Shift>(1, 10000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Page<Shift> lists = shiftService.lists(pages, new Shift()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String str=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (lists.getRecords().size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (Shift record : lists.getRecords()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (record.getShiftType().equals("1")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    str+=record.getName()+DateUtils.formatDate(record.getStartDate(),"HH:mm")+"-"+DateUtils.formatDate(record.getEndDate(),"HH:mm")+","+DateUtils.formatDate(record.getStart2Date(),"HH:mm")+"-"+DateUtils.formatDate(record.getEnd2Date(),"HH:mm")+";"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    str+=record.getName()+DateUtils.formatDate(record.getStartDate(),"HH:mm")+"-"+DateUtils.formatDate(record.getEndDate(),"HH:mm")+";"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //导出文件名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mv.addObject(NormalExcelConstants.FILE_NAME, "员工排班信息"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mv.addObject(NormalExcelConstants.CLASS, UserShiftExcel.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String sName="员工排班信息"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ExportParams exportParams = new ExportParams("员工排班信息", "导出人:"+user.getRealname(), sName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ExportParams exportParams = new ExportParams("员工排班信息", str, sName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         exportParams.setImageBasePath(upLoadPath); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mv.addObject(NormalExcelConstants.PARAMS, exportParams); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mv.addObject(NormalExcelConstants.DATA_LIST, pageList); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1783,6 +1820,11 @@ public class SysUserController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUserRoleVO.getUserIdList().forEach(str->{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sysUserRoleService.deleteUserid(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String identity="1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (sysUserRoleVO.getRoleId().equals("1462659329857978370")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                identity="2"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            sysUserService.editIdentity(identity,sysUserRoleVO.getUserIdList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String sysRoleId = sysUserRoleVO.getRoleId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for(String sysUserId:sysUserRoleVO.getUserIdList()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 SysUserRole sysUserRole = new SysUserRole(sysUserId,sysRoleId); 
			 |