Преглед на файлове

vip客户,修改三级单位附件

duhongyu преди 4 години
родител
ревизия
17ab1f61bb

+ 23 - 26
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CusVipController.cs

@@ -1,5 +1,6 @@
1 1
 using CallCenter.Utility;
2 2
 using CallCenterApi.Common;
3
+using CallCenterApi.DB;
3 4
 using CallCenterApi.Interface.Controllers.Base;
4 5
 using System;
5 6
 using System.Collections.Generic;
@@ -143,41 +144,37 @@ namespace CallCenterApi.Interface.Controllers.customer
143 144
             else
144 145
                 return Error("修改失败");
145 146
         }
146
-        public ActionResult DeleteVip(int id=0)
147
+        public ActionResult DeleteVip(string id)
147 148
         {
148 149
             int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
149 150
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
150
-            if (id<=0)
151
-                return Error("参数错误");
152
-           
153
-            Model.T_Cus_VipInfo model = vipinfp.GetModel(id);
154
-            if (model == null)
155
-                return Error("该VIP用户不存在");
156
-            model.F_DeleteUser   = userModel.F_UserCode;
157
-            model.F_DeleteTime = DateTime.Now;
158
-            model.F_IsDelete = 1;
159
-            bool n = new BLL.T_Cus_VipInfo().Update(model);
160
-            if (n)
161
-                return Success("删除成功");
151
+            if (string.IsNullOrEmpty(id))
152
+                return Error("请选择vip用户");
153
+            string sql = "update T_Cus_VipInfo set F_IsDelete=1,F_DeleteTime="+DateTime .Now + ",F_DeleteUser="+ userModel.F_UserCode + " where F_ID in(" + id.TrimEnd(',') + ")";
154
+            if (DbHelperSQL.ExecuteSql(sql) > 0)
155
+            {
156
+                return Success("设置成功");
157
+            }
162 158
             else
163
-                return Error("删除失败");
159
+            {
160
+                return Error("设置失败");
161
+            }
164 162
         }
165
-        public ActionResult EditState(int id = 0,int state=0)
163
+        public ActionResult EditState(string id,int state=0)
166 164
         {
167 165
             int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
168 166
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
169
-            if (id <= 0)
170
-                return Error("参数错误");
171
-
172
-            Model.T_Cus_VipInfo model = vipinfp.GetModel(id);
173
-            if (model == null)
174
-                return Error("该VIP用户不存在");
175
-            model.F_State = state;
176
-            bool n = new BLL.T_Cus_VipInfo().Update(model);
177
-            if (n)
178
-                return Success("修改成功");
167
+            if (string .IsNullOrEmpty (id))
168
+                return Error("请选择vip用户");
169
+            string sql = "update T_Cus_VipInfo set F_State="+ state + " where F_ID in(" + id.TrimEnd(',') + ")";
170
+            if (DbHelperSQL.ExecuteSql(sql) > 0)
171
+            {
172
+                return Success("设置成功");
173
+            }
179 174
             else
180
-                return Error("修改失败");
175
+            {
176
+                return Error("设置失败");
177
+            }
181 178
         }
182 179
     }
183 180
 }

+ 3 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/APPSController.cs

@@ -3444,17 +3444,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
3444 3444
                 newRow = dt.NewRow();
3445 3445
                 newRow["strWrkOrdr_ID"] = orderlist.Rows[i]["F_WorkOrderId"].ToString();
3446 3446
                 newRow["strWrkOrdr_TpCd"] = orderlist.Rows[i]["F_InfoSource"].ToString();
3447
-                if (DbHelperSQL.GetSingle("select top 1  WorkOrderId from  PublicComment where WorkOrderId='" + orderlist.Rows[i]["F_WorkOrderId"].ToString() + "'") != null)
3447
+                if (Convert.ToInt32(DbHelperSQL.GetSingle("select count(1) from  PublicComment where WorkOrderId='" + orderlist.Rows[i]["F_WorkOrderId"].ToString() + "'")
3448
+                .ToString()) > 0)
3448 3449
                 {
3449
-                    if (DbHelperSQL.GetSingle("select top 1  WorkOrderId from  PublicComment where WorkOrderId='" + orderlist.Rows[i]["F_WorkOrderId"].ToString() + "'").ToString() == orderlist.Rows[i]["F_WorkOrderId"].ToString())
3450
-                        newRow["strHpCnt"] = 3;
3450
+                    newRow["strHpCnt"] = 3;
3451 3451
                 }
3452 3452
                 else
3453 3453
                 {
3454 3454
                     newRow["strHpCnt"] = 2;
3455 3455
                 }
3456
-
3457
-
3458 3456
                 if (orderlist.Rows[i]["F_WorkState"].ToString() == "0"
3459 3457
                     || orderlist.Rows[i]["F_WorkState"].ToString() == "1" || orderlist.Rows[i]["F_WorkState"].ToString() == "2" || orderlist.Rows[i]["F_WorkState"].ToString() == "11")
3460 3458
                     newRow["strWrkOrdr_StCd"] = "1";

+ 6 - 6
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -131,16 +131,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
131 131
             {
132 132
                if (zdpy>0)
133 133
                 {
134
-                    sql += "and datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null " +
134
+                    sql += " and datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null " +
135 135
                         "and   F_WorkOrderId not in (select WorkOrderId   from PublicComment )";
136 136
                 }
137 137
                else   if (smpy  > 0)
138 138
                 {
139
-                    sql += "and  F_WorkOrderId in (select WorkOrderId   from PublicComment ) ";
139
+                    sql += " and  F_WorkOrderId in (select WorkOrderId   from PublicComment ) ";
140 140
                 }
141 141
                else
142 142
                 {
143
-                    sql += "(and (datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null) or  F_WorkOrderId  in (select WorkOrderId   from PublicComment )) ";
143
+                    sql += " and ((datediff(day,F_CreateTime,getdate() )>15 and F_WorkState = 9 and F_CloseTime is not null) or  F_WorkOrderId  in (select WorkOrderId   from PublicComment )) ";
144 144
                 }
145 145
             }
146 146
             string ComTitle = HttpUtility.UrlDecode(RequestString.GetQueryString("ComTitle"));
@@ -240,8 +240,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
240 240
             if (keyid != 0)
241 241
             {
242 242
                 sqlwhere = " INNER JOIN[GetValueId]('"+ keyid + "') Value on a.F_Key = Value.F_ValueId";
243
-                //sql += "and (F_Key IN(  SELECT  F_ValueId from [GetValueId]('"+ keyid + "'))" +
244
-                //  " or F_Key='" + keyid + "' )";
245 243
                 value= " INNER JOIN[GetValueId]('" + keyid + "') Value on wo.F_Key = Value.F_ValueId";
246 244
 
247 245
             }
@@ -7234,12 +7232,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
7234 7232
                 string workorderid = RequestString.GetFormString("workorderid");
7235 7233
                 Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
7236 7234
                 string result = RequestString.GetFormString("result");
7235
+                string flies = RequestString.GetFormString("flies");
7237 7236
                 var  modelT_Bus_Feedback_Nexts= new BLL.T_Bus_Feedback_Next()
7238 7237
                     .GetModelList("F_WorkOrderId='" + workorderid + "' and F_IsDelete = 0 order by F_CreateTime desc");
7239 7238
                    if (modelT_Bus_Feedback_Nexts != null&& modelT_Bus_WorkOrder!=null  && modelT_Bus_Feedback_Nexts.Count >0)
7240 7239
                   {
7241 7240
                     string message = modelT_Bus_Feedback_Nexts[0].F_Result;
7242 7241
                     modelT_Bus_Feedback_Nexts[0].F_Result = result;//反馈内容
7242
+                    modelT_Bus_Feedback_Nexts[0].F_File = flies;
7243 7243
                     bool n = new BLL.T_Bus_Feedback_Next().Update(modelT_Bus_Feedback_Nexts[0]);
7244 7244
                     Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
7245 7245
                     oper.F_WorkOrderId = workorderid;
@@ -14930,7 +14930,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
14930 14930
                 if(modelT_Bus_WorkOrder.F_IsRelease ==3)
14931 14931
                     return Error(modelT_Bus_WorkOrder.F_WorkOrderId +"工单已被设置为子工单不能设置为主工单");
14932 14932
                 string[] orderlist = subworkorderid.Split(',');
14933
-                if (subworkorderid.Contains(subworkorderid))
14933
+                if (subworkorderid.Contains(workorderid))
14934 14934
                 {
14935 14935
                     return Error("主工单不能出现在子工单中");
14936 14936
                 }