| | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackBillList order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList"); |
| | | } |
| | | else |
| | | { |
| | |
| | | A.HReceiveMan,A.HCopyMan,A.HHasten, |
| | | A.HLevel,A.HMaterName,A.HMaterModel, |
| | | B.HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate,A.HChecker,A.HCheckDate,A.HCloseMan,A.HCloseDate,A.HDeleteMan,A.HDeleteDate, |
| | | A.HSourceInterID,A.HSourceEntryID,A.HSourceBillNo,A.HSourceBillType |
| | | A.HSourceInterID,A.HSourceEntryID,A.HSourceBillNo,A.HSourceBillType, |
| | | A.HHandleEmpID,f.HName HHandleEmpName |
| | | from OA_ErrMsgBackBillMain A |
| | | inner join OA_ErrMsgBackBillSub2 B on A.HInterID=B.HInterID |
| | | left join Gy_Department D on A.HDeptID=D.HItemID |
| | | left join Gy_Employee f on A.HHandleEmpID=f.HItemID |
| | | where A.HInterID='" + HID + "' and b.HEntryID='" + HEntryID + "'"); |
| | | var dataSet = oCN.RunProcReturn(sql, "OA_ErrMsgBackBillMain"); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | |
| | | |
| | | //判断会计期是否合理 |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //int sYear = 0; |
| | | //int sPeriod = 0; |
| | | //if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = s; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | |
| | | |
| | | #region 工作联系单回复 |
| | | /// <summary> |
| | | /// 异常反馈单 |
| | | /// 工作联系单 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | |
| | | |
| | | //判断会计期是否合理 |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //int sYear = 0; |
| | | //int sPeriod = 0; |
| | | //if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = s; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 工作联系单催促 |
| | | [Route("Sc_MESTransFerWorkBill/UpdateOA_WorkLinkBillHHasten")] |
| | | [HttpGet] |
| | | public object UpdateOA_WorkLinkBillHHasten(Int64 HInterID,string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("OA_WorkLinkBill_Edit", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //HInterID数据判断 |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID小于0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | DAL.ClsOA_WorkLinkBill oBill = new DAL.ClsOA_WorkLinkBill(); //实例化单据操作类,用于进行相关操作 |
| | | //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作 |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //根据HInterID获取该单据的数据 |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已关闭!不能催促!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已作废!不能催促!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string sql = "update OA_WorkLinkBillMain set HHasten = HHasten + 1 where HInterID = " + HInterID ; |
| | | |
| | | oCN.RunProc(sql); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工作联系单根据源单ID查看是否有对应联系单 |
| | | [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListBySourceID")] |
| | | [HttpGet] |
| | | public object GetOA_WorkLinkBillListBySourceID(string HRelationInterID, string HRelationEntryID) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql = string.Format(@"select A.*,D.HName HDeptName,e.HName HEvaluateStatusName |
| | | from OA_WorkLinkBillMain A |
| | | left join Gy_Department D on A.HDeptID=D.HItemID |
| | | left join Gy_EvaluateStatus AS e ON A.HEvaluateStatusID = e.HItemID |
| | | where A.HRelationInterID='" + HRelationInterID + "' and A.HRelationEntryID= '"+ HRelationEntryID+"'"); ; |
| | | ds = oCN.RunProcReturn(sql, "OA_WorkLinkBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "false!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | } |
| | | } |