package com.changhong.epc.test; import com.changhong.epc.bean.tenant.bill.OCRBillEntity; import com.changhong.epc.parsing.service.transition.billInfo.TravelTypeTransverterBillInfo; import com.iemsoft.framework.cloud.core.tools.JSONTool; import javax.annotation.Resource; //@RunWith(SpringRunner.class) //@SpringBootTest(classes = ParsingApplication.class) public class BillTest { @Resource private TravelTypeTransverterBillInfo billInfo ; private OCRBillEntity info = JSONTool.toObj("{\"billDatas\":[{\"allotTenant\":true,\"billBodyEntityList\":[{\"billCode\":\"a0f8bd35f3fa4ebdb712f589c7fdcd20\",\"billKeyCode\":{},\"billKeyName\":{},\"billMasterCode\":{},\"billMasterName\":{},\"billMoney\":0,\"bodyDataMap\":{\"560054\":\"169.00\",\"560081\":\"0.00\",\"560082\":\"0%\",\"590018\":\"*电信服务*电信业务使用费\"},\"ignore\":false},{\"billCode\":\"e668016ad58844deb7ba570c46b7bd43\",\"billKeyCode\":{},\"billKeyName\":{},\"billMasterCode\":{},\"billMasterName\":{},\"billMoney\":0,\"bodyDataMap\":{\"560054\":\"4.57\",\"560081\":\"0.00\",\"560082\":\"0%\",\"590018\":\"*电信服务*违约金\"},\"ignore\":false}],\"billCode\":\"101YXYX181200469-002-01\",\"billHeadMap\":{\"500002\":\"账期:2018年09月代表号码:08162571861\",\"520040\":\"四川\",\"540040\":\"发票专用章\",\"550025\":\"57467682\",\"550031\":\"915107036714224151\",\"550035\":\"91510700MA62FQNGP\",\"550044\":\"499099436722\",\"550055\":\"915107036714224151\",\"550099\":\"051001700111\",\"560038\":\"173.57\",\"560041\":\"0.00\",\"560133\":\"173.57\",\"560134\":\"173.57\",\"580006\":\"\",\"580010\":\"11354667128443409224\",\"590006\":\"四川增值税电子普通发票\",\"590010\":\"中国电信股份有限公司绵阳分公司\",\"590012\":\"四川云游互联科技有限公司\",\"590024\":\"中国电信股份有限公司绵阳分公司\",\"600042\":\"绵阳市科创区创新中心7号楼103号08162417523\",\"600043\":\"中国工商银行绵阳高新技术产业开发支行2308414109100129754\",\"600044\":\"四川省绵阳市绵州路中段243号,电话:10000\",\"600045\":\"中国银行绵阳市分行营业部123900465975\",\"610007\":\"管理员\",\"610012\":\"胡敏\",\"610014\":\"胡敏\",\"620024\":\"20181113\",\"640003\":\"国家税务局监制\"},\"billKeyCode\":{\"R_EAmout\":\"173.57\"},\"billKeyName\":{\"R_EAmout\":\"173.57\"},\"billMasterCode\":{},\"billMasterName\":{},\"billModelCode\":\"B00000000004\",\"ignore\":false,\"ruleMsg\":[]},{\"allotTenant\":true,\"billBodyEntityList\":[{\"billCode\":\"f341fcc36a86440dbfe62021d9c60487\",\"billKeyCode\":{},\"billKeyName\":{},\"billMasterCode\":{},\"billMasterName\":{},\"billMoney\":0,\"bodyDataMap\":{\"560054\":\"169.00\",\"560081\":\"0.00\",\"560082\":\"0%\",\"590018\":\"*电信服务*电信业务使用费\"},\"ignore\":false}],\"billCode\":\"101YXYX181200469-001-02\",\"billHeadMap\":{\"500002\":\"账期:2018年10月代表号码:08162571816\",\"520040\":\"四川绵阳市\",\"540040\":\"发票专用章\",\"550025\":\"57385807\",\"550031\":\"915107036714224151\",\"550035\":\"91510700MA62FQNGP\",\"550044\":\"499099436714\",\"550055\":\"915107036714224151\",\"550099\":\"051001700111\",\"560038\":\"169.00\",\"560041\":\"0.00\",\"560133\":\"169.00\",\"560134\":\"169.0\",\"580006\":\"\",\"580010\":\"07634568675859131704\",\"590006\":\"四川增值税电子普通发票\",\"590010\":\"中国电信股份有限公司绵阳分公司\",\"590012\":\"四川云游互联科技有限公司\",\"590024\":\"中国电信股份有限公司绵阳分公司\",\"600042\":\"绵阳市科创区创新中心7号楼103号8162A17523\",\"600043\":\"中国工商银行绵阳高新技术产业开发支行2308414109100129754\",\"600044\":\"四川省绵阳市绵州路中段243号,电话:10000\",\"600045\":\"中国银行绵阳市分行营业部123900465975\",\"610007\":\"管理员\",\"610012\":\"胡敢\",\"610014\":\"胡敏\",\"620024\":\"20181113\",\"640003\":\"国家税务局监制\"},\"billKeyCode\":{\"R_EAmout\":\"169.00\"},\"billKeyName\":{\"R_EAmout\":\"169.00\"},\"billMasterCode\":{},\"billMasterName\":{},\"billModelCode\":\"B00000000004\",\"ignore\":false,\"ruleMsg\":[]},{\"allotTenant\":true,\"billBodyEntityList\":[],\"billCode\":\"101YXYX181200469-001-01\",\"billHeadMap\":{\"550122\":\"YSX0000000059062\"},\"billKeyCode\":{},\"billKeyName\":{},\"billMasterCode\":{},\"billMasterName\":{},\"billModelCode\":\"B00600010000\",\"ignore\":false,\"ruleMsg\":[]}],\"formId\":\"521a8ff3e3d0101f3a1946f2503cf79e\",\"orderCode\":\"101YXYX181200469\",\"tenantId\":9}" , OCRBillEntity.class); // @Test public void test(){ System.out.println(billInfo.exeConvert(info)); } }