Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
1个文件已删除
167个文件已修改
3个文件已添加
| | |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | ",HUseQtys=" + omodel.HUseQtys + |
| | | ",HSafeDays=" + omodel.HSafeDays + |
| | | ",HErrWarDays=" + omodel.HErrWarDays + |
| | | " 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" + |
| | | ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays" + |
| | | ") " + |
| | | " 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.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays + |
| | | ") "); |
| | | ////æå
¥å表 |
| | | foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater) |
| | |
| | | { |
| | | string subSql = "insert into Gy_WorkBeginDotCheckListBillSub " + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" + |
| | | ",HCheckNoteItemID,HCheckPostID) " + |
| | | ",HCheckNoteItemID,HCheckPostID,HDotCheckType,HRelationID) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "','" + oSub.HRemark + |
| | | "','" + oSub.HCheckNoteItemID + |
| | | "','" + oSub.HCheckPostID + |
| | | "','" + oSub.HDotCheckType + |
| | | "','" + oSub.HRelationID + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | |
| | | { |
| | | string subSql = "insert into Gy_WorkBeginDotCheckListBillSub " + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" + |
| | | ",HCheckNoteItemID,HCheckPostID) " + |
| | | ",HCheckNoteItemID,HCheckPostID,HDotCheckType,HRelationID) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "','" + oSub.HRemark + |
| | | "','" + oSub.HCheckNoteItemID + |
| | | "','" + oSub.HCheckPostID + |
| | | "','" + oSub.HDotCheckType + |
| | | "','" + oSub.HRelationID + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | |
| | | foreach (Model.ClsSc_WorkBeginDotCheckBillSub oSub in DetailColl) |
| | | { |
| | | string subSql = "insert into Sc_WorkBeginDotCheckBillSub " + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" + |
| | | ",HCheckNoteItemID,HCheckPostID,HCheckResult) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | | "," + oSub.HSourceInterID + |
| | | "," + oSub.HSourceEntryID + |
| | | ",'" + oSub.HSourceBillNo + |
| | | "','" + oSub.HSourceBillType + |
| | | "','" + oSub.HRemark + |
| | | "','" + oSub.HCheckNoteItemID + |
| | | "','" + oSub.HCheckPostID + |
| | | "','" + oSub.HCheckResult + |
| | | "')"; |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" + |
| | | ",HCheckNoteItemID,HCheckPostID,HCheckResult,HDotCheckType,HRelationID) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | | "," + oSub.HSourceInterID + |
| | | "," + oSub.HSourceEntryID + |
| | | ",'" + oSub.HSourceBillNo + |
| | | "','" + oSub.HSourceBillType + |
| | | "','" + oSub.HRemark + |
| | | "','" + oSub.HCheckNoteItemID + |
| | | "','" + oSub.HCheckPostID + |
| | | "','" + oSub.HCheckResult + |
| | | "','" + oSub.HDotCheckType + |
| | | "','" + oSub.HRelationID + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | |
| | |
| | | { |
| | | string subSql = "insert into Sc_WorkBeginDotCheckBillSub " + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" + |
| | | ",HCheckNoteItemID,HCheckPostID,HCheckResult) " + |
| | | ",HCheckNoteItemID,HCheckPostID,HCheckResult,HDotCheckType,HRelationID) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "','" + oSub.HCheckNoteItemID + |
| | | "','" + oSub.HCheckPostID + |
| | | "','" + oSub.HCheckResult + |
| | | "','" + oSub.HDotCheckType + |
| | | "','" + oSub.HRelationID + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | //设å¤ç»´ä¿®è®°å½å |
| | | if (obj.getData_EquipRepairWeiXiu(ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | //模å
·ç»´ä¿®è®°å½å ä¿å
»è®°å½å |
| | | if (obj.getData_MouldFileWeiXiuBaoYang(ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <Prefer32Bit>false</Prefer32Bit> |
| | | <Prefer32Bit>true</Prefer32Bit> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | |
| | | { |
| | | Application.EnableVisualStyles(); |
| | | Application.SetCompatibleTextRenderingDefault(false); |
| | | //Application.Run(new DingDing_autoGetData()); |
| | | Application.Run(new DingDing_autoGetData()); |
| | | |
| | | |
| | | DBUtility.ClsPub.AppPath = System.Environment.CurrentDirectory; |
| | | Pub_Class.ClsPub.AppPath = System.Environment.CurrentDirectory; |
| | | Pub_Class.ClsPub.SetIPAddress(); |
| | | DBUtility.ClsPub.SetIPAddress(); |
| | | DBUtility.ClsPub.VersionNum = "12.1"; |
| | | Pub_Class.ClsPub.VersionNum = "12.1";// |
| | | //=================================================================== |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.CheckUpdate()) |
| | | { |
| | | MessageBox.Show("åç°ææ°çæ¬,éè¦æ´æ°ï¼"); |
| | | string strFileName = DBUtility.ClsPub.AppPath + @"\HX_Update.exe"; |
| | | System.Diagnostics.Process.Start(strFileName); |
| | | Application.Exit(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | //============================================ |
| | | BLL.FrmLogin frmlg = new BLL.FrmLogin(); |
| | | frmlg.ShowDialog(); |
| | | if (frmlg.isOk) |
| | | { |
| | | MDIMain MainFrm = new MDIMain(); |
| | | Application.Run(MainFrm); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | MessageBox.Show(e.Message); |
| | | Application.Exit(); |
| | | return; |
| | | } |
| | | //DBUtility.ClsPub.AppPath = System.Environment.CurrentDirectory; |
| | | //Pub_Class.ClsPub.AppPath = System.Environment.CurrentDirectory; |
| | | //Pub_Class.ClsPub.SetIPAddress(); |
| | | //DBUtility.ClsPub.SetIPAddress(); |
| | | //DBUtility.ClsPub.VersionNum = "12.1"; |
| | | //Pub_Class.ClsPub.VersionNum = "12.1";// |
| | | ////=================================================================== |
| | | //try |
| | | //{ |
| | | // if (DBUtility.ClsPub.CheckUpdate()) |
| | | // { |
| | | // MessageBox.Show("åç°ææ°çæ¬,éè¦æ´æ°ï¼"); |
| | | // string strFileName = DBUtility.ClsPub.AppPath + @"\HX_Update.exe"; |
| | | // System.Diagnostics.Process.Start(strFileName); |
| | | // Application.Exit(); |
| | | // return; |
| | | // } |
| | | // else |
| | | // { |
| | | // //============================================ |
| | | // BLL.FrmLogin frmlg = new BLL.FrmLogin(); |
| | | // frmlg.ShowDialog(); |
| | | // if (frmlg.isOk) |
| | | // { |
| | | // MDIMain MainFrm = new MDIMain(); |
| | | // Application.Run(MainFrm); |
| | | // } |
| | | // } |
| | | //} |
| | | //catch (Exception e) |
| | | //{ |
| | | // MessageBox.Show(e.Message); |
| | | // Application.Exit(); |
| | | // return; |
| | | //} |
| | | } |
| | | } |
| | | } |
| | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | public Int64 HUseQtys; //ä¿å
»å²åºæ° |
| | | public Int64 HSafeDays; //ä¿å
»å®å
¨å¤©æ° |
| | | public Int64 HErrWarDays; //ä¿å
»é¢è¦å¤©æ° |
| | | } |
| | | } |
| | |
| | | { |
| | | public Int64 HCheckNoteItemID; // int --æ£æ¥é¡¹ç® (Gy_CheckNoteItem) |
| | | public Int64 HCheckPostID; //int --确认è
è§è²ï¼gy_Postï¼ |
| | | public string HDotCheckType; //varchar(50) --ç¹æ£ç±»å |
| | | public Int64 HRelationID; //int --å
³èid |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | public Int64 HCheckNoteItemID; // int --æ£æ¥é¡¹ç® (Gy_CheckNoteItem) |
| | | public Int64 HCheckPostID; //int --确认è
è§è²ï¼gy_Postï¼ |
| | | public string HDotCheckType; //varchar(50) --ç¹æ£ç±»å |
| | | public Int64 HRelationID; //int --å
³èid |
| | | public string HCheckResult; // varchar(20) --ç»æï¼OKï¼Xï¼ |
| | | |
| | | } |
| | |
| | | 3fadbf89317467dfe910ad93be6dc1c3a5e2a3e3 |
| | | 76d6e649eaf418858fb80b047dbac5a1964f90f8 |
| | |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb |
| | |
| | | using WebAPI.Models; |
| | | using WebAPI.Service; |
| | | using System.Text.RegularExpressions; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using SyntacticSugar.constant; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | #region ç©æ æä»¶å¯¼å
¥ä¿å |
| | | #region ç©æ æä»¶ä¸ä¼ |
| | | [Route("Gy_Material/Gy_Material_Excel")] |
| | | [HttpPost] |
| | | public object Gy_Material_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | tb2.Columns.Add("HMaterClsID", typeof(Int32));//ç©æå±æ§ID |
| | | tb2.Columns.Add("HUnitGroupID", typeof(Int32));//计éåä½ç»ID |
| | | tb2.Columns.Add("HUnitID", typeof(Int32));//åä½ID |
| | | tb2.Columns.Add("HSecUnitID", typeof(Int32));//è¾
å©è®¡éåä½ID |
| | | tb2.Columns.Add("HWhID", typeof(Int32));//é»è®¤ä»åºID |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //夿坼å
¥æä»¶åæ¯å¦å®æ´ |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç©æåç§°")) |
| | | error += "æ²¡ææ¾å°ãç©æåç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç©æä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç©æä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è§æ ¼åå·")) |
| | | error += "æ²¡ææ¾å°ãè§æ ¼åå·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("çæ¬å·")) |
| | | error += "æ²¡ææ¾å°ãçæ¬å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç©æå±æ§")) |
| | | error += "æ²¡ææ¾å°ãç©æå±æ§ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("计éåä½ç»")) |
| | | error += "æ²¡ææ¾å°ã计éåä½ç»ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("计éåä½ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ã计éåä½ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("计éåä½")) |
| | | error += "æ²¡ææ¾å°ã计éåä½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è¾
å©è®¡éåä½")) |
| | | error += "æ²¡ææ¾å°ãè¾
å©è®¡éåä½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ¢ç®ç")) |
| | | error += "æ²¡ææ¾å°ãæ¢ç®çãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("é»è®¤ä»åº")) |
| | | error += "æ²¡ææ¾å°ãé»è®¤ä»åºãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æé«åºå")) |
| | | error += "æ²¡ææ¾å°ãæé«åºåãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æä½åºå")) |
| | | error += "æ²¡ææ¾å°ãæä½åºåãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å®å
¨åºå")) |
| | | error += "æ²¡ææ¾å°ãå®å
¨åºåãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("éè´åä»·")) |
| | | error += "æ²¡ææ¾å°ãéè´åä»·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("éå®åä»·")) |
| | | error += "æ²¡ææ¾å°ãéå®åä»·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("计ååä»·")) |
| | | error += "æ²¡ææ¾å°ã计ååä»·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ åææ¬")) |
| | | error += "æ²¡ææ¾å°ãæ åææ¬ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ä¿è´¨æ")) |
| | | error += "æ²¡ææ¾å°ãä¿è´¨æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æå°è®¢è´§é")) |
| | | error += "æ²¡ææ¾å°ãæå°è®¢è´§éãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æå¤§è®¢è´§é")) |
| | | error += "æ²¡ææ¾å°ãæå¤§è®¢è´§éãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è±æåç§°")) |
| | | error += "æ²¡ææ¾å°ãè±æåç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è±æè§æ ¼")) |
| | | error += "æ²¡ææ¾å°ãè±æè§æ ¼ãçæ é¢,"; |
| | | |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HMaterName = ""; |
| | | string HMaterNumber = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | string HMaterClsName = ""; |
| | | string HUnitGroupName = ""; |
| | | string HUnitNumber = ""; |
| | | string HUnitName = ""; |
| | | string HSecUnitName = ""; |
| | | string HWhName = ""; |
| | | |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç©æä»£ç "].ToString()); |
| | | HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç©æåç§°"].ToString()); |
| | | HMaterClsName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç©æå±æ§"].ToString()); |
| | | HUnitGroupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计éåä½ç»"].ToString()); |
| | | HUnitNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计éåä½ä»£ç "].ToString()); |
| | | HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计éåä½"].ToString()); |
| | | HSecUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["è¾
å©è®¡éåä½"].ToString()); |
| | | HWhName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["é»è®¤ä»åº"].ToString()); |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | //æ¥è¯¢å±æ§ |
| | | if (HMaterClsName == "å¤è´") |
| | | { |
| | | tb2.Rows[i]["HMaterClsID"] = 1; |
| | | } |
| | | else if(HMaterClsName == "èªå¶") |
| | | { |
| | | tb2.Rows[i]["HMaterClsID"] = 2; |
| | | } |
| | | else if (HMaterClsName == "å§å¤") |
| | | { |
| | | tb2.Rows[i]["HMaterClsID"] = 3; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç©æå±æ§ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æ¥è¯¢è®¡éåä½ç» |
| | | ds = oCN.RunProcReturn("select * from Gy_UnitGroup where HName='" + HUnitGroupName + "'", "Gy_UnitGroup"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0 && HUnitGroupName != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + "计éåä½ç»:" + HUnitGroupName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (HMaterNumber == "") |
| | | { |
| | | tb2.Rows[i]["HUnitGroupID"] = 0; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HUnitGroupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢åä½ |
| | | ds = oCN.RunProcReturn("select * from Gy_Unit where HNumber='" + HUnitNumber + "' and HUSEORGID=" + HORGid + "", "Gy_Unit"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,åä½:" + HUnitName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢è¾
å©åä½ |
| | | ds = oCN.RunProcReturn("select * from Gy_Unit where HName='" + HSecUnitName + "' and HUSEORGID=" + HORGid + "", "Gy_Unit"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0 && HSecUnitName != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,åä½:" + HSecUnitName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | }else if (HSecUnitName == "") |
| | | { |
| | | tb2.Rows[i]["HSecUnitID"] = 0; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HSecUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ä»åº |
| | | ds = oCN.RunProcReturn("select * from Gy_Warehouse where HName='" + HWhName + "' and HUSEORGID=" + HORGid + "", "Gy_Warehouse"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ä»åº:" + HWhName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HWHID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //ç©æåç§° |
| | | if (HMaterName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç©æåç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ç©æä»£ç |
| | | if (HMaterNumber == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç©æç¼å·ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æé¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_Material/Gy_Material_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_Material_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Material_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | DLL.ClsGy_Material_Ctl oBill = new DLL.ClsGy_Material_Ctl(); |
| | | ClsGy_Material_Model oItem = new ClsGy_Material_Model(); |
| | | //èµå¼åç«¯ä¼ å
¥ç |
| | | oItem.HUSEORGID = int.Parse(item["HOrgID"].ToString()); |
| | | oItem.HNumber = item["ç©æä»£ç "].ToString(); |
| | | oItem.HName = item["ç©æåç§°"].ToString(); |
| | | oItem.HModel = item["è§æ ¼åå·"].ToString(); |
| | | oItem.HHelpCode = item["å©è®°ç "].ToString(); |
| | | oItem.HVersion = item["çæ¬å·"].ToString(); |
| | | oItem.HMaterClsID = int.Parse(item["HMaterClsID"].ToString()); |
| | | oItem.HUnitGroupID = int.Parse(item["HUnitGroupID"].ToString()); |
| | | oItem.HUnitID = int.Parse(item["HUnitID"].ToString()); |
| | | oItem.HSecUnitID = int.Parse(item["HSecUnitID"].ToString()); |
| | | oItem.HSecUnitRate = double.Parse(item["æ¢ç®ç"].ToString()==""?"0": item["æ¢ç®ç"].ToString()); |
| | | oItem.HWhID = int.Parse(item["HWhID"].ToString()); |
| | | oItem.HHighStock = int.Parse(item["æé«åºå"].ToString() == "" ? "0" : item["æé«åºå"].ToString()); |
| | | oItem.HLowStock = int.Parse(item["æä½åºå"].ToString() == "" ? "0" : item["æä½åºå"].ToString()); |
| | | oItem.HSafeStock = int.Parse(item["å®å
¨åºå"].ToString() == "" ? "0" : item["å®å
¨åºå"].ToString()); |
| | | oItem.HOrderPrice = int.Parse(item["éè´åä»·"].ToString() == "" ? "0" : item["éè´åä»·"].ToString()); |
| | | oItem.HSalePrice = int.Parse(item["éå®åä»·"].ToString() == "" ? "0" : item["éå®åä»·"].ToString()); |
| | | oItem.HPlanPrice = int.Parse(item["计ååä»·"].ToString() == "" ? "0" : item["计ååä»·"].ToString()); |
| | | oItem.HstdPrice = int.Parse(item["æ åææ¬"].ToString() == "" ? "0" : item["æ åææ¬"].ToString()); |
| | | oItem.HKeepDays = int.Parse(item["ä¿è´¨æ"].ToString() == "" ? "0" : item["ä¿è´¨æ"].ToString()); |
| | | oItem.HQtyMin = int.Parse(item["æå°è®¢è´§é"].ToString() == "" ? "0" : item["æå°è®¢è´§é"].ToString()); |
| | | oItem.HQtyMin = int.Parse(item["æå¤§è®¢è´§é"].ToString() == "" ? "0" : item["æå¤§è®¢è´§é"].ToString()); |
| | | oItem.HEngName = item["è±æåç§°"].ToString(); |
| | | oItem.HEngModel = item["è±æè§æ ¼"].ToString(); |
| | | //常è§èµå¼ |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oItem.HShortNumber = sShortNumber;//ç代ç |
| | | oItem.HEndFlag = true;//æ«çº§æ å¿ |
| | | oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //ç级 |
| | | oBill.oModel = oItem; |
| | | if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Material where HNumber='" + oItem.HNumber.Trim() + "'", "Gy_Material"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | oBill.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | |
| | | int HItemID = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString()); |
| | | oBill.ModifyByID(HItemID); |
| | | |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | /// <summary> |
| | | /// ç©æè®¾ç½®å é¤åè½ |
| | | /// </summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·æ¡£æ¡ æä»¶å¯¼å
¥ä¿å |
| | | #region å¨å
·æ¡£æ¡ æä»¶ä¸ä¼ |
| | | [Route("Gy_MouldFile/Gy_MouldFile_Excel")] |
| | | [HttpPost] |
| | | public object Gy_Mould_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | tb2.Columns.Add("HMaterID", typeof(Int32));//ç©æID |
| | | tb2.Columns.Add("HMouldTypeID", typeof(Int32));//åç±»ID |
| | | tb2.Columns.Add("HUnitID", typeof(Int32));//åä½ID |
| | | tb2.Columns.Add("HDeptID", typeof(Int32));//é¨é¨ID |
| | | tb2.Columns.Add("HWHID", typeof(Int32));//ä»åºID |
| | | tb2.Columns.Add("HSupID", typeof(Int32));//ä¾åºåID |
| | | tb2.Columns.Add("HSPID", typeof(Int32));//ä»ä½ID |
| | | tb2.Columns.Add("HMadeSupID", typeof(Int32));//å¶é åID |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //夿坼å
¥æä»¶åæ¯å¦å®æ´ |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·åç§°")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·ç¼å·")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·ç¼å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·åç±»")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·åç±»ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·è§æ ¼")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·è§æ ¼ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·åå·")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·åå·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç©´æ°")) |
| | | error += "æ²¡ææ¾å°ãç©´æ°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è¾
å©å±æ§1")) |
| | | error += "æ²¡ææ¾å°ãè¾
å©å±æ§1ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è¾
å©å±æ§2")) |
| | | error += "æ²¡ææ¾å°ãè¾
å©å±æ§2ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¾å·")) |
| | | error += "æ²¡ææ¾å°ãå¾å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("对åºERPç©æä»£ç ")) |
| | | error += "æ²¡ææ¾å°ã对åºERPç©æä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("对åºERPç©æ")) |
| | | error += "æ²¡ææ¾å°ã对åºERPç©æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("计éåä½")) |
| | | error += "æ²¡ææ¾å°ã计éåä½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·åºåç¼å·")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·åºåç¼å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("使ç¨é¨é¨")) |
| | | error += "æ²¡ææ¾å°ã使ç¨é¨é¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç¶æ")) |
| | | error += "æ²¡ææ¾å°ãç¶æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("é»è®¤ä»åº")) |
| | | error += "æ²¡ææ¾å°ãé»è®¤ä»åºãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("é»è®¤ä»ä½")) |
| | | error += "æ²¡ææ¾å°ãé»è®¤ä»ä½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("çæ¬å·")) |
| | | error += "æ²¡ææ¾å°ãçæ¬å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设计寿å½")) |
| | | error += "æ²¡ææ¾å°ã设计寿å½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("使ç¨å¯¿å½")) |
| | | error += "æ²¡ææ¾å°ã使ç¨å¯¿å½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ¡å½¢ç ")) |
| | | error += "æ²¡ææ¾å°ãæ¡å½¢ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ä¾åºå代ç ")) |
| | | error += "æ²¡ææ¾å°ãä¾åºå代ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ä¾åºå")) |
| | | error += "æ²¡ææ¾å°ãä¾åºåãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¶é å")) |
| | | error += "æ²¡ææ¾å°ãå¶é åãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HMouldName = ""; |
| | | string HMouldNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | string HMaterNumber = ""; |
| | | string HMaterName = ""; |
| | | string HUnitName = ""; |
| | | string HDeptName = ""; |
| | | string HWHName = ""; |
| | | string HSPName = ""; |
| | | string HSupName = ""; |
| | | string HSupNumber = ""; |
| | | string HMadeSupName = ""; |
| | | string HMouldTypeName = ""; |
| | | |
| | | HMouldName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¨å
·åç§°"].ToString()); |
| | | HMouldNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¨å
·ç¼å·"].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对åºERPç©æä»£ç "].ToString()); |
| | | HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对åºERPç©æ"].ToString()); |
| | | HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计éåä½"].ToString()); |
| | | HDeptName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["使ç¨é¨é¨"].ToString()); |
| | | HWHName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["é»è®¤ä»åº"].ToString()); |
| | | HSPName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["é»è®¤ä»ä½"].ToString()); |
| | | HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ä¾åºå"].ToString()); |
| | | HSupNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ä¾åºå代ç "].ToString()); |
| | | HMadeSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¶é å"].ToString()); |
| | | HMouldTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¨å
·åç±»"].ToString()); |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | //æ¥è¯¢åç±» |
| | | ds = oCN.RunProcReturn("select * from Gy_MouldType where HName='" + HMouldTypeName + "' ", "Gy_MouldType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,åç±»:" + HMouldTypeName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HMouldTypeID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ç©æ |
| | | ds = oCN.RunProcReturn("select * from Gy_Material where HNumber='" + HMaterNumber + "' and HUSEORGID=" + HORGid + "", "Gy_Department"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0 && HMaterNumber != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ç©æ:" + HMaterName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (HMaterNumber == "") |
| | | { |
| | | tb2.Rows[i]["HMaterID"] = 0; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢åä½ |
| | | ds = oCN.RunProcReturn("select * from Gy_Unit where HName='" + HUnitName + "' and HUSEORGID=" + HORGid + "", "Gy_Unit"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,åä½:" + HUnitName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢é¨é¨ |
| | | ds = oCN.RunProcReturn("select * from Gy_Department where HName='" + HDeptName + "' and HUSEORGID=" + HORGid + "", "Gy_Department"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,é¨é¨:" + HDeptName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HDeptID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ä»åº |
| | | ds = oCN.RunProcReturn("select * from Gy_Warehouse where HName='" + HWHName + "' and HUSEORGID=" + HORGid + "", "Gy_Warehouse"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ä»åº:" + HWHName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HWHID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HWHID = tb2.Rows[i]["HWHID"].ToString(); |
| | | //æ¥è¯¢ä»ä½ |
| | | ds = oCN.RunProcReturn("select * from Gy_StockPlace where HName='" + HSPName + "'and HSPGroupID=" + HWHID+ " and HUSEORGID=" + HORGid + "", "Gy_Warehouse"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ä»ä½:" + HSPName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HSPID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ä¾åºå |
| | | ds = oCN.RunProcReturn("select * from Gy_Supplier where HNumber='" + HSupNumber + "' and HUSEORGID=" + HORGid + "", "Gy_Supplier"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ä¾åºå:" + HSupName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢å¶é å |
| | | ds = oCN.RunProcReturn("select * from Gy_Supplier where HName='" + HMadeSupName + "' and HUSEORGID=" + HORGid + "", "Gy_Supplier"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,å¶é å:" + HMadeSupName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HMadeSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | //å¨å
·æ¡£æ¡åç§° |
| | | if (HMouldName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¨å
·æ¡£æ¡åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¨å
·æ¡£æ¡ä»£ç |
| | | if (HMouldNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¨å
·æ¡£æ¡ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·æ¡£æ¡é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_MouldFile/Gy_MouldFile_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_Mould_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_MouldFile_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string BillType = "3899"; |
| | | //å¾å°mainid |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); ;//éå
¥typeå¾å°çåæ®å· |
| | | DateTime HDate = DateTime.Now;//æ¥æ |
| | | int HYear = DBUtility.ClsPub.isInt(DateTime.Now.Year); |
| | | double HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | string HMouldNo = item["å¨å
·ç¼å·"].ToString(); |
| | | string HBarCode = item["æ¡å½¢ç "].ToString(); |
| | | string HName = item["å¨å
·åç§°"].ToString(); |
| | | string HModel = item["å¨å
·è§æ ¼"].ToString(); |
| | | string HModel2 = item["å¨å
·åå·"].ToString(); |
| | | string HDiameter = "";//ç´å¾ |
| | | string HSubjoin = item["è¾
å©å±æ§1"].ToString(); |
| | | string HSubjoin2 = item["è¾
å©å±æ§2"].ToString(); |
| | | string HPICNo = item["å¾å·"].ToString(); |
| | | string HWorkMaterModel = "";//ç产产ååå· |
| | | long HMaterID = int.Parse(item["HMaterID"].ToString()); |
| | | long HMouleTypeID = int.Parse(item["HMouldTypeID"].ToString()); |
| | | long HUnitID = int.Parse(item["HUnitID"].ToString()); |
| | | DateTime HOutComDate = DateTime.Now; |
| | | string HOutComNo = item["å¨å
·åºåç¼å·"].ToString(); |
| | | long HDeptID = int.Parse(item["HDeptID"].ToString()); |
| | | long HSupID = int.Parse(item["HSupID"].ToString()); |
| | | string HMouldStatus = item["ç¶æ"].ToString(); |
| | | long HWHID = int.Parse(item["HWHID"].ToString()); |
| | | long HRoutingID = 0;//å·¥èºè·¯çº¿id |
| | | long HBOMID = 0; |
| | | string HVersion = "";//çæ¬ |
| | | long HSPGroupID = 0;//é»è®¤ä»ä½ç» |
| | | long HSPID = int.Parse(item["HSPID"].ToString());//ä»ä½id |
| | | Double HDesignLife = item["设计寿å½"].ToString()=="" ? 0: double.Parse(item["设计寿å½"].ToString()); |
| | | Double HUseLife = item["使ç¨å¯¿å½"].ToString() == "" ? 0 : double.Parse(item["使ç¨å¯¿å½"].ToString()); |
| | | Double HInitLife = 0;//ä¸çº¿åå§åå¯¿å½ |
| | | Double HLeaveLife = 0;//å©ä½å¯¿å½ |
| | | Double HProdQty = 0;//å·²ç产æ°é |
| | | Double HProdWeight = 0;//å·²ç产éé |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HMaker = user; |
| | | string HMaterNumber = item["对åºERPç©æä»£ç "].ToString(); |
| | | string HSupNumber = item["ä¾åºå代ç "].ToString(); |
| | | long HPrintQty = 0;//å·²ç产æ°é |
| | | string HMouldOWNER = "èªè´¹";//货主类å |
| | | string HSaveLife = "";//å®å
¨å¯¿å½ |
| | | int HCaveQty = item["ç©´æ°"].ToString() == "" ? 0 : int.Parse(item["ç©´æ°"].ToString()); |
| | | int HMouldDotCheckRuleInterID = 0; |
| | | int HMouldMaintainRuleInterID = 0; |
| | | int HNowSupID = 0;//èæä» |
| | | int HNowSupTypeID = 0; |
| | | int HMadeSupID = 0; |
| | | string HMouldClass = "模å
·";//å¨å
፱Ȍ |
| | | int HNowWHID = 0; |
| | | int HNowSPID = 0; |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HMouldNo.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HMouldNo='" + HMouldNo + "'", "Gy_MouldFileMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | oCN.RunProc("Insert Into Gy_MouldFileMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HMouldNo,HName,HModel,HModel2,HDiameter" + |
| | | ",HSubjoin,HSubjoin2,HPICNo,HWorkMaterModel" + |
| | | ",HMaterID,HMaterNumber,HMouldType,HUnitID" + |
| | | ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" + |
| | | ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" + |
| | | ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" + |
| | | ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" + |
| | | ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" + |
| | | ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" + |
| | | "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID + |
| | | ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" + |
| | | "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty + |
| | | "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" + |
| | | ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID + |
| | | ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') "); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("UpDate Gy_MouldFileMain set " + |
| | | //" HBillNo='" + HBillNo + "'" + //åºå®èµå¼=============== |
| | | //",HDate='" + HDate + "'" + |
| | | //",HYear='" + HYear.ToString() + "'" + |
| | | //",HPeriod='" + HPeriod.ToString() + "'" + |
| | | "HRemark='" + HRemark + "'" + |
| | | ",HUpDater='" + user + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | //",HMouldNo='" + HMouldNo + "'" + |
| | | ",HName='" + HName + "'" + |
| | | ",HModel='" + HModel + "'" + |
| | | ",HModel2='" + HModel2 + "'" + |
| | | ",HDiameter='" + HDiameter + "'" + |
| | | ",HSubjoin='" + HSubjoin + "'" + |
| | | ",HSubjoin2='" + HSubjoin2 + "'" + |
| | | ",HPICNo='" + HPICNo + "'" + |
| | | ",HWorkMaterModel='" + HWorkMaterModel + "'" + |
| | | ",HMaterID=" + HMaterID.ToString() + |
| | | ",HMaterNumber='" + HMaterNumber + "'" + |
| | | ",HMouldClass='" + HMouldClass + "'" + |
| | | ",HMouldType=" + HMouleTypeID.ToString() + |
| | | ",HUnitID=" + HUnitID.ToString() + |
| | | ",HOutComDate='" + HOutComDate + "'" + |
| | | ",HOutComNo='" + HOutComNo + "'" + |
| | | ",HDeptID=" + HDeptID.ToString() + |
| | | ",HSupID=" + HSupID.ToString() + |
| | | ",HSupNumber='" + HSupNumber + "'" + |
| | | ",HPrintQty=" + HPrintQty.ToString() + |
| | | ",HMouldStatus='" + HMouldStatus + "'" + |
| | | ",HSaveLife='" + HSaveLife + "'" + |
| | | ",HWhID=" + HWHID.ToString() + |
| | | ",HRoutingID=" + HRoutingID.ToString() + |
| | | ",HBomID=" + HBOMID.ToString() + |
| | | ",HVersion='" + HVersion + "'" + |
| | | ",HSPGroupID=" + HSPGroupID.ToString() + |
| | | ",HSPID=" + HSPID.ToString() + |
| | | ",HDesignLife=" + HDesignLife.ToString() + |
| | | ",HCaveQty=" + HCaveQty.ToString() + |
| | | ",HUseLife=" + HUseLife.ToString() + |
| | | ",HLeaveLife=" + HLeaveLife.ToString() + |
| | | ",HProdQty=" + HProdQty.ToString() + |
| | | ",HMouldDotCheckRuleInterID=" + HMouldDotCheckRuleInterID.ToString() + |
| | | ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() + |
| | | ",HMouldOWNER='" + HMouldOWNER + "'" + |
| | | ",HNowSupID=" + HNowSupID.ToString() + |
| | | ",HNowSupTypeID=" + HNowSupTypeID.ToString() + |
| | | ",HProdWeight=" + HProdWeight.ToString() + |
| | | ",HBarCode='" + HBarCode.ToString() + "'" + |
| | | ",HMadeSupID=" + HMadeSupID + |
| | | ",HNowWHID=" + HNowWHID + |
| | | ",HNowSPID=" + HNowSPID + |
| | | ",HInitLife='" + HInitLife + |
| | | "' where HMouldNo='" + HMouldNo.ToString()+"'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.BaseSet |
| | | { |
| | | public class Gy_ModelTypeController : ApiController |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·åç±» æä»¶å¯¼å
¥ä¿å |
| | | #region å¨å
·åç±» æä»¶ä¸ä¼ |
| | | [Route("Gy_MouldType/Gy_MouldType_Excel")] |
| | | [HttpPost] |
| | | public object Gy_MouldType_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·åç±»")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·åç±»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¨å
·å类代ç ")) |
| | | error += "æ²¡ææ¾å°ãå¨å
·å类代ç ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¨å
·åç±»"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¨å
·å类代ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å¨å
·åç±»åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¨å
·åç±»åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¨å
·å类代ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¨å
·å类代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·åç±»é¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_MouldType/Gy_MouldType_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_MouldType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["å¨å
·åç±»"].ToString(); |
| | | string HNumber = item["å¨å
·å类代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_MouldType where HNumber='" + HNumber + "'", "Gy_MouldType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into Gy_MouldType " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "',getdate())"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_MouldType set HUSEORGID=" + HOrgID + ",HHelpCode = '"+ HHelpCode + "',HRemark='" + HRemark + "' where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | |
| | | |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (OBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill.omodel.HInterID)) |
| | | if (OBill1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill1.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (OBill.ShowBill(oItem.HInterID, ref s) == false) |
| | | if (OBill1.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (OBill.omodel.HChecker != "" && OBill.omodel.HChecker != null) |
| | | if (OBill1.omodel.HChecker != "" && OBill1.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (OBill.omodel.HBillStatus > 1) |
| | | if (OBill1.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¯å¨ç¹æ£åè¡¨æ ¹æ®ç±»å æ¥è¯¢ æ¥å¸¸ç¹æ£ |
| | | [Route("Sc_WorkBeginDotCheckBill/getSc_WorkDotCheckList_Day")] |
| | | [HttpGet] |
| | | public object getSc_WorkDotCheckList_Day(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string Type = dic["Type"].ToString(); |
| | | string HInterId = dic["HInterId"].ToString(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_DotCheckDayList '" + Type + "','" + HInterId + "'", "h_p_DotCheckDayList"); |
| | | |
| | | //æ·»å åå |
| | | 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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.SBGL |
| | | { |
| | | public class Gy_EquipFileMainController : ApiController |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region è®¾å¤æ¡£æ¡ æä»¶å¯¼å
¥ä¿å |
| | | #region è®¾å¤æ¡£æ¡ æä»¶ä¸ä¼ |
| | | [Route("Gy_EquipFileMain/Gy_EquipFileMain_Excel")] |
| | | [HttpPost] |
| | | public object Gy_EquipFile_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | tb2.Columns.Add("HMaterID", typeof(Int32));//ç©æID |
| | | tb2.Columns.Add("HEquipTypeID", typeof(Int32));//åç±»ID |
| | | tb2.Columns.Add("HUnitID", typeof(Int32));//åä½ID |
| | | tb2.Columns.Add("HDeptID", typeof(Int32));//é¨é¨ID |
| | | tb2.Columns.Add("HUseEmpID", typeof(Int32));//使ç¨è´è´£äººID |
| | | tb2.Columns.Add("HRepairEmpID", typeof(Int32));//ç»´æ¤è´è´£äººID |
| | | tb2.Columns.Add("HSupID", typeof(Int32));//ä¾åºåID |
| | | tb2.Columns.Add("HMadeSupID", typeof(Int32));//å¶é åID |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //夿坼å
¥æä»¶åæ¯å¦å®æ´ |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤åç§°")) |
| | | error += "æ²¡ææ¾å°ã设å¤åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤ç¼å·")) |
| | | error += "æ²¡ææ¾å°ã设å¤ç¼å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤åç±»")) |
| | | error += "æ²¡ææ¾å°ã设å¤åç±»ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤è§æ ¼")) |
| | | error += "æ²¡ææ¾å°ã设å¤è§æ ¼ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤åå·")) |
| | | error += "æ²¡ææ¾å°ã设å¤åå·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("对åºERPç©æä»£ç ")) |
| | | error += "æ²¡ææ¾å°ã对åºERPç©æä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("对åºERPç©æ")) |
| | | error += "æ²¡ææ¾å°ã对åºERPç©æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("计éåä½")) |
| | | error += "æ²¡ææ¾å°ã计éåä½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤åºåæ¥æ")) |
| | | error += "æ²¡ææ¾å°ã设å¤åºåæ¥æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤åºåç¼å·")) |
| | | error += "æ²¡ææ¾å°ã设å¤åºåç¼å·ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("使ç¨é¨é¨")) |
| | | error += "æ²¡ææ¾å°ã使ç¨é¨é¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("使ç¨è´è´£äºº")) |
| | | error += "æ²¡ææ¾å°ã使ç¨è´è´£äººãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»´æ¤è´è´£äºº")) |
| | | error += "æ²¡ææ¾å°ãç»´æ¤è´è´£äººãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å®è£
å°ç¹")) |
| | | error += "æ²¡ææ¾å°ãå®è£
å°ç¹ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å®è£
æ¥æ")) |
| | | error += "æ²¡ææ¾å°ãå®è£
æ¥æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("è¿è¡å¼å§æ¥æ")) |
| | | error += "æ²¡ææ¾å°ãè¿è¡å¼å§æ¥æãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å·¥ç¨ç¼ç ")) |
| | | error += "æ²¡ææ¾å°ãå·¥ç¨ç¼ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ¡å½¢ç ")) |
| | | error += "æ²¡ææ¾å°ãæ¡å½¢ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("产å°")) |
| | | error += "æ²¡ææ¾å°ã产å°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("åç")) |
| | | error += "æ²¡ææ¾å°ãåçãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ä¾åºå")) |
| | | error += "æ²¡ææ¾å°ãä¾åºåãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¶é å")) |
| | | error += "æ²¡ææ¾å°ãå¶é åãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HEquipName = ""; |
| | | string HEquipNo = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | string HMaterNumber = ""; |
| | | string HMaterName = ""; |
| | | string HUnitName = ""; |
| | | string HDeptName = ""; |
| | | string HUseEmpName = ""; |
| | | string HRepairEmpName = ""; |
| | | string HSupName = ""; |
| | | string HMadeSupName = ""; |
| | | string HEquipTypeName = ""; |
| | | |
| | | HEquipName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设å¤åç§°"].ToString()); |
| | | HEquipNo = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设å¤ç¼å·"].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对åºERPç©æä»£ç "].ToString()); |
| | | HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对åºERPç©æ"].ToString()); |
| | | HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计éåä½"].ToString()); |
| | | HDeptName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["使ç¨é¨é¨"].ToString()); |
| | | HUseEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["使ç¨è´è´£äºº"].ToString()); |
| | | HRepairEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»´æ¤è´è´£äºº"].ToString()); |
| | | HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ä¾åºå"].ToString());; |
| | | HMadeSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¶é å"].ToString()); |
| | | HEquipTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设å¤åç±»"].ToString()); |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | //æ¥è¯¢åç±» |
| | | ds = oCN.RunProcReturn("select * from Gy_EquipFileType where HName='" + HEquipTypeName + "' ", "EquipFileType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,åç±»:" + HEquipTypeName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HEquipTypeID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ç©æ |
| | | ds = oCN.RunProcReturn("select * from Gy_Material where HNumber='" + HMaterNumber + "' and HUSEORGID=" + HORGid + "", "Gy_Department"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0 && HMaterNumber != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ç©æ:" + HMaterName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (HMaterNumber == "") |
| | | { |
| | | tb2.Rows[i]["HMaterID"] = 0; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢åä½ |
| | | ds = oCN.RunProcReturn("select * from Gy_Unit where HName='" + HUnitName + "' and HUSEORGID=" + HORGid + "", "Gy_Unit"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,åä½:" + HUnitName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢é¨é¨ |
| | | ds = oCN.RunProcReturn("select * from Gy_Department where HName='" + HDeptName + "' and HUSEORGID=" + HORGid + "", "Gy_Department"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,é¨é¨:" + HDeptName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HDeptID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ä½¿ç¨è´è´£äºº |
| | | ds = oCN.RunProcReturn("select * from Gy_Employee where HName='" + HUseEmpName + "' and HUSEORGID=" + HORGid + "", "Gy_Employee"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,使ç¨è´è´£äºº:" + HUseEmpName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HUseEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ç»´æ¤è´è´£äºº |
| | | ds = oCN.RunProcReturn("select * from Gy_Employee where HName='" + HRepairEmpName + "' and HUSEORGID=" + HORGid + "", "Gy_Employee"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ç»´æ¤è´è´£äººäºº:" + HRepairEmpName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HRepairEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢ä¾åºå |
| | | ds = oCN.RunProcReturn("select * from Gy_Supplier where HName='" + HSupName + "' and HUSEORGID=" + HORGid + "", "Gy_Supplier"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,ä¾åºå:" + HSupName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | //æ¥è¯¢å¶é å |
| | | ds = oCN.RunProcReturn("select * from Gy_Supplier where HName='" + HMadeSupName + "' and HUSEORGID=" + HORGid + "", "Gy_Supplier"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + index + "è¡,该" + HORGName + "ç»ç»,å¶é å:" + HMadeSupName + ",ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HMadeSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | //è®¾å¤æ¡£æ¡åç§° |
| | | if (HEquipName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,è®¾å¤æ¡£æ¡åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è®¾å¤æ¡£æ¡ä»£ç |
| | | if (HEquipNo == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,è®¾å¤æ¡£æ¡ç¼å·ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è®¾å¤æ¡£æ¡é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_EquipFileMain/Gy_EquipFileMain_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_EquipFile_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string BillType = "3308"; |
| | | //å¾å°mainid |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); ;//éå
¥typeå¾å°çåæ®å· |
| | | DateTime HDate = DateTime.Now;//æ¥æ |
| | | string HYear = DateTime.Now.Year.ToString(); |
| | | string HEquipFileNumber = ""; |
| | | string HEquipFileNo = item["设å¤ç¼å·"].ToString(); // varchar(50) //设å¤ç¼ç (å¯ä¸) |
| | | string HName = item["设å¤åç§°"].ToString(); // â varchar(100) //设å¤åç§° |
| | | string HModel = item["设å¤è§æ ¼"].ToString(); // â varchar(100) //设å¤è§æ ¼ |
| | | string HModel2 = item["设å¤åå·"].ToString(); // â varchar(100) //设å¤åå· |
| | | int HMaterID = int.Parse(item["HMaterID"].ToString()); // â int //对åºç©æ |
| | | int HUnitID = int.Parse(item["HUnitID"].ToString()); // â int //åä½ |
| | | string HOutComDate = item["设å¤åºåæ¥æ"].ToString() == "" ? DateTime.Now.ToString() : item["设å¤åºåæ¥æ"].ToString(); // â datetime //设å¤åºåæ¥æ |
| | | string HOutComNo = item["设å¤åºåç¼å·"].ToString(); // â varchar(100) //设å¤åºåç¼å· |
| | | int HDeptID = int.Parse(item["HDeptID"].ToString()); // â int //使ç¨é¨é¨ï¼gy_Departmentï¼ |
| | | int HUseEmpID = int.Parse(item["HUseEmpID"].ToString()); //â int //使ç¨è´è´£äººï¼gy_Employeeï¼ |
| | | int HRepairEmpID = int.Parse(item["HRepairEmpID"].ToString()); //â int //ç»´æ¤è´è´£äººï¼gy_Employeeï¼ |
| | | string HAddress = item["å®è£
å°ç¹"].ToString(); // â varchar(500) //å®è£
å°ç¹ |
| | | string HSetupDate = item["å®è£
æ¥æ"].ToString() == "" ? DateTime.Now.ToString() : item["å®è£
æ¥æ"].ToString(); //â datetime //å®è£
æ¥æ |
| | | string HStartupDate = item["è¿è¡å¼å§æ¥æ"].ToString() == "" ? DateTime.Now.ToString() : item["è¿è¡å¼å§æ¥æ"].ToString(); //â datetime //è¿è¡å¼å§æ¥æ |
| | | string HStatus = "空é²"; // â varchar(20) //å½åç¶æï¼ç©ºé²ãå ç¨ãå å·¥ãå
³æºãå¼å¸¸åæºï¼ |
| | | int HEquipFileTypeID = int.Parse(item["HEquipTypeID"].ToString()); //â int //设å¤ç±»å«ï¼Gy_EquipFileType) |
| | | string HProNum = item["å·¥ç¨ç¼ç "].ToString(); // â varchar(100) //å·¥ç¨ç¼ç |
| | | string HBarCode = item["æ¡å½¢ç "].ToString(); //â varchar(100) //æ¡å½¢ç (ææ¶ä¿åæ¤å段) |
| | | string HWorkArea = item["产å°"].ToString(); //â varchar(50) //äº§å° |
| | | string HLogo = item["åç"].ToString(); //â varchar(50) //åç |
| | | int HSellSupID = int.Parse(item["HSupID"].ToString()); // â int //ä¾åºå(Gy_Supplier) |
| | | int HMakeSupID = int.Parse(item["HMadeSupID"].ToString()); // int //å¶é å (Gy_Supplier) |
| | | string HMainSourceFlag = "å¦"; //varchar(10) //æ¯å¦ä¸»ç产设å¤(å¦ï¼æ¯) |
| | | string HMacAddress = ""; // varchar(50) //æ°éç©çå°å |
| | | int HMainSourceID = 0; //int //æå±ä¸»ç产设å¤ï¼Gy_EquipFileBillMainï¼ |
| | | string HMaker = user; |
| | | string HMakeDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = 0; |
| | | int HEquipMaintainRuleInterID = 0; |
| | | int HSourceID = 0; |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HEquipFileNo.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain where HEquipFileNo='" + HEquipFileNo + "'", "Gy_EquipFileBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | oCN.RunProc("Insert into Gy_EquipFileBillMain " + |
| | | " (HInterID,hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" + |
| | | ",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," + |
| | | "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID,HSourceID,HMainSourceFlag,HMacAddress,HMainSourceID) " + |
| | | " Values(" + HInterID + ",'" + HBillNo + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID + |
| | | ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress + |
| | | "','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum + |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID + "'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "')"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Update Gy_EquipFileBillMain set " + |
| | | " HEquipFileNumber='" + HEquipFileNumber + "'" + |
| | | //",HEquipFileNo='" + HEquipFileNo + "'" + |
| | | ",HName='" + HName + "'" + |
| | | ",HModel='" + HModel + "'" + |
| | | ",HModel2='" + HModel2 + "'" + |
| | | ",HMaterID=" + HMaterID + |
| | | ",HUnitID=" + HUnitID + |
| | | ",HOutComDate='" + HOutComDate + "'" + |
| | | ",HOutComNo='" + HOutComNo + "'" + |
| | | ",HDeptID=" + HDeptID + |
| | | ",HUseEmpID=" + HUseEmpID + |
| | | ",HRepairEmpID=" + HRepairEmpID + |
| | | ",HAddress='" + HAddress + "'" + |
| | | ",HSetupDate='" + HSetupDate + "'" + |
| | | ",HStartupDate='" + HStartupDate + "'" + |
| | | ",HStatus='" + HStatus + "'" + |
| | | ",HEquipFileTypeID=" + HEquipFileTypeID + |
| | | ",HProNum='" + HProNum + "'" + |
| | | ",HBarCode='" + HBarCode + "'" + |
| | | ",HWorkArea='" + HWorkArea + "'" + |
| | | ",HLogo='" + HLogo + "'" + |
| | | ",HSellSupID=" + HSellSupID + |
| | | ",HMakeSupID= " + HMakeSupID + |
| | | ",HUpDater= '" + user + "'" + |
| | | ",HUpDateDate= getdate()" + "" + |
| | | ",HEquipDotCheckRuleInterID='" + HEquipDotCheckRuleInterID + "'" + |
| | | ",HEquipMaintainRuleInterID='" + HEquipMaintainRuleInterID + "'" + |
| | | ",HSourceID='" + HSourceID + "'" + |
| | | ",HMainSourceFlag= '" + HMainSourceFlag + "'" + |
| | | ",HMacAddress= '" + HMacAddress + "'" + |
| | | ",HMainSourceID = '" + HMainSourceID + "'" + |
| | | " Where HEquipFileNo='" + HEquipFileNo + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.SBGL |
| | | { |
| | | public class Gy_EquipTypeController : ApiController |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 设å¤åç±» æä»¶å¯¼å
¥ä¿å |
| | | #region 设å¤åç±» æä»¶ä¸ä¼ |
| | | [Route("Gy_EquipType/Gy_EquipType_Excel")] |
| | | [HttpPost] |
| | | public object Gy_EquipType_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤åç±»")) |
| | | error += "æ²¡ææ¾å°ã设å¤åç±»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("设å¤å类代ç ")) |
| | | error += "æ²¡ææ¾å°ã设å¤å类代ç ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设å¤åç±»"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设å¤å类代ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //设å¤åç±»åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,设å¤åç±»åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //设å¤å类代ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,设å¤å类代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 设å¤åç±»é¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_EquipType/Gy_EquipType_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_EquipType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["设å¤åç±»"].ToString(); |
| | | string HNumber = item["设å¤å类代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_EquipFileType where HNumber='" + HNumber + "'", "Gy_EquipType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into Gy_EquipFileType " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HMakeEmp) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "',getdate(),'" + user + "')"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_EquipFileType set HHelpCode='" + HHelpCode + "',HRemark='" + HRemark + "' where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.IO; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | public DAL.ClsSB_EquipICMOTechParamBill oBill = new DAL.ClsSB_EquipICMOTechParamBill(); |
| | | |
| | | string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"]; |
| | | |
| | | #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨åè¡¨ä¿¡æ¯ |
| | | /// <summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region å¼å¸¸å·¥èºåæ°é¢è¦åè¡¨ä¿¡æ¯ |
| | | /// <summary> |
| | | /// å¼å¸¸å·¥èºåæ°é¢è¦åè¡¨ä¿¡æ¯ |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 设å¤ç¹æ£è®°å½æç
§ä¸ä¼ |
| | | [Route("SB_EquipICMOTechParamBillController/UploadFile")] |
| | | [HttpPost] |
| | | public object UploadFile() |
| | | { |
| | | |
| | | string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //åæ®å· |
| | | string HRemark = HttpContext.Current.Request.Params["HRemark"]; //夿³¨ |
| | | string HUserName = HttpContext.Current.Request.Params["HUserName"]; //å建人 |
| | | HttpPostedFile files = HttpContext.Current.Request.Files["file"]; |
| | | string path = HttpContext.Current.Server.MapPath("~/../Files/EquipTechParamFolder/" + HBillNo); |
| | | //string path = @"D:\\Files\\"+ HBillNo; |
| | | dynamic dyResult = UpLoadFile(files, path, HBillNo, HRemark, HUserName); |
| | | if (dyResult != null && dyResult.result == 1) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¸ä¼ æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = dyResult.returnval; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HRemark, string HUserName) |
| | | { |
| | | dynamic Result_Ob = new { result = 1, returnval = "ä¸ä¼ æåï¼" }; |
| | | string filePath = Path.GetFullPath(files.FileName);//æä»¶ä¸ä¼ è·¯å¾ |
| | | string fileExtension = Path.GetExtension(files.FileName);// æä»¶æ©å±å |
| | | string filename = files.FileName;//æä»¶å |
| | | string fileSavePath = path;// ä¸ä¼ ä¿åè·¯å¾ |
| | | int filesize = files.ContentLength;//è·åä¸ä¼ æä»¶ç大å°åä½ä¸ºåèbyte |
| | | int Maxsize = 40000 * 1024;//å®ä¹ä¸ä¼ æä»¶çæå¤§ç©ºé´å¤§å°ä¸º40M |
| | | try |
| | | { |
| | | if (files == null || files.ContentLength <= 0) |
| | | { |
| | | Result_Ob = new { result = 0, returnval = "æä»¶ä¸è½ä¸ºç©º!" }; |
| | | return Result_Ob; |
| | | } |
| | | if (filesize >= Maxsize) |
| | | { |
| | | Result_Ob = new { result = 0, returnval = "ä¸ä¼ æä»¶è¶
è¿40Mï¼ä¸è½ä¸ä¼ ï¼" }; |
| | | return Result_Ob; |
| | | } |
| | | |
| | | string fileurl = Path.Combine(fileSavePath, filename); |
| | | if (Directory.Exists(fileurl) == true) //妿åå¨éåæä»¶å°±æç¤º |
| | | { |
| | | Result_Ob = new { result = 0, returnval = "åå¨ååæä»¶ï¼" }; |
| | | return Result_Ob; |
| | | } |
| | | //å 餿°æ®è¡¨æ°æ® |
| | | ds = oCn.RunProcReturn("delete from MES_AccessoriesList where HSourceBillNo ='" + HBillNo + "' and HFileName='" + filename + "'", "MES_AccessoriesList"); |
| | | if (Directory.Exists(path)) |
| | | { |
| | | File.Delete(fileurl); //å 餿宿件 |
| | | files.SaveAs(fileurl); |
| | | string StrPath = "/files/EquipTechParamFolder/" + HBillNo + "/" + filename; |
| | | if (File.Exists(fileurl)) |
| | | { |
| | | //è¿éå¯ä»¥æ§è¡ä¸äºå
¶å®çæä½ï¼æ¯å¦æ´æ°æ°æ®åº |
| | | //åå
¥æ°æ®è¡¨ |
| | | oCn.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" + |
| | | ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" + |
| | | ",HFileClsID,HSourceBillNo" + |
| | | ") values('" |
| | | + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + |
| | | ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize + |
| | | "','" + 0 + "','" + HBillNo + |
| | | "') "); |
| | | } |
| | | else |
| | | { |
| | | Result_Ob = new { result = 0, returnval = "ä¸ä¼ å¤±è´¥ï¼æ¤æä»¶ä¸ºæ¶ææä»¶" }; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Directory.CreateDirectory(fileSavePath); //æ·»å æä»¶å¤¹ |
| | | files.SaveAs(fileurl); |
| | | string StrPath = "/files/EquipTechParamFolder/" + HBillNo + "/" + filename; |
| | | if (File.Exists(fileurl)) |
| | | { |
| | | //è¿éå¯ä»¥æ§è¡ä¸äºå
¶å®çæä½ï¼æ¯å¦æ´æ°æ°æ®åº |
| | | //åå
¥æ°æ®è¡¨ |
| | | oCn.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" + |
| | | ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" + |
| | | ",HFileClsID,HSourceBillNo" + |
| | | ") values('" |
| | | + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + |
| | | ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize + |
| | | "','" + 0 + "','" + HBillNo + |
| | | "') "); |
| | | } |
| | | else |
| | | { |
| | | Result_Ob = new { result = 0, returnval = "ä¸ä¼ å¤±è´¥ï¼æ¤æä»¶ä¸ºæ¶ææä»¶" }; |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Result_Ob = new { result = 0, returnval = e.Message }; |
| | | } |
| | | return Result_Ob; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®å·æ¥æ¾ä¸ä¼ æä»¶å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("SB_EquipICMOTechParamBillController/Filelist")] |
| | | [HttpGet] |
| | | public object Filelist(string HBillNo) |
| | | { |
| | | var url = fileip + "/files/EquipTechParamFolder/" + HBillNo + "/"; |
| | | //@"C:\\files\\" |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo='" + HBillNo + "'", "MES_AccessoriesList"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ID,åæ®å·,æä»¶å å 餿件 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("SB_EquipICMOTechParamBillController/DeleteFilelist")] |
| | | [HttpGet] |
| | | public object DeleteFilelist(string HItemID, string HSourceBillNo, string HFileName) |
| | | { |
| | | try |
| | | { |
| | | |
| | | oCn.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID); |
| | | string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/EquipTechParamFolder/" + HSourceBillNo), HFileName); |
| | | File.Delete(fileurl); //å 餿宿件 |
| | | objJsonResult.code = "1"; |
| | | 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 |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | //oItem.HBillNo = ""; |
| | | oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --æ¥æ |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | //oItem.HMakeDate = ""; |
| | | //oItem.HYear = ""; |
| | | //oItem.HPeriod = ""; |
| | |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.Models; |
| | | using WebAPI.Service; |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸ç±»å æä»¶å¯¼å
¥ä¿å |
| | | #region å¼å¸¸ç±»å æä»¶ä¸ä¼ |
| | | [Route("Gy_ErrType/Gy_ErrType_Excel")] |
| | | [HttpPost] |
| | | public object Gy_ErrType_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢å·¥èºè·¯çº¿æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¼å¸¸ç±»å")) |
| | | error += "æ²¡ææ¾å°ãå¼å¸¸ç±»ååç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¼å¸¸ç±»å代ç ")) |
| | | error += "æ²¡ææ¾å°ãå¼å¸¸ç±»å代ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¼å¸¸ç±»å"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¼å¸¸ç±»å代ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å¼å¸¸ç±»ååç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¼å¸¸ç±»ååç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¼å¸¸ç±»å代ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¼å¸¸ç±»å代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸ç±»åé¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_ErrType/Gy_ErrType_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_ErrType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HProcessName = item["å¼å¸¸ç±»å"].ToString(); |
| | | string HProcessNum = item["å¼å¸¸ç±»å代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_ErrType where HNumber='" + HProcessNum + "'", "Gy_ErrType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | oCN.RunProc("Insert into " + "Gy_ErrType" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HBarCode,HUSEORGID,HCREATEORGID,HUseFlag) " + |
| | | " Values('" + HProcessNum + "','" + HProcessName + "','" + "','" + sShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + "'," + HOrgID + "," + HOrgID + ",'" + "æªæ£æµ" + "')"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_ErrType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "' where HNumber='" + HProcessNum + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦ç±»å æä»¶å¯¼å
¥ä¿å |
| | | #region å¼å¸¸åé¦ç±»å æä»¶ä¸ä¼ |
| | | [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_Excel")] |
| | | [HttpPost] |
| | | public object Gy_ErrMsgBackType_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢å·¥èºè·¯çº¿æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¼å¸¸åé¦ç±»å")) |
| | | error += "æ²¡ææ¾å°ãå¼å¸¸åé¦ç±»ååç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¼å¸¸åé¦ç±»å代ç ")) |
| | | error += "æ²¡ææ¾å°ãå¼å¸¸åé¦ç±»å代ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¼å¸¸åé¦ç±»å"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¼å¸¸åé¦ç±»å代ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å¼å¸¸ç±»ååç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¼å¸¸åé¦ç±»ååç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¼å¸¸ç±»å代ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¼å¸¸åé¦ç±»å代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_ErrMsgBackType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HProcessName = item["å¼å¸¸åé¦ç±»å"].ToString(); |
| | | string HProcessNum = item["å¼å¸¸åé¦ç±»å代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_ErrMsgBackType where HNumber='" + HProcessNum + "'", "Gy_ErrMsgBackType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_ErrMsgBackType " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " + |
| | | " Values('" + HProcessNum + "','" + HProcessName + "','" + "','" + sShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + "æªæ£æµ" + "','" + user + "','" + HOrgID + "')"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_ErrMsgBackType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "' where HNumber='" + HProcessNum + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region ä¸è¯ç°è±¡ 设置å表/ä¿å/ç¼è¾/å 餿¹æ³ |
| | | /// <summary> |
| | | /// ä¸è¯ç°è±¡ ä¿å |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è¯¥è®¾å¤æå¤ä¸ªè®¡åå,æå¨éç" ; |
| | | objjson.Message = "è¯¥è®¾å¤æå¤ä¸ªè®¡ååæç¹æ£è§ç¨,æå¨éç" ; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.åºç¡èµæ.åºç¡èµæ |
| | | { |
| | | public class Gy_MaterTypeBillController : ApiController |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æåç±» æä»¶å¯¼å
¥ä¿å |
| | | #region ç©æåç±» æä»¶ä¸ä¼ |
| | | [Route("Gy_MaterType/Gy_MaterType_Excel")] |
| | | [HttpPost] |
| | | public object Gy_MaterType_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | tb2.Columns.Add("HParentID", typeof(Int32));//ç¶ç±»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç©æåç±»")) |
| | | error += "æ²¡ææ¾å°ãç©æåç±»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç©æå类代ç ")) |
| | | error += "æ²¡ææ¾å°ãç©æå类代ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç¶ç±»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç¶ç±»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç¶ç±»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç¶ç±»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HMaterTypeName = ""; |
| | | string HMaterTypeNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | string HParentNumber = ""; |
| | | string HParentName = ""; |
| | | |
| | | HMaterTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç©æåç±»"].ToString()); |
| | | HMaterTypeNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç©æå类代ç "].ToString()); |
| | | HParentName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç¶ç±»åç§°"].ToString()); |
| | | HParentNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç¶ç±»ä»£ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | if(HParentNumber!="" && HParentName != "") |
| | | { |
| | | //æ¥è¯¢ç¶ç±»id |
| | | ds = oCN.RunProcReturn("select * from Gy_MaterType where HNumber='" + HParentNumber + "' and Hname='" + HParentName + "'", "Gy_MaterType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç¶ç±»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HParentID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HParentID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | else { |
| | | tb2.Rows[i]["HParentID"] = "0"; |
| | | } |
| | | |
| | | |
| | | //ç©æåç±»åç§° |
| | | if (HMaterTypeName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç©æåç±»åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ç©æåç±»åç§° |
| | | if (HMaterTypeNum == HParentNumber) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç©æç±»åç¶ç±»ä¸è½æ¯èªå·±ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ç©æå类代ç |
| | | if (HMaterTypeNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç©æå类代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æåç±»é¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_MaterType/Gy_MaterType_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_MaterType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["ç©æåç±»"].ToString(); |
| | | string HNumber = item["ç©æå类代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HParentID = item["HParentID"].ToString(); |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = 1; //ç级 |
| | | DataSet ds2 = oCN.RunProcReturn("select HLevel from Gy_MaterType where HItemID =" + HParentID, "Gy_MaterType");//æç´¢ç¶ç±»ç级 |
| | | //oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber); //ç级 |
| | | if (ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | HLevel = (int)ds2.Tables[0].Rows[0]["HLevel"] + 1; |
| | | } |
| | | else |
| | | { |
| | | HLevel = 1; |
| | | } |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_MaterType where HNumber='" + HNumber + "'", "Gy_MaterType"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_MaterType" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeEmp,HMakeTime,HStopEmp,HStopTime,HUSEORGID,HCREATEORGID,HUseFlag) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + HParentID.ToString() + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + user + "',getdate(),'" + "" + "','" + "" + "'," + HOrgID + "," + HOrgID + ",'" + "æªæ£æµ" + "')"); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_MaterType" + " set HEndflag=0 where HItemID=" + HParentID); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_MaterType set HUSEORGID=" + HOrgID + ",HParentID = " + HParentID + ",HHelpCode = '" + HHelpCode + "',HRemark='" + HRemark + "' where HNumber='" + HNumber + "'"); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_MaterType" + " set HEndflag=0 where HItemID=" + HParentID); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region ç©æåç±» å é¤ |
| | | [Route("Gy_MaterType/DeleteMaterType")] |
| | |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region 模å
·ä¿å
»ç»´ä¿®è¡¨ |
| | | public class MouldFileWeiXiuBaoYang |
| | | { |
| | | //ClsSb_MouldRepairWorkBillSub |
| | | //åæ®ä¿¡æ¯ |
| | | public string HMakerID; //å建人ID |
| | | public string HMaker; //å建人åç§° |
| | | public string HMakeDate; //åå»ºæ¥æ |
| | | public string HUpdaterID; //ä¿®æ¹äººID |
| | | public string HUpdater; //ä¿®æ¹äººåç§° |
| | | public string HUpdateDate; //ä¿®æ¹æ¥æ |
| | | public string HInstanceID; //åæ®å®ä¾ID |
| | | public string HOriginator; //å起人 |
| | | public string HTitle; //åæ®æ é¢ |
| | | public Int64 HEquipID;// --设å¤ID(Gy_EquipMent) |
| | | public Int64 HRepairID;// --维修项ç®(Gy_Repair) |
| | | public DateTime HRepairBeginDate;// --ç»´ä¿®å¼å§æ¥æ |
| | | public DateTime HRepairEndDate;// --ç»´ä¿®ç»ææ¥æ |
| | | public string HRepairContent;// --ç»´ä¿®å
容 |
| | | public string HCycleUnit;// varchar(10) --æ¶é´åä½(å°æ¶ï¼å¤©) |
| | | public double HPlanTimes;// money --计åç»´ä¿®å·¥æ¶ |
| | | public double HTimes;// money --å®é
ç»´ä¿®å·¥æ¶ |
| | | public Int64 HEmpID;// int --维修人(Gy_Employee) |
| | | public Int64 HManagerID;// int --è´è´£äºº(Gy_Employee) |
| | | public Int64 HDeptID;// int --ç»´ä¿®é¨é¨(Gy_Department) |
| | | public string HExplanation;// varchar(500) --ç»´ä¿®è¦æ± |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public Int64 HMouldID; |
| | | public Int64 HSupID;// int --ä¾åºåï¼Gy_Supplierï¼ addnew |
| | | public string HRepairType;// varchar(10) --维修类åï¼å
é¨ç»´ä¿®ï¼å§å¤ç»´ä¿®ï¼ addnew |
| | | public string HNewModel;// varchar(100) --ç»´ä¿®åæ°è§æ ¼ addnew |
| | | public Single HNewDesignLife;// money --æ°è®¾è®¡å¯¿å½ |
| | | public string HRemark; |
| | | |
| | | |
| | | |
| | | //åæ®å
容 |
| | | public string HDate; //æ¥æ |
| | | public string HCheckLevel; //å®¡æ ¸ç级 |
| | | public string HArea; //åºå |
| | | public string HEmployeeID; //æåID |
| | | public string HEmplpyee; //æååç§° |
| | | |
| | | public List<Sc_MouldRepairWorkBillSub> DetailColMouldRepair = new List<Sc_MouldRepairWorkBillSub>(); |
| | | public List<Sc_MouldMaintainBillSub> DetailColMouldMaintain = new List<Sc_MouldMaintainBillSub>(); |
| | | } |
| | | |
| | | //ç»´ä¿®å表 |
| | | public class Sc_MouldRepairWorkBillSub |
| | | { |
| | | public string HRepairExplanation; |
| | | public string HRemark; |
| | | } |
| | | |
| | | //ä¿å
»å表 |
| | | public class Sc_MouldMaintainBillSub |
| | | { |
| | | public string HClaim; |
| | | public string HMaintainResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region 设å¤ç»´ä¿®è®°å½è¡¨ |
| | | public class EquipRepairWeiXiu |
| | | { |
| | | //åæ®ä¿¡æ¯ |
| | | public string HMakerID; //å建人ID |
| | | public string HMaker; //å建人åç§° |
| | | public string HMakeDate; //åå»ºæ¥æ |
| | | public string HUpdaterID; //ä¿®æ¹äººID |
| | | public string HUpdater; //ä¿®æ¹äººåç§° |
| | | public string HUpdateDate; //ä¿®æ¹æ¥æ |
| | | public string HInstanceID; //åæ®å®ä¾ID |
| | | public string HOriginator; //å起人 |
| | | public string HTitle; //åæ®æ é¢ |
| | | public Int64 HEmpID;// int --维修人 |
| | | public Int64 HManagerID;// int --è´è´£äºº |
| | | public Int64 HSecManagerID;// int --éªæ¶ |
| | | public Int64 HDeptID;// int --ç»´ä¿®é¨é¨ |
| | | public string HExplanation;// varchar(200) --ç»´ä¿®è¦æ± |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public string HRemark; //å å·¥è¦æ± |
| | | |
| | | public Int64 HEquipID;// int --设å¤ID(Gy_EquipMent) |
| | | public Int64 HRepairID;//int --维修项ç®(Gy_Repair) |
| | | public DateTime HRepairBeginDate;// datetime --ç»´ä¿®å¼å§æ¥æ |
| | | public DateTime HRepairEndDate;//datetime --ç»´ä¿®ç»ææ¥æ |
| | | public string HRepairContent;//varchar(500) --ç»´ä¿®å
容 |
| | | public string HCycleUnit;//varchar(10) --æ¶é´åä½(å°æ¶ï¼å¤©) |
| | | public Single HPlanTimes;// money --计åç»´ä¿®å·¥æ¶ |
| | | public Single HTimes;// money --å®é
ç»´ä¿®å·¥æ¶ |
| | | public string HRemark2;//夿³¨ |
| | | |
| | | //åæ®å
容 |
| | | public string HDate; //æ¥æ |
| | | public string HCheckLevel; //å®¡æ ¸ç级 |
| | | public string HArea; //åºå |
| | | public string HEmployeeID; //æåID |
| | | public string HEmplpyee; //æååç§° |
| | | |
| | | public List<Sc_MouldRepairWorkBillSub> DetailColMouldRepair = new List<Sc_MouldRepairWorkBillSub>(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region éé éç¨æä½æ¹æ³ |
| | |
| | | //OriginatorId = "12", //æ ¹æ®æµç¨åèµ·äººå·¥å·æ¥è¯¢ã |
| | | |
| | | //TaskId = "12", //ä»»å¡IDã |
| | | CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01" ? "2022-01-01" : DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"), //å建æ¶é´èµ·å§å¼ã |
| | | CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //å建æ¶é´ç»æ¢å¼ã |
| | | //CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01" ? "2022-01-01" : DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"), //å建æ¶é´èµ·å§å¼ã |
| | | //CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //å建æ¶é´ç»æ¢å¼ã |
| | | ModifiedFromTimeGMT = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"), //ä¿®æ¹æ¶é´èµ·å§å¼ã |
| | | ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //ä¿®æ¹æ¶é´ç»æ¢å¼ã |
| | | |
| | | PageSize = pageSize, //å页大å°ã |
| | | PageNumber = pageNumber, //å页页ç |
| | |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region æ°æ®åæ¥-模å
·ç»´ä¿®ä¿å
Ȍ |
| | | #region è·å 宿-模å
·ç»´ä¿®ä¿å
»å å®ä¾IDå表对åºçå®ä¾è¯¦æ
|
| | | public bool getInstanceDetailList___MouldFileWeiXiuBaoYang_YiDa(string appType, string systemToken, string userID, string formUuid, List<string> IDList, ref List<MouldFileWeiXiuBaoYang> lsmain, ref string msg, int size = 500) |
| | | { |
| | | |
| | | try |
| | | { |
| | | int startIndex = 0; |
| | | int endIndex = startIndex + size; |
| | | if (endIndex > IDList.Count) |
| | | { |
| | | endIndex = IDList.Count; |
| | | } |
| | | |
| | | while (startIndex < endIndex && endIndex <= IDList.Count) |
| | | { |
| | | List<string> IDList_temp = new List<string>(); |
| | | for (int i = startIndex; i < endIndex; i++) |
| | | { |
| | | IDList_temp.Add(IDList[i]); |
| | | } |
| | | |
| | | BatchGetFormDataByIdListResponse response = new BatchGetFormDataByIdListResponse(); |
| | | if (getInstanceDetailListByInstanceIDList_YiDa(appType, systemToken, formUuid, userID, IDList_temp, ref response, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | for (int i = 0; i < response.Body.Result.Count; i++) |
| | | { |
| | | try |
| | | { |
| | | |
| | | |
| | | List<string> keys = new List<string>(response.Body.Result[i].FormData.Keys); |
| | | |
| | | MouldFileWeiXiuBaoYang oItem = new MouldFileWeiXiuBaoYang(); |
| | | oItem.HMakerID = response.Body.Result[i].CreatorUserId.Replace("'", ""); |
| | | oItem.HMaker = response.Body.Result[i].CreatorUserId.Replace("'", ""); |
| | | oItem.HMakeDate = response.Body.Result[i].CreateTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", ""); |
| | | oItem.HUpdaterID = response.Body.Result[i].ModifyUser.UserId.Replace("'", ""); |
| | | oItem.HUpdater = response.Body.Result[i].ModifyUser.Name.NameInChinese.Replace("'", ""); |
| | | oItem.HUpdateDate = response.Body.Result[i].ModifiedTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", ""); |
| | | oItem.HInstanceID = response.Body.Result[i].FormInstanceId.Replace("'", ""); |
| | | oItem.HOriginator = response.Body.Result[i].Originator.Name.NameInChinese.Replace("'", ""); |
| | | |
| | | GetInstanceByIdResponse getInstanceByIdResponse = new GetInstanceByIdResponse(); ; |
| | | if (!getInstanceStatusByInstanceID__YiDa(appType, systemToken, userID, oItem.HInstanceID, ref getInstanceByIdResponse, ref msg)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED") |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | //修模å¼å§æ¶é´ |
| | | if (keys.Contains("dateField_lq4gf2ih")) |
| | | { |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq4gf2ih"].ToString()); |
| | | oItem.HRepairBeginDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm")); |
| | | } |
| | | |
| | | //ä¿®æ¨¡ç»ææ¶é´ |
| | | if (keys.Contains("dateField_lq4gf2ii")) |
| | | { |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq4gf2ii"].ToString()); |
| | | oItem.HRepairEndDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm")); |
| | | } |
| | | |
| | | //模å
·æ¹æ¬¡å· |
| | | if (keys.Contains("serialNumberField_lqaak4ts")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["serialNumberField_lqaak4ts"].ToString(); |
| | | oItem.HRemark = HDate_Temp; |
| | | } |
| | | |
| | | //模å
·ç¼ç |
| | | if (keys.Contains("dateField_lq4gf2ii")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["dateField_lq4gf2ii"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock) where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain"); |
| | | string HMouldID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HMouldID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | } |
| | | oItem.HMouldID = long.Parse(HMouldID); |
| | | } |
| | | |
| | | |
| | | //ç»´ä¿®é¨é¨ |
| | | if (keys.Contains("selectField_lq3idkva")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["selectField_lq3idkva"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Department with(nolock) where HName='" + HDate_Temp + "'", "Gy_Department"); |
| | | string HDeptID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | oItem.HDeptID = long.Parse(HDeptID); |
| | | } |
| | | |
| | | //æ°è®¾è®¡å¯¿å½ |
| | | oItem.HNewDesignLife = 30000; |
| | | |
| | | //维修人 |
| | | if (keys.Contains("employeeField_lq3idkvh")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lq3idkvh"])); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee"); |
| | | string HEmpID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HEmpID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | oItem.HEmpID = long.Parse(HEmpID); |
| | | } |
| | | |
| | | //ç»´ä¿®æ¶é´ |
| | | if (keys.Contains("numberField_lq3ixr9j")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["numberField_lq3ixr9j"].ToString(); |
| | | |
| | | oItem.HTimes = long.Parse(HDate_Temp); |
| | | oItem.HPlanTimes = long.Parse(HDate_Temp); |
| | | } |
| | | |
| | | //å表 ç»´ä¿®è¦æ± ç»´ä¿®å¤æ³¨(é®é¢æè¿°) |
| | | if (keys.Contains("tableField_lq3ixr9b")) |
| | | { |
| | | List<Dictionary<string, object>> dic = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["tableField_lq3ixr9b"])); |
| | | for (int ij = 0; ij < dic.Count; ij++) |
| | | { |
| | | Sc_MouldRepairWorkBillSub oItemSub = new Sc_MouldRepairWorkBillSub(); |
| | | |
| | | List<string> keys_Sub = new List<string>(dic[ij].Keys); |
| | | |
| | | //ç»´ä¿®è¦æ± |
| | | if (keys_Sub.Contains("textareaField_lq3ixr9e")) |
| | | { |
| | | oItemSub.HRepairExplanation = dic[ij]["textareaField_lq3ixr9e"].ToString(); |
| | | } |
| | | |
| | | //夿³¨ |
| | | if (keys_Sub.Contains("textField_lq3ixr9d")) |
| | | { |
| | | oItemSub.HRemark = dic[ij]["textField_lq3ixr9d"].ToString(); |
| | | } |
| | | oItem.DetailColMouldRepair.Add(oItemSub); |
| | | } |
| | | } |
| | | |
| | | string HRemark = ""; |
| | | //å表 ä¿å
»å¤æ³¨(é®é¢æè¿°) |
| | | if (keys.Contains("textareaField_ltpf2wiw")) |
| | | { |
| | | HRemark = response.Body.Result[i].FormData["textareaField_ltpf2wiw"].ToString(); |
| | | |
| | | } |
| | | |
| | | //å表 å
·ä½è¦æ± ä¿å
»é¡¹ç® |
| | | if (keys.Contains("checkboxField_ltpf2wif")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["checkboxField_ltpf2wif"])); |
| | | |
| | | for (int ij = 0; ij < HDate_Temp.Length; ij++) |
| | | { |
| | | Sc_MouldMaintainBillSub oItemSub = new Sc_MouldMaintainBillSub(); |
| | | |
| | | oItemSub.HClaim = HDate_Temp[ij]; |
| | | oItemSub.HMaintainResult = HRemark; |
| | | oItem.DetailColMouldMaintain.Add(oItemSub); |
| | | } |
| | | |
| | | } |
| | | |
| | | int startindex = response.Body.Result[i].Title.IndexOf("zh_CN") + 8; |
| | | oItem.HTitle = startIndex + response.Body.Result[i].Title.Substring(startindex).Replace("\"}", "").Replace("'", ""); |
| | | |
| | | if (keys.Contains("dateField_lo6w37hk")) |
| | | { |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lo6w37hk"].ToString()); |
| | | oItem.HDate = convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd"); |
| | | } |
| | | |
| | | if (keys.Contains("selectField_lockncvh_id")) |
| | | { |
| | | oItem.HArea = response.Body.Result[i].FormData["selectField_lockncvh_id"].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | if (keys.Contains("selectField_lockncvg_id")) |
| | | { |
| | | oItem.HCheckLevel = response.Body.Result[i].FormData["selectField_lockncvg_id"].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | if (keys.Contains("employeeField_lo6w37hf")) |
| | | { |
| | | oItem.HEmplpyee = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf"])[0].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | if (keys.Contains("employeeField_lo6w37hf_id")) |
| | | { |
| | | oItem.HEmployeeID = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf_id"])[0].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | lsmain.Add(oItem); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | startIndex = endIndex; |
| | | endIndex += size; |
| | | if (endIndex > IDList.Count) |
| | | { |
| | | endIndex = IDList.Count; |
| | | } |
| | | } |
| | | |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | msg = e.Message; |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ°æ®åæ¥ |
| | | public bool getData_MouldFileWeiXiuBaoYang(ref string msg) |
| | | { |
| | | //è·å åå±å®¡æ ¸è¡¨ å®ä¾IDå表 |
| | | string appType = "APP_CSD7RLFJ3CTU330N3SCV"; |
| | | string systemToken = "9T566BD1NWMGH17C93CKA9M4AS0D233TNU0QL82"; |
| | | string userID = "011113050243860353"; |
| | | string formUuid = "FORM-30C78F46E77E46A9AA8778214CEFE6B5J0AN"; |
| | | int pageNumber = 1; |
| | | int pageSize = 100; |
| | | |
| | | //è·å模å
·ç»´ä¿®ä¿å
»è¡¨çå®ä¾IDå表 |
| | | List<string> IDList = new List<string>(); |
| | | if (getInstanceIDList_YiDa(appType, systemToken, userID, formUuid, pageNumber, pageSize, ref IDList, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | //è·å详ç»ä¿¡æ¯å¹¶éå å°å表lsmainä¸ |
| | | List<MouldFileWeiXiuBaoYang> lsmain = new List<MouldFileWeiXiuBaoYang>(); |
| | | if (getInstanceDetailList___MouldFileWeiXiuBaoYang_YiDa(appType, systemToken, userID, formUuid, IDList, ref lsmain, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | foreach (MouldFileWeiXiuBaoYang oItem in lsmain) |
| | | { |
| | | //ä¿å
»è®°å½ |
| | | if (oItem.DetailColMouldMaintain.Count != 0) |
| | | { |
| | | string BillType = "3819"; |
| | | string sql = $@"select HInnerBillNo from Sc_MouldMaintainBillMain |
| | | where HInnerBillNo = '{oItem.HInstanceID}'"; |
| | | DataSet ds = oCN.RunProcReturn(sql, "Sc_MouldMaintainBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //long HInterID = 0; |
| | | //string HBillNo = ""; |
| | | string sql_main = "Insert Into Sc_MouldMaintainBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HUpDateDate" + |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" + |
| | | ",HEndDate" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" + |
| | | ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate(),'" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HUpdateDate + "'" + |
| | | ",'','0','" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" + |
| | | ",'" + oItem.HRepairEndDate + "'" + |
| | | ",'" + oItem.HInstanceID + "','',0,0,'OK')"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | | foreach (Sc_MouldMaintainBillSub oItem_Detail in oItem.DetailColMouldMaintain) |
| | | { |
| | | string sql_sub = "Insert into Sc_MouldMaintainBillSub_Item" + |
| | | " (HInterID,HEntryID,HMaintainItemID,HMaintainItem" + |
| | | ",HMaintainPart,HClaim" + |
| | | ",HManagerID" + |
| | | ",HCloseMan,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainResult" + |
| | | ") values('" + HInterID + "'," + i + ",0,'" + oItem_Detail.HClaim + "'" + |
| | | ",'','" + oItem_Detail.HClaim + "'" + |
| | | ",'" + oItem.HEmpID + "'" + |
| | | ",'','','" + oItem_Detail.HMaintainResult + "'" + |
| | | ",'0','0','','',0,0,'')"; |
| | | LogService.Write(sql_sub); |
| | | oCN.RunProc(sql_sub); |
| | | i += 1; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | //ç»´ä¿®è®°å½ |
| | | if (oItem.DetailColMouldRepair.Count != 0) |
| | | { |
| | | string BillType = "3807"; |
| | | string sql = $@"select HInnerBillNo from Sc_MouldRepairWorkBillMain |
| | | where HInnerBillNo = '{oItem.HInstanceID}'"; |
| | | DataSet ds = oCN.RunProcReturn(sql, "Sc_MouldRepairWorkBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //long HInterID = 0; |
| | | //string HBillNo = ""; |
| | | string sql_main = "Insert Into Sc_MouldRepairWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HEquipID,HRepairID,HRepairBeginDate,HRepairEndDate,HRepairContent" + |
| | | ",HCycleUnit,HPlanTimes,HTimes,HEmpID,HManagerID" + |
| | | ",HDeptID,HExplanation,HInnerBillNo,HMouldID" + |
| | | ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" + |
| | | ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'0','0','" + oItem.HRepairBeginDate + "','" + oItem.HUpdateDate + "',''" + |
| | | ",'å°æ¶','" + oItem.HPlanTimes + "','" + oItem.HTimes + "','" + oItem.HEmpID + "',0" + |
| | | ",'" + oItem.HDeptID + "','','" + oItem.HInstanceID + "','" + oItem.HMouldID + "'" + |
| | | ",'0','å
é¨ç»´ä¿®','','" + oItem.HNewDesignLife + "','',0,0)"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | | foreach (Sc_MouldRepairWorkBillSub oItem_Detail in oItem.DetailColMouldRepair) |
| | | { |
| | | string sql_sub = "Insert into Sc_MouldRepairWorkBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HRepairID,HRepairExplanation,HManagerID,HMoney) values" + |
| | | "('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" + |
| | | ",0,0,'','',0,0" + |
| | | ",0,'" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "',0)"; |
| | | LogService.Write(sql_sub); |
| | | oCN.RunProc(sql_sub); |
| | | i += 1; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | oCN.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | msg = e.Message; |
| | | oCN.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region æ°æ®åæ¥-设å¤ç»´ä¿®è®°å½å |
| | | #region è·å 宿-设å¤ç»´ä¿®è®°å½å å®ä¾IDå表对åºçå®ä¾è¯¦æ
|
| | | public bool getInstanceDetailList___EquipRepairWeiXiu_YiDa(string appType, string systemToken, string userID, string formUuid, List<string> IDList, ref List<EquipRepairWeiXiu> lsmain, ref string msg, int size = 500) |
| | | { |
| | | |
| | | try |
| | | { |
| | | int startIndex = 0; |
| | | int endIndex = startIndex + size; |
| | | if (endIndex > IDList.Count) |
| | | { |
| | | endIndex = IDList.Count; |
| | | } |
| | | |
| | | while (startIndex < endIndex && endIndex <= IDList.Count) |
| | | { |
| | | List<string> IDList_temp = new List<string>(); |
| | | for (int i = startIndex; i < endIndex; i++) |
| | | { |
| | | IDList_temp.Add(IDList[i]); |
| | | } |
| | | |
| | | BatchGetFormDataByIdListResponse response = new BatchGetFormDataByIdListResponse(); |
| | | if (getInstanceDetailListByInstanceIDList_YiDa(appType, systemToken, formUuid, userID, IDList_temp, ref response, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | for (int i = 0; i < response.Body.Result.Count; i++) |
| | | { |
| | | try |
| | | { |
| | | List<string> keys = new List<string>(response.Body.Result[i].FormData.Keys); |
| | | |
| | | EquipRepairWeiXiu oItem = new EquipRepairWeiXiu(); |
| | | oItem.HMakerID = response.Body.Result[i].CreatorUserId.Replace("'", ""); |
| | | oItem.HMaker = response.Body.Result[i].CreatorUserId.Replace("'", ""); |
| | | oItem.HMakeDate = response.Body.Result[i].CreateTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", ""); |
| | | oItem.HUpdaterID = response.Body.Result[i].ModifyUser.UserId.Replace("'", ""); |
| | | oItem.HUpdater = response.Body.Result[i].ModifyUser.Name.NameInChinese.Replace("'", ""); |
| | | oItem.HUpdateDate = response.Body.Result[i].ModifiedTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", ""); |
| | | oItem.HInstanceID = response.Body.Result[i].FormInstanceId.Replace("'", ""); |
| | | oItem.HOriginator = response.Body.Result[i].Originator.Name.NameInChinese.Replace("'", ""); |
| | | |
| | | GetInstanceByIdResponse getInstanceByIdResponse = new GetInstanceByIdResponse(); ; |
| | | if (!getInstanceStatusByInstanceID__YiDa(appType, systemToken, userID, oItem.HInstanceID, ref getInstanceByIdResponse, ref msg)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED") |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | //设å¤ç¼ç |
| | | if (keys.Contains("textField_lfg9hgys")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_lfg9hgys"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock) where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain"); |
| | | string HEquipID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HEquipID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | } |
| | | oItem.HEquipID = long.Parse(HEquipID); |
| | | oItem.HRemark2 = HDate_Temp; |
| | | } |
| | | |
| | | |
| | | //ç»´ä¿®é¨é¨ |
| | | if (keys.Contains("selectField_kzgkw10a")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["selectField_kzgkw10a"].ToString(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Department with(nolock) where HName='" + HDate_Temp + "'", "Gy_Department"); |
| | | string HDeptID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | oItem.HDeptID = long.Parse(HDeptID); |
| | | } |
| | | |
| | | |
| | | //维修人 |
| | | if (keys.Contains("employeeField_lthwkdh2")) |
| | | { |
| | | string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lthwkdh2"])); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee"); |
| | | string HEmpID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | HEmpID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | oItem.HEmpID = long.Parse(HEmpID); |
| | | } |
| | | |
| | | //ç»´ä¿®æ¶é´ |
| | | if (keys.Contains("textField_l2r95oo2")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo2"].ToString(); |
| | | |
| | | oItem.HTimes = long.Parse(HDate_Temp); |
| | | oItem.HPlanTimes = long.Parse(HDate_Temp); |
| | | } |
| | | |
| | | //ç»´ä¿®å
容 |
| | | if (keys.Contains("textField_l2r9bvwk")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r9bvwk"].ToString(); |
| | | |
| | | oItem.HRepairContent = HDate_Temp; |
| | | } |
| | | |
| | | |
| | | //å表 ç»´ä¿®è¦æ± ç»´ä¿®å¤æ³¨(é®é¢æè¿°) |
| | | |
| | | Sc_MouldRepairWorkBillSub sub = new Sc_MouldRepairWorkBillSub(); |
| | | |
| | | //ç»´ä¿®è¦æ± |
| | | if (keys.Contains("textareaField_lthwo99r")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textareaField_lthwo99r"].ToString(); |
| | | |
| | | sub.HRepairExplanation = HDate_Temp; |
| | | } |
| | | |
| | | //夿³¨ |
| | | if (keys.Contains("textField_l2r95oo0")) |
| | | { |
| | | string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo0"].ToString(); |
| | | |
| | | sub.HRemark = HDate_Temp; |
| | | } |
| | | oItem.DetailColMouldRepair.Add(sub); |
| | | |
| | | int startindex = response.Body.Result[i].Title.IndexOf("zh_CN") + 8; |
| | | oItem.HTitle = startIndex + response.Body.Result[i].Title.Substring(startindex).Replace("\"}", "").Replace("'", ""); |
| | | |
| | | if (keys.Contains("dateField_lo6w37hk")) |
| | | { |
| | | double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lo6w37hk"].ToString()); |
| | | oItem.HDate = convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd"); |
| | | } |
| | | |
| | | if (keys.Contains("selectField_lockncvh_id")) |
| | | { |
| | | oItem.HArea = response.Body.Result[i].FormData["selectField_lockncvh_id"].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | if (keys.Contains("selectField_lockncvg_id")) |
| | | { |
| | | oItem.HCheckLevel = response.Body.Result[i].FormData["selectField_lockncvg_id"].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | if (keys.Contains("employeeField_lo6w37hf")) |
| | | { |
| | | oItem.HEmplpyee = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf"])[0].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | if (keys.Contains("employeeField_lo6w37hf_id")) |
| | | { |
| | | oItem.HEmployeeID = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf_id"])[0].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | lsmain.Add(oItem); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | startIndex = endIndex; |
| | | endIndex += size; |
| | | if (endIndex > IDList.Count) |
| | | { |
| | | endIndex = IDList.Count; |
| | | } |
| | | } |
| | | |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | msg = e.Message; |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ°æ®åæ¥ |
| | | public bool getData_EquipRepairWeiXiu(ref string msg) |
| | | { |
| | | //è·å åå±å®¡æ ¸è¡¨ å®ä¾IDå表 |
| | | string appType = "APP_E2A54CQBDX3TZN51JGBI"; |
| | | string systemToken = "YKB660C1ZPNW58JDZKAP318W5VQE2RRMQL2YKZK"; |
| | | string userID = "011113050243860353"; |
| | | string formUuid = "FORM-OM566O7177LW0ARJ5IMFF63NTFKA34G9RL2YKN1"; |
| | | int pageNumber = 1; |
| | | int pageSize = 100; |
| | | |
| | | //è·å模å
·ç»´ä¿®ä¿å
»è¡¨çå®ä¾IDå表 |
| | | List<string> IDList = new List<string>(); |
| | | if (getInstanceIDList_YiDa(appType, systemToken, userID, formUuid, pageNumber, pageSize, ref IDList, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | //è·å详ç»ä¿¡æ¯å¹¶éå å°å表lsmainä¸ |
| | | List<EquipRepairWeiXiu> lsmain = new List<EquipRepairWeiXiu>(); |
| | | if (getInstanceDetailList___EquipRepairWeiXiu_YiDa(appType, systemToken, userID, formUuid, IDList, ref lsmain, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | foreach (EquipRepairWeiXiu oItem in lsmain) |
| | | { |
| | | //ç»´ä¿®è®°å½ |
| | | if (oItem.DetailColMouldRepair.Count != 0) |
| | | { |
| | | string BillType = "3910"; |
| | | string sql = $@"select HInnerBillNo from Sb_EquipRepairWorkBillMain |
| | | where HInnerBillNo = '{oItem.HInstanceID}'"; |
| | | DataSet ds = oCN.RunProcReturn(sql, "Sb_EquipRepairWorkBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //long HInterID = 0; |
| | | //string HBillNo = ""; |
| | | string sql_main = "Insert Into Sb_EquipRepairWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" + |
| | | ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate" + |
| | | ",HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" + |
| | | ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark2 + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" + |
| | | ",'" + oItem.HEquipID + "','0','" + oItem.HTimes + "','" + oItem.HEmpID + "','" + oItem.HEmpID + "','" + oItem.HTimes + "'" + |
| | | ",'" + oItem.HDeptID + "','" + oItem.HExplanation + "','" + oItem.HInstanceID + "','',''" + |
| | | ",'" + oItem.HRepairContent + "','å°æ¶','','0',0)"; |
| | | LogService.Write(sql_main); |
| | | oCN.RunProc(sql_main); |
| | | int i = 1; |
| | | foreach (Sc_MouldRepairWorkBillSub oItem_Detail in oItem.DetailColMouldRepair) |
| | | { |
| | | string sql_sub = "Insert into Sb_EquipRepairWorkBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HRepairID,HManagerID,HRepairExplanation,HEmpID)" + |
| | | "values('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" + |
| | | ",0,0,'','',0,0" + |
| | | ",0,'" + oItem.HEmpID + "','" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "')"; |
| | | LogService.Write(sql_sub); |
| | | oCN.RunProc(sql_sub); |
| | | i += 1; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | oCN.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | msg = e.Message; |
| | | oCN.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç 模å è¿åæºååè¡¨ä¿¡æ¯ |
| | | /// <summary> |
| | | /// æºåå表信æ¯ï¼æ ¹æ®åæ®ç±»åãæºåç±»åãç»ç»IDè¿åæºååè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetSourceBillList_Json")] |
| | | [HttpGet] |
| | | public object GetSourceBillList_Json(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "', '" + HMater + "'", "h_p_WMS_GetSourceBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿å任使ºåä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åæºååæ®ä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åæºååæ®ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç æ¨¡å æ ¹æ®æ¡ç å é¤ç¼åå表ä¸å¯¹åºæ¡ç è®°å½ |
| | | |
| | | /// <summary> |
| | |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | ",HSafeDays=" + omodel.HSafeDays + |
| | | ",HSafeDays=" + omodel.HSafeDays + |
| | | ",HErrWarDays=" + omodel.HErrWarDays + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sb_EquipMaintainRuleBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMaintainLevID,HSafeDays" + |
| | | ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMaintainLevID,HSafeDays,HErrWarDays" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + |
| | | "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HSafeDays + |
| | | "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HSafeDays +", " + omodel.HErrWarDays + |
| | | ") "); |
| | | |
| | | //æå
¥ä¿å
»é¡¹å表 |
| | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | |
| | | public Int64 HSafeDays;//ä¿å
»å®å
¨å¤©æ° |
| | | public Int64 HErrWarDays;//ä¿å
»é¢è¦å¤©æ° |
| | | } |
| | | } |
| | |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <History>True|2024-09-13T02:20:53.2644847Z;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History> |
| | | <History>True|2024-09-18T08:52:00.1148169Z;True|2024-09-18T15:38:57.9090829+08:00;True|2024-09-18T14:31:35.3097924+08:00;True|2024-09-18T14:14:45.1332631+08:00;True|2024-09-18T10:03:32.4149929+08:00;True|2024-09-18T09:59:34.6584259+08:00;False|2024-09-18T09:59:28.1320018+08:00;True|2024-09-16T09:25:02.1321635+08:00;False|2024-09-16T09:24:52.9179557+08:00;True|2024-09-14T16:00:39.9413222+08:00;True|2024-09-14T15:57:04.7663346+08:00;True|2024-09-14T15:53:17.2804503+08:00;False|2024-09-14T15:53:10.3529010+08:00;True|2024-09-14T11:12:47.6871531+08:00;True|2024-09-14T11:09:14.5541471+08:00;True|2024-09-14T11:04:01.8286675+08:00;False|2024-09-14T11:03:52.5770773+08:00;True|2024-09-13T14:33:50.5043085+08:00;False|2024-09-13T14:33:44.9903004+08:00;True|2024-09-13T13:37:51.1937510+08:00;True|2024-09-13T10:20:53.2644847+08:00;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History> |
| | | <_PublishTargetUrl>D:\ç½ç«åå¸\æºäºMESWMS\API</_PublishTargetUrl> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | |
| | | <publishTime>02/22/2013 16:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>09/13/2024 10:18:38</publishTime> |
| | | <publishTime>09/18/2024 16:51:19</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.pdb"> |
| | | <publishTime>09/13/2024 10:18:38</publishTime> |
| | | <publishTime>09/18/2024 16:51:19</publishTime> |
| | | </File> |
| | | <File Include="bin/BouncyCastle.Crypto.dll"> |
| | | <publishTime>12/18/2020 05:32:28</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>09/13/2024 10:18:37</publishTime> |
| | | <publishTime>09/18/2024 16:51:17</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.pdb"> |
| | | <publishTime>09/13/2024 10:18:37</publishTime> |
| | | <publishTime>09/18/2024 16:51:17</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 22:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>09/13/2024 10:18:34</publishTime> |
| | | <publishTime>09/18/2024 16:51:15</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.pdb"> |
| | | <publishTime>09/13/2024 10:18:34</publishTime> |
| | | <publishTime>09/18/2024 16:51:15</publishTime> |
| | | </File> |
| | | <File Include="bin/Grpc.Core.Api.dll"> |
| | | <publishTime>03/22/2022 13:17:26</publishTime> |
| | |
| | | <publishTime>07/25/2012 19:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>09/13/2024 10:18:35</publishTime> |
| | | <publishTime>09/18/2024 16:51:16</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.pdb"> |
| | | <publishTime>09/13/2024 10:18:35</publishTime> |
| | | <publishTime>09/18/2024 16:51:16</publishTime> |
| | | </File> |
| | | <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> |
| | | <publishTime>04/06/2023 15:57:02</publishTime> |
| | |
| | | <publishTime>10/23/2021 17:07:54</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>09/13/2024 10:18:31</publishTime> |
| | | <publishTime>09/18/2024 16:51:14</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.pdb"> |
| | | <publishTime>09/13/2024 10:18:31</publishTime> |
| | | <publishTime>09/18/2024 16:51:14</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>09/13/2024 10:18:32</publishTime> |
| | | <publishTime>09/18/2024 16:51:15</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.pdb"> |
| | | <publishTime>09/13/2024 10:18:32</publishTime> |
| | | <publishTime>09/18/2024 16:51:15</publishTime> |
| | | </File> |
| | | <File Include="bin/RestSharp.dll"> |
| | | <publishTime>08/31/2012 06:22:50</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>09/13/2024 10:18:34</publishTime> |
| | | <publishTime>09/18/2024 16:51:14</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.pdb"> |
| | | <publishTime>09/13/2024 10:18:34</publishTime> |
| | | <publishTime>09/18/2024 16:51:14</publishTime> |
| | | </File> |
| | | <File Include="bin/Swashbuckle.Core.dll"> |
| | | <publishTime>02/16/2015 01:57:08</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.dll"> |
| | | <publishTime>09/13/2024 10:15:38</publishTime> |
| | | <publishTime>09/18/2024 16:51:13</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.pdb"> |
| | | <publishTime>09/13/2024 10:15:38</publishTime> |
| | | <publishTime>09/18/2024 16:51:13</publishTime> |
| | | </File> |
| | | <File Include="bin/System.Buffers.dll"> |
| | | <publishTime>07/19/2017 18:01:28</publishTime> |
| | |
| | | <publishTime>05/09/2023 10:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.dll"> |
| | | <publishTime>09/13/2024 10:18:34</publishTime> |
| | | <publishTime>09/16/2024 09:23:15</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.pdb"> |
| | | <publishTime>09/13/2024 10:18:34</publishTime> |
| | | <publishTime>09/16/2024 09:23:15</publishTime> |
| | | </File> |
| | | <File Include="bin/WebActivatorEx.dll"> |
| | | <publishTime>11/24/2014 19:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>09/13/2024 10:18:58</publishTime> |
| | | <publishTime>09/18/2024 16:51:38</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>09/13/2024 10:18:58</publishTime> |
| | | <publishTime>09/18/2024 16:51:38</publishTime> |
| | | </File> |
| | | <File Include="bin/WebGrease.dll"> |
| | | <publishTime>07/18/2013 01:03:52</publishTime> |
| | |
| | | <publishTime>05/06/2024 13:47:57</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>09/13/2024 10:20:52</publishTime> |
| | | <publishTime>09/18/2024 16:51:59</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- |
| | | https://go.microsoft.com/fwlink/?LinkID=208121. |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <DeleteExistingFiles>False</DeleteExistingFiles> |
| | | <ExcludeApp_Data>False</ExcludeApp_Data> |
| | | <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> |
| | | <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> |
| | | <LastUsedPlatform>Any CPU</LastUsedPlatform> |
| | | <PublishProvider>FileSystem</PublishProvider> |
| | | <PublishUrl>D:\ç½ç«åå¸\æºäºMESWMS\API</PublishUrl> |
| | | <WebPublishMethod>FileSystem</WebPublishMethod> |
| | | </PropertyGroup> |
| | | </Project> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- |
| | | https://go.microsoft.com/fwlink/?LinkID=208121. |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | </Project> |
| | |
| | | <publishTime>02/22/2013 16:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>09/13/2024 15:10:57</publishTime> |
| | | <publishTime>09/20/2024 08:59:29</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.pdb"> |
| | | <publishTime>09/13/2024 15:10:57</publishTime> |
| | | <publishTime>09/20/2024 08:59:29</publishTime> |
| | | </File> |
| | | <File Include="bin/BouncyCastle.Crypto.dll"> |
| | | <publishTime>12/18/2020 05:32:28</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>09/13/2024 15:10:55</publishTime> |
| | | <publishTime>09/20/2024 08:59:27</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.pdb"> |
| | | <publishTime>09/13/2024 15:10:55</publishTime> |
| | | <publishTime>09/20/2024 08:59:27</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 22:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>09/13/2024 15:10:49</publishTime> |
| | | <publishTime>09/20/2024 08:59:19</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.pdb"> |
| | | <publishTime>09/13/2024 15:10:49</publishTime> |
| | | <publishTime>09/20/2024 08:59:19</publishTime> |
| | | </File> |
| | | <File Include="bin/Grpc.Core.Api.dll"> |
| | | <publishTime>03/22/2022 13:17:26</publishTime> |
| | |
| | | <publishTime>07/25/2012 19:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>09/13/2024 15:10:50</publishTime> |
| | | <publishTime>09/20/2024 08:59:20</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.pdb"> |
| | | <publishTime>09/13/2024 15:10:50</publishTime> |
| | | <publishTime>09/20/2024 08:59:20</publishTime> |
| | | </File> |
| | | <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> |
| | | <publishTime>04/15/2024 12:55:45</publishTime> |
| | |
| | | <publishTime>10/23/2021 17:07:54</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>09/13/2024 15:10:47</publishTime> |
| | | <publishTime>09/20/2024 08:59:17</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.pdb"> |
| | | <publishTime>09/13/2024 15:10:47</publishTime> |
| | | <publishTime>09/20/2024 08:59:17</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>09/13/2024 15:10:48</publishTime> |
| | | <publishTime>09/20/2024 08:59:18</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.pdb"> |
| | | <publishTime>09/13/2024 15:10:48</publishTime> |
| | | <publishTime>09/20/2024 08:59:18</publishTime> |
| | | </File> |
| | | <File Include="bin/RestSharp.dll"> |
| | | <publishTime>08/31/2012 06:22:50</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>09/13/2024 15:10:48</publishTime> |
| | | <publishTime>09/20/2024 08:59:18</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.pdb"> |
| | | <publishTime>09/13/2024 15:10:48</publishTime> |
| | | <publishTime>09/20/2024 08:59:18</publishTime> |
| | | </File> |
| | | <File Include="bin/Swashbuckle.Core.dll"> |
| | | <publishTime>02/16/2015 01:57:08</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.dll"> |
| | | <publishTime>09/13/2024 15:08:19</publishTime> |
| | | <publishTime>09/20/2024 08:56:16</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.pdb"> |
| | | <publishTime>09/13/2024 15:08:19</publishTime> |
| | | <publishTime>09/20/2024 08:56:16</publishTime> |
| | | </File> |
| | | <File Include="bin/System.Buffers.dll"> |
| | | <publishTime>07/19/2017 18:01:28</publishTime> |
| | |
| | | <publishTime>05/09/2023 10:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.dll"> |
| | | <publishTime>09/11/2024 21:15:43</publishTime> |
| | | <publishTime>09/20/2024 08:56:23</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.pdb"> |
| | | <publishTime>09/11/2024 21:15:51</publishTime> |
| | | <publishTime>09/20/2024 08:56:23</publishTime> |
| | | </File> |
| | | <File Include="bin/WebActivatorEx.dll"> |
| | | <publishTime>11/24/2014 19:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>09/13/2024 15:11:26</publishTime> |
| | | <publishTime>09/20/2024 08:59:57</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>09/13/2024 15:11:26</publishTime> |
| | | <publishTime>09/20/2024 08:59:57</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.XmlSerializers.dll"> |
| | | <publishTime>08/16/2024 16:55:28</publishTime> |
| | |
| | | <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> |
| | | <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>D:\ç½ç«åå¸\å端代ç \MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile10.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>D:\æºäºè¿æ\MES\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile10.pubxml</NameOfLastUsedPublishProfile> |
| | | <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |
| | | <UseIISExpress>true</UseIISExpress> |
| | | <Use64BitIISExpress /> |
| | |
| | | D:\ç½ç«åå¸\å端代ç \MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll |
| | | D:\ç½ç«åå¸\å端代ç \MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb |
| | | D:\ç½ç«åå¸\å端代ç \MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache |