已添加36个文件
已重命名4个文件
已删除20个文件
已修改26个文件
| | |
| | | AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent SendSecureReplyToAgv(int taskNum); |
| | | |
| | | /// <summary> |
| | | /// æ´æ°ä»»å¡ä¿¡æ¯åæ·»å 任塿ç»è®°å½ |
| | | /// </summary> |
| | | /// <param name="task">ä»»å¡å对象å®ä¾(æªä¿®æ¹çæ°æ®å¯¹è±¡)</param> |
| | |
| | | AgvResponse agvResponse = new AgvResponse(); |
| | | try |
| | | { |
| | | if (secureApplyModel.ReceiveTaskID=="100") |
| | | { |
| | | return agvResponse.OK("æå", "0"); |
| | | } |
| | | var task = _taskRepository.QueryFirst(x => secureApplyModel.ReceiveTaskID.ObjToInt() == x.TaskNum); |
| | | if (task == null) throw new Exception("æªæ¾å°ä»»å¡"); |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | |
| | | return Service.RollbackTaskStatusToLast(taskNum); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå¤AGVå®å
¨ä¿¡å· |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("SendSecureReplyToAgv")] |
| | | public WebResponseContent SendSecureReplyToAgv(int taskNum) |
| | | { |
| | | return Service.SendSecureReplyToAgv(taskNum); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous] |
| | | public WebResponseContent GetRouteEndPoint(string startPoint, int routeType) |
| | | { |
| | |
| | | //è¿æ¥å符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=192.168.35.3;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=192.168.35.3;Initial Catalog=TestWCS_TC;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TESTWCSCP_WCS;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "WMSConnectionStrings": "Data Source=192.168.35.3;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"WMSConnectionStrings": "Data Source=10.30.4.92;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //è·¨å |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®æ |
| | | /// </summary> |
| | | public WebResponseContent TaskCompleted(int taskNum) |
| | | { |
| | | try |
| | |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="sourceAddress"></param> |
| | | /// <param name="roadway"></param> |
| | | /// <returns></returns> |
| | | //public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway) |
| | | //{ |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | // try |
| | | // { |
| | | // string address = AppSettings.Get("WMSApiAddress"); |
| | | // if (string.IsNullOrEmpty(address)) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | // } |
| | | // string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={roadway}&palletCode={palletCode}"); |
| | | // WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | // if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | // { |
| | | // WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString()); |
| | | // if (taskDTO != null) |
| | | // { |
| | | // content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // content = WebResponseContent.Instance.Error(ex.Message); |
| | | // } |
| | | // return content; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// åWMSç³è¯·åé
è´§ä½ |
| | |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent SendSecureReplyToAgv(int taskNum) |
| | | { |
| | | try |
| | | { |
| | | Dt_Task WaitToTask = BaseDal.QueryFirst(x => x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() && x.TaskNum == taskNum); |
| | | AgvSecureReplyDTO replyDTO = new AgvSecureReplyDTO() |
| | | { |
| | | ReqCode = Guid.NewGuid().ToString().Replace("-", ""), //WaitToTask.TaskNum.ToString(), |
| | | taskCode = WaitToTask.AgvTaskNum, |
| | | }; |
| | | WebResponseContent content = AgvSecureReply(replyDTO); |
| | | if (content.Status) |
| | | { |
| | | WaitToTask.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | WaitToTask.TaskState = TaskStatusEnum.Exception.ObjToInt(); |
| | | WaitToTask.ExceptionMessage = content.Message; |
| | | } |
| | | UpdateData(WaitToTask); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// //å¤æç§»åºè´§ä½ä»»å¡æ¯å¦å·²åå¨ï¼å¦åå¨å
æ§è¡ |
| | | /// </summary> |
| | |
| | | |
| | | BaseDal.UpdateData(task); |
| | | //忥å°WMS |
| | | string address = AppSettings.Get("WMSApiAddress"); |
| | | if (!string.IsNullOrEmpty(address)) |
| | | { |
| | | HttpHelper.Post($"{address}/api/Task/UpdateTaskInfo", task.Serialize()); |
| | | } |
| | | //string address = AppSettings.Get("WMSApiAddress"); |
| | | //if (!string.IsNullOrEmpty(address)) |
| | | //{ |
| | | // HttpHelper.Post($"{address}/api/Task/UpdateTaskInfo", task.Serialize()); |
| | | //} |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, stringBuilder.ToString()); |
| | | } |
| | | } |
| | |
| | | ///7ï¼ç³è¯·ææ¡ |
| | | ///8ï¼ææ¡å°ä½ |
| | | ///9ï¼æ§è¡å½ä»¤ä¸ |
| | | ///10ï¼ç©ºçåå¤ |
| | | ///11ï¼æ»¡çåå¤ |
| | | /// </summary> |
| | | public short Command { get; set; } |
| | |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList(); |
| | | //è·åæåè®®çè¾é线 |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(); |
| | | foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | Dt_StationManger stationManger = stationMangers.FirstOrDefault(x => x.StationCode == task.SourceAddress); |
| | | if (stationManger != null) |
| | | { |
| | | string? local = ""; |
| | | switch (stationManger.AGVStationCode.ObjToInt() % 2) |
| | | { |
| | | case 1: |
| | | local = task.Roadway + "-001-062-001-01"; |
| | | break; |
| | | case 0: |
| | | local = task.Roadway + "-002-062-001-01"; |
| | | break; |
| | | default: |
| | | WriteError(item.StationName, $"æªæ¾å°å¯åé
å··é{task.TaskNum}"); |
| | | break; |
| | | } |
| | | //åé
è´§ä½ |
| | | string? local = "SC01_CP-002-064-008-01"; |
| | | if (!string.IsNullOrEmpty(local)) |
| | | { |
| | | task.CurrentAddress = item.StackerCraneStationCode; |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo <= 0 && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //äºæ¥¼çº¿ä½åºåºç«å° |
| | | { |
| | | //è·ååºåºç«å°æ¯å¦åå¨åºåºå¾
æ§è¡ä»»å¡ |
| | |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList(); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(); |
| | | foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | //string roadWay = _taskService.AssignCPRoadwayNo().Data.ToString(); |
| | | //if (!string.IsNullOrEmpty(roadWay)) |
| | | //{ |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, "SC01_CP", task.TaskType); |
| | | |
| | | //} |
| | | Dt_StationManger stationManger = stationMangers.FirstOrDefault(x=>x.StationCode== task.SourceAddress); |
| | | if (stationManger != null) |
| | | { |
| | | string roadWay = ""; |
| | | switch (stationManger.AGVStationCode.ObjToInt() % 5) |
| | | { |
| | | case 1: |
| | | roadWay = "SC01_CP"; |
| | | break; |
| | | case 2: |
| | | roadWay = "SC02_CP"; |
| | | break; |
| | | case 3: |
| | | roadWay = "SC03_CP"; |
| | | break; |
| | | case 4: |
| | | roadWay = "SC04_CP"; |
| | | break; |
| | | case 0: |
| | | roadWay = "SC05_CP"; |
| | | break; |
| | | default: |
| | | WriteError(item.StationName, $"æªæ¾å°å¯åé
å··é{task.TaskNum}"); |
| | | break; |
| | | } |
| | | if (!string.IsNullOrEmpty(roadWay)) |
| | | { |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, roadWay, task.TaskType); |
| | | Dt_Router? router = routers.FirstOrDefault(); |
| | | if (routers == null || routers.Count == 0 || router == null) |
| | | { |
| | |
| | | task.CurrentAddress = item.StationCode; |
| | | task.NextAddress = router.NextPosi; |
| | | task.PalletCode = DateTime.Now.ToString("yyMMddHHmmss");//todoä¸´æ¶ |
| | | task.Roadway = "SC01_CP"; |
| | | task.Roadway = roadWay; |
| | | task.DeviceCode = router.ChildPosiDeviceCode; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}ä¸ä¸æ¥"); |
| | | //} |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null) |
| | | { |
| | | {//å
¥åºRGVæ¥é©³ä½äº¤äº |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | //å
¥åºRGVæ¥é©³ä½äº¤äº |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo > 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | |
| | | {//å çæºå·¥ä½å«æ |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType)); |
| | | if (task == null) |
| | | { |
| | | //请æ±ä»»å¡ |
| | | WMSTaskDTO taskDTO = new WMSTaskDTO() |
| | | { |
| | | Id = 1, |
| | | SourceAddress = "SC02_CP-001-064-001-01", |
| | | TaskNum = DateTime.Now.ToString("mmss").ObjToInt(), |
| | | PalletCode = "" + DateTime.Now.ToString("mmss"), |
| | | RoadWay = "SC02_CP", |
| | | TaskType = 160, |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | TargetAddress = item.StationCode, |
| | | Grade = 0, |
| | | WarehouseId = 1, |
| | | PalletType = 1 |
| | | }; |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}çæï¼ä¸ä¸æ¥"); |
| | | _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | } |
| | | } |
| | | //å çä»»å¡å®æäº¤äº |
| | | else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | //ä»»å¡å®æ |
| | | device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}å çä½åºåºå®æ"); |
| | | } |
| | | } |
| | | //if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0) |
| | | //{ |
| | | // Dt_Task task = _taskRepository.QueryFirst(x => x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType)); |
| | | // if (task == null) |
| | | // { |
| | | // //请æ±ä»»å¡ |
| | | // WMSTaskDTO taskDTO = new WMSTaskDTO() |
| | | // { |
| | | // Id = 1, |
| | | // SourceAddress = "SC02_CP-001-064-001-01", |
| | | // TaskNum = DateTime.Now.ToString("mmss").ObjToInt(), |
| | | // PalletCode = "" + DateTime.Now.ToString("mmss"), |
| | | // RoadWay = "SC02_CP", |
| | | // TaskType = 160, |
| | | // TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | // TargetAddress = item.StationCode, |
| | | // Grade = 0, |
| | | // WarehouseId = 1, |
| | | // PalletType = 1 |
| | | // }; |
| | | // WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}çæï¼ä¸ä¸æ¥"); |
| | | // _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | // } |
| | | //} |
| | | ////å çä»»å¡å®æäº¤äº |
| | | //else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0) |
| | | //{ |
| | | // Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | // if (task != null) |
| | | // { |
| | | // //ä»»å¡å®æ |
| | | // device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode); |
| | | // WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}å çä½åºåºå®æ"); |
| | | // } |
| | | //} |
| | | } |
| | | else |
| | | { |
| | |
| | | if (task == null) |
| | | { |
| | | //è·åç«å°çæä»»å¡ |
| | | WebResponseContent content = _taskService.RequestWMSTaskSimple("", item.StationCode,taskType:TaskTypeEnum.InProduct.ObjToInt()); |
| | | WebResponseContent content = _taskService.RequestWMSTaskSimple(DateTime.Now.ToString("yyyyMMddHHmmss"), item.StationCode,taskType:TaskTypeEnum.InProduct.ObjToInt()); |
| | | if (content.Status) |
| | | { |
| | | Dt_Task taskNew = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt())); |
| | |
| | | { |
| | | //è·åå½åè®¾å¤ |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList(); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) |
| | | Dt_StationManger? RequestIn = stationMangers.FirstOrDefault(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()); |
| | | if (RequestIn != null) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null) |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(W_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | if (deviceProRead != null && deviceProWrite != null) |
| | | { |
| | | R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress); |
| | | //ç åç¯çº¿è¯·æ±ä»»å¡ |
| | |
| | | //{ |
| | | |
| | | //} |
| | | string[] strings = conveyorLineInfoRead.R_BoxCode.Split("-"); |
| | | if (strings.Length==2) |
| | | { |
| | | //åå
¥æ§è¡æ°æ® |
| | | device.SetValue(W_CLineCPHDB.W_TaskNo, 1002, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Channel, 5, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Long, 400, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Wide, 370, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_High, 300, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Request, 1, item.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TaskNo, 100 + strings[1].ObjToInt(), RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Channel, strings[1].ObjToInt(), RequestIn.StationCode); |
| | | |
| | | device.SetValue(W_CLineCPHDB.W_Long, 425, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Wide, 325, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_High, 400, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode); |
| | | } |
| | | else |
| | | { |
| | | WriteError(RequestIn.StationName, $"æ°æ®æªåé误ï¼{strings}"); |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && deviceProRead != null) |
| | | } |
| | | else |
| | | { |
| | | WriteError(RequestIn.StationName, $"æªæ¾å°è®¾å¤åç¼å·{RequestIn.StationCode}çå议信æ¯"); |
| | | } |
| | | } |
| | | foreach (var item in stationMangers.Where(x=>x.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt())) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | if (deviceProRead != null) |
| | | { |
| | | R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress); |
| | | //è·åç åå£ä»»å¡æ´æ°ä»»å¡ç¶æ |
| | |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°è®¾å¤åç¼å·{item.StationCode}çå议信æ¯"); |
| | | } |
| | | } |
| | | } |
| | | Thread.Sleep(100); |
| | | |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | var axis = _packaxisRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.StationCode == Convert.ToInt32(item.StackerCraneStationCode)); |
| | | if (axis != null) |
| | | { |
| | | //è¿è¡ç»æ |
| | | if (Convert.ToInt32(PackNum) == axis.PackNum) |
| | | { |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 2); |
| | | } |
| | | |
| | | ConsoleHelper.WriteInfoLine($"ç åå·¥ä½{item.StationCode}ç¶æ{Allow}"); |
| | | //ç åç³è¯· |
| | | if (Allow == 3 || Allow == 7) |
| | | { |
| | | //è·åå½åä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryData(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.MD_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode).OrderBy(x => x.TaskNum).FirstOrDefault(); |
| | | |
| | | if (task != null) //ç åç³è¯· |
| | | if (task != null) |
| | | { |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 1); |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | if (device.DeviceCode == "MD8_CP") |
| | | { |
| | | device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, -1); |
| | | } |
| | | else |
| | | { |
| | | device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, 1); |
| | | } |
| | | |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDReceiveDone.ToString()).DeviceProDataBlock, 3); |
| | | |
| | |
| | | //_taskRepository.UpdateData(task); |
| | | Thread.Sleep(1500); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{task.TaskNum}ç å"); |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | } |
| | |
| | | <el-alert :closable="false" style="width: 100%"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <span class="less-style">ç©æåç§°ï¼ {{ row.materielName }} </span> |
| | | <span class="less-style">ç©æåç§°ï¼ {{ row.materialName }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style">ç©æç¼å·ï¼ {{ row.materialNo }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue ÐÞ¸Ä |
| | |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="75%" |
| | | width="80%" |
| | | :padding="15" |
| | | title="åæ®æç»ä¿¡æ¯" |
| | | > |
| | |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <span>å·²éä¸ {{ selection.length }} 项</span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span>åå· {{ row.orderId }} </span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-link |
| | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import VolForm from "@/components/basic/VolForm.vue"; |
| | | import StockSelect from "./StockSelect.vue"; |
| | | import SelectedStock from "./SelectedStock.vue"; |
| | | export default { |
| | | components: { VolBox, VolForm, StockSelect, SelectedStock }, |
| | | components: { VolBox, VolForm, SelectedStock }, |
| | | data() { |
| | | return { |
| | | row: null, |
| | |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "outBSTOrderId", |
| | | prop: "outSGOrderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "materialId", |
| | | title: "䏿¸¸ç©æID", |
| | | type: "string", |
| | | width: 120, |
| | | prop: "å
³èçæç»ID(䏿¸¸)", |
| | | title: "åºåºåå·", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "materialNo", |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "materielName", |
| | | prop: "materialName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "boardFluteNo", |
| | | title: "æ¥å«", |
| | | type: "string", |
| | | width: 110, |
| | | }, |
| | | { |
| | | prop: "machineName", |
| | | title: "æºå°", |
| | | type: "string", |
| | | width: 110, |
| | | }, |
| | | { |
| | | prop: "width", |
| | |
| | | width: 130, |
| | | }, |
| | | { |
| | | prop: "outBSTOrderDetailStatus", |
| | | prop: "outSGOrderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "tag", |
| | | width: 180, |
| | |
| | | type: "datetime", |
| | | width: 170, |
| | | }, |
| | | { |
| | | prop: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 170, |
| | | }, |
| | | // { |
| | | // prop: "modifyDate", |
| | | // title: "ä¿®æ¹æ¶é´", |
| | | // type: "datetime", |
| | | // width: 170, |
| | | // }, |
| | | ], |
| | | paginations: { |
| | | sort: "id", |
| | |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29å¢å èªå®ä¹å页æ¡å¤§å° |
| | | sizes: [60, 100, 120], |
| | | sizes: [60], |
| | | size: 60, // é»è®¤åé¡µå¤§å° |
| | | Wheres: [], |
| | | page: 1, |
| | |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | console.log(row); |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | }, |
| | |
| | | // ä»
对æ°å¼åæ±å |
| | | if (column.property === 'xqLen' || column.property === 'assignTotalUsage' || column.property === 'outTotalUsage' || column.property === 'totalUsage') { |
| | | const values = data.map(item => Number(item[column.property])) |
| | | console.log(values); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | return prev + (isNaN(curr) ? 0 : curr) |
| | | }, 0); |
| | | //ä¿ç两ä½å°æ° |
| | | //ä¿ç4ä½å°æ° |
| | | sums[index] = sums[index].toFixed(4) |
| | | } else { |
| | | sums[index] = '-' |
| | |
| | | return sums |
| | | }, |
| | | getData() { |
| | | var wheres = [{ name: "outBSTOrderId", value: this.row.id }]; |
| | | var wheres = [{ name: "outSGOrderId", value: this.row.id }]; |
| | | var param = { |
| | | page: this.paginations.page, |
| | | rows: this.paginations.rows, |
| | |
| | | wheres: JSON.stringify(wheres), // æ¥è¯¢æ¡ä»¶ï¼æ ¼å¼ä¸º[{ name: "åæ®µ", value: "xx" }] |
| | | }; |
| | | this.http |
| | | .post("api/OutBSTOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .post("api/OutSGOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | this.tableData = x.rows; |
| | | }); |
| | |
| | | this.$refs.selectedStock.open(row,this.row.outBSTOrderNo); |
| | | } |
| | | }, |
| | | // lockstocks() { |
| | | // if (this.selection.length === 0) { |
| | | // return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | // } |
| | | // var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | // this.http |
| | | // .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | // .then((x) => { |
| | | // if (!x.status) return this.$message.error(x.message); |
| | | // this.$message.success("æä½æå"); |
| | | // this.showDetialBox = false; |
| | | // this.$emit("parentCall", ($vue) => { |
| | | // $vue.getData(); |
| | | // }); |
| | | // }); |
| | | // }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | |
| | | getButtonEnable(propName, row) { |
| | | if (propName == "assignStock") { |
| | | if ( |
| | | row.orderDetailStatus !== 0 && |
| | | row.orderDetailStatus !== 60 && |
| | | row.orderDetailStatus !== 70 && |
| | | row.orderDetailStatus !== 80 |
| | | row.outSGOrderDetailStatus !== 0 && |
| | | row.outSGOrderDetailStatus !== 60 && |
| | | row.outSGOrderDetailStatus !== 70 && |
| | | row.outSGOrderDetailStatus !== 80 |
| | | ) { |
| | | return true; |
| | | } else { |
| | |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | console.log(dicItem); |
| | | // console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/outOrderDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | // this.columns.push({ |
| | | // field: 'æä½', |
| | | // title: 'æä½', |
| | | // width: 90, |
| | | // fixed: 'right', |
| | | // align: 'center', |
| | | // formatter: (row) => { |
| | | // return ( |
| | | // '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | // ); |
| | | // }, |
| | | // click: (row) => { |
| | | // this.$refs.gridBody.open(row); |
| | | // } |
| | | // }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/mesPPOutboundOrder.js ÐÞ¸Ä |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/mesPPoutOrderDetail.vue' |
| | | import gridBody from './extend/outSGOrderDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/proOutOrderDetail.js ÐÞ¸Ä |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | |
| | | name: 'userInfo', |
| | | component: () => import('@/views/basic/userInfo.vue') |
| | | } |
| | | , { |
| | | path: '/mesOutboundOrder', |
| | | name: 'mesOutboundOrder', |
| | | component: () => import('@/views/outbound/mesOutboundOrder.vue') |
| | | },{ |
| | | path: '/mesPPOutboundOrder', |
| | | name: 'mesPPOutboundOrder', |
| | | component: () => import('@/views/outbound/mesPPOutboundOrder.vue') |
| | | },{ |
| | | path: '/mesPPOutboundOrderDetail', |
| | | name: 'mesPPOutboundOrderDetail', |
| | | component: () => import('@/views/outbound/mesPPOutboundOrderDetail.vue') |
| | | },{ |
| | | path: '/mesPPCutOutboundOrder', |
| | | name: 'mesPPCutOutboundOrder', |
| | | component: () => import('@/views/outbound/mesPPCutOutboundOrder.vue') |
| | | }, { |
| | | path: '/mesPPCutOutboundOrderDetail', |
| | | name: 'mesPPCutOutboundOrderDetail', |
| | | component: () => import('@/views/outbound/mesPPCutOutboundOrderDetail.vue') |
| | | }, |
| | | { |
| | | path: '/mesPPBackInboundOrder', |
| | | name: 'mesPPBackInboundOrder', |
| | | component: () => import('@/views/inbound/mesPPBackInboundOrder.vue') |
| | | }, |
| | | { |
| | | path: '/mesPPBackInboundOrderDetail', |
| | | name: 'mesPPBackInboundOrderDetail', |
| | | component: () => import('@/views/inbound/mesPPBackInboundOrderDetail.vue') |
| | | }, |
| | | , |
| | | { |
| | | path: '/returnOrder', |
| | | name: 'returnOrder', |
| | |
| | | path: '/proStockInfoDetail_Hty', |
| | | name: 'proStockInfoDetail_Hty', |
| | | component: () => import('@/views/stock/proStockInfoDetail_Hty.vue') |
| | | },{ |
| | | path: '/proOutOrder', |
| | | name: 'proOutOrder', |
| | | component: () => import('@/views/outbound/proOutOrder.vue') |
| | | }, { |
| | | path: '/proOutOrderDetail', |
| | | name: 'proOutOrderDetail', |
| | | component: () => import('@/views/outbound/proOutOrderDetail.vue') |
| | | }, |
| | | { |
| | | path: '/mesProInOrder', |
| | |
| | | path: '/agvStationInfo', |
| | | name: 'agvStationInfo', |
| | | component: () => import('@/views/basic/agvStationInfo.vue') |
| | | }, |
| | | { |
| | | path: '/outSGOrder', |
| | | name: 'outSGOrder', |
| | | component: () => import('@/views/outbound/outSGOrder.vue') |
| | | } |
| | | ] |
| | | export default viewgird |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/outSGOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "ç管æç¨å", |
| | | name: "outSGOrder", |
| | | url: "/OutSGOrder/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | boardMpsNo:"" |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | field: "boardMpsNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | readonly:true |
| | | } |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | outSGOrderNo: "", |
| | | boardMpsId: "", |
| | | orderId: "", |
| | | outSGOrderStatus: "", |
| | | warehouseId: "", |
| | | shortName: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "WMSåå·", field: "outSGOrderNo", type: "like" }, |
| | | { title: "åºåºä¸æ¸¸ID", field: "boardMpsId", type: "like" }, |
| | | { title: "䏿¸¸ç产åå·", field: "orderId", type: "like" }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "outSGOrderStatus", |
| | | type: "select", |
| | | dataKey: "outboundStatusEnum", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "ä»åº", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}, |
| | | { title: "客æ·ç®ç§°", field: "shortName", type: "like" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{key: "warehouses", data: []} |
| | | }, |
| | | { |
| | | field: "outSGOrderNo", |
| | | title: "WMSåå·", |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | // link: true, |
| | | }, |
| | | { |
| | | field: "boardMpsId", |
| | | title: "䏿¸¸åæ®ID", |
| | | type: "int", |
| | | width: 160, |
| | | align: "left", |
| | | // link: true, |
| | | }, |
| | | { |
| | | field: "orderId", |
| | | title: "䏿¸¸ç产åå·", |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "shortName", |
| | | title: "客æ·ç®ç§°", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "outSGOrderStatus", |
| | | title: "åºåºåç¶æ", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | bind: { key: "outboundStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "åºåºæç»å", |
| | | table: "OutSGOrderDetail", |
| | | columns: [ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "outSGOrderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "boardMpsId", |
| | | title: "å
³èç主表ID(䏿¸¸)", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "boardMpsDetailId", |
| | | title: "å
³èæç»ID(䏿¸¸)", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materialNo", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | }, |
| | | { |
| | | field: "boardFluteNo", |
| | | title: "æ¥å«", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | }, |
| | | { |
| | | field: "machineName", |
| | | title: "æºå°ä½", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "width", |
| | | title: "å¹
宽", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "xqLen", |
| | | title: "éæ±é¿åº¦", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | edit: { type: "number" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "totalUsage", |
| | | title: "æ»ç¨é", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "number" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "procurementLength", |
| | | title: "éè´é¿åº¦", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "assignTotalUsage", |
| | | title: "å·²åé
ç¨é", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "outTotalUsage", |
| | | title: "å·²åºç¨é", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "outBSTOrderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "outboundStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | } |
| | | ], |
| | | sortName: "id", |
| | | key: "id", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/outSGOrderDetail.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "åºåºåæç»", |
| | | name: "outSGOrderDetail", |
| | | url: "/OutSGOrderDetail/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | deviceCode: "", |
| | | deviceName: "", |
| | | deviceType: "", |
| | | deviceStatus: "", |
| | | deviceIp: "", |
| | | devicePort: "", |
| | | devicePlcType: "", |
| | | deviceRemark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "设å¤ç¼å·", |
| | | required: true, |
| | | field: "deviceCode", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤åç§°", |
| | | required: true, |
| | | field: "deviceName", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç±»å", |
| | | required: true, |
| | | field: "deviceType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç¶æ", |
| | | required: true, |
| | | field: "deviceStatus", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "设å¤IP", required: true, field: "deviceIp", type: "string" }, |
| | | { |
| | | title: "设å¤ç«¯å£", |
| | | required: true, |
| | | field: "devicePort", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "PLCç±»å", |
| | | required: true, |
| | | field: "devicePlcType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "deviceRemark", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | deviceCode: "", |
| | | deviceType: "", |
| | | deviceStatus: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "设å¤ç¼å·", field: "deviceCode" }, |
| | | { title: "设å¤ç±»å", field: "deviceType" }, |
| | | { title: "设å¤ç¶æ", field: "deviceStatus" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "outSGOrderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "MaterialNo", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.ERP |
| | | { |
| | | /// <summary> |
| | | /// ç管æç¨æ¥æ¶å®ä½ |
| | | /// </summary> |
| | | public class SGOutOrderDTO |
| | | { |
| | | /// <summary> |
| | | /// 主æç¨Id |
| | | /// </summary> |
| | | [PropertyValidate("主æç¨Id", NotNullAndEmpty = true)] |
| | | public int BoardMpsId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æç¨æç»ID |
| | | /// </summary> |
| | | [PropertyValidate("æç¨æç»ID", NotNullAndEmpty = true)] |
| | | public int BoardMpsDetailId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹
宽 |
| | | /// </summary> |
| | | [PropertyValidate("å¹
宽", NotNullAndEmpty = true)] |
| | | public decimal Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éæ±é¿åº¦ |
| | | /// </summary> |
| | | [PropertyValidate("éæ±é¿åº¦", NotNullAndEmpty = true)] |
| | | public decimal XqLen { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ»ç¨é |
| | | /// </summary> |
| | | [PropertyValidate("æ»ç¨é", NotNullAndEmpty = true)] |
| | | public decimal TotalUsage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¥æºID(䏿¸¸) |
| | | /// </summary> |
| | | [PropertyValidate("ç©æID", NotNullAndEmpty = true)] |
| | | public int MaterialId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [PropertyValidate("ç©æç¼å·", NotNullAndEmpty = true)] |
| | | public string MaterialNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´é¿åº¦ |
| | | /// </summary> |
| | | [PropertyValidate("éè´é¿åº¦", NotNullAndEmpty = true)] |
| | | public decimal ProcurementLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥å« |
| | | /// </summary> |
| | | [PropertyValidate("æ¥å«", NotNullAndEmpty = true)] |
| | | public string BoardFluteNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå°ä½ç½® |
| | | /// </summary> |
| | | [PropertyValidate("æºå°ä½ç½®", NotNullAndEmpty = true)] |
| | | public string MachineName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·ç®ç§° |
| | | /// </summary> |
| | | [PropertyValidate("客æ·ç®ç§°", NotNullAndEmpty = true)] |
| | | public string ShortName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ»é¿ |
| | | /// </summary> |
| | | [PropertyValidate("æ»é¿", NotNullAndEmpty = true)] |
| | | public decimal TotalLenth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工åå·(䏿¸¸) |
| | | /// </summary> |
| | | [PropertyValidate("ç产工åå·", NotNullAndEmpty = true)] |
| | | public string OrderId { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// MES颿èªå¨å«ææ¥æ¶å®ä½ |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class MESManualIssueDTO |
| | | { |
| | | /// <summary> |
| | | /// åºåºæ¥æºæç»ID |
| | | /// </summary> |
| | | [PropertyValidate("åºåºæ¥æºæç»ID", NotNullAndEmpty = true)] |
| | | public int OutDetailId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å«Id |
| | | /// </summary> |
| | | [PropertyValidate("å¼å«Id", NotNullAndEmpty = true)] |
| | | public string IssueId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¨è½¬ä½ç½®ç¼å· |
| | | /// </summary> |
| | | [PropertyValidate("å¨è½¬ä½ç½®ç¼å·", NotNullAndEmpty = true)] |
| | | public string PointCode { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// MESå·¥ååæ¢å«ææ¥æ¶å®ä½ |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class MESOrderStopDTO |
| | | { |
| | | /// <summary> |
| | | /// ç产订åç¼ç |
| | | /// </summary> |
| | | [PropertyValidate("ç产订åç¼ç ", NotNullAndEmpty = true)] |
| | | public string ProductOrderNo { get; set; } |
| | | /// <summary> |
| | | /// 忢æ è¯ |
| | | /// </summary> |
| | | [PropertyValidate("忢æ è¯", NotNullAndEmpty = true)] |
| | | public int IsStop { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// MESæå/åæåæ¥æ¶å®ä½ |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class MESProInDTO |
| | | { |
| | | /// <summary> |
| | | /// ç产订åç¼ç (䏿¸¸) |
| | | /// </summary> |
| | | [PropertyValidate("ç产订åç¼ç ", NotNullAndEmpty = true)] |
| | | public string ProductOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ´¾åå·¥åç¼ç (䏿¸¸) |
| | | /// </summary> |
| | | [PropertyValidate("æ´¾åå·¥åç¼ç ", NotNullAndEmpty = true)] |
| | | public string SendOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | [PropertyValidate("ç©æç¼ç ", NotNullAndEmpty = true)] |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¹æ¬¡ |
| | | /// </summary> |
| | | [PropertyValidate("ç©ææ¹æ¬¡", NotNullAndEmpty = true)] |
| | | public string MaterialLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç级 |
| | | /// </summary> |
| | | [PropertyValidate("ç©æç级", NotNullAndEmpty = true)] |
| | | public string GradeCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ°é |
| | | /// </summary> |
| | | [PropertyValidate("ç©ææ°é", NotNullAndEmpty = true)] |
| | | public decimal ProQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç |
| | | /// </summary> |
| | | [PropertyValidate("ç©ææ¡ç ", NotNullAndEmpty = true)] |
| | | public string BarCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å å·¥ä¸å¿ç¼ç (æºå°) |
| | | /// </summary> |
| | | [PropertyValidate("å å·¥ä¸å¿ç¼ç ", NotNullAndEmpty = true)] |
| | | public string MakeCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å°¾ç®± |
| | | /// </summary> |
| | | [PropertyValidate("æ¯å¦å°¾ç®±", NotNullAndEmpty = true)] |
| | | public bool IsMantissa { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä½ç½®ç¼å· |
| | | /// </summary> |
| | | [PropertyValidate("ä½ç½®ç¼å·", NotNullAndEmpty = true)] |
| | | public string PointCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·å¾ |
| | | /// </summary> |
| | | [PropertyValidate("å·å¾", NotNullAndEmpty = true)] |
| | | public decimal Thickness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹
宽 |
| | | /// </summary> |
| | | [PropertyValidate("å¹
宽", NotNullAndEmpty = true)] |
| | | public decimal Wide { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé |
| | | /// </summary> |
| | | [PropertyValidate("éé", NotNullAndEmpty = true)] |
| | | public decimal Weight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåå
æçº¸ç®±ç©æç¼ç |
| | | /// </summary> |
| | | [PropertyValidate("æåå
æçº¸ç®±ç©æç¼ç ", NotNullAndEmpty = true)] |
| | | public string ProPackCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®±é¿ |
| | | /// </summary> |
| | | [PropertyValidate("ç®±é¿", NotNullAndEmpty = true)] |
| | | public decimal Length { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱宽 |
| | | /// </summary> |
| | | [PropertyValidate("箱宽", NotNullAndEmpty = true)] |
| | | public decimal Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®±é« |
| | | /// </summary> |
| | | [PropertyValidate("ç®±é«", NotNullAndEmpty = true)] |
| | | public decimal Height { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// MES空æ/ä½ææ¥æ¶å®ä½ |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class MESReturnIssueDTO |
| | | { |
| | | /// <summary> |
| | | /// åºåºæ¥æºæç»ID |
| | | /// </summary> |
| | | [PropertyValidate("åºåºæ¥æºæç»ID", NotNullAndEmpty = true)] |
| | | public int OutDetailId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å«Id |
| | | /// </summary> |
| | | [PropertyValidate("å¼å«Id", NotNullAndEmpty = true)] |
| | | public string IssueId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¨è½¬ä½ç½®ç¼å· |
| | | /// </summary> |
| | | [PropertyValidate("å¨è½¬ä½ç½®ç¼å·", NotNullAndEmpty = true)] |
| | | public string PointCode { get; set; } |
| | | /// <summary> |
| | | /// ä½æä¿¡æ¯ |
| | | /// </summary> |
| | | [PropertyValidate("ä½æä¿¡æ¯", NotNullAndEmpty = false)] |
| | | public MESReturnMaterial? ReturnMaterial { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// ä½æä¿¡æ¯ |
| | | /// </summary> |
| | | public class MESReturnMaterial |
| | | { |
| | | /// <summary> |
| | | /// æ¡ç ä¿¡æ¯ |
| | | /// </summary> |
| | | [PropertyValidate("æ¡ç ä¿¡æ¯", NotNullAndEmpty = true)] |
| | | public string BarCode { get; set; } |
| | | /// <summary> |
| | | /// ç©æä»£ç |
| | | /// </summary> |
| | | [PropertyValidate("ç©æä»£ç ", NotNullAndEmpty = true)] |
| | | public string MaterialCode { get; set; } |
| | | /// <summary> |
| | | /// ç©ææ¹æ¬¡ |
| | | /// </summary> |
| | | [PropertyValidate("ç©ææ¹æ¬¡", NotNullAndEmpty = true)] |
| | | public string MaterialLot { get; set; } |
| | | /// <summary> |
| | | /// éææ°é |
| | | /// </summary> |
| | | [PropertyValidate("éææ°é", NotNullAndEmpty = true)] |
| | | public decimal ReturnQuantity { get; set; } |
| | | /// <summary> |
| | | /// æ¯å¦é¢æï¼1æªé¢æ 0已临æï¼ |
| | | /// </summary> |
| | | [PropertyValidate("æ¯å¦é¢æï¼1æªé¢æ 0已临æï¼", NotNullAndEmpty = true)] |
| | | public string Whether { get; set; } |
| | | /// <summary> |
| | | /// éæå·¥åå·(ERPç¸å
³) |
| | | /// </summary> |
| | | [PropertyValidate("éæå·¥åå·(ERPç¸å
³)", NotNullAndEmpty = false)] |
| | | public string ReturnOrderNo { get; set; } |
| | | /// <summary> |
| | | /// ç´å¾ |
| | | /// </summary> |
| | | [PropertyValidate("ç´å¾", NotNullAndEmpty = true)] |
| | | public string Thickness { get; set; } |
| | | /// <summary> |
| | | /// å¹
宽 |
| | | /// </summary> |
| | | [PropertyValidate("å¹
宽", NotNullAndEmpty = true)] |
| | | public decimal Wide { get; set; } |
| | | /// <summary> |
| | | /// éé |
| | | /// </summary> |
| | | [PropertyValidate("éé", NotNullAndEmpty = true)] |
| | | public decimal Weight { get; set; } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// ä»åºä»£å· |
| | | /// </summary> |
| | | [PropertyValidate("纸质æ¶è´§å主表ID", NotNullAndEmpty = false)] |
| | | [PropertyValidate("ä»åºä»£å·", NotNullAndEmpty = true)] |
| | | public string WarehouseCode { get; set; } |
| | | |
| | | /// <summary> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºä»å¨æ¥å£å±éæ |
| | | /// </summary> |
| | | public interface IInboundRepository : IDependency |
| | | { |
| | | /// <summary> |
| | | /// åæééè´ä¸»è¡¨ä»å¨æ¥å£ |
| | | /// </summary> |
| | | IPurchaseBSTOrderRepository PurchaseBSTOrderRepository { get; } |
| | | /// <summary> |
| | | /// åæééè´æç»ä»å¨æ¥å£ |
| | | /// </summary> |
| | | IPurchaseBSTOrderDetailRepository PurchaseBSTOrderDetailRepository { get; } |
| | | /// <summary> |
| | | /// åæééæä¸»è¡¨ä»å¨æ¥å£ |
| | | /// </summary> |
| | | IReturnBSTOrderRepository ReturnBSTOrderRepository { get; } |
| | | /// <summary> |
| | | /// åæééææç»ä»å¨æ¥å£ |
| | | /// </summary> |
| | | IReturnBSTOrderDetailRepository ReturnBSTOrderDetailRepository { get; } |
| | | /// <summary> |
| | | /// MESæå/åæåä»å¨æ¥å£ |
| | | /// </summary> |
| | | IMESProInOrderInfoRepository MESProInOrderInfoRepository { get; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// MESæå/åæåä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IMESProInOrderInfoRepository : IRepository<Dt_MESProInOrderInfo> |
| | | { |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºä¸å¡æ¥å£å±éæ |
| | | /// </summary> |
| | | public interface IInboundService : IDependency |
| | | { |
| | | /// <summary> |
| | | /// MESæå/åæåä¸å¡å± |
| | | /// </summary> |
| | | IMESProInOrderInfoService MESProInOrderInfoService { get; } |
| | | /// <summary> |
| | | /// åæééè´åä¸å¡å± |
| | | /// </summary> |
| | | IPurchaseBSTOrderService PurchaseBSTOrderService { get; } |
| | | /// <summary> |
| | | /// åæééè´åæç»ä¸å¡å± |
| | | /// </summary> |
| | | IPurchaseBSTOrderDetailService PurchaseBSTOrderDetailService { get; } |
| | | /// <summary> |
| | | /// åæééæåä¸å¡å± |
| | | /// </summary> |
| | | IReturnBSTOrderService ReturnBSTOrderService { get; } |
| | | /// <summary> |
| | | /// åæééæåæç»ä¸å¡å± |
| | | /// </summary> |
| | | IReturnBSTOrderDetailService ReturnBSTOrderDetailService { 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.MES; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface IMESProInOrderInfoService : IService<Dt_MESProInOrderInfo> |
| | | { |
| | | IMESProInOrderInfoRepository Repository { get; } |
| | | /// <summary> |
| | | /// æå/åæåä¿¡æ¯åæ¥æ¥å£ |
| | | /// </summary> |
| | | WebResponseContent ReceiveProCodeInfo(List<MESProInDTO> proInDTOs); |
| | | /// <summary> |
| | | /// MESå·¥å忢æ¥å£ |
| | | /// </summary> |
| | | WebResponseContent ReceiveProOrderStop(MESOrderStopDTO orderStopDTO); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | { |
| | | /// <summary> |
| | | /// ç管åºåºä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutSGOrderDetailRepository : IRepository<Dt_OutSGOrderDetail> |
| | | { |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | { |
| | | /// <summary> |
| | | /// ç管åºåºä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutSGOrderRepository : IRepository<Dt_OutSGOrder> |
| | | { |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºä»å¨æ¥å£å±éæ |
| | | /// </summary> |
| | | public interface IOutboundRepository : IDependency |
| | | { |
| | | /// <summary> |
| | | /// MES颿åä»å¨æ¥å£å± |
| | | /// </summary> |
| | | IOutMESOrderRepository OutMESOrderRepository { get; } |
| | | /// <summary> |
| | | /// ç管æç¨ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | IOutSGOrderRepository OutSGOrderRepository { get; } |
| | | /// <summary> |
| | | /// ç管æç¨æç»ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | IOutSGOrderDetailRepository OutSGOrderDetailRepository { get; } |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | IOutStockLockInfoRepository OutStockLockInfoRepository { get; } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// æ¥æ¶MESé¢æè®¡å |
| | | /// </summary> |
| | | WebResponseContent ReceiveOutBound(OutMESOrderDTO outMESOrderDTO); |
| | | WebResponseContent ReceiveOutBound(List<OutMESOrderDTO> outMESOrderDTO); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 IOutSGOrderDetailService : IService<Dt_OutSGOrderDetail> |
| | | { |
| | | IOutSGOrderDetailRepository Repository { get; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IOutSGOrderService : IService<Dt_OutSGOrder> |
| | | { |
| | | IOutSGOrderRepository Repository { get; } |
| | | /// <summary> |
| | | /// æ·»å ç管æç¨ |
| | | /// </summary> |
| | | WebResponseContent AddOutSGOrder(List<SGOutOrderDTO> outOrderDTOs); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | /// <summary> |
| | | /// åºåºä¸å¡æ¥å£å±éæ |
| | | /// </summary> |
| | | public interface IOutboundService : IDependency |
| | | { |
| | | /// <summary> |
| | | /// MES颿ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | IOutMESOrderService OutMESOrderService { get; } |
| | | /// <summary> |
| | | /// ç管æç¨ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | IOutSGOrderService OutSGOrderService { get; } |
| | | /// <summary> |
| | | /// ç管æç¨æç»ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | IOutSGOrderDetailService OutSGOrderDetailService { get; } |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | IOutStockLockInfoService OutStockLockInfoService { get; } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent ReceiveAutoIssue(MESAutoIssueDTO autoIssueDTO); |
| | | /// <summary> |
| | | /// MESæå¨å«ææ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent ReceiveManualIssue(MESManualIssueDTO manualIssueDTO); |
| | | /// <summary> |
| | | /// MES空æ/使å¼å«æ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent ReceiveReturnIssue(List<MESReturnIssueDTO> returnIssueDTOs); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_IInboundRepository; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºä»å¨å®ç°å±éæ |
| | | /// </summary> |
| | | public class InboundRepository : IInboundRepository |
| | | { |
| | | public IPurchaseBSTOrderRepository PurchaseBSTOrderRepository { get; } |
| | | public IPurchaseBSTOrderDetailRepository PurchaseBSTOrderDetailRepository { get; } |
| | | public IReturnBSTOrderRepository ReturnBSTOrderRepository { get; } |
| | | public IReturnBSTOrderDetailRepository ReturnBSTOrderDetailRepository { get; } |
| | | public IMESProInOrderInfoRepository MESProInOrderInfoRepository { get; } |
| | | public InboundRepository(IPurchaseBSTOrderRepository purchaseBSTOrderRepository,IPurchaseBSTOrderDetailRepository purchaseBSTOrderDetailRepository, IReturnBSTOrderRepository returnBSTOrderRepository, IReturnBSTOrderDetailRepository returnBSTOrderDetailRepository, IMESProInOrderInfoRepository mESProInOrderInfoRepository) |
| | | { |
| | | PurchaseBSTOrderRepository = purchaseBSTOrderRepository; |
| | | PurchaseBSTOrderDetailRepository = purchaseBSTOrderDetailRepository; |
| | | ReturnBSTOrderRepository = returnBSTOrderRepository; |
| | | ReturnBSTOrderDetailRepository = returnBSTOrderDetailRepository; |
| | | MESProInOrderInfoRepository = mESProInOrderInfoRepository; |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// MESæå/åæåä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class MESProInOrderInfoRepository : RepositoryBase<Dt_MESProInOrderInfo>, IMESProInOrderInfoRepository |
| | | { |
| | | public MESProInOrderInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_IInboundService; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºä¸å¡å®ç°å±éæ |
| | | /// </summary> |
| | | public class InboundService : IInboundService |
| | | { |
| | | public IMESProInOrderInfoService MESProInOrderInfoService { get; } |
| | | public IPurchaseBSTOrderService PurchaseBSTOrderService { get; } |
| | | public IPurchaseBSTOrderDetailService PurchaseBSTOrderDetailService { get; } |
| | | public IReturnBSTOrderService ReturnBSTOrderService { get; } |
| | | public IReturnBSTOrderDetailService ReturnBSTOrderDetailService { get; } |
| | | public InboundService(IMESProInOrderInfoService mESProInOrderInfoService,IPurchaseBSTOrderService purchaseBSTOrderService,IPurchaseBSTOrderDetailService purchaseBSTOrderDetailService,IReturnBSTOrderService returnBSTOrderService,IReturnBSTOrderDetailService returnBSTOrderDetailService) |
| | | { |
| | | MESProInOrderInfoService = mESProInOrderInfoService; |
| | | PurchaseBSTOrderService = purchaseBSTOrderService; |
| | | PurchaseBSTOrderDetailService = purchaseBSTOrderDetailService; |
| | | ReturnBSTOrderService = returnBSTOrderService; |
| | | ReturnBSTOrderDetailService = returnBSTOrderDetailService; |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.MaterielEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class MESProInOrderInfoService : ServiceBase<Dt_MESProInOrderInfo, IMESProInOrderInfoRepository>, IMESProInOrderInfoService |
| | | { |
| | | public IMESProInOrderInfoRepository Repository => BaseDal; |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IAGVStationInfoRepository _agvStationInfoRepository; |
| | | private readonly IMapper _mapper; |
| | | public MESProInOrderInfoService(IMESProInOrderInfoRepository BaseDal,IBasicRepository basicRepository,IMapper mapper, IAGVStationInfoRepository agvStationInfoRepository) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _mapper = mapper; |
| | | _agvStationInfoRepository = agvStationInfoRepository; |
| | | } |
| | | |
| | | public class TEMp |
| | | { |
| | | public int ID { get; set; } |
| | | public string Name { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// æå/åæåä¿¡æ¯åæ¥æ¥å£ |
| | | /// </summary> |
| | | public WebResponseContent ReceiveProCodeInfo(List<MESProInDTO> proInDTOs) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (proInDTOs==null || proInDTOs.Count<=0) |
| | | { |
| | | return content.Error("ä¼ å
¥ä¿¡æ¯ä¸ºç©º"); |
| | | } |
| | | //è·åæææåï¼åæåä¿¡æ¯ |
| | | List<Dt_MESProInOrderInfo> proInOrderInfos = BaseDal.QueryData(); |
| | | List<TEMp> temp = BaseDal.QueryData().Select(x => new TEMp() { ID=x.Id,Name=x.BarCode}).Where(x => x.Name.Split("-")[1].StartsWith("U1")).ToList(); |
| | | //è·åææç©æä¿¡æ¯ |
| | | List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.MaterielInvOrgId == MaterielInvOrgEnum.æ°å.ObjToInt()); |
| | | //è·åææé¢æè®¡å |
| | | MESProInDTO? CheckMaterialCode = proInDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialCode)); |
| | | if (CheckMaterialCode != null) |
| | | { |
| | | return content.Error($"ç©æç¼ç {nameof(MESProInDTO.MaterialCode)}:{CheckMaterialCode.MaterialCode}ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | //è·åææAGVç¹ä½ |
| | | List<Dt_AGVStationInfo> aGVStationInfos = _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode)); |
| | | MESProInDTO? CheckPointCode = proInDTOs.FirstOrDefault(x => !aGVStationInfos.Select(x => x.MESPointCode).Contains(x.PointCode)); |
| | | if (CheckPointCode != null) |
| | | { |
| | | return content.Error($"å¨è½¬ä½{nameof(MESReturnIssueDTO.PointCode)}{CheckPointCode.PointCode}ä¸åå¨"); |
| | | } |
| | | //夿æ¯å¦åå¨éå¤ |
| | | MESProInDTO? proInDTO = proInDTOs.FirstOrDefault(x=>x.IsMantissa==false && proInOrderInfos.Select(x=>x.BarCode).Contains(x.BarCode)); |
| | | if (proInDTO!=null) |
| | | { |
| | | return content.Error($"{proInDTO.ProductOrderNo}ç产工å{proInDTO.BarCode}æ¡ç å·²åå¨"); |
| | | } |
| | | Dt_MESProInOrderInfo? proInOrderInfo = proInOrderInfos.FirstOrDefault(x=>x.MESProInStatus==InOrderStatusEnum.å
³é.ObjToInt() && proInDTOs.Select(x=>x.ProductOrderNo).Distinct().Contains(x.ProductOrderNo)); |
| | | if (proInOrderInfo != null) |
| | | { |
| | | return content.Error($"{proInOrderInfo.ProductOrderNo}ç产工åå·²å
³é"); |
| | | } |
| | | List<Dt_MESProInOrderInfo> AddMESProInOrders = new List<Dt_MESProInOrderInfo>(); |
| | | foreach (var item in proInDTOs) |
| | | { |
| | | Dt_MaterielInfo materielInfo = materielInfos.FirstOrDefault(x=>x.MaterielCode== item.MaterialCode); |
| | | Dt_MESProInOrderInfo AddproInOrderInfo = _mapper.Map<Dt_MESProInOrderInfo>(item); |
| | | AddproInOrderInfo.WarehouseId = materielInfo.WarehouseId; |
| | | AddproInOrderInfo.MESProOrderType = materielInfo.MaterielSourceType; |
| | | AddMESProInOrders.Add(AddproInOrderInfo); |
| | | } |
| | | BaseDal.AddData(AddMESProInOrders); |
| | | content.OK("æ¥æ¶æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// MESå·¥å忢æ¥å£ |
| | | /// </summary> |
| | | /// <summary> |
| | | public WebResponseContent ReceiveProOrderStop(MESOrderStopDTO orderStopDTO) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (orderStopDTO == null) |
| | | { |
| | | return content.Error("ä¼ å
¥ä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | //è·å对åºåæ® |
| | | List<Dt_MESProInOrderInfo>? mESProInOrderInfos = BaseDal.QueryData(x => x.ProductOrderNo == orderStopDTO.ProductOrderNo && x.MESProInStatus != OutOrderStatusEnum.å
³é.ObjToInt()); |
| | | if (mESProInOrderInfos == null || mESProInOrderInfos.Count <= 0) |
| | | { |
| | | return content.Error($"æåæåæåå·¥å{nameof(MESOrderStopDTO.ProductOrderNo)}{orderStopDTO.ProductOrderNo}ä¸å卿已å
³é"); |
| | | } |
| | | mESProInOrderInfos.ForEach(x => |
| | | { |
| | | x.MESProInStatus = OutOrderStatusEnum.å
³é.ObjToInt(); |
| | | }); |
| | | BaseDal.UpdateData(mESProInOrderInfos); |
| | | content.OK($"å·¥å{nameof(MESOrderStopDTO.ProductOrderNo)}{orderStopDTO.ProductOrderNo}忢æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// MESæå/åæåå |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MESProInOrderInfo), "MESæå/åæåå")] |
| | | public class Dt_MESProInOrderInfo : 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 = 50, ColumnDescription = "ç产订åç¼ç (䏿¸¸)")] |
| | | public string ProductOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åç±»å")] |
| | | public int MESProOrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ´¾åå·¥åç¼ç (䏿¸¸) |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ´¾åå·¥åç¼ç ")] |
| | | public string SendOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼ç ")] |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¹æ¬¡ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ç©ææ¹æ¬¡")] |
| | | public string MaterialLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç级 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç级")] |
| | | public string GradeCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç©ææ°é")] |
| | | public decimal ProQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©ææ¡ç ")] |
| | | public string BarCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å å·¥ä¸å¿ç¼ç (æºå°) |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å å·¥ä¸å¿ç¼ç (æºå°)")] |
| | | public string MakeCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä½ç½®ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ä½ç½®ç¼å·")] |
| | | public string PointCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·å¾ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å·å¾")] |
| | | public decimal Thickness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹
宽 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å¹
宽")] |
| | | public decimal Wide { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "éé")] |
| | | public decimal Weight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåå
æçº¸ç®±ç©æç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æåå
æçº¸ç®±ç©æç¼ç ")] |
| | | public string ProPackCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®±é¿ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç®±é¿")] |
| | | public decimal Length { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱宽 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "箱宽")] |
| | | public decimal Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®±é« |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç®±é«")] |
| | | public decimal Height { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¶æ")] |
| | | public int MESProInStatus { get; set; } |
| | | } |
| | | } |
| | |
| | | [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, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºæ¥æºæç»ID |
| | |
| | | public DateTime EndDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åé
éæ±æ°é |
| | | /// å·²åé
éæ±æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åé
éæ±æ°é")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å·²åé
éæ±æ°é")] |
| | | public decimal AssignTotalUsage { get; set; } |
| | | |
| | | /// <summary> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// SGåºåºæç¨å |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_OutSGOrder), "SGåºåºæç¨å")] |
| | | public class Dt_OutSGOrder : 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> |
| | | /// åºåºæ¥æºID |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºæ¥æºID")] |
| | | public int BoardMpsId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WMSåæ®ç¼å· |
| | | /// </summary> |
| | | [CodeRule(RuleCodeEnum.OutboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "WMSåæ®ç¼å·", IsOnlyIgnoreUpdate = true)] |
| | | public string OutSGOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工åå·(䏿¸¸) |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç产工åå·(䏿¸¸)")] |
| | | public string OrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·ç®ç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客æ·ç®ç§°")] |
| | | public string ShortName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºåç¶æ")] |
| | | public int OutSGOrderStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´å表 |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_OutSGOrderDetail.OutSGOrderId), nameof(Id))] |
| | | public List<Dt_OutSGOrderDetail> Details { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// SGåºåºæç¨æç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_OutSGOrderDetail), "SGåºåºæç¨æç»")] |
| | | public class Dt_OutSGOrderDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºä¸»è¡¨ID |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºä¸»è¡¨ID")] |
| | | public int OutSGOrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
³èç主表ID(䏿¸¸) |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
³èç主表ID(䏿¸¸)")] |
| | | public int BoardMpsId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
³èçæç»ID(䏿¸¸) |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
³èç主表ID(䏿¸¸)")] |
| | | public int BoardMpsDetailId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹
宽 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å¹
宽")] |
| | | public decimal Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éæ±é¿åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éæ±é¿åº¦")] |
| | | public decimal XqLen { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ»ç¨é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ»ç¨é")] |
| | | public decimal TotalUsage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¥æºID(䏿¸¸) |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç©ææ¥æºID(䏿¸¸)")] |
| | | public int MaterialId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false,Length =50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterialNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´é¿åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éè´é¿åº¦")] |
| | | public decimal ProcurementLength { get; set; } |
| | | /// <summary> |
| | | /// æ¥å« |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¥å«")] |
| | | public string BoardFluteNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå°ä½ç½® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æºå°ä½ç½®")] |
| | | public string MachineName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ»é¿ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ»é¿")] |
| | | public decimal TotalLenth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²åé
ç¨é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å·²åé
ç¨é")] |
| | | public decimal AssignTotalUsage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²åºç¨é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å·²åºç¨é")] |
| | | public decimal OutTotalUsage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåæç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºåæç»ç¶æ")] |
| | | public int OutSGOrderDetailStatus { 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 |
| | | { |
| | | /// <summary> |
| | | /// ç管åºåºä¿¡æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutSGOrderDetailRepository : RepositoryBase<Dt_OutSGOrderDetail>, IOutSGOrderDetailRepository |
| | | { |
| | | public OutSGOrderDetailRepository(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 |
| | | { |
| | | /// <summary> |
| | | /// ç管åºåºä¿¡æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutSGOrderRepository : RepositoryBase<Dt_OutSGOrder>, IOutSGOrderRepository |
| | | { |
| | | public OutSGOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_IOutboundRepository; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºä»å¨å®ç°å±éæ |
| | | /// </summary> |
| | | public class OutboundRepository : IOutboundRepository |
| | | { |
| | | public IOutMESOrderRepository OutMESOrderRepository { get; } |
| | | public IOutSGOrderRepository OutSGOrderRepository { get; } |
| | | public IOutSGOrderDetailRepository OutSGOrderDetailRepository { get; } |
| | | public IOutStockLockInfoRepository OutStockLockInfoRepository { get; } |
| | | public OutboundRepository(IOutMESOrderRepository outMESOrderRepository, IOutSGOrderRepository outSGOrderRepository, IOutSGOrderDetailRepository outSGOrderDetailRepository, IOutStockLockInfoRepository outStockLockInfoRepository) |
| | | { |
| | | OutMESOrderRepository = outMESOrderRepository; |
| | | OutSGOrderRepository = outSGOrderRepository; |
| | | OutSGOrderDetailRepository = outSGOrderDetailRepository; |
| | | OutStockLockInfoRepository = outStockLockInfoRepository; |
| | | } |
| | | } |
| | | } |
| | |
| | | _locationStatusChangeRecordService = locationStatusChangeRecordService; |
| | | _mapper = mapper; |
| | | } |
| | | List<string> GradeCodes = new List<string> |
| | | { |
| | | "001" |
| | | }; |
| | | /// <summary> |
| | | /// æ¥æ¶MESé¢æè®¡å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent ReceiveOutBound(OutMESOrderDTO outMESOrderDTO) |
| | | public WebResponseContent ReceiveOutBound(List<OutMESOrderDTO> outMESOrderDTOs) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (outMESOrderDTO==null) |
| | | if (outMESOrderDTOs==null || outMESOrderDTOs.Count <= 0) |
| | | { |
| | | return content.Error("é¢æè®¡åä¼ å
¥ä¿¡æ¯ä¸ºç©º"); |
| | | } |
| | | if (outMESOrderDTO.OutDetailId <= 0) |
| | | outMESOrderDTOs.Select(x => x.OutDetailId); |
| | | List<Dt_Warehouse> warehouses = _basicRepository.WarehouseRepository.QueryData(); |
| | | OutMESOrderDTO? CheckWarehouseCode = outMESOrderDTOs.FirstOrDefault(x => !warehouses.Select(x => x.WarehouseCode).Contains(x.WarehouseCode)); |
| | | if (CheckWarehouseCode!=null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.OutDetailId)}:{outMESOrderDTO.OutDetailId}éè¦å¤§äº0"); |
| | | return content.Error($"é¢æè®¡ååºåº{nameof(OutMESOrderDTO.WarehouseCode)}:{CheckWarehouseCode.WarehouseCode}ä¸åå¨"); |
| | | } |
| | | if (outMESOrderDTO.ReqQuantity <= 0) |
| | | OutMESOrderDTO? CheckGradeCode = outMESOrderDTOs.FirstOrDefault(x => !GradeCodes.Contains(x.GradeCode)); |
| | | if (CheckGradeCode != null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.ReqQuantity)}:{outMESOrderDTO.ReqQuantity}éè¦å¤§äº0"); |
| | | return content.Error($"é¢æè®¡ååºåº{nameof(OutMESOrderDTO.GradeCode)}:{CheckGradeCode.GradeCode}ä¸åå¨"); |
| | | } |
| | | OutMESOrderDTO? CheckOutDetailId = outMESOrderDTOs.FirstOrDefault(x => x.OutDetailId <= 0); |
| | | if (CheckOutDetailId != null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.OutDetailId)}:{CheckOutDetailId.ProductOrderNo}éè¦å¤§äº0"); |
| | | } |
| | | OutMESOrderDTO? CheckReqQuantity = outMESOrderDTOs.FirstOrDefault(x => x.ReqQuantity <= 0); |
| | | if (CheckReqQuantity != null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.ReqQuantity)}:{CheckReqQuantity.ProductOrderNo}éè¦å¤§äº0"); |
| | | } |
| | | //è·åææç©æä¿¡æ¯ |
| | | List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x=>x.MaterielInvOrgId==MaterielInvOrgEnum.æ°å.ObjToInt()); |
| | | //è·åææä¸´æè®¡å |
| | | //è·åææé¢æè®¡å |
| | | List<Dt_OutMESOrder> outMESOrders = BaseDal.QueryData(); |
| | | Dt_MaterielInfo? ExistmaterielInfo = materielInfos.FirstOrDefault(x=>x.MaterielCode== outMESOrderDTO.MaterialCode); |
| | | if (ExistmaterielInfo == null) |
| | | OutMESOrderDTO? CheckMaterialCode = outMESOrderDTOs.FirstOrDefault(x=> !materielInfos.Select(x=>x.MaterielCode).Contains(x.MaterialCode)); |
| | | if (CheckMaterialCode != null) |
| | | { |
| | | return content.Error($"ç©æç¼ç {nameof(OutMESOrderDTO.MaterialCode)}:{outMESOrderDTO.MaterialCode}ä¿¡æ¯ä¸åå¨"); |
| | | return content.Error($"ç©æç¼ç {nameof(OutMESOrderDTO.MaterialCode)}:{CheckMaterialCode.MaterialCode}ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | Dt_OutMESOrder? OldoutMESOrder = outMESOrders.FirstOrDefault(x=>x.OutDetailId==outMESOrderDTO.OutDetailId); |
| | | Dt_OutMESOrder? OldoutMESOrder = outMESOrders.FirstOrDefault(x=> outMESOrderDTOs.Select(x=>x.OutDetailId).Contains(x.OutDetailId)); |
| | | if (OldoutMESOrder!=null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.OutDetailId)}:{outMESOrderDTO.OutDetailId}ä¿¡æ¯å·²åå¨"); |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.OutDetailId)}:{OldoutMESOrder.OutDetailId}ä¿¡æ¯å·²åå¨"); |
| | | } |
| | | return content.Error($"é¢æè®¡å{nameof(OutMESOrderDTO.ProductOrderNo)}:{outMESOrderDTO.ProductOrderNo},ç©æ{outMESOrderDTO.MaterialCode}æ å¯åé
åºå"); |
| | | |
| | | Dt_OutMESOrder outMESOrder = _mapper.Map<Dt_OutMESOrder>(outMESOrderDTO); |
| | | List<Dt_OutMESOrder> outMESOrder = outMESOrderDTOs.Select(x=> _mapper.Map<Dt_OutMESOrder>(x)).ToList(); |
| | | BaseDal.AddData(outMESOrder); |
| | | return content.OK("æ¥æ¶æå"); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | 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 class OutSGOrderDetailService : ServiceBase<Dt_OutSGOrderDetail, IOutSGOrderDetailRepository>, IOutSGOrderDetailService |
| | | { |
| | | public IOutSGOrderDetailRepository Repository => BaseDal; |
| | | private IBasicRepository _basicRepository; |
| | | private IStockService _stockService; |
| | | private IOutStockLockInfoService _outStockLockInfoService; |
| | | private IBasicService _basicService; |
| | | private ILocationStatusChangeRecordService _locationStatusChangeRecordService; |
| | | private readonly IMapper _mapper; |
| | | |
| | | public OutSGOrderDetailService(IOutSGOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IMapper mapper) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _locationStatusChangeRecordService = locationStatusChangeRecordService; |
| | | _mapper = mapper; |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Common.MaterielEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core.Helper; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class OutSGOrderService : ServiceBase<Dt_OutSGOrder, IOutSGOrderRepository>, IOutSGOrderService |
| | | { |
| | | public IOutSGOrderRepository Repository => BaseDal; |
| | | private IBasicRepository _basicRepository; |
| | | private IStockService _stockService; |
| | | private IBasicService _basicService; |
| | | private ILocationStatusChangeRecordService _locationStatusChangeRecordService; |
| | | private readonly IMapper _mapper; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | public OutSGOrderService(IOutSGOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IBasicService basicService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IMapper mapper,IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _basicService = basicService; |
| | | _locationStatusChangeRecordService = locationStatusChangeRecordService; |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | } |
| | | |
| | | public WebResponseContent AddOutSGOrder(List<SGOutOrderDTO> outOrderDTOs) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | //è·åæææç¨å |
| | | List<Dt_OutSGOrder> outSGOrders=BaseDal.Db.Queryable<Dt_OutSGOrder>().Includes(x => x.Details).ToList(); |
| | | //夿忮 |
| | | Dt_OutSGOrder? ExistAddOutOrder = outSGOrders.FirstOrDefault(x => outOrderDTOs.Select(x => x.OrderId).Distinct().Contains(x.OrderId)); |
| | | if (ExistAddOutOrder != null) |
| | | { |
| | | return content.Error($"åºåºæç¨åå·{nameof(SGOutOrderDTO.OrderId)}:{ExistAddOutOrder.OrderId}å·²åå¨"); |
| | | } |
| | | //è·åææç©æ |
| | | List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.èå.ObjToInt() && x.MaterialSourceId != 0); |
| | | SGOutOrderDTO? sGOutOrderDTO = outOrderDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialNo)); |
| | | if (sGOutOrderDTO != null) |
| | | { |
| | | return content.Error($"ç产æç¨{sGOutOrderDTO.OrderId}ç©æ:{sGOutOrderDTO.MaterialNo}ä¸åå¨"); |
| | | } |
| | | List<Dt_OutSGOrder> AddOutSGOrders = new List<Dt_OutSGOrder>(); |
| | | foreach (var item in outOrderDTOs) |
| | | { |
| | | //è·åå·¥å |
| | | Dt_OutSGOrder? ExistOutSGOrder = AddOutSGOrders.FirstOrDefault(x=>x.OrderId== item.OrderId); |
| | | //è·åç©æ |
| | | Dt_MaterielInfo materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == item.MaterialNo); |
| | | //æç»æåè½¬æ¢ |
| | | Dt_OutSGOrderDetail outSGOrderDetail = _mapper.Map<Dt_OutSGOrderDetail>(item); |
| | | outSGOrderDetail.MaterialName = materielInfo.MaterielName; |
| | | //夿工忝å¦å·²ç»åå¨ |
| | | if (ExistOutSGOrder!=null) |
| | | { |
| | | ExistOutSGOrder.Details.Add(outSGOrderDetail); |
| | | } |
| | | else |
| | | { |
| | | |
| | | Dt_OutSGOrder outSGOrder=_mapper.Map<Dt_OutSGOrder>(item); |
| | | outSGOrder.Details=new List<Dt_OutSGOrderDetail>() { outSGOrderDetail }; |
| | | AddOutSGOrders.Add(outSGOrder); |
| | | } |
| | | } |
| | | BaseDal.Db.InsertNav(AddOutSGOrders).Include(x => x.Details).ExecuteCommand(); |
| | | content.OK("æ¥æ¶æç¨æå"); |
| | | } |
| | | 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_IOutboundService; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | /// <summary> |
| | | /// åºåºä¸å¡å±éæ |
| | | /// </summary> |
| | | public class OutboundService : IOutboundService |
| | | { |
| | | /// <summary> |
| | | /// MES颿ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | public IOutMESOrderService OutMESOrderService { get; } |
| | | /// <summary> |
| | | /// ç管æç¨ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | public IOutSGOrderService OutSGOrderService { get; } |
| | | /// <summary> |
| | | /// ç管æç¨æç»ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | public IOutSGOrderDetailService OutSGOrderDetailService { get; } |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
ä¸å¡æ¥å£å± |
| | | /// </summary> |
| | | public IOutStockLockInfoService OutStockLockInfoService { get; } |
| | | public OutboundService(IOutMESOrderService outMESOrderService, IOutSGOrderService outSGOrderService, IOutSGOrderDetailService outSGOrderDetailService, IOutStockLockInfoService outStockLockInfoService) |
| | | { |
| | | OutMESOrderService = outMESOrderService; |
| | | OutSGOrderService = outSGOrderService; |
| | | OutSGOrderDetailService = outSGOrderDetailService; |
| | | OutStockLockInfoService = outStockLockInfoService; |
| | | } |
| | | } |
| | | } |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (autoIssueDTO == null) |
| | | { |
| | | return content.Error("ä¼ å
¥ä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | //è·å对åºåæ® |
| | | Dt_OutMESOrder? outMESOrder = _outMESOrderRepository.QueryFirst(x=>x.OutDetailId==autoIssueDTO.OutDetailId); |
| | | if (outMESOrder==null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(MESAutoIssueDTO.OutDetailId)}{autoIssueDTO.OutDetailId}ä¸åå¨"); |
| | | } |
| | | if (outMESOrder.OutMESOrderStatus==OutOrderStatusEnum.å
³é.ObjToInt()) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}å·¥åå·²å
³é"); |
| | | } |
| | | //è·åå¨è½¬ä½ç½®ç¼å· |
| | | Dt_AGVStationInfo? stationInfo = _agvStationInfoRepository.QueryFirst(x=>x.MESPointCode==autoIssueDTO.PointCode); |
| | |
| | | { |
| | | return content.Error($"é¢æè®¡åå¨è½¬ä½{nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}åå¨ç©ºæ"); |
| | | } |
| | | Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus==TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x=>x.Grade).ThenBy(x=>x.TaskNum).FirstOrDefault(); |
| | | //è·åä»»å¡ |
| | | if (task==null) |
| | | { |
| | | return content.Error($"æªæ¾å°é¢æè®¡åç¼å·{outMESOrder.ProductOrderNo}å¯é
éä»»å¡"); |
| | | } |
| | | task.TaskStatus = TaskStatusEnum.New.ObjToInt(); |
| | | task.TargetAddress= stationInfo.AGVStationCode; |
| | | PushTasksToWCS(new List<Dt_Task> { task }); |
| | | //Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus==TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x=>x.Grade).ThenBy(x=>x.TaskNum).FirstOrDefault(); |
| | | ////è·åä»»å¡ |
| | | //if (task==null) |
| | | //{ |
| | | // return content.Error($"æªæ¾å°é¢æè®¡åç¼å·{outMESOrder.ProductOrderNo}å¯é
éä»»å¡"); |
| | | //} |
| | | //task.TaskStatus = TaskStatusEnum.New.ObjToInt(); |
| | | //task.TargetAddress= stationInfo.AGVStationCode; |
| | | //PushTasksToWCS(new List<Dt_Task> { task }); |
| | | return content.OK("嫿æå"); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent ReceiveManualIssue(MESManualIssueDTO manualIssueDTO) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (manualIssueDTO == null) |
| | | { |
| | | return content.Error("ä¼ å
¥ä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | //è·å对åºåæ® |
| | | Dt_OutMESOrder? outMESOrder = _outMESOrderRepository.QueryFirst(x => x.OutDetailId == manualIssueDTO.OutDetailId); |
| | | if (outMESOrder == null) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(MESAutoIssueDTO.OutDetailId)}{manualIssueDTO.OutDetailId}ä¸åå¨"); |
| | | } |
| | | if (outMESOrder.OutMESOrderStatus == OutOrderStatusEnum.å
³é.ObjToInt()) |
| | | { |
| | | return content.Error($"é¢æè®¡å{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}å·¥åå·²å
³é"); |
| | | } |
| | | //è·åå¨è½¬ä½ç½®ç¼å· |
| | | Dt_AGVStationInfo? stationInfo = _agvStationInfoRepository.QueryFirst(x => x.MESPointCode == manualIssueDTO.PointCode); |
| | | if (stationInfo == null) |
| | | { |
| | | return content.Error($"é¢æè®¡åå¨è½¬ä½{nameof(MESAutoIssueDTO.PointCode)}{manualIssueDTO.PointCode}ä¸åå¨"); |
| | | } |
| | | //Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus == TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).FirstOrDefault(); |
| | | ////è·åä»»å¡ |
| | | //if (task == null) |
| | | //{ |
| | | // return content.Error($"æªæ¾å°é¢æè®¡åç¼å·{outMESOrder.ProductOrderNo}å¯é
éä»»å¡"); |
| | | //} |
| | | //task.TaskStatus = TaskStatusEnum.New.ObjToInt(); |
| | | //task.TargetAddress = stationInfo.AGVStationCode; |
| | | //PushTasksToWCS(new List<Dt_Task> { task }); |
| | | return content.OK("嫿æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent ReceiveReturnIssue(List<MESReturnIssueDTO> returnIssueDTOs) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (returnIssueDTOs==null || returnIssueDTOs.Count<=0) |
| | | { |
| | | return content.Error("ä¼ å
¥ä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | //è·åææAGVç¹ä½ |
| | | List<Dt_AGVStationInfo> aGVStationInfos= _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode)); |
| | | MESReturnIssueDTO? returnIssueDTO = returnIssueDTOs.FirstOrDefault(x=> !aGVStationInfos.Select(x=>x.MESPointCode).Contains(x.PointCode)); |
| | | if (returnIssueDTO != null) |
| | | { |
| | | return content.Error($"å¨è½¬ä½{nameof(MESReturnIssueDTO.PointCode)}{returnIssueDTO.PointCode}ä¸åå¨"); |
| | | } |
| | | content.OK("å¼å«æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_OutboundService; |
| | | using static WIDESEA_DTO.ErpResponseContent; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.ERP |
| | |
| | | private readonly IPurchaseBSTOrderService _purchaseBSTOrderService; |
| | | private readonly IOutBSTOrderService _outBSTOrderService; |
| | | private readonly IReturnBSTOrderService _returnBSTOrderService; |
| | | private readonly IOutboundService _outboundService; |
| | | |
| | | public ErpBSTController(IBasicService basicService, IInvokeERPService invokeERPService,IPurchaseBSTOrderService purchaseBSTOrderService,IOutBSTOrderService outBSTOrderService,IReturnBSTOrderService returnBSTOrderService) |
| | | public ErpBSTController(IBasicService basicService, IInvokeERPService invokeERPService,IPurchaseBSTOrderService purchaseBSTOrderService,IOutBSTOrderService outBSTOrderService,IReturnBSTOrderService returnBSTOrderService, IOutboundService outboundService) |
| | | { |
| | | _basicService = basicService; |
| | | _invokeERPService = invokeERPService; |
| | | _purchaseBSTOrderService = purchaseBSTOrderService; |
| | | _outBSTOrderService = outBSTOrderService; |
| | | _returnBSTOrderService = returnBSTOrderService; |
| | | _outboundService = outboundService; |
| | | } |
| | | /// <summary> |
| | | /// æ·»å èåç©æ |
| | |
| | | return _purchaseBSTOrderService.AddPurchaseBSTOrder(bSTPurchaseOrderDTOs); |
| | | } |
| | | |
| | | ///// <summary> |
| | | ///// æ¥æ¶åºåºæç¨ä¿¡æ¯ |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[HttpPost, HttpGet, Route("ReceiveOutOrder"), AllowAnonymous] |
| | | //public WebResponseContent AddOutBSTOrder([FromBody] List<BSTOutOrderDTO> bSTOutOrderDTOs) |
| | | //{ |
| | | // return _outBSTOrderService.AddOutBSTOrder(bSTOutOrderDTOs); |
| | | //} |
| | | /// <summary> |
| | | /// æ¥æ¶åºåºæç¨ä¿¡æ¯ |
| | | /// æ¥æ¶ä¸æç管æç¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("ReceiveOutOrder"), AllowAnonymous] |
| | | public WebResponseContent AddOutBSTOrder([FromBody] List<BSTOutOrderDTO> bSTOutOrderDTOs) |
| | | public WebResponseContent AddOutBSTOrder([FromBody] List<SGOutOrderDTO> outOrderDTOs) |
| | | { |
| | | return _outBSTOrderService.AddOutBSTOrder(bSTOutOrderDTOs); |
| | | return _outboundService.OutSGOrderService.AddOutSGOrder(outOrderDTOs); |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶åæéé¢æä¿¡æ¯ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | | /// <summary> |
| | | /// MESæå/åæå |
| | | /// </summary> |
| | | [Route("api/MESProInOrderInfo")] |
| | | [ApiController] |
| | | public class MESProInOrderInfoController : ApiBaseController<IMESProInOrderInfoService, Dt_MESProInOrderInfo> |
| | | { |
| | | public MESProInOrderInfoController(IMESProInOrderInfoService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IInboundService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.MES |
| | | { |
| | |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | private readonly IOutMESOrderService _outMESOrderService; |
| | | private readonly IMESProInOrderInfoService _proInOrderInfoService; |
| | | |
| | | public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService) |
| | | public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService,IMESProInOrderInfoService proInOrderInfoService) |
| | | { |
| | | _taskService = taskService; |
| | | _outMESOrderService = outMESOrderService; |
| | | _proInOrderInfoService=proInOrderInfoService; |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶MESé¢æè®¡å |
| | |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("ReceiveOutBound"), AllowAnonymous] |
| | | |
| | | public WebResponseContent ReceiveOutBound([FromBody] OutMESOrderDTO outMESOrderDTO) |
| | | public WebResponseContent ReceiveOutBound([FromBody] List<OutMESOrderDTO> outMESOrderDTOs) |
| | | { |
| | | return _outMESOrderService.ReceiveOutBound(outMESOrderDTO); |
| | | return _outMESOrderService.ReceiveOutBound(outMESOrderDTOs); |
| | | } |
| | | /// <summary> |
| | | /// MESèªå¨å«ææ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveAutoIssue"), AllowAnonymous] |
| | | public WebResponseContent ReceiveAutoIssue([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | { |
| | |
| | | /// MESæå¨å«ææ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveManualIssue"), AllowAnonymous] |
| | | public WebResponseContent ReceiveManualIssue([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | public WebResponseContent ReceiveManualIssue([FromBody] MESManualIssueDTO manualIssueDTO) |
| | | { |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | return _taskService.ReceiveManualIssue(manualIssueDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// MES空æ/使å¼å«æ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveReturnIssue"), AllowAnonymous] |
| | | public WebResponseContent ReceiveReturnIssue([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | public WebResponseContent ReceiveReturnIssue([FromBody] List<MESReturnIssueDTO> returnIssueDTOs) |
| | | { |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | return _taskService.ReceiveReturnIssue(returnIssueDTOs); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå/åæåä¿¡æ¯åæ¥æ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveProCodeInfo"), AllowAnonymous] |
| | | public WebResponseContent ReceiveProCodeInfo([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | public WebResponseContent ReceiveProCodeInfo([FromBody] List<MESProInDTO> proInDTOs) |
| | | { |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | return _proInOrderInfoService.ReceiveProCodeInfo(proInDTOs); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// MESå·¥å忢æ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveProOrderStop"), AllowAnonymous] |
| | | public WebResponseContent ReceiveProOrderStop([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | public WebResponseContent ReceiveProOrderStop([FromBody] MESOrderStopDTO orderStopDTO) |
| | | { |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | return _proInOrderInfoService.ReceiveProOrderStop(orderStopDTO); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// èåç管æç¨å |
| | | /// </summary> |
| | | [Route("api/OutSGOrder")] |
| | | [ApiController] |
| | | public class OutSGOrderController : ApiBaseController<IOutSGOrderService, Dt_OutSGOrder> |
| | | { |
| | | public OutSGOrderController(IOutSGOrderService 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/OutSGOrderDetail")] |
| | | [ApiController] |
| | | public class OutSGOrderDetailController : ApiBaseController<IOutSGOrderDetailService, Dt_OutSGOrderDetail> |
| | | { |
| | | public OutSGOrderDetailController(IOutSGOrderDetailService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | CreateMap<BSTReturnOrderDTOItem, Dt_ReturnBSTOrderDetail>().ForMember(x => x.ReturnBSTOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.æªå¼å§.ObjToInt())).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.W)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thick)); |
| | | //MESé¢æè®¡åå®ä½è½¬æ¢ |
| | | CreateMap<OutMESOrderDTO, Dt_OutMESOrder>().ForMember(x => x.OutMESOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.æªå¼å§.ObjToInt())); |
| | | //ç管æç¨å®ä½è½¬æ¢ |
| | | CreateMap<SGOutOrderDTO, Dt_OutSGOrder>().ForMember(x => x.OutSGOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.æªå¼å§.ObjToInt())).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt())); |
| | | CreateMap<SGOutOrderDTO, Dt_OutSGOrderDetail>().ForMember(x => x.OutSGOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.æªå¼å§.ObjToInt())); |
| | | //æååæåå®ä½è½¬æ¢ |
| | | CreateMap<MESProInDTO, Dt_MESProInOrderInfo>().ForMember(x => x.MESProInStatus, b => b.MapFrom(b => InOrderStatusEnum.æªå¼å§.ObjToInt())); |
| | | } |
| | | } |
| | | } |