| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList_Query where 1 = 1 " + sWhere + " order by 单据号 desc ", "h_v_Sc_ProcessExchangeBillList_Query"); |
| | | ds = oCN.RunProcReturn("select top 3000 * from h_v_Sc_ProcessExchangeBillList_Query where 1 = 1 " + sWhere + " order by 单据号 desc ", "h_v_Sc_ProcessExchangeBillList_Query"); |
| | | |
| | | |
| | | //添加列名 |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-045]没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | //if (hdeleteman != "") |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_Gy_RoutingBill_BeforeDelCtrl " + lngBillKey + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | |
| | | oCN.RunProc("delete from Gy_RoutingBillmain where HInterID=" + lngBillKey); |
| | | oCN.RunProc("delete from Gy_RoutingBillSub where HInterID=" + lngBillKey); |
| | | |
| | | LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",删除工艺路线单据:" + ds.Tables[0].Rows[0]["HBillNo"].ToString()); |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "删除工艺路线单据:" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','删除单据'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //删除后控制================================================================================== |
| | | string sql2 = "exec h_p_Gy_RoutingBill_AfterDelCtrl " + lngBillKey + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_RoutingBill_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //============================================================================================== |
| | | |
| | | |
| | | |
| | | |
| | | LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",删除工艺路线单据:" + HBillNo); |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "删除工艺路线单据:" + HBillNo + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','删除单据'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.Message = "[0000-1-037]Sucess!"; |
| | | |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-010]没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | |
| | | //审核前控制========================================= |
| | | string sql1 = "exec h_p_Gy_RoutingBill_BeforeCheckCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | //审核工艺路线 |
| | | oCN.RunProc(" Update Gy_RoutingBillMain set HChecker='" + user + "',HCheckDate=getdate(),HBillStatus=2 Where HInterID=" + HInterID.ToString()); |
| | | |
| | | |
| | | //审核后控制========================================= |
| | | string sql2 = "exec h_p_Gy_RoutingBill_AfterCheckCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_AfterCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:审核后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | |
| | | } |
| | | } |
| | | //反审核单据 |
| | | if (BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | if (BillOld.AbandonCheck(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_RoutingBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | //DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl"); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region 报表查看权限控制 |
| | | /// <summary> |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-010]Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |