|  | @@ -76,6 +76,76 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 | 
	
		
			
				|  |  |  	 @Autowired
 | 
	
		
			
				|  |  |  	 private IStatutoryLeaveService statutoryLeaveService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	 /**
 | 
	
		
			
				|  |  | +	  * 批量人员考勤页面,1付薪,2累计调休,3忽略
 | 
	
		
			
				|  |  | +	  * @param jsonObject
 | 
	
		
			
				|  |  | +	  * @return
 | 
	
		
			
				|  |  | +	  * @throws ParseException
 | 
	
		
			
				|  |  | +	  */
 | 
	
		
			
				|  |  | +	 @RequestMapping(value = "/handleInfo", method = RequestMethod.PUT)
 | 
	
		
			
				|  |  | +	 public Result<?> handleInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 | 
	
		
			
				|  |  | +		String viewDates = jsonObject.getString("viewDate");
 | 
	
		
			
				|  |  | +		String username = jsonObject.getString("username");
 | 
	
		
			
				|  |  | +		String st = jsonObject.getString("st");
 | 
	
		
			
				|  |  | +		String[] viewDateArr = viewDates.split(",");
 | 
	
		
			
				|  |  | +		if(StringUtil.isNullOrEmpty(viewDates)){
 | 
	
		
			
				|  |  | +			return Result.error("您没有选择任何数据");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(StringUtil.isNullOrEmpty(username)){
 | 
	
		
			
				|  |  | +			return Result.error("您没有选择任何数据");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(viewDateArr.length < 1){
 | 
	
		
			
				|  |  | +			return Result.error("您没有选择任何数据");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(!bdClockinMonthService.ifClose(viewDateArr[0])){
 | 
	
		
			
				|  |  | +			return Result.error("当前月份已关账,无法此操作");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		SysUser sysUser = iSysUserService.getUserByName(username);
 | 
	
		
			
				|  |  | +		 if(sysUser != null){
 | 
	
		
			
				|  |  | +			 //正式工 101 实习生 103 劳务工	104 劳务外包5+2 105  劳务外包6+1 106  顾问 102
 | 
	
		
			
				|  |  | +			 //员工为正式,实习,劳务加班付薪时,如果没匹配到工资倍数,则默认两倍;匹配到工资倍数则按照倍数算薪;其他员工除非能匹配到工资倍数,否则不能付薪只能调休
 | 
	
		
			
				|  |  | +			 int userType = sysUser.getCategory();
 | 
	
		
			
				|  |  | +			 if(userType != 101 && userType != 103 && userType != 104){
 | 
	
		
			
				|  |  | +				 DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +				 List<StatutoryLeave> list = statutoryLeaveService.list();
 | 
	
		
			
				|  |  | +				 for(String a:viewDateArr){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +					 for(StatutoryLeave o:list){
 | 
	
		
			
				|  |  | +						 if(o.getType().equals("1")){//假期管理 班
 | 
	
		
			
				|  |  | +							 Date begin = o.getStartDate();
 | 
	
		
			
				|  |  | +							 Date end = o.getEndDate();
 | 
	
		
			
				|  |  | +							 if(!isEffectiveDate(sdf.parse(a),begin,end) ){
 | 
	
		
			
				|  |  | +								 return Result.error("当前用户的加班,只能用于累计调休");
 | 
	
		
			
				|  |  | +							 }
 | 
	
		
			
				|  |  | +						 }
 | 
	
		
			
				|  |  | +					 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +				 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			 }else{
 | 
	
		
			
				|  |  | +				 if(st.equals("1")){
 | 
	
		
			
				|  |  | +					 st = "付薪";
 | 
	
		
			
				|  |  | +				 }else if(st.equals("2")){
 | 
	
		
			
				|  |  | +					 st = "累计调休";
 | 
	
		
			
				|  |  | +				 }else{
 | 
	
		
			
				|  |  | +					 st = "忽略";
 | 
	
		
			
				|  |  | +				 }
 | 
	
		
			
				|  |  | +				 for(String a:viewDateArr){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +					 viewClockInService.fuXinInfo(st,username,a,sysUser.getUsername());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +				 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		 return Result.OK("OK");
 | 
	
		
			
				|  |  | +	 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  	 /**
 | 
	
		
			
				|  |  |  	  * 人员考勤页面,1付薪,2累计调休,3忽略
 | 
	
		
			
				|  |  |  	  * @param jsonObject
 | 
	
	
		
			
				|  | @@ -90,13 +160,8 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 | 
	
		
			
				|  |  |  		 String userId = jsonObject.get("userId").toString();
 | 
	
		
			
				|  |  |  		 SysUser sysUser = iSysUserService.getUserByName(userId);
 | 
	
		
			
				|  |  |  		 if(sysUser != null){
 | 
	
		
			
				|  |  | -		 	//正式工	101
 | 
	
		
			
				|  |  | -			//实习生	103
 | 
	
		
			
				|  |  | -//			 劳务工	104
 | 
	
		
			
				|  |  | -//			 劳务外包5+2	105
 | 
	
		
			
				|  |  | -//			 劳务外包6+1	106
 | 
	
		
			
				|  |  | -//			 顾问	102
 | 
	
		
			
				|  |  | -			// 员工为正式,实习,劳务加班付薪时,如果没匹配到工资倍数,则默认两倍;匹配到工资倍数则按照倍数算薪;其他员工除非能匹配到工资倍数,否则不能付薪只能调休
 | 
	
		
			
				|  |  | +			//正式工 101 实习生 103 劳务工	104 劳务外包5+2 105  劳务外包6+1 106  顾问 102
 | 
	
		
			
				|  |  | +			 //员工为正式,实习,劳务加班付薪时,如果没匹配到工资倍数,则默认两倍;匹配到工资倍数则按照倍数算薪;其他员工除非能匹配到工资倍数,否则不能付薪只能调休
 | 
	
		
			
				|  |  |  		 	int userType = sysUser.getCategory();
 | 
	
		
			
				|  |  |  		 	if(userType != 101 && userType != 103 && userType != 104){
 | 
	
		
			
				|  |  |  				DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 | 
	
	
		
			
				|  | @@ -466,12 +531,22 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 | 
	
		
			
				|  |  |  			query.eq(ViewClockIn::getHeadMonth,mDate);//月份
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +		if(viewClockIn.getDuration() != null && viewClockIn.getDuration() != ""){
 | 
	
		
			
				|  |  | +			query.isNotNull(ViewClockIn::getDuration);//加班信息
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(viewClockIn.getShowState() != null && viewClockIn.getShowState() != ""){
 | 
	
		
			
				|  |  | +			query.like(ViewClockIn::getShowState,viewClockIn.getShowState());//异常状态
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		if(viewClockIn.getRealname() != null && viewClockIn.getRealname() != ""){
 | 
	
		
			
				|  |  |  			query.like(ViewClockIn::getRealname,viewClockIn.getRealname());//姓名
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(viewClockIn.getDepartNames() != null && viewClockIn.getDepartNames() != ""){
 | 
	
		
			
				|  |  |  			query.like(ViewClockIn::getDepartNames,viewClockIn.getDepartNames());//部门
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		if(viewClockIn.getDepartIds() != null && viewClockIn.getDepartIds() != ""){
 | 
	
		
			
				|  |  | +//			query.apply("org_code"+" like {0}", viewClockIn.getDepartIds()+"%");
 | 
	
		
			
				|  |  | +			query.apply("FIND_IN_SET({0},depart_ids)", viewClockIn.getDepartIds());
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		if(viewClockIn.getWorkNo() != null && viewClockIn.getWorkNo() != ""){
 | 
	
		
			
				|  |  |  			query.eq(ViewClockIn::getWorkNo,viewClockIn.getWorkNo());//工号
 | 
	
		
			
				|  |  |  		}
 |