|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (dataSet.Tables[0].Rows.Count == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "条码与流转卡不存在对应关系!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | str1 = HBarCode.Substring(23, 3); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | dataSet = oCN.RunProcReturn(@"select  m.HNumber 物料代码,o.HNumber 组织代码 from Sc_ProcessExchangeBillMain a WITH(NOLOCK) | 
|---|
|  |  |  | left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID | 
|---|
|  |  |  | left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID | 
|---|
|  |  |  | where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (dataSet.Tables[0].Rows.Count == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "条码与流转卡不存在对应关系!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ClsPub.CurUserName = user; | 
|---|
|  |  |  | //条码生成 | 
|---|
|  |  |  | return get_HBardBillSave(HProcExchBillNo, HBarCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else { | 
|---|
|  |  |  | ClsPub.CurUserName = user; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (dataSet.Tables[0].Rows.Count == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "条码与流转卡不存在对应关系!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | str1 = HBarCode.Substring(23, 3); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | dataSet = oCN.RunProcReturn(@"select  m.HNumber 物料代码,o.HNumber 组织代码 from Sc_ProcessExchangeBillMain a WITH(NOLOCK) | 
|---|
|  |  |  | left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID | 
|---|
|  |  |  | left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID | 
|---|
|  |  |  | where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (dataSet.Tables[0].Rows.Count == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "条码与流转卡不存在对应关系!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (ds.Tables[0].Rows[0]["HStatus"].ToString() != "") | 
|---|