| | |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | try |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (task == null) return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ä»»å¡ä¿¡æ¯,ä»»å¡å·:ã{taskNum}ã"); |
| | | if (task == null) return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ä»»å¡ä¿¡æ¯,ä»»å¡å·:ã{taskNum}ã!"); |
| | | return UpdateTaskStatusToNext(task); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | finally |
| | | { |
| | | WriteLog.GetLog("宿任å¡").Write(JsonConvert.SerializeObject(content), "宿任å¡"); |
| | | WriteLog.GetLog("宿任å¡").Write($"æä½äººï¼{(App.User.UserId > 0 ? App.User.UserName : "")}{Environment.NewLine}{JsonConvert.SerializeObject(content)}", "宿任å¡"); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | WriteLog.GetLog("åæ¶ä»»å¡").Write(JsonConvert.SerializeObject(content), "åæ¶ä»»å¡"); |
| | | WriteLog.GetLog("åæ¶ä»»å¡").Write($"æä½äººï¼{(App.User.UserId > 0 ? App.User.UserName : "")}{Environment.NewLine}{JsonConvert.SerializeObject(content)}", "åæ¶ä»»å¡"); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | using HslCommunication; |
| | | using Microsoft.AspNetCore.Components.Routing; |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.Log; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | //Console.WriteLine(nameof(CommonStackerCraneJob) + ":" + ex.ToString()); |
| | | WriteLog.GetLog("å åæºå¼å¸¸").Write($"{nameof(CommonStackerCraneJob)}:{ex.Message}", "å åæºå¼å¸¸"); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | |
| | | for (int i = 0; i < devicePros.Count; i++) |
| | | { |
| | | object readStatus = speStackerCrane.Communicator.ReadAsObj(devicePros[i].DeviceProAddress, devicePros[i].DeviceDataType); |
| | | //todo åè®®æç»ä¿¡æ¯æªè·åå°æ¶æåºå¼å¸¸ |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamName) ?? throw new Exception(); |
| | | deviceProtocolDetail = speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamType && x.ProtocalDetailValue.Equals(readStatus.ToString())); |
| | | if (deviceProtocolDetail != null) |
| | |
| | | /// <summary> |
| | | /// æçå· |
| | | /// </summary> |
| | | [DataLength(25)] |
| | | [DataLength(30)] |
| | | public string Barcode { get; set; } |
| | | #endregion <Public Menber> |
| | | } |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | width: 160, |
| | | align: "left", |
| | | hidden: true, |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | hidden: true, |
| | | }, |
| | | ], |
| | | paginations: { |
| | | sort: "CreateDate", |
| | | order: "desc", |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29å¢å èªå®ä¹å页æ¡å¤§å° |
| | | sizes: [30, 60, 100, 120], |
| | | size: 30, // é»è®¤åé¡µå¤§å° |
| | | Wheres: [], |
| | | page: 1, |
| | | rows: 30, |
| | | }, |
| | | dictionaryList: null, |
| | | }; |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | getDictionary(row, column) { |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.field]); |
| | | console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } |
| | | else { |
| | | return row[column.field]; |
| | | } |
| | | } else { |
| | | return row[column.field]; |
| | | } |
| | | } |
| | | }, |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.field]); |
| | | console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } |
| | | else { |
| | | return row[column.field]; |
| | | } |
| | | } else { |
| | | return row[column.field]; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | |
| | |
| | | let EnableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (EnableBtn) { |
| | | EnableBtn.onClick = function () { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var keys = rows.map(x => { return x.id }); |
| | | this.http |
| | | .post("api/LocationInfo/LocationEnableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | let DisableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (DisableBtn) { |
| | | DisableBtn.onClick = function () { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var keys = rows.map(x => { return x.id }); |
| | | this.http |
| | | .post("api/LocationInfo/LocationDisableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "areaCode", |
| | | title: "åºåç¼å·", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åºä¸»é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{ key: "warehouse", data: [] }, |
| | | }, |
| | | { |
| | | field: "areaCode", |
| | | title: "åºåç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "areaName", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | {title: "èµ·ç¹",required: true,field: "startArea",type: "string",}, |
| | | {title: "ç»ç¹åºåID",required: true,field: "nextArea",type: "string",}, |
| | | {title: "ç»ç¹åºåID",required: true,field: "nextArea",type: "select",dataKey: "areainfo",data: [],}, |
| | | |
| | | ], |
| | | [ |
| | | {title: "è·¯ç±ç±»å",field: "routerType",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | {title: "è·¯ç±ç±»å",field: "routerType",type: "like"}, |
| | | {title: "æ¯å¦ä¸ºç»ç¹",field: "isEnd",type: "select",dataKey: "enable",data: [],} |
| | | ], |
| | | ]); |
| | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | {title: "èµ·ç¹",required: true,field: "startArea",type: "string",}, |
| | | {title: "ç»ç¹åºåID",required: true,field: "nextArea",type: "string",}, |
| | | {title: "ç»ç¹åºåID",field: "nextArea",type: "select",dataKey: "areainfo",data: [],}, |
| | | // {title: "ç»ç¹åºåID",required: true,field: "nextArea",type: "string",}, |
| | | ], |
| | | [ |
| | | {title: "è·¯ç±ç±»å",field: "routerType",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | {title: "è·¯ç±ç±»å",field: "routerType",type: "like"}, |
| | | {title: "æ¯å¦ä¸ºç»ç¹",field: "isEnd",type: "select",dataKey: "enable",data: [],} |
| | | ], |
| | | ]); |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind:{ key: "areainfo", data: [] }, |
| | | }, |
| | | { |
| | | field: "routerType", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | {title: "åºå主é®",required: true,field: "areaId",type: "string",}, |
| | | {title: "ç¼åç¹ç¼å·",required: true,field: "pointCode",type: "string",}, |
| | | {title: "åºå主é®",required: true,field: "areaId",type: "string",}, |
| | | {title: "ç¼åç¹ç¶æ",field: "pointStatus",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | {title: "æ¯å¦ç¦ç¨",field: "enableStatus",type: "select",dataKey: "enableEnum",data: [],}, |
| | | {title: "æ¯å¦ç¦ç¨",field: "enableStatus",type: "select",dataKey: "enableStatusEnum",data: [],}, |
| | | ],[ |
| | | { title: "è¡", field: "row", type: "string" }, |
| | | { title: "å", field: "column", type: "string" }, |
| | |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | {title: "åºå主é®",field: "areaId",type: "string",}, |
| | | {title: "ç¼åç¹ç¼å·",field: "pointCode",type: "string",}, |
| | | {title: "åºå主é®",field: "areaId",type: "select",dataKey: "areainfo",data: [],}, |
| | | {title: "ç¼åç¹ç¶æ",field: "pointStatus",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | {title: "æ¯å¦ç¦ç¨",field: "enableStatus",type: "select",dataKey: "enableEnum",data: [],}, |
| | | {title: "æ¯å¦ç¦ç¨",field: "enableStatus",type: "select",dataKey: "enableStatusEnum",data: [],}, |
| | | ],[ |
| | | { title: "è¡", field: "row", type: "string" }, |
| | | { title: "å", field: "column", type: "string" }, |
| | |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{ key: "areainfo", data: [] }, |
| | | }, |
| | | { |
| | | field: "pointCode", |
| | |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "enableEnum", data: [] }, |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "row", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { |
| | | key: "areainfo", |
| | | data: [] |
| | | } |
| | | bind: {key: "areainfo",data: []} |
| | | }, |
| | | { |
| | | field: "locationCode", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | field: "enalbeStatus", |
| | | type: "string", |
| | | readonly: true, |
| | | }, |
| | | dataKey: "enableStatusEnum", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "å··éç¼å·", field: "roadwayNo", type: "like" }, |
| | | { title: "ä»åºä¸»é®", field: "warehouseId", type: "like" }, |
| | | { title: "ç¦ç¨ç¶æ", field: "enalbeStatus", type: "like" }, |
| | | // { title: "ä»åºä¸»é®", field: "warehouseId", type: "like" }, |
| | | { title: "ç¦ç¨ç¶æ", field: "enableStatus",type: "select",dataKey: "enableStatusEnum",data: [],}, |
| | | { title: "设å¤ç¼å·", field: "deviceNo", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "å
¥åºç«å°ç¼å·", field: "inStationCode", type: "like" }, |
| | | { title: "å åæºå
¥åºç«å°ç¼å·", field: "inSCStationCode", type: "like" }, |
| | | { title: "åºåºç«å°ç¼å·", field: "outStationCode", type: "like" }, |
| | | { |
| | | title: "å åæºåºåºç«å°ç¼å·", |
| | | field: "outSCStationCode", |
| | | type: "like", |
| | | }, |
| | | |
| | | ], |
| | | [ |
| | | { title: "åºåºç«å°ç¼å·", field: "outStationCode", type: "like" }, |
| | | { title: "å åæºåºåºç«å°ç¼å·",field: "outSCStationCode",type: "like",}, |
| | | ] |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åºä¸»é®", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "warehouseId", |
| | | // title: "ä»åºä¸»é®", |
| | | // type: "string", |
| | | // width: 150, |
| | | // align: "left", |
| | | // }, |
| | | { |
| | | field: "enableStatus", |
| | | title: "ç¦ç¨ç¶æ", |
| | | type: "string", |
| | | type: "select", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | |
| | | cnName: "å
¥åºå", |
| | | name: "inboundOrder", |
| | | url: "/InboundOrder/", |
| | | sortName: "id", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | orderType: "", |
| | |
| | | data: [], |
| | | }, |
| | | { title: "å建è
", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datatime" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | cnName: "åºåºå", |
| | | name: "outboundOrder", |
| | | url: "/OutboundOrder/", |
| | | sortName: "id", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | orderType: "", |
| | |
| | | data: [], |
| | | }, |
| | | { title: "å建è
", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datatime" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | cnName: "è´§ä½ç¶æåå¨è®°å½", |
| | | name: "locationStatusChangeRecord", |
| | | url: "/LocationStatusChangeRecord/", |
| | | sortName: "id", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | deviceCode: "", |
| | |
| | | cnName: "åºååå¨ä¿¡æ¯è®°å½", |
| | | name: "stockQuantityChangeRecord", |
| | | url: "/StockQuantityChangeRecord/", |
| | | sortName: "id", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | |
| | |
| | | cnName: "åºåä¿¡æ¯", |
| | | name: "stockInfo", |
| | | url: "/StockInfo/", |
| | | sortName: "id", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | deviceCode: "", |
| | |
| | | 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: "", |
| | | palletCode: "", |
| | | locationCode: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "设å¤ç¼å·", field: "deviceCode" }, |
| | | { title: "设å¤ç±»å", field: "deviceType" }, |
| | | { title: "设å¤ç¶æ", field: "deviceStatus" }, |
| | | { title: "æçç¼å·", field: "palletCode" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | cnName: "åºåè§å¾", |
| | | name: "stockView", |
| | | url: "/stockView/", |
| | | sortName: "stockId", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | palletCode: "", |
| | |
| | | locationName: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "æçç¼å·", |
| | | required: true, |
| | | field: "palletCode", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "è´§ä½ç¼å·", |
| | | required: true, |
| | | field: "locationCode", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "è´§ä½åç§°", |
| | | required: true, |
| | | field: "locationName", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | |
| | | [ |
| | | { title: "æçç¼å·", field: "palletCode" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode" }, |
| | | { title: "è´§ä½ç¶æ", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],}, |
| | | { title: "åºåç¶æ", field: "stockStatus" ,type: "selectList",dataKey: "stockStatusEmun",data: [],}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { |
| | | title: "ä»»å¡ç±»å", |
| | | field: "taskType", |
| | | type: "selectList", |
| | | dataKey: "taskTypeEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "ä»»å¡ç¶æ", |
| | | field: "taskStatus", |
| | | type: "selectList", |
| | | dataKey: "taskStatusEnum", |
| | | data: [], |
| | | }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskTypeEnum",data: [],}, |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { |
| | | title: "ä»»å¡ç±»å", |
| | | field: "taskType", |
| | | type: "selectList", |
| | | dataKey: "taskTypeEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "ä»»å¡ç¶æ", |
| | | field: "taskStatus", |
| | | type: "selectList", |
| | | dataKey: "taskStatusEnum", |
| | | data: [], |
| | | }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskTypeEnum",data: [],}, |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "depth", |
| | | title: "深度", |
| | | type: "int", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | |
| | | List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | x.EnableStatus = EnableStatusEnum.Normal.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(locationInfos); |
| | | |
| | |
| | | List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | x.EnableStatus = EnableStatusEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(locationInfos); |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("æªæ¾å°è¯¥ç«å°å¯¹åºçå··éï¼è¯·æ£æ¥åºç¡é
置信æ¯"); |
| | | Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("æªæ¾å°è¯¥ç«å°å¯¹åºçå··éï¼è¯·æ£æ¥åºç¡é
置信æ¯!"); |
| | | if (roadwayInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt() && roadwayInfo.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt()) |
| | | { |
| | | throw new Exception("该巷éä¸å¯å
¥åºï¼è¯·æ£æ¥å··éç¦ç¨ä¿¡æ¯"); |
| | | throw new Exception("该巷éä¸å¯å
¥åºï¼è¯·æ£æ¥å··éç¦ç¨ä¿¡æ¯!"); |
| | | } |
| | | if (roadwayInfo.AreaId > 0) |
| | | { |
| | | Dt_AreaInfo areaInfo = _basicRepository.AreaInfoRepository.QueryFirst(x => x.Id == roadwayInfo.AreaId); |
| | | if (areaInfo != null && areaInfo.AreaStatus == EnableEnum.Disable.ObjToInt()) |
| | | { |
| | | throw new Exception("åºå被ç¦ç¨ï¼ä¸å¯å
¥åº"); |
| | | throw new Exception("åºå被ç¦ç¨ï¼ä¸å¯å
¥åº!"); |
| | | } |
| | | } |
| | | if (inboundType == TaskTypeEnum.PalletInbound.ObjToInt())//空çå
¥åºåé
é»è¾ |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw new Exception(ex.Message); |
| | | } |
| | | |
| | | return null; |
| | |
| | | List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Pallet); |
| | | if (locationGroups != null && locationGroups.Count > 0) |
| | | { |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()|| x.EnableStatusA == EnableStatusEnum.OnlyIn.ObjToInt()); |
| | | int id = locationGroup?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free); |
| | | if (locationGroups != null && locationGroups.Count > 0) |
| | | { |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()||x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt()); |
| | | int id = locationGroup?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy); |
| | | return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()||x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | private Dt_LocationInfo StoredAssignLocation(string roadway) |
| | |
| | | |
| | | public Dt_LocationInfo AdjacentDepthLocation(string locationCode) |
| | | { |
| | | Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.LocationCode == locationCode); |
| | | return AdjacentDepthLocation(locationInfo); |
| | | return AdjacentDepthLocation(BaseDal.QueryFirst(x => x.LocationCode == locationCode)); |
| | | } |
| | | |
| | | public Dt_LocationInfo AdjacentDepthLocation(Dt_LocationInfo locationInfo) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1)); |
| | | return BaseDal.QueryFirst(x => x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1)); |
| | | } |
| | | public void UpdateLocationLock(Dt_LocationInfo locations, int TaskNum,int changType,bool black) |
| | | { |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | throw new Exception(ex.Message); |
| | | } |
| | | |
| | | } |
| | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result, beforeStatusEnd, changType, "", TaskNum); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (result != null&&(result.LocationStatus== LocationStatusEnum.Lock.ObjToInt()|| result.LocationStatus==LocationStatusEnum.PalletLock.ObjToInt())) |
| | | { |
| | | int beforeStatusEnd = result.LocationStatus; |
| | | |
| | | result.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | |
| | | BaseDal.UpdateData(result); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result, beforeStatusEnd, changType, "", TaskNum); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | throw new Exception(ex.Message); |
| | | } |
| | | |
| | | } |
| | | public Dt_LocationInfo isDepth(Dt_LocationInfo locationInfo) |
| | | { |
| | | if (locationInfo.Depth == 2) |
| | | try |
| | | { |
| | | return AdjacentDepthLocation(locationInfo.LocationCode); |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | return AdjacentDepthLocation(locationInfo.LocationCode); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | catch (Exception ex) |
| | | { |
| | | return null; |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum) |
| | | { |
| | | int beforeStartStatus = locationInfo.LocationStatus; |
| | | int beforeEndStatus = locationInfos.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | |
| | | if (beforeStartStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | try |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | int beforeStartStatus = locationInfo.LocationStatus; |
| | | int beforeEndStatus = locationInfos.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | |
| | | if (beforeStartStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | } |
| | | |
| | | BaseDal.UpdateData(locationInfo); |
| | | BaseDal.UpdateData(locationInfos); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStartStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | } |
| | | |
| | | BaseDal.UpdateData(locationInfo); |
| | | BaseDal.UpdateData(locationInfos); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStartStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | public void RelocationFree(Dt_LocationInfo locations, int TaskNum) |
| | | { |
| | | int beforeEndStatus = locations.LocationStatus; |
| | | |
| | | if(locations.LocationStatus== LocationStatusEnum.Lock.ObjToInt()) |
| | | try |
| | | { |
| | | locations.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | int beforeEndStatus = locations.LocationStatus; |
| | | |
| | | if (locations.LocationStatus == LocationStatusEnum.Lock.ObjToInt()) |
| | | { |
| | | locations.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | locations.LocationStatus = LocationStatusEnum.Pallet.ObjToInt(); |
| | | } |
| | | |
| | | |
| | | BaseDal.UpdateData(locations); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locations, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | } |
| | | else |
| | | catch (Exception ex) |
| | | { |
| | | locations.LocationStatus = LocationStatusEnum.Pallet.ObjToInt(); |
| | | throw new Exception(ex.Message); |
| | | } |
| | | |
| | | |
| | | BaseDal.UpdateData(locations); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locations, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (propertyInfo.Name == nameof(BaseEntity.Modifier)) |
| | | { |
| | | propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : App.User.UserId.ToString()); |
| | | propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : "System"); |
| | | } |
| | | else if (propertyInfo.Name == nameof(BaseEntity.ModifyDate)) |
| | | { |
| | |
| | | { |
| | | if (propertyInfo.Name == nameof(BaseEntity.Modifier)) |
| | | { |
| | | propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : App.User.UserId.ToString()); |
| | | propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : "System"); |
| | | } |
| | | else if (propertyInfo.Name == nameof(BaseEntity.ModifyDate)) |
| | | { |
| | |
| | | else if (inboundOrder.OrderStatus == InboundStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | inboundOrder.OrderStatus = InboundStatusEnum.å
¥åºä¸.ObjToInt(); |
| | | for (int i = 0; i < inboundOrderDetails.Count; i++) |
| | | { |
| | | _inboundOrderDetailService.Repository.DeleteAndMoveIntoHty(inboundOrderDetails[i], App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | } |
| | | } |
| | | |
| | | content = MaterielGroupUpdateData(inboundOrder, inboundOrderDetails, stockInfo); |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_LocationStatusChangeRecord> location=BaseDal.QueryData(x=>x.LocationId== id).ToList(); |
| | | List<Dt_LocationStatusChangeRecord> location=BaseDal.QueryData(x=>x.LocationId== id).OrderByDescending(x=>x.CreateDate).ToList(); |
| | | |
| | | return content = WebResponseContent.Instance.OK(data: location); |
| | | } |
| | |
| | | { |
| | | public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType,int taskNum) |
| | | { |
| | | List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>(); |
| | | stockQuantityChangeRecords = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(stockInfoDetails); |
| | | int index = 0; |
| | | decimal currentQuantity = 0; |
| | | stockQuantityChangeRecords.ForEach(x => |
| | | { |
| | | x.PalleCode = stockInfo.PalletCode; |
| | | x.BeforeQuantity = beforeQuantity; |
| | | if (totalQuantity > beforeQuantity) |
| | | try |
| | | { |
| | | List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>(); |
| | | stockQuantityChangeRecords = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(stockInfoDetails); |
| | | int index = 0; |
| | | decimal currentQuantity = 0; |
| | | stockQuantityChangeRecords.ForEach(x => |
| | | { |
| | | x.ChangeQuantity = stockInfoDetails[index].StockQuantity; |
| | | currentQuantity += stockInfoDetails[index].StockQuantity; |
| | | x.AfterQuantity = stockInfoDetails[index].StockQuantity + beforeQuantity; |
| | | } |
| | | else |
| | | { |
| | | x.ChangeQuantity = -stockInfoDetails[index].StockQuantity; |
| | | currentQuantity -= stockInfoDetails[index].StockQuantity; |
| | | x.AfterQuantity = beforeQuantity - stockInfoDetails[index].StockQuantity; |
| | | } |
| | | x.PalleCode = stockInfo.PalletCode; |
| | | x.BeforeQuantity = beforeQuantity; |
| | | if (totalQuantity > beforeQuantity) |
| | | { |
| | | x.ChangeQuantity = stockInfoDetails[index].StockQuantity; |
| | | currentQuantity += stockInfoDetails[index].StockQuantity; |
| | | x.AfterQuantity = stockInfoDetails[index].StockQuantity + beforeQuantity; |
| | | } |
| | | else |
| | | { |
| | | x.ChangeQuantity = -stockInfoDetails[index].StockQuantity; |
| | | currentQuantity -= stockInfoDetails[index].StockQuantity; |
| | | x.AfterQuantity = beforeQuantity - stockInfoDetails[index].StockQuantity; |
| | | } |
| | | |
| | | x.ChangeType = changeType.ObjToInt(); |
| | | beforeQuantity += x.ChangeQuantity; |
| | | x.TaskNum = taskNum; |
| | | }); |
| | | BaseDal.AddData(stockQuantityChangeRecords); |
| | | x.ChangeType = changeType.ObjToInt(); |
| | | beforeQuantity += x.ChangeQuantity; |
| | | x.TaskNum = taskNum; |
| | | }); |
| | | BaseDal.AddData(stockQuantityChangeRecords); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | SourceAddress = outTask.TargetAddress, |
| | | TargetAddress = cachePoint.PointCode, |
| | | SourceKey = outTask.TaskId, |
| | | //TaskNum = outTask.TaskNum, |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(), |
| | | TaskType = TaskTypeEnum.AGVCarry.ObjToInt(), |
| | |
| | | Dt_AreaRouter areaRouter = _basicService.AreaRouterService.Repository.QueryFirst(x => x.StartArea == startPoint); |
| | | if (areaRouter == null) |
| | | { |
| | | throw new Exception("æªæ¾å°è·¯ç±ä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°è·¯ç±ä¿¡æ¯!"); |
| | | } |
| | | Dt_AreaInfo areaInfo = _basicService.AreaInfoService.Repository.QueryFirst(x => x.AreaCode == areaRouter.NextArea); |
| | | if (areaInfo == null) |
| | | { |
| | | throw new Exception("æªæ¾å°ä¸ä¸åºåä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°ä¸ä¸åºåä¿¡æ¯!"); |
| | | } |
| | | |
| | | Dt_CachePoint? cachePoint = _basicService.CachePointService.AssignCachePoint(areaInfo.Id); |
| | | if (cachePoint == null) |
| | | { |
| | | throw new Exception("æªæ¾å°ç©ºé²ç¼åç¹"); |
| | | throw new Exception("æªæ¾å°ç©ºé²ç¼åç¹!"); |
| | | } |
| | | |
| | | return cachePoint; |
| | |
| | | Dt_AreaRouter areaRouter = _basicService.AreaRouterService.Repository.QueryFirst(x => x.NextArea == endPoint); |
| | | if (areaRouter == null) |
| | | { |
| | | throw new Exception("æªæ¾å°è·¯ç±ä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°è·¯ç±ä¿¡æ¯!"); |
| | | } |
| | | Dt_AreaInfo areaInfo = _basicService.AreaInfoService.Repository.QueryFirst(x => x.AreaCode == areaRouter.StartArea); |
| | | if (areaInfo == null) |
| | | { |
| | | throw new Exception("æªæ¾å°èµ·ç¹ç¼ååºåä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°èµ·ç¹ç¼ååºåä¿¡æ¯!"); |
| | | } |
| | | |
| | | Dt_CachePoint? cachePoint = _basicService.CachePointService.GetIbStockCachePoint(areaInfo.Id); |
| | | if (cachePoint == null) |
| | | { |
| | | throw new Exception("æªæ¾å°æè´§ç¼åç¹"); |
| | | throw new Exception("æªæ¾å°æè´§ç¼åç¹!"); |
| | | } |
| | | return cachePoint; |
| | | } |
| | |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(model.Task_id)); |
| | | if (task == null) |
| | | { |
| | | return new { code = 404, message = "æªæ¾å°è¯¥ä»»å¡" }; |
| | | return new { code = 404, message = "æªæ¾å°è¯¥ä»»å¡!" }; |
| | | } |
| | | |
| | | Dt_CachePoint startCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == task.SourceAddress); |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error("æªæ¾å°è¯¥ä»»å¡ç±»åä¸å¡"); |
| | | } |
| | | return WebResponseContent.Instance.Error("é误"); |
| | | return WebResponseContent.Instance.Error($"é误"); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | content = WebResponseContent.Instance.Error($"{ex.Message}"); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | content = WebResponseContent.Instance.Error($"{ex.Message}"); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType); |
| | | //Dt_LocationInfo dt_LocationInfo = null; |
| | | if (locationInfo != null) |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | Dt_Task task = new() |
| | | { |
| | | CurrentAddress = stationCode, |
| | |
| | | BaseDal.AddData(task); |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | |
| | | |
| | | if (isUpdateStock) |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | |
| | | } |
| | | } |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | |
| | | tasks.Add(task); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum); |
| | | |
| | | var response = HttpHelper.Post<WebResponseContent>(url + "ReceiveTask/", tasks, "å
¥åºä»»å¡ä¸å"); |
| | | if (!response.Status) |
| | | { |
| | |
| | | { |
| | | if (BaseDal.QueryFirst(x => x.PalletCode == palletCode) != null) |
| | | { |
| | | return (false, "该æçå·å·²æä»»å¡"); |
| | | return (false, "该æçå·å·²æä»»å¡!"); |
| | | } |
| | | if (BaseDal.QueryFirst(x => (x.SourceAddress == stationCode || x.CurrentAddress == stationCode) && x.TaskStatus == InTaskStatusEnum.InNew.ObjToInt()) != null) |
| | | { |
| | | return (false, "å½åå
¥åºç«å°å·²æä¸æ¡æ°å»ºä»»å¡"); |
| | | return (false, "å½åå
¥åºç«å°å·²æä¸æ¡æ°å»ºä»»å¡!"); |
| | | } |
| | | if (isCheckStock) |
| | | { |
| | | if (stockInfo == null) |
| | | { |
| | | return (false, "æªæ¾å°ç»çä¿¡æ¯"); |
| | | return (false, "æªæ¾å°ç»çä¿¡æ¯!"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt()) |
| | | { |
| | | return (false, "该ç»çç¶æä¸å¯å
¥åº"); |
| | | return (false, "该ç»çç¶æä¸å¯å
¥åº!"); |
| | | } |
| | | if (!string.IsNullOrEmpty(stockInfo.LocationCode)) |
| | | { |
| | | return (false, "该æçå·²ç»å®è´§ä½"); |
| | | return (false, "该æçå·²ç»å®è´§ä½!"); |
| | | } |
| | | if (stockInfo.Details == null || stockInfo.Details.Count == 0) |
| | | { |
| | | return (false, "没æåºåæç»ä¿¡æ¯"); |
| | | return (false, "没æåºåæç»ä¿¡æ¯!"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (_stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null) |
| | | { |
| | | return (false, "该æçå·²åå¨åºå
"); |
| | | return (false, "该æçå·²åå¨åºå
!"); |
| | | } |
| | | } |
| | | |
| | | return (true, "æå"); |
| | | return (true, "æå!"); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | if (outboundOrderDetail == null) |
| | | { |
| | | throw new Exception("æªæ¾å°åºåºåæç»ä¿¡æ¯"); |
| | | throw new Exception("æªæ¾å°åºåºåæç»ä¿¡æ¯!"); |
| | | } |
| | | |
| | | if (stockSelectViews.Sum(x => x.UseableQuantity) > outboundOrderDetail.OrderQuantity - outboundOrderDetail.LockQuantity) |
| | | { |
| | | throw new Exception("éæ©æ°éè¶
åºåæ®æ°é"); |
| | | throw new Exception("éæ©æ°éè¶
åºåæ®æ°é!"); |
| | | } |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | Dt_OutboundOrderDetail? orderDetail = null; |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | throw new Exception("æ åºå!"); |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | return WebResponseContent.Instance.Error($"{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | |
| | | return WebResponseContent.Instance.Error(response.Message); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content=responseContent; |
| | | return content = responseContent; |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content=responseContent; |
| | | return content = responseContent; |
| | | } |
| | | } |
| | | return content=WebResponseContent.Instance.Error("æªæ¾å°ä»»å¡ç±»å对åºä¸å¡å¤çé»è¾"); |
| | | return content = WebResponseContent.Instance.Error("æªæ¾å°ä»»å¡ç±»å对åºä¸å¡å¤çé»è¾"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content=WebResponseContent.Instance.Error(ex.Message); |
| | | return content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | WriteLog.GetLog("ä»»å¡å®æ").Write(JsonConvert.SerializeObject(content), "ä»»å¡å®æ"); |
| | | WriteLog.GetLog("ä»»å¡å®æ").Write($"æä½äººï¼{(App.User.UserId>0? App.User.UserName: "System")}{ Environment.NewLine}{ JsonConvert.SerializeObject(content)}", "ä»»å¡å®æ"); |
| | | } |
| | | } |
| | | public WebResponseContent TaskCancel(int taskNum) |
| | |
| | | } |
| | | finally |
| | | { |
| | | WriteLog.GetLog("ä»»å¡åæ¶").Write(JsonConvert.SerializeObject(content), "ä»»å¡åæ¶"); |
| | | WriteLog.GetLog("ä»»å¡åæ¶").Write($"æä½äººï¼{(App.User.UserId > 0 ? App.User.UserName : "System")}{Environment.NewLine}{JsonConvert.SerializeObject(content)}", "ä»»å¡åæ¶"); |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent UpdateTaskStatus(int taskNum) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | |
| | | { |
| | | throw new Exception($"ä»»å¡ç±»åé误,æªæ¾å°è¯¥ä»»å¡ç±»å,ä»»å¡å·:ã{task.TaskNum}ã,ä»»å¡ç±»å:ã{task.TaskType}ã"); |
| | | } |
| | | return WebResponseContent.Instance.Error("æªæ¾å°ä»»å¡ç±»å对åºä¸å¡å¤çé»è¾"); |
| | | _unitOfWorkManage.BeginTran(); |
| | | task.Dispatchertime = DateTime.Now; |
| | | task.ModifyDate = DateTime.Now; |
| | | task.Modifier = "System"; |
| | | BaseDal.UpdateData(task); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content = WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | |
| | | PalletCode = task.PalletCode, |
| | | LocationCode = task.TargetAddress, |
| | | StockStatus = StockStatusEmun.å·²å
¥åº.ObjToInt(), |
| | | Creater = App.User.UserId > 0 ? "" : "System", |
| | | Creater = App.User.UserId > 0 ? App.User.UserName : "System", |
| | | CreateDate = App.User.UserId > 0 ? DateTime.Now : DateTime.Now, |
| | | }; |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); |
| | | |
| | | CheckCompleted(stockInfo, locationInfo); |
| | | |
| | | |
| | | _stockService.StockInfoService.Repository.AddData(stockInfo); |
| | | |
| | |
| | | stockInfo.StockStatus = StockStatusEmun.åºåºå®æ.ObjToInt(); |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | if (task.Depth != 1) |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (!DepthTask(task)) |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | if (DepthTask(locationInfo) == false) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | //_basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | } |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | |
| | | beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) - beforeQuantity, StockChangeType.Outbound,task.TaskNum); |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) - beforeQuantity, StockChangeType.Outbound, task.TaskNum); |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | return OnOutboundTaskCompleted?.Invoke(task) ?? WebResponseContent.Instance.OK(); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (DepthTask(locationInfo) == false) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | } |
| | | } |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | |
| | | task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode); |
| | | |
| | | Dt_LocationInfo locationEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); |
| | | Dt_LocationInfo locationStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | | |
| | | CheckCompleted(stockInfo, locationEnd); |
| | | |
| | | stockInfo.LocationCode = locationEnd.LocationCode; |
| | | stockInfo.StockStatus = StockStatusEmun.å·²å
¥åº.ObjToInt(); |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | |
| | | if (locationStart.Depth == 1) |
| | | { |
| | | if (DepthTask(locationStart) == false) |
| | | { |
| | | locationStart.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.RelocationFree(locationEnd, task.TaskNum); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationStart); |
| | | } |
| | | else |
| | | { |
| | | locationStart.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationStart); |
| | | } |
| | | } |
| | | |
| | | _basicService.LocationInfoService.RelocationFree(locationEnd, task.TaskNum); |
| | | |
| | |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false); |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | } |
| | | |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | task.TaskStatus = InTaskStatusEnum.InCancel.ObjToInt(); |
| | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | } |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | task.TaskStatus = InTaskStatusEnum.InCancel.ObjToInt(); |
| | |
| | | _stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetail); |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (DepthTask(locationInfo) == false) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), true); |
| | | } |
| | | } |
| | | locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (DepthTask(locationInfo) == false) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), true); |
| | | } |
| | | } |
| | | locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt(); |
| | | //_basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), true); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | stockInfo.StockStatus = StockStatusEmun.å·²å
¥åº.ObjToInt(); |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public bool DepthTask(Dt_Task task) |
| | | public bool DepthTask(Dt_LocationInfo location) |
| | | { |
| | | Dt_LocationInfo location=_locationInfoService.Repository.QueryFirst(x=>x.LocationCode == task.SourceAddress); |
| | | if(location != null) |
| | | if (location != null ) |
| | | { |
| | | if(location.Row%2==0) |
| | | Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.RoadwayNo == location.RoadwayNo && x.Column == location.Column && x.Layer == location.Layer && x.Depth != location.Depth && x.Row != location.Row && (SqlFunc.Abs(x.Row - location.Row) == 1)); |
| | | if (locations != null) |
| | | { |
| | | Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.Row == location.Row - 1 && x.Layer == location.Layer && x.Column == location.Column && x.RoadwayNo == location.RoadwayNo); |
| | | Dt_Task tasks=BaseDal.QueryFirst(x=>x.SourceAddress == locations.LocationCode); |
| | | return tasks != null ? true : false; |
| | | } |
| | | else |
| | | { |
| | | Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.Row == location.Row + 1 && x.Layer == location.Layer && x.Column == location.Column && x.RoadwayNo == location.RoadwayNo); |
| | | Dt_Task tasks = BaseDal.QueryFirst(x => x.SourceAddress == locations.LocationCode); |
| | | return tasks != null ? true : false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | public WebResponseContent GetTaskInfo() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | } |
| | | |
| | | [HttpGet(), Route("AreaEnableStatus")] |
| | | public WebResponseContent AreaEnableStatus(int key) |
| | | public WebResponseContent AreaEnableStatus([FromBody] int key) |
| | | { |
| | | return Service.AreaEnableStatus(key); |
| | | } |
| | | |
| | | [HttpGet, Route("AreaDisableStatus")] |
| | | public WebResponseContent AreaDisableStatus(int key) |
| | | public WebResponseContent AreaDisableStatus([FromBody] int key) |
| | | { |
| | | return Service.AreaDisableStatus(key); |
| | | } |
| | |
| | | return locations; |
| | | } |
| | | [HttpPost, Route("LocationEnableStatus")] |
| | | public WebResponseContent LocationEnableStatus(int[] keys) |
| | | public WebResponseContent LocationEnableStatus([FromBody] int[] keys) |
| | | { |
| | | return Service.LocationEnableStatus(keys); ; |
| | | } |
| | | [HttpPost, Route("LocationDisableStatus")] |
| | | public WebResponseContent LocationDisableStatus(int[] keys) |
| | | public WebResponseContent LocationDisableStatus([FromBody] int[] keys) |
| | | { |
| | | return Service.LocationDisableStatus(keys); ; |
| | | } |