wangxinhui
2024-09-23 a3eb67538c4716aef9967f1e6301720cce095e3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下Base_ware_locationService与IBase_ware_locationService中编写
 */
 
using System;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Services.IRepositories;
using WIDESEA_Services.IServices;
 
namespace WIDESEA_Services.Services
{
    public partial class base_ware_locationService : ServiceBase<base_ware_location, Ibase_ware_locationRepository>
    , Ibase_ware_locationService, IDependency
    {
        public base_ware_locationService(Ibase_ware_locationRepository repository)
        : base(repository)
        {
            Init(repository);
        }
        public static Ibase_ware_locationService Instance
        {
            get { return AutofacContainerModule.GetService<Ibase_ware_locationService>(); }
        }
 
        public WebResponseContent GFXLuntie(base_ware_location[] keys)
        {
            WebResponseContent content = new WebResponseContent();
            VOLContext context = new VOLContext();
            var a = keys[0].Serialize();
            Console.WriteLine(a);
            base_ware_location ware_Location = repository.FindFirst(d => d.upper_code == keys[0].upper_code);
            if (ware_Location == null) { return content.Error("解绑失败,未找到此货架"); }
            ware_Location.light_color = "无";
           int row= repository.Update(ware_Location,d=>d.light_color,true);
            if (row!=1)
          return content.Error("解绑失败");
 
            return content.OK("解绑成功");
        }
    }
}