| | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | if (refSav == "Add") |
| | | { |
| | | |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (bResult) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static DataSet Get_TransFerBillList(string sWhere) |
| | | { |
| | |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_ErrMsgBackBillMain"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 异常反馈列表PDA |
| | | [Route("Sc_MESTransFerWorkBill/Get_TransFerBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_TransFerBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackBillList_PDA order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_PDA"); |
| | | } |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 异常反馈列表编辑获取数据 |
| | |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackList")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackList(string HInterID,string HEntryID, string user,int num) |
| | | public object Get_OA_ErrMsgBackList(string HInterID,string HEntryID, string user,Int64 num) |
| | | { |
| | | try |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (num == 1) //异常反馈单 |
| | | string sql = ""; |
| | | string HViewName = ""; |
| | | switch (num) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackBillList where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList"); |
| | | case 1: //异常反馈单 |
| | | sql = "select * from h_v_OA_ErrMsgBackBillList where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackBillList"; |
| | | break; |
| | | case 2://异常反馈接收单 |
| | | sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackReceiveBillMainList"; |
| | | break; |
| | | case 3://异常反馈处理单 |
| | | sql = "select * from h_v_OA_ErrMsgBackHandleBillMainList where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackHandleBillMainList"; |
| | | break; |
| | | case 10: //异常反馈单PDA |
| | | sql = "select * from h_v_OA_ErrMsgBackBillList_PDA where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackBillList_PDA"; |
| | | break; |
| | | case 11://异常反馈接收单PDA |
| | | sql = "select * from h_v_OA_ErrMsgBackReceiveBillList_PDA where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackReceiveBillList_PDA"; |
| | | break; |
| | | case 12://异常反馈处理单PDA |
| | | sql = "select * from h_v_OA_ErrMsgBackHandleBillList_PDA where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackHandleBillList_PDA"; |
| | | break; |
| | | } |
| | | else if (num==2) //异常反馈接收单 |
| | | if(sql == "") |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where hmainid = '" + HInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList"); |
| | | } |
| | | else if (num == 3) //异常反馈处理单 |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackHandleBillMainList where hmainid = '" + HInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackHandleBillMainList "); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,递入源单类型num不正确!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(sql, HViewName); |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList"); |
| | | } |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 异常反馈接收单列表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackReceiveBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackReceiveBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackReceiveBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackReceiveBillList_PDA order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_PDA"); |
| | | } |
| | | |
| | | //添加列名 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 异常反馈签到单列表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackSignBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackSignBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackSignBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackSignBillList_PDA order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackSignBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillList_PDA"); |
| | | } |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 异常反馈签到单 删除 |
| | | /// <summary> |
| | | ///参数:string HInterID。 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | #region 异常反馈处理单列表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackHandleBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackHandleBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackHandleBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackHandleBillList_PDA order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackHandleBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackHandleBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackHandleBillList_PDA"); |
| | | } |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 异常反馈处理单 删除 |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 异常反馈验收单列表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackCheckBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackCheckBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackCheckBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackCheckBillList_PDA order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackCheckBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackCheckBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackCheckBillList_PDA"); |
| | | } |
| | | |
| | | //添加列名 |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 异常反馈验收单 删除 |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackCheckBill")] |