已删除7个文件
已修改27个文件
已添加48个文件
| | |
| | | /// <param name="targetAddress">ä¿®æ¹åçç®æ å°å</param> |
| | | /// <param name="currentAddress">ä¿®æ¹åçå½åå°å</param> |
| | | /// <param name="nextAddress">ä¿®æ¹åçä¸ä¸å°å</param> |
| | | void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = ""); |
| | | void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "", int heightType = 0); |
| | | |
| | | /// <summary> |
| | | /// 请æ±åé
å··é |
| | |
| | | [ExporterHeader(DisplayName = "WMSä»»å¡ä¸»é®")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "WMSä»»å¡ä¸»é®")] |
| | | public int WMSId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é«åº¦ç±»å")] |
| | | [ExporterHeader(DisplayName = "é«åº¦ç±»å")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "é«åº¦ç±»å")] |
| | | public int HeightType { get; set; } |
| | | /// <summary> |
| | | /// ä»»å¡ä¸åæ¶é´ |
| | | /// </summary> |
| | |
| | | /// <param name="targetAddress">ä¿®æ¹åçç®æ å°å</param> |
| | | /// <param name="currentAddress">ä¿®æ¹åçå½åå°å</param> |
| | | /// <param name="nextAddress">ä¿®æ¹åçä¸ä¸å°å</param> |
| | | public void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "") |
| | | public void UpdateTask(Dt_Task task, TaskStatusEnum taskStatus, string deviceCode = "", string sourceAddress = "", string targetAddress = "", string currentAddress = "", string nextAddress = "", string roadwayNo = "", int heightType = 0) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(App.User?.UserId == 0 ? $"ç³»ç»èªå¨æµç¨" : "人工æå¨æµç¨"); |
| | | if (task.DeviceCode != deviceCode && !string.IsNullOrEmpty(deviceCode)) |
| | |
| | | stringBuilder.Append($",å··éå·ç±{task.Roadway}åæ´ä¸º{roadwayNo}"); |
| | | task.Roadway = roadwayNo; |
| | | } |
| | | if (heightType!=0) |
| | | { |
| | | task.HeightType= heightType; |
| | | } |
| | | if (task.TaskState != taskStatus.ObjToInt()) |
| | | { |
| | | string newStatus = $"{taskStatus}"; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Agv; |
| | | using WIDESEAWCS_Common.APIEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public partial class AGV_CPJob |
| | | { |
| | | public void SendAGVTask() |
| | | { |
| | | try |
| | | { |
| | | var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && nameof(AGV_FLJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); |
| | | foreach (var task in newTasks) |
| | | { |
| | | try |
| | | { |
| | | if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt()) |
| | | task.CurrentAddress = GetAGVAddress(task.CurrentAddress); |
| | | else |
| | | task.NextAddress = GetAGVAddress(task.NextAddress); |
| | | AgvTaskDTO taskDTO = new AgvTaskDTO() |
| | | { |
| | | TaskCode = task.AgvTaskNum, |
| | | ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum, |
| | | TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR", |
| | | ctnrCode = task.PalletCode, |
| | | PositionCodePath = new List<CodePath>() |
| | | { |
| | | new CodePath() |
| | | { |
| | | type="05", |
| | | positionCode=task.CurrentAddress |
| | | }, |
| | | new CodePath() |
| | | { |
| | | type="05", |
| | | positionCode=task.NextAddress |
| | | } |
| | | }, |
| | | }; |
| | | WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_FLSendTask); |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | |
| | | task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | task.TaskState = TaskStatusEnum.Exception.ObjToInt(); |
| | | task.ExceptionMessage = ex.Message; |
| | | } |
| | | } |
| | | _taskService.UpdateData(newTasks); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(AGV_FLJob), ex.Message, ex); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// è·åAGVå°å |
| | | /// </summary> |
| | | /// <param name="Address"></param> |
| | | /// <returns></returns> |
| | | public static string GetAGVAddress(string Address) |
| | | { |
| | | string[] targetCodes = Address.Split("-"); |
| | | if (targetCodes.Length == 5) |
| | | { |
| | | var Row = Convert.ToInt16(targetCodes[1]); |
| | | var Column = Convert.ToInt16(targetCodes[2]); |
| | | var Layer = Convert.ToInt16(targetCodes[3]); |
| | | var a = Row switch |
| | | { |
| | | 1 => "A1", |
| | | 2 => "B1", |
| | | 3 => "C1", |
| | | 4 => "D1", |
| | | 5 => "E1", |
| | | _ => throw new Exception($"æªå®ä¹çæ,å°å:ã{Address}ã"), |
| | | }; |
| | | var b = Layer > 9 ? "" + Layer : "0" + Layer; |
| | | var c = Column > 9 ? "" + Column : "0" + Column; |
| | | if (Column == 10) c = "010"; |
| | | Address = a + b + c; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception($"å°åæè¯¯,å°å:ã{Address}ã"); |
| | | } |
| | | return Address; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using Quartz; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public partial class AGV_CPJob : JobBase, IJob |
| | | { |
| | | public readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly IRouterService _routerService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | | private readonly IMapper _mapper; |
| | | |
| | | public AGV_CPJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, IMapper mapper) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | | _routerService = routerService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _mapper = mapper; |
| | | } |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | try |
| | | { |
| | | SendAGVTask(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.Out.WriteLine(nameof(AGV_CPJob) + ":" + ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.Repository; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | using ICacheService = WIDESEAWCS_Core.Caches.ICacheService; |
| | | |
| | | namespace WIDESEAWCS_Tasks.æåä» |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class ConveyorLineJob_CP : JobBase, IJob |
| | | { |
| | | private readonly ICacheService _cacheService; |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly ITaskRepository _taskRepository; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | | private readonly IRouterRepository _routerRepository; |
| | | private readonly IRouterService _routerService; |
| | | private readonly IRouterExtension _routerExtension; |
| | | private readonly List<Dt_WarehouseDevice> warehouseDevices; |
| | | |
| | | public ConveyorLineJob_CP(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension) |
| | | { |
| | | _cacheService = cacheService; |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | | _taskRepository = taskRepository; |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _routerRepository = routerRepository; |
| | | _routerService = routerService; |
| | | _routerExtension = routerExtension; |
| | | |
| | | string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice)); |
| | | if (!string.IsNullOrEmpty(warehouseDevicesStr)) |
| | | { |
| | | warehouseDevices = JsonConvert.DeserializeObject<List<Dt_WarehouseDevice>>(warehouseDevicesStr) ?? new List<Dt_WarehouseDevice>(); |
| | | } |
| | | else |
| | | { |
| | | warehouseDevices = new List<Dt_WarehouseDevice>(); |
| | | } |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value); |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | Dt_WarehouseDevice? warehouseDevice = warehouseDevices.FirstOrDefault(x => x.DeviceCode == device.DeviceCode); |
| | | if (warehouseDevice == null) |
| | | { |
| | | WriteError(device.DeviceName, $"请é
ç½®ä»åºè®¾å¤ä¿¡æ¯"); |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
| | | } |
| | |
| | | WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations, task.TaskNum, conveyorLineInfoRead.Spare2); |
| | | if (responseContent.Status) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, roadwayNo: responseContent.Data.ToString() ?? ""); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, roadwayNo: responseContent.Data.ToString() ?? "",heightType: conveyorLineInfoRead.Spare2); |
| | | } |
| | | } |
| | | |
| | |
| | | device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode, roadwayNo: roadwayNo); |
| | | _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode, roadwayNo: roadwayNo,heightType: conveyorLineInfoRead.Spare2); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | if (router.IsEnd) |
| | | { |
| | | string? targetLoca = _taskService.RequestAssignLocationByHeight(taskIn.TaskNum, taskIn.Roadway, conveyorLineInfoRead.Spare2); |
| | | string? targetLoca = _taskService.RequestAssignLocationByHeight(taskIn.TaskNum, taskIn.Roadway, taskIn.HeightType); |
| | | if (!string.IsNullOrEmpty(targetLoca)) |
| | | { |
| | | currentAddress = item.StackerCraneStationCode; |
| | |
| | | device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | } |
| | | else //è°æ¨ä½¿ç¨ |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | } |
| | | //else //è°æ¨ä½¿ç¨ |
| | | //{ |
| | | // device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | //} |
| | | //{ |
| | | // task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && string.IsNullOrEmpty(x.DeviceCode) && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.WarehouseId == warehouseDevice.WarehouseId); |
| | | // if (task != null) |
| | |
| | | { |
| | | Dt_LocationInfo? nearLocation = null; |
| | | if (emptyLocation.RoadwayNo != "SC01_BC" && emptyLocation.Column % 2 == 1) |
| | | nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column + 1); |
| | | nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column - 1); |
| | | else if (emptyLocation.RoadwayNo == "SC01_BC" && emptyLocation.Column % 2 == 0) |
| | | nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column + 1); |
| | | if (nearLocation != null && DepthLocationIsEmpty_BC(locationInfos, nearLocation) != null) |
| | |
| | | /// MESåæ¥æ¿æåºåº |
| | | /// </summary> |
| | | [Description("MESåæ¥æ¿æåºåº")] |
| | | WMS_MES_MaterialLotaAcept |
| | | WMS_MES_MaterialLotaAcept, |
| | | /// <summary> |
| | | /// MES忥æååºåº |
| | | /// </summary> |
| | | [Description("MES忥æååºåº")] |
| | | WMS_MES_ShipmentOrderSync |
| | | } |
| | | } |
| | |
| | | |
| | | using HttpClient httpClient = new HttpClient(); |
| | | httpClient.Timeout = new TimeSpan(0, 0, 60); |
| | | string authorization = "AppKey 1830415116987195392"; |
| | | //string authorization = "AppKey 1830415116987195392"; |
| | | string authorization = "AppKey 1773317109539201024"; |
| | | |
| | | |
| | | headers = new Dictionary<string, string> |
| | | { |
| | | { "Authorization", authorization }, |
| | | { "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" } |
| | | //{ "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" } |
| | | { "Site_tenant_id", "ced19269-2b83-4577-be43-8cc2f700251e" } |
| | | }; |
| | | if (headers != null) |
| | | { |
| | |
| | | [PropertyValidate("订åç±»å", NotNullAndEmpty = true, Check = new object[] { 1, 2})] |
| | | public int OType { get; set; } |
| | | /// <summary> |
| | | /// ä»åºç±»å |
| | | /// </summary> |
| | | public string WaType { get; set; } |
| | | /// <summary> |
| | | /// 计ååºè´§æ¶é´ |
| | | /// </summary> |
| | | public string PlantShipDate { get; set; } |
| | |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | public string FactoryCode { get; set; } = "HA02"; |
| | | public string FactoryCode { get; set; } |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 产å卿 |
| | | /// </summary> |
| | | public int DateCode { get; set; } |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// åæ ¼PCSæ° |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public int UnPackStock { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½ä¸å¿ |
| | | /// </summary> |
| | | public string WorkCenter { get; set; } |
| | | /// <summary> |
| | | /// å
å
ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<MESBagDetail> BagDetails { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// MESå
å
å
¥åº |
| | | /// </summary> |
| | | public class MesBoxInfoModel |
| | | { |
| | | /// <summary> |
| | | /// å¤ç®±å· |
| | | /// </summary> |
| | | public string BoxNo { get; set; } |
| | | /// <summary> |
| | | /// åºåºåå· |
| | | /// </summary> |
| | | public string ShipmentOrder { get; set; } |
| | | /// <summary> |
| | | /// åºè´§åå· |
| | | /// </summary> |
| | | public List<MESBagDetail> Bags { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// å
å
ä¿¡æ¯ |
| | |
| | | /// </summary> |
| | | public string XSite { get; set; } |
| | | /// <summary> |
| | | /// å
å
éé |
| | | /// </summary> |
| | | public float Weight { get; set; } |
| | | /// <summary> |
| | | /// å
è£
æ¶é´ |
| | | /// </summary> |
| | | public DateTime PackingDate { get; set; } |
| | | /// <summary> |
| | | /// å
å
æç» |
| | | /// </summary> |
| | | public List<MESBagItem> BagItems { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// å
å
æç» |
| | | /// </summary> |
| | | public class MESBagItem |
| | | { |
| | | /// <summary> |
| | | /// å¶é 订å |
| | | /// </summary> |
| | | public string MoNumber { get; set; } |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | public string LotNumber { get; set; } |
| | | /// <summary> |
| | | /// ERPå·¥å |
| | | /// </summary> |
| | | public string ERPOrder { get; set; } |
| | |
| | | /// </summary> |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// 客æ·åå§å¨æ |
| | | /// å
è£
SETæ°é |
| | | /// </summary> |
| | | public string CustomDateCode { get; set; } |
| | | public float SETQty { get;set; } |
| | | /// <summary> |
| | | /// å
å
éé |
| | | /// åæ ¼PCSæ° |
| | | /// </summary> |
| | | public float Weight { get; set; } |
| | | public float OKPCSQTY { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½ä¸å¿ |
| | | /// Xæ° |
| | | /// </summary> |
| | | public string WorkCenter { get; set; } |
| | | public float XQty { get; set; } |
| | | /// <summary> |
| | | /// å
è£
æ¶é´ |
| | | /// Xä½ |
| | | /// </summary> |
| | | public DateTime PackingDate { get; set; } |
| | | |
| | | public string XSite { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// WMS忥æåè³MES |
| | | /// </summary> |
| | | public class MesShipmentOrderSync |
| | | { |
| | | /// <summary> |
| | | /// åºè´§åå· |
| | | /// </summary> |
| | | public string ShipmentOrder { get; set; } |
| | | /// <summary> |
| | | /// å®¢æ· |
| | | /// </summary> |
| | | public string Customer { get; set; } |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | public string FactoryCode { get; set; } |
| | | /// <summary> |
| | | /// åºè´§å°åç§° |
| | | /// </summary> |
| | | public string ShipName { get; set; } |
| | | /// <summary> |
| | | /// åºè´§å°å |
| | | /// </summary> |
| | | public string ShippingAddress { get; set; } |
| | | /// <summary> |
| | | /// 计ååºè´§æ¶é´ |
| | | /// </summary> |
| | | public string PlantShipDate { get; set; } |
| | | /// <summary> |
| | | /// 详æ
|
| | | /// </summary> |
| | | public List<MesShipOrderDetail> OrderDetails { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// 详æ
|
| | | /// </summary> |
| | | public class MesShipOrderDetail |
| | | { |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | public string ProductCode { get; set; } |
| | | /// <summary> |
| | | /// 产åçæ¬ |
| | | /// </summary> |
| | | public string ProductVersion { get; set; } |
| | | /// <summary> |
| | | /// åºè´§æ°é |
| | | /// </summary> |
| | | public float Qty { get; set; } |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢å |
| | | /// </summary> |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// åºå· |
| | | /// </summary> |
| | | public int Sequence { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½ä¸å¿ |
| | | /// </summary> |
| | | public string WorkCenter { get; set; } |
| | | } |
| | | } |
| | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPæååºåºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | public string InvokeProOutApi(ERPProOutOrderModel outOrderModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.InvokeErpApi.ToString()); |
| | | ERPBaseModel<ERPProOutOrderModel> model = new ERPBaseModel<ERPProOutOrderModel>() |
| | | { |
| | | Data = outOrderModel, |
| | | Desc = "åºåºæåéç¥", |
| | | Type = "toOrderAssignment", |
| | | SecurityCode = "TeChuang" |
| | | }; |
| | | string request = JsonConvert.SerializeObject(model, settings); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request); |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPæåå
¥åºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | public string InvokeProInApi(ERPProInboundModel inboundModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.InvokeErpApi.ToString()); |
| | | ERPBaseModel<ERPProInboundModel> model = new ERPBaseModel<ERPProInboundModel>() |
| | | { |
| | | Data = inboundModel, |
| | | Desc = "æåå
¥åº", |
| | | Type = "toWOStockForm", |
| | | SecurityCode = "TeChuang" |
| | | }; |
| | | string request = JsonConvert.SerializeObject(model, settings); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request); |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPç©æåºåºæ¥å£è°ç¨ |
| | | /// </summary> |
| | | /// <param name="outboundModel"></param> |
| | |
| | | /// ERPçèµ¢/äºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | string InvokeTakeStockApi(ERPTakeStockModel takeModel); |
| | | /// <summary> |
| | | /// ERPæååºåºå®æä¸æ¥ |
| | | /// </summary> |
| | | /// <param name="outOrderModel"></param> |
| | | /// <returns></returns> |
| | | string InvokeProOutApi(ERPProOutOrderModel outOrderModel); |
| | | /// <summary> |
| | | /// ERPæåå
¥åºå®æä¸æ¥ |
| | | /// </summary> |
| | | /// <param name="inboundModel"></param> |
| | | /// <returns></returns> |
| | | string InvokeProInApi(ERPProInboundModel inboundModel); |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// å
¬å¸ä»£ç |
| | | /// </summary> |
| | | public string CompanyCode { get; set; } = "HATC"; |
| | | public string CompanyCode { get; set; } |
| | | /// <summary> |
| | | /// å·¥åä»£å· |
| | | /// </summary> |
| | | public string FactoryCode { get; set; } = "HA02"; |
| | | public string FactoryCode { get; set; } |
| | | /// <summary> |
| | | /// ä»åºä»£ç |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public string StockDate { get; set; } |
| | | /// <summary> |
| | | /// å
¥åºæ¥æ |
| | | /// 夿³¨(è¶æ¡ç ) |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | /// <summary> |
| | | /// å
¥åºç±»å |
| | | /// </summary> |
| | | public string StockFormType { get; set; } = "Production"; |
| | | public string StockFormType { get; set; } |
| | | /// <summary> |
| | | /// å
¥åºæç» |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// æ¶è´§æ°é |
| | | /// </summary> |
| | | public int QtyRecieved { get; set; } |
| | | public float QtyRecieved { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¶è´§æ¹æ¬¡ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IProOutOrderDetailRepository : IRepository<Dt_ProOutOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IProOutOrderRepository : IRepository<Dt_ProOutOrder> |
| | | { |
| | | } |
| | | } |
| | |
| | | IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; } |
| | | |
| | | IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; } |
| | | IProOutOrderService ProOutOrderService { get; } |
| | | IProOutOrderDetailService ProOutOrderDetailService { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IProOutOrderDetailService : IService<Dt_ProOutOrderDetail> |
| | | { |
| | | IProOutOrderDetailRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IProOutOrderService : IService<Dt_ProOutOrder> |
| | | { |
| | | IProOutOrderRepository Repository { get; } |
| | | /// <summary> |
| | | /// æ¥æ¶æååºåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent ProductDeliveryOrder(ErpProOutOrderDTO outOrderDTO); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockRepository |
| | | { |
| | | public interface IProStockInfoDetailRepository : IRepository<Dt_ProStockInfoDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockRepository |
| | | { |
| | | public interface IProStockInfoDetail_HtyRepository : IRepository<Dt_ProStockInfoDetail_Hty> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockRepository |
| | | { |
| | | public interface IProStockInfoRepository : IRepository<Dt_ProStockInfo> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockRepository |
| | | { |
| | | public interface IProStockInfo_HtyRepository : IRepository<Dt_ProStockInfo_Hty> |
| | | { |
| | | } |
| | | } |
| | |
| | | IStockInfoDetail_HtyRepository StockInfoDetail_HtyRepository { get; } |
| | | |
| | | IStockInfo_HtyRepository StockInfo_HtyRepository { get; } |
| | | IProStockInfoRepository ProStockInfoRepository { get; } |
| | | IProStockInfoDetailRepository ProStockInfoDetailRepository { get; } |
| | | IProStockInfo_HtyRepository ProStockInfo_HtyRepository { get; } |
| | | IProStockInfoDetail_HtyRepository ProStockInfoDetail_HtyRepository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | | { |
| | | public interface IProStockInfoDetailService : IService<Dt_ProStockInfoDetail> |
| | | { |
| | | IProStockInfoDetailRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | | { |
| | | public interface IProStockInfoDetail_HtyService : IService<Dt_ProStockInfoDetail_Hty> |
| | | { |
| | | IProStockInfoDetail_HtyRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | | { |
| | | public interface IProStockInfoService : IService<Dt_ProStockInfo> |
| | | { |
| | | IProStockInfoRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | | { |
| | | public interface IProStockInfo_HtyService : IService<Dt_ProStockInfo_Hty> |
| | | { |
| | | IProStockInfo_HtyRepository Repository { get; } |
| | | } |
| | | } |
| | |
| | | |
| | | WebResponseContent GeneratePKOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews); |
| | | /// <summary> |
| | | /// MESæåå
¥åºåæ¥æ¶ |
| | | /// MESæåå
å
ä¿¡æ¯æ¥æ¶ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | MesResponseContent BagInfoSync(MesBagInfoModel bagInfoModel); |
| | | /// <summary> |
| | | /// MESæåå¤å
ä¿¡æ¯æ¥æ¶ |
| | | /// </summary> |
| | | /// <param name="boxInfoModel"></param> |
| | | /// <returns></returns> |
| | | MesResponseContent BoxStockin(MesBoxInfoModel boxInfoModel); |
| | | /// <summary> |
| | | /// MESæååºåºæ¥å£è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent ShipmentOrderSync(MesShipmentOrderSync model); |
| | | } |
| | | } |
| | |
| | | return content.Error("å½å忮已å
¥åºæå
³éç¶æ"); |
| | | } |
| | | ProSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<ProSerNumAnalysisModel>(AnalysisCodeEnum.ProSerNumAnalysis, serNum); |
| | | Dt_MesProInOrderDetail? proInOrderDetail = mesProInOrder.Details.FirstOrDefault(x => x.BagNo == model.BagNO); |
| | | //å¤ææ«æå忮䏿¯å¦å¹é
|
| | | if (proInOrderDetail == null) |
| | | { |
| | | return content.Error($"æ¡ç {mesProInOrder.BatchNo}䏿 å
å
{model.BagNO}ä¿¡æ¯"); |
| | | } |
| | | if ((proInOrderDetail.OverInQuantity + model.OKPCSQTY.ObjToInt())> proInOrderDetail.OKPCSQTY) |
| | | { |
| | | return content.Error($"å
å
æ°é溢åº{(proInOrderDetail.OverInQuantity + model.OKPCSQTY.ObjToInt()) - proInOrderDetail.OKPCSQTY}"); |
| | | } |
| | | float SumPCSQty = mesProInOrder.Details.Sum(x => x.OKPCSQTY); |
| | | float OverPCSQty = mesProInOrder.Details.Sum(x=>x.OverInQuantity); |
| | | if ((OverPCSQty+model.OKPCSQTY.ObjToInt())>SumPCSQty) |
| | | { |
| | | return content.Error($"å½åå
¥åºè®¢åæ°é溢åº{(OverPCSQty + model.OKPCSQTY.ObjToInt())- SumPCSQty}"); |
| | | } |
| | | //è·å对åºå
å
æç» |
| | | Dt_MesProInOrderDetail? proInOrderDetail = mesProInOrder.Details.FirstOrDefault(x=>x.BagNo==model.BagNO) ?? throw new Exception($"æªæ¾å°"); |
| | | proInOrderDetail.OverInQuantity += model.OKPCSQTY.ObjToInt(); |
| | | _inboundRepository.MesProInOrderDetailRepository.UpdateData(proInOrderDetail); |
| | | return content.OK($"å
å
{proInOrderDetail.BagNo}å·²æ«æ°éï¼{proInOrderDetail.OverInQuantity},å©ä½ï¼{proInOrderDetail.OKPCSQTY-proInOrderDetail.OverInQuantity}"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¯å¦æç®±å
¥åº")] |
| | | public int UnPackStock { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½ä¸å¿ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å·¥ä½ä¸å¿")] |
| | | public string WorkCenter { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "Xä½")] |
| | | public string XSite { get; set; } |
| | | /// <summary> |
| | | /// å
å
éé |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
å
éé")] |
| | | public float Weight { get; set; } |
| | | /// <summary> |
| | | /// ERPå·¥å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ERPå·¥å")] |
| | | public string ERPOrder { get; set; } |
| | | /// <summary> |
| | | /// å¶é 订å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å¶é 订å")] |
| | | public string MoNumber { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "éå®è®¢å")] |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// 客æ·åå§å¨æ |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客æ·åå§å¨æ")] |
| | | public string CustomDateCode { get; set; } |
| | | /// <summary> |
| | | /// å
å
éé |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
å
éé")] |
| | | public float Weight { get; set; } |
| | | /// <summary> |
| | | /// å·¥ä½ä¸å¿ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å·¥ä½ä¸å¿")] |
| | | public string WorkCenter { get; set; } |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string LotNumber { get; set; } |
| | | /// <summary> |
| | | /// å
è£
æ¶é´ |
| | | /// </summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºåºå |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProOutOrder), "æååºåºå")] |
| | | public class Dt_ProOutOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false,Length = 20, ColumnDescription = "åºåºåå·")] |
| | | public string ProOutOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åç±»å")] |
| | | public int ProOrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åç¶æ")] |
| | | public int ProOrderStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 计ååºè´§æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "计ååºè´§æ¶é´")] |
| | | public DateTime PlantShipDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true,Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æååºåºå详æ
|
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_ProOutOrderDetail.ProOrderId), nameof(Id))] |
| | | public List<Dt_ProOutOrderDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºåºæç»å |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProOutOrderDetail), "æååºåºæç»å")] |
| | | public class Dt_ProOutOrderDetail: BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æååºåºåä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºå主é®")] |
| | | public int ProOrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåè¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºåè¡å·")] |
| | | public int RowId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåæç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºåæç»ç¶æ")] |
| | | public int ProOrderDetailStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éå®è®¢åå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false,Length = 50, ColumnDescription = "éå®è®¢åå·")] |
| | | public string SaleOrder { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®¢æ· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客æ·")] |
| | | public string Customer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å·¥å")] |
| | | public string FactoryCode { get; set; } |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åç¼ç ")] |
| | | public string PCode { get; set; } |
| | | /// <summary> |
| | | /// 产åçæ¬ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åçæ¬")] |
| | | public string PVer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// äº§åæ¹æ¬¡ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "äº§åæ¹æ¬¡")] |
| | | public string PLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产å卿 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "产å卿")] |
| | | public string DateCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ ¼PCSæ° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ ¼PCSæ°")] |
| | | public float QtyPcs { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²åºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å·²åºæ°é")] |
| | | public float OverQtyPcs { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Xæ¿æ° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "Xæ¿æ°")] |
| | | public string XQty { get; set; } |
| | | /// <summary> |
| | | /// Xæ¿ä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "Xæ¿ä½")] |
| | | public string XSite { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// å¤åæ° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å¤åæ°")] |
| | | public float SpareQty { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºåä¿¡æ¯ |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProStockInfo), "æååºåä¿¡æ¯")] |
| | | public class Dt_ProStockInfo : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¶æ¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "è¶æ¡å·/å¤ç®±å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¶æ¡ç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è¶æ¡ç±»å")] |
| | | public int PalletType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºè´§åå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "åºè´§åå·")] |
| | | public string ShipmentOrder { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | /// <summary> |
| | | /// åºåç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç¶æ")] |
| | | public int StockStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | /// <summary> |
| | | /// åºåæç» |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_ProStockInfoDetail.ProStockId), nameof(Id))] |
| | | public List<Dt_ProStockInfoDetail> proStockInfoDetails { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºåä¿¡æ¯æç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProStockInfoDetail), "æååºåä¿¡æ¯æç»")] |
| | | public class Dt_ProStockInfoDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æååºåä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æååºå主é®")] |
| | | public int ProStockId { get; set; } |
| | | /// <summary> |
| | | /// å
å
å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å
å
å·")] |
| | | public string BagNo { get; set; } |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åç¼ç ")] |
| | | public string ProductCode { get; set; } |
| | | /// <summary> |
| | | /// åºåºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºæ°é")] |
| | | public float OutboundQuantity { get; set; } |
| | | /// <summary> |
| | | /// æååºåæç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æååºåæç»ç¶æ")] |
| | | public int ProOutDetailStatus { get; set; } |
| | | /// <summary> |
| | | /// çæ¬ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "çæ¬")] |
| | | public string ProductVersion { get; set; } |
| | | /// <summary> |
| | | /// å
è£
SETæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
è£
SETæ°é")] |
| | | public float SETQty { get; set; } |
| | | /// <summary> |
| | | /// åæ ¼PCSæ° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ ¼PCSæ°")] |
| | | public float OKPCSQTY { get; set; } |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "卿")] |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// Xæ° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "Xæ°")] |
| | | public float XQty { get; set; } |
| | | /// <summary> |
| | | /// Xä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "Xä½")] |
| | | public string XSite { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
å
éé |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
å
éé")] |
| | | public float Weight { get; set; } |
| | | /// <summary> |
| | | /// å
è£
æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å
è£
æ¶é´")] |
| | | public DateTime PackingDate { get; set; } |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string LotNumber { get; set; } |
| | | /// <summary> |
| | | /// ERPå·¥å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ERPå·¥å")] |
| | | public string ERPOrder { get; set; } |
| | | /// <summary> |
| | | /// å¶é 订å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å¶é 订å")] |
| | | public string MoNumber { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "éå®è®¢å")] |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Xml.Linq; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºååå²ä¿¡æ¯æç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProStockInfoDetail_Hty), "æååºååå²ä¿¡æ¯æç»")] |
| | | public class Dt_ProStockInfoDetail_Hty:Dt_ProStockInfoDetail, IBaseHistoryEntity |
| | | { |
| | | /// <summary> |
| | | /// åè¡¨ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å表主é®")] |
| | | [ExporterHeader(DisplayName = "å表主é®")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "å表主é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æä½ç±»å")] |
| | | [ExporterHeader(DisplayName = "æä½ç±»å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½ç±»å")] |
| | | public string OperateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç§»å
¥å岿¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç§»å
¥å岿¶é´")] |
| | | [ExporterHeader(DisplayName = "ç§»å
¥å岿¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç§»å
¥å岿¶é´")] |
| | | public DateTime InsertTime { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Xml.Linq; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºååå²ä¿¡æ¯ |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_ProStockInfo_Hty), "æååºååå²ä¿¡æ¯")] |
| | | public class Dt_ProStockInfo_Hty:Dt_ProStockInfo, IBaseHistoryEntity |
| | | { |
| | | /// <summary> |
| | | /// åè¡¨ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å表主é®")] |
| | | [ExporterHeader(DisplayName = "å表主é®")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "å表主é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æä½ç±»å")] |
| | | [ExporterHeader(DisplayName = "æä½ç±»å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½ç±»å")] |
| | | public string OperateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç§»å
¥å岿¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç§»å
¥å岿¶é´")] |
| | | [ExporterHeader(DisplayName = "ç§»å
¥å岿¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç§»å
¥å岿¶é´")] |
| | | public DateTime InsertTime { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class ProOutOrderDetailRepository : RepositoryBase<Dt_ProOutOrderDetail>, IProOutOrderDetailRepository |
| | | { |
| | | public ProOutOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class ProOutOrderRepository : RepositoryBase<Dt_ProOutOrder>, IProOutOrderRepository |
| | | { |
| | | public ProOutOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | public IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; } |
| | | |
| | | public IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; } |
| | | public IProOutOrderService ProOutOrderService { get; } |
| | | public IProOutOrderDetailService ProOutOrderDetailService { get; } |
| | | |
| | | public OutboundService(IOutboundOrderDetailService outboundOrderDetailService,IMesPPOutboundOrderService mesPPOutboundOrderService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService) |
| | | public OutboundService(IOutboundOrderDetailService outboundOrderDetailService,IMesPPOutboundOrderService mesPPOutboundOrderService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService, IProOutOrderService proOutOrderService, IProOutOrderDetailService proOutOrderDetailService) |
| | | { |
| | | OutboundOrderDetailService = outboundOrderDetailService; |
| | | OutboundOrderService = outboundOrderService; |
| | | OutboundStockLockInfoService = outboundStockLockInfoService; |
| | | MesOutboundOrderService = mesOutboundOrderService; |
| | | MesPPOutboundOrderService = mesPPOutboundOrderService; |
| | | |
| | | ProOutOrderService = proOutOrderService; |
| | | ProOutOrderDetailService = proOutOrderDetailService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public partial class ProOutOrderDetailService : ServiceBase<Dt_ProOutOrderDetail, IProOutOrderDetailRepository>, IProOutOrderDetailService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | public IProOutOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public ProOutOrderDetailService(IProOutOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public partial class ProOutOrderService : ServiceBase<Dt_ProOutOrder, IProOutOrderRepository>, IProOutOrderService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IMapper _mapper; |
| | | |
| | | public IProOutOrderRepository Repository => BaseDal; |
| | | |
| | | public ProOutOrderService(IProOutOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IBasicRepository basicRepository, IMapper mapper) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _basicRepository = basicRepository; |
| | | _mapper = mapper; |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶ERPæååºåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent ProductDeliveryOrder(ErpProOutOrderDTO outOrderDTO) |
| | | { |
| | | try |
| | | { |
| | | return outOrderDTO.Way switch |
| | | { |
| | | 1 => AddDeliveryOrder(outOrderDTO), |
| | | 2 => UpdateDeliveryOrder(outOrderDTO), |
| | | 3 => DeleteDeliveryOrder(outOrderDTO), |
| | | _ => WebResponseContent.Instance.Error($"æä½ç±»åä¸åå¨,Way:{outOrderDTO.Way}"), |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ°å¢æååºåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent AddDeliveryOrder(ErpProOutOrderDTO outOrderDTO) |
| | | { |
| | | WebResponseContent content=new WebResponseContent(); |
| | | try |
| | | { |
| | | if (BaseDal.QueryFirst(x => x.ProOutOrderNo == outOrderDTO.OrderNo) != null) |
| | | { |
| | | return content.Error($"åºåºåå·{outOrderDTO.OrderNo}å·²åå¨!"); |
| | | } |
| | | Dt_Warehouse warehouse=null; |
| | | if (outOrderDTO.OType==1 && string.IsNullOrEmpty(outOrderDTO.WaType)) |
| | | { |
| | | warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==WarehouseEnum.HA71.ToString()); |
| | | } |
| | | else if (outOrderDTO.OType==2) |
| | | { |
| | | warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString()); |
| | | } |
| | | List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>(); |
| | | foreach (var item in outOrderDTO.OrderDetails) |
| | | { |
| | | proOutOrderDetails.Add(_mapper.Map<Dt_ProOutOrderDetail>(item)); |
| | | } |
| | | Dt_ProOutOrder proOutOrder= new Dt_ProOutOrder() |
| | | { |
| | | ProOutOrderNo= outOrderDTO.OrderNo, |
| | | WarehouseId= warehouse.WarehouseId, |
| | | ProOrderType= outOrderDTO.OType, |
| | | ProOrderStatus=OutOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | PlantShipDate= outOrderDTO.PlantShipDate.ObjToDate(), |
| | | Remark= outOrderDTO.Note, |
| | | Details= proOutOrderDetails |
| | | }; |
| | | Db.InsertNav(proOutOrder).Include(x => x.Details).ExecuteCommand(); |
| | | content.OK("æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// æ´æ°æååºåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent UpdateDeliveryOrder(ErpProOutOrderDTO outOrderDTO) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// å 餿ååºåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent DeleteDeliveryOrder(ErpProOutOrderDTO outOrderDTO) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class ProStockInfoDetailRepository : RepositoryBase<Dt_ProStockInfoDetail>, IProStockInfoDetailRepository |
| | | { |
| | | public ProStockInfoDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class ProStockInfoDetail_HtyRepository : RepositoryBase<Dt_ProStockInfoDetail_Hty>, IProStockInfoDetail_HtyRepository |
| | | { |
| | | public ProStockInfoDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class ProStockInfoRepository : RepositoryBase<Dt_ProStockInfo>, IProStockInfoRepository |
| | | { |
| | | public ProStockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class ProStockInfo_HtyRepository : RepositoryBase<Dt_ProStockInfo_Hty>, IProStockInfo_HtyRepository |
| | | { |
| | | public ProStockInfo_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | public IStockInfoDetail_HtyRepository StockInfoDetail_HtyRepository { get; } |
| | | |
| | | public IStockInfo_HtyRepository StockInfo_HtyRepository { get; } |
| | | public IProStockInfoRepository ProStockInfoRepository { get; } |
| | | public IProStockInfoDetailRepository ProStockInfoDetailRepository { get; } |
| | | public IProStockInfo_HtyRepository ProStockInfo_HtyRepository { get; } |
| | | public IProStockInfoDetail_HtyRepository ProStockInfoDetail_HtyRepository { get; } |
| | | |
| | | public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository, IStockInfoDetail_HtyRepository stockInfoDetail_HtyRepository,IStockInfo_HtyRepository stockInfo_HtyRepository) |
| | | public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository, IStockInfoDetail_HtyRepository stockInfoDetail_HtyRepository,IStockInfo_HtyRepository stockInfo_HtyRepository,IProStockInfoRepository proStockInfoRepository,IProStockInfoDetailRepository proStockInfoDetailRepository,IProStockInfo_HtyRepository proStockInfo_HtyRepository,IProStockInfoDetail_HtyRepository proStockInfoDetail_HtyRepository) |
| | | { |
| | | StockInfoDetailRepository = stockInfoDetailRepository; |
| | | StockInfoRepository = stockInfoRepository; |
| | | StockInfoDetail_HtyRepository = stockInfoDetail_HtyRepository; |
| | | StockInfo_HtyRepository = stockInfo_HtyRepository; |
| | | ProStockInfoRepository=proStockInfoRepository; |
| | | ProStockInfoDetailRepository = proStockInfoDetailRepository; |
| | | ProStockInfo_HtyRepository = proStockInfo_HtyRepository; |
| | | ProStockInfoDetail_HtyRepository = proStockInfoDetail_HtyRepository; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class ProStockInfoDetailService : ServiceBase<Dt_ProStockInfoDetail, IProStockInfoDetailRepository>, IProStockInfoDetailService |
| | | { |
| | | public IProStockInfoDetailRepository Repository => BaseDal; |
| | | public ProStockInfoDetailService(IProStockInfoDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class ProStockInfoDetail_HtyService : ServiceBase<Dt_ProStockInfoDetail_Hty, IProStockInfoDetail_HtyRepository>, IProStockInfoDetail_HtyService |
| | | { |
| | | public IProStockInfoDetail_HtyRepository Repository => BaseDal; |
| | | public ProStockInfoDetail_HtyService(IProStockInfoDetail_HtyRepository BaseDal) : base(BaseDal) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class ProStockInfoService : ServiceBase<Dt_ProStockInfo, IProStockInfoRepository>, IProStockInfoService |
| | | { |
| | | public IProStockInfoRepository Repository => BaseDal; |
| | | public IStockRepository _stockRepository; |
| | | public ProStockInfoService(IProStockInfoRepository BaseDal,IStockRepository stockRepository) : base(BaseDal) |
| | | { |
| | | _stockRepository = stockRepository; |
| | | } |
| | | public WebResponseContent UnBindStock(List<Dt_ProStockInfoDetail> proStockInfoDetails) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | //æ ¹æ®å
å
å·è¿è¡åºåæ£é¤ |
| | | try |
| | | { |
| | | List<Dt_ProStockInfoDetail> delProStockDetails=new List<Dt_ProStockInfoDetail>(); |
| | | //foreach (var item in collection) |
| | | //{ |
| | | // Dt_ProStockInfoDetail delProStockDetal= |
| | | //} |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class ProStockInfo_HtyService : ServiceBase<Dt_ProStockInfo_Hty, IProStockInfo_HtyRepository>, IProStockInfo_HtyService |
| | | { |
| | | public IProStockInfo_HtyRepository Repository => BaseDal; |
| | | public ProStockInfo_HtyService(IProStockInfo_HtyRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | public partial class StockInfoDetail_HtyService : ServiceBase<Dt_StockInfoDetail_Hty, IStockInfoDetail_HtyRepository>, IStockInfoDetail_HtyService |
| | | { |
| | | public IStockInfoDetail_HtyRepository Repository => BaseDal; |
| | | public StockInfoDetail_HtyService(IStockInfoDetail_HtyRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | public IStockInfoDetail_HtyRepository Repository => BaseDal; |
| | | } |
| | | } |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WMS忥æååºåºè³MES |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent ShipmentOrderSync(MesShipmentOrderSync model) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMS_MES_ShipmentOrderSync.ToString()); |
| | | MESRoot<MesShipmentOrderSync> root = new MESRoot<MesShipmentOrderSync>() |
| | | { |
| | | From = "WMS", |
| | | DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | Content = model |
| | | }; |
| | | JsonSerializerSettings settings = new JsonSerializerSettings |
| | | { |
| | | ContractResolver = new CamelCasePropertyNamesContractResolver() |
| | | }; |
| | | string request = JsonConvert.SerializeObject(root, settings); |
| | | string response = HttpMesHelper.Post(apiInfo.ApiAddress, request); |
| | | MesResponseContent mesResponseContent = response.DeserializeObject<MesResponseContent>(); |
| | | //è°ç¨æ¥å£ |
| | | if (mesResponseContent.BSucc == true) |
| | | { |
| | | content.OK(mesResponseContent.StrMsg); |
| | | } |
| | | else |
| | | { |
| | | content.Error(mesResponseContent.StrMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | { |
| | | return content.Error("æªæ¾å°ä»åºä¿¡æ¯"); |
| | | } |
| | | //夿æ¯å¦MESå
å
ä¿¡æ¯æ¯å¦éå¤ |
| | | List<Dt_MesProInOrderDetail> mesProInOrderDetails = new List<Dt_MesProInOrderDetail>(); |
| | | foreach (var item in bagInfoModel.BagDetails) |
| | | { |
| | | mesProInOrderDetails.Add(_mapper.Map<Dt_MesProInOrderDetail>(item)); |
| | | foreach (var child in item.BagItems) |
| | | { |
| | | Dt_MesProInOrderDetail mesProInOrderDetail=new Dt_MesProInOrderDetail() |
| | | { |
| | | BagNo=item.BagNo, |
| | | ProductCode=item.ProductCode, |
| | | ProductVersion=item.ProductVersion, |
| | | SETQty=child.SETQty, |
| | | OKPCSQTY=child.OKPCSQTY, |
| | | DateCode=item.DateCode, |
| | | XQty=child.XQty, |
| | | XSite=child.XSite, |
| | | Weight=item.Weight, |
| | | PackingDate=item.PackingDate, |
| | | LotNumber=child.LotNumber, |
| | | ERPOrder=child.ERPOrder, |
| | | SaleOrder=child.SaleOrder, |
| | | MoNumber=child.MoNumber, |
| | | }; |
| | | mesProInOrderDetails.Add(mesProInOrderDetail); |
| | | } |
| | | } |
| | | List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>(); |
| | | foreach (var item in mesProInOrderDetails) |
| | | { |
| | | proStockInfoDetails.Add(_mapper.Map<Dt_ProStockInfoDetail>(item)); |
| | | } |
| | | Dt_MesProInOrder mesProInOrder = new Dt_MesProInOrder() |
| | | { |
| | | WarehouseId = warehouse.WarehouseId, |
| | | BatchNo = bagInfoModel.BatchNo, |
| | | WorkCenter=bagInfoModel.WorkCenter, |
| | | MesProStatus = InOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | UnPackStock=bagInfoModel.UnPackStock, |
| | | Details= mesProInOrderDetails |
| | | }; |
| | | Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo() |
| | | { |
| | | PalletCode = bagInfoModel.BatchNo, |
| | | PalletType = 1, |
| | | WarehouseId = warehouse.WarehouseId, |
| | | StockStatus = StockStatusEmun.ç»çæå.ObjToInt(), |
| | | proStockInfoDetails= proStockInfoDetails |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | Db.InsertNav(mesProInOrder).Include(x=>x.Details).ExecuteCommand(); |
| | | Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand(); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK("æ¥æ¶æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | public MesResponseContent BoxStockin(MesBoxInfoModel boxInfoModel) |
| | | { |
| | | MesResponseContent content = new MesResponseContent(); |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==WarehouseEnum.HA101.ToString()); |
| | | //è·åMESå
å
ä¿¡æ¯ |
| | | List<Dt_MesProInOrderDetail> mesProInOrderDetails = new List<Dt_MesProInOrderDetail>(); |
| | | foreach (var item in boxInfoModel.Bags) |
| | | { |
| | | foreach (var child in item.BagItems) |
| | | { |
| | | Dt_MesProInOrderDetail mesProInOrderDetail = new Dt_MesProInOrderDetail() |
| | | { |
| | | BagNo = item.BagNo, |
| | | ProductCode = item.ProductCode, |
| | | ProductVersion = item.ProductVersion, |
| | | SETQty = child.SETQty, |
| | | OKPCSQTY = child.OKPCSQTY, |
| | | DateCode = item.DateCode, |
| | | XQty = child.XQty, |
| | | XSite = child.XSite, |
| | | Weight = item.Weight, |
| | | PackingDate = item.PackingDate, |
| | | LotNumber = child.LotNumber, |
| | | ERPOrder = child.ERPOrder, |
| | | SaleOrder = child.SaleOrder, |
| | | MoNumber = child.MoNumber, |
| | | }; |
| | | mesProInOrderDetails.Add(mesProInOrderDetail); |
| | | } |
| | | } |
| | | List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>(); |
| | | foreach (var item in mesProInOrderDetails) |
| | | { |
| | | proStockInfoDetails.Add(_mapper.Map<Dt_ProStockInfoDetail>(item)); |
| | | } |
| | | Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo() |
| | | { |
| | | PalletCode = boxInfoModel.BoxNo, |
| | | PalletType = 0, |
| | | WarehouseId = warehouse.WarehouseId, |
| | | ShipmentOrder= boxInfoModel.ShipmentOrder, |
| | | StockStatus = StockStatusEmun.å
¥åºå®æ.ObjToInt(), |
| | | proStockInfoDetails = proStockInfoDetails |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand(); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK("å¤å
æ¥æ¶æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æåè¿å·¥æåº |
| | | /// </summary> |
| | |
| | | (int)OutOrderTypeEnum.Quality => TaskTypeEnum.OutQuality, |
| | | _ => new TaskTypeEnum() |
| | | }; |
| | | tasks = GetTasks(result.Item1, TaskTypeEnum.Outbound); |
| | | tasks = GetTasks(result.Item1, typeEnum); |
| | | result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | result.Item3.ForEach(x => |
| | | { |
| | |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶ERPæååºåºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ProductDeliveryOrder"), AllowAnonymous, MethodParamsValidate] |
| | | public ErpResponseContent ProductDeliveryOrder([FromBody] Root<ErpProOutOrderDTO> erpProOutOrder) |
| | | { |
| | | WebResponseContent content = _outboundService.ProOutOrderService.ProductDeliveryOrder(erpProOutOrder.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶ERPéæåä¿¡æ¯ |
| | | /// </summary> |
| | |
| | | { |
| | | return _invokeERPService.InvokeTakeStockApi(takeModel); |
| | | } |
| | | /// <summary> |
| | | /// ERPæåå
¥åºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("InvokeProInApi"), AllowAnonymous] |
| | | public string InvokeProInApi([FromBody] ERPProInboundModel inboundModel) |
| | | { |
| | | return _invokeERPService.InvokeProInApi(inboundModel); |
| | | } |
| | | /// <summary> |
| | | /// ERPæååºåºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | [HttpPost, Route("InvokeProOutApi"), AllowAnonymous] |
| | | public string InvokeProOutApi([FromBody] ERPProOutOrderModel outOrderModel) |
| | | { |
| | | return _invokeERPService.InvokeProOutApi(outOrderModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | return _taskService.RworkTask(model); |
| | | } |
| | | /// <summary> |
| | | /// MESæåå
¥åºåæ¥æ¶ |
| | | /// MESæåå
å
ä¿¡æ¯æ¥æ¶ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | return _taskService.BagInfoSync(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// MESæåå¤å
ä¿¡æ¯æ¥æ¶ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("BoxStockin"), AllowAnonymous] |
| | | public MesResponseContent BoxStockin([FromBody] Root<MesBoxInfoModel> model) |
| | | { |
| | | return _taskService.BoxStockin(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// MESæååºåºæ¥å£è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ShipmentOrderSync"), AllowAnonymous] |
| | | public WebResponseContent ShipmentOrderSync([FromBody] MesShipmentOrderSync model) |
| | | { |
| | | return _taskService.ShipmentOrderSync(model); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// æååºåºå |
| | | /// </summary> |
| | | [Route("api/ProOutOrder")] |
| | | [ApiController] |
| | | public class ProOutOrderController : ApiBaseController<IProOutOrderService, Dt_ProOutOrder> |
| | | { |
| | | public ProOutOrderController(IProOutOrderService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// æååºåºåæç» |
| | | /// </summary> |
| | | [Route("api/ProOutOrderDetail")] |
| | | [ApiController] |
| | | public class ProOutOrderDetailController : ApiBaseController<IProOutOrderDetailService, Dt_ProOutOrderDetail> |
| | | { |
| | | public ProOutOrderDetailController(IProOutOrderDetailService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Stock |
| | | { |
| | | /// <summary> |
| | | /// æååºå |
| | | /// </summary> |
| | | [Route("api/ProStockInfo")] |
| | | [ApiController] |
| | | public class ProStockInfoController : ApiBaseController<IProStockInfoService, Dt_ProStockInfo> |
| | | { |
| | | public ProStockInfoController(IProStockInfoService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Stock |
| | | { |
| | | /// <summary> |
| | | /// æååºåæç» |
| | | /// </summary> |
| | | [Route("api/ProStockInfoDetail")] |
| | | [ApiController] |
| | | public class ProStockInfoDetailController : ApiBaseController<IProStockInfoDetailService, Dt_ProStockInfoDetail> |
| | | { |
| | | public ProStockInfoDetailController(IProStockInfoDetailService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Stock |
| | | { |
| | | /// <summary> |
| | | /// æååºååå² |
| | | /// </summary> |
| | | [Route("api/ProStockInfoDetail_Hty")] |
| | | [ApiController] |
| | | public class ProStockInfoDetail_HtyController : ApiBaseController<IProStockInfoDetail_HtyService, Dt_ProStockInfoDetail_Hty> |
| | | { |
| | | public ProStockInfoDetail_HtyController(IProStockInfoDetail_HtyService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Stock |
| | | { |
| | | /// <summary> |
| | | /// æååºååå² |
| | | /// </summary> |
| | | [Route("api/ProStockInfo_Hty")] |
| | | [ApiController] |
| | | public class ProStockInfo_HtyController : ApiBaseController<IProStockInfo_HtyService, Dt_ProStockInfo_Hty> |
| | | { |
| | | public ProStockInfo_HtyController(IProStockInfo_HtyService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | |
| | | |
| | | CreateMap<Dt_Task, WMSTaskDTO>(); |
| | | CreateMap<MESBagDetail, Dt_MesProInOrderDetail>().ForMember(x => x.OverInQuantity, b => b.MapFrom(b => 0)); |
| | | CreateMap<ErpProOutOrderDetailds, Dt_ProOutOrderDetail>().ForMember(x => x.ProOrderDetailStatus, b => b.MapFrom(b => 0)).ForMember(x => x.OverQtyPcs, b => b.MapFrom(b => 0)); |
| | | CreateMap<Dt_MesProInOrderDetail, Dt_ProStockInfoDetail>().ForMember(x => x.ProOutDetailStatus, b => b.MapFrom(b => StockStatusEmun.ç»çæå.ObjToInt())).ForMember(x => x.OutboundQuantity, b => b.MapFrom(b => 0)); |
| | | } |
| | | } |
| | | } |