斯末尔单品过站优化,增加自动开工功能,自动完工,华舟数采优化
| | |
| | | throw (e); |
| | | return null; |
| | | } |
| | | finally |
| | | { |
| | | // å
³é®ï¼å¼ºå¶éæ¾ DataAdapterï¼è§£å³è¿æ¥æ³æ¼ |
| | | dap.Dispose(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡SQLå¹¶è¿åDATASETåéè¯¯ä¿¡æ¯ |
| | |
| | | private readonly object _collectingLock = new object(); |
| | | private DateTime _lastCollectionTime; |
| | | private CancellationTokenSource _cts; |
| | | private HttpClient _httpClient; |
| | | private static HttpClient _httpClient; |
| | | private readonly object _taskLock = new object(); |
| | | |
| | | public EquipmentCollectionForm_HZ() |
| | | { |
| | | InitializeComponent(); |
| | | |
| | | // åå§åHttpClient |
| | | _httpClient = new HttpClient |
| | | if (_httpClient == null) |
| | | { |
| | | Timeout = TimeSpan.FromSeconds(30) |
| | | }; |
| | | _httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(30) }; |
| | | } |
| | | |
| | | // 设置æåééæ¶é´æä»¶è·¯å¾ |
| | | _lastCollectTimeFile = Path.Combine( |
| | |
| | | // ä¿®æ¹åç宿¶è·åæ°æ®æ¹æ³ - 弿¥ä¼åç |
| | | private async void timer_Tick(object sender, EventArgs e) |
| | | { |
| | | |
| | | // 鲿¢é夿§è¡ |
| | | lock (_collectingLock) |
| | | lock (_taskLock) |
| | | { |
| | | if (_isCollecting) |
| | | { |
| | | CustomWriteLog("䏿¬¡ééä»å¨è¿è¡ä¸ï¼è·³è¿æ¬æ¬¡éé", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | return; |
| | | } |
| | | if (_isCollecting) return; |
| | | _isCollecting = true; |
| | | } |
| | | |
| | |
| | | //宿¶çæäº§éæ±æ¥å - ä¿æä¸å |
| | | private async void Time_CLHB_Tick(object sender, EventArgs e) |
| | | { |
| | | |
| | | if (!Monitor.TryEnter(_taskLock, 1000)) |
| | | { |
| | | CustomWriteLog("é鿣卿§è¡ï¼è·³è¿æ¬æ¬¡äº§éæ±æ¥", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | return; |
| | | } |
| | | try |
| | | { |
| | | CustomWriteLog("=== å¼å§æ§è¡äº§éæ±æ¥å宿¶ä»»å¡ ===", DateTime.Now.ToString("yyyy-MM-dd")); |
| | |
| | | this.Controls.Add(this.label2); |
| | | this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.Name = "ReadCSV_New"; |
| | | this.Text = "ReadCSV"; |
| | | this.Text = "ReadCSV_NEW"; |
| | | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ReadCSV_FormClosing); |
| | | this.ResumeLayout(false); |
| | | this.PerformLayout(); |
| | |
| | | private List<CodeNameItem> empHistoryList = new List<CodeNameItem>(); |
| | | private List<CodeNameItem> sourceHistoryList = new List<CodeNameItem>(); |
| | | |
| | | public static int num = 0; |
| | | public static DateTime time = DateTime.Now.AddMinutes(-5); |
| | | |
| | | public static string AllProcessExchange = "-1"; |
| | | public static string AllProcessExchangeHProcExchBillNo = ""; |
| | | public static string AllProcessExchangeHProcExchInterID = ""; |
| | | public static string AllSNBarcodeProcCtrl = ""; |
| | | public static string AllHProcID = "0"; |
| | | public static string AllHProName = ""; |
| | | public static double AllHQty = 0; |
| | | public static string AllBeginWork = "-1"; |
| | | public static Dictionary<string, double> RemainingQtyCache = new Dictionary<string, double>(); // ç¼åæ¯ä¸ªæµè½¬å¡+å·¥åºçå©ä½æ°é |
| | | public static Dictionary<string, DateTime> CacheUpdateTime = new Dictionary<string, DateTime>(); // è®°å½æ¯æ¬¡ç¼åæ´æ°çæ¶é´ï¼ç¨äºå¤ææ¯å¦éè¦å·æ° |
| | | public string CurrentActiveKey = "";//ç¼åé®ï¼ç¨äºå¤ææµè½¬å¡æ¯å¦åæ¢ |
| | | |
| | | public ReadCSV_New() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | } |
| | | } |
| | | |
| | | public static int num = 0; |
| | | public static DateTime time = DateTime.Now.AddMinutes(-5); |
| | | |
| | | |
| | | //ç»è£
å·¥åºCSV è¿ç«è¯»å æ°ç |
| | | |
| | |
| | | DateTime NowTime = DateTime.Parse(item["æµè¯æ¶é´"].ToString()); |
| | | string HBadCodeSN = item["åºå·"].ToString(); |
| | | |
| | | |
| | | |
| | | if (((NowTime >= ActionTime && NowTime < EndTime) || dt.Rows.Count <= 20) && HBadCodeSN != "" && list.Contains(HBadCodeSN) == false) |
| | | { |
| | | |
| | |
| | | string HType = ""; |
| | | int HCount = 1; |
| | | |
| | | DataSet ds = oCN.RunProcReturn(@"select * from Sb_EquipMentCollection_SN with(nolock) where HBarCode='" + HBarCode + "' and HProcNumber='" + HProcNumber + "'", "Sb_EquipMentCollection_SN"); |
| | | DataSet ds = oCN.RunProcReturn(@"select * from Sb_EquipMentCollection_SN with(nolock) where HBarCode='" + HBarCode + "' and HProcNumber='" + HProcNumber + "'", "Sb_EquipMentCollection_SN"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | if (Get_AllowLoadData(HBarCode, HProcNumber, flag_1, out flag_2)) |
| | |
| | | { |
| | | string sql1 = $@"insert into Sb_EquipMentCollectionTechParam_SN(HSourceCode,HEmpCode,HType,HBarCode,HCount,HCreateTime,HDate,HResult,HProcNumber,HFlag) |
| | | values('{HSourceCode}','{HEmpCode}','{HType}','{HBarCode}','{HCount_1}','{HCreateTime}',GETDATE(),'{HResult}','{HProcNumber}','{HFlag}')"; |
| | | oCN.RunProc(sql1); |
| | | oCN.RunProc(sql1); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public static string AllProcessExchange = "-1"; |
| | | public static string AllProcessExchangeHProcExchBillNo = ""; |
| | | public static string AllProcessExchangeHProcExchInterID = ""; |
| | | public static string AllSNBarcodeProcCtrl = ""; |
| | | public static string AllHProcID = "0"; |
| | | public static string AllHProName = ""; |
| | | public static double AllHQty = 0; |
| | | public static Dictionary<string, double> RemainingQtyCache = new Dictionary<string, double>(); // ç¼åæ¯ä¸ªæµè½¬å¡+å·¥åºçå©ä½æ°é |
| | | public static Dictionary<string, DateTime> CacheUpdateTime = new Dictionary<string, DateTime>(); // è®°å½æ¯æ¬¡ç¼åæ´æ°çæ¶é´ï¼ç¨äºå¤ææ¯å¦éè¦å·æ° |
| | | public string CurrentActiveKey = "";//ç¼åé®ï¼ç¨äºå¤ææµè½¬å¡æ¯å¦åæ¢ |
| | | |
| | | //æ ¹æ®æ¡ç 夿æ¯å¦ä¿å |
| | | public bool Get_AllowLoadData(string HBarCode, string HProcNumber, bool flag_1, out bool flag_2) |
| | | { |
| | |
| | | flag_2 = false; |
| | | return false; |
| | | } |
| | | |
| | | //夿é¿åº¦æ¯å¦ä¸º29ä½ æ å°è½¦é´ |
| | | string HProcExchBillNo = ""; |
| | | string HProcExchInterID = ""; |
| | |
| | | AllHProcID = ds1.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | AllHProName = ds1.Tables[0].Rows[0]["HName"].ToString(); |
| | | } |
| | | //夿å½åæµè½¬å¡å¯¹åºçå·¥åºæ°æ®æ¯å¦å¼å·¥ |
| | | ds1 = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + AllProcessExchangeHProcExchBillNo + "' and HProcID='" + AllHProcID + "'", "Sc_ICMOBillStatus_Tmp"); |
| | | |
| | | if (ds1.Tables[0].Rows.Count > 0) |
| | | { |
| | | //çäº§ç¶æä¸´æ¶è¡¨ ç¶æå¦æä¸º0 é£å°±æ¯æ²¡å¼å·¥ è¿å
¥å¼å·¥å |
| | | if (ds1.Tables[0].Rows[0]["HICMOStatus"].ToString() == "0") |
| | | { |
| | | bool completeFlag = SaveMESBeginWorkFrom_ZD(ds1.Tables[0].Rows[0]["HBillType"].ToString(), ds1.Tables[0].Rows[0]["HInterID"].ToString(), ds1.Tables[0].Rows[0]["HSourceEntryID"].ToString(), ds1.Tables[0].Rows[0]["HSourceBillNo"].ToString(), this.HEmpCodeName.Text, ds1.Tables[0].Rows[0]["HSourceBillType"].ToString()); |
| | | if (!completeFlag) |
| | | { |
| | | MessageBox.Show(new Form { TopMost = true }, "æµè½¬å¡:" + AllProcessExchangeHProcExchBillNo + ",èªå¨çæå¼å·¥å失败!"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | //æ¥è¯¢æµè½¬å¡æ°é |
| | | ds1 = oCN.RunProcReturn(@"SELECT HQty FROM Sc_ProcessExchangeBillSub WITH(NOLOCK) where HInterID=" + HProcExchInterID + " and HProcID=" + AllHProcID, "Sc_ProcessExchangeBillSub"); |
| | | if (ds1.Tables[0].Rows.Count > 0) |
| | |
| | | |
| | | string HProcID = AllHProcID; |
| | | string HProName = AllHProName; |
| | | ////ç¬¬ä¸æ¬¡æµè½¬å¡+å·¥åºååé¢çåå¯¹æ¯ å¦ææ¯åä¸ä¸ªæµè½¬å¡å°±ä¸è¿è¡å¤æ |
| | | //if ((HProcExchBillNo + HProcNumber) == AllSNBarcodeProcCtrl) |
| | | //{ |
| | | |
| | | //夿 å½åå·¥åº æ¡ç çä¸ä¸éå·¥åºææ²¡æè¿ç« |
| | | ds1 = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S_New '" + HBarCode + "'," + HProcID, "h_p_Sc_SNBarcodeProcCtrl_S_New"); |
| | | |
| | |
| | | flag_2 = true; |
| | | return false; |
| | | } |
| | | //} |
| | | |
| | | |
| | | // æ¥è¯¢åºç«æ°éæ¯å¦è¶
è¿æµè½¬å¡æ°é |
| | |
| | | return true; |
| | | } |
| | | |
| | | //èªå¨å¼å·¥ |
| | | public bool SaveMESBeginWorkFrom_ZD(string HBillType, string HSourceInterID, string HSourceEntryID, string HSourceBillNo, string user, string HSourceBillType) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | ds = oCN.RunProcReturn("exec h_p_JIT_GetInfoByICMOStatusInterID @HSourceInterID='" + HSourceInterID + "',@HSourceEntryID='" + HSourceEntryID + "',@HSourceBillNo='" + HSourceBillNo + "',@HSourceBillType='" + HBillType + "'", "h_p_JIT_GetInfoByICMOStatusInterID"); |
| | | string sExeReturnInfo = ""; |
| | | long HProcID = int.Parse(ds.Tables[0].Rows[0]["HProcID"].ToString()); |
| | | long HMaterID = int.Parse(ds.Tables[0].Rows[0]["HMaterID"].ToString()); |
| | | long HSourceID = int.Parse(ds.Tables[0].Rows[0]["HSourceID"].ToString()); |
| | | string HMainSourceBillNo = ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(); |
| | | long HMainSourceInterID = int.Parse(ds.Tables[0].Rows[0]["HSourceInterID"].ToString()); |
| | | long HMainSourceEntryID = long.Parse(ds.Tables[0].Rows[0]["HSourceEntryID"].ToString()); |
| | | string HMainSourceBillType = HSourceBillType == null ? "" : HSourceBillType; |
| | | long HDeptID = int.Parse(ds.Tables[0].Rows[0]["HDeptID"].ToString()); |
| | | long HICMOInterID = int.Parse(ds.Tables[0].Rows[0]["HICMOInterID"].ToString()); |
| | | long HICMOEntryID = int.Parse(ds.Tables[0].Rows[0]["HICMOEntryID"].ToString()); |
| | | string HICMOBillNo = ds.Tables[0].Rows[0]["HICMOBillNo"].ToString(); |
| | | long HProcExchInterID = int.Parse(ds.Tables[0].Rows[0]["HProcExchInterID"].ToString()); |
| | | long HProcExchEntryID = int.Parse(ds.Tables[0].Rows[0]["HProcExchEntryID"].ToString()); |
| | | string HProcExchBillNo = ds.Tables[0].Rows[0]["HProcExchBillNo"].ToString(); |
| | | long HWorkShiftID = 0; |
| | | |
| | | //è·åçæ¬¡ |
| | | DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo '389505','77'", "h_p_Gy_GetWorkShiftInfo"); |
| | | if (set.Tables[0].Rows.Count > 0) |
| | | { |
| | | HWorkShiftID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Employee where HNumber='" + this.HEmpCode.Text + "'", "Gy_Employee"); |
| | | |
| | | long HGroupID = int.Parse(ds.Tables[0].Rows[0]["HGroupID"].ToString()); |
| | | long HEmpID = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString()); |
| | | |
| | | Int64 HInterID = CreateBillID("3787", ref sExeReturnInfo); |
| | | string HBillNo = CreateBillCode_Prod("3787", ref sExeReturnInfo, true); |
| | | |
| | | //ä¿åå |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_BeforeSaveCtrl " + HInterID.ToString() + "," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'," + 1, "h_p_Sc_MESEndWorkBill_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | oCN.RunProc("Insert Into Sc_MESBeginWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HBeginWorkTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + |
| | | ",HRunStatus,HSourceBeginQty,HWorkShiftID,HPeopleSum" + |
| | | ") " + |
| | | " values('3787','3787'," + HInterID + ",'" + HBillNo + "',1,getdate(),'" + user + "',getdate()" + |
| | | ",Year(getdate()),Month(getdate()),'èªå¨å¼å·¥'" + |
| | | "," + HICMOInterID + ",'" + HICMOEntryID + "','" + HICMOBillNo + "',0,0,''," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + ",0,0,getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'','','',getdate()" + |
| | | "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + |
| | | "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + |
| | | ",0,0,'" + HWorkShiftID + "',1) "); |
| | | |
| | | |
| | | oCN.RunProc(" Update Sc_MESBeginWorkBillMain set HBillStatus='2',HChecker='" + user + "',HCheckDate=getdate() Where HInterID=" + HInterID.ToString()); |
| | | //æ ¹æ®å¼å·¥åå
ç åå°çäº§ç¶æä¸´æ¶è¡¨ä¸»å
ç ï¼ç¶åæ´æ°çäº§ç¶æä¸´æ¶è¡¨ç¶æä¸ºï¼å¾
ç产 ä»»å¡åç¶æ(0å¾
ç产ï¼1ç产ä¸ï¼2æèµ·ï¼3å·²å®å·¥) |
| | | oCN.RunProc("exec h_p_JIT_MESBeginWorkBill_BeginWork @HInterId=" + HInterID + ",@flag='å¼å·¥'"); |
| | | |
| | | //ä¿åå |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_AfterSaveCtrl " + HInterID.ToString() + "," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'," + 1, "h_p_Sc_MESBeginWorkBill_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #region è·å å
ç åæ®å· |
| | | public static Int64 CreateBillID(string BillCode, ref string sReturn) |
| | | { |
| | | string BillType = ""; |
| | | DataSet Ds; |
| | | DBHelper oCn = new DBHelper(); |
| | | Int64 lID; |
| | | Ds = oCn.RunProcReturn("select * from Gy_BillNumber with (nolock) where BillCode='" + BillCode.Trim() + "'", "Gy_BillNumber"); |
| | | if (Ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | lID = isLong(Ds.Tables[0].Rows[0]["IDNow"].ToString()); |
| | | BillType = Ds.Tables[0].Rows[0]["BillType"].ToString().Trim(); |
| | | } |
| | | else |
| | | { |
| | | lID = 0; |
| | | } |
| | | //åç±»ååæ® èªå¢1 |
| | | if (BillType.Trim() != "") |
| | | { |
| | | oCn.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'"); |
| | | } |
| | | oCn.CnClose(); |
| | | oCn.CnDispose(); |
| | | oCn = null; |
| | | Ds = null; |
| | | return lID; |
| | | } |
| | | |
| | | public static string CreateBillCode_Prod(string BillCode, ref string sReturn, bool Add) |
| | | { |
| | | try |
| | | { |
| | | string BillType = ""; |
| | | DataSet Ds; |
| | | DBHelper oCn = new DBHelper(); |
| | | string sBIllNO; |
| | | Ds = oCn.RunProcReturn("exec h_p_Xt_GetMaxBillNo '" + BillCode + "'", "h_p_Xt_GetMaxBillNo"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sBIllNO = "ERROR"; |
| | | } |
| | | else |
| | | { |
| | | sBIllNO = isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]); |
| | | } |
| | | oCn.CnClose(); |
| | | oCn.CnDispose(); |
| | | oCn = null; |
| | | Ds = null; |
| | | return sBIllNO; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return "ERROR"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è¾
婿¹æ³ |
| | | //夿æ¯å¦æ¯INT64 |
| | | public static Int64 isLong(object message) |
| | | { |
| | | try |
| | | { |
| | | return Convert.ToInt64(message); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | //夿æ¯å¦NULL |
| | | public static string isStrNull(object message) |
| | | { |
| | | try |
| | | { |
| | | if (message == null) |
| | | { |
| | | return ""; |
| | | } |
| | | else |
| | | { |
| | | return message.ToString().Trim(); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | //å
³é |
| | | private void ReadCSV_FormClosing(object sender, FormClosingEventArgs e) |
| | | { |
| | | if (num == 1) |
| | |
| | | HistoryConfigHelper.SaveSources(sourceHistoryList, lastSrcCode); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | public static DateTime time = DateTime.Now.AddMinutes(-5); |
| | | public static decimal hqty = 2; |
| | | |
| | | public static string AllBeginWork = "-1"; //æ¯å¦å¼å·¥ |
| | | public static string AllProcessExchange = "-1"; //æµè½¬å¡é¡¹ç®å· |
| | | public static string AllProcessExchangeHProcExchBillNo = ""; //æµè½¬å¡å· |
| | | public static string AllProcessExchangeHProcExchInterID = ""; //æµè½¬å¡ä¸»ç |
| | | public static string AllSNBarcodeProcCtrl = ""; //æµè½¬å¡+å·¥åºçæ¼å |
| | | public static string AllHProcID = "0"; //å·¥åºid |
| | | public static string AllHProName = ""; //å·¥åºåå |
| | | public static double AllHQty = 0; //é»è®¤æµè½¬å¡æ°é 妿åºç«åææ°æ®ä¼æ´æ°æåºç«åæ°é |
| | | public static Dictionary<string, double> RemainingQtyCache = new Dictionary<string, double>(); // ç¼åæ¯ä¸ªæµè½¬å¡+å·¥åºçå©ä½æ°é |
| | | public static Dictionary<string, DateTime> CacheUpdateTime = new Dictionary<string, DateTime>(); // è®°å½æ¯æ¬¡ç¼åæ´æ°çæ¶é´ï¼ç¨äºå¤ææ¯å¦éè¦å·æ° |
| | | public string CurrentActiveKey = "";//ç¼åé®ï¼ç¨äºå¤ææµè½¬å¡æ¯å¦åæ¢ |
| | | |
| | | // æ°å¢éæåéï¼è®°å½æ¯ä¸ªé¡¹ç®å·çå¼å·¥ç¶æ |
| | | public static Dictionary<string, bool> ProjectBeginWorkStatus = new Dictionary<string, bool>(); |
| | | |
| | | //ééæç
§å·¥åºææ¬ è¿ç«è¯»å æ°ç |
| | | |
| | | //è¯»åæ°æ® |
| | |
| | | { |
| | | stream = new StreamReader($@"D:\{year}\{month}\{day}\{dataTime}gy.txt", Encoding.GetEncoding("gb2312")); |
| | | FileData = stream.ReadToEnd(); |
| | | //è·åç³»ç»åæ° |
| | | //è·åå·¥èºåæ° |
| | | Xt_Gy_RoutBill(FileData); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | public static string AllBeginWork = "-1"; //æ¯å¦å¼å·¥ |
| | | public static string AllProcessExchange = "-1"; //æµè½¬å¡é¡¹ç®å· |
| | | public static string AllProcessExchangeHProcExchBillNo = ""; //æµè½¬å¡å· |
| | | public static string AllProcessExchangeHProcExchInterID = ""; //æµè½¬å¡ä¸»ç |
| | | |
| | | //è¯»åææ¬æ¡ç |
| | | public void Xt_ReadText(string FileData) |
| | | { |
| | | //è·åææ¬æææ°æ® |
| | |
| | | string HResult = list[i]["HResult"].ToString(); |
| | | string HProcNumber = list[i]["HProcNumber"].ToString(); |
| | | int HFlag = 0; |
| | | //DataSet ds = oCN.RunProcReturn(@"select * from Sb_EquipMentCollection_SN where HBarCode='" + HBarCode + "' and HCreateTime='" + HCreateTime + "'", "Sb_EquipMentCollection_SN"); |
| | | |
| | | |
| | | if (true) |
| | | { |
| | | DataSet dataSet; |
| | | |
| | | string HProjectNum = HBarCode.Substring(18, 8); |
| | | //éè¿æªå项ç®å· å¦æç¬¬ä¸æ¡æ°æ®ç项ç®å·è·åé¢ç䏿 · å°±ä¸è¿è¡å¤æ |
| | | if (HBarCode.Contains(AllProcessExchange) == false) |
| | | if (HProjectNum != AllProcessExchange) |
| | | { |
| | | |
| | | //夿æµè½¬å¡æ¯å¦åå¨ |
| | |
| | | if (AllProcessExchange == HProjectNum) |
| | | { |
| | | //éè¿æªå项ç®å· å¦æç¬¬ä¸æ¡æ°æ®ç项ç®å·è·åé¢ç䏿 · å°±ä¸è¿è¡å¤æ |
| | | if (HBarCode.Contains(AllBeginWork) == false) |
| | | //åªå¤æç¬¬ä¸ä¸ªSNç æ¯å¦è¿è¡å¼å·¥ï¼æ²¡æå¼å·¥èªå¨å¼å·¥ |
| | | if (HProjectNum != AllBeginWork) |
| | | { |
| | | //夿å½åæµè½¬å¡å¯¹åºçå·¥åºæ°æ®æ¯å¦å¼å·¥ |
| | | dataSet = oCN.RunProcReturn("select HICMOStatus from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + AllProcessExchangeHProcExchBillNo + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp"); |
| | | |
| | | // æ¥è¯¢å·¥åºä¿¡æ¯ï¼ä¸åï¼ |
| | | dataSet = oCN.RunProcReturn(@"SELECT HItemID,HName FROM Gy_Process WITH(NOLOCK) WHERE HNumber='" + HProcNumber + "'", "Gy_Process"); |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | AllBeginWork = HProjectNum; |
| | | AllHProcID = dataSet.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | AllHProName = dataSet.Tables[0].Rows[0]["HName"].ToString(); |
| | | } |
| | | // æ¥è¯¢å¼å·¥ç¶æè¡¨ï¼ä¸åï¼ |
| | | dataSet = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + AllProcessExchangeHProcExchBillNo + "' and HProcID='" + AllHProcID + "'", "Sc_ICMOBillStatus_Tmp"); |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | // å
读åç¶æï¼å夿èµå¼æ¶æºï¼æ ¸å¿ä¿®æ£ï¼ |
| | | string hicmoStatus = dataSet.Tables[0].Rows[0]["HICMOStatus"].ToString(); |
| | | |
| | | // æ
åµ1ï¼ç¶æ=1ï¼å·²å¼å·¥ï¼â ç´æ¥æ è®° |
| | | if (hicmoStatus == "1") |
| | | { |
| | | AllBeginWork = HProjectNum; |
| | | } |
| | | // æ
åµ2ï¼ç¶æ=0ï¼æªå¼å·¥ï¼â æ§è¡å¼å·¥æä½ï¼æåææ è®° |
| | | else if (hicmoStatus == "0") |
| | | { |
| | | bool completeFlag = SaveMESBeginWorkFrom_ZD(dataSet.Tables[0].Rows[0]["HBillType"].ToString(), dataSet.Tables[0].Rows[0]["HInterID"].ToString(), dataSet.Tables[0].Rows[0]["HSourceEntryID"].ToString(), dataSet.Tables[0].Rows[0]["HSourceBillNo"].ToString(), this.HEmpCodeName.Text, dataSet.Tables[0].Rows[0]["HSourceBillType"].ToString()); |
| | | if (completeFlag) |
| | | { |
| | | // å¼å·¥æåï¼ææ 记为已å¼å·¥ï¼ä½ ç¡®è®¤æ¤æ¶ç¶æå·²æ´1ï¼ |
| | | AllBeginWork = HProjectNum; |
| | | } |
| | | else |
| | | { |
| | | // å¼å·¥å¤±è´¥ï¼é置为-1ï¼é¿å
è¯¯å¤ |
| | | AllBeginWork = "-1"; |
| | | MessageBox.Show("èªå¨çæå¼å·¥å失败!"); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // 没æ¥å°è®°å½ â é置为-1 |
| | | AllBeginWork = "-1"; |
| | | } |
| | | } |
| | | |
| | | |
| | | //满足ä¸è¿°æ¡ä»¶ å¹¶ä¸é¡¹ç®å· åèµå¼é¡¹ç®å·ä¸æ · åè¿è¡æ°å¢ |
| | | if (AllBeginWork == HProjectNum) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | //读åç³»ç»åæ° |
| | | //读åå·¥èºåæ° |
| | | public void Xt_Gy_RoutBill(string FileData) |
| | | { |
| | | FileData = FileData.Substring(0, FileData.Length - 1); |
| | |
| | | { |
| | | string sql = $@"insert into Sb_EquipMentCollectionTechParam_SN(HSourceCode,HEmpCode,HType,HBarCode,HCount,HCreateTime,HDate,HResult,HProcNumber,HFlag) |
| | | values('{HSourceCode}','{HEmpCode}','{HType}','{HBarCode}','{HCount}','{HCreateTime}',GETDATE(),'{HResult}','{HProcNumber}','{HFlag}')"; |
| | | oCN.RunProc(sql); |
| | | //ListSelect.Items.Add("æ¡ç :" + HBarCode + ",æ¥æ:" + HCreateTime + ",ç»æ:" + HResult); |
| | | oCN.RunProc(sql); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //CustomWriteLog("æ¶é´ä¸å¨ä¿åèå´å
", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public static string AllSNBarcodeProcCtrl = ""; //æµè½¬å¡+å·¥åºçæ¼å |
| | | public static string AllHProcID = "0"; //å·¥åºid |
| | | public static string AllHProName = ""; //å·¥åºåå |
| | | public static double AllHQty = 0; //é»è®¤æµè½¬å¡æ°é 妿åºç«åææ°æ®ä¼æ´æ°æåºç«åæ°é |
| | | public static Dictionary<string, double> RemainingQtyCache = new Dictionary<string, double>(); // ç¼åæ¯ä¸ªæµè½¬å¡+å·¥åºçå©ä½æ°é |
| | | public static Dictionary<string, DateTime> CacheUpdateTime = new Dictionary<string, DateTime>(); // è®°å½æ¯æ¬¡ç¼åæ´æ°çæ¶é´ï¼ç¨äºå¤ææ¯å¦éè¦å·æ° |
| | | public string CurrentActiveKey = "";//ç¼åé®ï¼ç¨äºå¤ææµè½¬å¡æ¯å¦åæ¢ |
| | | |
| | | //æ ¹æ®æ¡ç 夿æ¯å¦ä¿å |
| | | public bool Get_AllowLoadData(string HBarCode, string HProcNumber, bool flag_1, string HProcExchBillNo, string HProcExchInterID, out bool flag_2) |
| | | { |
| | |
| | | AllSNBarcodeProcCtrl = HProcExchBillNo + HProcNumber; |
| | | } |
| | | |
| | | ////ç¬¬ä¸æ¬¡æµè½¬å¡+å·¥åºååé¢çåå¯¹æ¯ å¦ææ¯åä¸ä¸ªæµè½¬å¡å°±ä¸è¿è¡å¤æ |
| | | //if ((HProcExchBillNo + HProcNumber) == AllSNBarcodeProcCtrl) |
| | | //{ |
| | | //è¿ç«æ§å¶ |
| | | //夿å½åå·¥åºå¯¹åºçæ¡ç æ¯å¦ä¸éå·¥åºè¿ç« |
| | | ds1 = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S_New '" + HBarCode + "'," + AllHProcID, "h_p_Sc_SNBarcodeProcCtrl_S_New"); |
| | |
| | | flag_2 = true; |
| | | return false; |
| | | } |
| | | //} |
| | | |
| | | |
| | | // æ¥è¯¢åºç«æ°éæ¯å¦è¶
è¿æµè½¬å¡æ°é |
| | |
| | | flag_2 = false; |
| | | return true; |
| | | } |
| | | //èªå¨å¼å·¥ |
| | | public bool SaveMESBeginWorkFrom_ZD(string HBillType, string HSourceInterID, string HSourceEntryID, string HSourceBillNo, string user, string HSourceBillType) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | ds = oCN.RunProcReturn("exec h_p_JIT_GetInfoByICMOStatusInterID @HSourceInterID='" + HSourceInterID + "',@HSourceEntryID='" + HSourceEntryID + "',@HSourceBillNo='" + HSourceBillNo + "',@HSourceBillType='" + HBillType + "'", "h_p_JIT_GetInfoByICMOStatusInterID"); |
| | | string sExeReturnInfo = ""; |
| | | long HProcID = int.Parse(ds.Tables[0].Rows[0]["HProcID"].ToString()); |
| | | long HMaterID = int.Parse(ds.Tables[0].Rows[0]["HMaterID"].ToString()); |
| | | long HSourceID = int.Parse(ds.Tables[0].Rows[0]["HSourceID"].ToString()); |
| | | string HMainSourceBillNo = ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(); |
| | | long HMainSourceInterID = int.Parse(ds.Tables[0].Rows[0]["HSourceInterID"].ToString()); |
| | | long HMainSourceEntryID = long.Parse(ds.Tables[0].Rows[0]["HSourceEntryID"].ToString()); |
| | | string HMainSourceBillType = HSourceBillType == null ? "" : HSourceBillType; |
| | | long HDeptID = int.Parse(ds.Tables[0].Rows[0]["HDeptID"].ToString()); |
| | | long HICMOInterID = int.Parse(ds.Tables[0].Rows[0]["HICMOInterID"].ToString()); |
| | | long HICMOEntryID = int.Parse(ds.Tables[0].Rows[0]["HICMOEntryID"].ToString()); |
| | | string HICMOBillNo = ds.Tables[0].Rows[0]["HICMOBillNo"].ToString(); |
| | | long HProcExchInterID = int.Parse(ds.Tables[0].Rows[0]["HProcExchInterID"].ToString()); |
| | | long HProcExchEntryID = int.Parse(ds.Tables[0].Rows[0]["HProcExchEntryID"].ToString()); |
| | | string HProcExchBillNo = ds.Tables[0].Rows[0]["HProcExchBillNo"].ToString(); |
| | | long HWorkShiftID = 0; |
| | | |
| | | //è·åçæ¬¡ |
| | | DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo '389505','77'", "h_p_Gy_GetWorkShiftInfo"); |
| | | if (set.Tables[0].Rows.Count > 0) |
| | | { |
| | | HWorkShiftID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock) where HNumber='" + this.HEmpCode.Text + "'", "Gy_Employee"); |
| | | |
| | | long HGroupID = int.Parse(ds.Tables[0].Rows[0]["HGroupID"].ToString()); |
| | | long HEmpID = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString()); |
| | | |
| | | |
| | | Int64 HInterID = CreateBillID("3787", ref sExeReturnInfo); |
| | | string HBillNo = CreateBillCode_Prod("3787", ref sExeReturnInfo, true); |
| | | |
| | | |
| | | //ä¿åå |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_BeforeSaveCtrl " + HInterID.ToString() + "," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'," + 1, "h_p_Sc_MESEndWorkBill_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | oCN.RunProc("Insert Into Sc_MESBeginWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HBeginWorkTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + |
| | | ",HRunStatus,HSourceBeginQty,HWorkShiftID,HPeopleSum" + |
| | | ") " + |
| | | " values('3787','3787'," + HInterID + ",'" + HBillNo + "',1,getdate(),'" + user + "',getdate()" + |
| | | ",Year(getdate()),Month(getdate()),'èªå¨å¼å·¥'" + |
| | | "," + HICMOInterID + ",'" + HICMOEntryID + "','" + HICMOBillNo + "',0,0,''," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + ",0,0,getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'','','',getdate()" + |
| | | "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + |
| | | "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + |
| | | ",0,0,'" + HWorkShiftID + "',1) "); |
| | | |
| | | |
| | | oCN.RunProc(" Update Sc_MESBeginWorkBillMain set HBillStatus='2',HChecker='" + user + "',HCheckDate=getdate() Where HInterID=" + HInterID.ToString()); |
| | | |
| | | |
| | | //æ ¹æ®å¼å·¥åå
ç åå°çäº§ç¶æä¸´æ¶è¡¨ä¸»å
ç ï¼ç¶åæ´æ°çäº§ç¶æä¸´æ¶è¡¨ç¶æä¸ºï¼å¾
ç产 ä»»å¡åç¶æ(0å¾
ç产ï¼1ç产ä¸ï¼2æèµ·ï¼3å·²å®å·¥) |
| | | oCN.RunProc("exec h_p_JIT_MESBeginWorkBill_BeginWork @HInterId=" + HInterID + ",@flag='å¼å·¥'"); |
| | | |
| | | |
| | | //ä¿åå |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_AfterSaveCtrl " + HInterID.ToString() + "," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'," + 1, "h_p_Sc_MESBeginWorkBill_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | |
| | | } |
| | | return true; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | #region è·å å
ç åæ®å· |
| | | public static Int64 CreateBillID(string BillCode, ref string sReturn) |
| | | { |
| | | string BillType = ""; |
| | | DataSet Ds; |
| | | DBHelper oCn = new DBHelper(); |
| | | Int64 lID; |
| | | Ds = oCn.RunProcReturn("select * from Gy_BillNumber with (nolock) where BillCode='" + BillCode.Trim() + "'", "Gy_BillNumber"); |
| | | if (Ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | lID = isLong(Ds.Tables[0].Rows[0]["IDNow"].ToString()); |
| | | BillType = Ds.Tables[0].Rows[0]["BillType"].ToString().Trim(); |
| | | } |
| | | else |
| | | { |
| | | lID = 0; |
| | | } |
| | | //åç±»ååæ® èªå¢1 |
| | | if (BillType.Trim() != "") |
| | | { |
| | | oCn.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'"); |
| | | } |
| | | oCn.CnClose(); |
| | | oCn.CnDispose(); |
| | | oCn = null; |
| | | Ds = null; |
| | | return lID; |
| | | } |
| | | |
| | | public static string CreateBillCode_Prod(string BillCode, ref string sReturn, bool Add) |
| | | { |
| | | try |
| | | { |
| | | string BillType = ""; |
| | | DataSet Ds; |
| | | DBHelper oCn = new DBHelper(); |
| | | string sBIllNO; |
| | | Ds = oCn.RunProcReturn("exec h_p_Xt_GetMaxBillNo '" + BillCode + "'", "h_p_Xt_GetMaxBillNo"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sBIllNO = "ERROR"; |
| | | } |
| | | else |
| | | { |
| | | sBIllNO = isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]); |
| | | } |
| | | oCn.CnClose(); |
| | | oCn.CnDispose(); |
| | | oCn = null; |
| | | Ds = null; |
| | | return sBIllNO; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return "ERROR"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è¾
婿¹æ³ |
| | | //夿æ¯å¦æ¯INT64 |
| | | public static Int64 isLong(object message) |
| | | { |
| | | try |
| | | { |
| | | return Convert.ToInt64(message); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | //夿æ¯å¦NULL |
| | | public static string isStrNull(object message) |
| | | { |
| | | try |
| | | { |
| | | if (message == null) |
| | | { |
| | | return ""; |
| | | } |
| | | else |
| | | { |
| | | return message.ToString().Trim(); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | //å
³é |
| | | private void ReadyDataForm_FormClosing(object sender, FormClosingEventArgs e) |
| | | { |
| | | if (num == 1) |
| | |
| | | HistoryConfigHelper.SaveSources(sourceHistoryList, lastSrcCode); |
| | | } |
| | | |
| | | |
| | | //æ£ç´¢è¡¥æ¼ |
| | | private void btnSelectAll_Click(object sender, EventArgs e) |
| | | { |
| | | if (num == 0) |
| | |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.csproj.CopyComplete |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.exe |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.pdb |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.csproj.AssemblyReference.cache |
| | |
| | | CustomWriteLog("2.1.15 ååç»æ :" + HProcNumber + "----" + timer.Elapsed, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | // ===== 夿æ¯å¦èªå¨å®å·¥ ===== |
| | | DataSet dsMainFinal = oCN.RunProcReturn($"select HQty, HBadCount from Sc_StationOutBillMain where HInterID={HInterID}", "temp"); |
| | | DataSet dsMainFinal = oCN.RunProcReturn($"select HQty, HBadCount from Sc_StationOutBillMain where HInterID={HInterID}", "Sc_StationOutBillMain"); |
| | | CustomWriteLog("2.1.15 ååç»æ :" + HProcNumber + "----" + timer.Elapsed, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | if (dsMainFinal.Tables[0].Rows.Count > 0) |
| | | { |
| | | double total = double.Parse(dsMainFinal.Tables[0].Rows[0]["HQty"].ToString()) |
| | | + double.Parse(dsMainFinal.Tables[0].Rows[0]["HBadCount"].ToString()); |
| | | CustomWriteLog($"ãå®å·¥å触åãåºç«åID:{HInterID}, å计æ°é:{total} | è®¡åæ°é:{planQty} | æ¯å¦æ»¡è¶³å®å·¥æ¡ä»¶:{total == planQty}", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | if (total == planQty) // planQty éå¨åé¢ä»æµè½¬å¡è·å |
| | | { |
| | | string savePointName = "SP_" + HInterID + "_" + Guid.NewGuid().ToString("N").Substring(0, 8); // å¯ä¸ä¿åç¹å |
| | | oCN.RunProc($"SAVE TRANSACTION {savePointName}"); // 设置ä¿åç¹ |
| | | |
| | | CustomWriteLog($"ãå®å·¥å触åãåºç«åID:{HInterID},", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | |
| | | string paramLog = $"BillType:3772, HProcExchInterID:{HProcExchInterID}, HProcExchEntryID:{HProcExchEntryID}, HProcExchBillNo:{HProcExchBillNo}, HMaker:{HMaker}, Type:3772"; |
| | | CustomWriteLog($"ãå®å·¥åæ§è¡ãåºç«åID:{HInterID}, è°ç¨SaveMESEndWorkFrom_ZDæ¹æ³ | å
¥å:{paramLog}", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | |
| | | bool completeFlag = SaveMESEndWorkFrom_ZD("3772", HProcExchInterID, HProcExchEntryID, HProcExchBillNo, HMaker, "3772"); |
| | | if (!completeFlag) |
| | | { |
| | | // å®å·¥å失败ï¼åæ»å°ä¿åç¹ï¼ä»
æ¤éå®å·¥åç¸å
³æä½ |
| | | oCN.RunProc($"ROLLBACK TRANSACTION {savePointName}"); |
| | | CustomWriteLog("çæå®å·¥å失败ä½åºç«åå·²ä¿å,æ¡ç :" + HBadCodeSN, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | CustomWriteLog($"ãå®å·¥åæ§è¡ãåºç«åID:{HInterID}, å®å·¥åçæå¤±è´¥ï¼ | æ¡ç :{HBadCodeSN}", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | oCN.RunProc(" Update Sc_MESEndWorkBillMain set HBillStatus='2',HChecker='" + user + "',HCheckDate=getdate() Where HInterID=" + HInterID.ToString()); |
| | | //æ ¹æ®å¼å·¥åå
ç åå°çäº§ç¶æä¸´æ¶è¡¨ä¸»å
ç ï¼ç¶åæ´æ°çäº§ç¶æä¸´æ¶è¡¨ç¶æä¸ºï¼å¾
ç产 ä»»å¡åç¶æ(0å¾
ç产ï¼1ç产ä¸ï¼2æèµ·ï¼3å·²å®å·¥) |
| | | oCN.RunProc("exec h_p_JIT_MESBeginWorkBill_BeginWork @HInterId=" + HInterID + ",@flag='å®å·¥'"); |
| | | oCN.RunProc(" Update Sc_ICMOBillStatus_Tmp set hicmostatus='3',HEndDate=getdate() Where HInterID=" + HMainSourceInterID.ToString()); |
| | | |
| | | //ä¿åå |
| | | ds =oCN.RunProcReturn("exec h_p_Sc_MESEndWorkBill_AfterSaveCtrl " + HInterID.ToString() + "," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'," + 1, "h_p_Sc_MESEndWorkBill_AfterSaveCtrl"); |
| | |
| | | <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> |
| | | </dsig:Transforms> |
| | | <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> |
| | | <dsig:DigestValue>tjWpgBox5mKt/YG1dkuhWnKvbOGE8XHOxIntnnQwzpI=</dsig:DigestValue> |
| | | <dsig:DigestValue>evQC6YpArvi2H5J3/ZkjzeNA3xFoII2YpFngHiVC+u8=</dsig:DigestValue> |
| | | </hash> |
| | | </dependentAssembly> |
| | | </dependency> |
| | |
| | | </dependentAssembly> |
| | | </dependency> |
| | | <dependency> |
| | | <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="80384"> |
| | | <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="87552"> |
| | | <assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> |
| | | <hash> |
| | | <dsig:Transforms> |
| | | <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> |
| | | </dsig:Transforms> |
| | | <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> |
| | | <dsig:DigestValue>dGOszhyyBFT4eMjHQ+motXY18nqNsvKX0p5yCLc3cCA=</dsig:DigestValue> |
| | | <dsig:DigestValue>2LGeszfUU/h+glqhlohxEurnnDGOMLZcAvQodtxNbIk=</dsig:DigestValue> |
| | | </hash> |
| | | </dependentAssembly> |
| | | </dependency> |
| | |
| | | <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> |
| | | </dsig:Transforms> |
| | | <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> |
| | | <dsig:DigestValue>tjWpgBox5mKt/YG1dkuhWnKvbOGE8XHOxIntnnQwzpI=</dsig:DigestValue> |
| | | <dsig:DigestValue>evQC6YpArvi2H5J3/ZkjzeNA3xFoII2YpFngHiVC+u8=</dsig:DigestValue> |
| | | </hash> |
| | | </dependentAssembly> |
| | | </dependency> |
| | |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.CopyComplete |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.exe |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.pdb |
| | | D:\å·¥ä½ä»£ç \æºäºè¿æ\ååè¿ç«æä»¶\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.AssemblyReference.cache |
| | |
| | | </dependentAssembly> |
| | | </dependency> |
| | | <dependency> |
| | | <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="80384"> |
| | | <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="87552"> |
| | | <assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> |
| | | <hash> |
| | | <dsig:Transforms> |
| | | <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> |
| | | </dsig:Transforms> |
| | | <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> |
| | | <dsig:DigestValue>dGOszhyyBFT4eMjHQ+motXY18nqNsvKX0p5yCLc3cCA=</dsig:DigestValue> |
| | | <dsig:DigestValue>2LGeszfUU/h+glqhlohxEurnnDGOMLZcAvQodtxNbIk=</dsig:DigestValue> |
| | | </hash> |
| | | </dependentAssembly> |
| | | </dependency> |