jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/********************************************************************************
 
** auth: DBS
 
** date: 2018/11/20 20:06:57
 
** desc: 尚未编写描述
 
** Ver.:  V1.0.0
 
*********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HH.WMS.Entitys.Basic;
using HH.WMS.Entitys.Sys;
using HH.WMS.Entitys.Algorithm;
 
namespace HH.WMS.Common
{
    public static class SysCache
    {
        public static string GetStrategyValue(string stockCode, string key)
        {
            TN_WM_B_STRATEGY_VALUEEntity model = _sysStrategy.Find(x => x.CN_S_STOCK_CODE.Equals(stockCode) && x.CN_S_CODE.Equals(key));
            if (model == null)
                return "";
            return model.CN_S_VALUE;
        }
 
        public static string GetStrategyValue(string key)
        {
            var model = _sysStrategy.Find(x => x.CN_S_CODE == key);
            if (model != null)
                return model.CN_S_VALUE;
            return string.Empty;
        }
 
        private static List<TN_AB_STOCKEntity> _stock = new List<TN_AB_STOCKEntity>();
        /// <summary>
        /// 仓库
        /// </summary>
        public static List<TN_AB_STOCKEntity> Stock
        {
            get { return _stock; }
            set { _stock = value; }
        }
 
        private static List<AutoBomStockAreaEntity> _area = new List<AutoBomStockAreaEntity>();
        public static List<AutoBomStockAreaEntity> Area
        {
            get { return _area; }
            set { _area = value; }
        }
 
        public static List<TN_WM_B_STRATEGY_VALUEEntity> _sysStrategy = new List<TN_WM_B_STRATEGY_VALUEEntity>();
        /// <summary>
        /// 系统策略
        /// </summary>
        public static List<TN_WM_B_STRATEGY_VALUEEntity> SysStrategy
        {
            get { return _sysStrategy; }
            set { _sysStrategy = value; }
        }
 
 
    }
    public static class StrategyKey
    {
        /// <summary>
        /// 到货单是否审核
        /// </summary>
        public const string ArrivalAutoAudit = "ArrivalAutoAudit";
        /// <summary>
        /// 到货是否检验
        /// </summary>
        public const string ArrivalAutoInspect = "ArrivalAutoInspect";
        /// <summary>
        /// 当前模式
        /// </summary>
        public const string CurrentMode = "CurrentMode";
        /// <summary>
        /// 入库单自动审核
        /// </summary>
        public const string IncreaseAutoAudit = "IncreaseAutoAudit";
        /// <summary>
        /// 是否存在单独包装码
        /// </summary>
        public const string IsPrintIndependentPackCode = "IsPrintIndependentPackCode";
        /// <summary>
        /// 是否启用AMS
        /// </summary>
        public const string IsUseAms = "IsUseAms";
        /// <summary>
        /// 是否启用OMS
        /// </summary>
        public const string IsUseOms = "IsUseOms";
        /// <summary>
        /// 是否启用K3对接
        /// </summary>
        public const string IsUseK3 = "IsUseK3";
        /// <summary>
        /// 是否启用唯一码
        /// </summary>
        public const string IsUseSNCode = "IsUseSNCode";
        /// <summary>
        /// 码盘是否直接生成入库单
        /// </summary>
        public const string CodeDiscWithIncrease = "CodeDiscWithIncrease";
        /// <summary>
        /// 上架是否直接生成入库单
        /// </summary>
        public const string UpshelfWithIncrease = "UpshelfWithIncrease";
        /// <summary>
        /// 库存不足是否接收上游订单
        /// </summary>
        public const string LackContinueReceiveOrder = "LackContinueReceiveOrder";
        /// <summary>
        /// 是否系统指引货位
        /// </summary>
        public const string IsGuideLocation = "IsGuideLocation";
        /// <summary>
        /// 不同物料混放数量上限
        /// </summary>
        public const string TrayItemMixingUpNum = "TrayItemMixingUpNum";
        /// <summary>
        /// 码盘校验方式
        /// </summary>
        public const string PackTrayCheckMode = "PackTrayCheckMode";
        /// <summary>
        /// 是否周转箱拣货
        /// </summary>
        public const string IsNeedUniPak = "IsNeedUniPak";
        /// <summary>
        /// 质保快到期早先出
        /// </summary>
        public const string FirstWarrantFirstOut = "FirstWarrantFirstOut";
        /// <summary>
        /// 先进先出
        /// </summary>
        public const string FirstInFirstOut = "FirstInFirstOut";
        /// <summary>
        /// 出库提交审核不校验库存
        /// </summary>
        public const string NotCheckStock = "NotCheckStock";
        /// <summary>
        /// 任务调度
        /// </summary>
        public const string TaskDispatch = "TaskDispatch";
        /// <summary>
        /// 批次是否混放
        /// </summary>
        public const string MixedBatchesOrNot = "MixedBatchesOrNot";
        /// <summary>
        /// 库存是否启用收货区
        /// </summary>
        public const string AreaQtyReceiveGood = "AreaQtyReceiveGood";
        /// <summary>
        /// 库存是否启用发货区
        /// </summary>
        public const string AreaQtyDeliverGood = "AreaQtyDeliverGood";
    }
}