瀏覽代碼

自动接触隔离和pcr到期

wwh 1 年之前
父節點
當前提交
c2a82d8135

+ 6 - 0
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanBeforeServiceImpl.java

@@ -201,6 +201,9 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
                 } else if (Integer.parseInt(split[1]) == 2) {
                     //新增pcr
                     BillPcr billClean = (BillPcr) entity;
+                    if (cleanBefore.getVistitType() != 0) {
+                        billClean.setCarNum(cleanBefore.getCarNum());
+                    }
                     pcrMapper.insert(billClean);
                 } else if (Integer.parseInt(split[1]) == 3) {
                     //新增洗澡
@@ -250,6 +253,9 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
         }else if (nextId == 2) {
             //新增pcr
             BillPcr billClean = (BillPcr) newObject;
+            if (cleanBefore.getVistitType() != 0) {
+                billClean.setCarNum(cleanBefore.getCarNum());
+            }
             pcrMapper.insert(billClean);
             baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
         }else if (nextId == 3) {

+ 12 - 0
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanServiceImpl.java

@@ -890,6 +890,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                         } else if (Integer.parseInt(splits[1]) == 2) {
                             //新增pcr
                             BillPcr billClean1 = (BillPcr) entity;
+                            if (billClean.getVistitType() != 0) {
+                                billClean1.setCarNum(billClean.getCarNum());
+                            }
                             pcrMapper.insert(billClean1);
                         } else if (Integer.parseInt(splits[1]) == 3) {
                             //新增洗澡
@@ -939,6 +942,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 }else if (nextId == 2) {
                     //新增pcr
                     BillPcr billClean1 = (BillPcr) newObject;
+                    if (billClean.getVistitType() != 0) {
+                        billClean1.setCarNum(billClean.getCarNum());
+                    }
                     pcrMapper.insert(billClean1);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 3) {
@@ -1082,6 +1088,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                             } else if (Integer.parseInt(splits[1]) == 2) {
                                 //新增pcr
                                 BillPcr billClean1 = (BillPcr) entity;
+                                if (billClean.getVistitType() != 0) {
+                                    billClean1.setCarNum(billClean.getCarNum());
+                                }
                                 pcrMapper.insert(billClean1);
                             } else if (Integer.parseInt(splits[1]) == 3) {
                                 //新增洗澡
@@ -1131,6 +1140,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                     }else if (nextId == 2) {
                         //新增pcr
                         BillPcr billClean1 = (BillPcr) newObject;
+                        if (billClean.getVistitType() != 0) {
+                            billClean1.setCarNum(billClean.getCarNum());
+                        }
                         pcrMapper.insert(billClean1);
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     }else if (nextId == 3) {

+ 6 - 0
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -446,6 +446,9 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                         } else if (Integer.parseInt(split[1]) == 2) {
                             //新增pcr
                             BillPcr billClean = (BillPcr) entity;
+                            if (billPcr.getVistitType() != 0) {
+                                billClean.setCarNum(billPcr.getCarNum());
+                            }
                             pcrMapper.insert(billClean);
                         } else if (Integer.parseInt(split[1]) == 3) {
                             //新增洗澡
@@ -495,6 +498,9 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                 } else if (nextId == 2) {
                     //新增pcr
                     BillPcr billClean = (BillPcr) newObject;
+                    if (billPcr.getVistitType() != 0) {
+                        billClean.setCarNum(billPcr.getCarNum());
+                    }
                     pcrMapper.insert(billClean);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 } else if (nextId == 3) {

+ 6 - 0
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillSamplingServiceImpl.java

@@ -204,6 +204,9 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                 } else if (Integer.parseInt(split[1]) == 2) {
                     //新增pcr
                     BillPcr billClean = (BillPcr) entity;
+                    if (sampling.getVistitType() != 0) {
+                        billClean.setCarNum(sampling.getCarNum());
+                    }
                     pcrMapper.insert(billClean);
                 } else if (Integer.parseInt(split[1]) == 3) {
                     //新增洗澡
@@ -253,6 +256,9 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         }else if (nextId == 2) {
             //新增pcr
             BillPcr billClean = (BillPcr) newObject;
+            if (sampling.getVistitType() != 0) {
+                billClean.setCarNum(sampling.getCarNum());
+            }
             pcrMapper.insert(billClean);
             baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
         }else if (nextId == 3) {

+ 237 - 175
huimv-receive/src/main/java/com/huimv/receive/timer/SafeTimer.java

@@ -1,175 +1,237 @@
-//package com.huimv.receive.timer;
-//
-//
-//import cn.hutool.core.date.DateUtil;
-//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-//import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-//import com.huimv.receive.common.token.TokenSign;
-//import com.huimv.receive.entity.*;
-//import com.huimv.receive.service.*;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.context.annotation.Configuration;
-//import org.springframework.scheduling.annotation.EnableScheduling;
-//import org.springframework.scheduling.annotation.Scheduled;
-//
-//import java.text.ParseException;
-//import java.text.SimpleDateFormat;
-//import java.time.LocalDateTime;
-//import java.time.ZoneId;
-//import java.util.Calendar;
-//import java.util.Date;
-//import java.util.List;
-//
-//@Configuration
-//@EnableScheduling
-//public class SafeTimer {
-//
-//
-//    @Autowired
-//    private IBillPcrService pcrService;
-//    @Autowired
-//    private IBillIsolateService isolateService;
-//    @Autowired
-//    private IConfigurationService configurationService;
-//
-//    @Autowired
-//    private ISysUserService sysUserService;
-//    @Autowired
-//    private IBaseProcessService processService;
-//    @Autowired
-//    private IBaseLocationService locationService;
-//    @Autowired
-//    private IBillCleanService cleanService;
-//
-//
-//    @Scheduled(cron = "0 0/1 * * * ? ")
-//    private void getShenChan() throws Exception {
-//        QueryWrapper<BillIsolate> queryWrapper = new QueryWrapper<>();
-//        queryWrapper.eq("bill_status", 1);
-//        List<BillIsolate> isolates = isolateService.list(queryWrapper);
-//        Date date = new Date();
-//        for (BillIsolate billIsolate : isolates) {
-//            if (billIsolate.getIsolateEndDate().getTime() <= date.getTime()) {
-//                billIsolate.setIsolateRealEndDate(date);
-//                billIsolate.setIsolateRealDayNum(billIsolate.getIsolateDayNum());
-//                billIsolate.setBillStatus(2);
-//                billIsolate.setPassUserName("自然解除隔离");
-//                billIsolate.setPassDate(date);
-//                BaseProcess baseProcess = processService.getById(billIsolate.getProcessId());
-//                QueryWrapper<BaseLocation> locationQueryWrapper = new QueryWrapper<>();
-//                locationQueryWrapper.eq("id", billIsolate.getIsolateLocationId());
-//                BaseLocation baseLocation = locationService.getOne(locationQueryWrapper);//当前隔离所在的位置
-//
-//                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-//                String end = sdf.format(billIsolate.getIsolateEndDate());
-//                String start = sdf.format(billIsolate.getIsolateStartDate());
-//                String now = sdf.format(new Date());
-//                if (baseProcess.getDestId().equals(billIsolate.getIsolateLocationId()) || baseProcess.getDestId() >= 13) {
-//                    //目的地就是当前隔离地点
-//                    baseProcess.setProcessType(1);
-//                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation());
-//                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId());
-//                } else {
-//                    baseProcess.setProcessType(0);
-//                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
-//                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
-//                }
-//                if (billIsolate.getIsolateLocationId() == 3 && baseProcess.getDestId() >= 4) {
-//                    //通过生成洗消记录
-//                    BillClean billClean = new BillClean();
-//                    billClean.setVistitType(billIsolate.getVistitType());
-//                    billClean.setDestName(billIsolate.getDestName());
-//                    billClean.setDestId(billIsolate.getDestId());
-//                    billClean.setAdmissionUserName(billIsolate.getAdmissionUserName());
-//                    billClean.setAdmissionUserId(billIsolate.getAdmissionUserId());
-//                    billClean.setVistitDate(billIsolate.getVistitDate());
-//                    billClean.setSubDate(LocalDateTime.now());
-//                    billClean.setFarmId(billIsolate.getFarmId());
-//                    billClean.setPassUserName(billIsolate.getPassUserName());
-//                    billClean.setPassDate(billIsolate.getPassDate());
-//                    billClean.setPassUserId(billIsolate.getPassUserId());
-//                    billClean.setProcessId(billIsolate.getProcessId());
-//                    billClean.setTestLocation("场内");
-//                    billClean.setTestLocationId(4);
-//                    billClean.setPhone(billIsolate.getPhone());
-//                    cleanService.save(billClean);
-//
-//                    String status = baseProcess.getAllLocationStatus();
-//                    String[] split = status.split(",");
-//                    split[0] = "2";
-//                    split[1] = "2";
-//                    split[2] = "2";
-//                    split[3] = "2";
-//                    split[4] = "1";
-//                    baseProcess.setAllLocationStatus(split[0] + "," + split[1] + "," + split[2] + "," + split[3]+"," +split[4]+ status.substring(9));
-//                }
-//
-//                billIsolate.setIsolateRealEndDate(new Date());
-//                SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
-//                Calendar cal1 = Calendar.getInstance();
-//                Calendar cal2 = Calendar.getInstance();
-//                Date startDate = sdf1.parse(start);
-//                Date endDate = sdf1.parse(now);
-//                cal1.setTime(startDate);
-//                cal2.setTime(endDate);
-//                long days = (cal2.getTimeInMillis() - cal1.getTimeInMillis()) / (1000 * 3600 * 24);
-//                billIsolate.setIsolateRealDayNum(Long.toString(days));
-//                billIsolate.setBillStatus(2);
-//
-//                baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + now);
-//
-//                String status = baseProcess.getCurrentStatus();
-//                String substring = status.substring(0, status.length() - 1);
-//                baseProcess.setCurrentStatus(substring + "1," + 0);
-//
-//                if (billIsolate.getIsolateLocationId() == 5) {
-//                    baseProcess.setAllLocationStatus("2,2,2,2,2,2");
-//                }
-//                if (billIsolate.getIsolateLocationId() == 3) {
-//                    String status1 = baseProcess.getAllLocationStatus();
-//                    String[] split = status1.split(",");
-//                    split[0] = "2";
-//                    split[1] = "2";
-//                    split[2] = "2";
-//                    split[3] = "2";
-//                    baseProcess.setAllLocationStatus(split[0] + "," + split[1] + "," + split[2] + "," + split[3]  + status1.substring(7));
-//                }
-//
-//                isolateService.updateById(billIsolate);
-//                processService.updateById(baseProcess);
-//            }
-//        }
-//    }
-//
-//    @Scheduled(cron = "0 0/1 * * * ? ")
-//    private void pcr() throws Exception {
-//        QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
-//        queryWrapper.eq("bill_status", 1);
-//        List<BillPcr> pcrs = pcrService.list(queryWrapper);
-//        Date date = new Date();
-//        for (BillPcr pcr : pcrs) {
-//            Date subDate = pcr.getCheckDate();
-//            // 将LocalDateTime转换为Date
-//
-//            if ((subDate.getTime() + pcr.getQualifiedDate() * 60 * 60 * 1000) <= date.getTime()) {
-//                pcr.setBillStatus(3);
-//                pcrService.updateById(pcr);
-//            }
-//        }
-//    }
-//
-//    //计算年龄
-//    @Scheduled(cron = "0 0 0 * * ? ")
-//    private void getAge()   {
-//        System.out.println("开始");
-//        List<SysUser> sysUsers = sysUserService.list();
-//        for (SysUser sysUser : sysUsers) {
-//            int i = DateUtil.ageOfNow(sysUser.getBirthday());
-//            if (i !=sysUser.getAge() ){
-//                sysUser.setAge(i);
-//                sysUserService.updateById(sysUser);
-//            }
-//        }
-//    }
-//
-//}
+package com.huimv.receive.timer;
+
+
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.huimv.receive.common.token.TokenSign;
+import com.huimv.receive.common.utils.FlowUtil;
+import com.huimv.receive.entity.*;
+import com.huimv.receive.service.*;
+import com.huimv.receive.service.impl.BillPcrServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+@Configuration
+@EnableScheduling
+public class SafeTimer {
+
+
+    @Autowired
+    private IBillPcrService pcrService;
+    @Autowired
+    private IBillIsolateService isolateService;
+    @Autowired
+    private IConfigurationService configurationService;
+
+    @Autowired
+    private ISysUserService sysUserService;
+    @Autowired
+    private IBaseProcessService processService;
+    @Autowired
+    private IBaseLocationService locationService;
+    @Autowired
+    private IBillCleanService cleanService;
+    @Autowired
+    private IBillDryService dryService;
+    @Autowired
+    private IBillCleanBeforeService beforeService;
+    @Autowired
+    private IBillSamplingService samplingService;
+
+
+    @Scheduled(cron = "0 0/1 * * * ? ")
+    private void getShenChan() throws Exception {
+        QueryWrapper<BillIsolate> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("bill_status", 1);
+        List<BillIsolate> isolates = isolateService.list(queryWrapper);
+        Date date = new Date();
+        for (BillIsolate billIsolate : isolates) {
+            if (billIsolate.getIsolateEndDate().getTime() <= date.getTime()) {
+                billIsolate.setIsolateRealEndDate(date);
+                billIsolate.setIsolateRealDayNum(billIsolate.getIsolateDayNum());
+                billIsolate.setBillStatus(2);
+                billIsolate.setPassUserName("自然解除隔离");
+                billIsolate.setPassDate(date);
+                BaseProcess baseProcess = processService.getById(billIsolate.getProcessId());
+                QueryWrapper<BaseLocation> locationQueryWrapper = new QueryWrapper<>();
+                locationQueryWrapper.eq("id", billIsolate.getIsolateLocationId());
+                BaseLocation baseLocation = locationService.getOne(locationQueryWrapper);//当前隔离所在的位置
+
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                String end = sdf.format(billIsolate.getIsolateEndDate());
+                String start = sdf.format(billIsolate.getIsolateStartDate());
+                String now = sdf.format(new Date());
+
+                String allLocationId = baseProcess.getAllLocationId();//所有的位置id
+                String allFlowId = baseProcess.getAllFlowId();//所有的流程id
+                String currentFlowId = baseProcess.getCurrentFlowId();//当前已经完成的流程id
+                String substring1 = allFlowId.substring(currentFlowId.length() + 1, allFlowId.length());
+                String[] splits = substring1.split(",");
+                Integer nextId = Integer.parseInt(splits[0]);
+                Object newObject = BillPcrServiceImpl.getNewObject(nextId, billIsolate.getDestName(), billIsolate.getDestId(), billIsolate.getAdmissionUserName(),
+                        billIsolate.getAdmissionUserId(), billIsolate.getVistitDate(), billIsolate.getSubDate(),
+                        billIsolate.getProcessId(), billIsolate.getFarmId(), billIsolate.getIsolateLocation(), billIsolate.getIsolateLocationId(),
+                        billIsolate.getVistitType(),billIsolate.getPhone(),billIsolate.getDepartureName(),billIsolate.getDepartureId());
+                if (nextId == 0) {
+                    if (StringUtils.isBlank(splits[1])) {
+                        baseProcess.setProcessType(1);
+                        if (allLocationId.length() > 9) {
+                            baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                            baseProcess.setAllLocationStatus("2,2,2,2,2");
+                        } else {
+                            baseProcess.setAllLocationStatus("2,2,2");
+                        }
+                    } else {
+                        String[] strings = allLocationId.split(",");
+                        Integer index = 0;
+                        for (int i = 0; i < strings.length; i++) {
+                            if ((baseLocation.getId().toString()).equals(strings[i])) {
+                                index = i;
+                            }
+                        }
+                        QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper();
+                        queryWrapper1.eq("id", strings[index + 2]);
+                        BaseLocation location = locationService.getOne(queryWrapper1);
+                        FlowUtil flowUtil = new FlowUtil();
+                        Object entity = flowUtil.getEntity(Integer.parseInt(splits[1]), billIsolate.getVistitType(), billIsolate.getDestName()
+                                , billIsolate.getDestId(), billIsolate.getAdmissionUserId(), billIsolate.getAdmissionUserName(), billIsolate.getPhone(),
+                                billIsolate.getVistitDate(), location.getId(), location.getLocationName(), billIsolate.getFarmId()
+                                , baseProcess.getId(), billIsolate.getDepartureName(), billIsolate.getDepartureId());
+                        if (Integer.parseInt(splits[1]) == 1) {
+                            //新增采样
+                            BillSampling billSampling = (BillSampling) entity;
+                            samplingService.save(billSampling);
+                        } else if (Integer.parseInt(splits[1]) == 2) {
+                            //新增pcr
+                            BillPcr billClean = (BillPcr) entity;
+                            pcrService.save(billClean);
+                        } else if (Integer.parseInt(splits[1]) == 3) {
+                            //新增洗澡
+                            BillClean billClean = (BillClean) entity;
+                            cleanService.save(billClean);
+                        } else if (Integer.parseInt(splits[1]) == 4) {
+                            //新增隔离
+                            BillIsolate pcr = (BillIsolate) entity;
+                            isolateService.save(pcr);
+                        } else if (Integer.parseInt(splits[1]) == 5) {
+                            BillDry billClean = (BillDry) entity;
+                            dryService.save(billClean);
+                            //新增烘干
+                        } else if (Integer.parseInt(splits[1]) == 6) {
+                            //新增洗澡前拍照
+                            BillCleanBefore before = (BillCleanBefore) entity;
+                            beforeService.save(before);
+                        }
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+                        if (allLocationId.length() > 9) {
+                            if (index == 1) {
+                                baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                            } else {
+                                baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                            }
+                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                            baseProcess.setAllLocationStatus("2,2,2,1,0");
+                        }
+                    }
+                } else if (nextId == 1) {
+                    //新增采样
+                    BillSampling billSampling = (BillSampling) newObject;
+                    samplingService.save(billSampling);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+                }else if (nextId == 2) {
+                    //新增pcr
+                    BillPcr pcr = (BillPcr) newObject;
+                    pcrService.save(pcr);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+                }else if (nextId == 3) {
+                    //新增洗澡
+                    BillClean pcr = (BillClean) newObject;
+                    cleanService.save(pcr);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+                }else if (nextId == 4) {
+                    //新增隔离
+                    BillIsolate pcr = (BillIsolate) newObject;
+                    isolateService.save(pcr);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+                }else if (nextId == 5) {
+                    BillDry pcr = (BillDry) newObject;
+                    dryService.save(pcr);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+                    //新增烘干
+                }else if (nextId == 6) {
+                    //新增洗澡前拍照
+                    BillCleanBefore before = (BillCleanBefore) newObject;
+                    beforeService.save(before);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+                }
+
+
+                billIsolate.setIsolateRealEndDate(new Date());
+                SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
+                Calendar cal1 = Calendar.getInstance();
+                Calendar cal2 = Calendar.getInstance();
+                Date startDate = sdf1.parse(start);
+                Date endDate = sdf1.parse(now);
+                cal1.setTime(startDate);
+                cal2.setTime(endDate);
+                long days = (cal2.getTimeInMillis() - cal1.getTimeInMillis()) / (1000 * 3600 * 24);
+                billIsolate.setIsolateRealDayNum(Long.toString(days));
+                billIsolate.setBillStatus(2);
+
+                baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + now);
+
+                String status = baseProcess.getCurrentStatus();
+                String substring = status.substring(0, status.length() - 1);
+                baseProcess.setCurrentStatus(substring + "1," + 0);
+
+
+                isolateService.updateById(billIsolate);
+                processService.updateById(baseProcess);
+            }
+        }
+    }
+
+    @Scheduled(cron = "0 0/1 * * * ? ")
+    private void pcr() throws Exception {
+        QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("bill_status", 1);
+        List<BillPcr> pcrs = pcrService.list(queryWrapper);
+        Date date = new Date();
+        for (BillPcr pcr : pcrs) {
+            Date subDate = pcr.getCheckDate();
+            // 将LocalDateTime转换为Date
+
+            if ((subDate.getTime() + pcr.getQualifiedDate()  * 60 * 1000) <= date.getTime()) {
+                pcr.setBillStatus(3);
+                pcrService.updateById(pcr);
+            }
+        }
+    }
+
+    //计算年龄
+    @Scheduled(cron = "0 0 0 * * ? ")
+    private void getAge()   {
+        System.out.println("开始");
+        List<SysUser> sysUsers = sysUserService.list();
+        for (SysUser sysUser : sysUsers) {
+            int i = DateUtil.ageOfNow(sysUser.getBirthday());
+            if (i !=sysUser.getAge() ){
+                sysUser.setAge(i);
+                sysUserService.updateById(sysUser);
+            }
+        }
+    }
+
+}