| | |
| | | entryid_PGD = arr[1]; |
| | | } |
| | | |
| | | |
| | | //截取条码类型 前三位 |
| | | string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length)); |
| | | //截取条码类型2 前四位 |
| | | string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length)); |
| | | |
| | | //截取内码 |
| | | string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length)); |
| | | |
| | | string sErr = ""; |
| | | |
| | | switch (BillNoType2) |
| | | { |
| | | case "GXLX"://流转卡 |
| | | string sErr = ""; |
| | | |
| | | string sql = ""; |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "乔一") |
| | |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 单据号= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource) |
| | | { |
| | | case "工序": |
| | | sql = "exec h_p_QC_ProcessCheck_GetProcessExchangeBillList " + "'工序','" + BillNo_PGD + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetProcessExchangeBillList"); |
| | | break; |
| | | case "物料": |
| | | sql = "exec h_p_QC_ProcessCheck_GetProcessExchangeBillList " + "'物料','" + BillNo_PGD + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetProcessExchangeBillList"); |
| | | break; |
| | | case "工艺路线": |
| | | sql = "exec h_p_QC_ProcessCheck_GetProcessExchangeBillList " + "'工艺路线','" + BillNo_PGD + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetProcessExchangeBillList"); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case "GXCZ": |
| | | ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HBillNo = '" + HBarCode + "'", "Sc_StationOutBillMain"); |
| | | Int64 HStationOutInterID = 0; |
| | | |
| | | if (ds != null || ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | HStationOutInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]); |
| | | } |
| | | |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource) |
| | | { |
| | | case "工序": |
| | | sql = "exec h_p_QC_ProcessCheck_GetStationOutBillList " + "'工序','" + HStationOutInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationOutBillList"); |
| | | break; |
| | | case "物料": |
| | | sql = "exec h_p_QC_ProcessCheck_GetStationOutBillList " + "'物料','" + HStationOutInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationOutBillList"); |
| | | break; |
| | | case "工艺路线": |
| | | sql = "exec h_p_QC_ProcessCheck_GetStationOutBillList " + "'工艺路线','" + HStationOutInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationOutBillList"); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case "MO00": |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource) |
| | | { |
| | | case "工序": |
| | | sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'工序','" + HBarCode + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList"); |
| | | break; |
| | | case "物料": |
| | | sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'物料','" + HBarCode + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList"); |
| | | break; |
| | | case "工艺路线": |
| | | sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'工艺路线','" + HBarCode + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList"); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | default: |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "条码错误!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "乔一") |
| | | { //系统参数是否为只显示当前登录用户关联的工序信息,N为否,Y为是 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "条码错误!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | |
| | | switch (BillNoType) |
| | | //得到信息 |
| | | { |
| | | case "HCX"://生产资源码 |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_SourceList where 条码编号 = '" + BillNo + "'", "h_v_Gy_SourceList"); |
| | | break; |
| | | } |
| | | |
| | | if (ds != null) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回数据,条码前缀错误。"; |
| | | objJsonResult.data = ""; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |