|  | @@ -16,6 +16,7 @@ import org.jeecg.common.constant.CommonConstant;
 | 
	
		
			
				|  |  |  import org.jeecg.common.constant.FillRuleConstant;
 | 
	
		
			
				|  |  |  import org.jeecg.common.util.*;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.geke.attendance.entity.Attendance;
 | 
	
		
			
				|  |  | +import org.jeecg.modules.geke.attendance.mapper.AttendanceMapper;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.geke.attendance.service.IAttendanceService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.geke.makeUpCard.entity.MakeUpCard;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.geke.makeUpCard.service.IMakeUpCardService;
 | 
	
	
		
			
				|  | @@ -115,6 +116,9 @@ public class WeixinUserImpl implements IWeixinUserService{
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IUserChageService userChageService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private AttendanceMapper attendanceMapper;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private DepartmentService departmentService=new DepartmentService();
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -602,29 +606,23 @@ public class WeixinUserImpl implements IWeixinUserService{
 | 
	
		
			
				|  |  |          Calendar calendar = Calendar.getInstance();//获取系统时间实列
 | 
	
		
			
				|  |  |          SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");//日期格式化
 | 
	
		
			
				|  |  |          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 | 
	
		
			
				|  |  | +        SimpleDateFormat sft = new SimpleDateFormat("yyyy-MM-dd");
 | 
	
		
			
				|  |  |          int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);//获取前端传过来的时间获取月份的总天数
 | 
	
		
			
				|  |  | -        Date stDate = null;
 | 
	
		
			
				|  |  | -        Date enDate = null;
 | 
	
		
			
				|  |  | -        Date stDate2 = null;
 | 
	
		
			
				|  |  |          long startDate;
 | 
	
		
			
				|  |  | -        long startDate2;
 | 
	
		
			
				|  |  |          long endDate;
 | 
	
		
			
				|  |  | -        Calendar now = Calendar.getInstance();
 | 
	
		
			
				|  |  | -        endDate =now.getTime().getTime()/1000;
 | 
	
		
			
				|  |  | -        enDate = now.getTime();//当前日期
 | 
	
		
			
				|  |  | -        now.add(Calendar.DAY_OF_MONTH, -30);
 | 
	
		
			
				|  |  | -        startDate = now.getTime().getTime()/1000;
 | 
	
		
			
				|  |  | -        stDate = now.getTime();//当前日期前30天
 | 
	
		
			
				|  |  | -        now.add(Calendar.DAY_OF_MONTH, -30);
 | 
	
		
			
				|  |  | -        startDate2 = now.getTime().getTime()/1000;
 | 
	
		
			
				|  |  | -        stDate2 = now.getTime();//当前日期前60天
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        Calendar now = Calendar.getInstance();//当前日期
 | 
	
		
			
				|  |  | +        now.add(Calendar.DAY_OF_MONTH, -1);
 | 
	
		
			
				|  |  | +        String format = sft.format(now.getTime());
 | 
	
		
			
				|  |  | +        Date parse = sdf.parse(format + " 00:00:00");
 | 
	
		
			
				|  |  | +        startDate = parse.getTime()/1000;
 | 
	
		
			
				|  |  | +        Date parses = sdf.parse(format + " 23:59:59");
 | 
	
		
			
				|  |  | +        endDate= parses.getTime()/1000;
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              List<String> list = WeixinUserIdList();
 | 
	
		
			
				|  |  |              if (list != null && list.size() > 0) {
 | 
	
		
			
				|  |  | -                attendanceService.DeleteDateAttendance(sdf.format(stDate2), sdf.format(enDate), list);
 | 
	
		
			
				|  |  | +                //attendanceService.DeleteDateAttendance(sdf.format(stDate2), sdf.format(enDate), list);
 | 
	
		
			
				|  |  |                  weixinSigns.addAll(WeixinSignList(String.valueOf(startDate), String.valueOf(endDate), list));
 | 
	
		
			
				|  |  | -                weixinSigns.addAll(WeixinSignList(String.valueOf(startDate2), String.valueOf(startDate), list));
 | 
	
		
			
				|  |  | +                //weixinSigns.addAll(WeixinSignList(String.valueOf(startDate2), String.valueOf(startDate), list));
 | 
	
		
			
				|  |  |                  if (weixinSigns != null && weixinSigns.size() > 0) {
 | 
	
		
			
				|  |  |                      for (WeixinSign wxlist : weixinSigns) {
 | 
	
		
			
				|  |  |                          Attendance attendance = new Attendance();
 | 
	
	
		
			
				|  | @@ -971,6 +969,14 @@ public class WeixinUserImpl implements IWeixinUserService{
 | 
	
		
			
				|  |  |                  MakeUpCard makeUpCard = WxUpCard(str);
 | 
	
		
			
				|  |  |                  if (makeUpCard!=null){
 | 
	
		
			
				|  |  |                      makeUpCardService.save(makeUpCard);
 | 
	
		
			
				|  |  | +                    Attendance one = attendanceMapper.getOne(makeUpCard.getUserId(), sdf.format(makeUpCard.getTime()));
 | 
	
		
			
				|  |  | +                    if (oConvertUtils.isEmpty(one)){
 | 
	
		
			
				|  |  | +                        Attendance attendance=new Attendance();
 | 
	
		
			
				|  |  | +                        attendance.setUserDate(makeUpCard.getTime());
 | 
	
		
			
				|  |  | +                        attendance.setUserId(makeUpCard.getUserId());
 | 
	
		
			
				|  |  | +                        attendance.setExceptionType("正常");
 | 
	
		
			
				|  |  | +                       // attendanceService.save()
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  System.out.println(makeUpCard);
 | 
	
		
			
				|  |  |              }catch (Exception e){
 |