Browse Source

上传失败第二次无法上传修复。 解决点阵笔写字下标越界。

tags/录制修改前
zhangxueyang 3 years ago
parent
commit
35eee74966

+ 6
- 0
Common/system/BlackboardNew.cs View File

@@ -368,6 +368,12 @@ namespace Common.system
368 368
                     isFirst = true;
369 369
                     try
370 370
                     {
371
+                        if(strokes_page_all.Count<=i)
372
+                        {
373
+                            ZBBPage pagetemp = new ZBBPage();
374
+                            pagetemp.lines.Add(new ZBBPageStep());
375
+                            strokes_page_all.Add(pagetemp);
376
+                        }
371 377
                         strokes_page_all[i].lines.Last().lines_curr.Add(stroke);
372 378
                     }
373 379
                     catch (Exception ex)

+ 21
- 17
XHWK.WKTool/DAL/DAL_Upload.cs View File

@@ -46,6 +46,10 @@ namespace XHWK.WKTool.DAL
46 46
                     if (jo["code"].ToString() == "0")
47 47
                     {
48 48
                         Message = "";
49
+
50
+                        Model.ResultVo<Model_ResourceAddTwo> resultObj = JsonHelper.JsonToObj<Model.ResultVo<Model_ResourceAddTwo>>(jo.ToString());
51
+
52
+                        APP.ResourceAddTwo = resultObj.obj;
49 53
                         //已存在 不允许上传
50 54
                         return false;
51 55
                         //    if (string.IsNullOrWhiteSpace(jo["obj"].ToString()))
@@ -104,22 +108,22 @@ namespace XHWK.WKTool.DAL
104 108
                     if (resultObj.code == 0 && resultObj.obj != null)
105 109
                     {
106 110
                         APP.ResourceAddTwo = resultObj.obj;
107
-                        foreach (Model_WKData Vdata in APP.WKDataList)
108
-                        {
109
-                            if (Vdata.VideoList == null)
110
-                            {
111
-                                continue;
112
-                            }
111
+                        //foreach (Model_WKData Vdata in APP.WKDataList)
112
+                        //{
113
+                        //    if (Vdata.VideoList == null)
114
+                        //    {
115
+                        //        continue;
116
+                        //    }
113 117
 
114
-                            foreach (Model_Video videoinfo in Vdata.VideoList)
115
-                            {
116
-                                if (videoinfo.FileGuid == FileCode)
117
-                                {
118
-                                    videoinfo.IsUpload = true;
119
-                                    break;
120
-                                }
121
-                            }
122
-                        }
118
+                        //    foreach (Model_Video videoinfo in Vdata.VideoList)
119
+                        //    {
120
+                        //        if (videoinfo.FileGuid == FileCode)
121
+                        //        {
122
+                        //            //videoinfo.IsUpload = true;
123
+                        //            break;
124
+                        //        }
125
+                        //    }
126
+                        //}
123 127
                         return true;
124 128
                     }
125 129
                     else
@@ -315,7 +319,7 @@ namespace XHWK.WKTool.DAL
315 319
                         bool isres = ReportFileMerge(APP.UserInfo.Schoolid.ToString() + "/resource", VideoInfo.FileGuid, out ErrMessage);
316 320
                         if (isres)
317 321
                         {
318
-                            VideoInfo.IsUpload = true;
322
+                            //VideoInfo.IsUpload = true;
319 323
                             return true;
320 324
                         }
321 325
                         else
@@ -327,7 +331,7 @@ namespace XHWK.WKTool.DAL
327 331
                     {
328 332
                         if (string.IsNullOrWhiteSpace(ErrMessage))
329 333
                         {
330
-                            VideoInfo.IsUpload = true;
334
+                            //VideoInfo.IsUpload = true;
331 335
                             return true;
332 336
                         }
333 337
                         else

+ 1
- 0
XHWK.WKTool/DAL/Interface.cs View File

@@ -291,6 +291,7 @@ namespace XHWK.WKTool.DAL
291 291
             }
292 292
             catch (Exception ex)
293 293
             {
294
+                APP.ServerMsg = "网络异常!";
294 295
                 LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
295 296
                 return 1;
296 297
             }

+ 18
- 0
XHWK.WKTool/UploadWindow.xaml.cs View File

@@ -283,6 +283,24 @@ namespace XHWK.WKTool
283 283
                     {
284 284
                         Dispatcher.Invoke(() =>
285 285
                         {
286
+                            foreach (Model_WKData Vdata in APP.WKDataList)
287
+                            {
288
+                                if (Vdata.VideoList == null)
289
+                                {
290
+                                    continue;
291
+                                }
292
+
293
+                                foreach (Model_Video videoinfo in Vdata.VideoList)
294
+                                {
295
+                                    if (videoinfo.FileGuid == Guid)
296
+                                    {
297
+                                        videoinfo.IsUpload = true;
298
+                                        break;
299
+                                    }
300
+                                }
301
+                            }
302
+
303
+
286 304
                             btnStart.IsEnabled = true;
287 305
                             book_list.IsEnabled = true;
288 306
                             cmbTeachingMaterial.IsEnabled = true;

Loading…
Cancel
Save