|
|
@@ -34,6 +34,15 @@ public class HlwInvoiceServiceImpl extends ServiceImpl<HlwInvoiceMapper, HlwInvo
|
|
|
@Override
|
|
|
public Page<?> getPageList(Integer pageNo, Integer pageSize, HlwInvoice hlwInvoice, HttpServletRequest request) {
|
|
|
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
|
|
|
+ //获取请求路由路径
|
|
|
+ String routeUrl = request.getServletPath();
|
|
|
+ //获取当前登录用户
|
|
|
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ List<String> companyCodeList = RoleDataUtils.findCompanyCodeList(sysUser.getUsername(), routeUrl, sysUser.getOrgCode());
|
|
|
+ if (companyCodeList.size() == 0) {
|
|
|
+ page.setRecords(Collections.emptyList());
|
|
|
+ return page;
|
|
|
+ }
|
|
|
//慧盈查询开票申请列表
|
|
|
String accessToken = OauthTokenUtils.getDayAccessToken();
|
|
|
String requestUrl = OauthApi.INVOICE_LIST;
|
|
|
@@ -43,6 +52,7 @@ public class HlwInvoiceServiceImpl extends ServiceImpl<HlwInvoiceMapper, HlwInvo
|
|
|
parameters.put("paymentCode", hlwInvoice.getPaymentCode());
|
|
|
parameters.put("subcontractorName", hlwInvoice.getSubcontractorName());
|
|
|
parameters.put("invoiceStatus", hlwInvoice.getInvoiceStatus());
|
|
|
+ parameters.put("companyCodeList", companyCodeList);
|
|
|
//数据加密
|
|
|
String biz_content = CryptTool.encode(JSONObject.toJSONString(parameters));
|
|
|
JSONObject jsonObject = OauthTokenUtils.doRequest(requestUrl, HttpsContants.POST, biz_content, accessToken);
|