简税合并版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

244 lines
11 KiB

2 years ago
package com.jianshui.invoice.utils;
import cn.hutool.core.util.IdUtil;
import com.jianshui.common.utils.encrypt.AisinoInvoiceDecryptUtil;
/**
* @Description
* @Author 巩权林
* @Date 2022-03-30 8:56
**/
public class JcskTest {
public static void main(String[] args) throws Exception {
// String key = "ZWaJUo9tKNKKQTQCryW9dw=="; // 1242
String key = "kpP/pYUBGWdIRNFswh+1Qg=="; // 1240
2 years ago
String order = "";
String m = "";
order = "{ \n" +
" \"appkey\": \"935248bf224f6c8431cdc1969f029519\",\n" +
" \"async\": false,\n" +
" \"bsrysfzjhm\":\"440823199706182127\",\n" +
" \"serviceId\": \"yhdj\",\n" +
" \"dqbm\": \"guangdong\",\n" +
" \"nsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"jsonData\": {\n" +
" \"bsryxm\": \"苏丽云\",\n" +
" \"dlsf\": \"7\",\n" +
" \"dlsfmm\": \"668899Sly\",\n" +
" \"dlfs\": \"6\",\n" +
" \"dlmm\": \"668899Sly\",\n" +
" \"dlzh\": \"S蘇小姐\",\n" +
" \"nsrmc\": \"广东启顺供应链管理有限公司\",\n" +
" \"nsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"bsrysfzjhm\": \"440823199706182127\",\n" +
" \"bsrysjhm\": \"18588747827\",\n" +
" \"zjh\": \"\",\n" +
" \"loginType\": \"0\"\n" +
" }\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------用户登记-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
String simpleUUID = IdUtil.simpleUUID();
System.out.println(simpleUUID);
order = "{\n" +
" \"async\": true,\n" +
" \"bsrysfzjhm\": \"440823199706182127\",\n" +
" \"dqbm\": \"guangdong\",\n" +
" \"jsonData\": {\n" +
" \"bz\": \"12135156\",\n" +
" \"fplxdm\": \"82\",\n" +
" \"fpqqlsh\": \"00000000000001000100101107218r24\",\n" +
" \"gfxxconfirm\": 0,\n" +
" \"gmfdz\": \"新疆喀什地区喀什市多来特巴格乡27村1组292号(3层) \",\n" +
" \"gmfkhh\": \"新疆喀什衣村商业银行股份有限公司浩罕支行\",\n" +
" \"gmflxdh\": \"13999088190\",\n" +
" \"gmfmc\": \"新疆善择装修设计有限公司\",\n" +
" \"gmfnsrsbh\": \"91653101MABJJNYH6P\",\n" +
" \"gmfyhzh\": \"860050012010123279428\",\n" +
" \"hjje\": \"133.5\",\n" +
" \"hjse\": \"17.36\",\n" +
" \"hsbz\": \"2\",\n" +
" \"jshj\": \"150.86\",\n" +
" \"mxList\": [\n" +
" {\n" +
" \"dj\": \"133.50\",\n" +
" \"dw\": \"台\",\n" +
" \"fphxz\": 0,\n" +
" \"ggxh\": \"BP-DKX2301\",\n" +
" \"je\": \"150.86\",\n" +
" \"se\": \"17.36\",\n" +
" \"slv\": \"0.13\",\n" +
" \"spsl\": \"1.00\",\n" +
" \"ssflbm\": \"1090417020000000000\",\n" +
" \"xmmc\": \"电烤箱\"\n" +
" }\n" +
" ],\n" +
" \"xsfdz\": \"广州市白云区北太路1633号广州民营科技园科兴路2号之一绿地汇创广场自编5栋23层2311房\",\n" +
" \"xsfkhh\": \"招商银行股份有限公司广州林和路支行\",\n" +
" \"xsflxdh\": \"18922325427\",\n" +
" \"xsfmc\": \"广东启顺供应链管理有限公司\",\n" +
" \"xsfnsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"xsfyhzh\": \"120915907010501\",\n" +
" \"jrznsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"jbrxm\": \"苏丽云\",\n" +
" \"jbrzjhm\": \"440823199706182127\",\n" +
" \"jbrzjzldm\": \"201\"\n" +
" },\n" +
" \"nsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"serviceId\": \"lzfpkj\"\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------蓝字发票开具-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\n" +
" \"appkey\": \"935248bf224f6c8431cdc1969f029519\",\n" +
" \"dqbm\":\"guangdong\",\n" +
" \"async\": false,\n" +
" \"bsrysfzjhm\":\"440823199706182127\",\n" +
" \"nsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"requestId\": \"e14c0da8-0ad5-42eb-88dc-3be8185550b2\",\n" +
" \"serviceId\": \"tycxjk\"\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------通用发票查询-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\n" +
" \"appkey\": \"935248bf224f6c8431cdc1969f029519\",\n" +
" \"dqbm\":\"guangdong\",\n" +
" \"async\": true,\n" +
" \"bsrysfzjhm\":\"440823199706182127\",\n" +
" \"nsrsbh\": \"91440101MA5CT3T24L\",\n" +
" \"serviceId\": \"hqrlsbewm\"\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------获取人脸识别二维码-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\n" +
"\"identity\": \"1238\",\n" +
"\"order\": {\n" +
"\"billNo\": \"661024643068230218103524\",\n" +
"\"sqlb\": \"0\",\n" +
"\"oriInvoiceCode\": \"3700222130\",\n" +
"\"oriInvoiceNumber\": \"10405172\",\n" +
"\"billTime\": \"2023-2-18 10:35:24\",\n" +
"\"buyerName\": \"河北中宝法兰管件制造有限公司\",\n" +
"\"buyerTaxNo\": \"9113093067851155XY\",\n" +
"\"sellerName\": \"济南思瑜金经贸有限公司\",\n" +
"\"sellerTaxNo\": \"91370112568114860P\",\n" +
"\"applyRemark\": \"0000000100\",\n" +
"\"productOilFlag\": \"0\",\n" +
"\"invoiceLine\": \"s\",\n" +
"\"invoiceRedApplyDetails\": [{\n" +
"\"goodsCode\": \"108020707\",\n" +
"\"goodsName\": \"普碳板Q235B\",\n" +
"\"num\": \"-27\",\n" +
"\"specType\": \"40*2200*L\",\n" +
"\"taxAmount\": \"-12704.34\",\n" +
"\"taxExcludedAmount\": \"-97725.66\",\n" +
"\"taxExcludedPrice\": \"3619.46902655\",\n" +
"\"price\": \"4090\",\n" +
"\"taxRate\": \"0.13\",\n" +
"\"withTaxFlag\": \"false\",\n" +
"\"originKprq\": \"2023-2-18 10:35:24\",\n" +
"\"favouredPolicyFlag\": 0,\n" +
"\"fphxz\": \"0\"\n" +
"}]\n" +
"\t}\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------红字申请表上传-控制台-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\n" +
"\"identity\": \"1238\",\n" +
"\"SQBXZQQPCH\": \"230301132411\",\n" +
"\"NSRSBH\": \"123701004930058884\",\n" +
"\"FPLXDM\": \"s\",\n" +
"\"XXBFW\": 0\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------红字申请表下载-控制台-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\"jsonData\":{\"fpqqlsh\":\"\",\"fphm\":\"\",\"kprq\":\"2023-03-08 00:00:00\",\"zzfpdm\":\"\",\"zzfphm\":\"\"},\"isAsync\":true,\"dqbm\":\"guangdong\",\"nsrsbh\":\"91440101MA5CT3T24L\",\"bsrsfzjhm\":\"440823199706182127\",\"serviceId\":\"fpxxxxcx\"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------发票查询-数科-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\"jsonData\":{\"fphm\":\"23442000000033326026\",\"kprq\":\"20230321205601\",\"wjgs\":\"PDF\"},\"appkey\":\"ZWaJUo9tKNKKQTQCryW9dw==\",\"async\":true,\"dqbm\":\"guangdong\",\"nsrsbh\":\"91440101MA5CT3T24L\",\"bsrysfzjhm\":\"440823199706182127\",\"serviceId\":\"qdfpwjhq\"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------获取发票文件-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
order = "{\n" +
"\t\"async\": true,\n" +
"\t\"nsrsbh\": \"91440101MA9Y2B9C09\",\n" +
"\t\"jsonData\": {\n" +
"\t\t\"yfphm\": \"23442000000026315014\",\n" +
"\t\t\"chyydm\": \"01\"\n" +
"\t},\n" +
"\t\"bsrysfzjhm\": \"210281199307250821\",\n" +
"\t\"dqbm\": \"guangdong\",\n" +
"\t\"appkey\": \"kpP/pYUBGWdIRNFswh+1Qg==\",\n" +
"\t\"serviceId\": \"kshc\"\n" +
"\n" +
"}";
System.out.println(order);
m = AisinoInvoiceDecryptUtil.encrypt(order, key);
System.out.println("-------------------快速红冲-----------------------------");
System.out.println(m);
System.out.println("------------------------------------------------");
2 years ago
}
}