yxj
2024-04-25 87999e9c0ef70ea07f097b6ced1c23019c767a0a
新增生产补料单扫描源单条码功能
2个文件已修改
113 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -39555,6 +39555,10 @@
            {
                sFIFOCtl = "Y";
            }
            else if (sHBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList == "Y"))   //分步式调出单-先进先出控制
            {
                sFIFOCtl = "Y";
            }
            try
            {
@@ -48155,6 +48159,93 @@
        #endregion
        #region 生产补料    扫描源单条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_MateReplenishOut(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            Int64 sMulSourceFlag = 0;   //多源单标志(0为非多源单模式,1为多源单模式)
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg;
                return null;
            }
            if (oSystemParameter.omodel.Kf_MateReplenishOutBill_MulSourceBill.ToUpper() == "Y") //系统参数  生产补料单-多源单模式
            {
                sMulSourceFlag = 1;
            }
            //将源单信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MateReplenishOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_MateReplenishOut");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    //先进先出控制
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl == "Y")  //系统参数  生产补料单-先进先出控制
                    {
                        DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_MateReplenishOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFO_MateReplenishOut");
                        if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出临时表失败!";
                            return null;
                        }
                        else
                        {
                            if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1)
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]);
                                return null;
                            }
                        }
                    }
                    //先进先出下架清单
                    else if (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList == "Y")  //系统参数  生产补料单-先进先出下架清单
                    {
                        DataSet FIFOList = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFOList_MateReplenishOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFOList_MateReplenishOut");
                        if (FIFOList == null || FIFOList.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出下架清单失败!";
                            return null;
                        }
                        else
                        {
                            if (DBUtility.ClsPub.isLong(FIFOList.Tables[0].Rows[0][0]) == 1)
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFOList.Tables[0].Rows[0]["HRemark"]);
                                return null;
                            }
                        }
                    }
                    oBar.HBarType = "源单条码";
                    oBar.HMulSourceFlag = sMulSourceFlag;
                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
                    oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]);
                    oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #region 直接调拨    扫描源单条码
        [WebMethod]
@@ -49000,6 +49091,11 @@
                if (oSystemParameterMain.Kf_MateReplenishOutBill_BillTypeOneScan.ToUpper() == "Y")
                {
                    sOneScanCtl = "Y";
                }
                //先进先出控制('Y'为控制)
                if (oSystemParameterMain.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y")
                {
                    sFIFOCtl = "Y";
                }
                //是否启用多源单扫码模式('Y'为启用)
                if (oSystemParameterMain.Kf_MateReplenishOutBill_MustQtyCtl.ToUpper() == "Y")
@@ -50893,6 +50989,19 @@
                    return oBar;
                }
            }
            else if (HBillType == "1254")
            {
                //生产补料单
                oBar = get_SourceBarCode_MateReplenishOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref sErrMsg);
                if (oBar == null)
                {
                    return null;
                }
                else
                {
                    return oBar;
                }
            }
            else
            {
                sErrMsg = "单据类型错误!";
@@ -52445,6 +52554,10 @@
            {
                sFIFOCtl = "Y";
            }
            else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList == "Y"))   //生产补料单-先进先出控制
            {
                sFIFOCtl = "Y";
            }
            DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList " + HInterID.ToString() + ",'" + HBillType + "','" + sMouldManagerCtl + "','" + sFIFOCtl + "','" + sSimpleMode + "'", "h_p_WMS_BillEntryTmpList");
            return DS;
DLL/Pub_Class.dll
Binary files differ