1
zrg
1 天以前 c4c02944532a9bfda6de9a0cd85a9dfa631ed003
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -7534,6 +7534,22 @@
                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
            {
                //查询指派处理人
@@ -7917,5 +7933,38 @@
            }
        }
        #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
    }
}