|  | @@ -25,8 +25,11 @@ import org.jeecg.modules.geke.shift.service.IShiftService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.entity.SysDepart;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.entity.SysUser;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.util.DateUtils2;
 | 
	
		
			
				|  |  | +import org.jeecg.modules.viewClockIn.entity.BdClose;
 | 
	
		
			
				|  |  | +import org.jeecg.modules.viewClockIn.entity.BdErrorInfo;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.viewClockIn.entity.ViewClockIn;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.viewClockIn.entity.bdClockinMonth;
 | 
	
		
			
				|  |  | +import org.jeecg.modules.viewClockIn.service.IBdErrorInfoService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.viewClockIn.service.IbdClockinMonthService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.viewClockIn.service.IviewClockInService;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
	
		
			
				|  | @@ -63,32 +66,88 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 | 
	
		
			
				|  |  |  	 private IShiftService shiftService;
 | 
	
		
			
				|  |  |  	 @Autowired
 | 
	
		
			
				|  |  |  	 private workOvertimeMapper overtimeMapper;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -//	 public List<Map> getMap(){
 | 
	
		
			
				|  |  | -//		 LambdaQueryWrapper<Shift> query = new LambdaQueryWrapper<Shift>();
 | 
	
		
			
				|  |  | -//		 shiftService.getMap(query);
 | 
	
		
			
				|  |  | -//	 }
 | 
	
		
			
				|  |  | +	 @Autowired
 | 
	
		
			
				|  |  | +	 private IBdErrorInfoService bdErrorInfoService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	 ////人员考勤页面,1付薪,2累计调休,3忽略
 | 
	
		
			
				|  |  | +	 /**
 | 
	
		
			
				|  |  | +	  * 人员考勤页面,1付薪,2累计调休,3忽略
 | 
	
		
			
				|  |  | +	  * @param jsonObject
 | 
	
		
			
				|  |  | +	  * @return
 | 
	
		
			
				|  |  | +	  * @throws ParseException
 | 
	
		
			
				|  |  | +	  */
 | 
	
		
			
				|  |  |  	 @RequestMapping(value = "/fuXinInfo", method = RequestMethod.PUT)
 | 
	
		
			
				|  |  | -	 public String fuXinInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 | 
	
		
			
				|  |  | -		 String viewDate = jsonObject.get("viewDate").toString();
 | 
	
		
			
				|  |  | +	 public Result<?> fuXinInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 | 
	
		
			
				|  |  | +		 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 | 
	
		
			
				|  |  |  		 String st = jsonObject.get("st").toString();
 | 
	
		
			
				|  |  | -		 String userId = jsonObject.get("userId").toString();
 | 
	
		
			
				|  |  | -			if(st.equals("1")){
 | 
	
		
			
				|  |  | -				st = "付薪";
 | 
	
		
			
				|  |  | -			}else if(st.equals("2")){
 | 
	
		
			
				|  |  | -				st = "累计调休";
 | 
	
		
			
				|  |  | -			}else{
 | 
	
		
			
				|  |  | -				st = "忽略";
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  | +		 if(st.equals("1")){
 | 
	
		
			
				|  |  | +			 st = "付薪";
 | 
	
		
			
				|  |  | +		 }else if(st.equals("2")){
 | 
	
		
			
				|  |  | +			 st = "累计调休";
 | 
	
		
			
				|  |  | +		 }else{
 | 
	
		
			
				|  |  | +			 st = "忽略";
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  | +		 String w = jsonObject.get("w").toString();
 | 
	
		
			
				|  |  | +		 if(w.equals("1")){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			 String viewDate1 = jsonObject.get("viewDate1").toString();
 | 
	
		
			
				|  |  | +			 String pkId = jsonObject.get("pkId").toString();
 | 
	
		
			
				|  |  | +			 //校验是否关账
 | 
	
		
			
				|  |  | +			 if(!bdClockinMonthService.ifClose(viewDate1)){
 | 
	
		
			
				|  |  | +				 return Result.error("当前月份已关账,无法此操作");
 | 
	
		
			
				|  |  | +			 }
 | 
	
		
			
				|  |  | +			 viewClockInService.updateOvertime(st,pkId,user.getUsername());
 | 
	
		
			
				|  |  | +		 }else{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			 String viewDate = jsonObject.get("viewDate").toString();
 | 
	
		
			
				|  |  | +			 String userId = jsonObject.get("userId").toString();
 | 
	
		
			
				|  |  | +			 //校验是否关账
 | 
	
		
			
				|  |  | +			 if(!bdClockinMonthService.ifClose(viewDate)){
 | 
	
		
			
				|  |  | +				 return Result.error("当前月份已关账,无法此操作");
 | 
	
		
			
				|  |  | +			 }
 | 
	
		
			
				|  |  | +			 viewClockInService.fuXinInfo(st,userId,viewDate,user.getUsername());
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		 return Result.OK("true");
 | 
	
		
			
				|  |  | +	 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	 /**
 | 
	
		
			
				|  |  | +	  * 异常信息校准 忽略考勤异常
 | 
	
		
			
				|  |  | +	  * @param jsonObject
 | 
	
		
			
				|  |  | +	  * @return
 | 
	
		
			
				|  |  | +	  * @throws ParseException
 | 
	
		
			
				|  |  | +	  */
 | 
	
		
			
				|  |  | +	 @RequestMapping(value = "/errorInfo", method = RequestMethod.PUT)
 | 
	
		
			
				|  |  | +	 public Result<?> errorInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 | 
	
		
			
				|  |  | +		 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 | 
	
		
			
				|  |  | +		 String viewDate = jsonObject.get("viewDate").toString();//时间
 | 
	
		
			
				|  |  | +		 //校验是否关账
 | 
	
		
			
				|  |  | +		 if(!bdClockinMonthService.ifClose(viewDate)){
 | 
	
		
			
				|  |  | +			 return Result.error(viewDate+"当前月份已关账,无法此操作");
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		 viewClockInService.fuXinInfo(st,userId,viewDate);
 | 
	
		
			
				|  |  | +		 String userId = jsonObject.get("userId").toString();//用户
 | 
	
		
			
				|  |  | +		 BdErrorInfo bdErrorInfo = new BdErrorInfo();
 | 
	
		
			
				|  |  | +		 if(jsonObject.get("errorText")!= null){
 | 
	
		
			
				|  |  | +			 String errorText = jsonObject.get("errorText").toString();//忽略原因
 | 
	
		
			
				|  |  | +			 bdErrorInfo.setErrorText(errorText);
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		 return "设置成功";
 | 
	
		
			
				|  |  | +		 bdErrorInfo.setUserId(userId);
 | 
	
		
			
				|  |  | +		 bdErrorInfo.setViewDate(viewDate);
 | 
	
		
			
				|  |  | +		 bdErrorInfo.setHandler(user.getUsername());
 | 
	
		
			
				|  |  | +		 bdErrorInfo.setHandlTime(new Date());
 | 
	
		
			
				|  |  | +		 bdErrorInfo.setErrorState("0");
 | 
	
		
			
				|  |  | +		 bdErrorInfoService.save(bdErrorInfo);
 | 
	
		
			
				|  |  | +		 return Result.OK("true");
 | 
	
		
			
				|  |  |  	 }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +	 /**
 | 
	
		
			
				|  |  | +	  * 异常信息校准(暂不使用)
 | 
	
		
			
				|  |  | +	  * @param jsonObject
 | 
	
		
			
				|  |  | +	  * @return
 | 
	
		
			
				|  |  | +	  * @throws ParseException
 | 
	
		
			
				|  |  | +	  */
 | 
	
		
			
				|  |  |  	 @RequestMapping(value = "/jiaozhun", method = RequestMethod.PUT)
 | 
	
		
			
				|  |  |  	 public Result<?> jiaozhun(@RequestBody JSONObject jsonObject) throws ParseException {
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -180,15 +239,19 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 | 
	
		
			
				|  |  |  		 if(!StringUtil.isNullOrEmpty(ids)){
 | 
	
		
			
				|  |  |  			 userId = ids.split(",");
 | 
	
		
			
				|  |  |  		 }
 | 
	
		
			
				|  |  | -//		 List<bdClockinMonth> list = bdClockinMonthService.selectAllByMonth(viewDate,userId);
 | 
	
		
			
				|  |  | -		 	try {
 | 
	
		
			
				|  |  | -				String err = bdClockinMonthService.reportIntoU8Job(viewDate,userId);
 | 
	
		
			
				|  |  | -				if(!StringUtil.isNullOrEmpty(err)){
 | 
	
		
			
				|  |  | -					return Result.error(err);
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -			}catch (Exception e){
 | 
	
		
			
				|  |  | -				return Result.error(e.getMessage());
 | 
	
		
			
				|  |  | +		 //校验是否关账
 | 
	
		
			
				|  |  | +		if(!bdClockinMonthService.ifClose(viewDate)){
 | 
	
		
			
				|  |  | +			return Result.error("当前月份已关账,无法此操作");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		try {
 | 
	
		
			
				|  |  | +			String err = bdClockinMonthService.reportIntoU8Job(viewDate,userId);
 | 
	
		
			
				|  |  | +			if(!StringUtil.isNullOrEmpty(err)){
 | 
	
		
			
				|  |  | +				return Result.error(err);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | +		}catch (Exception e){
 | 
	
		
			
				|  |  | +			return Result.error(e.getMessage());
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		 return Result.OK("true");
 | 
	
		
			
				|  |  |  	 }
 | 
	
	
		
			
				|  | @@ -204,6 +267,12 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 | 
	
		
			
				|  |  |  		 try {
 | 
	
		
			
				|  |  |  		 	 Map<String,String> map = new HashMap<>();
 | 
	
		
			
				|  |  |  			 String nowDate = jsonObject.getString("nowDate");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			 //校验是否关账
 | 
	
		
			
				|  |  | +			 if(!bdClockinMonthService.ifClose(nowDate)){
 | 
	
		
			
				|  |  | +				 return Result.error("当前月份已关账,无法此操作");
 | 
	
		
			
				|  |  | +			 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  			 String[] date = nowDate.split("-");
 | 
	
		
			
				|  |  |  			 String userIds = jsonObject.getString("userIds");
 | 
	
		
			
				|  |  |  			 List<String> userList = new ArrayList<>();
 |