yxj
2023-10-24 761327ecedb5f3d9a9502e8ab8fcdf4f05ba29e0
称重入库、涤纶半成品生成条码模块,生成条码前增加判断控制
3个文件已修改
88 ■■■■ 已修改文件
WarM/条码打印/Kf_WeighToBarCode.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode.cs
@@ -35,7 +35,7 @@
        public Int64 HSourceEntryID = 0;
        public string HSourceBillNo = "";
        public string HSourceBillType = "";
        public Int64 ProcessExchangeInterID = 0;
        public Int64 HProcessExchangeInterID = 0;
        public Int64 HSupID = 0;
        public double HSourceQty = 0;
        public double HMaterWeight = 0;         //物料克重
@@ -578,6 +578,38 @@
            {
                if (MessageBox.Show("物料维护克重为:"+HMaterWeight.ToString()+ ",实际克重为:" + sQty.ToString() + ",所输入实际克重超出物料维护克重的百分之二十或不足物料维护克重的百分之八十,请检查输入的数据是否正确!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    //return true;
                }
                else
                {
                    return false;
                }
            }
            //条码生成前控制判断
            double HNowQty = 0;     //米数
            double HWeightQyt = 0;  //重量
            double HKDQty = 0;      //扣点数
            HNowQty = DBUtility.ClsPub.isDoule(txtHQty.Text);
            HWeightQyt = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text);
            HKDQty = DBUtility.ClsPub.isDoule(txtHKDQty.Text);
            DataSet oDsCheck = oCn.RunProcReturn("exec h_p_Kf_WeighToBarCode_AddBarCodeCheck " + HInterID.ToString() + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + "," + HProcessExchangeInterID.ToString() + "," + HSourceQty.ToString() + "," + HNowQty.ToString() + "," + HWeightQyt.ToString() + "," + HKDQty.ToString(), "h_p_Kf_WeighToBarCode_AddBarCodeCheck");
            //
            if (oDsCheck == null && oDsCheck.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("条码生成前判断错误!");
                return false;
            }
            else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1")
            {
                MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "提示");
                return false;
            }
            else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "2")
            {
                if (MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    return true;
                }
                else
@@ -585,7 +617,10 @@
                    return false;
                }
            }
            return true;
            else
            {
                return true;
            }
        }
        //生成条码
@@ -652,7 +687,7 @@
            string HRemark = "";
            string HMaterName = "";
            string HMaterModel = "";
            string ProcessExchangeBillNo = "";
            string HProcessExchangeBillNo = "";
            Int64 HBarcodeNo = 0;       //包数
            Int64 HBadReasonID = 0;     //不良原因ID
            string HCusMaterName = "";  //客户物料名称
@@ -668,7 +703,7 @@
            HRemark = DBUtility.ClsPub.isStrNull(txtHRemark.Text);
            HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text);
            HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text);
            ProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text);
            HProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text);
            HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text);
            HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag);
            HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text);
@@ -694,14 +729,14 @@
                + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + "," + HNowQty.ToString()
                + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0"
                + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'"
                + ", " + HProcessExchangeInterID.ToString() + ",0,'" + HProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'"
                + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1')");
                //回填最大流水号
                oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 ");
                //回填源单临时表HInterID
                oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + ",a.HBillNo='" + HBillNo +"',a.HRelationInterID= 0 from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and a.HSourceBillNo='" + ProcessExchangeBillNo + "'");
                oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + ",a.HBillNo='" + HBillNo +"',a.HRelationInterID= 0 from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and a.HSourceBillNo='" + HProcessExchangeBillNo + "'");
                //写入条码出入库临时表
                oCn.RunProc("Insert into KF_PonderationBillMain_Temp " +
@@ -757,7 +792,7 @@
            HSourceBillNo = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("生产订单")].Value);
            HSourceBillType = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSourceBillType")].Value);
            HSourceQty = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("数量")].Value);
            ProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("ProcessExchangeInterID")].Value);
            HProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("ProcessExchangeInterID")].Value);
            HSupID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSupID")].Value);
            HMaterWeight = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterWeight")].Value);
        }
WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode_StationOutBill.cs
@@ -613,6 +613,36 @@
            {
                if (MessageBox.Show("物料维护克重为:" + HMaterWeight.ToString() + ",实际克重为:" + sQty.ToString() + ",所输入实际克重超出物料维护克重的百分之二十或不足物料维护克重的百分之八十,请检查输入的数据是否正确!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    //return true;
                }
                else
                {
                    return false;
                }
            }
            //条码生成前控制判断
            double HNowQty = 0;     //米数
            double HWeightQyt = 0;  //重量
            HNowQty = DBUtility.ClsPub.isDoule(txtHQty.Text);
            HWeightQyt = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text);
            DataSet oDsCheck = oCn.RunProcReturn("exec h_p_Kf_WeighToBarCode_StationOutBill_AddBarCodeCheck " + HInterID.ToString() + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + "," + HProcessExchangeInterID.ToString() + "," + HProcessExchangeEntryID.ToString() + "," + HSourceQty.ToString() + "," + HNowQty.ToString() + "," + HWeightQyt.ToString(), "h_p_Kf_WeighToBarCode_StationOutBill_AddBarCodeCheck");
            //
            if (oDsCheck == null && oDsCheck.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("条码生成前判断错误!");
                return false;
            }
            else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1")
            {
                MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "提示");
                return false;
            }
            else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "2")
            {
                if (MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    return true;
                }
                else
@@ -620,7 +650,10 @@
                    return false;
                }
            }
            return true;
            else
            {
                return true;
            }
        }
        //生成条码
WebAPI/Web.config
@@ -22,7 +22,7 @@
        <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
        <!--<add key="FileIP" value="http://localhost:8080/" />-->
        <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
        <!--<add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/> é¢œå°å¼æœº-->
        <add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/> <!--颜台式机-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
        <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    åšæ—¥ç§‘技-->
@@ -34,7 +34,7 @@
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>        --> <!--测试服务器-->
        <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/>    æœ¬åœ°-->
        <add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/><!--陈雯静本地配置-->
        <!--<add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/>    é™ˆé›¯é™æœ¬åœ°é…ç½®-->
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />