yxj
2025-05-13 91d75f344372efe6e494e8277f523057d5d038ca
CLOUDWEB/WebService1.asmx.cs
@@ -58327,7 +58327,7 @@
                string HProduceDate = "";//生产日期
                string HExpiryDate = "";//保质期至
           
                if (str.Length == 8 && HISKFPERIOD == "1")
                if (str.Length == 9 && HISKFPERIOD == "1")
                {
                    if (!string.IsNullOrWhiteSpace(str[7]))
                    {
@@ -58343,14 +58343,20 @@
                    }
                    HProduceDate = HDate.ToString();
                    //if (!DateTime.TryParse(str[8], out HDate))
                    //{
                    //    sErrMsg = "条码解析失败," + str[8] + ",保质期格式不正确!";
                    //    return false;
                    //}
                    //HExpiryDate = HDate.ToString();
                    //HISKFPERIOD = 1;
                    if (!string.IsNullOrWhiteSpace(str[8]))
                    {
                        try
                        {
                            HDate = DateTime.ParseExact(str[8], "yyyyMMdd", CultureInfo.InvariantCulture);
                        }
                        catch
                        {
                            sErrMsg = "条码解析失败," + str[8] + ",生产日期格式不正确!";
                            return false;
                        }
                    }
                    HExpiryDate = HDate.ToString();
                }
                string HSupIDs = "0";