|
|
@ -28,6 +28,9 @@ import lombok.AllArgsConstructor; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.ZoneId; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.function.Consumer; |
|
|
|
|
|
|
@ -200,4 +203,16 @@ public class SzPlanService extends BaseService<SzPlanMapper, SzPlan> { |
|
|
|
.eq(SzPlan::getId, id); |
|
|
|
return this.getBaseMapper().selectCount(wp) > 0; |
|
|
|
} |
|
|
|
|
|
|
|
//获取当天零点时间
|
|
|
|
private Date getZeroTime() { |
|
|
|
return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
} |
|
|
|
|
|
|
|
public Boolean today(String id) { |
|
|
|
Wrapper<SzRecord> wp = Wrappers.<SzRecord>lambdaQuery() |
|
|
|
.eq(SzRecord::getPlanId, id) |
|
|
|
.eq(SzRecord::getCreateTime, getZeroTime()); |
|
|
|
return szCheckRecordMapper.selectCount(wp) > 0; |
|
|
|
} |
|
|
|
} |
|
|
|