llj
17 小时以前 4f6a5427fed54804b03a152fcbb8cefb6d86e811
添康库存转移模块优化
2个文件已修改
54 ■■■■■ 已修改文件
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Sc_BarCodeController.cs
@@ -3126,7 +3126,13 @@
                            string HMaterialName = DBUtility.ClsPub.isStrNull(ordrlist.HMaterName);
                            string HSupNumber = DBUtility.ClsPub.isStrNull(ordrlist.HSupNumber).Replace(".", "");             //供应商代码(去掉分隔符)
                            int lastDigit = int.Parse(DateTime.Today.Year.ToString().Last().ToString());
                            char productionMonth = DateTime.Today.Month <= 9
                            int currentMonth = DateTime.Now.Month;
                            char[] monthToLetter = {
                            'N', 'P', 'Q', 'R', 'S', 'T',
                            'U', 'V', 'W', 'X', 'Y', 'Z'
                                                };
                            char productionMonth = monthToLetter[currentMonth - 1];
                            char productionDay = DateTime.Today.Month <= 9
                            ? (char)(DateTime.Today.Month + '0')
                            : (char)('A' + DateTime.Today.Month - 10);
                            if (HMaterialName.Trim() == "")
@@ -3136,6 +3142,7 @@
                                objJsonResult.Message = "物料不能为空,不能生成条码!";
                                return objJsonResult;
                            }
                            DataSet dss = oCN.RunProcReturn("","");
                            //todo
                            //条码前缀 = p+商品SKU+生产年份+生产月份+6位流水号+生产工厂代码
                            sTMNumber = "P" + HMaterialName + lastDigit+ productionMonth;
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -13673,5 +13673,50 @@
        }
        #endregion
        #region æ·»åº·æ ¹æ®å°è½¦æ¡ç æ‰¾å‡ºç›¸åº”物料
        #endregion
        [Route("WEBSController/GetMaterIDByCarBarCode")]
        [HttpGet]
        public object GetMaterIDByCarBarCode(string CarBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where å°è½¦='" + CarBarCode.ToString() + "'" , "GetMaterMesByCarBarCode");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    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;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "根据物料返回缓存列表条码信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
    }
}