中交建-销项合并测试:用户登记接口

beta-enc
dongxiaoke 2 years ago
parent 2213fb2825
commit 6e81d1e874
  1. 14
      jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoiceall/v1/InvoiceAllController.java
  2. 2
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/adapter/request/AisinoInvoiceRequestAdapterImpl.java
  3. 8
      jianshui-invoice/src/main/java/com/jianshui/invoice/utils/JcskTest.java

@ -12,6 +12,9 @@ import com.jianshui.invoiceall.factory.IInvoiceAllResponseFactory;
import com.jianshui.invoiceall.service.IInvoiceAll;
import com.jianshui.invoiceall.service.IInvoiceAllRequestService;
import com.jianshui.invoiceall.service.IInvoiceAllResponseService;
import com.jianshui.invoiceall.service.impl.InvoiceAllImpl;
import com.jianshui.invoiceall.service.impl.adapter.request.AisinoIncomeRequestAdapterImpl;
import com.jianshui.invoiceall.service.impl.adapter.response.AisinoIncomeResponseAdapterImpl;
import com.jianshui.system.service.ICompanyserviceService;
import com.jianshui.system.service.IServiceManageService;
import io.swagger.annotations.Api;
@ -72,13 +75,11 @@ public class InvoiceAllController {
}
// 获得入口报文适配器
String requestAdapterKey = serviceManageService.getRequestAdapterKey(SERVICE_KEY, companyservice.getCompanyid());
IInvoiceAllRequestService incomeRequestService = invoiceAllRequestFactory.getService(requestAdapterKey);
IInvoiceAllRequestService incomeRequestService = new AisinoIncomeRequestAdapterImpl();
JSONObject requestBody = incomeRequestService.decrypt(request, companyservice);
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier(SERVICE_KEY, companyservice.getCompanyid());
IInvoiceAll invoiceAllService = iInvoceiAllServiceFactory.getService(serviceKey);
// 指定请求实例
IInvoiceAll invoiceAllService = new InvoiceAllImpl();
InvoiceAllYhdjDTO invoiceAllYhdjDTO = requestBody.toJavaObject(InvoiceAllYhdjDTO.class);
AjaxResult result = invoiceAllService.registration(companyservice, invoiceAllYhdjDTO);
@ -89,8 +90,7 @@ public class InvoiceAllController {
}
//返回报文处理器
String responseAdapterKey = serviceManageService.getResponseAdapterKey(SERVICE_KEY, companyservice.getCompanyid());
IInvoiceAllResponseService incomeResponseService = invoiceAllResponseFactory.getService(responseAdapterKey);
IInvoiceAllResponseService incomeResponseService = new AisinoIncomeResponseAdapterImpl();
return incomeResponseService.response(result, companyservice, "");
}

@ -102,7 +102,7 @@ public class AisinoInvoiceRequestAdapterImpl implements IInvoiceRequestService {
// 平台解密
try {
// TODO: 2023/4/23 调试屏蔽
order = AisinoInvoiceDecryptUtil.decrypt(order, JKey);
// order = AisinoInvoiceDecryptUtil.decrypt(order, JKey);
} catch (Exception e) {
e.printStackTrace();
throw new JianshuiParamErrorException(ErrorCode.DECRYPT_ERROR, companyservice, "invoice");

@ -80,7 +80,7 @@ public class JcskTest {
" \"bsryxm\": \"贾宁\",\n" +
" \"dlsf\": \"7\",\n" +
" \"dlsfmm\": \"139690jn\",\n" +
" \"dlfs\": \"6\",\n" +
" \"dlfs\": \"3\",\n" +
" \"dlmm\": \"139690jn\",\n" +
" \"dlzh\": \"37028519930620441X\",\n" +
" \"nsrmc\": \"城阳区兴顺通制冷设备维修服务部\",\n" +
@ -88,7 +88,7 @@ public class JcskTest {
" \"bsrysfzjhm\": \"37028519930620441X\",\n" +
" \"bsrysjhm\": \"13969067208\",\n" +
" \"zjh\": \"\",\n" +
" \"loginType\": \"0\"\n" +
" \"loginType\": \"1\"\n" +
" }\n" +
"}";
@ -158,11 +158,11 @@ public class JcskTest {
order = "{\n" +
" \"appkey\": \"935248bf224f6c8431cdc1969f029519\",\n" +
" \"dqbm\":\"guangdong\",\n" +
" \"dqbm\":\"qingdao\",\n" +
" \"async\": false,\n" +
" \"bsrysfzjhm\":\"37028519930620441X\",\n" +
" \"nsrsbh\": \"92370214MACAAEK16E\",\n" +
" \"requestId\": \"bac8903e-25e5-491f-838e-cb5d0919b782\",\n" +
" \"requestId\": \"2af023ec-6a08-476a-9f6e-380a0093cbf8\",\n" +
" \"serviceId\": \"tycxjk\"\n" +
"}";
System.out.println(order);

Loading…
Cancel
Save