/** * 保存提交信息到本地, *写入提交记录 * */ public void WriteSubmitRecord2Disk_NoPay(FileSendOnNet fson) { /* * 文件拷贝 */ { String from = fson.FileFullPath; String to = GetFileFullPath_SubmitDocPath() + fson.GetFileName(); File.Move(from, to); fson.FileFullPath = to; } this.Wait(); try { PrintRecordItem PRI = new PrintRecordItem(fson); PRI.WriteSubmitRecord2Disk(true); PrintSubmitItems.Add(PRI); } catch (Exception e) { LogHelper.WriteLog(this.GetType(), e); } this.Release(); }
/** *发送本机下挂的所有打印机 * * */ public static void SendPrinterPrice(Socket client, FileSendOnNet fson) { String orderid = fson.GetProperty("orderid_suffix", ""); String cmd = fson.GetProperty("cmd", ""); String asyncNotify_t = fson.GetProperty("ppneedasyncnotify", "false"); if ("getprice".Equals(cmd)) { if (!String.IsNullOrEmpty(orderid)) { PrintRecordItem pri = PrintSubmitItems.QueryId(orderid); if (pri != null) { String price_t = pri.GetPriceJson(); client.Send(System.Text.Encoding.UTF8.GetBytes(price_t)); return; } } } else if ("PrintDoc".Equals(cmd)) { //已经付费---打印之 if (!String.IsNullOrEmpty(orderid)) { PrintRecordItem pri = PrintSubmitItems.QueryId(orderid); if (pri != null) { String result_t = pri.GetPrintCompletedJson(); client.Send(System.Text.Encoding.UTF8.GetBytes(result_t)); return; } if ("true".Equals(asyncNotify_t)) { LogHelper.WriteLogError(typeof(PhonePcCommunication), "需要异步通知" + pri.WriteSubmitRecord2Disk(false)); } } } else { } }