| | |
| | | |
| | | #endregion |
| | | |
| | | #region 临时定额报表 |
| | | /// <summary> |
| | | /// 返回工艺路线列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Gy_RoutingBill/getProcPriceTypeChangeReport")] |
| | | [HttpGet] |
| | | public object getProcPriceTypeChangeReport(string sWhere, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "临时定额报表无权限查询!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_Pay_ProcPriceTypeChangeReport where 1 = 1" + sWhere + " order by hmainid desc", "h_v_Pay_ProcPriceTypeChangeReport"); |
| | | |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 临时定额报表 永久定额 |
| | | /// <summary> |
| | | /// 返回工艺路线列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Gy_RoutingBill/updateProcPriceType")] |
| | | [HttpGet] |
| | | public object updateProcPriceType(string HInterID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "临时定额报表无编辑权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("Update Gy_RoutingBillMain set HProcPriceType = '永久定额' where HInterID = " + HInterID , "Gy_RoutingBillMain"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "更改定额成功"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出现错误!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 工艺路线编辑获取数据 |
| | | [Route("Gy_RoutingBill/cx")] |
| | | [HttpGet] |