using Autofac.Features.ResolveAnything;
|
using Microsoft.EntityFrameworkCore.Internal;
|
using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Net;
|
using System.Text;
|
using WIDESEA.Common;
|
using WIDESEA.Common.InOutOrderEnum;
|
using WIDESEA.Core.ManageUser;
|
using WIDESEA.Core.Services;
|
using WIDESEA.Core.Utilities;
|
using WIDESEA.Entity.DomainModels;
|
using WIDESEA.Services.IRepositories;
|
using WIDESEA.Services.Repositories;
|
using WIDESEA.Services.Services;
|
|
namespace WIDESEA.Services.IServices
|
{
|
public partial class ToWCSService
|
{
|
|
/// <summary>
|
/// 插入货位,初始化货位
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
public WebResponseContent InsertLocationInfo(SaveModel saveModel)
|
{
|
WebResponseContent content = new WebResponseContent();
|
|
try
|
{
|
for(int i = 1; i < 9; i++)
|
{
|
for (int j = 1; j < 3; j++)
|
{
|
for (int k = 2; k < 54; k++)
|
{
|
Dt_locationinfo loc = new Dt_locationinfo();
|
loc.location_pkid = Guid.NewGuid();
|
|
loc.location_id = i.ToString().PadLeft(2, '0') + "-" + "01" + "-" + k.ToString().PadLeft(3, '0')+"-"+ j.ToString().PadLeft(2, '0');
|
|
Console.WriteLine(loc.location_id);
|
|
loc.location_areaid = "01";
|
loc.location_state = LocationState.LocationState_Empty.ToString();
|
loc.location_line = j;
|
loc.location_column = k;
|
loc.location_layer = i;
|
loc.location_deep = 1;
|
loc.location_islocked = false;
|
|
Dt_locationinfoRepository.Instance.Add(loc,true);
|
}
|
}
|
}
|
content.OK();
|
}
|
catch(Exception ex)
|
{
|
content.Error(ex.Message);
|
}
|
|
return content;
|
|
}
|
|
|
|
}
|
}
|