| | |
| | | ",HLevel,HEndFlag,HStopflag,HRemark" + |
| | | ",HMakeTime,HMakeEmp,HCREATEORGID,HUSEORGID) " + |
| | | " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() + |
| | | ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','" + oModel.HMakeTime + "','" + oModel.HMakeEmp + "'," + oModel.HCREATEORGID + "," + oModel.HUSEORGID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "',getdate(),'" + oModel.HMakeEmp + "'," + oModel.HCREATEORGID + "," + oModel.HUSEORGID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | |
| | | } |
| | | |
| | | |
| | | #region [éè¿ æºååå· è¿è¡ æ¥ææ£éª] |
| | | /// <summary> |
| | | /// éè¿ æºååå· è¿è¡ æ¥ææ£éª |
| | | /// </summary> |
| | | /// <param name="HBarCode">æºååå·</param> |
| | | /// <param name="HOrgID">ç»ç»ID</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_QCStockInCheckBill_Fast/BarCode_Json_SourceBillNo")] |
| | | [HttpGet] |
| | | public object BarCode_Json_SourceBillNo(string HBarCode, Int64 HOrgID) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet Dss; |
| | | |
| | | // è·åéè¶äºä¸å¯¹åºçç»ç» |
| | | Dss = oCN.RunProcReturn(" select HNumber from h_v_CLD_ORGANIZATIONSList where HItemID= " + HOrgID, "h_v_CLD_ORGANIZATIONSList"); |
| | | string HOrgNumber = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HNumber"]); |
| | | |
| | | // æ ¹æ®éè´è®¢åå·è·å æ¶æéç¥å å ç©æä¿¡æ¯ |
| | | DataSet Dss2; |
| | | Dss2 = oCn.RunProcReturn(" select fid,FMATERIALID,FENTRYID,FBILLNO from h_v_RECEIVEQuery where FSRCBILLNO= '" + HBarCode + "'", "h_v_RECEIVEQuery"); |
| | | |
| | | if(Dss2 == null || Dss2.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string HPOStockInBillNo = Dss2.Tables[0].Rows[0]["FBILLNO"].ToString(); |
| | | |
| | | |
| | | |
| | | DataSet ds; |
| | | ds = oCN.RunProcReturn("select * from h_v_QCStockInCheckBill_Json_SourceBill where HSourceBillNo ='" + HPOStockInBillNo.ToString() + "'", "h_v_QCStockInCheckBill_Json"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | [Route("Kf_QCStockInCheckBill_Fast/BarCode_Json")] |
| | | [HttpGet] |
| | |
| | | " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" + |
| | | ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() + |
| | | ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" + |
| | | ",'" + HCheckResult.ToString() + "','', '','',''" + |
| | | ",'" + HCheckResult.ToString() + "','', '','','','" + |
| | | ") "); |
| | | //çäº§æ±æ¥åå表 |
| | | oCN.RunProc("Insert into QC_POStockInCheckBillSub " + |
| | |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | DataSet ds_ = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_DotCheck where HNumber = '{HNumber}' and HItemID !={HItemID} |
| | | ", "Gy_DotCheck"); |
| | | |
| | | if(ds_.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败 代ç ä¸å¯éå¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_DotCheck_BeforeSaveCtrl " + msg3 + ",'1'", "h_p_Gy_DotCheck_BeforeSaveCtrl"); |
| | |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | DataSet ds_ = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_DotCheck where HNumber = '{HNumber}' |
| | | ", "Gy_DotCheck"); |
| | | |
| | | if (ds_.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败 代ç ä¸å¯éå¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_DotCheck_BeforeSaveCtrl " + msg3 + ",'1'", "h_p_Gy_DotCheck_BeforeSaveCtrl"); |
| | |
| | | } |
| | | |
| | | //æ¥è¯¢æ°æ®ä¸æ¯å¦åå¨éå¤ä»£ç |
| | | ds = oCN.RunProcReturn("select * from Gy_DotCheckItemClass where HStopflag = 0 and HNumber = '" + oItem.HNumber.Trim() + "'", "Gy_DotCheckItemClass"); |
| | | ds = oCN.RunProcReturn("select TOP 1 HItemID from Gy_DotCheckItemClass where HStopflag = 0 and HNumber = '" + oItem.HNumber.Trim() + "'and HItemID != " + HItemID, "Gy_DotCheckItemClass"); |
| | | |
| | | if(ds.Tables[0].Rows[0] != null && ds.Tables[0].Rows[0]["HItemID"] != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç¹æ£é¡¹ç®å类代ç éå¤ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¾å°ç代ç |
| | | string sShortNumber; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¹æ£é¡¹ç®åç±»ç¦ç¨ãåç¦ç¨ |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsStop">ç¦ç¨(0),åç¦ç¨(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_DotCheckItemClass/StopGy_DotCheckItemClass")] |
| | | [HttpGet] |
| | | public object StopGy_DotCheckItemClass(string HInterID, int IsStop, string user) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_DotCheckItemClass_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ClsPub.CurUserName = user; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 åç¦ç¨ 0 ç¦ç¨ |
| | | if (IsStop == 0) |
| | | { |
| | | //夿忮æ¯å¦å·²ç»å®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from Gy_DotCheckItemClass where HItemID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"] != null && ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç¦ç¨!ä¸è½å次ç¦ç¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ç¦ç¨åæ® |
| | | if (!BillOld.StopByHItemID(Int64.Parse(HInterID), user, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»ç¦ç¨ |
| | | DataSet ds; |
| | | string sql = "select * from Gy_DotCheckItemClass where HItemID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"] == null || ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªç¦ç¨!ä¸éè¦åç¦ç¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸åæ® |
| | | if (!BillOld.AbandonStopByHItemID(Int64.Parse(HInterID),user, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åç¦ç¨å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥æè
åç¦ç¨å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¹æ£é¡¹ç®åç±» æä»¶å¯¼å
¥ä¿å |
| | | #region ç¹æ£é¡¹ç®åç±» æä»¶ä¸ä¼ |
| | | [Route("Gy_DotCheckItemClass/Gy_DotCheckItemClass_Excel")] |
| | |
| | | } |
| | | |
| | | //æ¥è¯¢æ°æ®ä¸æ¯å¦åå¨éå¤ä»£ç |
| | | ds = oCN.RunProcReturn("select * from Gy_DotCheckItemMethod where HStopflag =0 and HNumber = '" + oItem.HNumber.Trim() + "'", "Gy_DotCheckItemMethod"); |
| | | ds = oCN.RunProcReturn("select top 1 HItemID from Gy_DotCheckItemMethod where HStopflag =0 and HNumber = '" + oItem.HNumber.Trim() + "' and HItemID != " + HItemID, "Gy_DotCheckItemMethod"); |
| | | |
| | | if (ds.Tables[0].Rows[0] != null && ds.Tables[0].Rows[0]["HItemID"] != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç¹æ£é¡¹ç®å类代ç éå¤ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¾å°ç代ç |
| | | string sShortNumber; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¹æ£æ¹æ³åç±»ç¦ç¨ãåç¦ç¨ |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsStop">ç¦ç¨(0),åç¦ç¨(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_DotCheckItemMethod/StopGy_DotCheckItemMethod")] |
| | | [HttpGet] |
| | | public object StopGy_DotCheckItemMethod(string HInterID, int IsStop, string user) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_DotCheckItemMethod_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ClsPub.CurUserName = user; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 åç¦ç¨ 0 ç¦ç¨ |
| | | if (IsStop == 0) |
| | | { |
| | | //夿忮æ¯å¦å·²ç»ç¦ç¨ |
| | | DataSet ds; |
| | | string sql = "select * from Gy_DotCheckItemMethod where HItemID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"] != null && ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç¦ç¨!ä¸è½å次ç¦ç¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ç¦ç¨åæ® |
| | | if (!BillOld.StopByHItemID(Int64.Parse(HInterID), user, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»ç¦ç¨ |
| | | DataSet ds; |
| | | string sql = "select * from Gy_DotCheckItemMethod where HItemID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"] == null || ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªç¦ç¨!ä¸éè¦åç¦ç¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸åæ® |
| | | if (!BillOld.AbandonStopByHItemID(Int64.Parse(HInterID), user, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åç¦ç¨å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥æè
åç¦ç¨å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region ç¹æ£æ¹æ³ æä»¶å¯¼å
¥ä¿å |
| | | #region ç¹æ£æ¹æ³ æä»¶ä¸ä¼ |
| | | [Route("Gy_DotCheckItemMethod/Gy_DotCheckItemMethod_Excel")] |
| | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | |
| | | List<Models.ClsGy_Maintain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Maintain>>(msg2); |
| | | |
| | | var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Maintain>>(msg2); |
| | | string HNumber = list[0].HNumber; |
| | | string HName = list[0].HName; |
| | | string HShortNumber = list[0].HNumber; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // æ°å¢æ¶å¤ææ¯å¦åå¨éå¤ä»£ç |
| | | var dsRepeatCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_Maintain where HStopflag = 0 and HNumber = '{HNumber}' |
| | | ", "Gy_Maintain"); |
| | | |
| | | if(dsRepeatCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "代ç éå¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // 代ç é¤å»èªèº«å¤ ä¸è½éå¤ |
| | | var dsHNumberCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_Repair where HStopflag = 0 and HNumber = '{HNumber}' and HItemID != {HItemID} |
| | | ", "Gy_Repair"); |
| | | |
| | | if (dsHNumberCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Repair_BeforeSaveCtrl " + msg3 + ",'1'", "h_p_Gy_Repair_BeforeSaveCtrl"); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // 代ç ä¸è½éå¤ |
| | | var dsHNumberCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_Repair where HStopflag = 0 and HNumber = '{HNumber}' |
| | | ", "Gy_Repair"); |
| | | |
| | | if (dsHNumberCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // 代ç é¤å»èªèº«å¤ ä¸è½éå¤ |
| | | var dsHNumberCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_RepairCheck where HStopflag = 0 and HNumber = '{HNumber}' and HItemID != {HItemID} |
| | | ", "Gy_Repair"); |
| | | |
| | | if (dsHNumberCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var dsHNumberCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_RepairCheck where HStopflag = 0 and HNumber = '{HNumber}' |
| | | ", "Gy_Repair"); |
| | | |
| | | if (dsHNumberCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsGy_Maintain : DBUtility.ClsGy_Base_Ctl |
| | | public class ClsGy_Maintain : DBUtility.ClsGy_Base_Model |
| | | { |
| | | public int HItemID; |
| | | public string HNumber; //代ç |