app
aijinhui
2024-02-23 76b4dd97417bd6e611b3889a0772c100a06d59ab
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
@@ -661,14 +661,14 @@
                int planNum = dayNum+onceNum;
                //这天总兴趣点数
                int wellNum = dayWell+onceWell;
                QueryWrapper<ArdAppPatrolpointRecord> queryWrapper = new QueryWrapper<>();
                queryWrapper.eq("user_id",userId).like("record_time",ymd);
                List<ArdAppPatrolpointRecord> list = ardAppPatrolpointRecordMapper.selectList(queryWrapper);
                //已打卡总条数
                QueryWrapper<ArdAppPatrolpointRecord> queryWrapper = new QueryWrapper<>();
                queryWrapper.eq("user_id",userId).like("record_time",ymd).isNull("del");
                List<ArdAppPatrolpointRecord> list = ardAppPatrolpointRecordMapper.selectList(queryWrapper);
                int num = list.size();
                //应打卡总条数
                int record = planNum*wellNum;
                if(num==record){
                if(num>=record){
                    recordBoolean = true;
                }
            }
@@ -768,7 +768,7 @@
            SysUser user = sysUserMapper.selectById(userId);
            String userName = user.getNickName();
            //查询该计划的所有兴趣点
            ArdAlarmpointsWell ardAlarmpointsWell = wellMapper.selectById(wellId);
            ArdAlarmpointsWell ardAlarmpointsWell = wellMapper.getWellById(wellId);
            //没打卡的数据
            ArdAppPatrolpointRecord record1 = new ArdAppPatrolpointRecord();
            record1.setAppPatrolpointsId(ardAlarmpointsWell.getId());
@@ -795,12 +795,12 @@
        // 减少 10 秒
        LocalDateTime now = LocalDateTime.now(); // 获取当前日期时间
        LocalDateTime earlier = now.minusSeconds(10); // 减少30秒
        System.out.println("当前日期时间:" + now);
        System.out.println("减少10秒后的日期时间:" + earlier);
        RecordSonParam recordSonParam = new RecordSonParam();
        recordSonParam.setUserId(userId);
        recordSonParam.setTime(fmt.format(now));
        recordSonParam.setBeforeTime(fmt.format(earlier));
        String n = fmt.format(now);
        recordSonParam.setTime(n);
        String e = fmt.format(earlier);
        recordSonParam.setBeforeTime(e);
        //根据姓名ID为执行人获取所有对应的计划名称
        List<ArdAppPatrolplan> list = patrolplanMapper.planUser(recordSonParam);
        JSONArray jsonArray = new JSONArray();