package com.huigou.topsun.base.orgImport;

import cn.hutool.core.util.ObjectUtil;
import com.huigou.topsun.base.orgImport.domain.TmpOrgData;
import com.huigou.topsun.base.orgImport.repository.OrgImportRepository;
import com.huigou.topsun.base.orgImport.repository.TmpOrgDataRepository;
import com.huigou.topsun.sap.fixedAssets.domain.TmpFixedAssessData;
import com.huigou.topsun.sap.fixedAssets.repository.TmpFixedAssessDataRepository;
import com.huigou.uasp.bmp.opm.application.OrgApplication;
import com.huigou.uasp.bmp.opm.domain.model.org.Org;
import com.huigou.uasp.tool.dataimport.application.ExcelImportInterface;
import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;

@Service("orgExcelImport")
public class OrgExcelImport implements ExcelImportInterface {

    @Autowired
    private OrgApplication orgApplication;
    @Autowired
    private TmpOrgDataRepository tmpOrgDataRepository;
    @Autowired
    private OrgImportRepository orgImportRepository;
    @Override
    public void executeImport(String batchNumber) {
        List<TmpOrgData> byBatchNumber = tmpOrgDataRepository.findByBatchNumber(batchNumber);
//        for (TmpOrgData tmpOrgData : byBatchNumber) {
//            String name = tmpOrgData.getName();
//            String[] split = name.split("/");
//
//        }
        System.out.println("========================="+byBatchNumber);
    }

}
