添加人工一键下料功能,人工一键切换托盘功能,优化任务等级
| | |
| | | onClick: function () { |
| | | this.Upload(); |
| | | } |
| | | }, { |
| | | name: "䏿任å¡", |
| | | icon: 'el-icon-plus', |
| | | value: 'AddTask', |
| | | class: '', |
| | | plain:true, |
| | | type: 'success', |
| | | // plain:true, |
| | | onClick: function () { |
| | | this.addTask(); |
| | | } |
| | | }, { |
| | | name: "åæ¶ç¦ç¨", |
| | | icon: 'ios-cog', |
| | | value: 'EnableBtn', |
| | | class: '', |
| | | // plain:true, |
| | | type: 'success', |
| | | // plain:true, |
| | | onClick: function () { |
| | | // this.addTask(); |
| | | } |
| | | } |
| | | , { |
| | | name: "ç¦ç¨", |
| | | icon: 'ios-cog', |
| | | value: 'DisEnableBtn', |
| | | class: '', |
| | | // plain:true, |
| | | type: 'danger', |
| | | onClick: function () { |
| | | // this.addTask(); |
| | | } |
| | | }, { |
| | | name: "忢æç", |
| | | icon: 'el-icon-edit', |
| | | value: 'Trayswitching', |
| | | class: '', |
| | | plain:true, |
| | | type: 'danger', |
| | | // plain:true, |
| | | onClick: function () { |
| | | // this.addTask(); |
| | | } |
| | | } |
| | | // , { |
| | | // name: "æ°æ®ç»æ", |
| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://192.168.12.101:8098/'; |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8098/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://192.168.12.101:8098/'; |
| | |
| | | // x.icon='el-icon-document' |
| | | // } |
| | | // }); |
| | | let AddTaskBtn = this.buttons.find(r => r.name == "䏿任å¡"); |
| | | if(null!=AddTaskBtn){ |
| | | AddTaskBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©ä¸æä½!"); |
| | | let addkeys = rows.map(x => { |
| | | return x[this.table.key]; |
| | | }); |
| | | if (!addkeys || addkeys.Length == 0) return this.$error("æªè·åå°ä¸æä½!"); |
| | | this.$confirm("æ¯å¦ç¡®è®¤è¦æ·»å 䏿任å¡ï¼","æç¤º",{ |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText:"确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(()=>{ |
| | | let params = { |
| | | MainData: null, |
| | | DetailData: null, |
| | | DelKeys: addkeys |
| | | } |
| | | this.http.post("/api/dt_stationinfo/SendAGVTask", params, "æ£å¨æ·»å ä»»å¡....").then(x => { |
| | | if (!x.status) return this.$error(x.message); |
| | | this.$success(x.message); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |
| | | let TrayswitchingBtn = this.buttons.find(r => r.name == "忢æç"); |
| | | if(null!=TrayswitchingBtn){ |
| | | TrayswitchingBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©ä¸æä½!"); |
| | | let addkeys = rows.map(x => { |
| | | return x[this.table.key]; |
| | | }); |
| | | if (!addkeys || addkeys.Length == 0) return this.$error("æªè·åå°ä¸æä½!"); |
| | | this.$confirm("æ¯å¦ç¡®è®¤åæ¢æçï¼","æç¤º",{ |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText:"确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(()=>{ |
| | | let params = { |
| | | MainData: null, |
| | | DetailData: null, |
| | | DelKeys: addkeys |
| | | } |
| | | this.http.post("/api/dt_stationinfo/Trayswitching", params, "æ£å¨åæ¢....").then(x => { |
| | | if (!x.status) return this.$error(x.message); |
| | | this.$success(x.message); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | // this.boxOptions.labelWidth = 150; |
| | |
| | | row.sort=true; |
| | | } |
| | | }) |
| | | this.buttons.splice(1, 0, { |
| | | name: "åæ¶ç¦ç¨", |
| | | icon: 'md-refresh', |
| | | type: 'primary', |
| | | onClick: function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©è¦åæ¶ç¦ç¨çæ°æ®"); |
| | | |
| | | this.$confirm('确认è¦åæ¶ç¦ç¨å?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | let data = []; |
| | | let parm = { |
| | | "data": data, |
| | | "type": "1" |
| | | } |
| | | rows.forEach(t => data.push(t.id)) |
| | | this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "åæ¶ç¦ç¨ä¸...").then(x => { |
| | | if (x.status) { |
| | | this.$Message.success("åæ¶ç¦ç¨æå!"); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(x.message); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }) |
| | | let EnableBtn = this.buttons.find(r => r.name == "åæ¶ç¦ç¨"); |
| | | if(null!=EnableBtn){ |
| | | EnableBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©è¦åæ¶ç¦ç¨çæ°æ®"); |
| | | |
| | | this.buttons.splice(1, 0, { |
| | | name: "ç¦ç¨", |
| | | icon: 'md-refresh', |
| | | type: 'danger', |
| | | onClick: function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©è¦ç¦ç¨çæ°æ®"); |
| | | this.$confirm('确认è¦åæ¶ç¦ç¨å?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | let data = []; |
| | | let parm = { |
| | | "data": data, |
| | | "type": "1" |
| | | } |
| | | rows.forEach(t => data.push(t.id)) |
| | | this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "åæ¶ç¦ç¨ä¸...").then(x => { |
| | | if (x.status) { |
| | | this.$Message.success("åæ¶ç¦ç¨æå!"); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(x.message); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | |
| | | this.$confirm('确认è¦ç¦ç¨å?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | let data = []; |
| | | let parm = { |
| | | "data": data, |
| | | "type": "0" |
| | | } |
| | | rows.forEach(t => data.push(t.id)) |
| | | this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "éå®ä¸...").then(x => { |
| | | if (x.status) { |
| | | this.$Message.success("ç¦ç¨æåï¼"); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(x.message); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }) |
| | | // this.buttons.splice(1, 0, { |
| | | // name: "åæ¶ç¦ç¨", |
| | | // icon: 'md-refresh', |
| | | // type: 'primary', |
| | | // onClick: function () { |
| | | // let rows = this.$refs.table.getSelected(); |
| | | // if (rows.length == 0) return this.$error("è¯·éæ©è¦åæ¶ç¦ç¨çæ°æ®"); |
| | | |
| | | // this.$confirm('确认è¦åæ¶ç¦ç¨å?', 'è¦å', { |
| | | // confirmButtonText: 'ç¡®å®', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning', |
| | | // center: true |
| | | // }).then(() => { |
| | | // let data = []; |
| | | // let parm = { |
| | | // "data": data, |
| | | // "type": "1" |
| | | // } |
| | | // rows.forEach(t => data.push(t.id)) |
| | | // this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "åæ¶ç¦ç¨ä¸...").then(x => { |
| | | // if (x.status) { |
| | | // this.$Message.success("åæ¶ç¦ç¨æå!"); |
| | | // this.refresh(); |
| | | // } else { |
| | | // this.$Message.error(x.message); |
| | | // } |
| | | // }) |
| | | // }); |
| | | // } |
| | | // }) |
| | | let DisEnableBtn = this.buttons.find(r => r.name == "ç¦ç¨"); |
| | | if(null!=DisEnableBtn){ |
| | | DisEnableBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©è¦ç¦ç¨çæ°æ®"); |
| | | |
| | | this.$confirm('确认è¦ç¦ç¨å?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | let data = []; |
| | | let parm = { |
| | | "data": data, |
| | | "type": "0" |
| | | } |
| | | rows.forEach(t => data.push(t.id)) |
| | | this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "éå®ä¸...").then(x => { |
| | | if (x.status) { |
| | | this.$Message.success("ç¦ç¨æåï¼"); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(x.message); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // this.buttons.splice(1, 0, { |
| | | // name: "ç¦ç¨", |
| | | // icon: 'md-refresh', |
| | | // type: 'danger', |
| | | // onClick: function () { |
| | | // let rows = this.$refs.table.getSelected(); |
| | | // if (rows.length == 0) return this.$error("è¯·éæ©è¦ç¦ç¨çæ°æ®"); |
| | | |
| | | // this.$confirm('确认è¦ç¦ç¨å?', 'è¦å', { |
| | | // confirmButtonText: 'ç¡®å®', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning', |
| | | // center: true |
| | | // }).then(() => { |
| | | // let data = []; |
| | | // let parm = { |
| | | // "data": data, |
| | | // "type": "0" |
| | | // } |
| | | // rows.forEach(t => data.push(t.id)) |
| | | // this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "éå®ä¸...").then(x => { |
| | | // if (x.status) { |
| | | // this.$Message.success("ç¦ç¨æåï¼"); |
| | | // this.refresh(); |
| | | // } else { |
| | | // this.$Message.error(x.message); |
| | | // } |
| | | // }) |
| | | // }); |
| | | // } |
| | | // }) |
| | | // this.buttons.splice(1, 0, { |
| | | // name: "ç§»åº", |
| | | // icon: 'el-icon-document', |
| | |
| | | // } |
| | | add(){ |
| | | this.$refs.gridHeader.detialBox = true; |
| | | |
| | | }, |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { //æ¡æ¶åå§åé
ç½®åï¼ |
| | |
| | | public partial interface Idt_stationinfoService |
| | | { |
| | | WebResponseContent SetStationEnable(object parm); |
| | | WebResponseContent SendAGVTask(object parm); |
| | | WebResponseContent SendAGVTask(SaveModel saveModel); |
| | | WebResponseContent dt_stationinfolist(); |
| | | WebResponseContent Trayswitching(SaveModel saveModel); |
| | | } |
| | | } |
| | |
| | | using static System.Collections.Specialized.BitVector32; |
| | | using WIDESEA_Core.EFDbContext; |
| | | using WIDESEA_WMS.Repositories; |
| | | using WIDESEA_Comm; |
| | | using WIDESEA_Comm.TaskNo; |
| | | using WIDESEA_Common; |
| | | |
| | | namespace WIDESEA_WMS.Services |
| | | { |
| | |
| | | } |
| | | return webResponse; |
| | | } |
| | | |
| | | public WebResponseContent SendAGVTask(object json) |
| | | /// <summary> |
| | | /// 忢æç |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent Trayswitching(SaveModel saveModel) |
| | | { |
| | | WebResponseContent webResponse = new WebResponseContent(); |
| | | try |
| | | VOLContext context = new VOLContext(); |
| | | Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(context); |
| | | IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(context); |
| | | string completor = UserContext.Current.UserName; |
| | | foreach (var Key in saveModel.DelKeys) |
| | | { |
| | | try |
| | | { |
| | | var station = repository.Find(x => x.id.ToString() == Key.ToString()).FirstOrDefault(); |
| | | if (!station.stationCode.Contains("X")) throw new Exception($"æ {station.stationCode}ä½¿ç¨æéï¼"); |
| | | if (!station.enable) throw new Exception($"{station.stationCode}æªå¯ç¨ï¼"); |
| | | if (station.location_state == LocationStateEnum.Abnormal.ToString()) throw new Exception($"{station.stationCode}ç¶æå¼å¸¸ï¼"); |
| | | if (station.location_state == LocationStateEnum.Empty.ToString()) throw new Exception($"{station.stationCode}ç¶æä¸ºç©ºï¼"); |
| | | if (station.remark == "æ¡æ¶ä¸æ") throw new Exception($"{station.stationCode}æ¡æ¶æ£å¨ä¸æï¼"); |
| | | if (agvtaskRepository.Find(x => x.agv_toaddress == station.stationCode).Any()) throw new Exception($"{station.stationCode}åå¨ä»»å¡ï¼"); |
| | | |
| | | if (!agvtaskRepository.Find(x => x.agv_fromaddress == station.stationCode).Any()) |
| | | { |
| | | #region 为空æå¹¶ä¸æ°é为0,å建å空æä»»å¡ |
| | | if (station.tray_status == TrayStateEnum.EmptyTray.ToString() && station.quantity == 0) |
| | | { |
| | | dt_agvtask agvtask = new dt_agvtask() |
| | | { |
| | | agv_fromaddress = station.stationCode, |
| | | agv_id = Guid.NewGuid(), |
| | | agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | agv_grade = 1, |
| | | agv_createtime = DateTime.Now, |
| | | agv_taskstate = AGVTaskStateEnum.Queue.ToString(), |
| | | agv_qty = 1, |
| | | StarQuantity = 0, |
| | | EndQuantity = 0,//EmptyStation.quantity, |
| | | agv_tasktype = AGVTaskTypeEnum.TaskType_EmptyPallet.ToString(), |
| | | agv_toaddress = "", |
| | | agv_userid = UserContext.Current.UserName, |
| | | agv_TrayStatus = station.tray_status, |
| | | agv_Traytype = station.tray_type |
| | | }; |
| | | agvtaskRepository.Add(agvtask, true); |
| | | |
| | | station.location_state = LocationStateEnum.Busy.ToString(); |
| | | } |
| | | #endregion |
| | | |
| | | #region å建å
¥åºä»»å¡ |
| | | else if (station.location_state == LocationStateEnum.Stroge.ToString() && station.quantity > 0) |
| | | { |
| | | var Work = workinfoRepository.Find(x => x.workOrder == station.Number && x.processCode == "17").FirstOrDefault(); |
| | | if (Work == null) throw new Exception($"æªæ¾å°è´§ä½{station.stationCode}çæºå 工工åä¿¡æ¯ï¼"); |
| | | dt_agvtask agvtask = new dt_agvtask() |
| | | { |
| | | agv_fromaddress = station.stationCode, |
| | | agv_id = Guid.NewGuid(), |
| | | agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | agv_grade = 1, |
| | | agv_createtime = DateTime.Now, |
| | | agv_taskstate = AGVTaskStateEnum.Queue.ToString(), |
| | | agv_materielid = station.stationType, |
| | | agv_qty = station.quantity, |
| | | agv_tasktype = station.stationCode.Contains("3") ? AGVTaskTypeEnum.TaskType_OutsourceInbound.ToString() : AGVTaskTypeEnum.TaskType_Inbound.ToString(), |
| | | agv_toaddress = "", |
| | | agv_userid = UserContext.Current.UserName, |
| | | bindSN = station.bindSN, |
| | | agv_worktype = Convert.ToInt32(Work.processCode), |
| | | agv_materbarcode = Work.materialCode, |
| | | agv_Traytype = station.tray_type, |
| | | jobID = station.Number, |
| | | agv_TrayStatus = station.tray_status |
| | | }; |
| | | agvtaskRepository.Add(agvtask, true); |
| | | |
| | | station.location_state = LocationStateEnum.InBusy.ToString(); |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | | station.tray_type = station.tray_type == TrayTypeEnum.SmallTray.ToString() ? TrayTypeEnum.LargeTray.ToString() : TrayTypeEnum.SmallTray.ToString(); |
| | | repository.Update(station, x => new { x.location_state, x.tray_type }, true); |
| | | |
| | | webResponse.OK(webResponse.Message += $"{station.stationCode}忢æå!"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | webResponse.Error(webResponse.Message += ex.Message); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | return webResponse; |
| | | } |
| | | /// <summary> |
| | | /// ä¸æä»»å¡ |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent SendAGVTask(SaveModel saveModel) |
| | | { |
| | | WebResponseContent webResponse = new WebResponseContent(); |
| | | VOLContext context = new VOLContext(); |
| | | Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(context); |
| | | IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(context); |
| | | string completor = UserContext.Current.UserName; |
| | | foreach (var Key in saveModel.DelKeys) |
| | | { |
| | | |
| | | try |
| | | { |
| | | var station = repository.Find(x => x.id.ToString() == Key.ToString()).FirstOrDefault(); |
| | | if (!station.stationCode.Contains("X")) throw new Exception($"æ {station.stationCode}ä½¿ç¨æéï¼"); |
| | | if (!station.enable) throw new Exception($"{station.stationCode}æªå¯ç¨ï¼"); |
| | | if (station.location_state == LocationStateEnum.Abnormal.ToString()) throw new Exception($"{station.stationCode}ç¶æå¼å¸¸ï¼"); |
| | | if (station.location_state == LocationStateEnum.Empty.ToString()) throw new Exception($"{station.stationCode}ç¶æä¸ºç©ºï¼"); |
| | | if (station.tray_status == TrayStateEnum.EmptyTray.ToString()) throw new Exception($"{station.stationCode}为空æçï¼"); |
| | | if (station.quantity < 1) throw new Exception($"{station.stationCode}æ°éå°äº1ï¼"); |
| | | if (station.remark == "æ¡æ¶ä¸æ") throw new Exception($"{station.stationCode}æ¡æ¶æ£å¨ä¸æï¼"); |
| | | //if (station.location_state.Contains("Busy")) throw new Exception($"{station.stationCode}å ç¨ï¼"); |
| | | if (agvtaskRepository.Find(x => x.agv_fromaddress == station.stationCode || x.agv_fromaddress == station.stationCode).Any()) throw new Exception($"{station.stationCode}åå¨ä»»å¡ï¼"); |
| | | var Work = workinfoRepository.Find(x => x.workOrder == station.Number && x.processCode == "17").FirstOrDefault(); |
| | | if (Work == null) throw new Exception($"æªæ¾å°è´§ä½{station.stationCode}çæºå 工工åä¿¡æ¯ï¼"); |
| | | dt_agvtask agvtask = new dt_agvtask() |
| | | { |
| | | agv_fromaddress = station.stationCode, |
| | | agv_id = Guid.NewGuid(), |
| | | agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | agv_grade = 1, |
| | | agv_createtime = DateTime.Now, |
| | | agv_taskstate = AGVTaskStateEnum.Queue.ToString(), |
| | | agv_materielid = station.stationType, |
| | | agv_qty = station.quantity, |
| | | agv_tasktype = station.stationCode.Contains("3") ? AGVTaskTypeEnum.TaskType_OutsourceInbound.ToString() : AGVTaskTypeEnum.TaskType_Inbound.ToString(), |
| | | agv_toaddress = "", |
| | | agv_userid = UserContext.Current.UserName, |
| | | bindSN = station.bindSN, |
| | | agv_worktype = Convert.ToInt32(Work.processCode), |
| | | agv_materbarcode = Work.materialCode, |
| | | agv_Traytype = station.tray_type, |
| | | jobID = station.Number, |
| | | agv_TrayStatus = station.tray_status |
| | | }; |
| | | agvtaskRepository.Add(agvtask, true); |
| | | station.location_state = LocationStateEnum.InBusy.ToString(); |
| | | repository.Update(station, x => new { x.location_state }, true); |
| | | webResponse.OK(webResponse.Message += $"{station.stationCode}任塿·»å æå!"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | webResponse.Error(webResponse.Message += ex.Message); |
| | | } |
| | | } |
| | | return webResponse; |
| | | } |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | VOLContext volContext = new VOLContext(); |
| | | Idt_stationinfoRepository dsta = new dt_stationinfoRepository(volContext); |
| | | string[] stationCodes = { "A","S", "X", "W", "DD","B", "C", "D01"}; |
| | | string[] stationCodes = { "A", "S", "X", "W", "DD", "B", "C", "D01" }; |
| | | List<Tuple<List<dt_stationinfo>, int>> responseData = new List<Tuple<List<dt_stationinfo>, int>>(); |
| | | foreach (string code in stationCodes) |
| | | { |
| | |
| | | agv_fromaddress = station.stationCode, |
| | | agv_id = Guid.NewGuid(), |
| | | agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | agv_grade = 1, |
| | | agv_grade = 0, |
| | | agv_createtime = DateTime.Now, |
| | | agv_taskstate = "Queue", |
| | | agv_materielid = station.stationType, |
| | |
| | | agv_fromaddress = station1.stationCode, |
| | | agv_id = Guid.NewGuid(), |
| | | agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | agv_grade = 1, |
| | | agv_grade = 0, |
| | | agv_createtime = DateTime.Now, |
| | | agv_taskstate = "Create", |
| | | agv_materielid = station1.stationType, |
| | |
| | | using WIDESEA_WMS.IServices; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_WMS.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | |
| | | namespace WIDESEA_WMS.Controllers |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¸åNGä»»å¡ |
| | | /// ä¸æä»»å¡ |
| | | /// </summary> |
| | | /// <param name="parm"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("SendAGVTask")] |
| | | public WebResponseContent SendAGVTask([FromBody] object parm) |
| | | [HttpPost, Authorize, Route("SendAGVTask"),AllowAnonymous] |
| | | public WebResponseContent SendAGVTask([FromBody] SaveModel saveModel) |
| | | { |
| | | return dt_stationinfoService.Instance.SendAGVTask(parm); |
| | | return dt_stationinfoService.Instance.SendAGVTask(saveModel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 忢æç |
| | | /// </summary> |
| | | /// <param name="parm"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Authorize, Route("Trayswitching"), AllowAnonymous] |
| | | public WebResponseContent Trayswitching([FromBody] SaveModel saveModel) |
| | | { |
| | | return dt_stationinfoService.Instance.Trayswitching(saveModel); |
| | | } |
| | | |
| | | /// <summary> |