|
|
|
@ -720,6 +720,23 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
public HXResponse getFileUrl(InvoiceAllFileAcquisitionTWODTO invoiceAllFileAcquisitionTWODTO, Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
FileAcquisitionTwoDTO fileAcquisitionDTO = BeanUtil.copyProperties(invoiceAllFileAcquisitionTWODTO, FileAcquisitionTwoDTO.class); |
|
|
|
|
|
|
|
|
|
// 查询用户信息组装
|
|
|
|
|
InvoiceAllYhdj yhdj = getUserInfo(companyservice); |
|
|
|
|
if(BeanUtil.isEmpty(yhdj)){ |
|
|
|
|
return new HXResponse("未查询到登记信息!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fileAcquisitionDTO.setAsync("true"); |
|
|
|
|
fileAcquisitionDTO.setNsrsbh(yhdj.getNsrsbh()); |
|
|
|
|
fileAcquisitionDTO.setBsrysfzjhm(yhdj.getBsrysfzjhm()); |
|
|
|
|
fileAcquisitionDTO.setDqbm(yhdj.getDqbm()); |
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new JSONObject(); |
|
|
|
|
map.put("fphm",fileAcquisitionDTO.getFphm()); |
|
|
|
|
map.put("kprq",fileAcquisitionDTO.getKprq()); |
|
|
|
|
fileAcquisitionDTO.setJsonData(map); |
|
|
|
|
|
|
|
|
|
ValidateUtils.validate(fileAcquisitionDTO); |
|
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject result = null; |
|
|
|
@ -746,6 +763,9 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
allApiLog.setCreateTime(new Date()); |
|
|
|
|
allApiLogMapper.insertInvoiceAllApiLog(allApiLog); |
|
|
|
|
|
|
|
|
|
HXResponse response = new HXResponse("0000", "同步成功"); |
|
|
|
|
response.put("data", JSONUtil.parse(data)); |
|
|
|
|
return response; |
|
|
|
|
} else { |
|
|
|
|
return new HXResponse(msg); |
|
|
|
|
} |
|
|
|
@ -756,8 +776,7 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HXResponse response = new HXResponse("0000", "同步成功", result); |
|
|
|
|
return response; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -1248,6 +1267,7 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// TODO: 2023/3/29 返回数据处理
|
|
|
|
|
response.put("data", JSONUtil.parse(data)); |
|
|
|
|
} |
|
|
|
|
else if (WebServiceConstant.ADD_RED_INVOICE.equals(finalServiceId)) { |
|
|
|
|
// 查找原发票信息
|
|
|
|
@ -1308,6 +1328,7 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
} else if (WebServiceConstant.QDFPWJHQ.equals(finalServiceId)) { |
|
|
|
|
// 审核红字信息表
|
|
|
|
|
// TODO: 全电发票文件获取
|
|
|
|
|
response.put("data", JSONUtil.parse(data)); |
|
|
|
|
} else if (WebServiceConstant.QRCODE.equals(finalServiceId)) { |
|
|
|
|
response.put("data", JSONUtil.parse(data)); |
|
|
|
|
} else if (WebServiceConstant.SQHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
@ -1360,6 +1381,8 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
response.put("data", addRedInfoInvoiceTWOVO); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
response.put("data",JSONUtil.parse(data)); |
|
|
|
|
} |
|
|
|
|
return response; |
|
|
|
|
} else { |
|
|
|
@ -1434,4 +1457,19 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 用户信息处理 |
|
|
|
|
*/ |
|
|
|
|
public InvoiceAllYhdj getUserInfo(Companyservice companyservice){ |
|
|
|
|
|
|
|
|
|
// 查询用户登记参数
|
|
|
|
|
QueryWrapper<InvoiceAllYhdj> yhdjQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
yhdjQueryWrapper.eq("nsrsbh", companyservice.getSellertax()); |
|
|
|
|
yhdjQueryWrapper.eq("identity", companyservice.getIdentity()); |
|
|
|
|
InvoiceAllYhdj invoiceAllYhdj = yhdjMapper.selectOne(yhdjQueryWrapper); |
|
|
|
|
|
|
|
|
|
return invoiceAllYhdj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|