| | |
| | | ",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() + |
| | |
| | | ",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" + |
| | | ",HRemark2,HRemark3) " + |
| | | ",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.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.HRemark2 + "','"+ omodel.HRemark3 + "')"); |
| | | ",'"+ 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; |
| | |
| | | } |
| | | |
| | | //å¾å°ä¿¡æ¯ï¼å§å¤æ 记为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) |
| | |
| | | } |
| | | } |
| | | |
| | | /// <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> |