问题处理-对应方格报文:

控制台打印机查询
打印接口
beta-enc
dongxiaoke 2 years ago
parent 05f7882bdf
commit 2bdda20645
  1. 4
      jianshui-invoice/src/main/java/com/jianshui/invoice/domain/SkDyjVO.java
  2. 18
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/AisinoConsoleInvoiceApiServiceImpl.java

@ -21,11 +21,11 @@ public class SkDyjVO
{
/** $column.columnComment */
@Alias(value = "id")
private Long dyjid;
private Long printerId;
/** 打印机名称 */
@Alias(value = "mc")
private String dyjmc;
private String printerName;
/** 上边距(a9向下为正,ukey向下为负) */
@Alias(value = "sbj")

@ -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", "操作完成");
}

Loading…
Cancel
Save