build(hzya-nifi-AdvancedJoltTransformer-nar): 添加 AdvancedJoltTransformer NAR 包构建配置
- 新增 hzya-nifi-AdvancedJoltTransformer-nar 模块的 pom.xml 文件 - 配置模块版本、打包方式和 Java 版本- 添加 AdvancedJoltTransformer 处理器和标准服务 API NAR 依赖
This commit is contained in:
parent
ebddb0b880
commit
2015d502c1
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>nifi-hzyadev-bundle</artifactId>
|
||||
<groupId>com.hzya</groupId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hzya-nifi-AdvancedJoltTransformer-nar</artifactId>
|
||||
|
||||
<packaging>nar</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hzya</groupId>
|
||||
<artifactId>hzya-nifi-AdvancedJoltTransformer-processors</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-standard-services-api-nar</artifactId>
|
||||
<version>${nifi-revision}</version>
|
||||
<type>nar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,906 @@
|
|||
{
|
||||
"pk_corp": "1001",
|
||||
"corp_name": "广脉科技股份有限公司",
|
||||
"corp_code": "1",
|
||||
"pk_glorgbook": "0001A1100000000001M9",
|
||||
"pk_prepared": "tbadmin",
|
||||
"pk_vouchertype": "0001DEFAULT000000001",
|
||||
"prepareddate": "2022-12-23",
|
||||
"prepared": "tbadmin",
|
||||
"vouchertype_name": "记账凭证",
|
||||
"vouchertype_shortname": "记账",
|
||||
"accbookCode": "1-0003",
|
||||
"accbookName": "广脉科技股份有限公司广脉基准账簿",
|
||||
"year": "2022",
|
||||
"period": "12",
|
||||
"details": [
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "9433.96",
|
||||
"localdebitamount": "9433.96",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040602",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "9433.96",
|
||||
"localcreditamount": "9433.96",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRU",
|
||||
"accountCode": "16040602",
|
||||
"accountName": "服务费",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032018000261"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRV",
|
||||
"accountCode": "16040603",
|
||||
"accountName": "材料",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "92382.57",
|
||||
"localdebitamount": "92382.57",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040601",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "92382.57",
|
||||
"localcreditamount": "92382.57",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRT",
|
||||
"accountCode": "16040601",
|
||||
"accountName": "劳务费",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032021000015"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRV",
|
||||
"accountCode": "16040603",
|
||||
"accountName": "材料",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "34324.77",
|
||||
"localdebitamount": "34324.77",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040601",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "34324.77",
|
||||
"localcreditamount": "34324.77",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRT",
|
||||
"accountCode": "16040601",
|
||||
"accountName": "劳务费",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032020000008"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRV",
|
||||
"accountCode": "16040603",
|
||||
"accountName": "材料",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "129066.37",
|
||||
"localdebitamount": "129066.37",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040601",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "129066.37",
|
||||
"localcreditamount": "129066.37",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRT",
|
||||
"accountCode": "16040601",
|
||||
"accountName": "劳务费",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032020000009"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A5100000000LNEWX",
|
||||
"accountCode": "16040605",
|
||||
"accountName": "建设期场租",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A1100000000008U0",
|
||||
"accountCode": "160106",
|
||||
"accountName": "分期收款",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23"
|
||||
},
|
||||
{
|
||||
"excrate2": "1",
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitquantity": "0",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditquantity": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"currtypeCode": "CNY",
|
||||
"currtypeName": "人民币",
|
||||
"accountId": "0001A2100000000CCIRV",
|
||||
"accountCode": "16040603",
|
||||
"accountName": "材料",
|
||||
"locRate": "1",
|
||||
"groupRate": "1",
|
||||
"globalRate": "1",
|
||||
"busidate": "2022-12-23",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,515 @@
|
|||
{
|
||||
"voucher": {
|
||||
"pk_corp": "1001",
|
||||
"pk_glorgbook": "0001A1100000000001M9",
|
||||
"pk_prepared": "tbadmin",
|
||||
"pk_vouchertype": "记账",
|
||||
"prepareddate": "2022-12-23",
|
||||
"details": [
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "9433.96",
|
||||
"localdebitamount": "9433.96",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040602",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "9433.96",
|
||||
"localcreditamount": "9433.96",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032018000261"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "92382.57",
|
||||
"localdebitamount": "92382.57",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040601",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "92382.57",
|
||||
"localcreditamount": "92382.57",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032021000015"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "34324.77",
|
||||
"localdebitamount": "34324.77",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040601",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "34324.77",
|
||||
"localcreditamount": "34324.77",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032020000008"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "129066.37",
|
||||
"localdebitamount": "129066.37",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040601",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "129066.37",
|
||||
"localcreditamount": "129066.37",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "73",
|
||||
"checkvaluecode": "1100032020000009"
|
||||
},
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040605",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "160106",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "1594755.13",
|
||||
"localdebitamount": "1594755.13",
|
||||
"creditamount": "0",
|
||||
"localcreditamount": "0"
|
||||
},
|
||||
{
|
||||
"explanation": "转资申报单ZZSB1017252022000058ZJ-FQ-YD-202202-002杭州市公安局西湖区分局2021年度雪亮工程区域感知系统(租赁)服务项目(110路)",
|
||||
"pk_accsubj": "16040603",
|
||||
"pk_currtype": "CNY",
|
||||
"debitamount": "0",
|
||||
"localdebitamount": "0",
|
||||
"creditamount": "1594755.13",
|
||||
"localcreditamount": "1594755.13",
|
||||
"ass": [
|
||||
{
|
||||
"checktypecode": "jobass",
|
||||
"checkvaluecode": "13010100056"
|
||||
},
|
||||
{
|
||||
"checktypecode": "D0002",
|
||||
"checkvaluecode": "29"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
[
|
||||
{
|
||||
"operation": "shift",
|
||||
"spec": {
|
||||
"pk_corp": "voucher.pk_corp",
|
||||
"pk_glorgbook": "voucher.pk_glorgbook",
|
||||
"pk_prepared": "voucher.pk_prepared",
|
||||
"vouchertype_shortname": "voucher.pk_vouchertype",
|
||||
"prepareddate": "voucher.prepareddate",
|
||||
"details": {
|
||||
"*": {
|
||||
"explanation": "voucher.details[&1].explanation",
|
||||
"pk_accsubj": "voucher.details[&1].pk_accsubj",
|
||||
"pk_currtype": "voucher.details[&1].pk_currtype",
|
||||
"debitamount": "voucher.details[&1].debitamount",
|
||||
"localdebitamount": "voucher.details[&1].localdebitamount",
|
||||
"creditamount": "voucher.details[&1].creditamount",
|
||||
"localcreditamount": "voucher.details[&1].localcreditamount",
|
||||
"ass": {
|
||||
"*": {
|
||||
"checktypecode": "voucher.details[&3].ass[&1].checktypecode",
|
||||
"checkvaluecode": "voucher.details[&3].ass[&1].checkvaluecode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>nifi-hzyadev-bundle</artifactId>
|
||||
<groupId>com.hzya</groupId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hzya-nifi-AdvancedJoltTransformer-processors</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-api</artifactId>
|
||||
<version>${nifi-revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-dbcp-service-api</artifactId>
|
||||
<version>${nifi-revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-processor-utils</artifactId>
|
||||
<version>1.15.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-mock</artifactId>
|
||||
<version>${nifi-revision}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bazaarvoice.jolt</groupId>
|
||||
<artifactId>jolt-core</artifactId>
|
||||
<version>0.1.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bazaarvoice.jolt</groupId>
|
||||
<artifactId>json-utils</artifactId>
|
||||
<version>0.1.8</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,175 @@
|
|||
package com.hzya.frame;
|
||||
|
||||
import org.apache.nifi.expression.ExpressionLanguageScope;
|
||||
import org.apache.nifi.processor.AbstractProcessor;
|
||||
import com.bazaarvoice.jolt.Chainr;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.nifi.annotation.behavior.ReadsAttribute;
|
||||
import org.apache.nifi.annotation.behavior.ReadsAttributes;
|
||||
import org.apache.nifi.annotation.behavior.WritesAttribute;
|
||||
import org.apache.nifi.annotation.behavior.WritesAttributes;
|
||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||
import org.apache.nifi.annotation.documentation.SeeAlso;
|
||||
import org.apache.nifi.annotation.documentation.Tags;
|
||||
import org.apache.nifi.annotation.lifecycle.OnScheduled;
|
||||
import org.apache.nifi.components.PropertyDescriptor;
|
||||
import org.apache.nifi.flowfile.FlowFile;
|
||||
import org.apache.nifi.processor.*;
|
||||
import org.apache.nifi.processor.exception.ProcessException;
|
||||
import org.apache.nifi.processor.io.InputStreamCallback;
|
||||
import org.apache.nifi.processor.io.OutputStreamCallback;
|
||||
import org.apache.nifi.processor.util.StandardValidators;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* 自定义jolt转换器
|
||||
*
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame
|
||||
* @Project:nifi-hzyadev-bundle
|
||||
* @name:AdvancedJoltTransformerProcessor
|
||||
* @Date:2025/7/30 10:29
|
||||
* @Filename:AdvancedJoltTransformerProcessor
|
||||
*/
|
||||
@Tags({"jolt", "json", "transform", "custom"})
|
||||
@CapabilityDescription("自定义Jolt JSON转换处理器,使用Jolt 0.1.8版本执行JSON数据转换")
|
||||
@SeeAlso({})
|
||||
@ReadsAttributes({@ReadsAttribute(attribute = "", description = "")})
|
||||
@WritesAttributes({@WritesAttribute(attribute = "", description = "")})
|
||||
public class AdvancedJoltTransformerProcessor extends AbstractProcessor {
|
||||
// 属性:Jolt转换规范
|
||||
public static final PropertyDescriptor JOLT_SPEC = new PropertyDescriptor.Builder().name("JOLT_SPEC").displayName("Jolt转换规范").description("Jolt转换规范,JSON格式。支持表达式语言。").required(true).addValidator(StandardValidators.NON_EMPTY_VALIDATOR).expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES).build();
|
||||
|
||||
// 关系:成功和失败
|
||||
public static final Relationship REL_SUCCESS = new Relationship.Builder().name("success").description("转换成功的FlowFile").build();
|
||||
|
||||
public static final Relationship REL_FAILURE = new Relationship.Builder().name("failure").description("转换失败的FlowFile").build();
|
||||
|
||||
private List<PropertyDescriptor> descriptors;
|
||||
private Set<Relationship> relationships;
|
||||
private ObjectMapper objectMapper;
|
||||
|
||||
@Override
|
||||
protected void init(final ProcessorInitializationContext context) {
|
||||
descriptors = Collections.singletonList(JOLT_SPEC);
|
||||
descriptors = Collections.unmodifiableList(descriptors);
|
||||
|
||||
final Set<Relationship> relationships = new HashSet<>();
|
||||
relationships.add(REL_SUCCESS);
|
||||
relationships.add(REL_FAILURE);
|
||||
this.relationships = Collections.unmodifiableSet(relationships);
|
||||
|
||||
this.objectMapper = new ObjectMapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Relationship> getRelationships() {
|
||||
return this.relationships;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<PropertyDescriptor> getSupportedPropertyDescriptors() {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
@OnScheduled
|
||||
public void onScheduled(final ProcessContext context) {
|
||||
// 处理器启动时的初始化逻辑
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrigger(final ProcessContext context, final ProcessSession session) throws ProcessException {
|
||||
FlowFile flowFile = session.get();
|
||||
if (flowFile == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String joltSpecStr = context.getProperty(JOLT_SPEC).evaluateAttributeExpressions(flowFile).getValue();
|
||||
|
||||
// 解析Jolt规范
|
||||
Object joltSpec;
|
||||
try {
|
||||
joltSpec = objectMapper.readValue(joltSpecStr, Object.class);
|
||||
} catch (IOException e) {
|
||||
getLogger().error("无法解析Jolt转换规范: {}", new Object[]{e.getMessage()}, e);
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建Jolt Chainr
|
||||
Chainr chainr;
|
||||
try {
|
||||
chainr = Chainr.fromSpec(joltSpec);
|
||||
} catch (Exception e) {
|
||||
getLogger().error("无法创建Jolt Chainr: {}", new Object[]{e.getMessage()}, e);
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
// 读取FlowFile内容并进行转换
|
||||
final AtomicReference<Object> transformedData = new AtomicReference<>();
|
||||
final AtomicReference<Exception> exception = new AtomicReference<>();
|
||||
|
||||
session.read(flowFile, new InputStreamCallback() {
|
||||
@Override
|
||||
public void process(InputStream in) throws IOException {
|
||||
try {
|
||||
// 读取输入JSON - 兼容JDK 1.8
|
||||
StringBuilder inputBuilder = new StringBuilder();
|
||||
byte[] buffer = new byte[8192];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
inputBuilder.append(new String(buffer, 0, bytesRead, StandardCharsets.UTF_8));
|
||||
}
|
||||
String inputJson = inputBuilder.toString();
|
||||
|
||||
// 解析输入JSON
|
||||
Object inputData = objectMapper.readValue(inputJson, Object.class);
|
||||
|
||||
// 执行Jolt转换
|
||||
Object result = chainr.transform(inputData);
|
||||
transformedData.set(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
exception.set(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 检查是否有异常
|
||||
if (exception.get() != null) {
|
||||
getLogger().error("JSON转换过程中发生错误: {}", new Object[]{exception.get().getMessage()}, exception.get());
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
// 将转换结果写入新的FlowFile
|
||||
flowFile = session.write(flowFile, new OutputStreamCallback() {
|
||||
@Override
|
||||
public void process(OutputStream out) throws IOException {
|
||||
String resultJson = objectMapper.writeValueAsString(transformedData.get());
|
||||
out.write(resultJson.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
});
|
||||
|
||||
// 更新FlowFile属性
|
||||
flowFile = session.putAttribute(flowFile, "jolt.transformed", "true");
|
||||
flowFile = session.putAttribute(flowFile, "mime.type", "application/json");
|
||||
|
||||
// 转移到成功关系
|
||||
session.transfer(flowFile, REL_SUCCESS);
|
||||
getLogger().info("成功转换FlowFile {}", new Object[]{flowFile});
|
||||
|
||||
} catch (Exception e) {
|
||||
getLogger().error("处理FlowFile时发生未预期的错误: {}", new Object[]{e.getMessage()}, e);
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
com.hzya.frame.AdvancedJoltTransformerProcessor
|
|
@ -0,0 +1,179 @@
|
|||
package com.hzya.frame;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.nifi.util.MockFlowFile;
|
||||
import org.apache.nifi.util.TestRunner;
|
||||
import org.apache.nifi.util.TestRunners;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Advanced JoltTransformer处理器的单元测试。
|
||||
*
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame
|
||||
* @Project:nifi-hzyadev-bundle
|
||||
* @name:AdvancedJoltTransformerProcessorTest
|
||||
* @Date:2025/7/30 10:52
|
||||
* @Filename:AdvancedJoltTransformerProcessorTest
|
||||
*/
|
||||
public class AdvancedJoltTransformerProcessorTest {
|
||||
private TestRunner runner;
|
||||
private ObjectMapper objectMapper;
|
||||
|
||||
/**
|
||||
* 测试设置方法。
|
||||
* 在每个测试方法执行前运行,用于初始化处理器的TestRunner。
|
||||
*/
|
||||
@Before
|
||||
public void init() {
|
||||
runner = TestRunners.newTestRunner(AdvancedJoltTransformerProcessor.class);
|
||||
objectMapper = new ObjectMapper();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void contrast() throws Exception {
|
||||
String inputJson = null;
|
||||
try {
|
||||
inputJson = new String(Files.readAllBytes(Paths.get("/Users/liuyang/workspaces/hzya/nifi-hzyadev-bundle/nifi-hzyadev-bundle/hzya-nifi-AdvancedJoltTransformer-processors/joltdemo/input1.json")), StandardCharsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
Object o = objectMapper.readValue(inputJson, Object.class);
|
||||
System.out.println(o);
|
||||
|
||||
String inputJson2 = null;
|
||||
try {
|
||||
inputJson2 = new String(Files.readAllBytes(Paths.get("/Users/liuyang/workspaces/hzya/nifi-hzyadev-bundle/nifi-hzyadev-bundle/hzya-nifi-AdvancedJoltTransformer-processors/joltdemo/out1.json")), StandardCharsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
ObjectMapper objectMapper2 = new ObjectMapper();
|
||||
Object o2 = objectMapper2.readValue(inputJson2, Object.class);
|
||||
System.out.println(o2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试 "成功路径" 的场景。
|
||||
* 在这个测试中,一个有效的JSON输入会被一个有效的Jolt规范成功转换。
|
||||
*
|
||||
* @throws JsonProcessingException 如果创建测试JSON时发生错误。
|
||||
* @throws UnsupportedEncodingException 如果不支持UTF-8编码。
|
||||
*/
|
||||
@Test
|
||||
public void testSuccessfulTransformation() throws JsonProcessingException, UnsupportedEncodingException {
|
||||
String joltSpec = null;
|
||||
try {
|
||||
joltSpec = new String(Files.readAllBytes(Paths.get("/Users/liuyang/workspaces/hzya/nifi-hzyadev-bundle/nifi-hzyadev-bundle/hzya-nifi-AdvancedJoltTransformer-processors/joltdemo/spec1.json")), StandardCharsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String inputJson = null;
|
||||
try {
|
||||
inputJson = new String(Files.readAllBytes(Paths.get("/Users/liuyang/workspaces/hzya/nifi-hzyadev-bundle/nifi-hzyadev-bundle/hzya-nifi-AdvancedJoltTransformer-processors/joltdemo/input1.json")), StandardCharsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// 3. 定义预期的输出 JSON
|
||||
final Map<String, Object> dataMap = new HashMap<>();
|
||||
dataMap.put("id", 12345);
|
||||
dataMap.put("user_info", "testUser");
|
||||
final Map<String, Object> expectedMap = new HashMap<>();
|
||||
expectedMap.put("data", dataMap);
|
||||
final String expectedOutputJson = objectMapper.writeValueAsString(expectedMap);
|
||||
|
||||
|
||||
// 4. 配置处理器并运行测试
|
||||
runner.setProperty(AdvancedJoltTransformerProcessor.JOLT_SPEC, joltSpec);
|
||||
runner.enqueue(inputJson.getBytes("UTF-8"));
|
||||
runner.run();
|
||||
|
||||
// 5. 断言结果
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_SUCCESS, 1);
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_FAILURE, 0);
|
||||
|
||||
MockFlowFile out = runner.getFlowFilesForRelationship(AdvancedJoltTransformerProcessor.REL_SUCCESS).get(0);
|
||||
|
||||
// 断言内容符合预期
|
||||
out.assertContentEquals(expectedOutputJson);
|
||||
// 断言属性已正确添加
|
||||
out.assertAttributeEquals("jolt.transformed", "true");
|
||||
out.assertAttributeEquals("mime.type", "application/json");
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试输入FlowFile内容不是有效JSON的场景。
|
||||
* 处理器应该将这种FlowFile路由到 'failure' 关系。
|
||||
*
|
||||
* @throws UnsupportedEncodingException 如果不支持UTF-8编码。
|
||||
*/
|
||||
@Test
|
||||
public void testInvalidInputJson() throws UnsupportedEncodingException {
|
||||
final String joltSpec = "[{\"operation\": \"shift\", \"spec\": {\"a\": \"b\"}}]";
|
||||
final String invalidInputJson = "{ \"key\": \"value\""; // 这是一个格式错误的JSON
|
||||
|
||||
runner.setProperty(AdvancedJoltTransformerProcessor.JOLT_SPEC, joltSpec);
|
||||
runner.enqueue(invalidInputJson.getBytes("UTF-8"));
|
||||
runner.run();
|
||||
|
||||
// 期望FlowFile被路由到failure关系
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_SUCCESS, 0);
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_FAILURE, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试JOLT_SPEC属性包含格式错误的JSON字符串的场景。
|
||||
* 处理器应该将这种FlowFile路由到 'failure' 关系。
|
||||
*
|
||||
* @throws UnsupportedEncodingException 如果不支持UTF-8编码。
|
||||
*/
|
||||
@Test
|
||||
public void testMalformedJoltSpec() throws UnsupportedEncodingException {
|
||||
final String malformedJoltSpec = "[{\"operation\": \"shift\""; // 格式错误的JSON
|
||||
final String inputJson = "{\"a\": 1}";
|
||||
|
||||
runner.setProperty(AdvancedJoltTransformerProcessor.JOLT_SPEC, malformedJoltSpec);
|
||||
runner.enqueue(inputJson.getBytes("UTF-8"));
|
||||
runner.run();
|
||||
|
||||
// 期望FlowFile被路由到failure关系
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_SUCCESS, 0);
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_FAILURE, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试JOLT_SPEC是有效的JSON,但不是一个有效的Jolt规范的场景 (例如,缺少必需的'operation'键)。
|
||||
* 处理器应该将这种FlowFile路由到 'failure' 关系。
|
||||
*
|
||||
* @throws UnsupportedEncodingException 如果不支持UTF-8编码。
|
||||
*/
|
||||
@Test
|
||||
public void testLogicallyInvalidJoltSpec() throws UnsupportedEncodingException {
|
||||
// 这个规范是有效的JSON,但在调用 Chainr.fromSpec() 时会失败。
|
||||
final String badLogicJoltSpec = "[{\"spec\": {\"a\": \"b\"}}]";
|
||||
final String inputJson = "{\"a\": 1}";
|
||||
|
||||
runner.setProperty(AdvancedJoltTransformerProcessor.JOLT_SPEC, badLogicJoltSpec);
|
||||
runner.enqueue(inputJson.getBytes("UTF-8"));
|
||||
runner.run();
|
||||
|
||||
// 期望FlowFile被路由到failure关系
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_SUCCESS, 0);
|
||||
runner.assertTransferCount(AdvancedJoltTransformerProcessor.REL_FAILURE, 1);
|
||||
}
|
||||
}
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
<artifactId>hzya-nifi-VoucherConversion-nar</artifactId>
|
||||
|
||||
<packaging>nar</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
com.hzya.frame.VoucherConversionProcessor
|
|
@ -21,6 +21,8 @@
|
|||
<module>hzya-nifi-U8CInterface-processors</module>
|
||||
<module>hzya-nifi-VoucherConversion-nar</module>
|
||||
<module>hzya-nifi-VoucherConversion-processors</module>
|
||||
<module>hzya-nifi-AdvancedJoltTransformer-nar</module>
|
||||
<module>hzya-nifi-AdvancedJoltTransformer-processors</module>
|
||||
</modules>
|
||||
|
||||
<parent>
|
||||
|
|
Loading…
Reference in New Issue