| | |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100001\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else if (oSystemParameterMain.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100001\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else if (oSystemParameterMain.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | |
| | | else if (oSystemParameterMain.WMS_CampanyName == "凯贝奈特") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100001\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else if (oSystemParameterMain.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else |
| | | { |
| | |
| | | sJson_StockPlace = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) + "\"}},"; |
| | | } |
| | | //辅助属性 |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | //是否启用保质期控制 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | |
| | | } |
| | | return oBar; |
| | | } |
| | | //其他入库 森楷专用 |
| | | else if (HBillType == "1203" && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | //其他入库、其他出库 森楷专用 |
| | | else if ((HBillType == "1203" || HBillType == "1206") && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | //根据单个条码获取对应整托条码信息写入条码出入库临时表 |
| | | string sBarCode_New; |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToBarCode"); |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','整托扫码'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "获取整托条码信息发生错误!"; |
| | |
| | | oBar.HSupName = sHSupName; |
| | | oBar.HDeptID = sHDeptID; |
| | | oBar.HDeptName = sHDeptName; |
| | | SourceFlag = true; |
| | | if (HBillType == "1203") |
| | | { |
| | | SourceFlag = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | return oBar; |
| | | } |
| | | //其他入库 森楷专用 |
| | | else if (HBillType == "1203" && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | else if ((HBillType == "1203" || HBillType == "1206") && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | //根据单个条码获取对应整托条码信息写入条码出入库临时表 |
| | | string sBarCode_New; |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToBarCode"); |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','整托扫码'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "获取整托条码信息发生错误!"; |
| | |
| | | //森楷专用 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | //根据单个条码获取对应整托条码信息写入条码出入库临时表 |
| | | if(dal.omodel_View.HBarCodeType == "") |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','整托扫码'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_MoveStock(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillType, HStockInOrgID, HStockOutOrgID, oSystemParameter.omodel, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | return oBar; |
| | | sErrMsg = "获取整托条码信息发生错误!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | DataSet dsTBarCode = oCn.RunProcReturn("select HBarCode,HBarCodeType,HMaterID,HAuxPropID,HBatchNo,HQty,HMTONo from Gy_BarCodeBill with(nolock) where HStopflag=0 and HOutStockCounts=0 and HBarCode_Pack= '" + dal.omodel_View.HBarCode_Pack + "'", "Gy_BarCodeBill"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sErrMsg = "获取整托条码信息发生错误!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); |
| | | dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]); |
| | | dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]); |
| | | dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]); |
| | | dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]); |
| | | dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]); |
| | | dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]); |
| | | //无源单状态,设置源单类型为-1 |
| | | if (SourceFlag == false) |
| | | { |
| | | dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); |
| | | dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]); |
| | | dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]); |
| | | dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]); |
| | | dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]); |
| | | dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]); |
| | | dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]); |
| | | //无源单状态,设置源单类型为-1 |
| | | if (SourceFlag == false) |
| | | { |
| | | HSourceBillType = "-1"; |
| | | } |
| | | if (i!=0) |
| | | { |
| | | SourceFlag = true; |
| | | } |
| | | |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_MoveStock(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillType, HStockInOrgID, HStockOutOrgID, oSystemParameter.omodel, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | HSourceBillType = "-1"; |
| | | } |
| | | return oBar; |
| | | if (i!=0) |
| | | { |
| | | SourceFlag = true; |
| | | } |
| | | |
| | | //将物料条码信息写入条码出入库临时表 |
| | | if (!set_SavePonderationBillMain_Temp_BarCode_MoveStock(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillType, HStockInOrgID, HStockOutOrgID, oSystemParameter.omodel, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |