yxj
2021-09-17 4ad5c8d6a75ca57dcdd0461aea9dcdc9fd8f9e78
新增模治具扫码功能
3个文件已修改
189 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 189 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -12516,6 +12516,11 @@
                    oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString());
                }
                if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数  启用器具管理
                {
                    oCn.RunProc("EXEC h_p_Sc_MouldProdOutBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString());
                }
                //根据TMP表 返回 子表信息
                Ds = oCn.RunProcReturn("exec h_p_Kf_GetSellOutBill_CLD " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetSellOutBill_CLD");
                if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0)
@@ -28480,6 +28485,7 @@
        //根据条码得到相应信息(条码档案)
        public Model.ClsGy_BarCodeBill_WMS_Model_View get_InfoByBarCode_Source(string sBarCode,Int64 sInterID,ref bool sBool, ref string sErrMsg)
        {
            sBarCode = sBarCode.Trim();
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
            if (dal.GetInfoByNumber_View(sBarCode))
@@ -30324,6 +30330,7 @@
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_CheckTypeByBarCode_MulSource(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, string HSourceBillType, Int64 HOWNERID, bool sXFFlag, bool sJDPFlag, ref string sErrMsg)
        {
            sBarCode = sBarCode.Trim();
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
@@ -31607,6 +31614,7 @@
            Int64 sHDeptID = 0;
            string sHDeptName = "";
            string sHBarType = "";
            sBarCode = sBarCode.Trim();
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
@@ -31725,22 +31733,48 @@
                    }
                    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))
                        if (sBarCode.Substring(0, 3) == "PAK")
                        {
                            oBar.HSourceBillType = sHSourceBillType;
                            oBar.HSourceBillNo = sHSourceBillNo;
                            oBar.HSupID = sHSupID;
                            oBar.HSupName = sHSupName;
                            oBar.HDeptID = sHDeptID;
                            oBar.HDeptName = sHDeptName;
                            //将模治具信息写入模治具出入库临时表
                            DataSet Mould = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddMouldBarCode");
                            if (Mould == null || Mould.Tables[0].Rows.Count == 0)
                            {
                                sErrMsg = "将模治具信息写入模治具出入库临时表失败!";
                                return null;
                            }
                            else
                            {
                                if (DBUtility.ClsPub.isLong(Mould.Tables[0].Rows[0][0]) == 0)
                                {
                                    oBar.HBarType = "模治具条码";
                                    return oBar;
                                }
                                else
                                {
                                    sErrMsg = DBUtility.ClsPub.isStrNull(Mould.Tables[0].Rows[0]["HRemark"]);
                                    return null;
                                }
                            }
                        }
                        else
                        {
                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                            return null;
                            //将物料条码信息写入出入库条码临时表
                            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))
                            {
                                oBar.HSourceBillType = sHSourceBillType;
                                oBar.HSourceBillNo = sHSourceBillNo;
                                oBar.HSupID = sHSupID;
                                oBar.HSupName = sHSupName;
                                oBar.HDeptID = sHDeptID;
                                oBar.HDeptName = sHDeptName;
                            }
                            else
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                return null;
                            }
                            return oBar;
                        }
                        return oBar;
                    }
                }
                //一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码)
@@ -31833,22 +31867,48 @@
                        }
                        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))
                            if (sBarCode.Substring(0, 3) == "PAK")
                            {
                                oBar.HSourceBillType = sHSourceBillType;
                                oBar.HSourceBillNo = sHSourceBillNo;
                                oBar.HSupID = sHSupID;
                                oBar.HSupName = sHSupName;
                                oBar.HDeptID = sHDeptID;
                                oBar.HDeptName = sHDeptName;
                                //将模治具信息写入模治具出入库临时表
                                DataSet Mould = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddMouldBarCode");
                                if (Mould == null || Mould.Tables[0].Rows.Count == 0)
                                {
                                    sErrMsg = "将模治具信息写入模治具出入库临时表失败!";
                                    return null;
                                }
                                else
                                {
                                    if (DBUtility.ClsPub.isLong(Mould.Tables[0].Rows[0][0]) == 0)
                                    {
                                        oBar.HBarType = "模治具条码";
                                        return oBar;
                                    }
                                    else
                                    {
                                        sErrMsg = DBUtility.ClsPub.isStrNull(Mould.Tables[0].Rows[0]["HRemark"]);
                                        return null;
                                    }
                                }
                            }
                            else
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                return null;
                                //将物料条码信息写入出入库条码临时表
                                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))
                                {
                                    oBar.HSourceBillType = sHSourceBillType;
                                    oBar.HSourceBillNo = sHSourceBillNo;
                                    oBar.HSupID = sHSupID;
                                    oBar.HSupName = sHSupName;
                                    oBar.HDeptID = sHDeptID;
                                    oBar.HDeptName = sHDeptName;
                                }
                                else
                                {
                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描失败!" + sErrMsg;
                                    return null;
                                }
                                return oBar;
                            }
                            return oBar;
                        }
                    }
                    else
@@ -32851,11 +32911,11 @@
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    //先进先出控制
                    if ((HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_FIFOCtl == "Y")     //生产领料单-先进先出控制
                        || (HBillType == "1205" && oSystemParameterMain.Kf_SellOutBill_FIFOCtl == "Y")  //销售出库单-先进先出控制
                        || (HBillType == "1211" && oSystemParameterMain.Kf_EntrustOutBill_FIFOCtl == "Y")) //委外出库单-先进先出控制
                    if ((HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_FIFOCtl == "Y")         //生产领料单-先进先出控制
                        || (HBillType == "1205" && oSystemParameterMain.Kf_SellOutBill_FIFOCtl == "Y")      //销售出库单-先进先出控制
                        || (HBillType == "1211" && oSystemParameterMain.Kf_EntrustOutBill_FIFOCtl == "Y"))  //委外出库单-先进先出控制
                    {
                        DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_Add " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_Add");
                        DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_New " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString(), "h_p_WMS_AddSourceFIFO_New");
                        if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
                        {
                            sErrMsg = "存入先进先出临时表失败!";
@@ -32931,10 +32991,87 @@
        #endregion
        #endregion
        #region 单据列表数据处理
        //显示物料明细列表、模治具列表、先进先出列表信息
        [WebMethod]
        public DataSet GetBillEntry_TmpList(long HInterID, string HBillNo, string HBillType, ref string sMouldManagerCtl, ref string sFIFOCtl, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            string sSimpleMode = "N";  //是否启用扫码简易模式,只显示已扫码源单记录(Y,N)
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";返回物料明细列表时获取系统参数失败! " + sErrMsg;
                return null;
            }
            //判断是否启用器具管理(Y,N)
            if (oSystemParameter.omodel.WMS_MouldManagerCtl == "Y")   //启用模治具管理
            {
                sMouldManagerCtl = "Y";
            }
            //判断是否启用先进先出管理(Y,N),是否启用扫码简易模式,只显示已扫码源单记录(Y,N)
            if (HBillType == "1204")   //生产领料单
            {
                if (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y")   //生产领料单-先进先出控制
                {
                    sFIFOCtl = "Y";
                }
                if (oSystemParameter.omodel.Kf_MateOutBill_SimpleMode == "Y")   //生产领料单-扫码简易模式
                {
                    sSimpleMode = "Y";
                }
            }
            if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y")   //销售出库单-先进先出控制
            {
                sFIFOCtl = "Y";
            }
            if (HBillType == "1211" && oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl == "Y")   //委外出库单-先进先出控制
            {
                sFIFOCtl = "Y";
            }
            DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList " + HInterID.ToString() + ",'" + HBillType + "','" + sMouldManagerCtl + "','" + sFIFOCtl + "','" + sSimpleMode + "'", "h_p_WMS_BillEntryTmpList");
            if (DS == null || DS.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "没有返回任何物料明细数据!";
                return null;
            }
            else
            {
                return DS;
            }
        }
        //删除模治具列表中选中行记录
        [WebMethod]
        public bool set_DelSc_MouldStockBillMain_Temp(long HInterID, long HMouldInterID, string sHBillType, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            try
            {
                oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + sHBillType + "' and HMouldID=" + HMouldInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
                return true;
            }
            catch (Exception e)
            {
                sErrMsg = "删除模治具出入库临时表记录失败!" + e.Message;
                return false;
            }
        }
        #endregion
        #region  桌面条码生成外网版
        [WebMethod]
DLL/Pub_Class.dll
Binary files differ
Pub_Class.dll
Binary files differ