|
|
@@ -10055,13 +10055,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
10055
|
10055
|
if (!(User.F_RoleCode == "WLDW" && iszbdw == "0"))
|
|
10056
|
10056
|
{
|
|
10057
|
10057
|
btnpc = ButtonGroup.GetButtons(dt.Rows[0]["F_WorkState"].ToString(), User.F_RoleCode.ToUpper(),
|
|
10058
|
|
- dt.Rows[0]["F_IsResult"].ToString(), iszbdw, ispd, 0);
|
|
|
10058
|
+ dt.Rows[0]["F_IsResult"].ToString(), iszbdw, ispd, 0, dt.Rows[0]["F_InfoSource"].ToString());
|
|
10059
|
10059
|
}
|
|
|
10060
|
+
|
|
10060
|
10061
|
}
|
|
10061
|
10062
|
else
|
|
10062
|
10063
|
{
|
|
10063
|
10064
|
btnpc = ButtonGroup.GetButtons(dt.Rows[0]["F_WorkState"].ToString(),
|
|
10064
|
|
- User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsResult"].ToString(), "0", "", 0);
|
|
|
10065
|
+ User.F_RoleCode.ToUpper(), dt.Rows[0]["F_IsResult"].ToString(), "0", "", 0, dt.Rows[0]["F_InfoSource"].ToString());
|
|
|
10066
|
+ }
|
|
|
10067
|
+ if (dt.Rows[0]["F_InfoSource"].ToString()=="2580"&& dt.Rows[0]["F_WorkState"].ToString()=="7")
|
|
|
10068
|
+ {
|
|
|
10069
|
+ var butt = btnpc.Find(c => c.key == ButtonGroup.forceend().key);
|
|
|
10070
|
+ if (butt != null)
|
|
|
10071
|
+ btnpc.Remove(butt);
|
|
10065
|
10072
|
}
|
|
10066
|
10073
|
|
|
10067
|
10074
|
|
|
|
@@ -12692,23 +12699,48 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
12692
|
12699
|
{
|
|
12693
|
12700
|
using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
|
|
12694
|
12701
|
{
|
|
12695
|
|
- #region 保存工单信息
|
|
12696
|
|
- Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
12697
|
|
- keyValuePairs.Add("F_WorkState", 0);
|
|
12698
|
|
- modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.neworder;// 0;
|
|
12699
|
|
- //modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.audit;// 0;
|
|
12700
|
|
- keyValuePairs.Add("F_IsResult", 0);
|
|
12701
|
|
-
|
|
12702
|
|
- keyValuePairs.Add("F_IsReturn", 1);
|
|
12703
|
|
- // modelT_Bus_WorkOrder.F_IsReturn = 1;
|
|
12704
|
|
- keyValuePairs.Add("F_AssignUser", User.F_UserCode);
|
|
12705
|
|
- // modelT_Bus_WorkOrder.F_AssignUser = User.F_UserCode;
|
|
12706
|
|
- keyValuePairs.Add("F_AssignTime", DateTime.Now);
|
|
12707
|
|
- //modelT_Bus_WorkOrder.F_AssignTime = DateTime.Now;
|
|
12708
|
|
- keyValuePairs.Add("F_Prevaricate", modelT_Bus_WorkOrder.F_Prevaricate + 1);
|
|
|
12702
|
+ var Examine = new BLL.T_Bus_ToExamine().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
|
|
|
12703
|
+ if (Examine!=null && Examine.F_Type==2)
|
|
|
12704
|
+
|
|
|
12705
|
+ {
|
|
|
12706
|
+ #region 保存工单信息
|
|
|
12707
|
+ Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
|
12708
|
+ keyValuePairs.Add("F_WorkState", 6);
|
|
|
12709
|
+ modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.dealed;
|
|
|
12710
|
+
|
|
|
12711
|
+ keyValuePairs.Add("F_Prevaricate", modelT_Bus_WorkOrder.F_Prevaricate + 1);
|
|
|
12712
|
+
|
|
|
12713
|
+ workorderBLL.UpdateWorkOrder(modelT_Bus_WorkOrder.F_Id, keyValuePairs);
|
|
|
12714
|
+ #endregion
|
|
|
12715
|
+ }
|
|
|
12716
|
+ else
|
|
|
12717
|
+ {
|
|
|
12718
|
+ #region 保存工单信息
|
|
|
12719
|
+ Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
|
12720
|
+ keyValuePairs.Add("F_WorkState", 0);
|
|
|
12721
|
+ modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.neworder;// 0;
|
|
|
12722
|
+ //modelT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.audit;// 0;
|
|
|
12723
|
+ keyValuePairs.Add("F_IsResult", 0);
|
|
|
12724
|
+
|
|
|
12725
|
+ keyValuePairs.Add("F_IsReturn", 1);
|
|
|
12726
|
+ // modelT_Bus_WorkOrder.F_IsReturn = 1;
|
|
|
12727
|
+ keyValuePairs.Add("F_AssignUser", User.F_UserCode);
|
|
|
12728
|
+ // modelT_Bus_WorkOrder.F_AssignUser = User.F_UserCode;
|
|
|
12729
|
+ keyValuePairs.Add("F_AssignTime", DateTime.Now);
|
|
|
12730
|
+ //modelT_Bus_WorkOrder.F_AssignTime = DateTime.Now;
|
|
|
12731
|
+ keyValuePairs.Add("F_Prevaricate", modelT_Bus_WorkOrder.F_Prevaricate + 1);
|
|
|
12732
|
+
|
|
|
12733
|
+ workorderBLL.UpdateWorkOrder(modelT_Bus_WorkOrder.F_Id, keyValuePairs);
|
|
|
12734
|
+ #endregion
|
|
|
12735
|
+
|
|
|
12736
|
+ }
|
|
|
12737
|
+
|
|
|
12738
|
+
|
|
|
12739
|
+
|
|
|
12740
|
+
|
|
|
12741
|
+
|
|
|
12742
|
+
|
|
12709
|
12743
|
|
|
12710
|
|
- workorderBLL.UpdateWorkOrder(modelT_Bus_WorkOrder.F_Id, keyValuePairs);
|
|
12711
|
|
- #endregion
|
|
12712
|
12744
|
|
|
12713
|
12745
|
#region 插入批示记录
|
|
12714
|
12746
|
//批示记录
|
|
|
@@ -13773,7 +13805,43 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
13773
|
13805
|
return Error("权限不足");
|
|
13774
|
13806
|
}
|
|
13775
|
13807
|
}
|
|
|
13808
|
+ public ActionResult ReturnStatistics(string workorderid, int state=0)
|
|
|
13809
|
+ {
|
|
|
13810
|
+ if (string.IsNullOrEmpty(workorderid))
|
|
|
13811
|
+ return Error("请选择工单");
|
|
|
13812
|
+ var model = workorderBLL.GetModel(workorderid);
|
|
|
13813
|
+ var assign = new BLL.T_Bus_AssignedInfo().GetNewModelByWorkOrderID (workorderid);
|
|
|
13814
|
+ if (model !=null && assign!=null )
|
|
|
13815
|
+ {
|
|
|
13816
|
+ assign.F_IsPerform = state;
|
|
|
13817
|
+ new BLL.T_Bus_AssignedInfo().Update(assign);
|
|
|
13818
|
+ #region 插入操作记录
|
|
|
13819
|
+ Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
|
13820
|
+ oper.F_WorkOrderId = model.F_WorkOrderId;
|
|
|
13821
|
+ oper.F_AssignedId = assign.F_Id ;
|
|
|
13822
|
+ oper.F_State = model.F_WorkState;
|
|
|
13823
|
+ string userinfo = User.depname + "(" + User.F_UserCode + ")";
|
|
|
13824
|
+ if (state==1)
|
|
|
13825
|
+ oper.F_Message = userinfo + "进行了退回统计";
|
|
|
13826
|
+ else
|
|
|
13827
|
+ oper.F_Message = userinfo + "撤销了退回统计";
|
|
|
13828
|
+ oper.F_CreateUser = User.F_UserCode;
|
|
|
13829
|
+ oper.F_CreateTime = DateTime.Now;
|
|
|
13830
|
+ oper.F_IsDelete = 0;
|
|
|
13831
|
+
|
|
|
13832
|
+ operBLL.Add(oper);
|
|
|
13833
|
+
|
|
|
13834
|
+ //推送消息表
|
|
|
13835
|
+ #endregion
|
|
|
13836
|
+ return Success ("统计成功");
|
|
13776
|
13837
|
|
|
|
13838
|
+ }
|
|
|
13839
|
+ else
|
|
|
13840
|
+ {
|
|
|
13841
|
+ return Error("工单不存在或未交办");
|
|
|
13842
|
+ }
|
|
|
13843
|
+
|
|
|
13844
|
+ }
|
|
13777
|
13845
|
|
|
13778
|
13846
|
/// <summary>
|
|
13779
|
13847
|
/// 审核工单
|