duhongyu vor 4 Jahren
Ursprung
Commit
6ec3d718d9

Datei-Diff unterdrückt, da er zu groß ist
+ 19 - 5
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs


+ 1 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -16,6 +16,7 @@
16 16
   <add key="MailUserName" value="123@800100.com" />
17 17
   <!-- 设置邮箱密码 -->
18 18
   <add key="MailPassword" value="123456" />
19
+  <add key="SecurityCode" value="xinlianxin%#@6" />
19 20
   <!-- 设置邮箱主机 -->
20 21
   <add key="MailHost" value="smtp.ym.163.com" />
21 22
   <!-- ================== 3:微信配置参数 ================== -->

+ 9 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

@@ -732,7 +732,6 @@ namespace CallCenterApi.Interface.Controllers.customer
732 732
             try
733 733
             {
734 734
                 model.F_AreaID = int .Parse (input.F_AreaID).ToString ();//大区ID
735
-                model.F_BranchID = int .Parse (input.F_BranchID).ToString ();//分公司ID
736 735
             }
737 736
             catch
738 737
             {
@@ -744,7 +743,14 @@ namespace CallCenterApi.Interface.Controllers.customer
744 743
                         model.F_AreaID = pdModel.F_DeptId .ToString();
745 744
                     }
746 745
                 }
747
-                if (!string .IsNullOrEmpty (input.F_BranchID))
746
+            }
747
+            try
748
+            {
749
+                model.F_BranchID = int.Parse(input.F_BranchID).ToString();//分公司ID
750
+            }
751
+            catch
752
+            {
753
+                if (!string.IsNullOrEmpty(input.F_BranchID))
748 754
                 {
749 755
                     Model.T_Sys_Department pdModel = departmentBLL.GetModel(input.F_BranchID);
750 756
                     if (pdModel != null)
@@ -753,6 +759,7 @@ namespace CallCenterApi.Interface.Controllers.customer
753 759
                     }
754 760
                 }
755 761
             }
762
+         
756 763
             model.F_Gender = input.F_Gender;//分公司ID
757 764
             model.F_Salesman = input.F_Salesman;//业务员
758 765
             model.F_SalesPhone = input.F_SalesPhone;//业务员电话

+ 97 - 27
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -775,6 +775,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
775 775
         /// <summary>
776 776
         ///工单列表
777 777
         /// </summary>
778
+        /// 
779
+
778 780
         public ActionResult GetList(string handler,string description,string OpenId, string code, string cusname, string keywords, string cusphone, string companyname, string province, string city,string createby,string createtel,
779 781
             string country, string township, string category, string salebase, string touser, int source = 0, int state = -1, int status = -1, int type = 0,int condition=-1, int pageindex = 1, int pagesize = 10)
780 782
         {
@@ -1294,6 +1296,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
1294 1296
                 return Success("暂无工单"); ;
1295 1297
             }
1296 1298
         }
1299
+
1300
+     
1297 1301
         public string GetDeptUserCode(int deptid)
1298 1302
         {
1299 1303
             string deptuser = string.Empty;
@@ -1946,6 +1950,9 @@ namespace CallCenterApi.Interface.Controllers.weixin
1946 1950
                     Model.T_Wo_WorkOrder model = woBLL.GetModel(orderid);
1947 1951
                     if (model != null)
1948 1952
                     {
1953
+                        var itemlast = itembll.GetModelList("   F_WoID='" + model.F_ID + "' order by F_ID desc").FirstOrDefault();
1954
+                        if (itemlast!=null )
1955
+                         sms = (int)itemlast.F_IsSMS;
1949 1956
                         var res = Approval(OpenId, orderid, AuditCont, ua, model, overtime, sms, IsAudit, AuditState);
1950 1957
                         if (res)
1951 1958
                             return Success("审核成功");
@@ -1991,7 +1998,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1991 1998
         /// 审核工单
1992 1999
         /// </summary>
1993 2000
         [WechatActionFilter]
1994
-        public bool Approval(string OpenId, long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = 0, int IsAudit = 0, int AuditState = 0)
2001
+        public bool Approval(string OpenId, long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = -1, int IsAudit = 0, int AuditState = 0)
1995 2002
         {
1996 2003
             bool res = true;
1997 2004
             string touser = ""; string tousername = "";
@@ -2019,7 +2026,20 @@ namespace CallCenterApi.Interface.Controllers.weixin
2019 2026
                     }
2020 2027
                     var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.audit + " and  F_CreateUser!=" + user.F_UserCode + " and  F_OptType=" + (int)EnumItemOpt.audit + " and  F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_ID desc").FirstOrDefault();
2021 2028
                     if (itemlast != null)
2029
+                    {
2022 2030
                         toussers = itemlast.F_CreateUser;
2031
+                        if (sms == -1)
2032
+                        {
2033
+                            sms = (int)itemlast.F_IsSMS;
2034
+                        }
2035
+                    }
2036
+                    else
2037
+                    {
2038
+                        if (sms == -1)
2039
+                        {
2040
+                            sms = 0;
2041
+                        }
2042
+                    }
2023 2043
                     wostate = 16;
2024 2044
                     if (AuditState == 0)
2025 2045
                     {
@@ -2028,6 +2048,14 @@ namespace CallCenterApi.Interface.Controllers.weixin
2028 2048
                         var uaid = AddLog(model.F_ID, model.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
2029 2049
                         if (userid <= 0 || uaid <= 0)
2030 2050
                             res = false;
2051
+                        else
2052
+                        {
2053
+                            if (sms ==1&& !string .IsNullOrEmpty(user .F_Mobile ))
2054
+                            {
2055
+                                SendSms(model.F_Type, user.F_Mobile, nowUser.F_UserId);
2056
+                            }
2057
+                        }
2058
+
2031 2059
                     }
2032 2060
                     else if (AuditState == 1)
2033 2061
                     {
@@ -2052,7 +2080,22 @@ namespace CallCenterApi.Interface.Controllers.weixin
2052 2080
                     {
2053 2081
                         var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.audit + " and  F_OptType=" + (int)EnumItemOpt.audit + " and  F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_ID desc").FirstOrDefault();
2054 2082
                         if (itemlast != null)
2083
+                        {
2055 2084
                             toussers = itemlast.F_CreateUser;
2085
+                            if (sms == -1)
2086
+                            {
2087
+                                sms = (int)itemlast.F_IsSMS;
2088
+                            }
2089
+                        }
2090
+                        else
2091
+                        {
2092
+                            if (sms == -1)
2093
+                            {
2094
+                                sms = 0;
2095
+                            }
2096
+                        }
2097
+
2098
+
2056 2099
                         if (AuditState == 0)
2057 2100
                         {
2058 2101
                             opt = "同意上报";
@@ -2068,6 +2111,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2068 2111
                             var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
2069 2112
                             if (userid <= 0)
2070 2113
                                 res = false;
2114
+                            
2071 2115
                             wostate = 16;
2072 2116
                         }
2073 2117
                         else
@@ -2103,28 +2147,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
2103 2147
                 if (nowUser.F_UserCode != model.F_CreateBy)
2104 2148
                 {
2105 2149
                     sendsysmsg(model, nowUser, model.F_CreateBy, (int)model.F_ID, opt);//
2106
-                  //  var createmodel = userAccountBLL.GetModel(model.F_CreateBy);  //
2107
-                  //  if (createmodel != null)
2108
-                 //   {
2109
-                     //   if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
2110
-                    //    {
2111
-                     //      sendwxmsg(model, createmodel.F_WxOpenId, nowUser, opt);
2112
-                     //   }
2113
-                  //  }
2114 2150
                 }
2115 2151
 
2116 2152
                 #region 向下一级操作人员推送消息
2117 2153
                 if (!string.IsNullOrWhiteSpace(touser))
2118 2154
                 {
2119 2155
                     sendsysmsg(model, nowUser, touser, (int)model.F_ID, opt);//
2120
-                 //   var modelUser2 = userAccountBLL.GetModel(touser);  //
2121
-                  //  if (modelUser2 != null)
2122
-                  //  {
2123
-                      //  if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))
2124
-                      //  {
2125
-                       //     sendwxmsg(model, modelUser2.F_WxOpenId, nowUser, opt);
2126
-                      //  }
2127
-                  //  }
2128 2156
                 }
2129 2157
                 #endregion 向下一级操作人员推送消息
2130 2158
             }
@@ -2132,6 +2160,32 @@ namespace CallCenterApi.Interface.Controllers.weixin
2132 2160
                 return false;
2133 2161
             return true;
2134 2162
         }
2163
+        public bool SendSms(string type,string F_Mobile,int userid)
2164
+        {
2165
+             string smscont = "";
2166
+            if (type == "1")
2167
+            {
2168
+                smscont = "咨询";
2169
+            }
2170
+            else if (type == "2")
2171
+            {
2172
+                smscont = "投诉";
2173
+            }
2174
+            else if (type == "3")
2175
+            {
2176
+                smscont = "抽检";
2177
+            }
2178
+            else
2179
+            {
2180
+                smscont = "建议";
2181
+            }
2182
+            string[] mag = { smscont };
2183
+          string smsmsg = "您好,您有一条新的" + smscont + "工单,请及时接单处理!";
2184
+           SmsSingleSenderResult result = new SMSController().SMSSingleshot(445305, mag, F_Mobile.Trim());
2185
+            bool n = new SMSController().AddSmS(F_Mobile.Trim(), smsmsg, userid);
2186
+            return n;
2187
+            
2188
+        }
2135 2189
         /// <summary>
2136 2190
         /// 大区经理未审批流转市场管理科
2137 2191
         /// </summary>
@@ -3931,6 +3985,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
3931 3985
                                 }
3932 3986
                                 AddLog(modlelist.F_ID, 0, deptname1 + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms );
3933 3987
                                 AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
3988
+                                if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
3989
+                                {
3990
+                                    SendSms(model.F_Type, user.F_Mobile, ua.F_UserId);
3991
+                                }
3934 3992
                             }
3935 3993
                             else
3936 3994
                             {
@@ -4086,7 +4144,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4086 4144
         /// <returns></returns>
4087 4145
         [WechatActionFilter]
4088 4146
         public ActionResult AssignWorkOrder(string OpenId, long orderid, string cont, WorkOrdeDeptment deptment, string F_Files, int isvisit = 1,
4089
-            int overtime = 0, int sms = 0, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
4147
+            int overtime = 0, int sms = -1, int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
4090 4148
         {
4091 4149
 
4092 4150
             if (!string.IsNullOrEmpty(OpenId))
@@ -4102,7 +4160,11 @@ namespace CallCenterApi.Interface.Controllers.weixin
4102 4160
                             return Error("非接单人不可操作工单");
4103 4161
                     }
4104 4162
                 }
4105
-               
4163
+               if (sms ==-1)
4164
+                {
4165
+                    var itemlast = itembll.GetModelList("   F_WoID='" + model.F_ID + "' order by F_ID desc").FirstOrDefault();
4166
+                     sms = (int)itemlast.F_IsSMS;
4167
+                }
4106 4168
                 WorkOrderNewInput input = new WorkOrderNewInput();
4107 4169
 
4108 4170
                 if (ua != null)
@@ -5272,14 +5334,18 @@ namespace CallCenterApi.Interface.Controllers.weixin
5272 5334
                 if (nowUser.F_UserCode != model.F_CreateBy)
5273 5335
                 {
5274 5336
                     sendsysmsg(model, nowUser, model.F_CreateBy, (int)model.F_ID, opt);//推送系统消息
5275
-                 //   var createmodel = userAccountBLL.GetModel(model.F_CreateBy);  //被指派人
5276
-                 ///   if (createmodel != null)
5277
-                   // {
5278
-                      //  if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
5279
-                     //   {
5280
-                        //    sendwxmsg(model, createmodel.F_WxOpenId, nowUser, opt);
5281
-                      //  }
5282
-                  //  }
5337
+                  if (model.F_State == (int)EnumWorkOrderState.finish)
5338
+                    {
5339
+                        var createmodel = userAccountBLL.GetModel(model.F_CreateBy);  //被指派人
5340
+                        if (createmodel != null)
5341
+                        {
5342
+                            if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
5343
+                            {
5344
+                                sendwxmsg(model, createmodel.F_WxOpenId, nowUser, "工单完结");
5345
+                            }
5346
+                        }
5347
+                    }
5348
+                   
5283 5349
                 }
5284 5350
                 #endregion
5285 5351
                 #region 向上一级操作人员推送消息
@@ -5489,6 +5555,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
5489 5555
                         var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
5490 5556
 
5491 5557
                         AddLog(input.F_ID, model.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
5558
+                        if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
5559
+                        {
5560
+                            SendSms(model.F_Type, user.F_Mobile, ua.F_UserId);
5561
+                        }
5492 5562
                     }
5493 5563
                     else
5494 5564
                     {

+ 91 - 15
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -1235,7 +1235,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1235 1235
         /// <summary>
1236 1236
         /// 审核工单
1237 1237
         /// </summary>
1238
-        public bool Approval( long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = 0, int IsAudit = 0, int AuditState = 0)
1238
+        public bool Approval( long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = -1, int IsAudit = 0, int AuditState = 0)
1239 1239
         {
1240 1240
             bool res = true;
1241 1241
             string touser = ""; string tousername = "";
@@ -1265,6 +1265,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
1265 1265
                         deptmodelsname = deptmodels.F_DeptName + "-";
1266 1266
                     }
1267 1267
                     var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.audit + " and  F_CreateUser!=" + user.F_UserCode  + " and  F_OptType=" + (int)EnumItemOpt.audit + " and  F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_ID desc").FirstOrDefault();
1268
+
1269
+                    if (itemlast != null)
1270
+                    {
1271
+                        toussers = itemlast.F_CreateUser;
1272
+                        if (sms == -1)
1273
+                        {
1274
+                            sms = (int)itemlast.F_IsSMS;
1275
+                        }
1276
+                    }
1277
+                    else
1278
+                    {
1279
+                        if (sms == -1)
1280
+                        {
1281
+                            sms =0;
1282
+                        }
1283
+                    }
1284
+                   
1268 1285
                     if (itemlast != null)
1269 1286
                         toussers = itemlast.F_CreateUser;
1270 1287
                     wostate = 16;
@@ -1275,6 +1292,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
1275 1292
                         var uaid = AddLog(model.F_ID, model.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
1276 1293
                         if (userid <= 0 || uaid <= 0)
1277 1294
                             res = false;
1295
+                        else
1296
+                        {
1297
+                            if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
1298
+                            {
1299
+                                SendSms(model.F_Type, user.F_Mobile, nowUser.F_UserId);
1300
+                            }
1301
+                        }
1278 1302
                     }
1279 1303
                     else if (AuditState == 1)
1280 1304
                     {
@@ -1299,8 +1323,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
1299 1323
                     {
1300 1324
                         var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.audit  + " and  F_OptType=" + (int)EnumItemOpt.audit + " and  F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_ID desc").FirstOrDefault();
1301 1325
                         if (itemlast != null)
1326
+                        {
1302 1327
                             toussers = itemlast.F_CreateUser;
1303
-
1328
+                            if (sms == -1)
1329
+                            {
1330
+                                sms = (int)itemlast.F_IsSMS;
1331
+                            }
1332
+                        }
1333
+                        else
1334
+                        {
1335
+                            if (sms == -1)
1336
+                            {
1337
+                                sms = 0;
1338
+                            }
1339
+                        }
1304 1340
                         if (AuditState == 0)
1305 1341
                         {
1306 1342
                             opt = "同意上报";
@@ -4353,7 +4389,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
4353 4389
 
4354 4390
                                 AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4355 4391
                                 AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4392
+                            if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
4393
+                            {
4394
+                                SendSms(model.F_Type, user.F_Mobile, ua.F_UserId);
4356 4395
                             }
4396
+                        }
4357 4397
                             else
4358 4398
                             {
4359 4399
                           
@@ -4716,8 +4756,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
4716 4756
                                     deptname1 = deptmode.F_DeptName + "-";
4717 4757
                                 }
4718 4758
                                 var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
4719
-
4720
-                                AddLog(input.F_ID, model.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, 0, 0);
4759
+                                var itemlast = itembll.GetModelList("   F_WoID='" + model.F_ID + "' order by F_ID desc").FirstOrDefault();
4760
+                                int sms = 0;
4761
+                                if (itemlast!=null )
4762
+                                   sms = (int)itemlast.F_IsSMS;
4763
+                                AddLog(input.F_ID, model.F_State.Value, deptname1 + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, 0, sms);
4764
+                                if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
4765
+                                {
4766
+                                    SendSms(model.F_Type, user.F_Mobile, ua.F_UserId);
4767
+                                }
4721 4768
                             }
4722 4769
                             else
4723 4770
                             {
@@ -5101,7 +5148,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5101 5148
                     model.F_CJ_Tonnage = model1[i].F_CJ_Tonnage;//抽检-抽检吨数
5102 5149
                     model.F_CJ_BagNo = model1[i].F_CJ_BagNo;//抽检-抽检袋数
5103 5150
                     model.F_CJ_Outlay = model1[i].F_CJ_Outlay;//抽检-公关费用金额:单位元
5104
-                   
5151
+                    model.F_Production = model1[i].F_Production;
5105 5152
                     model.F_DealBy = model1[i].F_DealBy;//处理人
5106 5153
                     model.F_DealTime = model1[i].F_DealTime;//处理时间
5107 5154
                     model.F_DealContent = model1[i].F_DealContent;//处理内容
@@ -5671,7 +5718,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
5671 5718
             #endregion
5672 5719
             model.F_Canal = input.F_Canal;//生产批次号
5673 5720
             model.F_Type = input.F_Type.ToString();//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
5674
-            model.F_CusName = input.F_CusName;//客户姓名
5721
+            model.F_Production = input.F_Production;//生产单位
5722
+        model.F_CusName = input.F_CusName;//客户姓名
5675 5723
             model.F_CusPhone = input.F_CusPhone;//客户电话
5676 5724
             model.F_CompanyName = input.F_CompanyName;//公司名称
5677 5725
             model.F_IncidentProvince = input.F_IncidentProvince;//事发地-省
@@ -7342,14 +7390,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
7342 7390
                 if (nowUser.F_UserCode != model.F_CreateBy)
7343 7391
                 {
7344 7392
                     sendsysmsg(model, nowUser, model.F_CreateBy, (int)model.F_ID , opt);//推送系统消息
7345
-                 //   var createmodel = sysUserAccountBll.GetModel(model.F_CreateBy);  //被指派人
7346
-                  //  if (createmodel != null)
7347
-                //    {
7348
-                //     if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
7349
-                    //   {
7350
-                      //     sendwxmsg(model, createmodel.F_WxOpenId, nowUser, opt);
7351
-                     //  }
7352
-                   // }
7393
+                    if (model.F_State == (int)EnumWorkOrderState.finish)
7394
+                    {
7395
+                        var createmodel = sysUserAccountBll .GetModel(model.F_CreateBy);  //被指派人
7396
+                        if (createmodel != null)
7397
+                        {
7398
+                            if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
7399
+                            {
7400
+                                sendwxmsg(model, createmodel.F_WxOpenId, nowUser, "工单完结");
7401
+                            }
7402
+                        }
7403
+                    }
7353 7404
                 }
7354 7405
                 #endregion
7355 7406
                 #region 向上一级操作人员推送消息
@@ -7521,6 +7572,32 @@ namespace CallCenterApi.Interface.Controllers.workorder
7521 7572
             }
7522 7573
             return model;
7523 7574
         }
7575
+        public bool SendSms(string type, string F_Mobile, int userid)
7576
+        {
7577
+            string smscont = "";
7578
+            if (type == "1")
7579
+            {
7580
+                smscont = "咨询";
7581
+            }
7582
+            else if (type == "2")
7583
+            {
7584
+                smscont = "投诉";
7585
+            }
7586
+            else if (type == "3")
7587
+            {
7588
+                smscont = "抽检";
7589
+            }
7590
+            else
7591
+            {
7592
+                smscont = "建议";
7593
+            }
7594
+            string[] mag = { smscont };
7595
+            string smsmsg = "您好,您有一条新的" + smscont + "工单,请及时接单处理!";
7596
+            SmsSingleSenderResult result = new SMSController().SMSSingleshot(445305, mag, F_Mobile.Trim());
7597
+            bool n = new SMSController().AddSmS(F_Mobile.Trim(), smsmsg, userid);
7598
+            return n;
7599
+
7600
+        }
7524 7601
         /// <summary>
7525 7602
         /// 转派工单
7526 7603
         /// </summary>
@@ -7566,7 +7643,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
7566 7643
                     {
7567 7644
                         if (!string .IsNullOrEmpty (clus.F_Mobile))
7568 7645
                         {
7569
-                          
7570 7646
                             SmsSingleSenderResult result = new SMSController().SMSSingleshot(445305, mag, clus.F_Mobile.Trim());
7571 7647
                             bool n = new SMSController().AddSmS(clus.F_Mobile.Trim(), smsmsg, nowUser.F_UserId);
7572 7648
                         }

+ 6 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

@@ -875,6 +875,10 @@ namespace CallCenterApi.Interface.Models.Input
875 875
         {
876 876
             get; set;
877 877
         }
878
+        /// <summary>
879
+        /// 生产单位
880
+        /// </summary>
881
+        public string F_Production { set; get; }
878 882
     }
879 883
 }
880 884
 public class Questions
@@ -1256,7 +1260,7 @@ public class WorkOrderComplaint
1256 1260
     {
1257 1261
         get; set;
1258 1262
     }
1259
-   
1263
+
1260 1264
 }
1261 1265
 public class Prescription
1262 1266
 {
@@ -1397,5 +1401,6 @@ public class Product
1397 1401
     /// 业务员
1398 1402
     /// </summary>
1399 1403
     public string F_Salesman { set; get; }
1404
+   
1400 1405
 }
1401 1406
 

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

@@ -826,6 +826,10 @@ namespace CallCenterApi.Model
826 826
             set { _f_deleteon = value; }
827 827
             get { return _f_deleteon; }
828 828
         }
829
+        /// <summary>
830
+        /// 生产单位
831
+        /// </summary>
832
+        public string F_Production { set; get; }
829 833
         #endregion Model
830 834
     }
831 835