| | |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HCusID=" + omodel.HCusID.ToString() + |
| | | ",HMainMaterID=" + omodel.HMainMaterID.ToString() + |
| | | ",HKeyMaterID=" + omodel.HKeyMaterID.ToString() + |
| | | ",HWorkShopID=" + omodel.HWorkShopID.ToString() + |
| | |
| | | ",HBLFlag='" + (omodel.HBLFlag ? 1 : 0) + "'" + |
| | | ",HXTNumber='" + omodel.HXTNumber + "'" + |
| | | ",HXTModel='" + omodel.HXTModel + "'" + |
| | | ",HRemark2='" + omodel.HRemark2 + "'" + |
| | | ",HRemark3='" + omodel.HRemark3 + "'" + |
| | | ",HCusNumber='" + omodel.HCusNumber + "'" + |
| | | ",HMaterModel='" + omodel.HMaterModel + "'" + |
| | | ",HWidth='" + omodel.HWidth + "'" + |
| | |
| | | ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,HCusNumber,HPickLabel,HPickLabelNumber,HXTNumber,HXTModel,HWorkBillSortNo" + |
| | | ", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HSplitNo" + |
| | | ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate) " + |
| | | ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate" + |
| | | ",HRemark2,HRemark3,HEmpID,HCusID) " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" + |
| | | "," + omodel.HWWOrderInterID.ToString() + "," + omodel.HWWOrderEntryID.ToString() + ",'" + omodel.HWWOrderBillNo + "'," + omodel.HICMOInterID.ToString() + "," + omodel.HEquipMentID.ToString() + |
| | |
| | | ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID + |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','" + (omodel.HBLFlag ? 1 : 0) + "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HXTNumber + "','" + omodel.HXTModel + "','" + omodel.HWorkBillSortNo + |
| | | "',"+ omodel.HRoutingBillID + ",'"+ omodel.HMaterModel + "',"+ omodel.HWidth + ","+ omodel.HWeight + ","+ omodel.HAuxQty + ","+ omodel.HAuxUnit +","+ omodel.HSplitNo +"" + |
| | | ",'" + omodel.HHeight + "','" + omodel.HInches + "','" + omodel.HAl1Long + "','" + omodel.HDensity + "','" + omodel.HTela + "','" + omodel.HUnderTela + "','" + omodel.HSizing + "','" + omodel.HSellDate + "')"); |
| | | ",'" + omodel.HHeight + "','" + omodel.HInches + "','" + omodel.HAl1Long + "','" + omodel.HDensity + "','" + omodel.HTela + "','" + omodel.HUnderTela + "','" + omodel.HSizing + "','" + omodel.HSellDate + "'" + |
| | | ",'"+ omodel.HRemark2 + "','"+ omodel.HRemark3 + "',"+ omodel.HEmpID + "," + omodel.HCusID + ")"); |
| | | sErr = sErr + "1;"; |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl) |
| | |
| | | omodel.HAuxQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HAuxQty"]); |
| | | omodel.HAuxUnit = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HAuxUnit"]); |
| | | omodel.HSplitNo = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HSplitNo"]); |
| | | omodel.HRemark2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark2"]); |
| | | omodel.HRemark3 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark3"]); |
| | | omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"].ToString()); |
| | | omodel.HHeight = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HHeight"]); |
| | | omodel.HInches = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInches"]); |
| | | omodel.HAl1Long = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HAl1Long"]); |
| | | omodel.HDensity = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDensity"]); |
| | | omodel.HTela = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HTela"]); |
| | | omodel.HUnderTela = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HUnderTela"]); |
| | | omodel.HSizing = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSizing"]); |
| | | omodel.HSellDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSellDate"]); |
| | | omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"].ToString()); |
| | | // |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | |
| | | public Int64 HEquipMentID;//è®¾å¤æ¨¡å
· |
| | | public string HProjectNum;//项ç®å· |
| | | public Int64 HEmpID;//Ö°Ô± |
| | | public Int64 HCusID;//å®¢æ· |
| | | public string HProdMaterCode; |
| | | public string HSeOrderBillNo; |
| | | public string HCusShortName; |
| | |
| | | public double HAuxQty;//è¾
æ°é |
| | | public int HAuxUnit;//è¾
å©åä½ |
| | | public int HSplitNo;//æåå· |
| | | |
| | | public string HRemark2;//夿³¨2 |
| | | public string HRemark3;//åºé¨å¤æ³¨ |
| | | } |
| | | } |
| | |
| | | { |
| | | omodel.MES_StationInBill_DeleteRelationCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //æ¬éè¿ç«æ°éä¸è½å¤§äºä¸éåºç«åæ ¼æ°é |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_PreQtyCtl") |
| | | { |
| | | omodel.MES_StationInBill_PreQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | |
| | | |
| | | //===============å·¥åºåºç«æ±æ¥å |
| | | //èªå¨æ°å¢ |
| | |
| | | { |
| | | omodel.MES_StationOutBill_InStockType = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //æ¬éåºç«æ°éä¸å
许å°äºä¸éè¿ç«æ°é |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_NextQtyCtl") |
| | | { |
| | | omodel.MES_StationOutBill_NextQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | |
| | | //=====ä¸è¯è¯å®¡å |
| | |
| | | public string MES_StationInBill_ShowUSERProcess; //è¿ç«æ¥æ¶ååªæ¾ç¤ºç¨æ·å¯¹åºå·¥åº |
| | | public string MES_StationInBill_SaveAutoAddnew; //ä¿ååå为æ°å¢ç¶æ |
| | | public string MES_StationInBill_DeleteRelationCtl; //è¿ç«æ¥æ¶åå 餿¶æ¯å¦è¿è¡å
³èæ§å¶ |
| | | public string MES_StationInBill_PreQtyCtl; //æ¬éè¿ç«æ°éä¸è½å¤§äºä¸éåºç«åæ ¼æ°é |
| | | |
| | | //å·¥åºåºç«æ±æ¥å |
| | | public string MES_StationOutBill_QtyCtl; //åºç«æ°éä¸è½å¤§äºæ¬éè¿ç«æ±æ»æ° |
| | | public string MES_StationOutBill_QtyPreQtyCtl; //åºç«æ°é(åæ ¼æ°éææ»æ°é)æ±æ»ä¸è½å¤§äºä¸éåæ ¼æ±æ»æ° |
| | |
| | | public string MES_StationOutBill_ShowUSERProcess; //åºç«æ±æ¥ååªæ¾ç¤ºç¨æ·å¯¹åºå·¥åº |
| | | public string MES_StationOutBill_SaveAutoAddnew; //ä¿ååå为æ°å¢ç¶æ |
| | | public string MES_StationOutBill_DeleteRelationCtl; //åºç«æ±æ¥åå 餿¶æ¯å¦è¿è¡å
³èæ§å¶ |
| | | public string MES_StationOutBill_NextQtyCtl; //æ¬éåºç«æ°éä¸å
许å°äºä¸éè¿ç«æ°é |
| | | |
| | | //ä¸è¯åè¯å®¡å |
| | | public string QC_NoPassProdCheckBill_QtyCtl; //ä¸è¯åæ°ä¸è½å¤§äºåºç«åæ¥åºæ°é |
| | |
| | | //æå½ååæ®ID åå°ä¸ä¸ªæé®éé¢ å·æ°æ¶æ¯æ¬¡åä¸é |
| | | if (DSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | //txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æç¼ç "].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["è§æ ¼åå·"].Value); |
| | |
| | | // } |
| | | //} |
| | | //å»ç» |
| | | //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); |
| | | //int FrCol = DBUtility.ClsPub.isLong(frmCondition.txtFrozenCol.Text); |
| | | //string s = frmCondition.cmbHComplete.Text; |
| | | //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s,FrCol); |
| | | //ç»çº¿ |
| | |
| | | string HUserName = ""; |
| | | HUserName = ClsPub.isStrNull(DBUtility.ClsPub.CurUserName); |
| | | Int64 HUserID = 0; |
| | | HUserID = ClsPub.isInt(DBUtility.ClsPub.CurUserID); |
| | | HUserID = ClsPub.isLong(DBUtility.ClsPub.CurUserID); |
| | | |
| | | DataSet DSet; |
| | | |
| | |
| | | string HTMNumber = ""; |
| | | string HOrgNumber = ""; |
| | | DataSet Ds; |
| | | int LSH = 0; //æµæ°´å· |
| | | Int64 LSH = 0; //æµæ°´å· |
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | |
| | | |
| | |
| | | //ç®±å· |
| | | string HXH = ""; |
| | | //ç®±å·æµæ°´å· |
| | | int LSH3 = 0; //æµæ°´å· |
| | | Int64 LSH3 = 0; //æµæ°´å· |
| | | string LSH4 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | //æºå° |
| | | string HJT = ""; |
| | |
| | | a = a + 1; |
| | | } |
| | | DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | |
| | | |
| | | sPackBarCode = sPackStr + TTM_LSH.ToString(); |
| | |
| | | // HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value); |
| | | // string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //å¤ç®±ç åç¼ |
| | | // DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | // Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | // Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | // sPackBarCode = sPackStr + TTM_LSH.ToString(); |
| | | // oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'"); |
| | | // } |
| | |
| | | // HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value); |
| | | // string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //å¤ç®±ç åç¼ |
| | | // DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | // Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | // Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | // sPackBarCode = sPackStr + TTM_LSH.ToString() + "+" ; |
| | | // oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'"); |
| | | // } |
| | |
| | | //HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value); |
| | | //string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //å¤ç®±ç åç¼ |
| | | //DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | //Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | //Int64 TTM_LSH = ClsPub.isLong(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | //string sPackBarCode = sPackStr + TTM_LSH.ToString(); |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'"); |
| | | |
| | |
| | | HJT = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("设å¤")].Value); |
| | | HXH = HYear + HPeriod + HDay + HBC + HJT + HMaterNumber; |
| | | Ds99 = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HXH + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]) + 1; |
| | | LSH3 = ClsPub.isLong(Ds99.Tables[0].Rows[0][0]) + 1; |
| | | LSH4 = LSH3.ToString(); |
| | | |
| | | |
| | | |
| | | //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); |
| | | //HBQty = HBQty + ClsPub.isLong(txtHBQty.Text); |
| | | HZXQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("æ¬æ¬¡æ°é")].Value); |
| | | HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("çäº§è®¢åæ°é")].Value); |
| | | HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("ç产订åå·")].Value); |
| | | |
| | | HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | n = 0; |
| | | LSH2 = LSH.ToString(); |
| | | while (LSH2.Length < LSHlen) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 |
| | |
| | | HWorkLineName = ""; |
| | | HSeOrderBillNo = ""; |
| | | HInnerBillNo = sPackBarCode; |
| | | HSourceID = ClsPub.isInt(txtHSourceID.Tag); |
| | | HSourceID = ClsPub.isLong(txtHSourceID.Tag); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HMaterialMQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | |
| | | string HTMNumber = ""; |
| | | string HOrgNumber = ""; |
| | | DataSet Ds; |
| | | int LSH = 0; //æµæ°´å· |
| | | Int64 LSH = 0; //æµæ°´å· |
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | double HZXQty = 0; //è£
ç®±æ°é |
| | | double HDDQty = 0; //è®¢åæ°é |
| | |
| | | HOrgNumber = ClsPub.HOrgNumber; |
| | | |
| | | |
| | | //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); |
| | | //HBQty = HBQty + ClsPub.isLong(txtHBQty.Text); |
| | | HZXQty = ClsPub.isDoule(txtHZXQty.Text); |
| | | HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("è®¢åæ°é")].Value); |
| | | |
| | |
| | | { |
| | | HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç ") |
| | | { |
| | |
| | | string HTMNumber = ""; |
| | | string HOrgNumber = ""; |
| | | DataSet Ds; |
| | | int LSH = 0; //æµæ°´å· |
| | | Int64 LSH = 0; //æµæ°´å· |
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | double HZXQty = 0; //è£
ç®±æ°é |
| | | double HDDQty = 0; //è®¢åæ°é |
| | |
| | | HOrgNumber = ClsPub.HOrgNumber; |
| | | |
| | | |
| | | //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); |
| | | //HBQty = HBQty + ClsPub.isLong(txtHBQty.Text); |
| | | HZXQty = ClsPub.isDoule(txtHZXQty.Text); |
| | | HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("è®¢åæ°é")].Value); |
| | | HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("ç产订åå·")].Value); |
| | |
| | | { |
| | | HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç ") |
| | | { |
| | |
| | | HDay = HDay.Substring(HDay.Length - 2, 2); |
| | | HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | TM = HTMNumber + LSH2; |
| | | } |
| | | else |
| | |
| | | HDay = HDay.Substring(HDay.Length - 2, 2); |
| | | HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | TM = HTMNumber + LSH2 + "+"; |
| | | } |
| | | //HYear = ClsPub.isDate(HDate).Year.ToString().Substring(2, 2); |
| | |
| | | //HDay = HDay.Substring(HDay.Length - 2, 2); |
| | | //HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | | //Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | //LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | //if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") |
| | | //{ |
| | |
| | | |
| | | private void DisplayTM() |
| | | { |
| | | //HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag); |
| | | //HInterID = DBUtility.ClsPub.isLong(txtHMaterID.Tag); |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_test Where HinterID=" + HInterID.ToString() + " and æ¡ç ç±»å = 'æçæ¡ç ' order by HItemID", "h_v_IF_BarCodeBillList_test", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | |
| | | // |
| | | grdSub.DataSource = DSet.Tables[0].DefaultView; |
| | | //å»ç» |
| | | //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); |
| | | //int FrCol = DBUtility.ClsPub.isLong(frmCondition.txtFrozenCol.Text); |
| | | //string s = frmCondition.cmbHComplete.Text; |
| | | //DBUtility.Xt_BaseBillFun.DisplayGrid(grdSub, this.Name, s, FrCol); |
| | | //ç»çº¿ |
| | |
| | | { |
| | | //è·åç½æ ¼ç¬¬ä¸è¡HInterIDçå¼ |
| | | Int64 HInterID = 0; |
| | | HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag); |
| | | HInterID = DBUtility.ClsPub.isLong(txtHMaterID.Tag); |
| | | DataSet DSBefore; |
| | | DSBefore = SubCn.RunProcReturn("exec h_p_PreviousMater "+ HInterID, "h_p_PreviousMater", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | //if (DSBefore.Tables[0].Rows.Count > 0) |
| | | //{ |
| | | // txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | // txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | //} |
| | | //else |
| | | //{ |
| | |
| | | else |
| | | { |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["è§æ ¼åå·"].Value); |
| | | txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æåç§°"].Value); |
| | |
| | | { |
| | | //æ ¹æ® |
| | | Int64 HInterID = 0; |
| | | //HInterID = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value); |
| | | HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag); |
| | | //HInterID = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value); |
| | | HInterID = DBUtility.ClsPub.isLong(txtHMaterID.Tag); |
| | | DataSet DSBefore; |
| | | DSBefore = SubCn.RunProcReturn("exec h_p_NextMater " + HInterID, "h_p_NextMater", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DSBefore == null || DSBefore.Tables[0].Rows.Count == 0) |
| | |
| | | else |
| | | { |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["è§æ ¼åå·"].Value); |
| | | txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æåç§°"].Value); |
| | |
| | | ",HEmpID,HCreditDate,HCreditRatingDate,HMaxCreditRatingDate" + |
| | | ",HMonthUseQty,HForecastCreditRating,HCreditLevelID,HCountAccrualRating" + |
| | | ",HSubsidyAccrualRating,HCreditRating,HMaxCreditRating" + |
| | | ",HCusTypeID) " + |
| | | ",HCusTypeID,HCREATEORGID,HUSEORGID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID + |
| | | ", " + HLevel + ",0,'" + HStopflag + "','" + HRemark + "'" + |
| | | ",'" + HShortName + "','" + HAddress + "','" + HLinkMan + "','" + HLinkPhone + "','" + HMobilePhone + "'" + |
| | |
| | | "," + HEmpID + "," + HCreditDate + "," + HCreditRatingDate + "," + HMaxCredRatingDate + |
| | | "," + HMonthUseQty + "," + HForecastCreditRating + "," + HCreditLevelID + "," + HCountAccrualRating + |
| | | "," + HSubsidyAccrualRating + "," + HCreditRating + "," + HMaxCreditRating + |
| | | ", " + HCusTypeID + ")"); |
| | | ", " + HCusTypeID + ","+ HCreateOrgID + ","+ HUseOrgID + ")"); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Customer set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | } |
| | | |
| | | //å¾å°ä¿¡æ¯ï¼å§å¤æ 记为0æ¶ï¼æµè½¬æ 记为1æ¶ï¼ |
| | | ds = oCN.RunProcReturn("select top 2 * from h_v_Sc_ProcessExchangeBillList where åæ®å·= '" + sBillNo + "' and ä¸éæµè½¬å·¥åº<>'转' and å§å¤æ è®°=0 and æµè½¬æ è®°=1 and å·¥åºå·<='" + sProcNo + "' order by cast(å·¥åºå· as int) desc", "h_v_Sc_ProcessExchangeBillList"); |
| | | ds = oCN.RunProcReturn("select top 2 * from h_v_Sc_ProcessExchangeBillList where åæ®å·= '" + sBillNo + "' and ä¸éæµè½¬å·¥åº<>'转' and å§å¤æ è®°=0 and æµè½¬æ è®°=1 and cast(å·¥åºå· as int)<='" + sProcNo + "' order by cast(å·¥åºå· as int) desc", "h_v_Sc_ProcessExchangeBillList"); |
| | | //Ds = oCn.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where åæ®å·= '" + sBillNo + "' and å·¥åºå·='" + sProcNo + "' and å§å¤æ è®°=0 and æµè½¬æ è®°=1 ", "h_v_Sc_ProcessExchangeBillList"); |
| | | //åå
¥ä¿¡æ¯ |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HEmpID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æä½å没æéæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (HEmpID == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æä½å没æéæ©ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //if (HQCCheckID == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //if (HSourceID == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "çäº§èµæºæ²¡æéæ©ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (HSourceID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çäº§èµæºæ²¡æéæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (HCenterID == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | ds = oCN.RunProcReturn(sql + sWhere+ " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | ds = oCN.RunProcReturn(sql + sWhere+ " order by cast(æµæ°´å· as int) ", "h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | ds = oCN.RunProcReturn(sql + sWhere + " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | ds = oCN.RunProcReturn(sql + sWhere + " order by cast(æµæ°´å· as int) ", "h_v_Sc_ProcessExchangeBillQuerySub"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | { |
| | | if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªè®¾ç½®è½¬å·¥åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è®¾ç½®è½¬å·¥åº |
| | | oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); |
| | | } |
| | | } |
| | | else if (IsProNo == 1 && OperationType == 1) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªè®¾ç½®è½¬å·¥åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è®¾ç½®è½¬å·¥åº |
| | | oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); |
| | | } |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿ å®¡æ ¸ãåå®¡æ ¸ |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_RoutingBill/AuditGy_RoutingBill")] |
| | | [HttpGet] |
| | | public object AuditGy_RoutingBill(string HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var ds = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID, "Gy_RoutingBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() where HInterID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | oCN.Commit(); |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè
åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿ å
³éãåå
³é |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_RoutingBill/CloseGy_RoutingBill")] |
| | | [HttpGet] |
| | | public object CloseGy_RoutingBill(string HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Close", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var ds = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID, "Gy_RoutingBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (IsAudit == 0) //å
³é夿 |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½å次å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå
³é夿 |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå
³é!ä¸éè¦åå
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | if (IsAudit == 0) //å
³é夿 |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillMain set HCloseMan='" + CurUserName + "',HCloseDate=getdate() where HInterID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å
³éæå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | if (IsAudit == 1) //åå
³é夿 |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillMain set HCloseMan='',HCloseDate=null where HInterID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå
³éæå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | oCN.Commit(); |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
³é失败æè
åå
³é失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿å表 主表 |
| | | /// <summary> |
| | | /// è¿åå·¥èºè·¯çº¿å表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_RoutingBill/Gy_RoutingBillQuery")] |
| | | [HttpGet] |
| | | public object Gy_RoutingBillQuery(string sWhere, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æéæ¥è¯¢!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql1 = "select top 1000 * from h_v_Gy_RoutingBillQuery where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillQuery"); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿å表 å表 |
| | | /// <summary> |
| | | /// è¿åå·¥èºè·¯çº¿å表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_RoutingBill/Gy_RoutingBillQuerySub")] |
| | | [HttpGet] |
| | | public object Gy_RoutingBillQuerySub(string sWhere) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql1 = "select top 1000 * from h_v_Gy_RoutingBillQuerySub where 1 = 1 and hmainid=" + sWhere; |
| | | string sql = sql1 + " order by hmainid desc,cast(å·¥åºå· as int)"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillQuerySub"); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | ///<summary> |
| | | ///å°è£
ç¶æç åè¿åä¿¡æ¯çå
¬ç¨æ¹æ³ã |
| | | ///åæ°ï¼DataSetã |
| | | ///è¿åå¼ï¼jsonã |
| | | ///</summary> |
| | | public object GetObjectJson(DataSet ds) |
| | | { |
| | | try |
| | | { |
| | | 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 = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HBillType = "1239"; |
| | | |
| | | if (webserver.set_SavePOStockInBackBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | sWhere = " and ( p.HNumber like '%" + sWhere + "%' or p.HName like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("Select HItemID,HNumber å·¥åºä»£ç ,HName å·¥åº from Gy_Process where HStopflag=0 " + sWhere + " Order by HItemID ", "Gy_Process"); |
| | | ds = oCN.RunProcReturn("Select p.HItemID,p.HNumber å·¥åºä»£ç ,p.HName å·¥åº,w.HItemID å·¥ä½ä¸å¿ID,w.HNumber å·¥ä½ä¸å¿ä»£ç ,w.HName å·¥ä½ä¸å¿,d.HItemID é¨é¨ID,d.HNumber é¨é¨ä»£ç ,d.HName é¨é¨ from Gy_Process p left join Gy_WorkCenter w on p.HWorkCenterID = w.HItemID left join Gy_Department d on p.HDeptID = d.HItemID where p.HStopflag = 0 " + sWhere + " Order by HItemID ", "Gy_Process"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 产åå
¥åºç¼ååè¡¨å·æ°ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/chanpinruk1")] |
| | | [HttpGet] |
| | | public object chanpinruk1(string HBillType, string sHMaker, Int64 HOrgID) |
| | | { |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID); |
| | | |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | |
| | | 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å对象çåå |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | } |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | |
| | | #region PDAå
¶ä»å
¥åºå表模å |
| | | /// <summary> |
| | |
| | | ordrlist.HPinfan = dt.Rows[i]["HPinfan"].ToString(); |
| | | ordrlist.HSourceName = dt.Rows[i]["ç产线"].ToString(); |
| | | ordrlist.HEndDate = dt.Rows[i]["计åå®å·¥æ¥æ"].ToString();//忥 ç产订å å¤±ææ¥æ |
| | | ordrlist.HMinQty = dt.Rows[i]["æå°å
è£
æ°"].ToString(); |
| | | if (HBarCodeType == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | ordrlist.HMinQty = dt.Rows[i]["æªçææ¡ç æ°é"].ToString(); |
| | |
| | | ordrlist.HRemark = dt.Rows[i]["夿³¨"].ToString(); |
| | | ordrlist.HMTONo = dt.Rows[i]["计åè·è¸ªå·"].ToString(); |
| | | |
| | | ordrlist.HFurnaceNO = dt.Rows[i]["çå·"].ToString(); |
| | | ordrlist.HCoilNO = dt.Rows[i]["é¢å·æå
å·"].ToString(); |
| | | ordrlist.HheatNO = dt.Rows[i]["çå¤ç"].ToString(); |
| | | if(HSourceBillType == "æ¶æéç¥å") |
| | | { |
| | | ordrlist.HFurnaceNO = dt.Rows[i]["çå·"].ToString(); |
| | | ordrlist.HCoilNO = dt.Rows[i]["é¢å·æå
å·"].ToString(); |
| | | ordrlist.HheatNO = dt.Rows[i]["çå¤ç"].ToString(); |
| | | } |
| | | |
| | | if (HBarCodeType == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æåç±»ç¦ç¨ãåç¦ç¨ |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">ç¦ç¨(0),åç¦ç¨(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_MaterType/StopGy_MaterType")] |
| | | [HttpGet] |
| | | public object StopGy_MaterType(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HInterID, "Gy_MaterType"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (IsAudit == 0) //ç¦ç¨å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç¦ç¨!ä¸è½å次ç¦ç¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åç¦ç¨å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªç¦ç¨!ä¸éè¦åç¦ç¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | if (IsAudit == 0) //ç¦ç¨å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_MaterType set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ç¦ç¨æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | if (IsAudit == 1) //åç¦ç¨å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_MaterType set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åç¦ç¨æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | oCN.Commit(); |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥æè
åç¦ç¨å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æåç±» æ å½¢å¾ |
| | | public class TreeModel |
| | | { |
| | |
| | | { |
| | | ClsSc_ICMOBillSub oSub = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsSc_ICMOBillSub>(msg3); |
| | | |
| | | //客æ·å¶å® |
| | | string sErr = ""; |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "ä¹ä¸") |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (oSub.HDeptID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç产车é´ä¸è½ä¸ºç©º"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (oSub.HQty <= 0 || oSub.HQty == null) |
| | | { |
| | |
| | | <appSettings> |
| | | <!--æå¡å¨æä»¶IPå°å--> |
| | | <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>--> |
| | | <add key="FileIP" value="http://localhost:8080/" /> |
| | | <!--<add key="FileIP" value="http://localhost:8080/" />--> |
| | | <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> --> |
| | | <add key="sUrl" value="http://192.168.63.3/WEBS-WMS/WebService1.asmx"/> <!--é¢å°å¼æº--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®--> |
| | |
| | | <!--<add key="sUrl" value="http://122.227.133.186:8090/WEBS/WebService1.asmx"/> --> |
| | | <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/> å®çæå¡å¨--> |
| | | <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> æµè¯æå¡å¨--> |
| | | <add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/> <!--æ¬å°--> |
| | | <add key="webpages:Version" value="3.0.0.0" /> |
| | | <add key="webpages:Enabled" value="false" /> |
| | | <add key="ClientValidationEnabled" value="true" /> |