1
wtt
2 天以前 807bb9a2b4d6db408ebdded1cff41f3094eac11e
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -1572,14 +1572,16 @@
        /// <returns></returns>
        [Route("WEBSController/set_UpdatePonderationBillMain_Temp_BarCode_Json")]
        [HttpGet]
        public object set_UpdatePonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode, int HQty)
        public object set_UpdatePonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode, double HQty, long HItemID)
        {
            try
            {
                //(HBarCode_Pack <> '' and HInterID = { HInterID.ToString() } and HBillType = '{HBillType}' and HBarCode_Pack = '{HBarCode}') or
                //              (HBarCode <> '' and HInterID ={ HInterID.ToString()}
                //and HBillType = '{HBillType}' and HBarCode = '{HBarCode}')
                // æ ¹æ®æ‰˜æ¡ç å­—段和条码字段 åˆ¤æ–­ æ›´æ–°çš„æ¡ç æ•°é‡æ˜¯å¦å¤§äºŽæœ€å¤§æ•°é‡æˆ–小于0
                ds = oCn.RunProcReturn($@"select * from KF_PonderationBillMain_Temp where 
                    (HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}') or
                    (HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}')
                    HItemID = {HItemID}
                ", "KF_PonderationBillMain_Temp");
                if(ds == null || ds.Tables[0].Rows.Count == 0)
@@ -1602,21 +1604,24 @@
                    return objJsonResult;
                }
                if(Double.Parse(ds.Tables[0].Rows[0]["HQtyMust"].ToString()) < HQty)
                {
                    // æ›´æ–°çš„æ¡ç æ•°é‡æ˜¯å¦å¤§äºŽæœ€å¤§æ•°é‡
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = $"更新失败,条码数量{HQty}大于最大可扫数量{ds.Tables[0].Rows[0]["HQtyMust"].ToString()}...";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if(Double.Parse(ds.Tables[0].Rows[0]["HQtyMust"].ToString()) < HQty)
                //{
                    //// æ›´æ–°çš„æ¡ç æ•°é‡æ˜¯å¦å¤§äºŽæœ€å¤§æ•°é‡
                    //objJsonResult.code = "0";
                    //objJsonResult.count = 0;
                    //objJsonResult.Message = $"更新失败,条码数量{HQty}大于最大可扫数量{ds.Tables[0].Rows[0]["HQtyMust"].ToString()}...";
                    //objJsonResult.data = null;
                    //return objJsonResult;
                //}
                //根据托条码字段更新本单条码出入库缓存表数据
                oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
                //oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
                //根据条码字段更新本单条码出入库缓存表数据
                oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
                //oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
                //根据条码自增列 æ›´æ–° æ¡ç å‡ºå…¥åº“缓存表数据
                oCn.RunProc($"exec h_p_KF_PonderationBillMain_Temp_Update {HInterID}, '{HBillType}', '{HBarCode}', {HQty}, {HItemID}", ref DBUtility.ClsPub.sExeReturnInfo);
                objJsonResult.code = "1";
                objJsonResult.count = 1;