| | |
| | | ",HSafeDays=" + omodel.HSafeDays + |
| | | ",HErrWarDays=" + omodel.HErrWarDays + |
| | | ",HErrWarQtys=" + omodel.HErrWarQtys + |
| | | ",HUSEORGID=" + omodel.HUSEORGID + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | //DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sc_MouldMaintainRuleBillMain" + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays,HErrWarQtys" + |
| | | ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays,HErrWarQtys,HUSEORGID,HCREATEORGID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays + "," + omodel.HErrWarQtys + |
| | | ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays + "," + omodel.HErrWarQtys + "," + omodel.HUSEORGID + "," + omodel.HCREATEORGID + |
| | | ") "); |
| | | ////æå
¥å表 |
| | | foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater) |
| | |
| | | public Int64 HSafeDays; //ä¿å
»å®å
¨å¤©æ° |
| | | public Int64 HErrWarDays; //ä¿å
»é¢è¦å¤©æ° |
| | | public Int64 HErrWarQtys; //ä¿å
»é¢è¦æ¬¡æ° |
| | | public Int64 HUSEORGID; //使ç¨ç»ç» |
| | | public Int64 HCREATEORGID; //å建ç»ç» |
| | | } |
| | | } |
| | |
| | | ",HTypeCount= '" + HTypeCount + "'" + |
| | | ",HDeptNumber='" + HDeptNumber + "'" + |
| | | ",HSNo= " + HSNo + |
| | | ",HUseFlag= " + HUseFlag + |
| | | ",HUseFlag= '" + HUseFlag + "'" + |
| | | ",HLevel= " + HLevel + |
| | | ",HEndFlag= '" + HEndFlag + "'" + |
| | | ",HTProcessFlag= '" + HTProcessFlag + "'" + |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·ä¿å
»è§ç¨ä½åº/åä½åºåè½ |
| | | [Route("Sc_MouldMaintainRuleBill/DeleteSc_MouldMaintainRule")] |
| | | [HttpGet] |
| | | public object DeleteGy_Mould(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBill_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; |
| | | } |
| | | DAL.ClsSc_MouldMaintainRuleBill oBill = new DAL.ClsSc_MouldMaintainRuleBill(); |
| | | ClsPub.CurUserName = user; |
| | | |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 ä½åº 2 åä½åº |
| | | if (Type == 1) |
| | | { |
| | | //ä½åºåæ§å¶ |
| | | string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | string sql = ""; |
| | | sql = "exec h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldMaintainRuleBill_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; |
| | | 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; |
| | | } |
| | | |
| | | if (!oBill.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ä½åºåæ§å¶ |
| | | sql = "exec h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldMaintainRuleBill_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; |
| | | 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; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (!oBill.AbandonCancelltion(int.Parse(HInterID), 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) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ§è¡å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·ä¿å
»è§ç¨ æä»¶å¯¼å
¥ä¿å |
| | | #region å¨å
·ä¿å
»è§ç¨ æä»¶ä¸ä¼ |
| | | [Route("Sc_MouldMaintainRuleBill/Sc_MouldMaintainRuleBill_Excel")] |