yangle
2023-06-25 6585cda35b87eb1a3a05a948faf7dc5d08ef8ff7
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -1815,6 +1815,104 @@
        #endregion
        #region åˆ æ‰˜æ¨¡å—调用方法
        #region åˆ æ‰˜æ¨¡å— æ‰«ææ‰˜æ¡ç 
        /// <summary>
        /// åˆ æ‰˜æ¨¡å— æ‰«ææ‰˜æ¡ç 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_PackBarCode_DeletePackUnionBill_Json")]
        [HttpGet]
        public object Get_PackBarCode_DeletePackUnionBill_Json(string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill");
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "扫描托条码判断失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
                    {
                        List<object> columnNameList = new List<object>();
                        //添加列名
                        foreach (DataColumn col in ds.Tables[0].Columns)
                        {
                            Type dataType = col.DataType;
                            string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                            columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                        }
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功!";
                        objJsonResult.data = ds.Tables[0];
                        objJsonResult.list = columnNameList;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "扫描托条码失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删托模块,获取托条码信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region åˆ æ‰˜æ¨¡å— ä¸Šä¼  åˆ é™¤ç»„托单信息
        /// <summary>
        /// ä¸Šä¼   åˆ é™¤ç»„托单信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetDeletePackUnionBill_Json")]
        [HttpGet]
        public object GetDeletePackUnionBill_Json(long HInterID, string HBillType, string HMaker)
        {
            try
            {
                oCn.RunProc("exec h_p_WMS_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillType + "','" + HMaker + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "删托成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删托失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region æ¢æ‰˜è°ƒæ‹¨å•模块调用方法
        #region æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æè°ƒå…¥æ‰˜æ¡ç 