|
|
@@ -204,8 +204,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
204
|
204
|
|
|
205
|
205
|
if (isdc > 0)
|
|
206
|
206
|
{
|
|
207
|
|
- var dtdc = DbHelperSQL.Query(" select " + cols + " from T_Bus_WorkOrder where 1=1 " + sql).Tables[0];
|
|
208
|
|
- var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
|
207
|
+ string dccols = "F_WorkOrderId,case isnull(F_State,0) when 0 then '待处理' else '已处理' end,dbo.GetDictionaryName(F_Source) as SourceName,"
|
|
|
208
|
+ + "dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,F_CusPhone,F_CusName,F_Content,F_ProductName,"
|
|
|
209
|
+ + "F_ProductDate,F_BuyDate,F_BuyAddress,dbo.GetDictionaryName(F_ProductType) as ProductTypeName,F_BatchNumber,F_UserDate,"
|
|
|
210
|
+ + "case isnull(F_IsBack,0) when 0 then '否' else '是' end,F_Area,F_Province,F_City,F_VIPName,F_VIPPhone,"
|
|
|
211
|
+ + "dbo.GetDictionaryName(F_DealState) as DealStateName,F_DealCost,F_DealSeconds,F_DealResult,F_DealDes,F_DealTimely,"
|
|
|
212
|
+ + "dbo.GetDictionaryName(F_DealTimely) as DealTimelyName,dbo.GetUserName(F_CreateUser) as UserName,F_CreateTime";
|
|
|
213
|
+ var dtdc = DbHelperSQL.Query(" select "+ dccols + " from T_Bus_WorkOrder where 1=1 " + sql).Tables[0];
|
|
|
214
|
+ string[] dccolnames = new string[] {"工单编号","工单状态", "工单来源", "工单类型", "投诉类型", "投诉号码", "客户姓名", "投诉事件描述", "产品名称",
|
|
|
215
|
+ "生产日期", "购买日期", "购买地点", "产品类别", "生产批号", "食/饮用日期", "样品是否寄回", "大区", "省份", "城市" , "专员姓名" , "专员电话" ,
|
|
|
216
|
+ "处理状态" , "处理费用" , "处理时间(秒)" , "处理结果" , "处理进展详述" , "及时响应" , "受理人" , "受理时间" };
|
|
|
217
|
+ var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc, dccolnames);
|
|
209
|
218
|
if (msg == "")
|
|
210
|
219
|
{
|
|
211
|
220
|
return Success("导出成功");
|
|
|
@@ -273,8 +282,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
273
|
282
|
|
|
274
|
283
|
if (!string.IsNullOrEmpty(strworkorderid))
|
|
275
|
284
|
{
|
|
276
|
|
- string sql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,"
|
|
277
|
|
- + "dbo.GetDictionaryName(F_ProductType) as ProductTypeName,dbo.GetDictionaryName(F_Source) as SourceName from T_Bus_WorkOrder where F_WorkOrderId ='" + strworkorderid + "'";
|
|
|
285
|
+ string sql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,"
|
|
|
286
|
+ + "dbo.GetDictionaryName(F_SmallType) as SmallTypeName,dbo.GetDictionaryName(F_DealState) as DealStateName,"
|
|
|
287
|
+ + "dbo.GetDictionaryName(F_DealTimely) as DealTimelyName,dbo.GetDictionaryName(F_ProductType) as ProductTypeName,"
|
|
|
288
|
+ + "dbo.GetDictionaryName(F_Source) as SourceName from T_Bus_WorkOrder where F_WorkOrderId ='" + strworkorderid + "'";
|
|
278
|
289
|
var dt = DbHelperSQL.Query(sql).Tables[0];
|
|
279
|
290
|
if (dt.Rows.Count > 0)
|
|
280
|
291
|
{
|