| | |
| | | ",HAuxQty='" + omodel.HAuxQty + "'" + |
| | | ",HAuxUnit='" + omodel.HAuxUnit + "'" + |
| | | ",HSplitNo='" + omodel.HSplitNo + "'" + |
| | | ",HHeight='" + omodel.HHeight + "'" + |
| | | ",HInches='" + omodel.HInches + "'" + |
| | | ",HAl1Long='" + omodel.HAl1Long + "'" + |
| | | ",HDensity='" + omodel.HDensity + "'" + |
| | | ",HTela='" + omodel.HTela + "'" + |
| | | ",HUnderTela='" + omodel.HUnderTela + "'" + |
| | | ",HSizing='" + omodel.HSizing + "'" + |
| | | ",HSellDate='" + omodel.HSellDate + "'" + |
| | | ",HProdMaterCode='" + omodel.HProdMaterCode + "'" + |
| | | ",HSeOrderBillNo='" + omodel.HSeOrderBillNo + "'" + |
| | | ",HCusShortName='" + omodel.HCusShortName + "'" + |
| | |
| | | ",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" + |
| | | ",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) " + |
| | | ", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HSplitNo" + |
| | | ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate) " + |
| | | " 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.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" + |
| | | ",'" + 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.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 + "')"); |
| | | sErr = sErr + "1;"; |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl) |
| | |
| | | public string HPickLabelNumber; |
| | | public string HXTNumber; |
| | | public string HXTModel; |
| | | |
| | | public string HHeight;//æ¯é« |
| | | public string HInches;//寸æ°ç»ç» |
| | | public string HAl1Long;//å
¨æ¯é¿ |
| | | public string HDensity;//åå¸å¯åº¦ |
| | | public string HTela;//æ¯çº±åç§°åè§æ ¼ |
| | | public string HUnderTela;//åºä¸ |
| | | public string HSizing;//å®åæµæ |
| | | public string HSellDate;//äº¤è´§æ¥æ |
| | | |
| | | public string HRoutingBillID;//å·¥èºè·¯çº¿ID |
| | | public string HMaterModel;//ææè§æ ¼ |
| | | public double HWidth;//å¹
宽 |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string sql1 = string.Format(@"select * from h_v_Gy_CustomerList where ç»ç»åç§°='" + Organization + "'"); |
| | | string sql1 = ""; |
| | | //客æ·å¶å® |
| | | string sErr = ""; |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "ä¹ä¸") |
| | | { |
| | | sql1 = string.Format(@"select * from h_v_Gy_CustomerList where 1=1"); |
| | | } |
| | | else |
| | | { |
| | | sql1 = string.Format(@"select * from h_v_Gy_CustomerList where ç»ç»åç§°='" + Organization + "'"); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by 客æ·ä»£ç ", "h_v_Gy_CustomerList"); |
| | |
| | | { //ç³»ç»åæ°æ¯å¦ä¸ºåªæ¾ç¤ºå½åç»å½ç¨æ·å
³èçå·¥åºä¿¡æ¯,N为å¦ï¼Yä¸ºæ¯ |
| | | if (oSystemParameter.omodel.MES_StationInBill_ShowUSERProcess == "Y") |
| | | { |
| | | ds = oCN.RunProcReturn($"exec h_p_ProcessExchangeBillLastHProNo '{BillNo_PGD}','{UserID}'", "h_v_Gy_ProcessList_GetProcNoByUser"); |
| | | ds = oCN.RunProcReturn($"exec h_p_ProcessExchangeBillLastHProNo '{BillNo_PGD}','{UserID}','In'", "h_v_Gy_ProcessList_GetProcNoByUser"); |
| | | } |
| | | else |
| | | { |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region å·¥åºè¿ç«æ¥æ¶åæµæ°´å·å车è·åå·¥åºä¿¡æ¯ |
| | | [Route("Cj_StationInBill/txtHProcNo_KeyDown_qiaoyi")] |
| | | [HttpGet] |
| | | public object txtHProcNo_KeyDown_qiaoyi(string sBillNo, string sProcNo) |
| | | { |
| | | try |
| | | { |
| | | if (sBillNo.Equals("") || sProcNo.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡å½¢ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¾å°ä¿¡æ¯ï¼å§å¤æ 记为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 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.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·¥åºå·é误æè
å½åå·¥åºå·ä¸å
许è¿ç«ï¼è¯·éæ°è¾å
¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region å·¥åºè¿ç«æ¥æ¶åæ ¹æ®èåä»£ç æ¨¡ç³å车æ¥è¯¢ |
| | |
| | | public json AddBillSub_NoTable(string msg3, long HInterID, int OperationType,int HEntryID) |
| | | { |
| | | 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) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (oSub.HDeptID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç产车é´ä¸è½ä¸ºç©º"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (oSub.HUnitID == 0) |
| | | { |