| | |
| | | //判断是否启用一键扫码模式,Y为启用,未启用时只扫描物料条码 |
| | | if (oSystemParameterMain.WMS_OneKeyMode.ToUpper() == "N") |
| | | { |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByNumber_View(sBarCode)) |
| | | { |
| | | //如果是托盘条码分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //分解托条码得到明细条码信息写入出入库条码临时表 |
| | | DataSet dsTBarCode; |
| | | string sBarCode_MX; |
| | | dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " + |
| | | " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "没有找到托盘条码对应子条码记录!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]); |
| | | oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "没有找到该条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | //一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码) |
| | |
| | | //无返回数据则为物料条码 |
| | | if (Dss == null || Dss.Tables[0].Rows.Count == 0) |
| | | { |
| | | //将物料条码信息写入出入库条码临时表 |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByNumber_View(sBarCode)) |
| | | { |
| | | //如果是托盘条码分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //分解托条码得到明细条码信息写入出入库条码临时表 |
| | | DataSet dsTBarCode; |
| | | string sBarCode_MX; |
| | | dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " + |
| | | " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "没有找到托盘条码对应子条码记录!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]); |
| | | oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "没有找到该条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | |
| | | //判断是否启用一键扫码模式,Y为启用,未启用时只扫描物料条码 |
| | | if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N") |
| | | { |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByNumber_View(sBarCode)) |
| | | { |
| | | //如果是托盘条码分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //分解托条码得到明细条码信息写入出入库条码临时表 |
| | | DataSet dsTBarCode; |
| | | string sBarCode_MX; |
| | | dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " + |
| | | " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "没有找到托盘条码对应子条码记录!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]); |
| | | if (set_SavePonderationBillMain_Temp_BarCode(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) |
| | | { |
| | | oBar.HSourceBillType = sHSourceBillType; |
| | | oBar.HSourceBillNo = sHSourceBillNo; |
| | | oBar.HSupID = sHSupID; |
| | | oBar.HSupName = sHSupName; |
| | | oBar.HDeptID = sHDeptID; |
| | | oBar.HDeptName = sHDeptName; |
| | | SourceFlag = true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg; |
| | | //sErrMsg = "扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //将物料条码信息写入出入库条码临时表 |
| | | if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) |
| | | { |
| | |
| | | return null; |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "没有找到该条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | //一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码) |
| | | else |
| | |
| | | //无返回数据则为物料条码 |
| | | if (Dss == null || Dss.Tables[0].Rows.Count == 0) |
| | | { |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByNumber_View(sBarCode)) |
| | | { |
| | | //如果是托盘条码分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //分解托条码得到明细条码信息写入出入库条码临时表 |
| | | DataSet dsTBarCode; |
| | | string sBarCode_MX; |
| | | dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " + |
| | | " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "没有找到托盘条码对应子条码记录!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]); |
| | | if (set_SavePonderationBillMain_Temp_BarCode(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) |
| | | { |
| | | oBar.HSourceBillType = sHSourceBillType; |
| | | oBar.HSourceBillNo = sHSourceBillNo; |
| | | oBar.HSupID = sHSupID; |
| | | oBar.HSupName = sHSupName; |
| | | oBar.HDeptID = sHDeptID; |
| | | oBar.HDeptName = sHDeptName; |
| | | SourceFlag = true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sBarCode_MX + sErrMsg; |
| | | //sErrMsg = "扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //将物料条码信息写入出入库条码临时表 |
| | | if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) |
| | | { |
| | |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg; |
| | | //sErrMsg = "扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "没有找到该条码!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | string sBarBillName = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HSourceName"]); |