|
|
@@ -983,6 +983,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
983
|
983
|
model.F_ZL_ImprovementRequirements = model1[i].F_ZL_ImprovementRequirements;//质量管理科-改进要求
|
|
984
|
984
|
model.F_ZL_CApprovalNo = model1[i].F_ZL_CApprovalNo;//质量管理科-对应审批工作流单号
|
|
985
|
985
|
model.F_ZL_CJ_IsRecord = model1[i].F_ZL_CJ_IsRecord;//质量管理科-抽检-未备案、已备案
|
|
|
986
|
+ model.F_IsVisit = model1[i].F_IsVisit;//质量管理科-抽检-未备案、已备案
|
|
986
|
987
|
int type = 0;
|
|
987
|
988
|
if (TimeforOver(model1[i].F_ID))
|
|
988
|
989
|
{
|
|
|
@@ -992,6 +993,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
992
|
993
|
{
|
|
993
|
994
|
type = 1;
|
|
994
|
995
|
}
|
|
|
996
|
+ model.RemainingTime = TimeToOver(model1[i].F_ID);
|
|
995
|
997
|
if (type != model1[i].F_IsOver)
|
|
996
|
998
|
{
|
|
997
|
999
|
model1[i].F_IsOver = type;
|
|
|
@@ -1013,6 +1015,67 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1013
|
1015
|
/// </summary>
|
|
1014
|
1016
|
/// <param name="id"></param>
|
|
1015
|
1017
|
/// <returns></returns>
|
|
|
1018
|
+ private int TimeToOver(int id)
|
|
|
1019
|
+ {
|
|
|
1020
|
+ var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + id + " ");
|
|
|
1021
|
+ string time1 = "", time2 = ""; int x = 0, y = 0;
|
|
|
1022
|
+ int time = 0;
|
|
|
1023
|
+ if (itemlasts.Count > 0)
|
|
|
1024
|
+ {
|
|
|
1025
|
+ for (int i = 0; i < itemlasts.Count; i++)
|
|
|
1026
|
+ {
|
|
|
1027
|
+ if (itemlasts[i].F_WoState >= 1)
|
|
|
1028
|
+ {
|
|
|
1029
|
+ if (itemlasts[i].F_WoState == 1)
|
|
|
1030
|
+ {
|
|
|
1031
|
+ x = i;
|
|
|
1032
|
+ time1 = itemlasts[i].F_CreateTime.ToString();
|
|
|
1033
|
+ time = int.Parse(itemlasts[i].F_LimitTime);
|
|
|
1034
|
+ }
|
|
|
1035
|
+ if (itemlasts[i].F_WoState == 10)
|
|
|
1036
|
+ {
|
|
|
1037
|
+ y = i;
|
|
|
1038
|
+ time2 = itemlasts[i].F_CreateTime.ToString();
|
|
|
1039
|
+ }
|
|
|
1040
|
+ }
|
|
|
1041
|
+ }
|
|
|
1042
|
+ if (time2 != "")
|
|
|
1043
|
+ {
|
|
|
1044
|
+ if (x > y)
|
|
|
1045
|
+ {
|
|
|
1046
|
+ int a = (DateTime.Parse(time2) - DateTime.Parse(time1)).Hours;
|
|
|
1047
|
+ int b = time - a;
|
|
|
1048
|
+ return b;
|
|
|
1049
|
+ }
|
|
|
1050
|
+ else
|
|
|
1051
|
+ {
|
|
|
1052
|
+ int a = (DateTime.Now - DateTime.Parse(time1)).Hours;
|
|
|
1053
|
+ int b = time - a;
|
|
|
1054
|
+ return b;
|
|
|
1055
|
+ }
|
|
|
1056
|
+ }
|
|
|
1057
|
+ else if (time1 != "")
|
|
|
1058
|
+ {
|
|
|
1059
|
+ int a = (DateTime.Now - DateTime.Parse(time1)).Hours;
|
|
|
1060
|
+ int b = time - a;
|
|
|
1061
|
+ return b;
|
|
|
1062
|
+ }
|
|
|
1063
|
+ else
|
|
|
1064
|
+ {
|
|
|
1065
|
+ return 0;
|
|
|
1066
|
+ }
|
|
|
1067
|
+ }
|
|
|
1068
|
+ else
|
|
|
1069
|
+ {
|
|
|
1070
|
+ return 0;
|
|
|
1071
|
+ }
|
|
|
1072
|
+
|
|
|
1073
|
+ }
|
|
|
1074
|
+ /// <summary>
|
|
|
1075
|
+ /// 是否超时
|
|
|
1076
|
+ /// </summary>
|
|
|
1077
|
+ /// <param name="id"></param>
|
|
|
1078
|
+ /// <returns></returns>
|
|
1016
|
1079
|
private bool TimeforOver(int id)
|
|
1017
|
1080
|
{
|
|
1018
|
1081
|
var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + id + " ");
|
|
|
@@ -1152,6 +1215,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1152
|
1215
|
model.F_CreateBy = usercode;
|
|
1153
|
1216
|
model.F_CreateOn = DateTime.Now;
|
|
1154
|
1217
|
}
|
|
|
1218
|
+ model.F_IsVisit = 1;
|
|
1155
|
1219
|
model.F_IsDelete = 0;
|
|
1156
|
1220
|
model.F_IsOver = 0;
|
|
1157
|
1221
|
#endregion
|
|
|
@@ -1213,7 +1277,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1213
|
1277
|
/// <returns></returns>
|
|
1214
|
1278
|
|
|
1215
|
1279
|
[Authority]
|
|
1216
|
|
- public ActionResult AssignWorkOrder(long orderid, string cont,int isvisit=0,int overtime=0,int sms=0,int clbm = 0, int clid = 0)
|
|
|
1280
|
+ public ActionResult AssignWorkOrder(long orderid, string cont,int overtime=0,int sms=0,int clbm = 0, int clid = 0)
|
|
1217
|
1281
|
{
|
|
1218
|
1282
|
int userId = CurrentUser.UserData.F_UserId;
|
|
1219
|
1283
|
string usercode = CurrentUser.UserData.F_UserCode;
|
|
|
@@ -1247,6 +1311,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1247
|
1311
|
}
|
|
1248
|
1312
|
else if (deptmodel.F_DeptName == "质量管理部")
|
|
1249
|
1313
|
{
|
|
|
1314
|
+ input.F_IsVisit = RequestString.GetQueryInt("isvisit");
|
|
1250
|
1315
|
input.F_ZL_QualityEventLevel = RequestString.GetQueryString("QualityEventLevel");//质量管理科-质量事件等级(未遂、一般、较大、重大)
|
|
1251
|
1316
|
input.F_ZL_ClaimAmount = RequestString.GetQueryString("ClaimAmount");// 质量管理科-索赔金额(单位元,对应责任单位)
|
|
1252
|
1317
|
input.F_ZL_ResponsibleUnit = RequestString.GetQueryString("ResponsibleUnit");// 质量管理科-责任单位(需列出,可选多个)
|
|
|
@@ -1288,7 +1353,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1288
|
1353
|
|
|
1289
|
1354
|
if (model != null)
|
|
1290
|
1355
|
{
|
|
1291
|
|
- var res = AssignWO(ua, model, input,cont, clbm, clid, overtime, sms , isvisit);
|
|
|
1356
|
+ var res = AssignWO(ua, model, input,cont, clbm, clid, overtime, sms );
|
|
1292
|
1357
|
if (res)
|
|
1293
|
1358
|
return Success("转派成功");
|
|
1294
|
1359
|
else
|
|
|
@@ -1334,7 +1399,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1334
|
1399
|
/// </summary>
|
|
1335
|
1400
|
/// <returns></returns>
|
|
1336
|
1401
|
[Authority]
|
|
1337
|
|
- public ActionResult DealWorkOrder(long orderid, string cont,string uncont="", int isover = 0, int isvisit = 0)
|
|
|
1402
|
+ public ActionResult DealWorkOrder(long orderid, string cont,string uncont="", int isover = 0)
|
|
1338
|
1403
|
{
|
|
1339
|
1404
|
int userId = CurrentUser.UserData.F_UserId;
|
|
1340
|
1405
|
if (userId != 0)
|
|
|
@@ -1355,10 +1420,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1355
|
1420
|
{
|
|
1356
|
1421
|
if (deptmodel.F_DeptName == "市场管理科")
|
|
1357
|
1422
|
{
|
|
1358
|
|
- input.F_SC_ProductBase = RequestString.GetQueryString("ProductBase");// 市场管理科-生产基地(新乡、新疆、九江、东北、贴牌、无法确定)
|
|
|
1423
|
+ input.F_SC_ProductBase = RequestString.GetQueryString("ProductBase");//市场管理科-超出质保期限
|
|
|
1424
|
+
|
|
1359
|
1425
|
}
|
|
1360
|
1426
|
else if (deptmodel.F_DeptName == "质量管理部")
|
|
1361
|
1427
|
{
|
|
|
1428
|
+ input.F_IsVisit = RequestString.GetQueryInt ("isvisit");
|
|
1362
|
1429
|
input.F_ZL_QualityEventLevel = RequestString.GetQueryString("QualityEventLevel");//质量管理科-质量事件等级(未遂、一般、较大、重大)
|
|
1363
|
1430
|
input.F_ZL_ClaimAmount = RequestString.GetQueryString("ClaimAmount");// 质量管理科-索赔金额(单位元,对应责任单位)
|
|
1364
|
1431
|
input.F_ZL_ResponsibleUnit = RequestString.GetQueryString("ResponsibleUnit");// 质量管理科-责任单位(需列出,可选多个)
|
|
|
@@ -1397,7 +1464,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1397
|
1464
|
}
|
|
1398
|
1465
|
if (model != null)
|
|
1399
|
1466
|
{
|
|
1400
|
|
- var res = DealWO(ua, model, input, cont, isover, isvisit, uncont);
|
|
|
1467
|
+ var res = DealWO(ua, model, input, cont, isover, uncont);
|
|
1401
|
1468
|
if (res)
|
|
1402
|
1469
|
return Success("处理成功");
|
|
1403
|
1470
|
else
|
|
|
@@ -1657,7 +1724,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1657
|
1724
|
/// <summary>
|
|
1658
|
1725
|
/// 处理工单
|
|
1659
|
1726
|
/// </summary>
|
|
1660
|
|
- public bool DealWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont,int isover = 0, int isvisit = 0,string uncont="")
|
|
|
1727
|
+ public bool DealWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont,int isover = 0,string uncont="")
|
|
1661
|
1728
|
{
|
|
1662
|
1729
|
#region 工单处理
|
|
1663
|
1730
|
int overtime = 0, sms = 0;
|
|
|
@@ -1708,7 +1775,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1708
|
1775
|
{
|
|
1709
|
1776
|
#region 处理工单
|
|
1710
|
1777
|
model.F_State = wostate;
|
|
1711
|
|
- model.F_IsVisit = isvisit;
|
|
|
1778
|
+
|
|
1712
|
1779
|
//处理内容
|
|
1713
|
1780
|
if (!string.IsNullOrEmpty(cont))
|
|
1714
|
1781
|
model.F_DealContent += cont + ";";
|
|
|
@@ -1852,12 +1919,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1852
|
1919
|
model.F_ZL_ImprovementRequirements = input.F_ZL_ImprovementRequirements;//质量管理科-改进要求
|
|
1853
|
1920
|
model.F_ZL_CApprovalNo = input.F_ZL_CApprovalNo;//质量管理科-对应审批工作流单号
|
|
1854
|
1921
|
model.F_ZL_CJ_IsRecord = input.F_ZL_CJ_IsRecord;//质量管理科-抽检-未备案、已备案
|
|
|
1922
|
+ if (input .F_IsVisit !=null )
|
|
|
1923
|
+ {
|
|
|
1924
|
+ model.F_IsVisit = input.F_IsVisit;
|
|
|
1925
|
+ }
|
|
1855
|
1926
|
return model;
|
|
1856
|
1927
|
}
|
|
1857
|
1928
|
/// <summary>
|
|
1858
|
1929
|
/// 转派工单
|
|
1859
|
1930
|
/// </summary>
|
|
1860
|
|
- public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0,int overtime = 0, int sms = 0, int isvisit = 0)
|
|
|
1931
|
+ public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0,int overtime = 0, int sms = 0)
|
|
1861
|
1932
|
{
|
|
1862
|
1933
|
string touser = ""; string tousername = "";
|
|
1863
|
1934
|
#region 获取接收人
|
|
|
@@ -1913,7 +1984,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1913
|
1984
|
//工单完结要更新工单的状态
|
|
1914
|
1985
|
model.F_DealBy = touser;
|
|
1915
|
1986
|
model.F_State = wostate;
|
|
1916
|
|
- model.F_IsVisit = isvisit;
|
|
1917
|
1987
|
//处理内容
|
|
1918
|
1988
|
if (!string.IsNullOrEmpty(cont))
|
|
1919
|
1989
|
model.F_DealContent += cont + ";";
|