|
|
@@ -178,6 +178,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
178
|
178
|
if (GetParticipateID() != "")
|
|
179
|
179
|
{
|
|
180
|
180
|
sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
|
|
|
181
|
+ sql += " and F_State =" + (int)EnumWorkOrderState.assign;
|
|
181
|
182
|
}
|
|
182
|
183
|
}
|
|
183
|
184
|
else
|
|
|
@@ -1886,7 +1887,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1886
|
1887
|
public string GetParticipateID()
|
|
1887
|
1888
|
{
|
|
1888
|
1889
|
string str = string.Empty;
|
|
1889
|
|
- str = "select F_WoID from T_Wo_WorkOrderItem_New where F_OptType in( 1,7)";
|
|
|
1890
|
+ str = "select F_WoID from T_Wo_WorkOrderItem_New where F_OptType in(1)";
|
|
1890
|
1891
|
|
|
1891
|
1892
|
;
|
|
1892
|
1893
|
return str;
|
|
|
@@ -2170,9 +2171,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2170
|
2171
|
int userId = CurrentUser.UserData.F_UserId;
|
|
2171
|
2172
|
if (userId != 0)
|
|
2172
|
2173
|
{
|
|
|
2174
|
+ string msg = "";
|
|
2173
|
2175
|
if (id <=0)
|
|
2174
|
2176
|
return Error("请输入正确的id");
|
|
2175
|
|
- var itemlasts = itembll.GetModelList(" F_ItemType=" + type + " and F_WoID=" + id + " ");
|
|
|
2177
|
+ if(type ==1)
|
|
|
2178
|
+ {
|
|
|
2179
|
+ msg = "0,1,7,8";
|
|
|
2180
|
+ }
|
|
|
2181
|
+ else
|
|
|
2182
|
+ {
|
|
|
2183
|
+ msg = "" + type;
|
|
|
2184
|
+ }
|
|
|
2185
|
+ var itemlasts = itembll.GetModelList(" F_ItemType in(" + msg + ") and F_WoID=" + id + " ");
|
|
2176
|
2186
|
if (itemlasts != null)
|
|
2177
|
2187
|
{
|
|
2178
|
2188
|
var obj = new
|
|
|
@@ -2197,7 +2207,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2197
|
2207
|
/// <summary>
|
|
2198
|
2208
|
///综合查询列表
|
|
2199
|
2209
|
/// </summary>
|
|
2200
|
|
- public ActionResult GetComprehensive(string code, string cusname,string createby,string keywords, string cusphone, string companyname, string province, string city,
|
|
|
2210
|
+ public ActionResult GetComprehensive(string code, string cusname,string createby, string starttime, string endtime, string keywords, string cusphone, string companyname, string province, string city,
|
|
2201
|
2211
|
string country, string township,string category,string salebase, string touser, int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10)
|
|
2202
|
2212
|
{
|
|
2203
|
2213
|
int userId = CurrentUser.UserData.F_UserId;
|
|
|
@@ -2212,12 +2222,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2212
|
2222
|
sql += $" and F_State=" + state;
|
|
2213
|
2223
|
if (source > 0)//工单来源
|
|
2214
|
2224
|
sql += $" and F_Source=" + source;
|
|
|
2225
|
+
|
|
2215
|
2226
|
if (!string.IsNullOrWhiteSpace(createby))//创建人
|
|
2216
|
|
- sql += $" and F_CreateBy like '%" + createby.Trim() + "%'";
|
|
|
2227
|
+ {
|
|
|
2228
|
+ string F_WorkNumber = "";
|
|
|
2229
|
+ Model.T_Sys_UserAccount user = sysUserAccountBll.GetworkModel(createby);
|
|
|
2230
|
+ if (user !=null )
|
|
|
2231
|
+ {
|
|
|
2232
|
+ F_WorkNumber = user.F_UserCode;
|
|
|
2233
|
+ }
|
|
|
2234
|
+ sql += $"and F_CreateBy in("+createby+","+ F_WorkNumber+") ";
|
|
|
2235
|
+ }
|
|
2217
|
2236
|
if (!string.IsNullOrWhiteSpace(touser))//参与人
|
|
2218
|
2237
|
sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
|
|
2219
|
2238
|
if (!string.IsNullOrWhiteSpace(code))//工单编号
|
|
2220
|
2239
|
sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
|
|
|
2240
|
+ if (starttime.Trim() != "" && starttime != "undefined")
|
|
|
2241
|
+ sql += " and datediff(day,F_CreateOn,'" + starttime + "')<=0 ";
|
|
|
2242
|
+ if (endtime.Trim() != "" && endtime != "undefined")
|
|
|
2243
|
+ sql += " and datediff(day,F_CreateOn,'" + endtime + "')>=0 ";
|
|
2221
|
2244
|
if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
|
|
2222
|
2245
|
sql += $" and (F_QuestionType like '%" + keywords.Trim()
|
|
2223
|
2246
|
+ "%' or F_ZX_Area like '%" + keywords.Trim() + "%' or F_ZX_Branch like '%" + keywords.Trim()
|
|
|
@@ -4011,6 +4034,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4011
|
4034
|
{
|
|
4012
|
4035
|
model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
|
|
4013
|
4036
|
model.F_CreateName = creatname.F_UserName ; ;//添加人
|
|
|
4037
|
+ model.CreateName = creatname.F_UserName + "(" + creatname.F_WorkNumber + ")";
|
|
4014
|
4038
|
}
|
|
4015
|
4039
|
}
|
|
4016
|
4040
|
model.F_UpdateBy = model1[i].F_UpdateBy;//修改人工号
|
|
|
@@ -5924,7 +5948,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5924
|
5948
|
if (clus != null)
|
|
5925
|
5949
|
{
|
|
5926
|
5950
|
touser = clus.F_UserCode;
|
|
5927
|
|
- tousername = clus.F_UserName + "(" + touser + ")";
|
|
|
5951
|
+ tousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
|
|
5928
|
5952
|
if (sms != 0)
|
|
5929
|
5953
|
{
|
|
5930
|
5954
|
if (!string .IsNullOrEmpty (clus.F_Mobile.Trim ()))
|
|
|
@@ -5946,12 +5970,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5946
|
5970
|
if (string.IsNullOrEmpty(users))
|
|
5947
|
5971
|
{
|
|
5948
|
5972
|
users = l.F_UserCode;
|
|
5949
|
|
- tousername = l.F_UserName + "(" + l.F_UserCode + ")";
|
|
|
5973
|
+ tousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
|
|
5950
|
5974
|
}
|
|
5951
|
5975
|
else
|
|
5952
|
5976
|
{
|
|
5953
|
5977
|
users = users + "," + l.F_UserCode;
|
|
5954
|
|
- tousername = tousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
|
|
|
5978
|
+ tousername = tousername + "," + l.F_UserName + "(" + l.F_WorkNumber + ")";
|
|
5955
|
5979
|
}
|
|
5956
|
5980
|
if (sms != 0)
|
|
5957
|
5981
|
{
|
|
|
@@ -5975,7 +5999,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5975
|
5999
|
if (string.IsNullOrEmpty(htouser))
|
|
5976
|
6000
|
{
|
|
5977
|
6001
|
htouser = clus.F_UserCode;
|
|
5978
|
|
- htousername = clus.F_UserName + "(" + clus.F_UserCode + ")";
|
|
|
6002
|
+ htousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
|
|
5979
|
6003
|
}
|
|
5980
|
6004
|
}
|
|
5981
|
6005
|
}
|
|
|
@@ -5987,16 +6011,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5987
|
6011
|
if (string.IsNullOrEmpty(htouser))
|
|
5988
|
6012
|
{
|
|
5989
|
6013
|
htouser = l.F_UserCode;
|
|
5990
|
|
- htousername = l.F_UserName + "(" + l.F_UserCode + ")";
|
|
|
6014
|
+ htousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
|
|
5991
|
6015
|
}
|
|
5992
|
6016
|
else
|
|
5993
|
6017
|
{
|
|
5994
|
6018
|
htouser = htouser + "," + l.F_UserCode;
|
|
5995
|
|
- htousername = htousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
|
|
|
6019
|
+ htousername = htousername + "," + l.F_UserName + "(" + l.F_WorkNumber + ")";
|
|
5996
|
6020
|
}
|
|
5997
|
6021
|
}
|
|
5998
|
6022
|
}
|
|
5999
|
|
- AddLog(model.F_ID, (int)EnumWorkOrderState.assign, "审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, htouser, hclbm, nowUser, overtime, sms, creat,2);
|
|
|
6023
|
+ AddLog(model.F_ID, (int)EnumWorkOrderState.assign,htousername+ "高层待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, htouser, hclbm, nowUser, overtime, sms, creat,2);
|
|
6000
|
6024
|
}
|
|
6001
|
6025
|
#endregion
|
|
6002
|
6026
|
#region 工单处理
|