| | |
| | | let loadingStatus = false |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://localhost:5000/'; |
| | | // axios.defaults.baseURL = 'http://192.168.20.251:5000/'; |
| | | // axios.defaults.baseURL = 'http://192.168.65.253:5000/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9991/'; |
| | | axios.defaults.baseURL = 'http://192.168.65.253:5000/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'production') { |
| | | // axios.defaults.baseURL = 'http://127.0.0.1:5000/'; |
| | | axios.defaults.baseURL = 'http://192.168.20.253:5000/'; |
| | | axios.defaults.baseURL = 'http://192.168.65.253:5000/'; |
| | | } |
| | | |
| | | //axios.defaults.baseURL = 'http://api.volcore.xyz/'; |
| | |
| | | function getToken() { |
| | | return store.getters.getToken() |
| | | } |
| | | |
| | | export function Getproductionvolume (data) { |
| | | return axios.post('/api/Task/GetTimeoutgetPageData', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | export function GetproductionstatisticsgetPageData (data) { |
| | | return axios.post('/api/Task/GetproductionstatisticsgetPageData', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | /* |
| | | url |
| | | params请æ±åå°çåæ°,å¦ï¼{name:123,values:['a','b','c']} |
| | |
| | | getMenu() { |
| | | return http.get('/api/getTreeMenu') |
| | | }, |
| | | |
| | | getButtons(path, extra, table, tableName) { |
| | | //extraèªå®é¢å¤æé® |
| | | //tableè·åæå®è¡¨çæé |
| | |
| | | //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | if (res.status) { |
| | | this.$Message.success('åå»ºä»»å¡æå') |
| | | console.log(res) |
| | | this.refresh() //å·æ°è¡¨æ ¼ |
| | | } else { |
| | | this.$Message.error(res.message) //é误æç¤º |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | var btnSupplementationData = this.buttons.find(x => x.value == "SupplementationData"); |
| | | if (btnSupplementationData != null) { |
| | |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | this.detailOptions.columns.forEach(column=>{ |
| | | console.log(column) |
| | | }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | |
| | | return true |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | console.log(result) |
| | | return true |
| | | }, |
| | | addBefore(formData) { |
| | |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | |
| | | meta: { |
| | | |
| | | } |
| | | },{ |
| | | path: '/Dt_OutTime', |
| | | name: 'Dt_OutTime', |
| | | component: () => import('@/views/widesea_wms/stock/Dt_OutTime.vue'), |
| | | meta: { |
| | | } |
| | | },{ |
| | | path: '/Dt_CL', |
| | | name: 'Dt_CL', |
| | | component: () => import('@/views/widesea_wms/taskinfo/Dt_CL.vue'), |
| | | meta: { |
| | | } |
| | | } |
| | | ] |
| | | |
| | |
| | | |
| | | const eventBus = mitt(); |
| | | |
| | | export default eventBus; |
| | | export default eventBus; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *Authorï¼jxx |
| | | *Contactï¼283591387@qq.com |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wms/stock/Dt_BillGroupStock.jsæ¤å¤ç¼å |
| | | --> |
| | | |
| | | <template> |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'id', |
| | | footer: "Foots", |
| | | cnName: 'è¶
æ¶ä¿¡æ¯', |
| | | name: 'stock/Dt_BillGroupStock', |
| | | url: "/Task/GetTimeout", |
| | | sortName: "createDate" |
| | | }); |
| | | const editFormFields = ref({ |
| | | "palletCode": "", |
| | | "productionLine": "", |
| | | "outboundTime": "", |
| | | // "groupType": "" |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { "title": "æçæ¡ç ", "field": "palletCode", type: "text" }, |
| | | { "title": "ç产产线", "field": "productionLine", type: "text" }, |
| | | { "title": "åºåºåºæ¶é´", "field": "outboundTime", type: "datetime" }, |
| | | // { "title": "ç»çç±»å", "field": "groupType", type: "select", dataKey: "GroupType", data: [] }, |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({}); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { "title": "æçæ¡ç ", "field": "palletCode", type: "text" }, |
| | | { "title": "ç产产线", "field": "productionLine", type: "select", dataKey: "ProductionLine", data: [] }, |
| | | { "title": "åºåº", "field": "areaCode", type: "select", dataKey: "AreaType", data: [] }, |
| | | { "title": "åºåç±»å", "field": "isFull", type: "select", dataKey: "isFull", data: [] }, |
| | | ], [ |
| | | { "title": "åºä½å·", "field": "locationCode", type: "text" }, |
| | | { "title": "å··é", "field": "roadwayNo", type: "text" }, |
| | | { "title": "è´§ä½ç¶æ", "field": "locationStatus", type: "select", dataKey: "LocationState", data: [] }, |
| | | { "title": "åºåºæ¶é´", "field": "outboundTime", type: "datetime"}, |
| | | ] |
| | | ]); |
| | | const now = new Date(); |
| | | // ç´æ¥åå» 3 å°æ¶ï¼å¯è½è·¨å¤©ï¼Date 对象ä¼èªå¨å¤çï¼ |
| | | now.setHours(now.getHours() - 3); |
| | | const columns = ref( |
| | | [{ field: 'id', title: 'åºåID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'locationCode', title: 'åºä½', type: 'string', width: 100, align: 'left', }, |
| | | { field: 'palletCode', title: 'æçæ¡ç ', type: 'string', width: 110, align: 'left', }, |
| | | { field: 'isFull', title: 'åºåç±»å', type: 'bool', width: 80, align: 'left', bind: { key: "isFull", data: [{ key: false, value: '空ç' }, { key: true, value: 'å®ç' }] }, }, |
| | | { field: 'linedProcessFeedbackTime', title: 'å·¥èºå¼å§æ¶é´', type: 'string', width: 110, align: 'left', }, |
| | | { field: 'specialParameterDuration', title: 'å·¥èºæ¶é¿', type: 'string', width: 60, align: 'left', sort: true }, |
| | | { field: 'outboundTime', title: 'åºåºåºæ¶é´', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'productionLine', title: 'ç产产线', type: 'string', width: 60, align: 'left', bind: { key: "ProductionLine", data: [] } }, |
| | | { field: 'areaCode', title: 'åºåº', type: 'string', width: 60, align: 'left', bind: { key: "AreaType", data: [] } }, |
| | | { field: 'remark', title: 'çµè¯æ°é', type: 'string', width: 60, align: 'left', }, |
| | | { field: 'creater', title: 'å建人', type: 'string', sort: true, width: 110, align: 'left', hidden: true }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', }, |
| | | { field: 'modifier', title: 'æåä¿®æ¹äºº', type: 'string', sort: true, width: 100, hidden: true, align: 'left' }, |
| | | // { field: 'modifyDate', title: 'æåä¿®æ¹æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, |
| | | ] |
| | | ); |
| | | |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "#detailTable", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "" |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *Authorï¼jxx |
| | | *Contactï¼283591387@qq.com |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wms/taskinfo/Dt_Task.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :table="table" :extend="extend" /> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/widesea_wms/taskinfo/Dt_Task_Hty.jsx"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'taskId', |
| | | footer: "Foots", |
| | | cnName: '产éç»è®¡', |
| | | name: 'taskinfo', |
| | | url: "/Task/Getproductionstatistics", |
| | | sortName: "TaskId" |
| | | }); |
| | | const editFormFields = ref({ |
| | | "taskNum": "", |
| | | "palletCode": "" |
| | | }); |
| | | const editFormOptions = ref([ |
| | | |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | |
| | | |
| | | { "title": "ä»»å¡ç±»å", "field": "taskType", "type": "select", dataKey: "TaskType", data: [] }, |
| | | { "title": "ä»»å¡ç¶æ", "field": "taskState", "type": "select", dataKey: "TaskStatus", data: [] }, |
| | | |
| | | ], |
| | | [ |
| | | { "title": "èµ·å§ä½ç½®", "field": "sourceAddress", type: "text" }, |
| | | { "title": "å½åä½ç½®", "field": "currentAddress", type: "text" }, |
| | | { "title": "ä¸ä¸ä½ç½®", "field": "nextAddress", type: "text" }, |
| | | { "title": "ç®æ ä½ç½®", "field": "targetAddress", type: "text" }, |
| | | ], |
| | | [ |
| | | { "title": "å··é", "field": "roadway", type: "text" }, |
| | | { "title": "ç产产线", "field": "productionLine", type: "select", dataKey: "ProductionLine", data: [] }, |
| | | { "title": "å建人", "field": "creater", type: "text" }, |
| | | { "title": "å建æ¶é´", "field": "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([{ field: 'TaskId', title: '主é®', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'hour', title: 'æ¥æ', type: 'int', width: 110, align: 'left', sort: true }, |
| | | { field: 'count', title: '宿¡åºåº', type: 'string', width: 150, align: 'left' }, |
| | | { field: 'pnboundNo', title: 'åæ®å·', type: 'string', width: 110, align: 'left' ,hidden: true}, |
| | | { field: 'groupID', title: 'åºåID', type: 'int', width: 110, hidden: true, align: 'left' }, |
| | | { field: 'groupDetailId', title: 'ç»çæç»ID', type: 'int', width: 110, hidden: true, align: 'left' }, |
| | | { field: 'roadway', title: 'åº', type: 'string', width: 110, align: 'left' },]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "#detailTable", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "" |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | Status = status; |
| | | } |
| | | public bool Status { get; set; } |
| | | public int total { get; set; } |
| | | |
| | | public int Code { get; set; } |
| | | |
| | | public string Message { get; set; } |
| | | |
| | | public object Data { get; set; } |
| | | public object rows { get; set; } |
| | | |
| | | public string DevMessage { get; set; } |
| | | |
| | |
| | | Data = data; |
| | | return this; |
| | | } |
| | | |
| | | public WebResponseContent OK1(int total1, object data = null,string message = null) |
| | | { |
| | | Status = true; |
| | | total = total1; |
| | | rows = data; |
| | | Data = data; |
| | | Message = message; |
| | | return this; |
| | | } |
| | | public WebResponseContent Error(string message = null) |
| | | { |
| | | Status = false; |
| | |
| | | { |
| | | var cacheType = new List<Type>(); |
| | | |
| | | builder.RegisterType<LogAOP>(); |
| | | cacheType.Add(typeof(LogAOP)); |
| | | //builder.RegisterType<LogAOP>(); |
| | | //cacheType.Add(typeof(LogAOP)); |
| | | |
| | | builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepository<>)).InstancePerDependency();//注åä»å¨ |
| | | builder.RegisterGeneric(typeof(ServiceBase<,>)).As(typeof(IService<>)).InstancePerDependency();//注åæå¡ |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent Getoutput(); |
| | | |
| | | /// <summary> |
| | | /// è·åè¶
æ¶åºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent GetTimeout(); |
| | | |
| | | /// <summary> |
| | | /// è·å产éç»è®¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent Getproductionstatistics(); |
| | | } |
| | |
| | | LocationType = locType, |
| | | Remark = "", |
| | | Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1, |
| | | RoadwayNo = locType > 1 ? $"JZSC{((line - 1) / 4) + 1}" : $"JZSC{((line - 1) / 2) + 1}", |
| | | RoadwayNo = locType > 1 ? $"CHSC{((line - 1) / 4) + 1}" : $"CHSC{((line - 1) / 2) + 1}", |
| | | LocationStatus = LocationEnum.Free.ObjToInt(), |
| | | AreaId = areaId, |
| | | Creater = "System", |
| | |
| | | case (int)TaskOutboundTypeEnum.OutTray: |
| | | case (int)TaskOutboundTypeEnum.Outbound: |
| | | case (int)TaskOutboundTypeEnum.OutNG: |
| | | case (int)TaskOutboundTypeEnum.OutQuality: |
| | | |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", ""); |
| | | return await CompleteStackTaskAsync(task, stock); |
| | |
| | | |
| | | // è·åç»çä¿¡æ¯ |
| | | private DtBoxingInfo CreateBoxingInfo(ResultTrayCellsStatus result, string palletCode) |
| | | { |
| | | var boxing=_boxingInfoRepository.QueryFirst(x=>x.PalletCode== palletCode); |
| | | { |
| | | var boxing=_boxingInfoRepository.QueryFirst(x=>x.PalletCode == palletCode); |
| | | if (boxing == null) |
| | | { |
| | | return new DtBoxingInfo |
| | |
| | | }).ToList() |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | _boxingInfoRepository.DeleteData(boxing); |
| | | return new DtBoxingInfo |
| | | { |
| | |
| | | IsFull = true, |
| | | ProcessCode = result.ProcessCode, |
| | | ProductionLine = result.ProductionLine, |
| | | BoxingInfoDetails = result.SerialNos.Select(serialNoObj => new DtBoxingInfoDetail |
| | | BoxingInfoDetails = result.SerialNos.Select(seriaINoObj => new DtBoxingInfoDetail |
| | | { |
| | | SerialNumber = serialNoObj.SerialNo, |
| | | OrderNo = serialNoObj.PositionNo.ToString(), |
| | | Status = serialNoObj.SerialNoStatus, |
| | | SerialNumber = seriaINoObj.SerialNo, |
| | | OrderNo = seriaINoObj.PositionNo.ToString(), |
| | | Status = seriaINoObj.SerialNoStatus, |
| | | MaterielCode = result.BindCode, |
| | | Remark = result.TrayBarcodePropertys.ToJsonString(), |
| | | }).ToList() |
| | | }; |
| | | } |
| | | |
| | | } |
| | | |
| | | // è·åå·¥èºç³è¯· |
| | |
| | | DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound |
| | | ? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine) |
| | | : await QueryStockInfoForEmptyTrayAsync(areaCode, position); |
| | | |
| | | if (stockInfo == null) |
| | | { |
| | | return content.Error("åºåä¿¡æ¯ä¸åå¨"); |
| | |
| | | } |
| | | else |
| | | { |
| | | task = CreateTask(stockInfo, "1049-1", taskType); |
| | | task = CreateTask(stockInfo, "1049-8", taskType); |
| | | } |
| | | |
| | | } |
| | |
| | | // å建åå²ä»»å¡å®ä¾æ¨¡å |
| | | try |
| | | { |
| | | foreach (object item in key) |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0])); |
| | | if (task == null) |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key)); |
| | | if (task == null) |
| | | { |
| | | return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!"); |
| | | } |
| | | var taskHtyNG = CreateHistoricalTask(task, true); |
| | | |
| | | // æ§è¡æ°æ®åºäºå¡ |
| | | |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0; |
| | | |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete = BaseDal.Delete(task.TaskId); |
| | | return content.Error("æªæ¾å°ä»»å¡ä¿¡æ¯!"); |
| | | } |
| | | var taskHtyNG = CreateHistoricalTask(task, true); |
| | | |
| | | // æ§è¡æ°æ®åºäºå¡ |
| | | |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0; |
| | | |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete = BaseDal.Delete(task.TaskId); |
| | | |
| | | return content.OK("å 餿å!"); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_DTO.MOM; |
| | | using WIDESEA_DTO.WMS; |
| | | using WIDESEA_Model.Models.Basic; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | |
| | |
| | | |
| | | #region ç«è¦åºåº |
| | | |
| | | public WebResponseContent EmergencyTask(object obj) |
| | | public WebResponseContent EmergencyTask(Object obj) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | var emergencyTask = new DTSEmergencyTask(); |
| | | try |
| | | { |
| | | emergencyTask = JsonConvert.DeserializeObject<DTSEmergencyTask>(obj.ToString()); |
| | | |
| | | if (emergencyTask == null) throw new Exception("ç«è¦åæ°ä¸ºç©º"); |
| | | |
| | | string[] strings = emergencyTask.LocationCode.Split("-"); |
| | | |
| | | string[] Roadways = strings[0].Select(x => x.ToString()).ToArray(); |
| | | string Roadway = string.Empty; |
| | | switch (Roadways[0]) |
| | | { |
| | | case "J": |
| | | Roadway = "JZSC" + Roadways[1]; |
| | | break; |
| | | case "G": |
| | | Roadway = "GWSC" + Roadways[1]; |
| | | break; |
| | | case "C": |
| | | Roadway = "CWSC" + Roadways[1]; |
| | | break; |
| | | default: throw new Exception("æªè¯å«åºä½ç¼ç "); |
| | | } |
| | | |
| | | string Roadway = strings[0]; |
| | | //switch (Roadways[0]) |
| | | //{ |
| | | // case "J": |
| | | // Roadway = "JZSC" + Roadways[1]; |
| | | // break; |
| | | // case "G": |
| | | // Roadway = "GWSC" + Roadways[1]; |
| | | // break; |
| | | // case "C": |
| | | // Roadway = "CWSC" + Roadways[1]; |
| | | // break; |
| | | // default: throw new Exception("æªè¯å«åºä½ç¼ç "); |
| | | //} |
| | | int Row = Convert.ToInt16(strings[1]); |
| | | int Column= Convert.ToInt16(strings[2]); |
| | | int Layer= Convert.ToInt16(strings[3]); |
| | | if (!strings[0].Contains("SC")) throw new Exception("æªç¥åºåº"); |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == Convert.ToInt16(strings[1]) && x.Column == Convert.ToInt16(strings[2]) && x.Layer == (i == 0 ? Convert.ToInt16(strings[3]) * 2 - 1 : Convert.ToInt16(strings[3]) * 2) && x.RoadwayNo == Roadway); |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == Row && x.Column == Column && x.Layer == (i == 0 ? Layer - 1 : Layer) && x.RoadwayNo == Roadway); |
| | | if (locationInfo == null) |
| | | { |
| | | throw new Exception("æªç¥åºä½"); |
| | |
| | | |
| | | } |
| | | #endregion |
| | | } |
| | | public WebResponseContent GetTimeout() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var now = DateTime.Now; |
| | | // 使ç¨Subtractæ¹æ³ |
| | | var threeHoursAgo = now.Subtract(TimeSpan.FromHours(3)); |
| | | |
| | | List<DtStockInfo> dtStocks = _stockInfoRepository.Db.Queryable<DtStockInfo>() |
| | | .Where(x => x.OutboundTime < threeHoursAgo).ToList(); |
| | | return content.OK1(total1:dtStocks.Count, data: dtStocks); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | } |
| | | |
| | | } |
| | | public WebResponseContent Getproductionstatistics() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var now = DateTime.Now; |
| | | var thirtyDaysAgo = now.AddDays(-30); |
| | | var roadwayMappings = new Dictionary<string, string> { |
| | | { "JZ", "éç½®åº" }, |
| | | { "CH", "éååº" }, |
| | | { "FR", "å容åº" }, |
| | | { "GW", "髿¸©åº" }, |
| | | { "CW", "常温åº" } |
| | | }; |
| | | |
| | | var roadwayKeys = roadwayMappings.Keys.ToArray(); |
| | | |
| | | var taskHty = _task_HtyRepository.Db.Queryable<Dt_Task_Hty>() |
| | | .Where(it => |
| | | it.CreateDate >= thirtyDaysAgo && |
| | | it.CreateDate <= now && |
| | | it.TaskType == 100 && |
| | | roadwayKeys.Any(rk => it.Roadway.Contains(rk))) |
| | | .ToList() |
| | | .Select(t => new { |
| | | OriginalRoadway = t.Roadway, |
| | | MatchedKey = roadwayKeys.FirstOrDefault(rk => t.Roadway.Contains(rk)), |
| | | CreateDate = t.CreateDate |
| | | }) |
| | | .Where(t => t.MatchedKey != null) |
| | | .GroupBy(t => new { |
| | | RoadwayKey = t.MatchedKey, |
| | | Date = t.CreateDate.Date, |
| | | Hour = t.CreateDate.Hour |
| | | }) |
| | | .OrderByDescending(group => group.Key.Date) |
| | | .ThenByDescending(group => group.Key.Hour) |
| | | .Select(group => new { |
| | | Hour = $"{group.Key.Date:yyyy/M/d} {group.Key.Hour}:00", |
| | | Count = group.Count(), |
| | | Roadway = roadwayMappings[group.Key.RoadwayKey] // æ å°ä¸ºä¸æåç§° |
| | | }) |
| | | .ToList(); |
| | | return content.OK1(total1: taskHty.Count, data: taskHty); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.Getoutput(); |
| | | } |
| | | |
| | | [HttpPost, AllowAnonymous, Route("GetTimeoutgetPageData")] |
| | | public WebResponseContent GetTimeout() |
| | | { |
| | | return Service.GetTimeout(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 产éç»è®¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost,AllowAnonymous,Route("GetproductionstatisticsgetPageData")] |
| | | public WebResponseContent Getproductionstatistics() |
| | | { |
| | | return Service.Getproductionstatistics(); |
| | | } |
| | | } |
| | |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | | //è¿æ¥å符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSDB_BBMain;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_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionStringWCS": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionStringWCS": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionStringWCS": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionStringWCS": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //è·¨å |
| | | "Cors": { |
| | | "PolicyName": "CorsIpAccess", //çç¥åç§° |
| | |
| | | // 注æï¼http://127.0.0.1:1818 å http://localhost:1818 æ¯ä¸ä¸æ ·ç |
| | | "IPs": "http://127.0.0.1:8080,http://localhost:8080,http://127.0.0.1:8081,http://localhost:8081" |
| | | }, |
| | | |
| | | //ç¼å设置 |
| | | "CacheSettings": { |
| | | "UseRedis": false, //å¯ç¨redis |
| | | "RedisSettings": { |
| | | "Address": "127.0.0.1:6379", //å°å |
| | | "Password": "123456", //Redisæå¡å¯ç |
| | | "Db": 9, //é»è®¤åº |
| | | "ClearRedis": true //æ¯å¦æ¯æ¬¡å¯å¨é½æ¸
é¤Redisç¼å |
| | | } |
| | | }, |
| | | |
| | | "ApiName": "WIDESEA", |
| | | "ExpMinutes": 120, |
| | | |
| | | // éè¦ç§»åºçè¡ |
| | | "TransfertRows": "1,4,5,8", |
| | | |
| | | "CacheSettings": { |
| | | "UseRedis": false, |
| | | "RedisSettings": { |
| | | "Address": "127.0.0.1:6379", |
| | | "Password": "123456", |
| | | "Db": 9, |
| | | "ClearRedis": true |
| | | } |
| | | }, |
| | | // å
许åºåºçç¼ç |
| | | "OutBoundMateriel": [ |
| | | { |
| | | "MaterielCode": "CC03040001523", |
| | | "ProductionLine": "ZJ-7", |
| | | "ProcessCode": "CWSC3" |
| | | } |
| | | //{ |
| | | // "MaterielCode": "CC01050001348", |
| | | // "ProductionLine": "ZJ-8", |
| | | // "ProcessCode": "CH001" |
| | | //} |
| | | ] |
| | | } |