上料防错单新增流水号回车调用方法,工序进站单新增流水号回车获取工序信息方法,新增系统参数“工序进站时默认带入数量”
| | |
| | | ",HWorkerID=" + omodel.HWorkerID.ToString() + |
| | | ",HWorkerBarCode='" + omodel.HWorkerBarCode + "'" + |
| | | ",HGroupID=" + omodel.HGroupID.ToString() + |
| | | ",HProcNo=" + omodel.HProcNo.ToString() + |
| | | ",HMainSourceInterID='" + omodel.HMainSourceInterID.ToString() + "'" + |
| | | ",HMainSourceEntryID='" + omodel.HMainSourceEntryID.ToString() + "'" + |
| | | ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" + |
| | |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + |
| | | ",HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HICMOInterID,HICMOEntryID,HICMOBillNo" + |
| | | ",HSourceID,HProcID,HMaterID,HSourceBarCode,HEquipID,HWorkerID,HWorkerBarCode" + |
| | | ",HGroupID,HStockOrgID" + |
| | | ",HGroupID,HProcNo,HStockOrgID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" + |
| | | "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'," + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID.ToString() + ",'" + omodel.HICMOBillNo + "'" + |
| | | "," + omodel.HSourceID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HMaterID.ToString() + ",'" + omodel.HSourceBarCode + "'," + omodel.HEquipID.ToString() + "," + omodel.HWorkerID.ToString() + ",'" + omodel.HWorkerBarCode + "'" + |
| | | "," + omodel.HGroupID.ToString() +"," + omodel.HSTOCKORGID.ToString() + |
| | | "," + omodel.HGroupID.ToString() + "," + omodel.HProcNo.ToString() + "," + omodel.HSTOCKORGID.ToString() + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_MaterToSourceBillSub oSub in DetailColl) |
| | |
| | | public Int64 HWorkerID;// int --æä½å·¥ID |
| | | public string HWorkerBarCode;// varchar(50) --æä½å·¥æ¡ç |
| | | public Int64 HGroupID;// int --ç产çç»ID |
| | | |
| | | public Int64 HProcNo;// int --æµæ°´å·ï¼å·¥åºå·ï¼ |
| | | public Int64 HProcID;// int --å·¥åºID |
| | | public Int64 HMaterID;// int --产åID |
| | | |
| | |
| | | { |
| | | omodel.MES_StationInBill_ShowUSERProcess = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //å·¥åºè¿ç«æ¶é»è®¤å¸¦å
¥æ°éï¼1.æµè½¬å¡æ°ï¼2.ä¸éåæ ¼æ°éï¼3.ç©ææå°å
è£
æ°éï¼4.ä¸å¸¦å
¥ï¼ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_DefQty") |
| | | { |
| | | omodel.MES_StationInBill_DefQty = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | omodel.MES_StationInBill_PreQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //å·¥åºè¿ç«æ¶é»è®¤å¸¦å
¥æ°éï¼1.æµè½¬å¡æ°ï¼2.ä¸éåæ ¼æ°éï¼3.ç©ææå°å
è£
æ°éï¼4.ä¸å¸¦å
¥ï¼ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_DefQty") |
| | | { |
| | | omodel.MES_StationInBill_DefQty = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | public string MES_StationInBill_DeleteRelationCtl; //è¿ç«æ¥æ¶åå 餿¶æ¯å¦è¿è¡å
³èæ§å¶ |
| | | public string MES_StationInBill_PreQtyCtl; //æ¬éè¿ç«æ°éä¸è½å¤§äºä¸éåºç«åæ ¼æ°é |
| | | public string MES_StationInBill_QtyRateCtl; //æ¬éè¿ç«æ°éæ±æ»æ°ä¸è½å¤§äºæµè½¬å¡æ°éä¸é |
| | | public string MES_StationInBill_DyCentralInspectionControl; //夿工åºè¿ç«ä¹åæ¯å¦åè¿æ£éªå |
| | | public string MES_StationInBill_DyCentralInspectionControl; //夿工åºè¿ç«ä¹åæ¯å¦åè¿æ£éªå |
| | | public string MES_StationInBill_DefQty; //å·¥åºè¿ç«æ¶é»è®¤å¸¦å
¥æ°éï¼1.æµè½¬å¡æ°ï¼2.ä¸éåæ ¼æ°éï¼3.ç©ææå°å
è£
æ°éï¼4.ä¸å¸¦å
¥ï¼ |
| | | |
| | | //å·¥åºåºç«æ±æ¥å |
| | | public string MES_StationOutBill_AutoCheck; //ä¿å忝å¦èªå¨å®¡æ ¸ |
| | |
| | | double HPeriod = 1; |
| | | string HRemark = list[0].HRemark;//夿³¨ |
| | | long HICMOInterID = list[0].HICMOInterID;//ä»»å¡åID |
| | | long HICMOEntryID = list[0].HICMOEntryID;//ä»»å¡ååID |
| | | string HICMOBillNo = list[0].HICMOBillNo;//ä»»å¡å |
| | | long HProcPlanInterID = 0; |
| | | long HProcPlanEntryID = 0; |
| | |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | double HmaterOutqty = list[0].HmaterOutqty;//ç½å¯åå¸ |
| | | long HMaterToSourceInterID = list[0].HMaterToSourceInterID;//䏿é²éåID |
| | | string HMaterToSourceBillNo = list[0].HMaterToSourceBillNo;//䏿é²éååæ®å· |
| | | //忮宿´æ§å¤æ |
| | | if (HMaterID <= 0) |
| | | { |
| | |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "','" + HMainInterID + "'," + HPRDOrgID + |
| | | ","+ HmaterOutqty + ") "); |
| | | |
| | | if(HMaterToSourceInterID!=0) |
| | | { |
| | | //çæä¸æé²éå |
| | | //æå
¥å表 |
| | | oCN.RunProc("EXEC h_p_Sc_MaterToSourceBillSub_Insert " + HMaterToSourceInterID.ToString() + ",'" + HMaterToSourceBillNo + "'"); |
| | | //æå
¥ä¸»è¡¨ |
| | | oCN.RunProc("Insert Into Sc_MaterToSourceBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HChecker,HCheckDate" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + |
| | | ",HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HICMOInterID,HICMOEntryID,HICMOBillNo" + |
| | | ",HSourceID,HProcID,HMaterID,HSourceBarCode,HEquipID,HWorkerID,HWorkerBarCode" + |
| | | ",HGroupID,HProcNo,HStockOrgID" + |
| | | ") " + |
| | | " values('3786','3790'," + HMaterToSourceInterID.ToString() + ",'" + HMaterToSourceBillNo + "',convert(varchar(10),getdate(),120)" + |
| | | ",year(getdate()),month(getdate()),'å·¥åºè¿ç«ç»å®çæ','" + HMaker + "',getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HInterID.ToString() + ",0,'" + HBillNo + "','3790'" + |
| | | "," + HProcExchInterID.ToString() + "," + HProcExchEntryID.ToString() + ",'" + HProcExchBillNo + "'," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'" + |
| | | "," + HSourceID.ToString() + "," + HProcID.ToString() + "," + HMaterID.ToString() + ",'',0,0,''" + |
| | | "," + HGroupID.ToString() + "," + HProcNo.ToString() + "," + HPRDOrgID.ToString() + |
| | | ") "); |
| | | } |
| | | //åå
¥æ¥å¿ |
| | | LogService.Write("ç¨æ·:" + user + ",æ¥æ:" + DateTime.Now + ",æ°å¢å·¥åºè¿ç«åæ®:" + HBillNo); |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "æ°å¢å·¥åºè¿ç«åæ®ï¼" + HBillNo + "','LMES-å·¥åºè¿ç«æ¨¡å','" + DBUtility.ClsPub.IPAddress + "','æ°å¢åæ®'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºè¿ç«æ¥æ¶åæµæ°´å·å车è·åå·¥åºä¿¡æ¯ï¼å¹¶æ ¹æ®ç³»ç»åæ°å¤æè¿ç«åæ¯å¦ç»å®é
ä»¶æ¸
å 20240621 |
| | | [Route("Cj_StationInBill/HProcNo_KeyDown")] |
| | | [HttpGet] |
| | | public object HProcNo_KeyDown(string HBillNo, string HProcExchBillNo, Int64 HProcNo, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | if (HProcExchBillNo.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æµè½¬å¡æ²¡ææ«æï¼æè
没ææå车é®ï¼è¯·æ«ææµè½¬å¡æå¨æµè½¬å¡ææ¬æ¡ä¸æå车é®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | string MES_StationInBill_LineBindCtl = "N"; //è¿ç«æ¥æ¶æ¶æ¯å¦ç»å®è¯¥å·¥åºçé
ä»¶æ¸
åï¼Yæ¯éè¦ç»å®ï¼Nä¸éè¦ç»å®ï¼ |
| | | string MES_StationInBill_DefQty = "4"; //å·¥åºè¿ç«æ¶é»è®¤å¸¦å
¥æ°éï¼1.æµè½¬å¡æ°ï¼2.ä¸éåæ ¼æ°éï¼3.ç©ææå°å
è£
æ°éï¼4.ä¸å¸¦å
¥ï¼ |
| | | MES_StationInBill_LineBindCtl = oSystemParameter.omodel.MES_StationInBill_LineBindCtl; |
| | | MES_StationInBill_DefQty = oSystemParameter.omodel.MES_StationInBill_DefQty; |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_HProcNo_KeyDown '" + HBillNo + "','" + HProcExchBillNo + "'," + HProcNo.ToString() + ",'" + MES_StationInBill_LineBindCtl + "','" + MES_StationInBill_DefQty + "','" + HMaker + "'", "h_p_MES_StationInBill_HProcNo_KeyDown"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·¥åºå·é误æè
å½åå·¥åºå·ä¸å
许è¿ç«ï¼è¯·éæ°è¾å
¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·¥åºè¿ç«æ¥æ¶åæµæ°´å·è·åä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºè¿ç«æ¥æ¶åæµæ°´å·å车è·åå·¥åºä¿¡æ¯ |
| | | [Route("Cj_StationInBill/txtHProcNo_KeyDown")] |
| | | [HttpGet] |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region å·¥åºèµæ |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿åå·¥åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetProcess_Json")] |
| | | [HttpGet] |
| | | public object GetProcess_Json(string HBarCode, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | Int64 HProcID = 0; |
| | | HProcID = DBUtility.ClsPub.isLong(HBarCode); |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Process with(nolock) where HStopflag=0 and HItemID=" + HProcID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Process"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·ç¡®è®¤ææ«å·¥åºæ¡ç æ¯å¦å±äºè¯¥ç»ç»ï¼ä¸ä¸ºéç¦ç¨ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¿åå·¥åºä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå·¥åºåè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetProcessList_Json")] |
| | | [HttpGet] |
| | | public object GetProcessList_Json(string Process, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Process with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Process + "%' or HName like '%" + Process + "%')", "Gy_Process"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½å·¥åºè®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¿åå·¥åºä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | BillNew.omodel.HWorkerID = mainList[0].HWorkerID; |
| | | BillNew.omodel.HWorkerBarCode = mainList[0].HWorkerBarCode; |
| | | BillNew.omodel.HGroupID = mainList[0].HGroupID; |
| | | BillNew.omodel.HProcID = mainList[0].HProcID; |
| | | BillNew.omodel.HProcNo = mainList[0].HProcNo; |
| | | BillNew.omodel.HMainSourceBillType = mainList[0].HMainSourceBillType; |
| | | if (mainList[0].HMainSourceBillType == "3772") |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 䏿é²éåæ«ç æ¨¡å æµæ°´å·å车è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// æµæ°´å·å车è¿åä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_ProcNo_MaterToSource_Json")] |
| | | [HttpGet] |
| | | public object get_ProcNo_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType, string HProcExchBillNo, Int64 HProcNo, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_AddProcNo_MaterToSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HProcExchBillNo + "'," + HProcNo.ToString() + ",'" + HMaker + "'", "h_p_WMS_AddProcNo_MaterToSource"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æµæ°´å·å车è¿åä¿¡æ¯å¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æµæ°´å·å车è¿åä¿¡æ¯è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 䏿é²éåæ«ç æ¨¡å æ«æç©ææ¡ç è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// æ«æç©ææ¡ç |
| | |
| | | public double HWasterQty_Mater { get; set; } |
| | | public double HBackWorkQty { get; set; } |
| | | public Int64 HShiftsID { get; set; } |
| | | public long HMaterToSourceInterID { get; set; } |
| | | public string HMaterToSourceBillNo { get; set; } |
| | | } |
| | | } |