package com.zfire.jiasm.syncdata.upload.settlement;

import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
import com.zfire.jiasm.syncdata.service.SettlementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;



@Component
public class settlementSync {
    @Value("${installjyc}")
    private String installjyc = "";

    @Autowired
    private SettlementService  settlementService;

    @Scheduled(fixedDelayString = "${installjy}")
    private void process() {
        if (installjyc.equals(TaskConfigEnum.FALSE.getCode())) {
            return;
        }

        settlementService.syncData();
    }
}
