ImageVerifierCode 换一换
格式:DOCX , 页数:51 ,大小:42.86KB ,
资源ID:22476556      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/22476556.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(客户端对服务器端的pdf文件进行自动打印Word文件下载.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

客户端对服务器端的pdf文件进行自动打印Word文件下载.docx

1、thin: + urlIp + : + sid; con = DriverManager.getConnection(url, user, password); return con; /* * * 中利用定数。/p * */public class Constants public static final String TYOUHYOU_ID = TYOUHYOU_ID; public static final String RIYOUKANNSYO_CD = RIYOUKANNSYO_CD public static final String LOCAL_PDF_BASYO = LOCA

2、L_PDF_BASYO public static final String SERVER_PDF_BASYO = SERVER_PDF_BASYO public static final String DB_USER_ID = DB_USER_ID public static final String DB_SID = DB_SID public static final String DB_PASSWORD = DB_PASSWORD public static final String DB_URL = DB_URL public static final String TAJYUUKI

3、DOU_ERROR = 多重起動:要確認 public static final String SONOTA = sonota public static final String SONOTA_UNCOMP = sonota_uncomp public static final String TYOUHYOUJIDOUSYUTURYOKU = 帳票自動出力処理実行 public static final String TEYIJI = 提示 public static final String HOUTEI = houtei public static final String HOUTEI

4、_UNCOMP = houtei_uncomp public static final String PDF = pdf public static final String JPG = .jpg public static final String C_PATH_TMP = C:/batch/tmp public static final String LOG_FILE = lastTime.txt public static final String START_FILE = start.txt public static final String DB_ERROR = DB接続時発生 p

5、ublic static final String INTERNET_ERROR = 接続 public static final String PRINT_ERROR = 接続、自動印刷処理中断。 public static final String JIDOUPRINT_ERROR = 自動印刷処理中断 public static final String PDFPRINT_ERROR = PDF印刷途中発生 public static final String PRINT_IP = PRINT_IP public static final String APP_INTERVAL = AP

6、P_INTERVAL public static final String PROFILEPATH = batchconfigAutoPrint.conf public static final String STARTTXTJIKANGSETE = C:/batch/tmp配下lastTime.txt日付時間設定。(日付時間yy-MM-dd HH:mm:ss.SSSSSS)import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.Timestamp;import java.util.ArrayLis

7、t;import java.util.List;public class Dao public String getFirstMaxTime(Connection conn, String hoyukansho_cdStr, String chohyo_idstr) throws SQLException String firstMaxTime = null; PreparedStatement pre = null; ResultSet result = null; String sql = select max(to_char(tazzm208.shutsuryoku_date) + fr

8、om tazzm208 where tazzm208.hoyukansho_cd in (_IN_STRING2_) .replaceFirst(_IN_STRING2_, hoyukansho_cdStr); sql = sqland tazzm208.chohyo_id in (_IN_STRING_).replaceFirst( _IN_STRING_, chohyo_idstr); try pre = conn.prepareStatement(sql); result = pre.executeQuery(); while (result.next() firstMaxTime =

9、result.getString(1); finally try if (result != null) result.close(); if (pre ! pre.close(); if (conn ! conn.close(); catch (Exception e) e.printStackTrace(); return firstMaxTime; public List getOutputpath(Connection conn, String hoyukansho_cdStr, String chohyo_idstr, String maxTimeStr, String previo

10、usTimeStr) throws SQLException List outputpathList = new ArrayList(); if (previousTimeStr = null) sql = select tazzm208.outputpath, + tazzm208.chohyo_id , to_char(tazzm208.shutsuryoku_date) from tazzm208 where to_char(tazzm208.shutsuryoku_date) ? pre.setString(1, maxTimeStr); if (previousTimeStr !=

11、null) pre.setString(2, previousTimeStr); String outputpath = result.getString(1); String chohyo_id = result.getString(2); String shutsuryoku_date = result.getString(3); String record = new String3; record0 = outputpath; record1 = chohyo_id; record2 = shutsuryoku_date; outputpathList.add(record); ret

12、urn outputpathList; /* * param conn * param chohyo_idp * param shutsuryoku_date * return * throws SQLException public String getCheckOutputpathResult(Connection conn, String chohyo_idparam, String shutsuryoku_dateparam) throws SQLException String outputpathStr = null; select tazzm208.outputpath wher

13、e tazzm208.chohyo_id = ? and to_char(tazzm208.shutsuryoku_date) = ? pre.setString(1, chohyo_idparam); pre.setString(2, shutsuryoku_dateparam); outputpathStr = outputpath; return outputpathStr;import java.awt.image.BufferedImage;import java.io.BufferedReader;import java.io.BufferedWriter;import java.

14、io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.FileReader;import java.io.FileWriter;import java.io.IOException;import java.io.InputStream;import .ConnectException;import javax.imageio.ImageIO;import javax.print.Doc;import ja

15、vax.print.DocFlavor;import javax.print.DocPrintJob;import javax.print.PrintException;import javax.print.PrintService;import javax.print.PrintServiceLookup;import javax.print.SimpleDoc;import javax.print.attribute.DocAttributeSet;import javax.print.attribute.HashDocAttributeSet;import javax.print.att

16、ribute.HashPrintRequestAttributeSet;import javax.print.attribute.standard.MediaPrintableArea;import javax.print.attribute.standard.MediaSizeName;import javax.print.attribute.standard.OrientationRequested;import org.apache.http.HttpResponse;import org.apache.http.StatusLine;import org.apache.http.cli

17、ent.ClientProtocolException;import org.apache.http.client.HttpClient;import org.apache.http.client.methods.HttpPost;import org.apache.http.impl.client.DefaultHttpClient;import org.apache.log4j.Logger;import org.apache.pdfbox.pdmodel.PDDocument;import org.apache.pdfbox.pdmodel.PDPage;public class MyT

18、hread extends Thread boolean printFlag = false; private static Logger logger = Logger.getLogger(MyThread.class); public void run() BufferedWriter bw = null; BufferedReader input = null; BufferedReader inputstatus = null; File status = new File(/batch/status File filestatus = new File(status, status.

19、txt checkoutputpathresult = new ArrayList outputpathNotNull = new ArrayList logger.info(二重起動 / 二重起動 / 1以下存在、存在場合二重起動見表示、処理中断 / 二重起動:【】tmpstart.txt File filepathstart = new File(Constants.C_PATH_TMP); File filestart = new File(filepathstart, Constants.START_FILE); if (filestart.exists() logger.info(*

20、二重起動* / 表示、処理中断 / :”多重起動:要確認” Object options = OK ; JOptionPane.showOptionDialog(null, Constants.TAJYUUKIDOU_ERROR, Constants.TEYIJI, JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options0); System.exit(0); while (true) try inputstatus = new BufferedReader(new FileReader(filestatus); String statusStr = String statusread = inputstatus.readLine(); if (statusread ! statusStr = statusread; if (500.equals(statusStr) inputstatus.close(); logger.info(処理中断 Ob

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1