duhongyu лет назад: 5
Родитель
Сommit
1de5afcd45

+ 7 - 32
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/XLXCustomerController.cs

@@ -37,7 +37,7 @@ namespace CallCenterApi.Interface.Controllers.customer
37 37
             string customerphone = RequestString.GetFormString("customerphone");    //客户电话
38 38
             string province = RequestString.GetFormString("province");    //省份
39 39
             string city = RequestString.GetFormString("city");    //市
40
-            string country  = RequestString.GetFormString("country");    //区/县
40
+            string country  = RequestString.GetFormString("county");    //区/县
41 41
             string township = RequestString.GetFormString("township");    //乡镇
42 42
             string  addressfull = RequestString.GetFormString("addressfull");    //详细地址
43 43
             string brands = RequestString.GetFormString("brands");    //经营品牌
@@ -84,30 +84,15 @@ namespace CallCenterApi.Interface.Controllers.customer
84 84
                 ajresult.message = "客户编号不能为空";
85 85
                 return Process();
86 86
             }
87
-            if (string.IsNullOrEmpty(customerphone))
88
-            {
89
-                ajresult.state = (int)CodeStatus.必填字段为空;
90
-                ajresult.message = "客户电话不能为空";
91
-                return Process();
92
-            }
87
+            
93 88
             if (!Common.CodeValidate.ICodeValidate(uuid + customercode, port_password))
94 89
             {
95 90
                 ajresult.state = (int)CodeStatus.安全验证未通过;
96 91
                 ajresult.message = "安全验证未通过";
97 92
                 return Process();
98 93
             }
99
-            if (string.IsNullOrEmpty(customername))
100
-            {
101
-                ajresult.state = (int)CodeStatus.必填字段为空;
102
-                ajresult.message = "客户姓名不能为空";
103
-                return Process();
104
-            }
105
-            if (cus.getunphone(0, customerphone))
106
-            {
107
-                ajresult.state = (int)CodeStatus.参数逻辑错误;
108
-                ajresult.message = "已存在该客户请勿重复添加";
109
-                return Process();
110
-            }
94
+         
95
+       
111 96
             if (!string.IsNullOrEmpty(salesphone))
112 97
             {
113 98
                 if (!IsNumeric(salesphone))
@@ -220,7 +205,7 @@ namespace CallCenterApi.Interface.Controllers.customer
220 205
             string customerphone = RequestString.GetFormString("customerphone");    //客户电话
221 206
             string province = RequestString.GetFormString("province");    //省份
222 207
             string city = RequestString.GetFormString("city");    //市
223
-            string country = RequestString.GetFormString("country");    //区/县
208
+            string country = RequestString.GetFormString("county");    //区/县
224 209
             string township = RequestString.GetFormString("township");    //乡镇
225 210
             string addressfull = RequestString.GetFormString("addressfull");    //详细地址
226 211
             string brands = RequestString.GetFormString("brands");    //经营品牌
@@ -280,24 +265,14 @@ namespace CallCenterApi.Interface.Controllers.customer
280 265
                 ajresult.message = "客户编号不能为空";
281 266
                 return Process();
282 267
             }
283
-            if (string.IsNullOrEmpty(customerphone))
284
-            {
285
-                ajresult.state = (int)CodeStatus.必填字段为空;
286
-                ajresult.message = "客户电话不能为空";
287
-                return Process();
288
-            }
268
+           
289 269
             if (!Common.CodeValidate.ICodeValidate(uuid + customercode, port_password))
290 270
             {
291 271
                 ajresult.state = (int)CodeStatus.安全验证未通过;
292 272
                 ajresult.message = "安全验证未通过";
293 273
                 return Process();
294 274
             }
295
-            if (string.IsNullOrEmpty(customername))
296
-            {
297
-                ajresult.state = (int)CodeStatus.必填字段为空;
298
-                ajresult.message = "客户姓名不能为空";
299
-                return Process();
300
-            }
275
+           
301 276
            
302 277
             if (!string.IsNullOrEmpty(salesphone))
303 278
             {

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -2185,7 +2185,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2185 2185
                 }
2186 2186
                 else if (dapt == 18)
2187 2187
                 {
2188
-                    nextda = 18;
2188
+                    nextda = 268;
2189 2189
                     opt = "流转车用尿素";
2190 2190
 
2191 2191
                 }
@@ -3970,7 +3970,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3970 3970
                                     }
3971 3971
                                     else if (dapt == 18)
3972 3972
                                     {
3973
-                                        nextda = 18;
3973
+                                        nextda = 268;
3974 3974
                                         opt = "流转车用尿素";
3975 3975
 
3976 3976
                                     }
@@ -5525,7 +5525,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5525 5525
                             }
5526 5526
                             else if (dapt == 18)
5527 5527
                             {
5528
-                                nextda = 18;
5528
+                                nextda = 268;
5529 5529
                                opt = "流转车用尿素" ;
5530 5530
 
5531 5531
                             }

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/MaterialManageXLXController.cs

@@ -302,7 +302,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
302 302
             }
303 303
 
304 304
         }
305
-        public ActionResult DelCustomeMaterial(string uuid, string port_password, int id = 0)
305
+        public ActionResult DelMaterial(string uuid, string port_password, int id = 0)
306 306
         {
307 307
             Model.T_Cus_Customerrecords cusmodel = new Model.T_Cus_Customerrecords();
308 308
             if (string.IsNullOrEmpty(uuid))

+ 467 - 20
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -1465,7 +1465,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1465 1465
                 }
1466 1466
                 else if (dapt == 18)
1467 1467
                 {
1468
-                    nextda = 18;
1468
+                    nextda = 268;
1469 1469
                     opt = "流转车用尿素";
1470 1470
 
1471 1471
                 }
@@ -2903,7 +2903,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2903 2903
         /// 查询超时工单列表
2904 2904
         /// </summary>
2905 2905
         public ActionResult GetOvertime(string code,string keywords, string cusname, string cusphone, string companyname, string province, string city,
2906
-         string starttime, string salesBase, string endtime,  string country, string township, string touser, string product,int source = 0,int state=0, int type = 0,int pageindex = 1, int pagesize = 10)
2906
+         string starttime, string salesBase, string endtime,  string country, string township, string touser, string product,int source = 0,int state=0, int type = 0,int pageindex = 1, int pagesize = 10,int isdc=0)
2907 2907
         {
2908 2908
             int userId = CurrentUser.UserData.F_UserId;
2909 2909
             if (userId != 0)
@@ -3017,25 +3017,470 @@ namespace CallCenterApi.Interface.Controllers.workorder
3017 3017
                     return Error("无操作权限!");
3018 3018
                 }
3019 3019
                 #endregion
3020
-                int recordCount = 0;
3021
-                if (!string.IsNullOrWhiteSpace(sql)) 
3020
+                if (isdc > 0)
3022 3021
                 {
3023 3022
 
3024
-                    dt = BLL.PagerBLL.GetListPager(
3025
-                        "T_Wo_WorkOrder",
3026
-                        "F_ID",
3027
-                        "*",
3028
-                        sql,
3029
-                        "ORDER BY T_Wo_WorkOrder.F_ID desc",
3030
-                        pagesize,
3031
-                        pageindex,
3032
-                        true,
3033
-                        out recordCount);
3023
+                    if (type <= 0 || type >= 5)//工单类型
3024
+                    {
3025
+                        return Error("请选择工单类型");
3026
+                    }
3027
+                    if (userId != 0)
3028
+                    {
3029
+                        var depts = new BLL.T_Wo_WorkOrder().GetModelList("F_IsDelete=0" + sql);
3030
+                        #region 
3031
+                        dt.Columns.Add("工单编号");
3032
+                        dt.Columns.Add("工单来源");
3033
+                        dt.Columns.Add("工单类型");
3034
+                        dt.Columns.Add("工单状态");
3035
+
3036
+                        if (type == 1 || type == 4)
3037
+                        {
3038
+                            dt.Columns.Add("问题类别");
3039
+                            dt.Columns.Add("产品名称");
3040
+                            dt.Columns.Add("问题数量");
3041
+                            dt.Columns.Add("销售基地");
3042
+                        }
3043
+                        else if (type == 2)
3044
+                        {
3045
+
3046
+                            dt.Columns.Add("产品名称");
3047
+                            dt.Columns.Add("问题数量");
3048
+                            dt.Columns.Add("销售基地");
3049
+                            dt.Columns.Add("生产批次号");
3050
+                            dt.Columns.Add("问题类别1");
3051
+                            dt.Columns.Add("问题类别2");
3052
+                            dt.Columns.Add("问题类别3");
3053
+                            dt.Columns.Add("重要级别");
3054
+                            dt.Columns.Add("品牌");
3055
+                            dt.Columns.Add("客户编号");
3056
+                            dt.Columns.Add("业务员");
3057
+                            dt.Columns.Add("电话");
3058
+                            dt.Columns.Add("经营品牌");
3059
+                            dt.Columns.Add("大区名称");
3060
+                            dt.Columns.Add("分公司名称");
3061
+                            dt.Columns.Add("公司名称");
3062
+                            dt.Columns.Add("渠道类型");
3063
+                            dt.Columns.Add("物料编码");
3064
+                            dt.Columns.Add("物料名称");
3065
+                            dt.Columns.Add("型号");
3066
+                            dt.Columns.Add("规格");
3067
+                            dt.Columns.Add("一级分类");
3068
+                            dt.Columns.Add("二级分类");
3069
+                            dt.Columns.Add("三级分类");
3070
+                            dt.Columns.Add("物料品牌");
3071
+                            dt.Columns.Add("复合肥肥效");
3072
+                            dt.Columns.Add("产品线");
3073
+                            dt.Columns.Add("工艺");
3074
+                        }
3075
+                        else
3076
+                        {
3077
+                            dt.Columns.Add("问题类别");
3078
+                            dt.Columns.Add("抽检级别");
3079
+                            dt.Columns.Add("抽检单位");
3080
+                            dt.Columns.Add("抽检吨数");
3081
+                            dt.Columns.Add("抽检袋数");
3082
+                            dt.Columns.Add("抽检时间");
3083
+                            dt.Columns.Add("化验单位");
3084
+                            dt.Columns.Add("生产批次号");
3085
+                            dt.Columns.Add("公关费用金额");
3086
+                            dt.Columns.Add("客户编号");
3087
+                            dt.Columns.Add("业务员");
3088
+                            dt.Columns.Add("电话");
3089
+                            dt.Columns.Add("经营品牌");
3090
+                            dt.Columns.Add("大区名称");
3091
+                            dt.Columns.Add("分公司名称");
3092
+                            dt.Columns.Add("公司名称");
3093
+                            dt.Columns.Add("渠道类型");
3094
+                            dt.Columns.Add("物料编码");
3095
+                            dt.Columns.Add("物料名称");
3096
+                            dt.Columns.Add("型号");
3097
+                            dt.Columns.Add("规格");
3098
+                            dt.Columns.Add("一级分类");
3099
+                            dt.Columns.Add("二级分类");
3100
+                            dt.Columns.Add("三级分类");
3101
+                            dt.Columns.Add("物料品牌");
3102
+                            dt.Columns.Add("复合肥肥效");
3103
+                            dt.Columns.Add("产品线");
3104
+                            dt.Columns.Add("工艺");
3105
+                        }
3106
+                        dt.Columns.Add("客户姓名");
3107
+                        dt.Columns.Add("客户电话");
3108
+                        dt.Columns.Add("问题描述");
3109
+                        dt.Columns.Add("事发地-省");
3110
+                        dt.Columns.Add("事发地-市");
3111
+                        dt.Columns.Add("事发地-县");
3112
+                        dt.Columns.Add("事发地-乡");
3113
+                        dt.Columns.Add("事发地-详细");
3114
+                        dt.Columns.Add("上级处理意见");
3115
+                        dt.Columns.Add("处理详情");
3116
+                        dt.Columns.Add("备注");
3117
+                        dt.Columns.Add("注解");
3118
+                        dt.Columns.Add("超时时限");
3119
+                        dt.Columns.Add("剩余时间");
3120
+                        dt.Columns.Add("超时原因");
3121
+                        dt.Columns.Add("工单记录");
3122
+                        #endregion
3123
+                        foreach (var it in depts)
3124
+                        {
3125
+                            DataRow drNew = dt.NewRow();
3126
+
3127
+
3128
+
3129
+                            drNew["工单编号"] = it.F_WorkOrderCode;//工单编号
3130
+                            #region
3131
+                            if (it.F_Source == "1")
3132
+                            {
3133
+                                drNew["工单来源"] = "电话";
3134
+                            }
3135
+                            else if (it.F_Source == "2")
3136
+                            {
3137
+                                drNew["工单来源"] = "微信业务员";
3138
+                            }
3139
+                            else if (it.F_Source == "3")
3140
+                            {
3141
+                                drNew["工单来源"] = "微信客户";
3142
+                            }
3143
+                            else if (it.F_Source == "4")
3144
+                            {
3145
+                                drNew["工单来源"] = "官网";
3146
+                            }
3147
+                            else
3148
+                            {
3149
+                                drNew["工单来源"] = "电话";
3150
+                            }
3151
+                            if (it.F_Type == "1")
3152
+                            {
3153
+                                drNew["工单类型"] = "咨询";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3154
+                            }
3155
+                            else if (it.F_Type == "2")
3156
+                            {
3157
+                                drNew["工单类型"] = "投诉";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3158
+                            }
3159
+                            else if (it.F_Type == "3")
3160
+                            {
3161
+                                drNew["工单类型"] = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3162
+                            }
3163
+                            else
3164
+                            {
3165
+                                drNew["工单类型"] = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3166
+                            }
3167
+                            if (it.F_State == 0)//工单状态
3168
+                            {
3169
+                                drNew["工单状态"] = "待指派";
3170
+                            }
3171
+                            else if (it.F_State == 1)
3172
+                            {
3173
+                                drNew["工单状态"] = "待接单";
3174
+                            }
3175
+                            else if (it.F_State == 2)
3176
+                            {
3177
+                                drNew["工单状态"] = "待处理";
3178
+                            }
3179
+                            else if (it.F_State == 3)
3180
+                            {
3181
+                                drNew["工单状态"] = "已退回";
3182
+                            }
3183
+                            else if (it.F_State == 4)
3184
+                            {
3185
+                                drNew["工单状态"] = "异常退回";
3186
+                            }
3187
+                            else if (it.F_State == 5)
3188
+                            {
3189
+                                drNew["工单状态"] = "处理中";
3190
+                            }
3191
+                            else if (it.F_State == 6)
3192
+                            {
3193
+                                drNew["工单状态"] = "待回访";
3194
+                            }
3195
+                            else if (it.F_State == 7)
3196
+                            {
3197
+                                drNew["工单状态"] = "待完结";
3198
+                            }
3199
+                            else if (it.F_State == 10)
3200
+                            {
3201
+                                drNew["工单状态"] = "已处理";
3202
+                            }
3203
+                            else if (it.F_State == 11)
3204
+                            {
3205
+                                drNew["工单状态"] = "已回访";
3206
+                            }
3207
+                            else if (it.F_State == 12)
3208
+                            {
3209
+                                drNew["工单状态"] = "已退回";
3210
+                            }
3211
+                            else if (it.F_State == 13)
3212
+                            {
3213
+                                drNew["工单状态"] = "导入工单";
3214
+                            }
3215
+                            else if (it.F_State == 14)
3216
+                            {
3217
+                                drNew["工单状态"] = "待办理";
3218
+                            }
3219
+                            else if (it.F_State == 15)
3220
+                            {
3221
+                                drNew["工单状态"] = "微信未通过";
3222
+                            }
3223
+                            else if (it.F_State == 16)
3224
+                            {
3225
+                                drNew["工单状态"] = "待办理";
3226
+                            }
3227
+                            #endregion
3228
+                            if (type == 1 || type == 4)
3229
+                            {
3230
+                                if (!string.IsNullOrEmpty(it.F_QuestionType))
3231
+                                {
3232
+                                    try
3233
+                                    {
3234
+                                        int b = int.Parse(it.F_QuestionType.Trim());
3235
+                                        Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
3236
+                                        if (manage != null)
3237
+                                        {
3238
+                                            drNew["问题类别"] = manage.F_QuestionName;
3239
+                                        }
3240
+                                    }
3241
+                                    catch
3242
+                                    {
3243
+                                        drNew["问题类别"] = it.F_QuestionType;
3244
+                                    }
3245
+                                }
3246
+                                drNew["产品名称"] = it.F_TS_Category;
3247
+                                drNew["问题数量"] = it.F_ZX_Quantity;//投诉-(吨)
3248
+                                drNew["销售基地"] = it.F_SalesBase;
3249
+                            }
3250
+                            else if (type == 2)
3251
+                            {
3252
+                                drNew["产品名称"] = it.F_TS_Category;
3253
+                                if (!string.IsNullOrEmpty(it.F_TS_Quantity))
3254
+                                {
3255
+                                    drNew["问题数量"] = it.F_TS_Quantity + "吨";//投诉-问题数量(吨)
3256
+                                }
3257
+                                else
3258
+                                    drNew["问题数量"] = "";
3259
+                                drNew["销售基地"] = it.F_SalesBase;
3260
+                                drNew["生产批次号"] = it.F_BatchNumber;
3261
+                                if (!string.IsNullOrEmpty(it.F_QuestionType))
3262
+                                {
3263
+                                    try
3264
+                                    {
3265
+                                        int b = int.Parse(it.F_QuestionType.Trim());
3266
+                                        Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
3267
+                                        if (manage != null)
3268
+                                        {
3269
+                                            drNew["问题类别3"] = manage.F_QuestionName;
3270
+                                            if (manage.F_Label == "3")
3271
+                                            {
3272
+                                                Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
3273
+                                                Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
3274
+                                                drNew["问题类别1"] = Manage2.F_QuestionName;//问题类别1
3275
+                                                drNew["问题类别2"] = Manage1.F_QuestionName;//问题类别2
3276
+                                            }
3277
+                                        }
3278
+                                    }
3279
+                                    catch (Exception)
3280
+                                    {
3281
+                                        drNew["问题类别3"] = it.F_QuestionType; //问题类别(投诉抽捡和咨询类别不一样)
3282
+                                    }
3283
+                                }
3284
+                                drNew["重要级别"] = it.F_TS_Level;
3285
+                                drNew["品牌"] = it.F_Brand;
3286
+                            }
3287
+                            else
3288
+                            {
3289
+                                if (!string.IsNullOrEmpty(it.F_QuestionType))
3290
+                                {
3291
+                                    try
3292
+                                    {
3293
+                                        int b = int.Parse(it.F_QuestionType.Trim());
3294
+                                        Model.T_Wo_QuestionManage manage = quesBLL.GetModel(b);
3295
+                                        if (manage != null)
3296
+                                        {
3297
+                                            drNew["问题类别"] = manage.F_QuestionName;
3298
+                                        }
3299
+                                    }
3300
+                                    catch
3301
+                                    {
3302
+                                        drNew["问题类别"] = it.F_QuestionType;
3303
+                                    }
3304
+                                }
3305
+                                drNew["抽检级别"] = it.F_CJ_Level;
3306
+                                drNew["抽检单位"] = it.F_CJ_Unit;
3307
+                                drNew["抽检吨数"] = it.F_CJ_Tonnage;
3308
+                                drNew["抽检袋数"] = it.F_CJ_BagNo;
3309
+                                drNew["抽检时间"] = it.F_CJ_Time;
3310
+                                drNew["化验单位"] = it.F_CJ_TestUnit;
3311
+                                drNew["生产批次号"] = it.F_BatchNumber;
3312
+                                drNew["公关费用金额"] = it.F_CJ_Outlay;
3313
+                            }
3314
+                            if (type == 2 || type == 3)
3315
+                            {
3316
+                                #region 客户
3317
+                                Model.T_Cus_CustomerBaseNew cuModel = new Model.T_Cus_CustomerBaseNew();
3318
+                                if (!string.IsNullOrEmpty(it.F_CustomerID))
3319
+                                {
3320
+                                    cuModel = cusbll.GetModel(it.F_CustomerID.ToString());//通过客户编号获取客户资料
3321
+                                }
3322
+                                else
3323
+                                {
3324
+                                    var sqlt = $" and  F_LegalPhone ='" + it.F_CusPhone.Trim() + "'";
3325
+                                    cuModel = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_IsDelete = 0 " + sqlt).FirstOrDefault();
3326
+                                }
3327
+                                if (cuModel != null)
3328
+                                {
3329
+                                    drNew["客户编号"] = cuModel.F_CustomerCode;//客户编码
3330
+
3331
+                                    if (!string.IsNullOrEmpty(cuModel.F_AreaID))
3332
+                                    {
3333
+                                        Model.T_Sys_Department pdModel = new T_Sys_Department();
3334
+                                        try
3335
+                                        {
3336
+                                            pdModel = departmentBLL.GetModel(int.Parse(cuModel.F_AreaID));//通过公司id获取部门
3337
+                                        }
3338
+                                        catch
3339
+                                        {
3340
+                                            pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
3341
+                                        }
3342
+
3343
+                                        if (pdModel != null)
3344
+                                        {
3345
+                                            drNew["大区名称"] = pdModel.F_DeptName;
3346
+                                        }
3347
+                                    }
3348
+                                    if (!string.IsNullOrEmpty(cuModel.F_BranchID))
3349
+                                    {
3350
+                                        Model.T_Sys_Department pdModel1 = new T_Sys_Department();
3351
+                                        try
3352
+                                        {
3353
+                                            pdModel1 = departmentBLL.GetModel(int.Parse(cuModel.F_BranchID));//通过公司id获取部门
3354
+                                        }
3355
+                                        catch
3356
+                                        {
3357
+                                            pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);//通过公司id获取部门
3358
+                                        }
3359
+                                        if (pdModel1 != null)
3360
+                                        {
3361
+                                            drNew["分公司名称"] = pdModel1.F_DeptName;
3362
+                                        }
3363
+                                    }
3364
+                                    drNew["业务员"] = cuModel.F_Salesman;
3365
+                                    drNew["电话"] = cuModel.F_SalesPhone;
3366
+                                    drNew["公司名称"] = cuModel.F_CompanyName;//公司名称
3367
+                                    drNew["经营品牌"] = cuModel.F_Brands;
3368
+                                    drNew["渠道类型"] = cuModel.F_Channel;
3369
+
3370
+
3371
+
3372
+                                }
3373
+                                #endregion
3374
+                                #region 物料
3375
+                                if (!string.IsNullOrEmpty(it.F_MaterialID))
3376
+                                {
3377
+                                    if (valcode(it.F_MaterialID.ToString(), 11))
3378
+                                    {
3379
+                                        drNew["物料编码"] = it.F_MaterialID;//验证物料编码为11位纯数字
3380
+                                        Model.T_Wo_MaterialManage maModel = mmBLL.GetModel(it.F_MaterialID);//通过物料编码获取物料信息
3381
+                                        if (maModel != null)
3382
+                                        {
3383
+                                            drNew["物料名称"] = maModel.F_MaterialName;
3384
+                                            drNew["型号"] = maModel.F_Model;
3385
+                                            drNew["规格"] = maModel.F_Specs;
3386
+                                            drNew["一级分类"] = maModel.F_Level1;
3387
+                                            drNew["二级分类"] = maModel.F_Level2;
3388
+                                            drNew["三级分类"] = maModel.F_Level3;
3389
+                                            drNew["物料品牌"] = maModel.F_Brand;
3390
+                                            drNew["复合肥肥效"] = maModel.F_MaterialEffect;
3391
+                                            drNew["产品线"] = maModel.F_Pipeline;
3392
+                                            drNew["工艺"] = maModel.F_Craft;
3393
+                                        }
3394
+                                    }
3395
+                                }
3396
+
3397
+
3398
+                            }
3399
+
3400
+                            #endregion
3401
+                            #region 基本字段
3402
+
3403
+                            drNew["客户姓名"] = it.F_CusName;//
3404
+                            drNew["客户电话"] = it.F_CusPhone;//
3405
+                            drNew["问题描述"] = it.F_Description;//
3406
+                            drNew["事发地-省"] = it.F_IncidentProvince;//
3407
+                            drNew["事发地-市"] = it.F_IncidentCity;//
3408
+                            drNew["事发地-县"] = it.F_IncidentCountry;//
3409
+                            drNew["事发地-乡"] = it.F_IncidentTownship;//
3410
+                            drNew["事发地-详细"] = it.F_IncidentDetailed;//
3411
+                            drNew["上级处理意见"] = AssCont(it.F_ID);//上级处理意见
3412
+                            drNew["处理详情"] = it.F_DealContent;//处理内容
3413
+                            drNew["备注"] = it.F_VisitRemarks;//处理内容
3414
+                            drNew["注解"] = it.F_Annotation;//处理内容
3415
+                            drNew["超时时限"] = it.F_limit;//处理内容
3416
+                            float RemainingTime = float.Parse(string.Format("{0:f2}", TimeToOver(it.F_ID, it.F_limit)));
3417
+                            if (RemainingTime >= 0)
3418
+                            {
3419
+                                drNew["剩余时间"] = RemainingTime;//处理内容
3420
+                            }
3421
+                            else
3422
+                            {
3423
+                                drNew["剩余时间"] = "超时" + Math.Abs(RemainingTime);//处理内容
3424
+                            }
3425
+                            drNew["超时原因"] = it.F_Reasontimeout;//处理内容
3426
+
3427
+                            var itemlasts = itembll.GetModelList("    F_WoID=" + it.F_ID + " ");
3428
+                            if (itemlasts != null)
3429
+                            {
3430
+                                foreach (var iv in itemlasts)
3431
+                                {
3432
+                                    if (drNew["工单记录"] != null)
3433
+                                    {
3434
+                                        drNew["工单记录"] += "--" + iv.F_OptContent;
3435
+                                    }
3436
+                                    else
3437
+                                    {
3438
+                                        drNew["工单记录"] = iv.F_OptContent;
3439
+                                    }
3440
+
3441
+                                }
3442
+                            }
3443
+
3444
+
3445
+
3446
+
3447
+                            dt.Rows.Add(drNew);
3448
+                            #endregion
3449
+                        }
3450
+                        NPOIHelper npoi = new NPOIHelper();
3451
+                        if (npoi.ExportToExcel("超时工单列表", dt) == "")
3452
+                        {
3453
+                            return Success("导出成功");
3454
+                        }
3455
+                        else
3456
+                        {
3457
+                            return Error("导出失败");
3458
+
3459
+                        }
3460
+                    }
3461
+                    return Error("无操作权限");
3034 3462
                 }
3035
-                List<long> woid = new List<long>();
3036
-                List<Model.T_Wo_WorkOrder> modlelist = new BLL.T_Wo_WorkOrder().DataTableToList(dt);
3037
-                List<WorkOrderNewInput> Input = modeltooip(modlelist);
3038
-                var obj = new
3463
+                else
3464
+                {
3465
+                    int recordCount = 0;
3466
+                    if (!string.IsNullOrWhiteSpace(sql))
3467
+                    {
3468
+
3469
+                        dt = BLL.PagerBLL.GetListPager(
3470
+                            "T_Wo_WorkOrder",
3471
+                            "F_ID",
3472
+                            "*",
3473
+                            sql,
3474
+                            "ORDER BY T_Wo_WorkOrder.F_ID desc",
3475
+                            pagesize,
3476
+                            pageindex,
3477
+                            true,
3478
+                            out recordCount);
3479
+                    }
3480
+                    List<long> woid = new List<long>();
3481
+                    List<Model.T_Wo_WorkOrder> modlelist = new BLL.T_Wo_WorkOrder().DataTableToList(dt);
3482
+                    List<WorkOrderNewInput> Input = modeltooip(modlelist);
3483
+                    var obj = new
3039 3484
                     {
3040 3485
                         state = "success",
3041 3486
                         message = "成功",
@@ -3043,7 +3488,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
3043 3488
                         total = recordCount
3044 3489
                     };
3045 3490
                     return Content(obj.ToJson()); ;
3491
+                }
3046 3492
             }
3493
+               
3047 3494
             else
3048 3495
             {
3049 3496
                 return Error("无操作权限!");
@@ -3945,7 +4392,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
3945 4392
                                 }
3946 4393
                                 else if (dapt == 18)
3947 4394
                                 {
3948
-                                    nextda = 18;
4395
+                                    nextda = 268;
3949 4396
                                     opt = "流转车用尿素";
3950 4397
 
3951 4398
                                 }
@@ -4306,7 +4753,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4306 4753
                                     }
4307 4754
                                     else if (dapt == 18)
4308 4755
                                     {
4309
-                                        nextda = 18;
4756
+                                        nextda = 268;
4310 4757
                                         opt = "流转车用尿素";
4311 4758
 
4312 4759
                                     }