| | |
| | | } |
| | | |
| | | //条码上道工序是否过站 |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + barCode_SN + "'," + omodel.HProcID, "h_p_Sc_SNBarcodeProcCtrl_S"); |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_XW '" + barCode_SN + "'," + omodel.HProcID, "h_p_Sc_SNBarcodeProcCtrl_XW"); |
| | | if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "2") |
| | | else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | |
| | | //判断条码是否已经出站 |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 产品条码='" + barCode_SN + "' and HProcExchInterID=" + omodel.HProcExchInterID + " and HProcExchEntryID=" + omodel.HProcExchEntryID + " and HProcID=" + omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | //ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 产品条码='" + barCode_SN + "' and HProcExchInterID=" + omodel.HProcExchInterID + " and HProcExchEntryID=" + omodel.HProcExchEntryID + " and HProcID=" + omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-039]条码:" + barCode_SN + ",已出站!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (ds.Tables[0].Rows.Count > 0) |
| | | //{ |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "[0000-2-039]条码:" + barCode_SN + ",已出站!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | long HMainInterID = 0; |
| | | string BillType = "3791"; |
| | |
| | | int HTemporaryAreaID = 0;//暂放区 |
| | | int HShiftsID = 0; |
| | | string HBatchNo = omodel.HBatchNo; |
| | | string HWeight = omodel.HWeight; |
| | | double HWeight = omodel.HWeight; |
| | | //获取当前班次 |
| | | //DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo"); |
| | | //if (set.Tables[0].Rows.Count > 0) |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = "没有查询到数据"; |
| | | objJsonResult.Message = "没有查询到数据"; |
| | | objJsonResult.data = ""; |
| | | return objJsonResult; |
| | | } |
| | | |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //条码上道工序是否过站 |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + barCode_SN + "'," + omodel.HProcID, "h_p_Sc_SNBarcodeProcCtrl_S"); |
| | | //条码上道工序是否过站以及本道条码是否已经出站 |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_XW '" + barCode_SN + "'," + omodel.HProcID, "h_p_Sc_SNBarcodeProcCtrl_XW"); |
| | | if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "2") |
| | | else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | |
| | | //判断条码是否已经出站 |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 产品条码='" + barCode_SN + "' and HProcExchInterID=" + omodel.HProcExchInterID + " and HProcExchEntryID=" + omodel.HProcExchEntryID + " and HProcID=" + omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | //ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 产品条码='" + barCode_SN + "' and HProcExchInterID=" + omodel.HProcExchInterID + " and HProcExchEntryID=" + omodel.HProcExchEntryID + " and HProcID=" + omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-039]条码:" + barCode_SN + ",已出站!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (ds.Tables[0].Rows.Count > 0) |
| | | //{ |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "[0000-2-039]条码:" + barCode_SN + ",已出站!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //增加产线组装追溯单 |
| | | DataSet ds1; |