Browse Source

打印 2022年9月21日 sxm

master
[li_she] 3 years ago
parent
commit
1a17702bd7
  1. 3
      src/main/java/com/gaotao/modules/ftp/util/FTPUtils.java
  2. 2
      src/main/java/com/gaotao/modules/print/service/impl/RollPrintServiceImpl.java

3
src/main/java/com/gaotao/modules/ftp/util/FTPUtils.java

@ -554,7 +554,6 @@ public class FTPUtils {
} }
} catch (IOException e) { } catch (IOException e) {
log.info("ftp下载出错!错误信息:"+e.getMessage()); log.info("ftp下载出错!错误信息:"+e.getMessage());
// TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
}finally { }finally {
//关闭流和链接 //关闭流和链接
@ -564,7 +563,6 @@ public class FTPUtils {
} }
} catch (IOException e) { } catch (IOException e) {
log.info("关闭流和链接出错!错误信息:"+e.getMessage()); log.info("关闭流和链接出错!错误信息:"+e.getMessage());
// TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
@ -579,7 +577,6 @@ public class FTPUtils {
File file = new File(ipPath); File file = new File(ipPath);
try { try {
OutputStream os = new FileOutputStream(file); OutputStream os = new FileOutputStream(file);
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} }

2
src/main/java/com/gaotao/modules/print/service/impl/RollPrintServiceImpl.java

@ -21,7 +21,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
@ -176,6 +175,7 @@ public class RollPrintServiceImpl implements RollPrintService {
throw new XJException(ResponseEnum.USER_PRINT_NAME_NOT_FUND); throw new XJException(ResponseEnum.USER_PRINT_NAME_NOT_FUND);
} }
apiAddress = "http://" + userprinter.getIpaddress() + ":" + bartenderPrintBatch; apiAddress = "http://" + userprinter.getIpaddress() + ":" + bartenderPrintBatch;
log.info("打印地址: "+ apiAddress);
// 2.获取模板信息 // 2.获取模板信息
List<Reportcontentitem> reportcontentitemList = reportcontentitemService.getReportcontentitemList(reportFileVo.getReportId()); List<Reportcontentitem> reportcontentitemList = reportcontentitemService.getReportcontentitemList(reportFileVo.getReportId());
Map<String, String> itemMap = reportcontentitemList.stream().collect(Collectors.toMap(Reportcontentitem::getObjectgroup, Reportcontentitem::getDbfieldname)); Map<String, String> itemMap = reportcontentitemList.stream().collect(Collectors.toMap(Reportcontentitem::getObjectgroup, Reportcontentitem::getDbfieldname));

Loading…
Cancel
Save