Browse Source

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

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

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

368
                     isFirst = true;
368
                     isFirst = true;
369
                     try
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
                         strokes_page_all[i].lines.Last().lines_curr.Add(stroke);
377
                         strokes_page_all[i].lines.Last().lines_curr.Add(stroke);
372
                     }
378
                     }
373
                     catch (Exception ex)
379
                     catch (Exception ex)

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

46
                     if (jo["code"].ToString() == "0")
46
                     if (jo["code"].ToString() == "0")
47
                     {
47
                     {
48
                         Message = "";
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
                         return false;
54
                         return false;
51
                         //    if (string.IsNullOrWhiteSpace(jo["obj"].ToString()))
55
                         //    if (string.IsNullOrWhiteSpace(jo["obj"].ToString()))
104
                     if (resultObj.code == 0 && resultObj.obj != null)
108
                     if (resultObj.code == 0 && resultObj.obj != null)
105
                     {
109
                     {
106
                         APP.ResourceAddTwo = resultObj.obj;
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
                         return true;
127
                         return true;
124
                     }
128
                     }
125
                     else
129
                     else
315
                         bool isres = ReportFileMerge(APP.UserInfo.Schoolid.ToString() + "/resource", VideoInfo.FileGuid, out ErrMessage);
319
                         bool isres = ReportFileMerge(APP.UserInfo.Schoolid.ToString() + "/resource", VideoInfo.FileGuid, out ErrMessage);
316
                         if (isres)
320
                         if (isres)
317
                         {
321
                         {
318
-                            VideoInfo.IsUpload = true;
322
+                            //VideoInfo.IsUpload = true;
319
                             return true;
323
                             return true;
320
                         }
324
                         }
321
                         else
325
                         else
327
                     {
331
                     {
328
                         if (string.IsNullOrWhiteSpace(ErrMessage))
332
                         if (string.IsNullOrWhiteSpace(ErrMessage))
329
                         {
333
                         {
330
-                            VideoInfo.IsUpload = true;
334
+                            //VideoInfo.IsUpload = true;
331
                             return true;
335
                             return true;
332
                         }
336
                         }
333
                         else
337
                         else

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

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

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

283
                     {
283
                     {
284
                         Dispatcher.Invoke(() =>
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
                             btnStart.IsEnabled = true;
304
                             btnStart.IsEnabled = true;
287
                             book_list.IsEnabled = true;
305
                             book_list.IsEnabled = true;
288
                             cmbTeachingMaterial.IsEnabled = true;
306
                             cmbTeachingMaterial.IsEnabled = true;

Loading…
Cancel
Save