Browse Source

时间格式化 优化 以及 接收字符串长度 大小问题解决

zackhua 6 months ago
parent
commit
22dc52a98d
3 changed files with 13 additions and 6 deletions
  1. 3 2
      LisPacs_MR_Bll.cs
  2. 1 1
      SocketClient.cs
  3. 9 3
      clsPlugin.cs

+ 3 - 2
LisPacs_MR_Bll.cs

@@ -126,6 +126,7 @@ namespace ZLPlugin_MR.ServerImpl
             }
             //lis = lis.Length > 0 ? lis.Substring(0, lis.Length - 1) : lis;
             codeNo = codeNo.Length > 0 ? codeNo.Substring(0, codeNo.Length - 1) : codeNo;
+            billProjectNames = billProjectNames.Length > 0 ? billProjectNames.Substring(0, billProjectNames.Length - 1) : billProjectNames;
             //pacs = pacs.Length > 0 ? pacs.Substring(0, pacs.Length - 1) : pacs;
             //lis_id = lis_id.Length > 0 ? lis_id.Substring(0, lis_id.Length - 1) : lis_id;
             //pacs_id = pacs_id.Length > 0 ? pacs_id.Substring(0, pacs_id.Length - 1) : pacs_id;
@@ -152,7 +153,7 @@ namespace ZLPlugin_MR.ServerImpl
                                     '' ""reportStartTime"",
                                     '' ""reportEndTime"",
                                     '{3}' ""hrType"",
-                                    sysdate ""applyTime"",
+                                    TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') ""applyTime"",
                                     '{4}' ""hisApplyCode"",
                                     '2' ""patientType"",
                                     '{5}' ""totalAmount""
@@ -314,7 +315,7 @@ namespace ZLPlugin_MR.ServerImpl
                                     '' ""reportStartTime"",
                                     '' ""reportEndTime"",
                                     '{2}' ""hrType"",
-                                    sysdate ""applyTime"",
+                                    TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') ""applyTime"",
                                     '{3}' ""hisApplyCode"",
                                     '1' ""patientType"",
                                     '{4}' ""totalAmount""

+ 1 - 1
SocketClient.cs

@@ -86,7 +86,7 @@ namespace ZLPlugin_MR.Domain.Units
             //string message = "";
             try
             {
-                byte[] TempData = new byte[1024 * 10];
+                byte[] TempData = new byte[1024 * 1000];
                 while (IsRun)
                 {
                     //传递一个byte数组,用于接收数据。length表示接收了多少字节的数据

+ 9 - 3
clsPlugin.cs

@@ -246,7 +246,7 @@ namespace ZLPlugin_MR
             Log.Info("AdviceSave  lngModual==" + lngModual);
             Log.Info("AdviceSave   lngSys == " + lngSys);
             rsAdvice.Filter = "";
-            SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
+          //  SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
             try
             {
                 int res = 1;
@@ -274,12 +274,14 @@ namespace ZLPlugin_MR
                 }
                 List<YZData> ss_list = JSON.JsonToObject<List<YZData>>(Tools.FormatStr(str), Encoding.UTF8);
                 string hisApplyId = Tools.Generate16CharUUID();
+                Log.Info("hisApplyId==" + hisApplyId);
                 string patientSource = ""; //病人来源
 
                 string code = "";
                 string billProjectNames = "";  //开单项目名称
                 List<Codes> listlis;
                 List<Codes> listpacs;
+                Log.Info("");
                 LisPacs_MR_Bll.GetTreatmentId(ss_list, out code, out listlis, out listpacs, out billProjectNames);
                 Log.Info("code==" + code);
                 Log.Info("billProjectNames==" + billProjectNames);
@@ -355,7 +357,7 @@ namespace ZLPlugin_MR
                     patientSource = "1";
                     rd = LisPacs_MR_Bll.GetMZPostJson(lngClinicID, code, hrType, totalPrice.ToString(), hisApplyId);
                 }
-               // SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
+                SocketClient socketClient = new SocketClient("127.0.0.1", 6061);
                 //Results result = new Results();
                 string json = Tools.RecordsetToJson(rd);
                 Log.Info(json);
@@ -387,15 +389,19 @@ namespace ZLPlugin_MR
 
                 }
                 Log.Info("22222" + SocketClient.Message);
+                Log.Info("退出循环!");
+                Log.Info("listlis count!" + listlis.Count);
+                Log.Info("listpacs count!" + listpacs.Count);
                 if (!string.IsNullOrWhiteSpace(SocketClient.Message))
                 {
-                    Log.Info(SocketClient.Message);
+                    //Log.Info(SocketClient.Message);
                     ResultsEx rex = new ResultsEx();
                     rex = JSON.JsonToObject<ResultsEx>(Tools.FormatStr(SocketClient.Message), Encoding.UTF8);
                     if (rex.ResultCode == 2)//有互认
                     {
                         MessageBox.Show("回传数据至his!");
                         socketClient.Receive();
+                        
                         //SocketClient.Message = null;
                         SaveData(waittingdate, lngPatientID, lngClinicID, listlis, listpacs, -1);
                         //保存开单项目