|
|
|
@ -2021,14 +2021,15 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
param.put(ElephantConstants.YHM,resp.getString(ElephantConstants.YHM)); |
|
|
|
|
|
|
|
|
|
HXResponse rpaAuthStatus = qrcode(param, companyservice); |
|
|
|
|
|
|
|
|
|
if (StringUtils.equals("000000",rpaAuthStatus.getCode())){ |
|
|
|
|
rpaAuthStatus.setCode("200"); |
|
|
|
|
rpaAuthStatus.setMessage("处理成功"); |
|
|
|
|
JSONObject data = JSONObject.parseObject(JSON.toJSONString(rpaAuthStatus.getData())); |
|
|
|
|
String ewm = data.getString(ElephantConstants.EWM); |
|
|
|
|
rpaAuthStatus.setData(new HashMap<>().put(ElephantConstants.EWM.toLowerCase(),ewm)); |
|
|
|
|
} |
|
|
|
|
log.info("获取人脸二维码大象返回报文封装后:{}",JSONUtil.toJsonStr(hxResponse)); |
|
|
|
|
|
|
|
|
|
// if (StringUtils.equals("000000",rpaAuthStatus.getCode())){
|
|
|
|
|
// rpaAuthStatus.setCode("200");
|
|
|
|
|
// rpaAuthStatus.setMessage("处理成功");
|
|
|
|
|
// JSONObject data = JSONObject.parseObject(JSON.toJSONString(rpaAuthStatus.getData()));
|
|
|
|
|
// String ewm = data.getString(ElephantConstants.EWM);
|
|
|
|
|
// rpaAuthStatus.setData(new HashMap<>().put(ElephantConstants.EWM.toLowerCase(),ewm));
|
|
|
|
|
// }
|
|
|
|
|
return rpaAuthStatus; |
|
|
|
|
|
|
|
|
|
}else if (WebServiceConstant.SQHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
@ -2086,6 +2087,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HXResponse hxResponse = queryRedConfirmationList(param, companyservice); |
|
|
|
|
log.info(" 查询红字信息表大象返回报文封装后:{}",JSONUtil.toJsonStr(hxResponse)); |
|
|
|
|
|
|
|
|
|
HZXXLIST hzxxlist = JSONObject.parseObject(JSONObject.toJSONString(hxResponse.getData()), HZXXLIST.class); |
|
|
|
|
|
|
|
|
@ -2126,6 +2128,8 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
List<HZXXDATA> list = hzqrxxlist.getLIST(); |
|
|
|
|
|
|
|
|
|
List<HZXXDATACase> hzxxList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (HZXXDATA hzxxdata : list) { |
|
|
|
|
LambdaQueryWrapper<Redinfo> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
queryWrapper.eq(Redinfo::getRedInfoNo,hzxxdata.getHZFPXXQRDBH()); |
|
|
|
@ -2151,9 +2155,38 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
//处理发票表和红字信息表
|
|
|
|
|
redInfoAndInvoiceUpdate(hzxxdata, redinfo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new HXResponse("200","查询成功",redinfos); |
|
|
|
|
//封装返回数据
|
|
|
|
|
HZXXDATACase hzxxdataCase = new HZXXDATACase(); |
|
|
|
|
hzxxdataCase.setUuid(hzxxdata.getUUID()); |
|
|
|
|
hzxxdataCase.setRedInfoNo(hzxxdata.getHZFPXXQRDBH()); |
|
|
|
|
hzxxdataCase.setLrfsf(hzxxdata.getLRFSF()); |
|
|
|
|
hzxxdataCase.setSellerTaxnum(hzxxdata.getXSFNSRSBH()); |
|
|
|
|
hzxxdataCase.setSellerName(hzxxdata.getXSFMC()); |
|
|
|
|
hzxxdataCase.setBuyerTaxnum(hzxxdata.getGMFNSRSBH()); |
|
|
|
|
hzxxdataCase.setBuyerName(hzxxdata.getGMFMC()); |
|
|
|
|
hzxxdataCase.setLzfpdm(hzxxdata.getLZFPDM()); |
|
|
|
|
hzxxdataCase.setLzfphm(hzxxdata.getLZFPHM()); |
|
|
|
|
hzxxdataCase.setSfzzfpbz(hzxxdata.getSFZZFPBZ()); |
|
|
|
|
hzxxdataCase.setLzkprq(hzxxdata.getLZKPRQ()); |
|
|
|
|
hzxxdataCase.setLzhjje(hzxxdata.getLZHJJE()); |
|
|
|
|
hzxxdataCase.setLzhjse(hzxxdata.getLZHJSE()); |
|
|
|
|
hzxxdataCase.setLzfppzdm(hzxxdata.getLZFPPZDM()); |
|
|
|
|
hzxxdataCase.setLzfptdyslxdm(hzxxdata.getLZFPTDYSLXDM()); |
|
|
|
|
hzxxdataCase.setHzcxje(hzxxdata.getHZCXJE()); |
|
|
|
|
hzxxdataCase.setHzcxse(hzxxdata.getHZCXSE()); |
|
|
|
|
hzxxdataCase.setHzqrdmxsl(hzxxdata.getHZQRDMXSL()); |
|
|
|
|
hzxxdataCase.setChyydm(hzxxdata.getCHYYDM()); |
|
|
|
|
hzxxdataCase.setHzqrdztdm(hzxxdata.getCHYYDM()); |
|
|
|
|
hzxxdataCase.setQrrq(hzxxdata.getQRRQ()); |
|
|
|
|
hzxxdataCase.setYkjhzfpbz(hzxxdata.getYKJHZFPBZ()); |
|
|
|
|
hzxxdataCase.setHzfphm(hzxxdata.getHZFPHM()); |
|
|
|
|
hzxxdataCase.setHzkprq(hzxxdata.getHZKPRQ()); |
|
|
|
|
hzxxdataCase.setYxbz(hzxxdata.getYXBZ()); |
|
|
|
|
hzxxList.add(hzxxdataCase); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new HXResponse("200","查询成功",hzxxList,true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Async |
|
|
|
@ -2203,13 +2236,19 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
AjaxResult queryResult = null; |
|
|
|
|
try { |
|
|
|
|
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstantsV6.QUERY_INVOICE_LOCALHOST, ElephantConstantsV6.QUERY_INVOICE_METHOD, JSONUtil.parse(param), companyservice); |
|
|
|
|
log.info("大象返回报文封装后:{}",JSONUtil.toJsonStr(queryResult)); |
|
|
|
|
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { |
|
|
|
|
log.error("【销项发票】【大象接口】【发票开具】发票请求异常,请求报文{},销方信息{}", param.toJSONString(), JSONObject.toJSONString(companyservice)); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
throw new JianshuiServiceException("系统异常!"); |
|
|
|
|
} |
|
|
|
|
//转换成小写
|
|
|
|
|
JSONObject data = queryResult.getJsonData(); |
|
|
|
|
String qrrq = data.getString(ElephantConstants.QRRQ); |
|
|
|
|
data.clear(); |
|
|
|
|
data.put(ElephantConstants.CASE_QRRQ,qrrq); |
|
|
|
|
|
|
|
|
|
return new HXResponse(String.valueOf(queryResult.getCode()),queryResult.getMsg(),queryResult.getData()); |
|
|
|
|
return new HXResponse(String.valueOf(queryResult.getCode()),queryResult.getMsg(),data,true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// @Transactional(rollbackFor = Exception.class)
|
|
|
|
@ -2234,6 +2273,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
AjaxResult queryResult = null; |
|
|
|
|
try { |
|
|
|
|
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstantsV6.QUERY_RED_CONFIRMATION_ITEM_LIST_LOCALHOST, ElephantConstantsV6.QUERY_RED_CONFIRMATION_ITEM_LIST_METHOD, JSONUtil.parse(param), companyservice); |
|
|
|
|
log.info(" 红字信息表申请大象返回报文封装后:{}",JSONUtil.toJsonStr(queryResult)); |
|
|
|
|
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { |
|
|
|
|
log.error("【销项发票】【大象接口】【红字信息表申请】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(param).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
|
e.printStackTrace(); |
|
|
|
@ -2274,7 +2314,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
invoiceMapper.insertInvoice(invoice); |
|
|
|
|
//红字信息表主信息封装
|
|
|
|
|
redinfo.setRedInfoNo(elephantRedInfo.getHZFPXXQRDBH()); |
|
|
|
|
redinfo.setSqlb(elephantRedInfo.getLRFSF()); |
|
|
|
|
redinfo.setSqlb(Integer.parseInt(elephantRedInfo.getLRFSF())); |
|
|
|
|
redinfo.setSellerTaxnum(elephantRedInfo.getXSFNSRSBH()); |
|
|
|
|
redinfo.setSellerName(elephantRedInfo.getXSFMC()); |
|
|
|
|
redinfo.setBuyerTaxnum(elephantRedInfo.getGMFNSRSBH()); |
|
|
|
@ -2300,18 +2340,61 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
//返回报文
|
|
|
|
|
AddRedInfoInvoiceTWOVO addRedInfoInvoiceTWO = new AddRedInfoInvoiceTWOVO(); |
|
|
|
|
|
|
|
|
|
addRedInfoInvoiceTWO.setHzfpxxqrdZtdm(elephantRedInfo.getHZFPXXQRDBH()); |
|
|
|
|
addRedInfoInvoiceTWO.setHzfpxxqrdbh(elephantRedInfo.getHZFPXXQRDBH()); |
|
|
|
|
addRedInfoInvoiceTWO.setHzfpxxqrdid(elephantRedInfo.getUUID()); |
|
|
|
|
addRedInfoInvoiceTWO.setHzfpxxqrdZtdm(queryResultDTO.getZTDM()); |
|
|
|
|
|
|
|
|
|
AddRedInfoInvoiceJsonDataTWOVO addRedInfoInvoiceJsonDataTWOVO = new AddRedInfoInvoiceJsonDataTWOVO(); |
|
|
|
|
AddRedInfoInvoiceTWOVOSub addRedInfoInvoiceJsonDataTWOVO = new AddRedInfoInvoiceTWOVOSub(); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setFpqqlsh(redinfo.getFpqqlsh()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setFphm(elephantRedInfo.getHZFPHM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setGmfnsrsbh(elephantRedInfo.getGMFNSRSBH()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setGmfmc(elephantRedInfo.getGMFMC()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setKprq(elephantRedInfo.getHZKPRQ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setXsfmc(elephantRedInfo.getXSFMC()); |
|
|
|
|
|
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setUuid(elephantRedInfo.getUUID()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLrfsf(elephantRedInfo.getLRFSF()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzfpxxqrdbh(elephantRedInfo.getHZFPXXQRDBH()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setXsfnsrsbh(elephantRedInfo.getXSFNSRSBH()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setXsfmc(elephantRedInfo.getXSFMC()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setGmfnsrsbh(elephantRedInfo.getGMFNSRSBH()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setGmfmc(elephantRedInfo.getGMFMC()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzfpdm(elephantRedInfo.getLZFPDM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzfphm(elephantRedInfo.getLZFPHM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setSfzzfpbs(elephantRedInfo.getSFZZFPBZ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzkprq(elephantRedInfo.getLZKPRQ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzhjje(elephantRedInfo.getLZHJJE()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzfppzdm(elephantRedInfo.getLZFPPZDM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzfptdyslxdm(elephantRedInfo.getLZFPTDYSLXDM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzcxje(elephantRedInfo.getHZCXJE()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzcxse(elephantRedInfo.getHZCXSE()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setChyydm(elephantRedInfo.getCHYYDM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzqrxxztdm(elephantRedInfo.getHZQRXXZTDM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setQrrq(elephantRedInfo.getQRRQ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setYkjhzfpbz(elephantRedInfo.getYKJHZFPBZ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzfphm(elephantRedInfo.getHZFPHM()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzkprq(elephantRedInfo.getHZKPRQ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setYxbs(elephantRedInfo.getYXBZ()); |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setLzmxxh(elephantRedInfo.getLZMXXH()); |
|
|
|
|
|
|
|
|
|
List<ElephantRedInfoDetailCase> detailList = new ArrayList<>(); |
|
|
|
|
for (ElephantRedInfoDetail elephantRedInfoDetail : elephantRedInfo.getHZQRXXMXLIST()) { |
|
|
|
|
ElephantRedInfoDetailCase detail = new ElephantRedInfoDetailCase(); |
|
|
|
|
detail.setDw(elephantRedInfoDetail.getDW()); |
|
|
|
|
detail.setJe(elephantRedInfoDetail.getJE()); |
|
|
|
|
detail.setSe(elephantRedInfoDetail.getSE()); |
|
|
|
|
detail.setGgxh(elephantRedInfoDetail.getGGXH()); |
|
|
|
|
detail.setXh(elephantRedInfoDetail.getXH()); |
|
|
|
|
detail.setFpspdj(elephantRedInfoDetail.getFPSPDJ()); |
|
|
|
|
detail.setFpspsl(elephantRedInfoDetail.getFPSPSL()); |
|
|
|
|
detail.setLzmxxh(elephantRedInfoDetail.getLZMXXH()); |
|
|
|
|
detail.setSlv(elephantRedInfoDetail.getSLV()); |
|
|
|
|
detail.setSphfwssflhbbm(elephantRedInfoDetail.getSPHFWSSFLHBBM()); |
|
|
|
|
detail.setXmmc(elephantRedInfoDetail.getXMMC()); |
|
|
|
|
detailList.add(detail); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
addRedInfoInvoiceJsonDataTWOVO.setHzqrxxmxlist(detailList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addRedInfoInvoiceTWO.setHzfpxx(addRedInfoInvoiceJsonDataTWOVO); |
|
|
|
|
|
|
|
|
@ -2355,7 +2438,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new HXResponse("0000","查询成功",addRedInfoInvoiceTWO); |
|
|
|
|
return new HXResponse("0000","查询成功",addRedInfoInvoiceTWO,true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|