package com.yuchen.saas.park.service.service.property.bill;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


@Slf4j
@Service
public class BillTaskService {
//    @Autowired
//    private IPropertyHouseBindFeeService propertyHouseBindFeeService;
//    @Autowired
//    private PropertyBillFactoryService propertyBillFactoryService;
//    @Resource
//    private PropertyBillMapper propertyBillMapper;
//
//
////    @Scheduled(cron = "0 30 * * * ?")
//    public void runLeaderboardSection() {
//        LambdaQueryWrapper<PropertyHouseBindFee> qw = new LambdaQueryWrapper<>();
//        qw.eq(PropertyHouseBindFee::getIsDeleted, NestConstant.DB_NOT_DELETED);
//        qw.le(PropertyHouseBindFee::getStartFeeDate, new Date());
//        qw.ge(PropertyHouseBindFee::getEndFeeDate, new Date());
//        List<PropertyHouseBindFee> list = propertyHouseBindFeeService.list(qw);
//        list.forEach(item -> {
//            CreateBillDto createBillDto = CreateBillDto.create();
//            PropertyCycleCreateBillDto cycleCreateBillDto = new PropertyCycleCreateBillDto();
//            cycleCreateBillDto.setHouseId(item.getHouseId());
//            cycleCreateBillDto.setFeeId(item.getFeeStandardId());
//            createBillDto.setCycleCreateBillDto(cycleCreateBillDto);
//            createBillDto.setCreateBillTypeEnum(CreateBillTypeEnum.CYCLE);
//            propertyBillFactoryService.createBill(createBillDto);
//        });
//
//    }
//
//
//    /**
//     *
//     * 规则： new Date() > receivable_date
//     *
//     */
////    @Scheduled(cron = "0 30 * * * ?")
//    public void updateArrearsStatus() {
//       int count = propertyBillMapper.updateArrearsBill();
//       log.info("共更新欠费账单数据 "+count+" 条");
//    }

}
