Admin
2025-12-02 9e42f0dafa019f5ecf6b0ff425ecb966b002171e
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/*
 *所有关于VV_OutboundOrderInfo类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*VV_OutboundOrderInfoService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
 
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using Spire.Xls;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using WIDESEA.Common;
using WIDESEA.Common.ChatHub;
using WIDESEA.Common.CustomModels;
using WIDESEA.Common.EquipEnum;
using WIDESEA.Core.Configuration;
using WIDESEA.Core.EFDbContext;
using WIDESEA.Core.Extensions;
using WIDESEA.Core.ManageUser;
using WIDESEA.Core.Utilities;
using WIDESEA.Entity.DomainModels;
using WIDESEA.Services.IRepositories;
using WIDESEA.Services.Repositories;
 
namespace WIDESEA.Services.Services
{
    public partial class VV_OutboundOrderInfoService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly IVV_OutboundOrderInfoRepository _repository;//访问数据库
 
        [ActivatorUtilitiesConstructor]
        public VV_OutboundOrderInfoService(
            IVV_OutboundOrderInfoRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
 
        
        /// <summary>
        /// 获取出库单明细
        /// </summary>
        /// <param name="orderDetail"></param>
        /// <returns></returns>
        public List<Dt_outboundorder_detail> GetOutboundorder_Detail(List<Dictionary<string, object>> orderDetail)
        {
            List<Dt_outboundorder_detail> details = new List<Dt_outboundorder_detail>();
            
            return details;
        }
 
        /// <summary>
        /// 删除出库订单
        /// </summary>
        /// <param name="keys"></param>
        /// <param name="delList"></param>
        /// <returns></returns>
        public override WebResponseContent Del(object[] keys, bool delList = true)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
           
        }
 
        /// <summary>
        /// 编辑出库订单
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public override WebResponseContent Update(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            return content;
        }
 
 
        //更换铜剁,根据更换后的货位Id,去库存表面找到新该记录
        public WebResponseContent GetNewGoodsInfoByNewLocationId(SaveModel saveDataModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
        //根据出库订单创建的条件,获取所有符合条件的铜剁记录,在手动更换铜剁时用到
        public object GetAllRecordByOrderId(PageDataOptions pageData)
        {
            return new object();
        }
 
        //处理前端传过来的更换铜剁结果
        public WebResponseContent GetChangeResult(SaveModel saveDataModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
        //根据订单号获取已经出库完成的铜剁信息,打印出库单的时候用到
        public WebResponseContent GetOutBoundDetailInfoForPrint(SaveModel saveDataModel)
        {
            WebResponseContent content = new WebResponseContent();
            
 
            return content;
        }
 
 
        public WebResponseContent GetOutBoundStationData()
        {
            WebResponseContent content = new WebResponseContent();
            
 
            return content;
        }
 
       
 
        /// <summary>
        /// 模拟营销系统出库订单
        /// </summary>
        public WebResponseContent NewOutBoundOrder(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
           
            return content;
        }
 
 
        /// <summary>
        /// 编辑出库订单,重量不可编辑
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent ModifyOutBoundOrder(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
        
 
        /// <summary>
        /// 手动完成营销系统出库订单
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent FinishedOutBoundOrderByMannual(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
 
        /// <summary>
        /// 手动删除营销系统出库订单
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent DeleteOutBoundOrderByMannual(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
        /// <summary>
        /// 修改配重区间值
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent ModifyGapValue(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
        /// <summary>
        /// 修改是否启用白名单装车
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent ModifyWhiteValue(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
        /// <summary>
        /// 获取配重区间值
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent GetGapValue()
        {
            WebResponseContent content = new WebResponseContent();
           
            return content;
        }
 
 
        /// <summary>
        /// 获取白名单装车状态
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent GetWhiteValue()
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
        /// <summary>
        /// 导出营销系统配重单
        /// </summary>
        /// <param name="saveModel">单号</param>
        /// <returns></returns>
        public WebResponseContent exportOrderInfo(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
        /// <summary>
        /// 获取统计数据
        /// </summary>
        /// <returns></returns>
        public WebResponseContent GetSummaryData(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
 
 
 
        /// <summary>
        /// 插入统计数据
        /// </summary>
        /// <returns></returns>
        public WebResponseContent InsertSummaryData(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            
            return content;
        }
    }
 
 
    public class MyModel : IComparable<MyModel>
    {
        public int weight;
        public bool flag = false;
        public string goodsId;
        public string batch;
 
        public int CompareTo(MyModel obj_)
        {
            if (this.weight > obj_.weight)
                return 1;
            else
                return -1;
        }
    }
}