package cn.gtmap.estateplat.config.service.ztxx.impl;

import cn.gtmap.estateplat.config.BaseTest;
import cn.gtmap.estateplat.service.config.GxztService;
import cn.gtmap.estateplat.service.config.QlztService;
import cn.gtmap.estateplat.utils.CommonUtil;
import org.apache.commons.collections.CollectionUtils;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import static org.junit.Assert.*;

/*
 * @author <a href="mailto:huangzijian@gtmap.cn">huangzijian</a>
 * @version 1.0, 2018/1/29
 * @description 
 */public class QlztServiceImplTest  extends BaseTest {
    @Autowired
    QlztService qlztService;

    @Test
    public void getZsZmztByCqzh() throws Exception {
        String cqzh="0010420520,0010420521";
        if (cqzh.indexOf(",") > -1) {
            List<String> cqzhList = new LinkedList<String>();
            String[] gdcqzh = cqzh.split(",");
            cqzhList.addAll(Arrays.asList(gdcqzh));
            if (null != cqzhList && CollectionUtils.isNotEmpty(cqzhList)) {
                for (String dgcqzh : cqzhList) {
                    qlztService.getZsZmztByCqzh(dgcqzh);
                }
            }
        }else{
            qlztService.getZsZmztByCqzh(cqzh);
        }
    }

}