| | |
| | | var hinterID = list[0].HInterID; |
| | | var FID = list[0].FID; |
| | | |
| | | #region 校验是否扫描条码 |
| | | var HInterID = list[0].HInterID; |
| | | string jysql = string.Format(@"select * from KF_PonderationBillMain_Temp where HSourceInterID = {0}", HInterID); |
| | | DataTable jyDt =oCn.RunProcReturn(jysql, "jysql").Tables[0]; |
| | | if (jyDt.Rows.Count == 0 || jyDt == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "请扫描条码"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | #region 金蝶审核后会重新同步单据到mes 故不需要更新mes的收料通知单 |
| | | /* |
| | | oCn.BeginTran(); |
| | |
| | | //更新成功后 同步更新金蝶 |
| | | oCn.Commit(); |
| | | **/ |
| | | #endregion |
| | | #endregion |
| | | |
| | | JObject jsonRoot = new JObject(); |
| | | jsonRoot.Add("Creator", ""); |
| | |
| | | { |
| | | try |
| | | { |
| | | //var code = HBarcode.Split('#')[0]; |
| | | //校验条码是否存在 |
| | | string sql = $"select* from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}'"; |
| | | string sql = $"select HItemID,HSourceBillNo from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}"; |
| | | DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //存入条码临时表 |
| | | sql = $"delete from KF_PonderationBillMain_Temp Where HBillNo='{ds.Tables[0].Rows[0]["HSourceBillNo"]}' "; |
| | | oCn.RunProc(sql); |
| | | sql = string.Format(@"Insert into KF_PonderationBillMain_Temp |
| | | (HInterID,HBillNo,HBillType,HMaterID,HProcID,HWhID,HSCWHID |
| | | ,HStockPlaceID,HOutStockPlaceID,HGroupID,HQty,HQtyMust,HPieceQty |
| | | ,HAuxPropID,HBatchNo,HBarCode,HAddr,HMaker,HMakeDate |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo,HMTONo |
| | | ,HSTOCKORGID,HOWNERID,HExpressNumber,HSubBillType |
| | | ,HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag |
| | | ,HCusID) |
| | | select HInterID,HSourceBillNo,HBillType,HMaterID,0,0,0 |
| | | ,0,0,0,HQty,HQty,0 |
| | | ,HAuxPropID,HBatchNo,'','','System',getdate() |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo,HMTONo |
| | | ,HSTOCKORGID,HOWNERID,'',HBillType |
| | | ,0,0,'',0 |
| | | ,0 from Gy_BarCodeBill |
| | | where HItemID = {0}", ds.Tables[0].Rows[0]["HItemID"]); |
| | | oCn.RunProc(sql); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |