|
|
@ -75,6 +75,7 @@ import java.security.InvalidKeyException; |
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 销项实现 |
|
|
|
* 销项实现 |
|
|
@ -1990,6 +1991,8 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
return response; |
|
|
|
return response; |
|
|
|
}else if (WebServiceConstant.QRCODE.equals(finalServiceId)) { |
|
|
|
}else if (WebServiceConstant.QRCODE.equals(finalServiceId)) { |
|
|
|
// 获取人脸二维码
|
|
|
|
// 获取人脸二维码
|
|
|
|
|
|
|
|
//查询状态还是返回二维码数据
|
|
|
|
|
|
|
|
//用不用入库
|
|
|
|
|
|
|
|
|
|
|
|
}else if (WebServiceConstant.SQHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
}else if (WebServiceConstant.SQHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
// 申请红字信息表
|
|
|
|
// 申请红字信息表
|
|
|
@ -2000,6 +2003,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
Redinfo redinfo = redinfoMapper.selectOne(queryWrapper); |
|
|
|
Redinfo redinfo = redinfoMapper.selectOne(queryWrapper); |
|
|
|
HXResponse hxResponse = queryRedInfoByElepant(redinfo,companyservice); |
|
|
|
HXResponse hxResponse = queryRedInfoByElepant(redinfo,companyservice); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return hxResponse; |
|
|
|
|
|
|
|
|
|
|
|
}else if (WebServiceConstant.ADD_RED_INVOICE.equals(finalServiceId)) { |
|
|
|
}else if (WebServiceConstant.ADD_RED_INVOICE.equals(finalServiceId)) { |
|
|
|
// 红字发票开具
|
|
|
|
// 红字发票开具
|
|
|
@ -2026,6 +2030,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
}else if (WebServiceConstant.CXHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
}else if (WebServiceConstant.CXHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
// 查询红字信息表
|
|
|
|
// 查询红字信息表
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.SHHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
} else if (WebServiceConstant.SHHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
// 审核红字信息表
|
|
|
|
// 审核红字信息表
|
|
|
|
|
|
|
|
|
|
|
@ -2070,7 +2075,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
//调用大象接口查询红字信息表明细
|
|
|
|
//调用大象接口查询红字信息表明细
|
|
|
|
AjaxResult queryResult = null; |
|
|
|
AjaxResult queryResult = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstantsV6.QUERY_INVOICE_LOCALHOST, ElephantConstantsV6.QUERY_INVOICE_METHOD, JSONUtil.parse(param), companyservice); |
|
|
|
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstantsV6.QUERY_RED_CONFIRMATION_ITEM_LIST_LOCALHOST, ElephantConstantsV6.QUERY_RED_CONFIRMATION_ITEM_LIST_METHOD, JSONUtil.parse(param), companyservice); |
|
|
|
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { |
|
|
|
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { |
|
|
|
log.error("【销项发票】【大象接口】【红字信息表申请】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(param).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
log.error("【销项发票】【大象接口】【红字信息表申请】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(param).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
@ -2114,17 +2119,16 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
debugLog("红字订单更新主表信息失败",uuid,System.currentTimeMillis()); |
|
|
|
debugLog("红字订单更新主表信息失败",uuid,System.currentTimeMillis()); |
|
|
|
throw new JianshuiServiceException("红字订单更新主表信息失败"); |
|
|
|
throw new JianshuiServiceException("红字订单更新主表信息失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
//删除红字信息明细
|
|
|
|
|
|
|
|
redinfoMapper.deleteRedinfodetailByRedinfoId(redinfo.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long id = redinfoMapper.getDetailId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Redinfodetail> redinfodetailList = new ArrayList<>(); |
|
|
|
List<Redinfodetail> redinfodetailList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Redinfodetail> redinfodetails = redinfoMapper.selectRedinfoDetailList(redinfo.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<Integer, Redinfodetail> redInfoMapByIndex = redinfodetails.stream().collect(Collectors.toMap(e -> e.getIndex(), e -> e)); |
|
|
|
|
|
|
|
|
|
|
|
for (ElephantRedInfoDetail elephantRedInfoDetail : elephantRedInfo.getHZQRXXMXLIST()) { |
|
|
|
for (ElephantRedInfoDetail elephantRedInfoDetail : elephantRedInfo.getHZQRXXMXLIST()) { |
|
|
|
id++; |
|
|
|
|
|
|
|
Redinfodetail redinfodetail = new Redinfodetail(); |
|
|
|
Redinfodetail redinfodetail = redInfoMapByIndex.get(elephantRedInfoDetail.getXH().longValue()); |
|
|
|
redinfodetail.setId(id); |
|
|
|
|
|
|
|
redinfodetail.setBillno(redinfo.getRedInfoNo()); |
|
|
|
redinfodetail.setBillno(redinfo.getRedInfoNo()); |
|
|
|
redinfodetail.setRedinfoId(redinfo.getId()); |
|
|
|
redinfodetail.setRedinfoId(redinfo.getId()); |
|
|
|
redinfodetail.setIndex(elephantRedInfoDetail.getXH()); |
|
|
|
redinfodetail.setIndex(elephantRedInfoDetail.getXH()); |
|
|
@ -2142,6 +2146,9 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
redinfodetailList.add(redinfodetail); |
|
|
|
redinfodetailList.add(redinfodetail); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//删除红字信息明细
|
|
|
|
|
|
|
|
redinfoMapper.deleteRedinfodetailByRedinfoId(redinfo.getId()); |
|
|
|
|
|
|
|
//批量插入
|
|
|
|
int count = redinfoMapper.batchRedinfodetail(redinfodetailList); |
|
|
|
int count = redinfoMapper.batchRedinfodetail(redinfodetailList); |
|
|
|
if(count <1){ |
|
|
|
if(count <1){ |
|
|
|
debugLog("红字订单更新明细信息失败",uuid,System.currentTimeMillis()); |
|
|
|
debugLog("红字订单更新明细信息失败",uuid,System.currentTimeMillis()); |
|
|
@ -2150,9 +2157,9 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
|
|
//TODO 返回啥看看文档
|
|
|
|
//TODO 返回啥看看文档
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redinfo.setRedinfodetailList(redinfodetailList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new HXResponse("200","查询成功",redinfo); |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|