|
|
|
@ -753,7 +753,7 @@ public class AisinoConsoleInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public HXResponse queryPrinter(QueryPrinterDTO queryPrinterDTO, Companyservice companyservice) { |
|
|
|
|
SkDyj skDyj = new SkDyj(); |
|
|
|
|
List<SkDyj> skDyjList = new ArrayList<>(); |
|
|
|
|
try { |
|
|
|
|
QueryWrapper<SkDyj> skDyjQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
if(StrUtil.isNotEmpty(companyservice.getSellertax())){ |
|
|
|
@ -762,15 +762,15 @@ public class AisinoConsoleInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
if(StrUtil.isNotEmpty(queryPrinterDTO.getPrinterName())){ |
|
|
|
|
skDyjQueryWrapper.eq("MC",queryPrinterDTO.getPrinterName()); |
|
|
|
|
} |
|
|
|
|
skDyj = skDyjMapper.selectOne(skDyjQueryWrapper); |
|
|
|
|
skDyjList = skDyjMapper.selectList(skDyjQueryWrapper); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("【销项发票】【大象接口】【打印机查询】发票请求异常,请求报文{},销方信息{}", "", JSONObject.toJSONString(companyservice)); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
throw new JianshuiServiceException("系统异常!"); |
|
|
|
|
} |
|
|
|
|
log.info("【销项发票】【大象发票】打印机查询请求结果{}", skDyj.toString()); |
|
|
|
|
SkDyjVO skDyjVO = BeanUtil.copyProperties(skDyj,SkDyjVO.class); |
|
|
|
|
return new HXResponse("0000", "操作完成", skDyjVO); |
|
|
|
|
log.info("【销项发票】【大象发票】打印机查询请求结果{}", skDyjList.toString()); |
|
|
|
|
List<SkDyjVO> skDyjVO = BeanUtil.copyToList(skDyjList,SkDyjVO.class); |
|
|
|
|
return new HXResponse("0000", "操作完成", skDyjList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -794,7 +794,6 @@ public class AisinoConsoleInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
List<PrintDetailDTO> details = printDTO.getDetails(); |
|
|
|
|
|
|
|
|
|
//返回信息处理
|
|
|
|
|
List<Map<String,String>> resultList = new ArrayList<>(); |
|
|
|
|
for (PrintDetailDTO detail : details) { |
|
|
|
|
Map<String,String> result = new HashMap<>(); |
|
|
|
|
//报文组装
|
|
|
|
@ -837,14 +836,13 @@ public class AisinoConsoleInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
String retcode = resultJSON.get("retcode") != null ? resultJSON.get("retcode").toString() : ""; |
|
|
|
|
String retmsg = resultJSON.get("retmsg") != null ? resultJSON.get("retmsg").toString() : ""; |
|
|
|
|
if("5011".equals(retcode)){ |
|
|
|
|
result.put("0000","发票打印成功,发票号码="+printInvoiceDTO.getInfoNumber()+",发票代码="+printInvoiceDTO.getInfoTypeCode());; |
|
|
|
|
return new HXResponse("发票打印成功,发票号码="+printInvoiceDTO.getInfoNumber()+",发票代码="+printInvoiceDTO.getInfoTypeCode()); |
|
|
|
|
}else{ |
|
|
|
|
result.put("9999","发票打印失败,发票号码="+printInvoiceDTO.getInfoNumber()+",发票代码="+printInvoiceDTO.getInfoTypeCode()+",原因="+retmsg);; |
|
|
|
|
return new HXResponse("发票打印失败,发票号码="+printInvoiceDTO.getInfoNumber()+",发票代码="+printInvoiceDTO.getInfoTypeCode()+",原因="+retmsg); |
|
|
|
|
} |
|
|
|
|
resultList.add(result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new HXResponse("0000",resultList); |
|
|
|
|
return new HXResponse("0000", "操作完成"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|