浏览代码

省平台

duhongyu 3 年之前
父节点
当前提交
b9066a3a93

+ 6 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/AffairsController.cs

@@ -1452,9 +1452,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
1452 1452
                     string path = "/Upload/ZhenWu/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("MM") + "/" + DateTime.Now.ToString("dd") + "/";
1453 1453
                     foreach (var it in jo.body)
1454 1454
                     {
1455
-                        byte[] data = Encoding.UTF8.GetBytes(it.ATTATH_CONTENT);
1455
+                      //  byte[] data = Encoding.UTF8.GetBytes(it.ATTATH_CONTENT);
1456 1456
                         FileUp fu = new FileUp();
1457
-                        fu.SaveFile(data, path, it.ATTATH_NAME);
1457
+                        fu.ByteSaveFile(it.ATTATH_CONTENT, path, it.ATTATH_NAME);
1458 1458
                         Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
1459 1459
                         model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
1460 1460
                         model_T_Sys_Accessories.F_FileName = it.ATTATH_NAME;//附件名称
@@ -1718,7 +1718,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
1718 1718
                                     var responseString = HttpMethods.HttpPost("http://172.20.0.203:8888/Affairs/receive_Push", jsonParam);
1719 1719
                                     bendiack jo = JsonConvert.DeserializeObject<bendiack>(responseString);
1720 1720
                                     if (jo.state != "success")
1721
-                                        return Error("签收失败");
1721
+                                    {
1722
+                                        if (!jo.message.Contains("该任务单已签收"))
1723
+                                            return Error("签收失败");
1724
+                                    }
1722 1725
 
1723 1726
                                 }
1724 1727
                                 catch

+ 14 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -424,7 +424,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
424 424
                     if (newusercode.Trim() != "" && newusercode != "undefined")
425 425
                     {
426 426
                         sql += " and F_WorkOrderId in (select F_WorkOrderId   from T_Bus_RemindRecord " +
427
-                            "where F_State != 2  and F_IsDelete = 0 and F_Type = 1 and Supervisor  in ("+ newusercode + ")) ";
427
+                            "where  F_IsDelete = 0 and F_Type = 1 and Supervisor  in ("+ newusercode + ")) ";
428 428
                     }
429 429
                 }
430 430
                 else
@@ -432,7 +432,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
432 432
                     if (newusercode.Trim() != "" && newusercode != "undefined")
433 433
                     {
434 434
                         sql += " and F_WorkOrderId in (select F_WorkOrderId   from T_Bus_RemindRecord " +
435
-                             "where F_State != 2  and F_IsDelete = 0 and F_Type = 1 and Supervisor  = " + newusercode + ") ";
435
+                             "where F_IsDelete = 0 and F_Type = 1 and Supervisor  = " + newusercode + ") ";
436 436
                     }
437 437
                 }
438 438
             }
@@ -3000,10 +3000,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
3000 3000
                     int isyq = RequestString.GetInt("isyq", -1);
3001 3001
                     if (strstate.Trim() != "" && strstate != "undefined")
3002 3002
                     {
3003
-                        if (strstate.Trim() == ((int)EnumWorkState.neworder).ToString())
3004
-                            sql += " and F_WorkState in (" + (int)EnumWorkState.neworder + "," + (int)EnumWorkState.audit + ") ";
3003
+                        
3004
+                        if (strstate=="4")
3005
+                        {
3006
+                            sql += " and (F_WorkState =4 or (F_Identification=0 and F_WorkState=8 ) )";
3007
+                        }
3005 3008
                         else
3006
-                            sql += " and F_WorkState = '" + strstate.Trim() + "' ";
3009
+                        {
3010
+                            if (strstate.Trim() == ((int)EnumWorkState.neworder).ToString())
3011
+                                sql += " and F_WorkState in (" + (int)EnumWorkState.neworder + "," + (int)EnumWorkState.audit + ") ";
3012
+                            else
3013
+                                sql += " and F_WorkState = '" + strstate.Trim() + "' ";
3014
+
3015
+                        }
3007 3016
                         //sql += " and F_WorkState = '" + strstate.Trim() + "' ";
3008 3017
                     }
3009 3018
                     else

+ 2 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/hb_affairsController.cs

@@ -962,9 +962,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
962 962
                     string path = "/Upload/ZhenWu/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("MM") + "/" + DateTime.Now.ToString("dd") + "/";
963 963
                     foreach (var it in jo.body)
964 964
                     {
965
-                        byte[] data = Encoding.UTF8.GetBytes(it.ATTATH_CONTENT);
965
+                       // byte[] data = Encoding.UTF8.GetBytes(it.ATTATH_CONTENT);
966 966
                         FileUp fu = new FileUp();
967
-                        fu.SaveFile(data, path, it.ATTATH_NAME);
967
+                        fu.ByteSaveFile(it.ATTATH_CONTENT, path, it.ATTATH_NAME);
968 968
                         Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
969 969
                         model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
970 970
                         model_T_Sys_Accessories.F_FileName = it.ATTATH_NAME;//附件名称

+ 24 - 1
CallCenterCommon/CallCenter.Utility/FileUp.cs

@@ -137,7 +137,30 @@ namespace CallCenter.Utility
137 137
                 fileStream.Close();
138 138
             }
139 139
         }
140
-
140
+        public void ByteSaveFile(string base64String, string SavePath, string fileName)
141
+        {
142
+            string savePath = HttpContext.Current.Server.MapPath(SavePath);
143
+            if (!Directory.Exists(savePath))
144
+            {
145
+                Directory.CreateDirectory(savePath);
146
+            }
147
+            savePath += fileName;
148
+            try
149
+            {
150
+                using (MemoryStream stream = new MemoryStream(Convert.FromBase64String(base64String)))
151
+                {
152
+                    using (FileStream fs = new FileStream(savePath, FileMode.OpenOrCreate, FileAccess.Write))
153
+                    {
154
+                        byte[] b = stream.ToArray();
155
+                        fs.Write(b, 0, b.Length);
156
+                    }
157
+                }
158
+            }
159
+            catch (Exception ex)
160
+            {
161
+                throw ex;
162
+            }
163
+        }
141 164
         /// <summary>
142 165
         /// 上传文件
143 166
         /// </summary>