| ¶Ô±ÈÐÂÎļþ |
| | |
| | | let extension = { |
| | | components: {//卿æ©å
ç»ä»¶æç»ä»¶è·¯å¾ |
| | | //表åheaderãcontentãfooter对åºä½ç½®æ©å
çç»ä»¶ |
| | | gridHeader:'', |
| | | gridbody:'', |
| | | gridFooter: '', |
| | | //å¼¹åºæ¡(ä¿®æ¹ãç¼è¾ãæ¥ç)headerãcontentãfooter对åºä½ç½®æ©å
çç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | buttons: [],//æ©å±çæé® |
| | | methods: {//äºä»¶æ©å± |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | path: '/trackloginfo', |
| | | name: 'trackloginfo', |
| | | component: () => import('@/views/basicinfo/Dt_trackloginfo.vue') |
| | | }, |
| | | { |
| | | path: '/StationInfo', |
| | | name: 'StationInfo', |
| | | component: () => import('@/views/basicinfo/Dt_StationInfo.vue') |
| | | } |
| | | ] |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | |
| | | <script> |
| | | import extend from "@/extension/basicinfo/Dt_trackloginfo.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "ç«å°ä¿¡æ¯", |
| | | name: "stationInfo", |
| | | url: "/stationInfo/", |
| | | sortName: "createDate", |
| | | }); |
| | | |
| | | const editFormFields = ref({ |
| | | id: "", |
| | | stationCode: "", |
| | | stationName: "", |
| | | stationType: "", |
| | | floorNumber: "", |
| | | isOccupied: "", |
| | | remark: "", |
| | | creater: "", |
| | | createDate: "", |
| | | modifier: "", |
| | | modifyDate: "", |
| | | }); |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "ç«å°ç¼å·", |
| | | field: "stationCode", |
| | | type: "input", |
| | | width: 220, |
| | | require: true, |
| | | }, |
| | | { |
| | | title: "ç«å°åç§°", |
| | | field: "stationName", |
| | | type: "input", |
| | | width: 220, |
| | | require: false, |
| | | }, |
| | | { |
| | | title: "ç«å°ç±»å", |
| | | field: "stationType", |
| | | type: "select", |
| | | width: 150, |
| | | require: true, |
| | | data: [ |
| | | { key: "1", value: "åªå
¥" }, |
| | | { key: "2", value: "åªåº" }, |
| | | { key: "3", value: "å¯å
¥å¯åº" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "æå¨æ¥¼å±", |
| | | field: "floorNumber", |
| | | type: "input", |
| | | width: 150, |
| | | require: true, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ç«å°ç¶æ", |
| | | field: "isOccupied", |
| | | type: "select", |
| | | width: 150, |
| | | require: true, |
| | | data: [ |
| | | { key: "0", value: "空é²" }, |
| | | { key: "1", value: "å ç¨" }, |
| | | { key: "2", value: "ç¦ç¨" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "remark", |
| | | type: "input", |
| | | width: 400, |
| | | require: false, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "主é®ID", |
| | | field: "id", |
| | | type: "input", |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | title: "å建人", |
| | | field: "creater", |
| | | type: "input", |
| | | width: 120, |
| | | hidden: true, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | title: "å建æ¶é´", |
| | | field: "createDate", |
| | | type: "datetime", |
| | | width: 150, |
| | | hidden: true, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | title: "ä¿®æ¹äºº", |
| | | field: "modifier", |
| | | type: "input", |
| | | width: 120, |
| | | hidden: true, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | title: "ä¿®æ¹æ¶é´", |
| | | field: "modifyDate", |
| | | type: "datetime", |
| | | width: 150, |
| | | hidden: true, |
| | | readonly: true, |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // æç´¢è¡¨åç»å®å段 |
| | | const searchFormFields = ref({ |
| | | stationCode: "", |
| | | stationName: "", |
| | | stationType: "", |
| | | floorNumber: "", |
| | | isOccupied: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | |
| | | // æç´¢è¡¨åå¸å±é
置项 |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "ç«å°ç¼å·", |
| | | field: "stationCode", |
| | | type: "like" |
| | | }, |
| | | { |
| | | title: "ç«å°åç§°", |
| | | field: "stationName", |
| | | type: "like" |
| | | }, |
| | | { |
| | | title: "æå¨æ¥¼å±", |
| | | field: "floorNumber", |
| | | type: "like" |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ç«å°ç±»å", |
| | | field: "stationType", |
| | | type: "select", |
| | | data: [ |
| | | { key: "1", value: "åªå
¥" }, |
| | | { key: "2", value: "åªåº" }, |
| | | { key: "3", value: "å¯å
¥å¯åº" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "ç«å°ç¶æ", |
| | | field: "isOccupied", |
| | | type: "select", |
| | | data: [ |
| | | { key: "0", value: "空é²" }, |
| | | { key: "1", value: "å ç¨" }, |
| | | { key: "2", value: "ç¦ç¨" }, |
| | | ], |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "å建人", |
| | | field: "creater", |
| | | type: "like" |
| | | }, |
| | | { |
| | | title: "å建æ¶é´", |
| | | field: "createDate", |
| | | type: "datetime" |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // è¡¨æ ¼åé
ç½® - 1:1 对åºå端Dt_StationInfoå®ä½ææå段+å
Œ
±å段 |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "åºå·", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationCode", |
| | | title: "ç«å°ç¼å·", |
| | | type: "string", |
| | | width: 140, |
| | | align: "left", |
| | | require: true, |
| | | }, |
| | | { |
| | | field: "stationName", |
| | | title: "ç«å°åç§°", |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationType", |
| | | title: "ç«å°ç±»å", |
| | | type: "select", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "1", value: "åªå
¥" }, |
| | | { key: "2", value: "åªåº" }, |
| | | { key: "3", value: "å¯å
¥å¯åº" }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | field: "floorNumber", |
| | | title: "æå¨æ¥¼å±", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "isOccupied", |
| | | title: "ç«å°ç¶æ", |
| | | type: "select", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "空é²" }, |
| | | { key: "1", value: "å ç¨" }, |
| | | { key: "2", value: "ç¦ç¨" }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | 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: 200, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | // æç´¢è¡¨åå¸å±é
置项 |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»åºç¼å·", field: "warehouseId", type: "equal" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode", type: "like" }, |
| | | { title: "ä»åºç¼å·", field: "warehouseId", type: "equal" }, |
| | | { title: "è´§ä½åç§°", field: "locationName", type: "like" }, |
| | | |
| | | ], |
| | |
| | | // æç´¢è¡¨åå¸å±é
置项 |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»åºç¼å·", field: "warehouseId", type: "equal" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode", type: "like" }, |
| | | { title: "ä»åºç¼å·", field: "warehouseId", type: "equal" }, |
| | | { title: "è´§ä½åç§°", field: "locationName", type: "like" }, |
| | | |
| | | ], |
| | |
| | | { |
| | | FreeLocationInfos = FreeLocationInfos.Where(x => !LocationCodes.Contains(x.LocationCode)).ToList(); |
| | | var rGVLocationInfos = FreeLocationInfos.Where(x => x.WarehouseId == locationInfo.WarehouseId).ToList();//æ¥æ¾ååºåå¯ç¨ç©ºè´§ä½ |
| | | rGVLocationInfo = GetFreeLocationInfo(rGVLocationInfos); |
| | | rGVLocationInfo = GetFreeLocationInfo(rGVLocationInfos);//è·åå¯ç¨ç©ºè´§ä½ |
| | | if (rGVLocationInfo == null) |
| | | { |
| | | rGVLocationInfos = FreeLocationInfos.Where(x => x.WarehouseId != locationInfo.WarehouseId).ToList();//æ¥æ¾ä¸ååºåå¯ç¨ç©ºè´§ä½ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicInfoService |
| | | { |
| | | public class StationInfoService : ServiceBase<Dt_StationInfo, IRepository<Dt_StationInfo>>, IStationInfoService |
| | | { |
| | | public StationInfoService(IRepository<Dt_StationInfo> BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IRepository<Dt_StationInfo> Repository => BaseDal; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IBasicInfoService |
| | | { |
| | | public interface IStationInfoService : IService<Dt_StationInfo> |
| | | { |
| | | public IRepository<Dt_StationInfo> Repository { get; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.BasicInfo |
| | | { |
| | | /// <summary> |
| | | ///æ¥å£ä¿¡æ¯ |
| | | /// </summary> |
| | | [Route("api/StationInfo")] |
| | | [ApiController] |
| | | public class StationInfoController : ApiBaseController<IStationInfoService, Dt_StationInfo> |
| | | { |
| | | public StationInfoController(IStationInfoService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | #region å®ä½ç±»è½¬æ¢ |
| | | hIKROBOTTaskSubmit = HIKROBOTTask(task); |
| | | if (hIKROBOTTaskSubmit == null) throw new Exception("海康AGVä»»å¡å®ä½è½¬æ¢å¤±è´¥"); |
| | | var json = hIKROBOTTaskSubmit.Serialize(); |
| | | #endregion |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTTaskSubmit.Serialize()); |
| | | hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>(); |
| | |
| | | HIKROBOTTaskSubmit hIKROBOTTaskSubmit = new HIKROBOTTaskSubmit(); |
| | | try |
| | | { |
| | | var tasktype = (TaskTypeEnum)Enum.GetValues(typeof(TaskTypeEnum)).GetValue(task.TaskType); |
| | | var tasktype = (TaskTypeEnum)Enum.GetValues(typeof(TaskTypeEnum)).GetValue(task.TaskType-1); |
| | | |
| | | hIKROBOTTaskSubmit.initPriority = task.Grade; |
| | | hIKROBOTTaskSubmit.robotTaskCode = task.WMSTaskNum; |