| | |
| | | long HMainSourceEntryID = mainList[0].HICMOEntryID; |
| | | string HMainSourceBillNo = mainList[0].HICMOBillNo; |
| | | |
| | | //判断生产质量汇报单是否存在 |
| | | ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain WITH(NOLOCK) where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Sc_QualityReportBillMain"); |
| | | if (ds.Tables[0].Rows.Count != 0) { |
| | | objJsonResult.code = "0"; |
| | |
| | | List<Model.ClsSc_AssemblyBillSub> sub = new List<Model.ClsSc_AssemblyBillSub>(); |
| | | sub = JsonConvert.DeserializeObject<List<Model.ClsSc_AssemblyBillSub>>(sSubStr); |
| | | |
| | | |
| | | //条码上道工序是否过站 |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //判断条码是否已经出站 |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 产品条码='" + omodel.HBarCode_P + "' and HProcExchInterID="+ omodel .HProcExchInterID+ " and HProcExchEntryID="+ omodel.HProcExchEntryID + " and HProcID="+ omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | |
| | | int HTemporaryAreaID = 0;//暂放区 |
| | | int HShiftsID = 0; |
| | | |
| | | //获取当前班次 |
| | | DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo"); |
| | | if (set.Tables[0].Rows.Count > 0) |
| | | { |
| | | HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | } |
| | | //判断当天当前的流转卡是否有出站单 |
| | | ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain a WITH(NOLOCK) left join Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | |
| | | ds = oCN.RunProcReturn("select * from gy_czygl WITH(NOLOCK) where czymc='" + user + "'", "gy_czygl"); |
| | | string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString(); |
| | | |
| | | //查询流转卡所有工序信息 |
| | | ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange WITH(NOLOCK) where 条码='" + HBarCode + "' ", "h_v_Gy_BarCodeBillHICOMProcessExchange"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | |
| | | |
| | | Model.Sc_AssemblyBill_BindSourceTemp temp = new Model.Sc_AssemblyBill_BindSourceTemp(); |
| | | temp = JsonConvert.DeserializeObject<Model.Sc_AssemblyBill_BindSourceTemp>(sSubStr); |
| | | |
| | | //工序返修记录单 配件表 |
| | | ds = oCN.RunProcReturn("select * from Sc_SourceLineRepairBillSub_Mater where HInterID=" + model.HInterID+ " order by HEntryID desc", "Sc_SourceLineRepairBillSub_Mater"); |
| | | |
| | | oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub_Mater |
| | |
| | | oCN.RunProc("update Sc_AssemblyBillSub set HBarCode='" + temp.HBarCode + "' where HInterID=" + temp.HInterID + " and HEntryID=" + temp.HEntryID); |
| | | //oCN.RunProc("exec h_p_AssemblyBill_Temp '" + temp.HProcExchBillNo + "'," + model.HProcess + "," + temp.HMaterID + ",'" + temp.HBatchNo + "'"); |
| | | } |
| | | else if (HResult == "NG"|| HResult == "OK") { |
| | | else if (HResult == "NG"|| HResult == "OK") { |
| | | Model.ClsSc_SourceLineRepairBillMain model = new Model.ClsSc_SourceLineRepairBillMain(); |
| | | model = JsonConvert.DeserializeObject<Model.ClsSc_SourceLineRepairBillMain>(sMainStr); |
| | | |
| | |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查询配件清单信息 |
| | | string sql = @"exec h_p_GZ_BarCodeBillList '" + HMaterNumber + "','" + HBatchNo + "','" + sWhere + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_GZ_BarCodeBillList"); |
| | | |