package yem.wmc.imc.api;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.openapi.common.custom.annotation.*;
import kd.bos.openapi.common.result.CustomApiResult;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.util.StringUtils;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import yem.wmc.imc.utils.AllElectricLoginUtils;
import yem.wmc.imc.utils.CommonUtils;
import yem.wmc.imc.utils.HttpUtils;
import yem.wmc.imc.utils.MultipartFileDto;

import javax.validation.constraints.NotNull;
import java.io.*;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.util.*;

import static yem.wmc.imc.utils.JsonToDataUtils.*;


/**
 * @author 金亮
 * @date 2023/12/19 9:53
 * @description 调用第三方接口（发票识别, 发票查验），将返回的数据新增对应的单据
 * @versions 1.0
 */
@ApiController(value = "Invoice", desc = "发票识别,发票查验")
@ApiMapping("/yem/Invoice")
public class InvoiceRecognitionController implements Serializable {

    @ApiPostMapping(value = "/recognition", desc = "调用第三方接口，获取发票信息")
    public static CustomApiResult<JSONObject> nvoiceInformationapi(@ApiParam("测试传入json对象") JSONObject param) throws IOException {
        String base64String = null;
        if (param.containsKey("base64") && param.get("base64") != null) {
            base64String = param.getString("base64");
        }
        byte[] decodedBytes = Base64.getDecoder().decode(base64String);
        String name = (String) param.get("name");
        String filename = (String) param.get("filename");
        String type = (String) param.get("type");

        // 将字节数组转换为 InputStream 对象
        ByteArrayInputStream inputStream = new ByteArrayInputStream(decodedBytes);
        MultipartFile multipartFile = new MultipartFileDto(name, filename, type, inputStream);
        CustomApiResult<DynamicObject> dynamicObjectCustomApiResult = nvoiceInformation(multipartFile);  //DO
        DynamicObject data = dynamicObjectCustomApiResult.getData();
        JSONObject jsonObject = dataToJson(data);
        JSONObject object = jsonObject.getJSONObject("data");
        return CustomApiResult.success(object);
//        JSONObject jsonInvoice = Json.JSONInvoice();
//        return CustomApiResult.success(jsonInvoice);
    }

    public static CustomApiResult<DynamicObject> nvoiceInformationDynamic(MultipartFile multipartFile) throws IOException {
        CustomApiResult<DynamicObject> dynamicObjectCustomApiResult = nvoiceInformation(multipartFile);
        return dynamicObjectCustomApiResult;
    }

    /**
     * 赵岩峰
     * 手工录入-Web接口
     */
    @ApiPostMapping(value = "/recordmanually", desc = "手工录入")
    public static CustomApiResult<JSONObject> handmadeEntering(@ApiParam("测试传入json对象") JSONObject param) throws IOException {
        String invoiceCode = "";
        String invoiceNo = "";
        String drewDate = "";
        BigDecimal amount = BigDecimal.ZERO;

        if (param != null) {
            // 1.获取到这四个参数..
            if (param.containsKey("invoiceCode")) {
                invoiceCode = param.getString("invoiceCode");
            }
            if (param.containsKey("invoiceNo")) {
                invoiceNo = param.getString("invoiceNo");
            }
            if (param.containsKey("drewDate")) {
                drewDate = param.getString("drewDate");
            }
            if (param.containsKey("amount")) {
                amount = param.getBigDecimal("amount");
            }
        }
        //2.调用这个方法..
        CustomApiResult<DynamicObject> dynamicObjectCustomApiResult = nvoiceInformationHand(invoiceCode, invoiceNo, drewDate, amount);
        //3.使用返回的数据转换成json
        JSONObject jsonObject = dataToJson(dynamicObjectCustomApiResult.getData());
        // 减少一层json（data）
        JSONObject data = jsonObject.getJSONObject("data");
        //4.最后返回
        return CustomApiResult.success(data);
    }


    //手工录入(郭纪童)....
    public static CustomApiResult<DynamicObject> nvoiceInformationDynamicHand(String invoiceCode, String invoiceNo, String drewDate, BigDecimal amount) throws IOException {
        CustomApiResult<DynamicObject> dynamicObjectCustomApiResult = nvoiceInformationHand(invoiceCode, invoiceNo, drewDate, amount);
        return dynamicObjectCustomApiResult;
    }

    /**
     * 郭纪童
     * 手工录入
     *
     * @param invoiceCode
     * @param invoiceNo
     * @param drewDate
     * @param amount
     * @return
     * @throws IOException
     */
    public static CustomApiResult<DynamicObject> nvoiceInformationHand(String invoiceCode, String invoiceNo, String drewDate, BigDecimal amount) throws IOException {
        DynamicObject newdata = null;

        Map<String, String> invoiceCheckMap = invoiceCheck(0, invoiceCode, invoiceNo
                , amount, drewDate, "10", "051923", "d9eeba3d-bce7-4e0d-b9b3-c05686e0b3a5");
        //检测是否查验失败
        String checkResult = checkFailure(invoiceCheckMap);
        if (!checkResult.equals("true")) { //查验失败
            //使用发票识别的数据插入 增值税专用发票（识别）
//                            newdata = discernDateNewVATDedicatedInvoice(firstJson, serialNo, invoiceType);
//            return CustomApiResult.success(newdata);
        }
        if ("true".equals(invoiceCheckMap.get("status"))) {
            //新增增值税专用发票（查验）
            String dataString = invoiceCheckMap.get("data");
            JSONObject json = JSONObject.parseObject(dataString);

            JSONArray data = json.getJSONArray("data");
            for (Object o : data) {
                JSONObject obj = (JSONObject) o;
                //invoiceVO(票面信息 查验失败时不返回 以下都属于票面信息)
                JSONObject invoiceVO = null;
                if (obj.containsKey("invoiceVO")) {
                    invoiceVO = obj.getJSONObject("invoiceVO");
                }
                //发票类型
                DynamicObject dynamicObject = null;
                if (invoiceVO.containsKey("invoiceType")) {
                    dynamicObject = BusinessDataServiceHelper.loadSingle("yem_imc_invoicetype", new QFilter[]{new QFilter("number", QCP.equals, invoiceVO.getString("invoiceType"))});
                }
                //全电发票
                if ("09".equals(dynamicObject.getString("number"))) {
                    //全电发票
//                    newdata = newAllElectricInvoice(json);
                    String electricEntityName = "yem_imc_electric";
                    newdata = jsonToData(electricEntityName, json, "B", "手工录入");

                }
                //增值税电子专用发票
                if ("08".equals(dynamicObject.getString("number"))) {
//                    newdata = newVATDedicatedInvoice(json);
                    String esinvoiceEntityName = "yem_imc_esinvoice"; //增值税专用发票表名
                    newdata = jsonToData(esinvoiceEntityName, json, "B", "手工录入");

                }
                //增值税普通发票（卷票）
                if ("11".equals(dynamicObject.getString("number"))) {
//                    newdata = newVATOrdinaryInvoice(json);
                    String eoinvoiceEntityName = "yem_imc_eoinvoice";
                    newdata = jsonToData(eoinvoiceEntityName, json, "B", "手工录入");
                }
            }

        } else {
//            return CustomApiResult.fail("false", invoiceDiscernMap.get("data"));
        }
        return CustomApiResult.success(newdata);
    }


    /**
     * 金亮
     * 文件上传 根据情况不同的数据插入不同的表中
     *
     * @param multipartFile 文件
     */
    public static CustomApiResult<DynamicObject> nvoiceInformation(MultipartFile multipartFile) throws IOException {
        final String DISCERN = "A"; //转换数据类型 A-识别
        final String CHECKTYPE = "B"; //转换数据类型 B-查验
        final String INVOICESOURCE_UPLOADING = "文件上传"; //发票来源

        JSONArray List = null;
        JSONObject json = null;
        DynamicObject newdata = null;
        String serialNo = ""; // 查验需要的识别流水号
        // 调用第三方发票识别接口
        Map<String, String> invoiceDiscernMap = invoiceDiscern(multipartFile);
            if ("true".equals(invoiceDiscernMap.get("status"))) {
                json = JSONObject.parseObject(invoiceDiscernMap.get("data"));//识别源生json
                if (invoiceDiscernMap.containsKey("type")){ //海运跟踪下载
                    String esinvoiceEntityName = "yem_oc_shipdownload";//海运跟踪下载
                    newdata = jsonToData(esinvoiceEntityName,json); //todo
                    return CustomApiResult.success(newdata);
                }
                if (json.containsKey("data")) {
                    JSONObject data = json.getJSONObject("data");
                    // 获取发票识别流水号
                    serialNo = json.getString("serialNo");
                    if (data.containsKey("invoiceList")) {
                        if (data.getJSONArray("invoiceList").size() > 0) {
                            List = data.getJSONArray("invoiceList");//增值税发票信息List
                        }
                    }
                    if (data.containsKey("nonVatInvoiceList")) {
                        if (data.getJSONArray("nonVatInvoiceList").size() > 0) {
                            List = data.getJSONArray("nonVatInvoiceList");//非增值税发票信息List
                        }
                    }
                    if (data.containsKey("errorList")) {//发票识别失败List
                        if (data.getJSONArray("errorList").size() > 0) {
                            return CustomApiResult.fail("true", data.getJSONArray("errorList").toString());
                        }
                    }
                }else {
                    return CustomApiResult.fail("false", "json中不包含data");
                }
                JSONObject firstJson = (JSONObject) List.get(0); //12/22日修改，只会获取发票识别返回json中的第一条数据（一般也只会有一条数据）
                JSONObject obj = (JSONObject) firstJson;
                if (obj.containsKey("invoiceType")) {
                    String invoiceType = obj.getString("invoiceType");
                    switch (invoiceType) {
                        case "01": //增值税专用发票
                        case "08": //增值税专用发票（电子）
                            String esinvoiceEntityName = "yem_imc_esinvoice"; //增值税专用发票表名
                            //调用发票查验方法
                            Map<String, String> invoiceCheckMap = invoiceCheck(0, "012002300211", "57227786"
                                    , BigDecimal.valueOf(75.49), "2023-10-28", "10", "051923", serialNo);
                            //检测是否查验失败
                            String checkResult = checkFailure(invoiceCheckMap);
                            if (!checkResult.equals("true")) { //查验失败
                                //新增增智慧专业发票数据（识别）
                                newdata = jsonToData(esinvoiceEntityName, json, DISCERN, "手工录入");
                                return CustomApiResult.success(newdata);
                            }
                            if ("true".equals(invoiceCheckMap.get("status"))) {
                                //新增增智慧专业发票数据（查验）
                                newdata = jsonToData(esinvoiceEntityName, JSONObject.parseObject(invoiceCheckMap.get("data")), CHECKTYPE, INVOICESOURCE_UPLOADING);
                            } else {
                                return CustomApiResult.fail("false", invoiceDiscernMap.get("data"));
                            }
                            break;
                        case "04": //增值税普通发票
                        case "10": //增值税普通发票（电子）
                        case "11": //增值税普通发票（卷票）
                            String eoinvoiceEntityName = "yem_imc_eoinvoice";
                            //调用发票查验方法
                            Map<String, String> invoiceCheckMap1 = invoiceCheck(0, "012002300211", "57227786", BigDecimal.valueOf(75.49), "2023-10-28", "10", "051923", serialNo);
                            //检测是否查验失败
                            String checkResult1 = checkFailure(invoiceCheckMap1);
                            if (!checkResult1.equals("true")) { //查验失败
                                //使用发票识别的数据插入 增值税普通发票（识别）
                                newdata = jsonToData(eoinvoiceEntityName, json, DISCERN, INVOICESOURCE_UPLOADING);
                                return CustomApiResult.success(newdata);
                            }
                            if ("true".equals(invoiceCheckMap1.get("status"))) {
                                //新增增值税普通发票（查验）
                                newdata = jsonToData(eoinvoiceEntityName, JSONObject.parseObject(invoiceCheckMap1.get("data")), CHECKTYPE, INVOICESOURCE_UPLOADING);
                            } else {
                                return CustomApiResult.fail("false", invoiceDiscernMap.get("data"));
                            }
                            break;
                        case "14": //道路通行费电子普通发票
                            //待添加......
                            break;
                        case "09": //全电发票（增值税专用发票）
                        case "90": //全电发票（普通发票）
                            String electricEntityName = "yem_imc_electric";
                            //调用发票查验方法
                            Map<String, String> invoiceCheckMap2 = invoiceCheck(0, "012002300211", "57227786", BigDecimal.valueOf(75.49), "2023-10-28", "10", "051923", serialNo);
                            //检测是否查验失败
                            String checkResult2 = checkFailure(invoiceCheckMap2);
                            if (!checkResult2.equals("true")) { //查验失败
                                //使用发票识别的数据插入 全电发票（识别）
                                newdata = jsonToData(electricEntityName, json, DISCERN, INVOICESOURCE_UPLOADING);
                                return CustomApiResult.success(newdata);
                            }
                            if ("true".equals(invoiceCheckMap2.get("status"))) {
                                //新增全电发票（查验）
                                newdata = jsonToData(electricEntityName, JSONObject.parseObject(invoiceCheckMap2.get("data")), CHECKTYPE, INVOICESOURCE_UPLOADING);
                            } else {
                                return CustomApiResult.fail("false", invoiceDiscernMap.get("data"));
                            }
                            break;
                        case "207": //新增出租车票
                            String taxiEntityName = "yem_imc_taxi";
                            newdata = jsonToData(taxiEntityName, json, DISCERN, INVOICESOURCE_UPLOADING);
                            break;
                        case "202":// 新增飞机票
                            String airEntityName = "yem_imc_air";
                            newdata = jsonToData(airEntityName, json, DISCERN, INVOICESOURCE_UPLOADING);
                            break;
                        case "201": // 新增火车票
                            String trainsEntityName = "yem_imc_trains";
                            newdata = jsonToData(trainsEntityName, json, DISCERN, INVOICESOURCE_UPLOADING);
                            break;
                        case "210": //滴滴出行行程单
                            String travelEntityName = "yem_imc_travel";
                            newdata = jsonToData(travelEntityName, json, DISCERN, INVOICESOURCE_UPLOADING);
                            break;
                        default: //todo 待续...
                            break;
                    }
                }
            } else {
                return CustomApiResult.fail("false", invoiceDiscernMap.get("data"));
            }

        return CustomApiResult.success(newdata);
    }

    /**
     * 检测查验失败的接口
     *
     * @param invoiceCheckMap
     * @return
     */
    private static String checkFailure(Map<String, String> invoiceCheckMap) {
        JSONObject checkErrorJson = JSONObject.parseObject(invoiceCheckMap.get("data"));
        if (checkErrorJson.containsKey("data")) {
            JSONArray data = checkErrorJson.getJSONArray("data");
            if (data.size() == 1) {
                JSONObject errorJsonObj = (JSONObject) data.get(0);
                if (errorJsonObj.containsKey("exceptionInfo")) {
                    return "查验失败！  " + errorJsonObj.getString("exceptionInfo");
                }
            }
        }
        if (!checkErrorJson.getString("code").equals("200")) {
            String message = checkErrorJson.getString("message");
            return "查验失败！  " + message;
        }
        return "true";
    }

    /**
     * 发票识别接口
     *
     * @return
     */
    public static Map<String, String> invoiceDiscern(MultipartFile multipartFile) {
        // 需要更换地址
//        File myFile = new File("D:/Cosmic_IDEAService/YEM_WMInvoice/WMInvoice/src/main/java/kd/cosmic/file/【及时用车-22.58元-1个行程】高德打车电子发票.pdf");
//        MultipartFile multipartFile = fileToMultipartFile(myFile);
        Map<String, String> result = new HashMap<>();
        Map<String, String> map = new HashMap<>();
        String json = null;

//        map.put("UserAgent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24");
//        map.put("ContentType", "application/json;charset=UTF-8");
        String Token = CommonUtils.getToken();
//        map.put("X-Access-Token", Token); //需要更换token
//        String url = "https://huisuiyun.com/api/v2/agent/cdk/invoice/discern";
//        String discern = InvoiceUtils.doPostFormData(url, "file", multipartFile, new HashMap<>(), map);
        String discern = "";
        if ("dzfp_23922000000032305987_第八元素环境技术有限公司_20231128114314.pdf".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"d9eeba3d-bce7-4e0d-b9b3-c05686e0b3a5\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[{\"pageNumber\":null,\"purchaserBankAccount\":null,\"sellerName\":\"青岛宏景动力信息技术有限公司\",\"sellerContacts\":null,\"remark\":\"\",\"drewDate\":\"2023-11-28\",\"payee\":\"\",\"path\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/249cf5d7-527e-454b-bd54-f522d7002d6c21920231216/19121ede-5ef7-4f2d-8990-21614fbb2eb4.pdf\",\"cipherText\":null,\"formName\":null,\"invoiceType\":\"09\",\"imageSize\":[595,397],\"invoiceNo\":\"23922000000032305987\",\"amount\":\"311644.52\",\"pageCount\":null,\"orientation\":0,\"formType\":\"\",\"kind\":\"服务\",\"filePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/249cf5d7-527e-454b-bd54-f522d7002d6c21920231216/19121ede-5ef7-4f2d-8990-21614fbb2eb4.pdf\",\"drawer\":\"周爱侠\",\"agentMark\":\"0\",\"companySeal\":\"0\",\"reviewer\":\"\",\"invoiceCode\":\"\",\"purchaserName\":\"第八元素环境技术有限公司\",\"checkCode\":\"\",\"sellerTaxNo\":\"91370213MA3R0CR01P\",\"purchaserContacts\":null,\"purchaserTaxNo\":\"91340100MA2N13WH8C\",\"blockChainMark\":\"0\",\"sellerBankAccount\":null,\"page\":0,\"amountWithTax\":\"330343.20\",\"taxAmount\":\"18698.68\",\"region\":[0,0,595,397],\"items\":[{\"goodsName\":\"*信息技术服务*外贸产品租赁\",\"amount\":\"56603.77\",\"specification\":\"\",\"unit\":\"次\",\"quantity\":\"1\",\"unitPrice\":\"56603.7735849057\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"6%\",\"taxAmount\":\"3396.23\"},{\"goodsName\":\"*信息技术服务*实施开发服务\",\"amount\":\"255040.75\",\"specification\":\"\",\"unit\":\"次\",\"quantity\":\"1\",\"unitPrice\":\"255040.754716981\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"6%\",\"taxAmount\":\"15302.45\"}]}],\"nonVatInvoiceList\":[],\"errorList\":[]}}";
        } else if ("微信图片_20231206154120.png".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"8a5d8de7-65e2-49a7-a4df-b32ae4c71cd2\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[],\"nonVatInvoiceList\":[{\"surcharge\":\"0.00\",\"fare\":\"43.00\",\"amountWithTaxBig\":\"肆拾叁元整\",\"city\":\"\",\"imagePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/9dcf52ca-b538-49b3-8694-40c165cfd09257820231216/a75afb54-6248-45dd-8774-70d93872ac4a.png\",\"drewDate\":\"2023-11-25\",\"path\":null,\"licensePlate\":\"A·D88907\",\"province\":\"陕西省\",\"invoiceType\":\"207\",\"imageSize\":[842,381],\"place\":\"陕西省\",\"invoiceNo\":\"27289757\",\"timeGetOff\":\"00:39\",\"timeGetOn\":\"00:20\",\"mileage\":\"15.6\",\"ext28\":null,\"ext27\":null,\"orientation\":270,\"ext26\":null,\"ext25\":null,\"ext24\":null,\"ext23\":null,\"ext22\":null,\"kind\":\"交通\",\"ext21\":null,\"invoiceCode\":\"161002318101\",\"ext29\":null,\"detailList\":[],\"ext30\":null,\"page\":0,\"amountWithTax\":\"43.00\",\"region\":[12,35,728,304],\"extXXX\":null}],\"errorList\":[]}}";
        } else if ("微信图片_20231205145844.png".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"4899f90c-3c9b-4413-9443-ad98c82c8b3e\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[],\"nonVatInvoiceList\":[{\"insurance\":\"XXX\",\"fare\":\"302.00\",\"passengerName\":\"周超\",\"endorsement\":\"Q不得签转退改收费\",\"amountWithTaxBig\":\"肆佰陆拾贰元整\",\"imagePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/78583731-3a74-473a-8e90-10ba213dedb076520231216/f9e7bbaa-8483-4210-a584-d9b624661c87.png\",\"agentCode\":\"SHA166,08677392\",\"internationalFlag\":\"\",\"drewDate\":\"2023-11-25\",\"totalTax\":\"\",\"path\":null,\"printSerialNumber\":\"54921823541\",\"invoiceType\":\"202\",\"imageSize\":[1121,474],\"invoiceNo\":\"7812489065429\",\"createDate\":\"2023-11-25\",\"ext28\":null,\"ext27\":null,\"orientation\":0,\"ext26\":null,\"amount\":null,\"ext25\":null,\"ext24\":null,\"ext23\":null,\"ext22\":null,\"issueBy\":\"北京睿浩远信息技术有限公司\",\"kind\":\"交通\",\"ext21\":null,\"caacDevelopmentFund\":\"50.00\",\"ext29\":null,\"checkCode\":\"2354\",\"passengerUserId\":\"610527199806126019\",\"taxRate\":null,\"detailList\":[{\"seat\":\"T\",\"allow\":\"20K\",\"flyDate\":\"2023-11-19\",\"carrier\":\"东航\",\"flyTime\":\"23:35\",\"className\":\"经济舱\",\"flyFrom\":\"西安-咸阳\",\"flyTo\":\"青岛-胶东\",\"flightNumber\":\"MU6532\"}],\"ext30\":null,\"page\":0,\"amountWithTax\":\"462.00\",\"region\":[0,0,1121,474],\"taxAmount\":\"34.02\",\"fuelSurcharge\":\"110.00\",\"extXXX\":null}],\"errorList\":[]}}";
        } else if ("微信图片_20231205145741.png".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"9b5dd7a0-e9e8-4bbb-a2eb-9b5def513f89\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[],\"nonVatInvoiceList\":[{\"stationGetOn\":\"西安北\",\"passengerName\":\"任召召\",\"amountWithTaxBig\":\"伍佰肆拾柒元伍角\",\"imagePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/efab97af-eae8-40ac-b11b-05effff3f81610620231216/2f39ddda-28e3-4a9c-9697-4ab3fb0875a4.png\",\"drewDate\":\"2023-11-26\",\"getOnDate\":\"2023-11-26\",\"path\":null,\"stationGetOff\":\"北京西\",\"invoiceType\":\"201\",\"imageSize\":[505,312],\"invoiceNo\":\"115M039899\",\"userNumber\":\"6125011998****289X\",\"ext28\":null,\"ext27\":null,\"orientation\":0,\"ext26\":null,\"amount\":null,\"ext25\":null,\"serialNumber\":\"39032301151127M039899\",\"ext24\":null,\"ext23\":null,\"ext22\":null,\"kind\":\"交通\",\"ext21\":null,\"ext29\":null,\"seat\":\"二等座\",\"taxRate\":null,\"getOnTime\":\"11:57\",\"detailList\":[],\"ext30\":null,\"page\":0,\"trainNumber\":\"G430\",\"amountWithTax\":\"547.50\",\"region\":[0,0,484,312],\"taxAmount\":\"45.21\",\"extXXX\":null}],\"errorList\":[]}}";
        } else if ("微信图片_20231205204735.jpg".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"7e1081d5-b2de-4639-93ac-3575ad496aaf\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[{\"pageNumber\":null,\"purchaserBankAccount\":\"浦发银行市南支行69050078801700000719\",\"sellerName\":\"北京京东广能贸易有限公司\",\"sellerContacts\":\"北京市顺义区大孙各庄镇七大路后岭上段3号院57807000\",\"remark\":\"dd75253569777(00001, 2826654465750)\",\"drewDate\":\"2023-10-23\",\"payee\":\"王陆\",\"path\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/04dc012a-4aef-4c1e-b253-229414e07ce643720231216/0177a362-c41f-4528-8a2a-9e6be12508f7.jpg\",\"cipherText\":\"94<>57+4/550<7123>3344<6><-,4<<+<143-83/6<09046+6*/*429,574*80417659334/<-843/370/0,27--0**+68209<-36168084*>+>\",\"formName\":\"抵扣联\",\"invoiceType\":\"01\",\"imageSize\":[720,540],\"invoiceNo\":\"07476632\",\"amount\":\"24.68\",\"pageCount\":null,\"orientation\":0,\"formType\":\"第二联\",\"kind\":\"办公\",\"filePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/04dc012a-4aef-4c1e-b253-229414e07ce643720231216/0177a362-c41f-4528-8a2a-9e6be12508f7.jpg\",\"drawer\":\"张丽丽\",\"agentMark\":\"0\",\"companySeal\":\"1\",\"reviewer\":\"李恩\",\"invoiceCode\":\"1100231130\",\"purchaserName\":\"斯坦德技术工程(青岛)有限公司\",\"checkCode\":\"\",\"sellerTaxNo\":\"91110113MA019HUX48\",\"purchaserContacts\":\"山东省青岛市城阳区宏祥一路17号18号楼0532-58557765\",\"purchaserTaxNo\":\"91370222MA3QWRF42B\",\"blockChainMark\":\"0\",\"sellerBankAccount\":\"交通银行北京海淀支行110060576018800043070\",\"page\":0,\"amountWithTax\":\"27.89\",\"taxAmount\":\"3.21\",\"region\":[0,0,720,540],\"items\":[{\"goodsName\":\"*文具*真关(PA4)交A9.3g*国色页双头克送务连华畜商机号管理 有领金份管U市生1年口限份12室\",\"amount\":\"12.48\",\"specification\":\"ARPM2001\",\"unit\":\"盒\",\"quantity\":\"1\",\"unitPrice\":\"12.48\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"1.62\"},{\"goodsName\":\"*家具*剂(AA2TA0.AsM色自油试 \",\"amount\":\"-1.25\",\"specification\":\"\",\"unit\":\"\",\"quantity\":\"\",\"unitPrice\":\"\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"-0.16\"},{\"goodsName\":\"平国家试单性宅 市杭度验第11京公州3\",\"amount\":\"14.16\",\"specification\":\"AJD97391\",\"unit\":\"\",\"quantity\":\"\",\"unitPrice\":\"\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"1.84\"},{\"goodsName\":\"*文具*源片学AB3安A级力原包底TYOS瓶过能套雪*nty(.che/0>办江商品本价能订N1501\",\"amount\":\"-0.71\",\"specification\":\"\",\"unit\":\"卷\",\"quantity\":\"94\",\"unitPrice\":\"3.54\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"-0.09\"}]}],\"nonVatInvoiceList\":[],\"errorList\":[]}}";
        } else if ("【去哪儿网】快递费电子报销凭证.pdf".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"bac25214-b23c-4be3-a0a1-bad5f3439cb8\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[{\"pageNumber\":null,\"purchaserBankAccount\":\"招商银行股份有限公司青岛崂山支行532910436410288\",\"sellerName\":\"去哪儿网(天津)国际旅行社有限公司\",\"sellerContacts\":\"天津市武清区京津电子商务产业园综合办公楼549室022-58802155\",\"remark\":\"\",\"drewDate\":\"2023-12-16\",\"payee\":\"李今\",\"path\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231221/d07f78d7-04a5-48d2-8d10-15440ac166b070120231221/4fafc2a9-4a3d-4f9c-b661-dd95543f87b8.pdf\",\"cipherText\":\"+-94<749176>><*-2647*>8768+,4+596/92427>51**66<14-730/+,83<<2341-62->042>6*826578/9,564<6879+4>164->5+>*72>7/<1\",\"formName\":null,\"invoiceType\":\"10\",\"imageSize\":[2000,1294],\"invoiceNo\":\"24598853\",\"amount\":\"18.87\",\"pageCount\":null,\"orientation\":0,\"formType\":\"\",\"kind\":\"服务\",\"filePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231221/d07f78d7-04a5-48d2-8d10-15440ac166b070120231221/4fafc2a9-4a3d-4f9c-b661-dd95543f87b8.pdf\",\"drawer\":\"王梦\",\"agentMark\":\"0\",\"companySeal\":\"1\",\"reviewer\":\"李佳妹\",\"invoiceCode\":\"012002300311\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"checkCode\":\"51237582924241180746\",\"sellerTaxNo\":\"91120222300429132L\",\"purchaserContacts\":\"青岛市市南区颐和国际A座320813379001066\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"blockChainMark\":\"0\",\"sellerBankAccount\":\"上海浦东发展银行天津浦顺支行77170154740006954\",\"page\":0,\"amountWithTax\":\"20.00\",\"taxAmount\":\"1.13\",\"region\":[0,0,2000,1294],\"items\":[{\"goodsName\":\"*经纪代理服务*代订附加产品\",\"amount\":\"18.87\",\"specification\":\"\",\"unit\":\"次\",\"quantity\":\"1\",\"unitPrice\":\"18.86792453\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"6%\",\"taxAmount\":\"1.13\"}]}],\"nonVatInvoiceList\":[],\"errorList\":[]}}";
        } else if ("_23442000000010575288.pdf".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"23e1ad73-6439-4e1f-ba11-10c0250cdc18\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[{\"pageNumber\":\"1\",\"purchaserBankAccount\":null,\"sellerName\":\"中山市明科金属制品有限公司\",\"sellerContacts\":null,\"remark\":\"\",\"drewDate\":\"2023-02-06\",\"payee\":\"\",\"path\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/efdfbf7d-d80c-4baa-89ea-f16f8b6ade5c29520231216/db76d8be-4e92-47de-b647-783874f52e0e.pdf\",\"cipherText\":null,\"formName\":null,\"invoiceType\":\"09\",\"imageSize\":[1414,2000],\"invoiceNo\":\"23442000000010575288\",\"amount\":\"129650.61\",\"pageCount\":\"2\",\"orientation\":0,\"formType\":\"\",\"kind\":\"日用\",\"filePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/temp/default/791512aa-6bca-4c60-b605-2c3be58a208455120231216/b1fc8bfc-d308-4841-a541-6d08fc4b3c00.jpg\",\"drawer\":\"陶红\",\"agentMark\":\"0\",\"companySeal\":\"0\",\"reviewer\":\"\",\"invoiceCode\":\"\",\"purchaserName\":\"华帝股份有限公司\",\"checkCode\":\"\",\"sellerTaxNo\":\"91442000747054445Q\",\"purchaserContacts\":null,\"purchaserTaxNo\":\"91442000618120215D\",\"blockChainMark\":\"0\",\"sellerBankAccount\":null,\"page\":0,\"amountWithTax\":\"146505.19\",\"taxAmount\":\"16854.58\",\"region\":[0,0,1414,2000],\"items\":[{\"goodsName\":\"*金属制品*密封垫ZT22-04/丁晴橡胶/Φ13.5/RoHS\",\"amount\":\"2042.37\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"46624\",\"unitPrice\":\"0.043805157889\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"265.50\"},{\"goodsName\":\"*金属制品*3.8P分火器RS3.8P.1-0精车\",\"amount\":\"4940.32\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"368\",\"unitPrice\":\"13.4247787610619\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"642.24\"},{\"goodsName\":\"*金属制品*分火器组件RS50B_2-0/铝合金/喷黑漆\",\"amount\":\"11303.95\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"714\",\"unitPrice\":\"15.8318584070796\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"1469.51\"},{\"goodsName\":\"*金属制品*喷嘴VZT12-4A-65/S12/HPb59-1/0.65/无侧孔/RoHS\",\"amount\":\"373.10\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"340\",\"unitPrice\":\"1.0973451327434\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"48.50\"},{\"goodsName\":\"*金属制品*喷嘴VZT12-3B-135/S12/HPb59-1/1.35/侧2/RoHS\",\"amount\":\"358.05\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"340\",\"unitPrice\":\"1.0530973451327\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"46.55\"},{\"goodsName\":\"*金属制品*喷嘴VZT12-3F-145/S12/HPb59-1/1.45/2.6/RoHS\",\"amount\":\"194.82\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"185\",\"unitPrice\":\"1.0530973451327\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"25.33\"},{\"goodsName\":\"*金属制品*喷嘴VZT12-4A-90/S12/HPb59-1/0.90/无侧孔\",\"amount\":\"167.26\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"150\",\"unitPrice\":\"1.1150442477876\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"21.74\"},{\"goodsName\":\"*金属制品*旋塞阀B864B-20Y-0/90°左双20YΦ0.6\",\"amount\":\"16832.66\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"999\",\"unitPrice\":\"16.8495132300442\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"2188.25\"},{\"goodsName\":\"*金属制品*63#旋塞阀VZT10.63-0-12T/90° /左双L39/45\",\"amount\":\"6248.10\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"363\",\"unitPrice\":\"17.212389380531\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"812.25\"},{\"goodsName\":\"*金属制品*63B#旋塞阀VZT10.63B-0/90° /左双L39/Y/45\",\"amount\":\"6093.19\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"354\",\"unitPrice\":\"17.212389380531\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"792.11\"},{\"goodsName\":\"*金属制品*64#旋塞阀VZT10_64-0-12T/90°/4.5kW/L45/0.6\",\"amount\":\"815.04\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"100\",\"unitPrice\":\"8.1504424778761\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"105.96\"},{\"goodsName\":\"*金属制品*旋塞阀VZT10_64F-0-20Y/90° /L43/20Y0.6/RoHS\",\"amount\":\"2703.01\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"332\",\"unitPrice\":\"8.141592920354\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"351.39\"},{\"goodsName\":\"*金属制品*旋塞阀VZT10_63F-0-20Y-50/90°/左双/L47/20Y/0.6\",\"amount\":\"3855.58\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"224\",\"unitPrice\":\"17.2124288874842\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"501.23\"},{\"goodsName\":\"*金属制品*旋塞阀B864B-12T-0/90°左双12TΦ0.6\",\"amount\":\"36801.99\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"2125\",\"unitPrice\":\"17.3185840707965\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"4784.26\"},{\"goodsName\":\"*金属制品*旋塞阀B864A-12T-0/90°左双12TΦ0.6\",\"amount\":\"13585.84\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"800\",\"unitPrice\":\"16.9823008849558\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"1766.16\"},{\"goodsName\":\"*金属制品*64B#旋塞阀VZT10_64B-0-12T-42/90° /45/0.6mm\",\"amount\":\"8867.68\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"1088\",\"unitPrice\":\"8.1504424778761\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"1152.80\"},{\"goodsName\":\"*金属制品*旋塞阀VZT10_64E-0-12T-50/90°/左双/L43/12T/0.6\",\"amount\":\"2282.12\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"280\",\"unitPrice\":\"8.1504424778761\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"296.68\"},{\"goodsName\":\"*金属制品*旋塞阀VZT1064F-0-12T/90° /L43/12T\",\"amount\":\"1628.32\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"200\",\"unitPrice\":\"8.141592920354\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"211.68\"}]},{\"pageNumber\":\"2\",\"purchaserBankAccount\":null,\"sellerName\":\"中山市明科金属制品有限公司\",\"sellerContacts\":null,\"remark\":\"\",\"drewDate\":\"2023-02-06\",\"payee\":\"\",\"path\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20231216/efdfbf7d-d80c-4baa-89ea-f16f8b6ade5c29520231216/db76d8be-4e92-47de-b647-783874f52e0e.pdf\",\"cipherText\":null,\"formName\":null,\"invoiceType\":\"09\",\"imageSize\":[1414,2000],\"invoiceNo\":\"23442000000010575288\",\"amount\":\"129650.61\",\"pageCount\":\"2\",\"orientation\":0,\"formType\":\"\",\"kind\":\"其他\",\"filePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/temp/default/cfc8e392-af99-4bdb-ac79-6780f25adb119120231216/affa45bc-4438-4127-975c-0ce32a502ddd.jpg\",\"drawer\":\"陶红\",\"agentMark\":\"0\",\"companySeal\":\"0\",\"reviewer\":\"\",\"invoiceCode\":\"\",\"purchaserName\":\"华帝股份有限公司\",\"checkCode\":\"\",\"sellerTaxNo\":\"91442000747054445Q\",\"purchaserContacts\":null,\"purchaserTaxNo\":\"91442000618120215D\",\"blockChainMark\":\"0\",\"sellerBankAccount\":null,\"page\":1,\"amountWithTax\":\"146505.19\",\"taxAmount\":\"16854.58\",\"region\":[0,0,1414,1146],\"items\":[{\"goodsName\":\"*金属制品*旋塞阀VZT10_64G-0-12T-45/90° /L43/0.6/RoHS\",\"amount\":\"2937.35\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"360\",\"unitPrice\":\"8.1593166175025\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"381.86\"},{\"goodsName\":\"*金属制品*旋塞阀VZT10_63E-0-12T-50/90°/左双/L47/12T/0.6\",\"amount\":\"7573.45\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"440\",\"unitPrice\":\"17.212389380531\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"984.55\"},{\"goodsName\":\"*金属制品*分火器Q926B2-0/组件/喷黑/RoHS\",\"amount\":\"46.41\",\"specification\":\"\",\"unit\":\"只\",\"quantity\":\"4\",\"unitPrice\":\"11.6017699115044\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0,\"taxRate\":\"13%\",\"taxAmount\":\"6.03\"}]}],\"nonVatInvoiceList\":[],\"errorList\":[]}}";
        } else if ("滴滴出行行程报销单.pdf".equals((String) multipartFile.getName())) {
            json = "{\"serialNo\":\"c3d628d4-f841-41fd-9b56-0782e5838e37\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"invoiceList\":[],\"nonVatInvoiceList\":[{\"amountWithTaxBig\":\"叁佰贰拾捌元壹角捌分\",\"imagePath\":\"https://huisuiyun.oss-cn-shanghai.aliyuncs.com/pro/permanent/default/20240105/3594f9b4-df97-43f2-88b5-4580ddc25d1277020240105/0913f78e-7f24-4ff4-b76c-6d2c109115b7.pdf\",\"drewDate\":\"2023-12-16\",\"path\":null,\"getOffTime\":\"2023-10-31\",\"invoiceType\":\"210\",\"imageSize\":[],\"invoiceNo\":\"4562589634785626\",\"ext28\":null,\"ext27\":null,\"orientation\":0,\"ext26\":null,\"ext25\":null,\"ext24\":null,\"ext23\":null,\"ext22\":null,\"kind\":\"交通\",\"ext21\":null,\"ext29\":null,\"getOnTime\":\"2023-07-24\",\"phone\":\"13379001066\",\"detailList\":[{\"stationGetOn\":\"T2-P2停车库B1层-M4区等候点4\",\"getOffTime\":\"\",\"amount\":\"65.21\",\"carType\":\"滴滴快车\",\"orderTime\":\"\",\"getOnTime\":\"07-24 22:38 周一\",\"city\":\"上海市\",\"stationGetOff\":\"浦东新区|如家酒店(上海新国际博览中心高科西路罗山路店)\",\"producer\":\"\",\"mileage\":\"28.44\"},{\"stationGetOn\":\"张江|金蝶软件园-西北门\",\"getOffTime\":\"\",\"amount\":\"73.18\",\"carType\":\"滴滴快车\",\"orderTime\":\"\",\"getOnTime\":\"07-25 15:35 周二\",\"city\":\"上海市\",\"stationGetOff\":\"浦东新区迎宾大道6000号浦东国际机场F3|浦东国际机场-T2航站楼国内出发27\",\"producer\":\"\",\"mileage\":\"30.1\"},{\"stationGetOn\":\"T2-P2停车库B1层-L6区等候点3\",\"getOffTime\":\"\",\"amount\":\"86.64\",\"carType\":\"快车\",\"orderTime\":\"\",\"getOnTime\":\"10-30 13:22 周一\",\"city\":\"上海市\",\"stationGetOff\":\"浦东新区晨晖路金蝶软件园|金蝶软件园-2栋\",\"producer\":\"\",\"mileage\":\"27.9\"},{\"stationGetOn\":\"张江|金科路地铁站3口\",\"getOffTime\":\"\",\"amount\":\"15.38\",\"carType\":\"快车\",\"orderTime\":\"\",\"getOnTime\":\"10-30 20:30 周一\",\"city\":\"上海市\",\"stationGetOff\":\"浦东新区|如家酒店(上海新国际博览中心高科西路罗山路店)\",\"producer\":\"\",\"mileage\":\"3.8\"},{\"stationGetOn\":\"北蔡|如家酒店(上海新国际博览中心高科西路罗山路店)-东南门\",\"getOffTime\":\"\",\"amount\":\"16.00\",\"carType\":\"快车\",\"orderTime\":\"\",\"getOnTime\":\"10-31 08:56 周二\",\"city\":\"上海市\",\"stationGetOff\":\"张江|金蝶软件园(晨晖路)\",\"producer\":\"\",\"mileage\":\"2.3\"},{\"stationGetOn\":\"张江|金蝶软件园-西北门\",\"getOffTime\":\"\",\"amount\":\"71.77\",\"carType\":\"特惠快车\",\"orderTime\":\"\",\"getOnTime\":\"10-31 11:07 周二\",\"city\":\"上海市\",\"stationGetOff\":\"上海市浦东新区机场镇启航路900号上海浦东国际机场|上海浦东国际机场2号航站楼\",\"producer\":\"\",\"mileage\":\"32.51\"}],\"ext30\":null,\"page\":0,\"amountWithTax\":\"328.18\",\"region\":[],\"extXXX\":null}],\"errorList\":[]}}";
        } else if ("海运跟踪下载json数据.txt".equals((String) multipartFile.getName())) { // todo 新增
            json = "[{\"objlinertracking\":{\"keyid\":\"5294ee29-b4f2-47f9-a917-66ea4a641761\",\"localkeyid\":null,\"blprefix\":null,\"blno\":\"E470020041\",\"bkgno\":\"E470020041\",\"trfsno\":null,\"ctnrno\":\"TCNU3053817\",\"bkgvolumn\":\"4 units (4 * 40')\",\"plr\":\"PORT KLANG (MYPKG)\",\"plrcd\":\"MYLPK\",\"pol\":\"PORT KLANG (MYPKG)\",\"polcd\":\"MYLPK\",\"dtp\":\"NORFOLK\",\"dtpcd\":\"USORF\",\"pld\":\"CHICAGO, IL (USCHI)\",\"pldcd\":\"USCHI\",\"stsptime\":\"2023/10/16 21:29:00\",\"stspplace\":\"PORT KLANG - G-fortune depot\",\"fcgitime\":null,\"cggitime\":null,\"cloadtime\":null,\"cytctime\":null,\"cytcplace\":null,\"gitmtime\":null,\"gitmplace\":null,\"passtime\":null,\"passplace\":null,\"ispass\":null,\"ispreload\":null,\"lobdtime\":\"2023/10/24 8:49:00\",\"lobdplace\":\"PORT KLANG - WESTPORTS\",\"dlpttime\":\"2023/10/24 12:12:00\",\"dlptplace\":\"PORT KLANG - WESTPORTS\",\"etdpol\":\"2023/10/24 12:12:00\",\"trsptime\":\"2023/11/1 10:41:00\",\"trspplace\":\"SINGAPORE - PSA SINGAPORE\",\"etapld\":\"2023/12/12 12:00:00\",\"dschtime\":null,\"dschplace\":\"NORFOLK\",\"terminalpld\":\"\",\"terminaldtp\":\"NORFOLK INTERNATIONAL TERMINAL(NIT) (Firms code:L005)\",\"pickupreference\":null,\"railcode\":null,\"sealno\":null,\"csize\":null,\"ctype\":null,\"stcstime\":null,\"stcsplace\":null,\"rcvetime\":null,\"rcveplace\":null,\"currentnode\":\"TSDP\",\"currentnodetime\":\"2023/11/1 12:57:01\",\"currentnodeplace\":\"SINGAPORE\",\"depotcd\":null,\"depot\":null,\"terminalcd\":null,\"terminal\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"carriercd\":\"YML\",\"carrier\":null,\"updatetime\":\"2023/11/15 15:18:35\",\"createtime\":\"2023/10/24 20:45:28\",\"declarationno\":null,\"referenceno\":\"E470020041\",\"isctnr\":\"\",\"currentvslname\":\"ONE EAGLE\",\"currentvoy\":\"030E\",\"companycd\":null,\"endtime\":null,\"isendforce\":null,\"tmpstime\":null,\"istmps\":null,\"lstlinertrackingstatus\":[],\"lstlinertrackingais\":[],\"lstlinertrackingctnrinfo\":[{\"keyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"fkeyid\":\"5294ee29-b4f2-47f9-a917-66ea4a641761\",\"ctnrno\":\"TCNU3053817\",\"blno\":\"YMJAE470020041\",\"sealno\":\"YMAP326946\",\"csize\":\"40\",\"ctype\":\"HQ\",\"pkgs\":null,\"gwgt\":null,\"currentnode\":null,\"currentnodetime\":null,\"createtime\":\"2023/11/14 22:17:49\",\"updatetime\":\"2023/11/14 22:17:49\",\"lstLinertrackingStatus\":[{\"keyid\":\"0d736f7b-3fc1-4092-9ec7-e4decdb37d79\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"STSP\",\"statedescription\":\"提空\",\"statedescription_en\":\"Empty to Shipper\",\"statustime\":\"2023/10/17 10:28:00\",\"statusplace\":\"PORT KLANG - G-fortune depot\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"TRUCK\",\"transportationcd\":null},{\"keyid\":\"64f9df79-69ff-4d80-817c-a95e0dab9461\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":null,\"statedescription\":\"Received at Origin\",\"statedescription_en\":\"Received at Origin\",\"statustime\":\"2023/10/21 14:39:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:55:48\",\"createtime\":\"2023/11/15 15:18:35\",\"transportation\":null,\"transportationcd\":null},{\"keyid\":\"8246c2f6-2730-4603-8413-d18f8e454edd\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"LOBD\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board\",\"statustime\":\"2023/10/24 8:49:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"5c3e979b-8814-481d-ae7d-f195af8b1d3e\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"d8bbd214-cbd1-4dec-aa99-ba7066c06f59\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"87c31251-7b96-47bf-8a98-a9fd367b7959\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"4fe372e3-52bd-487c-bbde-699cbc03b27e\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"71fb75ea-b472-450f-bf0e-388b0d675bab\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"d5132449-c450-4c9c-ac6d-ce585f94c708\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"981009f9-8d2d-486c-9bb7-76bcf37d340f\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSDC\",\"statedescription\":\"卸船\",\"statedescription_en\":\"Discharged (Transit)\",\"statustime\":\"2023/10/25 23:08:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"\",\"transportationcd\":null},{\"keyid\":\"a322d700-992a-46db-8b24-2e640cc03f55\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSLB\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board (Transit)\",\"statustime\":\"2023/11/1 10:41:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"45eec973-d42c-4259-bb8f-29986c5f1deb\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"09a0a016-c969-4818-9d1f-778df302ee60\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:01\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"3f664380-b603-46f3-9a24-e6ed879c5500\",\"fkeyid\":\"77660ca2-234f-4db5-acbd-bf8e34883722\",\"blno\":\"E470020041\",\"statuscd\":\"BDAR\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"NORFOLK\",\"statusplacecd\":\"USORF\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 10:27:00\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null}]},{\"keyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"fkeyid\":\"5294ee29-b4f2-47f9-a917-66ea4a641761\",\"ctnrno\":\"TEMU7025048\",\"blno\":\"YMJAE470020041\",\"sealno\":\"YMAP326952\",\"csize\":\"40\",\"ctype\":\"HQ\",\"pkgs\":null,\"gwgt\":null,\"currentnode\":null,\"currentnodetime\":null,\"createtime\":\"2023/11/14 22:17:49\",\"updatetime\":\"2023/11/14 22:17:49\",\"lstLinertrackingStatus\":[{\"keyid\":\"24f7d2ad-8208-4dd7-a9c3-a688ba861b7d\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"STSP\",\"statedescription\":\"提空\",\"statedescription_en\":\"Empty to Shipper\",\"statustime\":\"2023/10/16 17:21:00\",\"statusplace\":\"PORT KLANG - G-fortune depot\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"TRUCK\",\"transportationcd\":null},{\"keyid\":\"e76f7951-2a3c-4c0e-b281-5d3928db8d1e\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":null,\"statedescription\":\"Received at Origin\",\"statedescription_en\":\"Received at Origin\",\"statustime\":\"2023/10/21 10:21:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:55:48\",\"createtime\":\"2023/11/15 15:18:35\",\"transportation\":null,\"transportationcd\":null},{\"keyid\":\"b195c066-b199-4370-8748-ee122b4c0fa1\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"LOBD\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board\",\"statustime\":\"2023/10/24 10:14:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"5ad253e9-372d-497f-bfd8-e9387f558096\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"9c5b5f23-67cb-4631-9b6e-e7a15d279ee7\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"0724f577-8d1e-407b-823c-7f484a2c5f84\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"c7f442b4-a9b6-4f9c-bded-b1c6a2bc5678\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"bd9139d8-8d10-45dc-bf60-34017222aa91\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"4cd4aa64-c65e-4b92-a2bc-4be6c9c21f67\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"ec3a0609-7905-4a37-a7f5-662b00361042\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSDC\",\"statedescription\":\"卸船\",\"statedescription_en\":\"Discharged (Transit)\",\"statustime\":\"2023/10/25 17:31:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"\",\"transportationcd\":null},{\"keyid\":\"d60d4148-3868-405c-8e37-bdb59ca2d392\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSLB\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board (Transit)\",\"statustime\":\"2023/11/1 9:19:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"e0125179-1414-49ab-b86f-2233cb3066bd\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"ab9a32ed-5e79-4045-b3ae-1b41d7775363\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:01\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"d20673b6-3314-45f5-a6ba-44c0f70cb727\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":\"E470020041\",\"statuscd\":\"BDAR\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"NORFOLK\",\"statusplacecd\":\"USORF\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 10:27:01\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"e96403a9-6cc3-4ec2-a15b-43e93850600b\",\"fkeyid\":\"e18aed90-c264-4034-bd63-8e3953572df8\",\"blno\":null,\"statuscd\":\"PDAR\",\"statedescription\":\"抵达交货地\",\"statedescription_en\":\"PLACE OF DELIVERY ARRIVAL\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"CHICAGO, IL (USCHI)\",\"statusplacecd\":\"USCHI\",\"statusplace_cn\":null,\"vslname\":null,\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":null,\"transportationcd\":null}]},{\"keyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"fkeyid\":\"5294ee29-b4f2-47f9-a917-66ea4a641761\",\"ctnrno\":\"YMLU9023607\",\"blno\":\"YMJAE470020041\",\"sealno\":\"YMAQ233904\",\"csize\":\"40\",\"ctype\":\"HQ\",\"pkgs\":null,\"gwgt\":null,\"currentnode\":null,\"currentnodetime\":null,\"createtime\":\"2023/11/14 22:17:49\",\"updatetime\":\"2023/11/14 22:17:49\",\"lstLinertrackingStatus\":[{\"keyid\":\"d2b6bf47-a693-4e67-9df7-5a20ccc6a89b\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"STSP\",\"statedescription\":\"提空\",\"statedescription_en\":\"Empty to Shipper\",\"statustime\":\"2023/10/18 0:01:00\",\"statusplace\":\"PORT KLANG - G-fortune depot\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"TRUCK\",\"transportationcd\":null},{\"keyid\":\"fa401a80-4bbb-4b99-a82a-2db2cf37d243\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":null,\"statedescription\":\"Received at Origin\",\"statedescription_en\":\"Received at Origin\",\"statustime\":\"2023/10/21 12:13:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:55:49\",\"createtime\":\"2023/11/15 15:18:35\",\"transportation\":null,\"transportationcd\":null},{\"keyid\":\"a00412f9-bb69-4af6-9113-7d82e7366dd2\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"LOBD\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board\",\"statustime\":\"2023/10/24 11:09:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"5d3ea569-cedf-4451-890c-b4083cf6629b\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"c4759179-f094-4895-a8d9-cf92bc492ee9\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"b6191637-0c76-44a4-bfd8-ff95be060130\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"18d7fba1-a5c0-4bd6-9d77-e7b8d0ecc347\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"ae0a3a0f-0521-4a30-8176-ea010736adf9\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"bf8ea475-3632-479b-a292-d6fcde44bf7f\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"b8188a8a-a8b2-4a54-bfaa-258830167a6b\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSDC\",\"statedescription\":\"卸船\",\"statedescription_en\":\"Discharged (Transit)\",\"statustime\":\"2023/10/25 23:36:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"\",\"transportationcd\":null},{\"keyid\":\"972fb176-24f9-4d85-b605-4df9e5a79f54\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSLB\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board (Transit)\",\"statustime\":\"2023/11/1 10:22:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"aab3dd79-1e3f-4916-b252-2a595421426e\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"79255b24-0d0b-40a3-a9c9-fe6a75d3b209\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:01\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"7db1afb1-23d1-4810-8883-784429591af8\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":null,\"statuscd\":\"PDAR\",\"statedescription\":\"抵达交货地\",\"statedescription_en\":\"PLACE OF DELIVERY ARRIVAL\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"CHICAGO, IL (USCHI)\",\"statusplacecd\":\"USCHI\",\"statusplace_cn\":null,\"vslname\":null,\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 15:18:35\",\"createtime\":\"2023/11/15 15:18:35\",\"transportation\":null,\"transportationcd\":null},{\"keyid\":\"445fd3ee-1d65-452b-a79f-88fc5842b7e4\",\"fkeyid\":\"b920b17f-2b0d-4d7f-9229-cb2f836a23e5\",\"blno\":\"E470020041\",\"statuscd\":\"BDAR\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"NORFOLK\",\"statusplacecd\":\"USORF\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 10:27:01\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null}]},{\"keyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"fkeyid\":\"5294ee29-b4f2-47f9-a917-66ea4a641761\",\"ctnrno\":\"YMMU6119139\",\"blno\":\"YMJAE470020041\",\"sealno\":\"YMAQ233988\",\"csize\":\"40\",\"ctype\":\"HQ\",\"pkgs\":null,\"gwgt\":null,\"currentnode\":null,\"currentnodetime\":null,\"createtime\":\"2023/11/14 22:17:49\",\"updatetime\":\"2023/11/14 22:17:49\",\"lstLinertrackingStatus\":[{\"keyid\":\"71a89a62-399a-4261-ae25-f8002d3db05d\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"STSP\",\"statedescription\":\"提空\",\"statedescription_en\":\"Empty to Shipper\",\"statustime\":\"2023/10/16 21:29:00\",\"statusplace\":\"PORT KLANG - G-fortune depot\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"TRUCK\",\"transportationcd\":null},{\"keyid\":\"86b47e01-09db-4434-ad80-762e8d450a2e\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":null,\"statedescription\":\"Received at Origin\",\"statedescription_en\":\"Received at Origin\",\"statustime\":\"2023/10/21 14:39:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"TRUCK\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:55:49\",\"createtime\":\"2023/11/15 15:18:35\",\"transportation\":null,\"transportationcd\":null},{\"keyid\":\"e0c6bb5e-1ea5-4fb2-8ab7-6b6256e23768\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"LOBD\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board\",\"statustime\":\"2023/10/24 10:30:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"35d67286-469a-4acd-a01b-cad65a63e70a\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"fa69851c-1fb1-4d7c-bdf9-2655d4cb2e5e\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"c6ed872a-d3a7-4336-a8f5-ce521aa935c1\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"DLPT\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG - WESTPORTS\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"8ef76637-f887-4c93-a242-7143c5093e86\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/10/24 12:12:00\",\"statusplace\":\"PORT KLANG\",\"statusplacecd\":\"MYLPK\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":null,\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/15 14:27:02\",\"createtime\":\"2023/11/15 14:27:02\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"1e03a330-0761-403c-8bf3-e464ff3cb8f0\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"b8689ea5-8edd-4681-a39b-96e2bad5603f\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSBA\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/10/25 10:20:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"YM HEIGHTS\",\"voy\":\"356N\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"5333407e-a04e-4042-9b76-e9c55f17be15\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSDC\",\"statedescription\":\"卸船\",\"statedescription_en\":\"Discharged (Transit)\",\"statustime\":\"2023/10/25 12:37:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"\",\"voy\":\"\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"\",\"transportationcd\":null},{\"keyid\":\"fb0de85e-acd7-4ecf-8441-15c68e82804c\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSLB\",\"statedescription\":\"装船\",\"statedescription_en\":\"On Board (Transit)\",\"statustime\":\"2023/11/1 12:57:00\",\"statusplace\":\"SINGAPORE - PSA SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSEL\",\"transportationcd\":null},{\"keyid\":\"c0ecbb62-a88e-4014-b39e-ce3954336ef8\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:00\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"bdd7c07f-84c8-4e9a-8bcc-01595b16c20b\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"TSDP\",\"statedescription\":\"开航\",\"statedescription_en\":\"DEPARTURE FROM LOAD PORT\",\"statustime\":\"2023/11/1 12:57:01\",\"statusplace\":\"SINGAPORE\",\"statusplacecd\":\"SGSIN\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"N\",\"cancelid\":null,\"sourcecd\":\"4\",\"updatetime\":\"2023/11/14 22:17:49\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null},{\"keyid\":\"c776c910-bd8d-4c1d-958d-bb39450e0b0d\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":null,\"statuscd\":\"PDAR\",\"statedescription\":\"抵达交货地\",\"statedescription_en\":\"PLACE OF DELIVERY ARRIVAL\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"CHICAGO, IL (USCHI)\",\"statusplacecd\":\"USCHI\",\"statusplace_cn\":null,\"vslname\":null,\"voy\":null,\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 10:27:01\",\"createtime\":\"2023/11/15 10:06:51\",\"transportation\":null,\"transportationcd\":null},{\"keyid\":\"187aa718-9943-4e58-9f7a-25a68c5b1937\",\"fkeyid\":\"b07c8784-127a-42ad-8af5-85dcad602da7\",\"blno\":\"E470020041\",\"statuscd\":\"BDAR\",\"statedescription\":\"抵港\",\"statedescription_en\":\"BOARD ARRIVE\",\"statustime\":\"2023/12/12 12:00:00\",\"statusplace\":\"NORFOLK\",\"statusplacecd\":\"USORF\",\"statusplace_cn\":null,\"vslname\":\"ONE EAGLE\",\"voy\":\"030E\",\"isest\":\"Y\",\"cancelid\":null,\"sourcecd\":\"1\",\"updatetime\":\"2023/11/15 10:27:01\",\"createtime\":\"2023/11/14 22:17:49\",\"transportation\":\"VESSLE\",\"transportationcd\":null}]}],\"datatime\":\"2023/11/14 22:17:49\"},\"success\":true,\"status\":0,\"message\":null}]";
        }
        if (json != null) {
            if ("{".equals(json.charAt(0)+"")) {
                JSONObject data = JSONObject.parseObject(json);
                String code = data.getString("code");
                if (code.equals("200")) {
                    result.put("status", "true");
                    result.put("data", data.toString());
                } else {
                    result.put("status", "false");
                    result.put("data", data.getString("message"));
                    //记录日志
                }
            } else if ("[".equals(json.charAt(0)+"")) { //todo 海运跟踪下载
                result.put("type","sea");
                JSONArray jsonArray = JSONObject.parseArray(json);
                JSONObject jsonObject = jsonArray.getJSONObject(0);
                if (jsonObject.containsKey("success")){
                    Boolean success = jsonObject.getBoolean("success");
                    if (success){
                        result.put("status", success+"");
                        result.put("data", jsonObject.getJSONObject("objlinertracking").toJSONString());
                    }else{
                        result.put("status", success+"");
                        result.put("data", jsonObject.getString("message"));
                    }
                }
            }
        }
        return result;
    }

    /**
     * 发票查验
     * 01-增值税专用发票
     * 08-增值税专用发票（电子）
     * 04-增值税普通发票
     * 10-增值税普通发票（电子）
     * 11-增值税普通发票（卷票）
     * 14-道路通行费电子普通发票  *
     * 09-全电发票(增值税专用发票)
     * 90-全电发票(普通发票)
     * 同一张发票查验超过5次后将无法获取发票查验结果
     * 如果成功则将查验结果插入底表，如果不成功，需将识别信息插入底表。增加状态(查验状态)：查验失败。
     *
     * @return
     */
    public static Map<String, String> invoiceCheck(Integer storeFlag, String invoiceCode, String invoiceNo,
                                                   BigDecimal amount, String drewDate
            , String invoiceType, String checkCode, String serialNo) {
        Map<String, String> result = new HashMap<>();
//        try {
        JSONObject JObject = new JSONObject();
//            JObject.put("storeFlag", 0);//入库标识
        JObject.put("storeFlag", storeFlag);//入库标识
        JSONObject Object = new JSONObject();
//            Object.put("invoiceCode", "012002300211");//发票代码
        Object.put("invoiceCode", invoiceCode);//发票代码
//            Object.put("invoiceNo", "57227786");//发票号码
        Object.put("invoiceNo", invoiceNo);//发票号码
//            Object.put("amount", 75.49);//金额
        Object.put("amount", amount);//金额
//            Object.put("drewDate", "2023-10-28");//开票日期
        Object.put("drewDate", drewDate);//开票日期
//            Object.put("invoiceType", "10");//发票类型
        Object.put("invoiceType", invoiceType);//发票类型
//            Object.put("checkCode", "051923");//校验码后六位
        Object.put("checkCode", checkCode);//校验码后六位
        JSONArray jsonArray = new JSONArray();
        jsonArray.add(Object);
        JObject.put("invoiceList", jsonArray);
        String param = JObject.toString();
        Map<String, String> map = new HashMap<>();
        map.put("UserAgent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24");
        map.put("ContentType", "application/json;charset=UTF-8");
        String Token = CommonUtils.getToken();
        map.put("X-Access-Token", Token);
        String url = "https://huisuiyun.com/api/v2/agent/cdk/invoice/check";
//            String TokenStr = InvoiceUtils.doPostWithHeader(url, param, map);

        String TokenStr = "";
        if (serialNo.equals("bac25214-b23c-4be3-a0a1-bad5f3439cb8")) { //识别流水号
            // 增值税普通发票（【去哪儿网】快递费电子报销凭证.pdf）-查验-10
            TokenStr = "{\"serialNo\":\"ab11b507-c039-4f15-b2c5-dd53b7987e79\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVO\":{\"purchaserBank\":\"招商银行股份有限公司青岛崂山支行532910436410288\",\"amount\":18.87,\"machineCode\":\"661923634026\",\"purchaserAddressTel\":\"青岛市市南区颐和国际A座320813379001066\",\"sellerBank\":\"上海浦东发展银行天津浦顺支行77170154740006954\",\"sellerName\":\"去哪儿网（天津）国际旅行社有限公司\",\"remark\":\"\",\"drewDate\":\"2023-12-16\",\"invoiceCode\":\"012002300311\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"checkCode\":\"51237582924241180746\",\"sellerTaxNo\":\"91120222300429132L\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"detailList\":[{\"unitPrice\":18.86792453,\"taxRate\":0.06,\"amount\":18.87,\"unit\":\"次\",\"quantity\":1,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":1.13,\"goodsName\":\"*经纪代理服务*代订附加产品\",\"revenueCode\":\"3040802990000000000\"}],\"invoiceType\":\"10\",\"sellerAddressTel\":\"天津市武清区京津电子商务产业园综合办公楼549室 022-58802155\",\"amountWithTax\":20,\"invoiceNo\":\"24598853\",\"invoiceStatus\":0,\"taxAmount\":1.13},\"invoiceVo\":null,\"invoiceCodeNo\":\"012002300311-24598853\",\"checkFlag\":true}]}";
            // 测试 查验失败json
//             TokenStr = "{\"serialNo\":\"ad66443e-d987-4017-a8cf-b5dbed1f4040\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVo\":null,\"invoiceCodeNo\":\"null-23442000000010575288\",\"exceptionInfo\":\"发票数据不一致\",\"checkFlag\":false}]}";

        } else if (serialNo.equals("d9eeba3d-bce7-4e0d-b9b3-c05686e0b3a5")) {
            // 全电发票-5987-查验-09
            TokenStr = "{\"serialNo\":\"30f51e1c-544b-4716-8da8-bcfaa0e3d678\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVO\":{\"purchaserBank\":\"交通银行佛山大良支行 481269082013000026945\",\"amount\":311644.52,\"machineCode\":\"\",\"purchaserAddressTel\":\"深圳市前海深港合作区南山街道卓越金融中心桂湾五路前海卓越中心1号楼5603 0755-83227395\",\"sellerBank\":\"招商银行股份有限公司青岛崂山支行 532910436410288\",\"sellerName\":\"青岛宏景动力信息技术有限公司\",\"remark\":\"\",\"drewDate\":\"2023-11-28\",\"invoiceCode\":\"\",\"purchaserName\":\"第八元素环境技术有限公司\",\"checkCode\":\"\",\"sellerTaxNo\":\"91370213MA3R0CR01P\",\"purchaserTaxNo\":\"91340100MA2N13WH8C\",\"detailList\":[{\"unitPrice\":56603.7735849057,\"taxRate\":0.060,\"amount\":56603.77,\"unit\":\"次\",\"quantity\":1,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":3396.23,\"goodsName\":\"*信息技术服务*外贸产品租赁\",\"revenueCode\":\"3040201030000000000\"},{\"unitPrice\":255040.754716981,\"taxRate\":0.060,\"amount\":255040.75,\"unit\":\"次\",\"quantity\":1,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":15302.45,\"goodsName\":\"*信息技术服务*实施开发服务\",\"revenueCode\":\"3040201010000000000\"}],\"invoiceType\":\"09\",\"sellerAddressTel\":\"山东省青岛市高新区汇智桥路151号中科研发城3号楼903-60室 18991930095\",\"amountWithTax\":330343.20,\"invoiceNo\":\"23922000000032305987\",\"invoiceStatus\":0,\"taxAmount\":18698.68},\"invoiceVo\":null,\"invoiceCodeNo\":\"null-23922000000032305987\",\"checkFlag\":true}]}";
            // 测试 查验失败json
//            TokenStr = "{\"serialNo\":\"ad66443e-d987-4017-a8cf-b5dbed1f4040\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVo\":null,\"invoiceCodeNo\":\"null-23442000000010575288\",\"exceptionInfo\":\"发票数据不一致\",\"checkFlag\":false}]}";

        } else if (serialNo.equals("7e1081d5-b2de-4639-93ac-3575ad496aaf")) {
            // 增值税专用发票-4735-查验-01
            TokenStr = "{\"serialNo\":\"16bc3505-1dc4-41f1-aec8-0959fa072f32\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVO\":{\"purchaserBank\":\"浦发银行市南支行69050078801700000719\",\"amount\":24.68,\"machineCode\":\"661823722635\",\"purchaserAddressTel\":\"山东省青岛市城阳区宏祥一路17号18号楼0532-58567765\",\"sellerBank\":\"交通银行北京海淀支行110060576018800043070\",\"sellerName\":\"北京京东广能贸易有限公司\",\"remark\":\"dd75253569777(00001,<br/>282664465750)\",\"drewDate\":\"2023-10-23\",\"invoiceCode\":\"1100231130\",\"purchaserName\":\"斯坦德技术工程（青岛）有限公司\",\"checkCode\":\"85823800434253824556\",\"sellerTaxNo\":\"91110113MA019HUX48\",\"purchaserTaxNo\":\"91370222MA3QWRF42B\",\"detailList\":[{\"unitPrice\":12.48,\"taxRate\":0.130,\"amount\":12.48,\"unit\":\"盒\",\"quantity\":1,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"ARPM2001\",\"taxAmount\":1.62,\"goodsName\":\"*文具*晨光(M&G)文具0.5mm黑色直液式走珠笔 速干直液式中性笔 水笔全针管Z1 学生/办公用品12支 A\",\"revenueCode\":\"1060402010200000000\"},{\"taxRate\":0.130,\"amount\":-1.25,\"unit\":\"\",\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":-0.16,\"goodsName\":\"*文具*晨光(M&G)文具0.5mm黑色直液式走珠笔 速干直液式中性笔 水笔全针管Z1 学生/办公用品12支 A\",\"revenueCode\":\"1060402010200000000\"},{\"unitPrice\":3.54,\"taxRate\":0.130,\"amount\":14.16,\"unit\":\"卷\",\"quantity\":4,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"AJD97391\",\"taxAmount\":1.84,\"goodsName\":\"*文具*晨光(M&G)文具强力高粘度EVA泡棉双面胶带 36mm*5y(4.57m/卷)办公用品  单卷装AJD97391\",\"revenueCode\":\"1060401990000000000\"},{\"taxRate\":0.130,\"amount\":-0.71,\"unit\":\"\",\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":-0.09,\"goodsName\":\"*文具*晨光(M&G)文具强力高粘度EVA泡棉双面胶带 36mm*5y(4.57m/卷)办公用品  单卷装AJD97391\",\"revenueCode\":\"1060401990000000000\"}],\"invoiceType\":\"01\",\"sellerAddressTel\":\"北京市顺义区大孙各庄镇七大路后岭上段3号院57807000\",\"amountWithTax\":27.89,\"invoiceNo\":\"07476632\",\"invoiceStatus\":0,\"taxAmount\":3.21},\"invoiceVo\":null,\"invoiceCodeNo\":\"1100231130-07476632\",\"checkFlag\":true}]}";
            // 测试 查验失败json
//              TokenStr = "{\"serialNo\":\"ad66443e-d987-4017-a8cf-b5dbed1f4040\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVo\":null,\"invoiceCodeNo\":\"null-23442000000010575288\",\"exceptionInfo\":\"发票数据不一致\",\"checkFlag\":false}]}";

        } else if (serialNo.equals("23e1ad73-6439-4e1f-ba11-10c0250cdc18")) {
            // 全电发票-5288-查验-09
//            TokenStr = "{\"serialNo\":\"ff50030f-b93c-4d5b-aedd-e15c8c19efa3\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVO\":{\"purchaserBank\":\"484601000010210022068\",\"amount\":129650.61,\"machineCode\":\"\",\"purchaserAddressTel\":\"广东省中山市小榄镇工业大道南华园路1号0760-22139888\",\"sellerBank\":\"484601000018000042628\",\"sellerName\":\"中山市明科金属制品有限公司\",\"remark\":\"\",\"drewDate\":\"2023-02-06\",\"invoiceCode\":\"\",\"purchaserName\":\"华帝股份有限公司\",\"checkCode\":\"\",\"sellerTaxNo\":\"91442000747054445Q\",\"purchaserTaxNo\":\"91442000618120215D\",\"detailList\":[{\"unitPrice\":0.043805157889,\"taxRate\":0.130,\"amount\":2042.37,\"unit\":\"只\",\"quantity\":46624,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":265.50,\"goodsName\":\"*金属制品*密封垫ZT22-04/丁晴橡胶/φ13.5/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":13.4247787610619,\"taxRate\":0.130,\"amount\":4940.32,\"unit\":\"只\",\"quantity\":368,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":642.24,\"goodsName\":\"*金属制品*3.8P分火器RS3.8P.1-0精车\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":15.8318584070796,\"taxRate\":0.130,\"amount\":11303.95,\"unit\":\"只\",\"quantity\":714,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":1469.51,\"goodsName\":\"*金属制品*分火器组件RS50B_2-0/铝合金/喷黑漆\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":1.0973451327434,\"taxRate\":0.130,\"amount\":373.10,\"unit\":\"只\",\"quantity\":340,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":48.50,\"goodsName\":\"*金属制品*喷嘴VZT12-4A-65/S12/HPb59-1/0.65/无侧孔/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":1.0530973451327,\"taxRate\":0.130,\"amount\":358.05,\"unit\":\"只\",\"quantity\":340,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":46.55,\"goodsName\":\"*金属制品*喷嘴VZT12-3B-135/S12/HPb59-1/1.35/侧2/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":1.0530973451327,\"taxRate\":0.130,\"amount\":194.82,\"unit\":\"只\",\"quantity\":185,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":25.33,\"goodsName\":\"*金属制品*喷嘴VZT12-3F-145/S12/HPb59-1/1.45/2.6/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":1.1150442477876,\"taxRate\":0.130,\"amount\":167.26,\"unit\":\"只\",\"quantity\":150,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":21.74,\"goodsName\":\"*金属制品*喷嘴VZT12-4A-90/S12/HPb59-1/0.90/无侧孔\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":16.8495132300442,\"taxRate\":0.130,\"amount\":16832.66,\"unit\":\"只\",\"quantity\":999,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":2188.25,\"goodsName\":\"*金属制品*旋塞阀B864B-20Y-0/90°左双20YΦ0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":17.212389380531,\"taxRate\":0.130,\"amount\":6248.10,\"unit\":\"只\",\"quantity\":363,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":812.25,\"goodsName\":\"*金属制品*63#旋塞阀VZT10.63-0-12T/90°/左双L39/45\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":17.212389380531,\"taxRate\":0.130,\"amount\":6093.19,\"unit\":\"只\",\"quantity\":354,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":792.11,\"goodsName\":\"*金属制品*63B#旋塞阀VZT10.63B-0/90°/左双L39/Y/45\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":8.1504424778761,\"taxRate\":0.130,\"amount\":815.04,\"unit\":\"只\",\"quantity\":100,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":105.96,\"goodsName\":\"*金属制品*64#旋塞阀VZT10_64-0-12T/90º/4.5kW/L45/0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":8.141592920354,\"taxRate\":0.130,\"amount\":2703.01,\"unit\":\"只\",\"quantity\":332,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":351.39,\"goodsName\":\"*金属制品*旋塞阀VZT10_64F-0-20Y/90°/L43/20Y/0.6/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":17.2124288874842,\"taxRate\":0.130,\"amount\":3855.58,\"unit\":\"只\",\"quantity\":224,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":501.23,\"goodsName\":\"*金属制品*旋塞阀VZT10_63F-0-20Y-50/90°/左双/L47/20Y/0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":17.3185840707965,\"taxRate\":0.130,\"amount\":36801.99,\"unit\":\"只\",\"quantity\":2125,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":4784.26,\"goodsName\":\"*金属制品*旋塞阀B864B-12T-0/90°左双12TΦ0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":16.9823008849558,\"taxRate\":0.130,\"amount\":13585.84,\"unit\":\"只\",\"quantity\":800,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":1766.16,\"goodsName\":\"*金属制品*旋塞阀B864A-12T-0/90°左双12TΦ0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":8.1504424778761,\"taxRate\":0.130,\"amount\":8867.68,\"unit\":\"只\",\"quantity\":1088,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":1152.80,\"goodsName\":\"*金属制品*64B#旋塞阀VZT10_64B-0-12T-42/90°/45/0.6mm\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":8.1504424778761,\"taxRate\":0.130,\"amount\":2282.12,\"unit\":\"只\",\"quantity\":280,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":296.68,\"goodsName\":\"*金属制品*旋塞阀VZT10_64E-0-12T-50/90°/左双/L43/12T/0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":8.141592920354,\"taxRate\":0.130,\"amount\":1628.32,\"unit\":\"只\",\"quantity\":200,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":211.68,\"goodsName\":\"*金属制品*旋塞阀VZT10_64F-0-12T/90°/L43/12T/0.6/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":8.1593166175025,\"taxRate\":0.130,\"amount\":2937.35,\"unit\":\"只\",\"quantity\":360,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":381.86,\"goodsName\":\"*金属制品*旋塞阀VZT10_64G-0-12T-45/90°/L43/0.6/RoHS\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":17.212389380531,\"taxRate\":0.130,\"amount\":7573.45,\"unit\":\"只\",\"quantity\":440,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":984.55,\"goodsName\":\"*金属制品*旋塞阀VZT10_63E-0-12T-50/90°/左双/L47/12T/0.6\",\"revenueCode\":\"1080417000000000000\"},{\"unitPrice\":11.6017699115044,\"taxRate\":0.130,\"amount\":46.41,\"unit\":\"只\",\"quantity\":4,\"taxPreType\":0,\"taxPre\":1,\"zeroTax\":0,\"specification\":\"\",\"taxAmount\":6.03,\"goodsName\":\"*金属制品*分火器Q926B_2-0/组件/喷黑/RoHS\",\"revenueCode\":\"1080417000000000000\"}],\"invoiceType\":\"09\",\"sellerAddressTel\":\"中山市小榄镇小榄工业区兴裕路7号22283638\",\"amountWithTax\":146505.19,\"invoiceNo\":\"23442000000010575288\",\"invoiceStatus\":0,\"taxAmount\":16854.58},\"invoiceVo\":null,\"invoiceCodeNo\":\"null-23442000000010575288\",\"checkFlag\":true}]}";
            // 测试 查验失败json
            TokenStr = "{\"serialNo\":\"ad66443e-d987-4017-a8cf-b5dbed1f4040\",\"code\":\"200\",\"message\":\"OK\",\"data\":[{\"invoiceVo\":null,\"invoiceCodeNo\":\"null-23442000000010575288\",\"exceptionInfo\":\"发票数据不一致\",\"checkFlag\":false}]}";
        }

        if (TokenStr != null) {
            JSONObject data = JSONObject.parseObject(TokenStr);
            String code = data.getString("code");
            if (code.equals("200")) {
                result.put("status", "true");
                result.put("data", data.toString());
            } else {
                //记录日志
                result.put("status", "false");
                result.put("data", data.getString("message"));
            }
        }
//        } catch (IOException e) {
//            e.printStackTrace();
//            //记录日志
//        }
        return result;
    }

    public static MultipartFile fileToMultipartFile(File file) {
        FileItem fileItem = creatFileItem(file);
        MultipartFile multipartFile = new CommonsMultipartFile(fileItem);
        return multipartFile;
    }

    public static FileItem creatFileItem(File file) {
        DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory(16, null);
        FileItem fileItem = diskFileItemFactory.createItem("textField", "application/zip", true, file.getName());
        int bytesRead = 0;
        byte[] buffer = new byte[8192];
        try {
            FileInputStream fileInputStream = new FileInputStream(file);
            OutputStream outputStream = fileItem.getOutputStream();
            while ((bytesRead = fileInputStream.read(buffer, 0, 8192)) != -1) {
                outputStream.write(buffer, 0, bytesRead);
            }
            Files.copy(file.toPath(), outputStream);
            outputStream.close();
            fileInputStream.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return fileItem;
    }

    /**
     * 合规性效验结果
     * 1.15号修改
     *
     * @param newdata
     * @return
     */
    public static String legalityCheck(DynamicObject newdata) {
        final String VERIFYSENTIEYNAME = "yem_imc_verifys"; //合规性效验表名
        final String BUSINESSENTIEYNAME = "yem_imc_business"; //企业发票抬头表名
        //获取组织的id
        DynamicObjectCollection userEntry = newdata.getDynamicObjectCollection("yem_collect_user_entry");
        if (userEntry == null || userEntry.size() == 0) {
            return "";
        }
        DynamicObject entiey = userEntry.get(0);
        DynamicObject yemCollectUserOrg = entiey.getDynamicObject("yem_collect_user_org");
        if (yemCollectUserOrg == null) {
            return "";
        }
        long orgId = yemCollectUserOrg.getLong("id");
        //获取到表名
        String entieyName = newdata.getDynamicObjectType().getName();
        if (StringUtils.isEmpty(entieyName) || orgId == 0) {
            return null;
        }
        // 查询合规性效验表
        QFilter qFilter1 = new QFilter("yem_type.fbasedataid.number", QCP.in, entieyName); //业务单据类型 (多选基础资料)
        DynamicObject registerObject = BusinessDataServiceHelper.loadSingle(VERIFYSENTIEYNAME, "id", new QFilter[]{qFilter1});
        if (registerObject == null) {
            return null;
        }
        DynamicObject registerObjectData = BusinessDataServiceHelper.loadSingle(registerObject.getPkValue(), VERIFYSENTIEYNAME);
        String yemBuyerName = registerObjectData.getString("yem_buyername");//发票抬头与当前企业名称是否一致
        String yemBuyerTaxNo = registerObjectData.getString("yem_buyertaxno");//发票税号与当前企业税号是否一致
        String yemBuyerAddressPhone = registerObjectData.getString("yem_buyeraddressphone");//专票地址电话与当前企业是否一致
        String yemBuyerAccount = registerObjectData.getString("yem_buyeraccount");//专票开户行账号与当前企业是否一致
        String yemCheckstatus = registerObjectData.getString("yem_checkstatus");//发票真伪
        String yemRepeat = registerObjectData.getString("yem_repeat");//重复报销
        String yemInvalidinvoice = registerObjectData.getString("yem_invalidinvoice");//发票作废
        //效验有效期
        String yemReimbursement = registerObjectData.getString("yem_expensedeadline");//报销期限校验
        String yemReimbursement365 = registerObjectData.getString("yem_deadlinedate");//报销期限365
        String yemNewYears = registerObjectData.getString("yem_expensenextyear");//是否允许跨年
        String yemNextYearMonth = registerObjectData.getString("yem_nextyearmonth");//第二年报销截止月份

        // 查询公司抬头表
        QFilter qFilter = new QFilter("yem_org.id", QCP.equals, orgId); // yem_org 组织
        DynamicObject orgInvoice = BusinessDataServiceHelper.loadSingle(BUSINESSENTIEYNAME, "id", new QFilter[]{qFilter});
        DynamicObject orgInvoiceData = BusinessDataServiceHelper.loadSingle(orgInvoice.getPkValue(), BUSINESSENTIEYNAME);

        //比对：企业税号（购方税号），企业工商登记名（购方名称），地址电话（购方地址电话），开户行及账号（购方银行帐号）
        StringBuilder legalityCheckResult = new StringBuilder();
        String buyerName = null;
        if (newdata.containsProperty("yem_buyer_name")) {
            buyerName = newdata.getString("yem_buyer_name"); //购方名称
        }
        String buyerTaxNo = null;
        if (newdata.containsProperty("yem_buyer_tax_no")) {
            buyerTaxNo = newdata.getString("yem_buyer_tax_no"); //购方税号
        }
        String buyerAddressPhone = null;
        if (newdata.containsProperty("yem_buyer_address_phone")) {
            buyerAddressPhone = newdata.getString("yem_buyer_address_phone"); //购方地址电话
        }
        String buyerAccount = null;
        if (newdata.containsProperty("yem_buyer_account")) {
            buyerAccount = newdata.getString("yem_buyer_account"); //购方开户行及银行帐号
        }
        Date invoiceDate = null;
        if (newdata.containsProperty("yem_invoice_date")) {
            invoiceDate = newdata.getDate("yem_invoice_date"); //开票日期
        }
        String yemCheckStatus = null;
        if (newdata.containsProperty("yem_check_status")) {
            yemCheckStatus = newdata.getString("yem_check_status"); //查验状态(发票真伪)
        }
        BigDecimal yemNowriteoffamt = BigDecimal.ZERO;
        if (newdata.containsProperty("yem_nowriteoffamt")) {
            yemNowriteoffamt = newdata.getBigDecimal("yem_nowriteoffamt");//账票未核销金额
        }
        String yemInvoiceStatus = "";
        if (newdata.containsProperty("yem_invoice_status")) {
            yemInvoiceStatus = newdata.getString("yem_invoice_status");//发票状态
        }
        // 查询公司抬头表信息
        String yemBusinessname = orgInvoiceData.getString("yem_businessname");//企业工商登记名
        String yemIdentification = orgInvoiceData.getString("yem_identification");//企业税号
        String yemAddress = orgInvoiceData.getString("yem_address");//地址
        String yemPhone = orgInvoiceData.getString("yem_phone");//电话
        String yemAddressPhone = yemAddress + yemPhone;
        String yemAccount = orgInvoiceData.getString("yem_account");//开户行
        String yemNumber = orgInvoiceData.getString("yem_number");//账号
        String yemAccountNumber = yemAccount + yemNumber;
        //效验企业名称
        if (yemBuyerName.equals("0") && buyerName != null) { //严格管控
            if (!buyerName.equals(yemBusinessname)) {
                String checkBuyerName = "企业名称不一致！ ";
                legalityCheckResult.append(checkBuyerName);
            }
        }
        //效验企业税号
        if (yemBuyerTaxNo.equals("0") && buyerTaxNo != null) {
            if (!buyerTaxNo.equals(yemIdentification)) {
                String checkBuyerTaxNo = "企业税号不一致！ ";
                legalityCheckResult.append(checkBuyerTaxNo);
            }
        }
        //效验企业地址电话
        String checkAddressPhone = "";
        if (yemBuyerAddressPhone.equals("0") && buyerAddressPhone != null) {
            if (!buyerAddressPhone.equals(yemAddressPhone)) {
                checkAddressPhone = "企业地址或者电话不一致！ ";
                legalityCheckResult.append(checkAddressPhone);
            }
        }
        //效验企业开户行及银行帐号
        if (yemBuyerAccount.equals("0") && buyerAccount != null) {
            if (!buyerAccount.equals(yemAccountNumber)) {
                String checkAccount = "企业开户行或者账号不一致！ ";
                legalityCheckResult.append(checkAccount);
            }
        }
        // 效验发票真伪
        if (yemCheckstatus.equals("0") && yemCheckStatus != null) {
            if (!yemCheckStatus.equals("1") && !yemCheckStatus.equals("4")) {
                legalityCheckResult.append("非法查验状态！ ");
            }
        }
        // 重复报销（未核销金额为0）
//        if (yemRepeat.equals("0")) {
//            if (yemNowriteoffamt.compareTo(BigDecimal.ZERO) == 0) {
//                legalityCheckResult.append("未核销金额为0！ ");
//            }
//        }
        //发票作废
        if (yemInvalidinvoice.equals("0")) {
            if (yemInvoiceStatus.equals("2")) { //作废
                legalityCheckResult.append("作废发票！ ");
            } else if (yemInvoiceStatus.equals("2")) { //红冲
                legalityCheckResult.append("红冲发票！ ");
            }
        }
        //敏感词校验（仅效验文本字段）
        String valueOf = String.valueOf(newdata);
        ArrayList<String> illegalityList = new ArrayList<>();
        illegalityList.add(" SB ");
        illegalityList.add(" sb ");
        illegalityList.add("智障");
        illegalityList.add("傻逼");
        illegalityList.add("蠢货");
        illegalityList.add("笨蛋");
        illegalityList.add("操你");
        illegalityList.add("去死");
        illegalityList.add("死了");
        illegalityList.add("升天");
        illegalityList.add("习近平");
        illegalityList.add("毛泽东");
        for (String str : illegalityList) {
            if (valueOf.contains(str)) {
                legalityCheckResult.append("包含敏感词" + "‘" + str + "’" + "！ ");
            }
        }


        // 报销期限效验
/*        // 将Date转换为Instant
        Instant instant = invoiceDate.toInstant();
        // 将Instant转换为ZonedDateTime，使用系统默认时区
        ZonedDateTime zonedDateTime = instant.atZone(ZoneId.systemDefault());
        // 从ZonedDateTime中提取LocalDate
        LocalDate localDate = zonedDateTime.toLocalDate();
        String checkAData = "";
        //判断当前操作日期是否早于开票日期加上报销期限
        if (yemReimbursement.equals("0") && yemNewYears.equals("1") && LocalDate.now().isBefore(localDate.plusDays(Long.valueOf(yemReimbursement365)))) {
            //由于不允许跨年，只要当前操作日期年份大于开票日期年份 就算过期
            if (LocalDate.now().getYear() > localDate.getYear()) {
                checkAData = "报销期限已过期！ ";
            }
            //由于不允许跨年，只有当当前日期年份等于开票日期年份  不算过期
            if (LocalDate.now().getYear() == localDate.getYear()) {
//                checkAData = "报销期限未过期";
            } else {
                checkAData = "报销期限已过期！ ";
            }
            //判断当前操作日期是否早于开票日期加上报销期限
        }
        if (yemReimbursement.equals("0") && yemNewYears.equals("0") && LocalDate.now().isBefore(localDate.plusDays(Long.valueOf(yemReimbursement365)))) {
            //由于允许跨年，当前操作日期年份>=开票日期加上报销期限所在年份
            if (LocalDate.now().getYear() >= localDate.plusDays(Long.valueOf(yemReimbursement365)).getYear()) {
                //如果开票日期加上报销期限所在年份和开票日期年份在同一年
                if (localDate.plusDays(Long.valueOf(yemReimbursement365)).getYear() == localDate.getYear()) {
                    //操作日期必须小于开票日期加上报销期限
                    if (LocalDate.now().isBefore(localDate.plusDays(Long.valueOf(yemReimbursement365)))) {
//                        checkAData = "报销期限未过期";
                    } else {
                        checkAData = "报销期限已过期！ ";
                    }
                    //如果开票日期加上报销期限所在年份和开票日期年份在不同一年
                }
                if (localDate.plusDays(Long.valueOf(yemReimbursement365)).getYear() > localDate.getYear()) {
                    //开票日期加上报销期限所在月份必须小于第二年截止月份
                    if (localDate.plusDays(Long.valueOf(yemReimbursement365)).getMonthValue() < Integer.parseInt(yemNextYearMonth)) {
//                        checkAData = "报销期限未过期";
                    } else {
                        checkAData = "报销期限已过期！ ";
                    }
                }
            }
        }
        legalityCheckResult.append(checkAData);*/
        String checkinfo = legalityCheckResult.toString().trim();
        if (StringUtils.isEmpty(checkinfo)) {
            return "效验成功！";
        }
        return checkinfo;
    }


    /**
     * 发票归集-测试-Web
     * 同步接口-全电企业进项发票归集申请-Web接口
     * 同步接口-全电企业进项发票归集结果查询
     * 将发票归集结果查询数据插入数据库
     *
     * @param startDate
     * @param endDate
     * @return
     * @throws IOException
     */
    @ApiPostMapping(value = "/invoicecollection", desc = "发票归集")
    public static CustomApiResult<JSONObject> invoiceCollectionApplyForandResultInquire(@NotNull @ApiParam("String类型的归集起始日期") Date startDate, @NotNull @ApiParam("String类型的归集截止日期") Date endDate, @RequestParam(defaultValue = "1") @ApiParam("当前页") Integer current, @RequestParam(defaultValue = "12") @ApiParam("页面查询条数") Integer size) throws IOException {
        JSONObject applyForJson = allElectricCollect(startDate, endDate);
        String applyForCode = applyForJson.getString("code");
        if (!applyForCode.equals("200")) {
            return CustomApiResult.fail("500", applyForJson.getString("message"));
        }
        // 注意这里 data才是 归集任务流水号
        Long serialNo = applyForJson.getLong("data");
        //2.同步接口-全电企业进项发票归集结果查询
        JSONObject resultJson = allElectricCollectResult(current, size, serialNo);
        String code = resultJson.getString("code");
        if (!code.equals("200")) {
            return CustomApiResult.fail("500", resultJson.getString("message"));
        }
        // 将发票归集结果查询数据插入数据库 ！ ！ 
        ArrayList<DynamicObject> ultimatelyResult = collectionJsonToData(resultJson);
        if (ultimatelyResult == null || ultimatelyResult.size() == 0) {
            return CustomApiResult.fail("500", "将发票归集结果查询数据插入数据库失败，请重试 !");
        }

        JSONObject ultimatelyJson = new JSONObject();
        ultimatelyJson.put("message", "发票归集数据插入底表成功!，共插入或更新" + ultimatelyResult.size() + "条数据!");
        ultimatelyJson.put("code", "200");
        return CustomApiResult.success(ultimatelyJson);
    }


    /**
     * 发票归集-测试
     * 同步接口-全电企业进项发票归集申请
     *
     * @param startDate 归集起始日期 格式：yyyy-MM-dd
     * @param endDate   归集终止日期 格式：yyyy-MM-dd
     * @return
     */
    public static JSONObject allElectricCollect(Date startDate, Date endDate) throws IOException {
        JSONObject resultJson = new JSONObject();
        if (endDate.compareTo(startDate) < 0) { //结束时间小于开始时间
            resultJson.put("code", "500");
            resultJson.put("message", "开始时间不得大于结束时间！ ");
            return resultJson;
        }
        resultJson.put("code", "200");
        resultJson.put("message", "访问成功！ ");
        resultJson.put("data", 123456756894L); // 归集任务流水号
        resultJson.put("serialNo", "932339036570525696"); // 返回本次业务流水号
        return resultJson;

//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//        String startDateStr = sdf.format(startDate);
//        String endDateStr = sdf.format(endDate);
//       // 调用 发票归集申请web接口
//        Map<String, String> headMap = new HashMap<>();
//        headMap.put("UserAgent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24");
//        headMap.put("ContentType", "application/json;charset=UTF-8");
//        String Token = CommonUtils.getToken();
//        headMap.put("X-Access-Token", Token); //需要更换token
//        String url = "https://huisuiyun.com/api/v2/agent/cdk/ledger/allElectric/collect";
//        JSONObject contentJson = new JSONObject();
//        contentJson.put("startDate", startDateStr);
//        contentJson.put("endDate", endDateStr);
//        String content = String.valueOf(contentJson);
//        String applyForStr = InvoiceUtils.doPostWithHeader(url, content, headMap);
//        JSONObject applyForJSon = JSONObject.parseObject(applyForStr);
//        return applyForJSon;
    }

    /**
     * 发票归集-测试
     * 同步接口-全电企业进项发票归集结果查询
     *
     * @param current  当前页
     * @param size     页面查询条数
     * @param serialNo 全电发票归集任务流水号
     * @return
     */
    public static JSONObject allElectricCollectResult(Integer current, Integer size, Long serialNo) throws IOException {
        JSONObject object = new JSONObject();
        if (size > 100 || size < 1) {
            object.put("code", "500");
            object.put("message", "页面查询条数不得大于100不得小于1");
            return object;
        } else if (current > 100 || current < 1) {
            object.put("code", "500");
            object.put("message", "当前页不得大于100不得小于1");
            return object;
        }
        if (current == null) {
            current = 1;
        }

//        // 发票归集测试数据 仅测试使用 ！
        String invoiceCollectionStr = "{\"serialNo\":\"fdaa3ce3-e581-494b-ae28-3ef278bee379\",\"code\":\"200\",\"message\":\"OK\",\"data\":{\"requestSerialNo\":null,\"total\":\"70\",\"pages\":\"6\",\"size\":\"12\",\"current\":\"1\",\"records\":[{\"invoiceType\":\"90\",\"invoiceCode\":\"\",\"invoiceNo\":\"23322000000099931512\",\"drewDate\":\"2023-12-15\",\"checkCode\":\"\",\"amount\":179.21,\"amountWithTax\":181.00,\"taxAmount\":1.79,\"effectiveTaxAmount\":0.00,\"sellerName\":\"无锡尚箐酒店有限公司\",\"sellerTaxNo\":\"91320214MA270YJD77\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"蒋磊\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"-23322000000099931512\",\"goodsName\":\"*住宿服务*住宿费\",\"specification\":\"\",\"unit\":\"天\",\"quantity\":\"1\",\"unitPrice\":\"179.2079207920792\",\"amount\":179.21,\"taxRate\":0.01,\"taxAmount\":1.79,\"revenueCode\":\"3070402000000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"1%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*住宿服务*住宿费\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:57\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"90\",\"invoiceCode\":\"\",\"invoiceNo\":\"23442000000330203804\",\"drewDate\":\"2023-12-15\",\"checkCode\":\"\",\"amount\":221.07,\"amountWithTax\":249.80,\"taxAmount\":28.73,\"effectiveTaxAmount\":0.00,\"sellerName\":\"广州赫恩化妆品有限公司\",\"sellerTaxNo\":\"91440114MA59A2F18H\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"骆瑞仪\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"-23442000000330203804\",\"goodsName\":\"*美容护肤品*冷水沐浴露\",\"specification\":\"\",\"unit\":\"瓶\",\"quantity\":\"2\",\"unitPrice\":\"55.265486725664\",\"amount\":110.53,\"taxRate\":0.13,\"taxAmount\":14.37,\"revenueCode\":\"1070223010000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"-23442000000330203804\",\"goodsName\":\"*美容护肤品*极地森系去屑洗发水\",\"specification\":\"\",\"unit\":\"瓶\",\"quantity\":\"1\",\"unitPrice\":\"55.265486725664\",\"amount\":55.27,\"taxRate\":0.13,\"taxAmount\":7.18,\"revenueCode\":\"1070223010000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"-23442000000330203804\",\"goodsName\":\"*美容护肤品*发力洗发水\",\"specification\":\"\",\"unit\":\"瓶\",\"quantity\":\"1\",\"unitPrice\":\"55.265486725664\",\"amount\":55.27,\"taxRate\":0.13,\"taxAmount\":7.18,\"revenueCode\":\"1070223010000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*美容护肤品*冷水沐浴露\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:57\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"01\",\"invoiceCode\":\"3200231130\",\"invoiceNo\":\"18273852\",\"drewDate\":\"2023-12-15\",\"checkCode\":\"\",\"amount\":69.04,\"amountWithTax\":78.01,\"taxAmount\":8.97,\"effectiveTaxAmount\":0.00,\"sellerName\":\"苏州京相贸易有限公司\",\"sellerTaxNo\":\"91320594MACG8JA96A\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"张莉\",\"remark\":\"zp75524214012(00001,\\r\\n286814811373)\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*利得 背心式大号手提家用办公垃圾袋300只 50cm*60cm黑色家用垃圾桶袋\",\"specification\":\"垃圾袋背心300只\",\"unit\":\"包\",\"quantity\":\"1\",\"unitPrice\":\"26.46\",\"amount\":26.46,\"taxRate\":0.13,\"taxAmount\":3.44,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*利得 背心式大号手提家用办公垃圾袋300只 50cm*60cm黑色家用垃圾桶袋\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-3.97,\"taxRate\":0.13,\"taxAmount\":-0.52,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*利得垃圾袋黑色加厚背心手提式家用大号干湿分类塑料50*60cm200黑色\",\"specification\":\"利得垃圾袋0497\",\"unit\":\"包\",\"quantity\":\"1\",\"unitPrice\":\"10.53\",\"amount\":10.53,\"taxRate\":0.13,\"taxAmount\":1.37,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*利得垃圾袋黑色加厚背心手提式家用大号干湿分类塑料50*60cm200黑色\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-0.52,\"taxRate\":0.13,\"taxAmount\":-0.07,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*利得背心大号商用物业加厚垃圾袋  60cm*80cm*45只 酒店物业办公\",\"specification\":\"背心60*80垃圾袋\",\"unit\":\"包\",\"quantity\":\"1\",\"unitPrice\":\"17.61\",\"amount\":17.61,\"taxRate\":0.13,\"taxAmount\":2.29,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*利得背心大号商用物业加厚垃圾袋  60cm*80cm*45只 酒店物业办公\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-2.65,\"taxRate\":0.13,\"taxAmount\":-0.34,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*西玛易嘉 中号分类金属网垃圾桶9L厨房卫生间家用垃圾篓办公环保纸篓240mm\",\"specification\":\"20240\",\"unit\":\"个\",\"quantity\":\"3\",\"unitPrice\":\"7.87666667\",\"amount\":23.63,\"taxRate\":0.13,\"taxAmount\":3.07,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"3200231130-18273852\",\"goodsName\":\"*日用杂品*西玛易嘉 中号分类金属网垃圾桶9L厨房卫生间家用垃圾篓办公环保纸篓240mm\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-2.05,\"taxRate\":0.13,\"taxAmount\":-0.27,\"revenueCode\":\"1060512040000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*日用杂品*利得 背心式大号手提家用办公垃圾袋300只 50cm*60cm黑色家用垃圾桶袋\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:57\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"10\",\"invoiceCode\":\"061002201411\",\"invoiceNo\":\"91791684\",\"drewDate\":\"2023-12-15\",\"checkCode\":\"\",\"amount\":68.84,\"amountWithTax\":70.91,\"taxAmount\":2.07,\"effectiveTaxAmount\":0.00,\"sellerName\":\"陕西滴滴出行科技有限公司\",\"sellerTaxNo\":\"91610138MA6X3B1A27\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"侯娇\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"061002201411-91791684\",\"goodsName\":\"*运输服务*客运服务费\",\"specification\":\"无\",\"unit\":\"次\",\"quantity\":\"1\",\"unitPrice\":\"68.84\",\"amount\":68.84,\"taxRate\":0.03,\"taxAmount\":2.07,\"revenueCode\":\"3010101020102000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"3%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*运输服务*客运服务费\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:57\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"10\",\"invoiceCode\":\"061002201411\",\"invoiceNo\":\"91592939\",\"drewDate\":\"2023-12-15\",\"checkCode\":\"\",\"amount\":60.83,\"amountWithTax\":62.65,\"taxAmount\":1.82,\"effectiveTaxAmount\":0.00,\"sellerName\":\"陕西滴滴出行科技有限公司\",\"sellerTaxNo\":\"91610138MA6X3B1A27\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"侯娇\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"061002201411-91592939\",\"goodsName\":\"*运输服务*客运服务费\",\"specification\":\"无\",\"unit\":\"次\",\"quantity\":\"1\",\"unitPrice\":\"60.83\",\"amount\":60.83,\"taxRate\":0.03,\"taxAmount\":1.82,\"revenueCode\":\"3010101020102000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"3%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*运输服务*客运服务费\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:57\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"90\",\"invoiceCode\":\"\",\"invoiceNo\":\"23332000000077980782\",\"drewDate\":\"2023-12-14\",\"checkCode\":\"\",\"amount\":90.30,\"amountWithTax\":91.20,\"taxAmount\":0.90,\"effectiveTaxAmount\":0.00,\"sellerName\":\"龙港市川蓬电子商务商行\",\"sellerTaxNo\":\"92330383MA2JCWRU8F\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"杨川蓬\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"-23332000000077980782\",\"goodsName\":\"*纸制品*不干胶贴纸\",\"specification\":\"\",\"unit\":\"张\",\"quantity\":\"8\",\"unitPrice\":\"11.2871287128713\",\"amount\":90.30,\"taxRate\":0.01,\"taxAmount\":0.90,\"revenueCode\":\"1060105050000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"1%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*纸制品*不干胶贴纸\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:58\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"10\",\"invoiceCode\":\"013002300311\",\"invoiceNo\":\"28096113\",\"drewDate\":\"2023-12-13\",\"checkCode\":\"\",\"amount\":195.55,\"amountWithTax\":220.98,\"taxAmount\":25.43,\"effectiveTaxAmount\":0.00,\"sellerName\":\"廊坊市京东钧成贸易有限公司\",\"sellerTaxNo\":\"91131003MA0959234B\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"王梅\",\"remark\":\"订单号:252323188614\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"013002300311-28096113\",\"goodsName\":\"*计算机网络设备*华为路由AX2 Pro Wi-Fi6路由 5G双频 畅享4K影片 提供手游加速 儿童上网保护\",\"specification\":\"WS7000\",\"unit\":\"台\",\"quantity\":\"1\",\"unitPrice\":\"202.65486726\",\"amount\":202.65,\"taxRate\":0.13,\"taxAmount\":26.35,\"revenueCode\":\"1090510030000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"013002300311-28096113\",\"goodsName\":\"*计算机网络设备*华为路由AX2 Pro Wi-Fi6路由 5G双频 畅享4K影片 提供手游加速 儿童上网保护\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-7.10,\"taxRate\":0.13,\"taxAmount\":-0.92,\"revenueCode\":\"1090510030000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*计算机网络设备*华为路由AX2 Pro Wi-Fi6路由 5G双频 畅享4K影片 提供手游加速 儿童上网保护\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:59\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"01\",\"invoiceCode\":\"5100223130\",\"invoiceNo\":\"02529033\",\"drewDate\":\"2023-12-13\",\"checkCode\":\"\",\"amount\":238.03,\"amountWithTax\":268.98,\"taxAmount\":30.95,\"effectiveTaxAmount\":0.00,\"sellerName\":\"京东广汉信成贸易有限公司\",\"sellerTaxNo\":\"91510681MA66M6MQ2E\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"蒋恬\",\"remark\":\"dd75516820962(00001,\\r\\n286762699972)\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"5100223130-02529033\",\"goodsName\":\"*家用美容保健电器*飞利浦（PHILIPS）电动剃须刀新3系高配版 干湿双剃刮胡刀 配弹出式鬓角修剪器\",\"specification\":\"S3203/08\",\"unit\":\"台\",\"quantity\":\"1\",\"unitPrice\":\"238.05\",\"amount\":238.05,\"taxRate\":0.13,\"taxAmount\":30.95,\"revenueCode\":\"1090419010000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"5100223130-02529033\",\"goodsName\":\"*家用美容保健电器*飞利浦（PHILIPS）电动剃须刀新3系高配版 干湿双剃刮胡刀 配弹出式鬓角修剪器\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-0.02,\"taxRate\":0.13,\"taxAmount\":0.00,\"revenueCode\":\"1090419010000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*家用美容保健电器*飞利浦（PHILIPS）电动剃须刀新3系高配版 干湿双剃刮胡刀 配弹出式鬓角修剪器\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:59\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"10\",\"invoiceCode\":\"033002200911\",\"invoiceNo\":\"42044923\",\"drewDate\":\"2023-12-13\",\"checkCode\":\"\",\"amount\":146.13,\"amountWithTax\":150.51,\"taxAmount\":4.38,\"effectiveTaxAmount\":0.00,\"sellerName\":\"杭州滴滴出行科技有限公司\",\"sellerTaxNo\":\"91330110MA2H0BC10Q\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"于秋红\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"033002200911-42044923\",\"goodsName\":\"*运输服务*客运服务费\",\"specification\":\"无\",\"unit\":\"次\",\"quantity\":\"1\",\"unitPrice\":\"155.75\",\"amount\":155.75,\"taxRate\":0.03,\"taxAmount\":4.67,\"revenueCode\":\"3010101020102000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"3%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0},{\"invoiceCodeNo\":\"033002200911-42044923\",\"goodsName\":\"*运输服务*客运服务费\",\"specification\":\"\",\"unit\":\"\",\"quantity\":null,\"unitPrice\":null,\"amount\":-9.62,\"taxRate\":0.03,\"taxAmount\":-0.29,\"revenueCode\":\"3010101020102000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"3%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*运输服务*客运服务费\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:59\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"90\",\"invoiceCode\":\"\",\"invoiceNo\":\"23442000000326896597\",\"drewDate\":\"2023-12-13\",\"checkCode\":\"\",\"amount\":182.36,\"amountWithTax\":206.07,\"taxAmount\":23.71,\"effectiveTaxAmount\":0.00,\"sellerName\":\"广州飞扬正德装饰材料有限公司\",\"sellerTaxNo\":\"91440113569798707T\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"丁春霞\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"-23442000000326896597\",\"goodsName\":\"*塑料制品*玻璃贴\",\"specification\":\"\",\"unit\":\"张\",\"quantity\":\"1\",\"unitPrice\":\"182.362831858407\",\"amount\":182.36,\"taxRate\":0.13,\"taxAmount\":23.71,\"revenueCode\":\"1070601990000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*塑料制品*玻璃贴\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:02:59\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"90\",\"invoiceCode\":\"\",\"invoiceNo\":\"23352000000044423171\",\"drewDate\":\"2023-12-12\",\"checkCode\":\"\",\"amount\":264.87,\"amountWithTax\":299.30,\"taxAmount\":34.43,\"effectiveTaxAmount\":0.00,\"sellerName\":\"福州市丰达利电子商务有限公司\",\"sellerTaxNo\":\"91350100MA34JUP948\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"王淑贞\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"-23352000000044423171\",\"goodsName\":\"*纺织产品*洁丽雅全棉浴巾女家用洗澡纯棉吸水2023新款情侣男款秋冬大人裹巾\",\"specification\":\"\",\"unit\":\"件\",\"quantity\":\"7\",\"unitPrice\":\"37.83857143\",\"amount\":264.87,\"taxRate\":0.13,\"taxAmount\":34.43,\"revenueCode\":\"1040106020000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*纺织产品*洁丽雅全棉浴巾女家用洗澡纯棉吸水2023新款情侣男款秋冬大人裹巾\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:03:01\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null},{\"invoiceType\":\"10\",\"invoiceCode\":\"034002100111\",\"invoiceNo\":\"61590620\",\"drewDate\":\"2023-12-12\",\"checkCode\":\"\",\"amount\":30.00,\"amountWithTax\":33.90,\"taxAmount\":3.90,\"effectiveTaxAmount\":0.00,\"sellerName\":\"蚌埠夏浮商贸有限责任公司\",\"sellerTaxNo\":\"91340303MA8NWK1LXN\",\"sellerAddressTel\":\"\",\"sellerBank\":\"\",\"purchaserName\":\"青岛宏景动力信息技术有限公司\",\"purchaserTaxNo\":\"91370213MA3R0CR01P\",\"purchaserAddressTel\":\"\",\"purchaserBank\":\"\",\"payee\":\"\",\"reviewer\":\"\",\"drawer\":\"郑宇艳\",\"remark\":\"\",\"agentMark\":\"0\",\"tickConductFlag\":0,\"tickResult\":\"\",\"tickFlag\":0,\"deductType\":0,\"tickDate\":\"\",\"taxPeriod\":\"\",\"invoiceStatus\":0,\"checkFlag\":1,\"matchFlag\":0,\"signFlag\":0,\"postFlag\":0,\"extractFlag\":0,\"sensitiveFlag\":0,\"transferFlag\":0,\"transferTime\":null,\"transferReason\":\"\",\"ocrUrl\":\"\",\"settlementNo\":\"\",\"machineCode\":\"\",\"ext5\":0,\"detailList\":[{\"invoiceCodeNo\":\"034002100111-61590620\",\"goodsName\":\"*口腔清洁护理品*万毛牙刷软毛成人超软情侣孕妇月子专用男士纳米小头家庭装家用\",\"specification\":\"\",\"unit\":\"件\",\"quantity\":\"1\",\"unitPrice\":\"30\",\"amount\":30.00,\"taxRate\":0.13,\"taxAmount\":3.90,\"revenueCode\":\"1070224990000000000\",\"transferTaxAmount\":null,\"taxInfo\":\"\",\"taxRatePercent\":\"13%\",\"taxPre\":1,\"taxPreType\":0,\"zeroTax\":0}],\"gathererName\":null,\"gathererMobile\":null,\"signerName\":null,\"signerMobile\":null,\"belongerName\":null,\"belongerMobile\":null,\"gatherTime\":null,\"commitTime\":null,\"signTime\":null,\"ext1\":\"\",\"matchLedgerFlag\":1,\"reimbursementFlag\":0,\"bookkeepingFlag\":0,\"tag\":null,\"firstGoodsName\":\"*口腔清洁护理品*万毛牙刷软毛成人超软情侣孕妇月子专用男士纳米小头家庭装家用\",\"gatherFlag\":0,\"threeBillMatchFlag\":0,\"lastCheckTime\":\"2023-12-27 17:03:01\",\"imageList\":null,\"makePdfUrl\":null,\"pdfUrl\":null,\"ofdUrl\":null,\"xmlUrl\":null,\"exten1\":\"\",\"exten2\":\"\",\"exten3\":\"\",\"exten4\":\"\",\"exten5\":\"\",\"exten6\":\"\",\"exten7\":\"\",\"exten8\":\"\",\"exten9\":\"\",\"exten10\":\"\",\"businessPartName\":null,\"businessCode\":null,\"additionInfos\":null}]}}";
        // 模拟 全电企业进项发票归集结果查询失败，需要重新登录
//        invoiceCollectionStr = "{\"serialNo\":\"8bd35829-fb1b-47ed-8fdc-34e7f0efa873\",\"code\":\"发票归集失败【{}】\",\"message\":\"\",\"data\":null}";

        JSONObject resultJson = JSONObject.parseObject(invoiceCollectionStr);
        return resultJson;

        //调用 发票归集结果查询真实web接口
//        Map<String, String> headMap = new HashMap<>();
//        headMap.put("UserAgent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24");
//        headMap.put("ContentType", "application/json;charset=UTF-8");
//        String Token = CommonUtils.getToken();
//        headMap.put("X-Access-Token", Token); //需要更换token
//        String url = "https://huisuiyun.com/api/v2/agent/cdk/ledger/allElectric/collect/result";
//        JSONObject contentJson = new JSONObject();
//        contentJson.put("current", current);
//        contentJson.put("size", size);
//        contentJson.put("serialNo", serialNo);
//        String content = String.valueOf(contentJson);
//        String inquireResultStr = InvoiceUtils.doPostWithHeader(url, content, headMap);
//        System.out.println("查询结果为："+inquireResultStr);
//        JSONObject inquireResultJson = JSONObject.parseObject(inquireResultStr);
//        return inquireResultJson;
    }


    /**
     * 同步接口-全电同步自主登录-Web接口
     * businessType为1表示销项自主登录，为2表示进项自主登录（只做2）
     *
     * @param loginType 登录类型 0账密（短信验证码）登录，1扫码登录（备注返回10以上也会成功，视为1扫码登录）
     * @return
     */
    @ApiPostMapping(value = "/allelectriclogin", desc = "全电同步自主登录")
    public static CustomApiResult<JSONObject> allElectricLogIn(@ApiParam("登录类型 0账密（短信验证码）登录，1扫码登录，默认值为0") @RequestParam(defaultValue = "0") Integer loginType) {
//        JSONObject loginJson = AllElectricLoginUtils.allElectricLogIn(loginType);
//        if (!loginJson.getString("code").equals("200")) {
//            return CustomApiResult.fail(loginJson.getString("code"), loginJson.getString("message"));
//        }
//        return CustomApiResult.success(loginJson);

        if (loginType != 0 && loginType != 1) {
            return CustomApiResult.fail("500", "参数范围超出,仅供选择0（短信验证码登录）或者1（扫码登录）！");
        }
        final int businessType = 2;  //进项
        Map<String, String> headMap = new HashMap<>();//请求头Map
        headMap.put("UserAgent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.24");
        headMap.put("ContentType", "application/json;charset=UTF-8");
        String Token = CommonUtils.getToken();
        headMap.put("X-Access-Token", Token);
        String url = "https://huisuiyun.com/api/v2/agent/cdk/allElectric/autonomous/sync/login";
        JSONObject paramJson = new JSONObject(); //参数
        paramJson.put("businessType", businessType);
        paramJson.put("loginType", loginType);
        String param = String.valueOf(paramJson);
        try {
            String TokenStr = HttpUtils.doPostWithHeader(url, param, headMap);
            JSONObject returnJson = JSONObject.parseObject(TokenStr);
            if (!returnJson.getString("code").equals("200")) {
                return CustomApiResult.fail(returnJson.getString("code"), returnJson.getString("message"));
            }
            return CustomApiResult.success(returnJson);

            // 直接访问同步接口-全电同步自主登录获取二维码扫码结果2
//            if (loginType == 1) { //二维码
//                String filePath = "E:/全电同步登录二维码.jpg";
//                // 判断某个位置是否存在某个jpg文件，有就删除掉
//                File file = new File(filePath);
//                if (file.exists()){
//                   file.delete();
//                }
//                JSONObject data = loginJson.getJSONObject("data");
//                String qrSidStr = data.getString("sid");
//                Long qrSid = Long.valueOf(qrSidStr);
//                if (data.containsKey("ewm") && data.getString("ewm")!=null) {
//                    String ewm = data.getString("ewm");
//                    Base64.Decoder decoder = Base64.getDecoder();
//                    // 去掉base64前缀 data:image/jpeg;base64，
//                    ewm = ewm.substring(ewm.indexOf(",")+1);
//                    byte[] decode = decoder.decode(ewm);
//                    FileOutputStream out = new FileOutputStream(filePath);
//                    out.write(decode);
//                    out.flush();
//                    out.close();
//                    String qrurl ="https://huisuiyun.com/api/v2/agent/cdk/allElectric/autonomous/sync/getQrCodeStatus";
//                    JSONObject qrParamJson = new JSONObject(); //参数
//                    qrParamJson.put("sid", qrSid);
//                    String qrParam = String.valueOf(qrParamJson);
//                    String qrResultStr = InvoiceUtils.doPostWithHeader(qrurl, qrParam, headMap);
//                    JSONObject qrResultJson = JSONObject.parseObject(qrResultStr);
//                    return CustomApiResult.success(qrResultJson);
//                }
//            }
//            return CustomApiResult.success(returnJson);
//        } catch (IOException e) {
//            return CustomApiResult.fail("500", "系统错误，请重试");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * 同步接口-全电同步自主登录提交短信验证码1-Web接口
     *
     * @param sid     全电自主登录接口返回的sid
     * @param smsCode 全电自主登录发送的短信验证码
     * @return
     */
    @ApiPostMapping(value = "/syncsubmitsms", desc = "全电同步自主登录提交短信验证码")
    public static CustomApiResult<JSONObject> allElectricSyncSubmitSms(@ApiParam("全电自主登录接口返回的sid") Long sid, @ApiParam("全电自主登录发送的短信验证码") String smsCode) {
        return CustomApiResult.success(AllElectricLoginUtils.allElectricSyncSubmitSms(sid, smsCode));
    }


    /**
     * 同步接口-全电同步自主登录获取二维码扫码结果2-Web
     *
     * @param sid 全电自主登录接口返回的sid
     * @return
     */
    @ApiPostMapping(value = "/getqrcodestatus", desc = "全电同步自主登录提交短信验证码")
    public static CustomApiResult<JSONObject> allElectricSyncGetQrCodeStatus(@ApiParam("全电自主登录接口返回的sid") Long sid) {
        return CustomApiResult.success(AllElectricLoginUtils.allElectricSyncGetQrCodeStatus(sid));
    }
}

