| | |
| | | } |
| | | if (bResult) |
| | | { |
| | | //自动审核设置 |
| | | if (refSav == "Add") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID |
| | | //系统参数 自动审核 |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.OA_ErrMsgBackSignBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | objJsonResult.Verify = "Y"; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | if (refSav == "Update") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | |
| | | } |
| | | if (bResult) |
| | | { |
| | | |
| | | //自动审核设置 |
| | | if (refSav == "Add") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID |
| | | //系统参数 自动审核 |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.OA_ErrMsgBackHandleBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | objJsonResult.Verify = "Y"; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | if (refSav == "Update") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | |
| | | } |
| | | if (bResult) |
| | | { |
| | | |
| | | //自动审核设置 |
| | | if (refSav == "Add") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID |
| | | //系统参数 自动审核 |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.OA_ErrMsgBackCheckBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | objJsonResult.Verify = "Y"; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | if (refSav == "Update") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | |
| | | concatenatedNames = string.Join(",", HNames); |
| | | HDescription = HDescription + "--已处理"; |
| | | } |
| | | else if (HHandleEmpID == 4)//报工台 异常验收 驳回按钮 将消息 发送给 发送人,接收人 |
| | | { |
| | | //获取发送人 接收人 |
| | | string HReceiveMan = HCopyMan; |
| | | string sql1 = "select HDingDingUserID 钉钉id from Gy_Czygl where Czymc in ('" + HSendMan + "','" + HReceiveMan + "')"; |
| | | ds = oCN.RunProcReturn(sql1, "Gy_Czygl"); |
| | | List<string> HNames = new List<string>(); |
| | | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | string HName = ds.Tables[0].Rows[i]["钉钉id"].ToString(); |
| | | HNames.Add(HName); |
| | | |
| | | } |
| | | concatenatedNames = string.Join(",", HNames); |
| | | HDescription = HDescription + "--'"+ HSendMan + "'已驳回本次处理,请'"+ HReceiveMan + "'重新处理"; |
| | | } |
| | | else |
| | | { |
| | | //查询指派处理人 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 报工台 异常验收 驳回处理单功能 |
| | | [Route("Sc_MESTransFerWorkBill/BHOA_ErrMsgBackHandleBillDismiss")] |
| | | [HttpGet] |
| | | public object BHOA_ErrMsgBackHandleBillDismiss(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | string sql = "select HErrMsgBackInterID,HErrMsgBackEntryID,HSendMan,HDescription,HReceiveMan from OA_ErrMsgBackHandleBillMain where HInterID=" + HInterID; |
| | | //更新异常反馈处理单作废 |
| | | oCN.RunProc("update OA_ErrMsgBackHandleBillMain set HBillStatus=4, HDeleteDate=GETDATE(),HDeleteMan='" + user + "' where HInterID="+ HInterID); |
| | | DataSet dt = oCN.RunProcReturn(sql, "OA_ErrMsgBackHandleBillMain"); |
| | | |
| | | //反馈处理单保存后,更新异常反馈单的状态 |
| | | string sql1 = "update OA_ErrMsgBackBillMain set HBillStatus='9' where HInterID='" + dt.Tables[0].Rows[0]["HErrMsgBackInterID"].ToString() + "' "; |
| | | oCN.RunProc(sql1); |
| | | _ = SendDingDingAsync(dt.Tables[0].Rows[0]["HSendMan"].ToString(), 4, dt.Tables[0].Rows[0]["HDescription"].ToString(), dt.Tables[0].Rows[0]["HReceiveMan"].ToString()); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |