package cn.superdesk.uniorder.openapi.service.qchjc.organisation;

import cn.superdesk.uniorder.dubbo.facade.organisation.DubboSysEnterpriseService;
import cn.superdesk.uniorder.openapi.api._thirdpart.qchjc._dto.organisation.QchjcEnterpriseDto;
import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson2.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author xc
 * @description 处理集采同步过来的采购单位（企业）相关处理
 * @date 2022/3/24 16:56
 */
@Slf4j
@Component
public class EnterpriseService {
    @Reference(version = "1.0.0", timeout = 300000, retries = -1)
    private DubboSysEnterpriseService dubboSysEnterpriseService;

    /**
     * 处理集采采购单位数据
     * @param dto
     */
    public void receiveEnterpriseData(QchjcEnterpriseDto dto) {
        //同步数据
        dubboSysEnterpriseService.mergeReceiveVirtualarchitecture4Qchjc(JSON.toJSONString(dto));
    }
}
