import com.dxhy.api.model.rz.rzInvoice.drrq.RzReqItem;
import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Allen
 * @version 1.0.0
 * @ClassName test.java
 * @Description TODO
 * @createTime 2023年08月16日 11:02:00
 */
public class test {
    public static void main(String[] args) throws Exception {
        String showStr = String.join(",", new ArrayList<>());
        System.out.println(showStr);


        String b = "batch_no\n" +
                "invoice_code\n" +
                "invoice_no";
        String krzpz = "\"'01','03','08','14','31','183','161','185','283','383','187'\"";
        List<String> rzfplx = Arrays.asList(krzpz.replace("\"", "").replace("'", "").split(","));

        System.out.println(rzfplx);
        System.out.println(rzfplx.size());
        System.out.println(rzfplx.contains("01"));
        System.out.println(rzfplx.contains("02"));


        List<RzReqItem> reqList = new ArrayList<>();
        RzReqItem ri = new RzReqItem();
        ri.setInvoiceCode("123");
        ri.setInvoiceNo("123");
        reqList.add(ri);

        RzReqItem ri1 = new RzReqItem();
        ri1.setInvoiceCode("123");
        ri1.setInvoiceNo("123");
        reqList.add(ri1);

        List<String> uuidList = new ArrayList<>();
        for (RzReqItem rz :
                reqList
        ) {
            String uuid = StringUtils.defaultString(rz.getInvoiceCode()) + StringUtils.defaultString(rz.getInvoiceNo());
            System.out.println(uuid);
            if (uuidList.contains(uuid)) {
                System.out.println("dashabi");

            } else {
                System.out.println("lalalalallalal");
                uuidList.add(uuid);
            }
        }

    }
}
