From 0502297816830e49fa767c2c7762fd1c0b99ee45 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期二, 10 九月 2024 10:02:08 +0800 Subject: [PATCH] 新增添康到货确认模块;条码生成模块添康科技客户只加载批次条码类型 --- WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 411 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 397 insertions(+), 14 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 7963b8a..5d82ab6 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -13,6 +13,7 @@ using System.Windows.Forms; using WebAPI.Models; using WebAPI.Service; +using System.Text.RegularExpressions; namespace WebAPI.Controllers { @@ -21,7 +22,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); public DBUtility.ClsPub.Enum_BillStatus BillStatus; - + public string sWhere = ""; private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; @@ -113,6 +114,233 @@ return objJsonResult; } } + + #region 鐗╂枡鏍规嵁鍒嗙被鑾峰彇鏈�澶х墿鏂欑紪鐮� + [Route("Gy_Material/getMaxNum")] + [HttpGet] + public object getMaxNum(int HMaterTypeID, string user, string Organization) + { + try + { + List<object> columnNameList = new List<object>(); + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_Material", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (HMaterTypeID == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁閫夋嫨鍏蜂綋鍒嗙被锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + ds = oCN.RunProcReturn(@"select * from h_v_Gy_MaterialList where 缁勭粐鍚嶇О='" + Organization + "'" + "and HMaterTypeID = '"+ HMaterTypeID + "'" + " order by 鐗╂枡浠g爜 desc", "h_v_Gy_MaterialList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "娌℃湁鎵惧埌璇ュ垎绫荤殑鐗╂枡缂栫爜璇蜂娇鐢ㄦ櫘閫氭柊澧�"; + objJsonResult.data = null; + return objJsonResult; + } + string HNumber = ds.Tables[0].Rows[0]["鐗╂枡浠g爜"].ToString(); + // 浣跨敤姝e垯琛ㄨ揪寮忔壘鍒版暟瀛楅儴鍒� (?<=\D)鏄竴涓浂瀹芥柇瑷�锛岃〃绀哄墠闈㈢殑瀛楃涓嶆槸鏁板瓧 (\d+)$琛ㄧず鍚庨潰璺熺潃涓�杩炰覆瀛楃涓茬煡閬撴湯灏� + Match match = Regex.Match(HNumber, @"(?<=\D)(\d+)$"); + if (match.Success) + { + string prefix = HNumber.Substring(0, HNumber.Length - match.Length); // 鎻愬彇鍓嶇紑 + int number = int.Parse(match.Value); // 瑙f瀽鏁板瓧 + // 鏁板瓧+1 + number++; + // 鏍煎紡鍖栨暟瀛楋紝淇濇寔鍘熼暱搴� + string formattedNumber = number.ToString().PadLeft(match.Length, '0'); + // 閲嶆柊缁勫悎瀛楃涓� + string result = prefix + formattedNumber; + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "success"; + objJsonResult.data = result; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "姝ゅ垎绫荤墿鏂欑紪鐮佹牸寮忔湁璇�"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鑾峰彇鐗╂枡绮惧害閫氳繃id + [Route("Gy_Material/getDecByID")] + [HttpGet] + public object getDecByID(int HMaterID) + { + try + { + if(HMaterID == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁閫夋嫨鐗╂枡"; + objJsonResult.data = null; + return objJsonResult; + } + ds = oCN.RunProcReturn(@"select HQtyDec,HPriceDec,HMoneyDec from Gy_Material where HitemID=" + HMaterID , "Gy_Material"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "娌℃湁鎵惧埌璇ョ墿鏂欑紪鐮�"; + objJsonResult.data = null; + return objJsonResult; + } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Success"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鑾峰彇椤圭洰鍙� + [Route("Gy_Material/Get_HProject")] + [HttpGet] + public object Get_HProject() + { + try + { + DataSet oDs = new DataSet(); + //========== + oDs = oCN.RunProcReturn("select top(20) HInterID as HItemID,HProName HName from PM_ProjectBillMain", "PM_ProjectBillMain"); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇鎴愬姛锛�"; + objJsonResult.data = oDs.Tables[0]; + return objJsonResult; ; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + /// <summary> + /// 鑾峰彇椤圭洰鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Gy_Material/GetProjectGroupList_Json")] + [HttpGet] + public object GetProjectGroupList_Json(string Unit) + { + if (Unit != "" && Unit != null) + { + sWhere = sWhere + " and ( HBillNo like '%" + Unit + "%' or HProName like '%" + Unit + "%' ) "; + } + + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("Select HInterID,HBillNo 椤圭洰浠g爜,HProName 椤圭洰缁� from PM_ProjectBillMain where HCloseType = 0 Order by HInterID ", "PM_ProjectBillMain"); + } + else + { + string sql1 = "Select HInterID,HBillNo 椤圭洰浠g爜,HProName 椤圭洰缁� from PM_ProjectBillMain where HCloseType = 0 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "PM_ProjectBillMain"); + } + + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇鎴愬姛!"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇澶辫触" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #region 鑾峰彇浜嬩笟閮� + [Route("Gy_Material/Get_Gy_Division")] + [HttpGet] + public object Get_Gy_Division(string HOrgID) + { + try + { + DataSet oDs = new DataSet(); + //========== + oDs = oCN.RunProcReturn(" select HItemID,HName from Gy_Division", "Gy_Division"); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇鎴愬姛锛�"; + objJsonResult.data = oDs.Tables[0]; + return objJsonResult; ; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + /// <summary> /// 鐗╂枡璁剧疆鑾峰彇淇℃伅 @@ -842,6 +1070,7 @@ { try { + List<object> columnNameList = new List<object>(); //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Query", 1, false, user)) { @@ -852,14 +1081,23 @@ return objJsonResult; } - string sql1 = "select top 1000 * from h_v_IF_BarCodeBillList where 1 = 1 "; + string sql1 = "select top 5000 * from h_v_IF_BarCodeBillList where 1 = 1 "; string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList"); + + //娣诲姞鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception e) @@ -938,7 +1176,18 @@ objJsonResult.data = null; return objJsonResult; } - + + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + Ds = oCN.RunProcReturn("Select * from h_v_IF_BarCodeBillList Where HItemID in (" + HInterID + ")", "h_v_IF_BarCodeBillList"); if (Ds.Tables[0].Rows.Count != 0) { @@ -1145,6 +1394,34 @@ } #endregion + #region[鍣ㄥ叿妗f缂栬緫鏃惰幏鍙栧瓙琛ㄦ暟鎹甝 + [Route("Gy_MouldFileMain/Gy_MouldFileSubDetai")] + [HttpGet] + public object Gy_MouldFileSubDetai(long HInterID) + { + try + { + List<DataTable> tableList = new List<DataTable>(); + ds = oCN.RunProcReturn("select a.*,b.HBillNo from Gy_MouldFileSub_MaintainRule AS a left join Sc_MouldMaintainRuleBillMain as b on b.HInterID = a.HMaintainRuleID where a.HInterID = " + HInterID, "Gy_MouldFileBill_MaintainRule"); + tableList.Add(ds.Tables[0]); + ds = oCN.RunProcReturn("select a.*,b.HBillNo from Gy_MouldFileSub_DotCheckRule AS a left join Sc_MouldDotCheckRuleBillMain as b on b.HInterID = a.HDotCheckRuleID where a.HInterID = " + HInterID, "Gy_MouldFileBill_DotCheckRule"); + tableList.Add(ds.Tables[0]); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = ""; + objJsonResult.data = tableList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion /// <summary> /// 鏂板妯″叿妗f-淇濆瓨鎸夐挳 ///鍙傛暟锛歴tring sql銆� @@ -1171,10 +1448,9 @@ return objJsonResult; } //淇濆瓨涓昏〃 - objJsonResult = AddBillMain(msg2); + objJsonResult = AddBillMain(msg1); if (objJsonResult.code == "0") { - oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = objJsonResult.Message; @@ -1188,8 +1464,15 @@ return objJsonResult; } - public json AddBillMain(string msg2) + public json AddBillMain(string msg1) { + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string msg3 = sArray[1].ToString();//妯″潡鏉冮檺 + string msg4 = sArray[2].ToString();//褰撳墠浜� + string msg5 = sArray[3].ToString();//瀛愯〃鏁版嵁 + string msg6 = sArray[4].ToString();//瀛愯〃1鏁版嵁 + string msg7 = sArray[5].ToString();//瀛愯〃2鏁版嵁 try { msg2 = "[" + msg2.ToString() + "]"; @@ -1227,6 +1510,7 @@ long HSPID = mainList[0].HSPID; Double HDesignLife = mainList[0].HDesignLife; Double HUseLife = mainList[0].HUseLife; + Double HInitLife = mainList[0].HInitLife;//涓婄嚎鍒濆鍖栧鍛� Double HLeaveLife = mainList[0].HLeaveLife; Double HProdQty = mainList[0].HProdQty; Double HProdWeight = mainList[0].HProdWeight; @@ -1244,7 +1528,8 @@ int HNowSupTypeID = mainList[0].HNowSupTypeID; int HMadeSupID = mainList[0].HMadeSupID; string HMouldClass = mainList[0].HMouldClass; - + int HNowWHID = mainList[0].HNowWHID; + int HNowSPID = mainList[0].HNowSPID; //涓昏〃 oCN.RunProc("Insert Into Gy_MouldFileMain " + @@ -1257,7 +1542,7 @@ ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" + ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" + ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" + - ",HMouldClass) " + + ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " + " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" + ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" + @@ -1267,8 +1552,7 @@ "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty + "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" + ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID + - ",'"+ HMouldClass + "') "); - + ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') "); //瀛愯〃 oCN.RunProc("Insert into Gy_MouldFileSub " + @@ -1278,6 +1562,8 @@ " values('" + HInterID + "',0,''" + ",0,0,'','',0,0 " + ") "); + + objJsonResult = AddBillSub(msg5,msg6,msg7,HInterID, HBillNo); if (objJsonResult.code == "0") { @@ -1296,6 +1582,7 @@ } catch (Exception e) { + oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception锛�" + e.ToString(); @@ -1320,6 +1607,9 @@ string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString();//妯″潡鏉冮檺 string msg4 = sArray[2].ToString();//褰撳墠浜� + string msg5 = sArray[3].ToString();//瀛愯〃鏁版嵁 + string msg6 = sArray[4].ToString();//瀛愯〃2鏁版嵁 + string msg7 = sArray[5].ToString();//瀛愯〃3鏁版嵁 try { if (!DBUtility.ClsPub.Security_Log(msg3, 1, false, msg4)) @@ -1369,6 +1659,7 @@ long HSPID = mainList[0].HSPID; Double HDesignLife = mainList[0].HDesignLife; Double HUseLife = mainList[0].HUseLife; + Double HInitLife = mainList[0].HInitLife; Double HLeaveLife = mainList[0].HLeaveLife; Double HProdQty = mainList[0].HProdQty; Double HProdWeight = mainList[0].HProdWeight; @@ -1386,6 +1677,8 @@ int HNowSupTypeID = mainList[0].HNowSupTypeID; int HMadeSupID = mainList[0].HMadeSupID; string HMouldClass = mainList[0].HMouldClass; + int HNowWHID = mainList[0].HNowWHID; + int HNowSPID = mainList[0].HNowSPID; //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCN.BeginTran(); @@ -1440,13 +1733,21 @@ ",HProdWeight=" + HProdWeight.ToString() + ",HBarCode='" + HBarCode.ToString() + "'" + ",HMadeSupID=" + HMadeSupID + - " where HInterID=" + HInterID.ToString()); + ",HNowWHID=" + HNowWHID + + ",HNowSPID=" + HNowSPID + + ",HInitLife='" + HInitLife + + "' where HInterID=" + HInterID.ToString()); //淇敼瀛愰」鐩唬鐮� //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //灏嗕笂绾� 涓洪潪鏈骇 // oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo); - // + + oCN.RunProc("delete from Gy_MouldFileSub_SubMater where HInterID='" + HInterID + "'"); + oCN.RunProc("delete from Gy_MouldFileSub_MaintainRule where HInterID='" + HInterID + "'"); + oCN.RunProc("delete from Gy_MouldFileSub_DotCheckRule where HInterID='" + HInterID + "'"); + objJsonResult = AddBillSub(msg5, msg6, msg7, HInterID, HBillNo); + oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1465,6 +1766,86 @@ } } + public json AddBillSub(string msg5, string msg6, string msg7, long HInterID, string HBillNo) + { + List<Gy_MouldFileSub_SubMater> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_MouldFileSub_SubMater>>(msg5); + List<ClsGy_MouldFileBillSub_MaintainRule> MaintainRuleColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_MouldFileBillSub_MaintainRule>>(msg6); + + List<ClsGy_MouldFileBillSub_DotCheckRule> DotCheckRuleColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_MouldFileBillSub_DotCheckRule>>(msg7); + int i = 0; //浣滀负瀛愯〃鍐呯爜 + foreach (Gy_MouldFileSub_SubMater oSub in DetailColl) + { + i++; //鍚屼竴涓富琛ㄤ笅鐨勫瓙琛ㄧ殑鍐呯爜鑷 + + int HEntryID = i; + string HRemark = oSub.HRemark; + int HMouldFileID = oSub.HMouldFileID; + DateTime HUnionDate = oSub.HUnionDate; + + string sql = "insert into Gy_MouldFileSub_SubMater" + + "(HInterID,HBillNo_bak,HEntryID,HRemark,HMouldFileID,HUnionDate) " + + "values(" + + "" + HInterID + + ",'" + HBillNo + + "'," + HEntryID + + ",'" + HRemark + + "','" + HMouldFileID + + "','" + HUnionDate + + "')"; + + oCN.RunProc(sql); + } + i = 0; + //淇濆瓨淇濆吇瑙勬牸 + foreach (ClsGy_MouldFileBillSub_MaintainRule oSub in MaintainRuleColl) + { + i++; + Int64 NewHEntryID = i; + Int64 newHFlag = 1; + if (oSub.HStdFlag == true) + { + newHFlag = 1; + } + else + { + newHFlag = 0; + } + oCN.RunProc($@"Insert into Gy_MouldFileSub_MaintainRule + (HInterID,HBillNo_bak,HEntryID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney, + HMaintainRuleID,HStdFlag + ) + values({HInterID},'{HBillNo}',{NewHEntryID},'{oSub.HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}',{oSub.HRelationQty},{oSub.HRelationMoney} + ,{oSub.HMaintainRuleID},{newHFlag})"); + } + i = 0; + //淇濆瓨鐐规瑙勭▼ + foreach (ClsGy_MouldFileBillSub_DotCheckRule oSub in DotCheckRuleColl) + { + i++; + Int64 NewHEntryID = i; + Int64 newHFlag = 1; + if (oSub.HStdFlag == true) + { + newHFlag = 1; + } + else + { + newHFlag = 0; + } + oCN.RunProc($@"Insert into Gy_MouldFileSub_DotCheckRule + (HInterID,HBillNo_bak,HEntryID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney, + HDotCheckRuleID,HStdFlag + ) + values({HInterID},'{HBillNo}',{NewHEntryID},'{oSub.HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}',{oSub.HRelationQty},{oSub.HRelationMoney} + ,{oSub.HDotCheckRuleID},{newHFlag})"); + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; + } /// <summary> /// 纾ㄥ叿妗f淇敼鎸夐挳鏂规硶-璁$畻涓嬫淇濆吇/鏍℃鏃ユ湡-鑾峰彇妗f鏈�杩戜竴娆$殑淇濆吇璁板綍 @@ -1512,7 +1893,7 @@ { try { - ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList where hmainid=" + HInterID, "h_v_Gy_MouldFileList"); + ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFile_Edit where hmainid=" + HInterID, "h_v_Gy_MouldFile_Edit"); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1552,6 +1933,8 @@ } if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo)) { + oCN.RunProc("Delete From Gy_MouldFileSub_MaintainRule where HInterID=" + hmainid); + oCN.RunProc("Delete From Gy_MouldFileSub_DotCheckRule where HInterID=" + hmainid); //鍐欏叆鏃ュ織 ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oBill.omodel.HMouldNo + ",鍚嶇О锛�" + oBill.omodel.HName, ClsPub.CurUserName); //鏇存柊涓婄骇涓� 鏈骇 @@ -1809,7 +2192,7 @@ ,HPERUNITSTANDHOUR,HSTDLABORPREPARETIME,HSTDMACHINEPREPARETIME ) values - ({jsonData.HItemID},{jsonData.HERPItemID},'{jsonData.HNumber}','{jsonData.HName}','{jsonData.HModel}', + ({jsonData.HItemID},{jsonData.HItemID},'{jsonData.HNumber}','{jsonData.HName}','{jsonData.HModel}', '{jsonData.HShortNumber}',{jsonData.HParentID},{jsonData.HLevel},{jsonData.HEndFlag},{jsonData.HStopflag},'{jsonData.HRemark}',{jsonData.HMaterClsID},{jsonData.HUnitID},{jsonData.HUnitGroupID},{jsonData.HLength},{jsonData.HWidth},{jsonData.HHeight},{jsonData.HJQty},{jsonData.HMQty},'{jsonData.HOldMaterNumber}',{jsonData.HWHID},{jsonData.HSPID},'{jsonData.HPlanMode}','{jsonData.HUseFlag}','{jsonData.HMakeTime}',{jsonData.HMinPickQty},{jsonData.HCREATEORGID},{jsonData.HUSEORGID},'{jsonData.HBatchManager}',{jsonData.HCHECKINCOMING},{jsonData.HAuxPropFlag},{jsonData.HISKFPERIOD},{jsonData.HAuxUnitID},{jsonData.HSNUnitID},{jsonData.HBASEUNITID},{jsonData.HSALEUNITID},{jsonData.HSALEPRICEUNITID},{jsonData.HPERUNITSTANDHOUR},'{jsonData.HSTDLABORPREPARETIME}','{jsonData.HSTDMACHINEPREPARETIME}')"; oCN.RunProc(sql); -- Gitblit v1.9.1