| | |
| | | onClick: function () { |
| | | // this.FinishWorkOrder(); |
| | | } |
| | | }, { |
| | | name: "åºåºå¤å", |
| | | icon: 'el-icon-check', |
| | | type: 'danger', |
| | | plain: true, |
| | | value: 'OutsorcingBtn', |
| | | onClick: function () { |
| | | // this.FinishWorkOrder(); |
| | | } |
| | | } |
| | | // , { |
| | | // name: "æ°æ®ç»æ", |
| | |
| | | // x.icon= 'el-icon-check' |
| | | // } |
| | | // }); |
| | | let OutsorcingBtn = this.buttons.find(r => r.name == "åºåºå¤å"); |
| | | if(null!=OutsorcingBtn){ |
| | | OutsorcingBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©å·¥å!"); |
| | | let addkeys = rows.map(x => { |
| | | return x[this.table.key]; |
| | | }); |
| | | if (!addkeys || addkeys.Length == 0) return this.$error("æªè·åå°å·¥å!"); |
| | | this.$confirm("æ¯å¦ç¡®è®¤è¦åºåºå¤åï¼","æç¤º",{ |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText:"确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(()=>{ |
| | | let params = { |
| | | MainData: null, |
| | | DetailData: null, |
| | | DelKeys: addkeys |
| | | } |
| | | this.http.post("/api/dt_mes_head/OutsorcingWorkOrder", params, "æ£å¨å¤çå·¥å....").then(x => { |
| | | if (!x.status) return this.$error(x.message); |
| | | this.$success("å¤çå·¥åæå!"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | let CompleteBtn = this.buttons.find(r => r.name == "宿工å"); |
| | | if(null!=CompleteBtn){ |
| | | CompleteBtn.onClick = function (){ |
| | |
| | | }); |
| | | const editFormFields = ref({"skip_op_1":"","skip_op_2":"","skip_op_3":""}); |
| | | const editFormOptions = ref([ |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ1", "required": true, "field": "skip_op_1", "type": "select" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ2", "required": true, "field": "skip_op_2", "type": "select" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "å·é²éæ¶²", "required": true, "field": "skip_op_3", "type": "select" }] |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ1", "required": true, "field": "skip_op_1", "type": "radio" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ2", "required": true, "field": "skip_op_2", "type": "radio" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "å·é²éæ¶²", "required": true, "field": "skip_op_3", "type": "radio" }], |
| | | // [{ |
| | | // title: "æå®åºåº", field: "area", |
| | | // data: [ |
| | | // { key: 9, value: "å¤ååº" }, |
| | | // { key: 2, value: "åºåº2" }, |
| | | // { key: 3, value: "åºåº3" }, |
| | | // { key: 4, value: "åºåº4" }, |
| | | // //{ key: 3, value: "ä¸å
许" }, |
| | | // ] |
| | | // , type: "radio"//type: "select" |
| | | // }], |
| | | ]); |
| | | const searchFormFields = ref({"jobID":"","processCode":"","CreateTime":""}); |
| | | const searchFormOptions = ref([ |
| | | [{"title":"å·¥åç¼å·","field":"jobID","type":"like"},{"dataKey":"WorkTypes","data":[],"title":"å·¥åç±»å","field":"processCode","type":"select"}], |
| | | [{"title":"å·¥ä½ä»¤å·","field":"workOrder","type":"like"},{"title":"å·¥åç¼å·","field":"jobID","type":"like"},{"dataKey":"WorkTypes","data":[],"title":"å·¥åç±»å","field":"processCode","type":"select"}], |
| | | [{"title":"å¾å·","field":"drawingNo","type":"like"},{"title":"å建æ¶é´","field":"CreateTime","type":"datetime"}] |
| | | ]); |
| | | const columns = ref([{field:'mes_id',title:'mes_id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'}, |
| | |
| | | {field:'skip_op_1',title:'è§è§æ£æµ1',type:'bool',bind:{ key:'skip_op_Status',data:[]},width:110,require:true,align:'left'}, |
| | | {field:'skip_op_2',title:'è§è§æ£æµ2',type:'bool',bind:{ key:'skip_op_Status',data:[]},width:110,require:true,align:'left'}, |
| | | {field:'skip_op_3',title:'å·é²éæ¶²',type:'bool',bind:{ key:'skip_op_Status',data:[]},width:110,require:true,align:'left'}, |
| | | // {field:'area',title:'å
¥åºåºåº',type:'string',width:110,align:'left'}, |
| | | {field:'area',title:'æå®åºåº',type:'string',width:110,align:'left'}, |
| | | {field:'typeID',title:'è½®å代ç ',type:'string',width:110,align:'left'}, |
| | | {field:'stackNoRange',title:'æå
æ°é',type:'int',width:110,align:'left'}, |
| | | {field:'maxDiameterDiff',title:'è½®å¾åå·®',type:'decimal',width:110,align:'left'}, |
| | |
| | | ///çå· |
| | | /// </summary> |
| | | [Display(Name = "çå·")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName = "nvarchar(50)")] |
| | | [MaxLength(255)] |
| | | [Column(TypeName = "nvarchar(255)")] |
| | | public string heatNumber { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | [MaxLength(100)] |
| | | [Column(TypeName = "nvarchar(100)")] |
| | | public string tray_type { get; set; } |
| | | |
| | | /// <summary> |
| | | ///é¢å¯å· |
| | | /// </summary> |
| | | [Display(Name = "é¢å¯å·")] |
| | | [MaxLength(255)] |
| | | [Column(TypeName = "nvarchar(255)")] |
| | | public string billetID { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_Entity.DomainModels |
| | | { |
| | | [Entity(TableCnName = "å·¥åè§å¾",TableName = "VV_Mes_Workinfo")] |
| | | public partial class VV_Mes_Workinfo:BaseEntity |
| | | [Entity(TableCnName = "å·¥åè§å¾", TableName = "VV_Mes_Workinfo")] |
| | | public partial class VV_Mes_Workinfo : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="jobID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName="nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string jobID { get; set; } |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "jobID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName = "nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string jobID { get; set; } |
| | | |
| | | /// <summary> |
| | | ///çå· |
| | | /// </summary> |
| | | [Display(Name ="heatID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string heatID { get; set; } |
| | | /// <summary> |
| | | ///çå· |
| | | /// </summary> |
| | | [Display(Name = "heatID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string heatID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="billetID")] |
| | | [Column(TypeName="int")] |
| | | [Editable(true)] |
| | | public int? billetID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "billetID")] |
| | | [Column(TypeName = "int")] |
| | | [Editable(true)] |
| | | public int? billetID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="SN")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName="nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string SN { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "SN")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName = "nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string SN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="heatBatchID")] |
| | | [MaxLength(30)] |
| | | [Column(TypeName="nvarchar(30)")] |
| | | [Editable(true)] |
| | | public string heatBatchID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "heatBatchID")] |
| | | [MaxLength(30)] |
| | | [Column(TypeName = "nvarchar(30)")] |
| | | [Editable(true)] |
| | | public string heatBatchID { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å·¥ä½ä»¤å· |
| | | /// </summary> |
| | | [Display(Name ="workOrder")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName="nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string workOrder { get; set; } |
| | | /// <summary> |
| | | ///å·¥ä½ä»¤å· |
| | | /// </summary> |
| | | [Display(Name = "workOrder")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName = "nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string workOrder { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="reqID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName="nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string reqID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "reqID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName = "nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string reqID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="reqIDLineNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string reqIDLineNo { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "reqIDLineNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string reqIDLineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="materialCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string materialCode { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "materialCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string materialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å¾å· |
| | | /// </summary> |
| | | [Display(Name ="drawingNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string drawingNo { get; set; } |
| | | /// <summary> |
| | | ///å¾å· |
| | | /// </summary> |
| | | [Display(Name = "drawingNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string drawingNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="drawingNoVer")] |
| | | [MaxLength(10)] |
| | | [Column(TypeName="nvarchar(10)")] |
| | | [Editable(true)] |
| | | public string drawingNoVer { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "drawingNoVer")] |
| | | [MaxLength(10)] |
| | | [Column(TypeName = "nvarchar(10)")] |
| | | [Editable(true)] |
| | | public string drawingNoVer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="productName")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName="nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string productName { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "productName")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName = "nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string productName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="quantity")] |
| | | [Column(TypeName="int")] |
| | | [Editable(true)] |
| | | public int quantity { get; set; } |
| | | /// <summary> |
| | | ///åºåº |
| | | /// </summary> |
| | | [Display(Name = "åºåº")] |
| | | [MaxLength(15)] |
| | | [Column(TypeName = "nvarchar(15)")] |
| | | public string area { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="typeID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string typeID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "quantity")] |
| | | [Column(TypeName = "int")] |
| | | [Editable(true)] |
| | | public int quantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Key] |
| | | [Display(Name ="stackNoRange")] |
| | | [Column(TypeName="int")] |
| | | [Editable(true)] |
| | | [Required(AllowEmptyStrings=false)] |
| | | public int stackNoRange { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "typeID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string typeID { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å·¥åç±»å (17-æºå å·¥ 28-æ£æµçº¿ 101ç§»åºå¤å) |
| | | /// </summary> |
| | | [Display(Name ="processCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string processCode { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Key] |
| | | [Display(Name = "stackNoRange")] |
| | | [Column(TypeName = "int")] |
| | | [Editable(true)] |
| | | [Required(AllowEmptyStrings = false)] |
| | | public int stackNoRange { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å·¥åç±»å (17-æºå å·¥ 28-æ£æµçº¿ 101ç§»åºå¤å) |
| | | /// </summary> |
| | | [Display(Name = "processCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string processCode { get; set; } |
| | | |
| | | /// <summary> |
| | | ///宿æ°é |
| | |
| | | { |
| | | var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == name).ToList(); |
| | | |
| | | var NGStation = "X01001003"; |
| | | if (name == "2åå
䏿åº") NGStation = "X02001003"; |
| | | if (name == "3åå
䏿åº") NGStation = "X03001002"; |
| | | #region MyRegion |
| | | //var Wheel_Type = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_Type").First(), client);//车轮类å |
| | | //var Wheel_id = client.ReadByOrder<string>("R_Wheel_id", name);//车轮SNå· |
| | |
| | | } |
| | | |
| | | station.bindSN = string.IsNullOrEmpty(station.bindSN) ? Wheel_SN : station.bindSN + "," + Wheel_SN; |
| | | station.billetID = string.IsNullOrEmpty(station.billetID) ? Mes_Work.billetID.ToString() : station.billetID + "," + Mes_Work.billetID; |
| | | station.quantity++; |
| | | if (station.quantity == 1) |
| | | { |
| | |
| | | station.heatNumber = Mes_Work.heatID; |
| | | station.tray_status = "StrogeTray"; |
| | | } |
| | | //else if (station.stationCode == NGStation) |
| | | //{ |
| | | // station.heatNumber = string.IsNullOrEmpty(station.heatNumber) ? Mes_Work.heatID : station.heatNumber + "," + Mes_Work.heatID; |
| | | //} |
| | | |
| | | var count = stationinfoRepository.Update(station, true); |
| | | if (count < 1) |
| | |
| | | var Request = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Request_Load").First(), client); |
| | | if (!Request) continue; |
| | | |
| | | var Area = client.ReadByOrder<Int16>("W_AreaNr", name);//读åè´§ä½å·ä¿¡æ¯ |
| | | if (Area != 0) continue; |
| | | //var Area = client.ReadByOrder<Int16>("W_AreaNr", name);//读åè´§ä½å·ä¿¡æ¯ |
| | | //if (Area != 0) continue; |
| | | |
| | | var load_zone = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_load_zone").First(), client); |
| | | #region è¯»åæ¡æ¶ä¿¡æ¯ |
| | | var Wheel_Type = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_Type").First(), client);//车轮类å |
| | | var Wheel_id = client.ReadByOrder<string>("R_Wheel_id", name);//车轮SNå· |
| | |
| | | |
| | | var Stations = stationinfoRepository.Find(x => x.area == PipelineJob.area_code(name)).OrderBy(x => x.lastUpdateTime).ToList(); |
| | | |
| | | var NGStation = "X01001003"; |
| | | if (name == "2åå
䏿åº") NGStation = "X02001003"; |
| | | if (name == "3åå
䏿åº") NGStation = "X03001002"; |
| | | |
| | | |
| | | //foreach (var station in Stations) //ä»»ä½ä¸ä¸ªä¸æä½ä¸ºç©ºæç¦ç¨æ¶,é½ä¼åæ¢æ¡æ¶ |
| | | //{ |
| | |
| | | } |
| | | |
| | | var PartStatus = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PartStatus").First(), client);//1:ok;2:nok |
| | | |
| | | var load_zone = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_load_zone").First(), client); |
| | | #region æ¥å¿è®°å½ |
| | | WriteDBLog.Success(name + "ç³è¯·æ¾æ", $"è¯»åæ¡æ¶ä¿¡æ¯ï¼\n车轮SNï¼{Wheel_id}\nè½®åIDï¼{Wheel_Type}\nè½¦è½®ç¶æï¼{PartStatus}\næ¯å¦è¿å
¥ä¸æåºï¼{load_zone}", "PCS"); |
| | | if (load_zone) continue; |
| | |
| | | && x.location_state == LocationStateEnum.Stroge.ToString() |
| | | && x.quantity < 5 |
| | | && x.stationType == Work.drawingNo |
| | | && x.tray_type == ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray") |
| | | //&& x.tray_type == ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray") |
| | | && x.Number == Work.workOrder |
| | | && x.heatNumber == Work.heatID) |
| | | .OrderByDescending(x => x.quantity) |
| | |
| | | && x.location_state == LocationStateEnum.Stroge.ToString() |
| | | && x.quantity < 5 |
| | | && x.stationType == Work.drawingNo |
| | | && x.tray_type == ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray") |
| | | //&& x.tray_type == ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray") |
| | | && x.Number == Work.workOrder) |
| | | .OrderByDescending(x => x.quantity) |
| | | .FirstOrDefault(); |
| | |
| | | |
| | | if (Stationinfo != null) |
| | | { |
| | | #region æç车轮å å第å个æ¶ä¸åå¦å¤ä¸ä¸ªçå·çå
¥åºä»»å¡ |
| | | if (Stationinfo.quantity + 1 >= 4) |
| | | { |
| | | var stationinfo = Stations.Where(x => x.enable && x.stationCode != NGStation && x.stationCode != Stationinfo.stationCode && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).FirstOrDefault(); |
| | | //foreach (var stationinfo in stationinfos) |
| | | //{ |
| | | if (stationinfo != null) |
| | | agvtask(stationinfoRepository, stationinfo, Work, name == "3åå
䏿åº" ? "TaskType_OutsourceInbound" : "TaskType_Inbound"); |
| | | //} |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region æçç±»åä¸ä¸è´éæ´æ¢æç |
| | | if (Stationinfo.tray_type != ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray")) |
| | | //if (Stationinfo.tray_type != ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray")) |
| | | if (Stationinfo.tray_type != "LargeTray" && (wheel == null ? wheel1.e : wheel.e) > 1100) |
| | | { |
| | | client.WriteByOrder("W_Enabl_Load", false, name);//ä¿¡å·ä¸ºfalseæ¡æ¶åæ¢è¿å
¥ |
| | | Stationinfo.location_state = LocationStateEnum.Abnormal.ToString(); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | #region 没æçå¯ç¨,触åå
¥åºä»»å¡ |
| | | var stationinfos = Stations.Where(x => x.enable && x.stationCode != NGStation && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).ToList(); |
| | | foreach (var stationinfo in stationinfos) |
| | | { |
| | | agvtask(stationinfoRepository, stationinfo, Work, name == "3åå
䏿åº" ? "TaskType_OutsourceInbound" : "TaskType_Inbound"); |
| | | } |
| | | #endregion |
| | | } |
| | | //else |
| | | //{ |
| | | // #region 没æçå¯ç¨,触åå
¥åºä»»å¡ |
| | | // var stationinfos = Stations.Where(x => x.enable && x.stationCode != NGStation && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).ToList(); |
| | | // foreach (var stationinfo in stationinfos) |
| | | // { |
| | | // agvtask(stationinfoRepository, stationinfo, Work, name == "3åå
䏿åº" ? "TaskType_OutsourceInbound" : "TaskType_Inbound"); |
| | | // } |
| | | // #endregion |
| | | //} |
| | | |
| | | } |
| | | else if ((Int16)PartStatus == 2) |
| | |
| | | && x.location_state == LocationStateEnum.Stroge.ToString() |
| | | && x.quantity < 5 |
| | | && x.stationType == Work.drawingNo |
| | | && x.tray_type == ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray") |
| | | //&& x.tray_type == ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray") |
| | | /*&& x.Number == mes_Detail.jobID*/).FirstOrDefault(); |
| | | //} |
| | | |
| | |
| | | if (Stationinfo != null) |
| | | { |
| | | #region æçç±»åä¸ä¸è´éæ´æ¢æç |
| | | if (Stationinfo.tray_type != ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray")) |
| | | //if (Stationinfo.tray_type != ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray")) |
| | | if (Stationinfo.tray_type != "LargeTray" && (wheel == null ? wheel1.e : wheel.e) > 1100) |
| | | { |
| | | Stationinfo.location_state = LocationStateEnum.Abnormal.ToString(); |
| | | Stationinfo.tray_type = Stationinfo.tray_type == "SmallTray" ? "SmallTray/LargeTray" : "LargeTray/SmallTray"; |
| | |
| | | //int CompeletedNum = Convert.ToInt32(mes_Head.quantity) - Convert.ToInt32(mes_Head.finishNum); |
| | | //if (mes_Head.quantity <= 50) tasktype = "TaskType_OutsourceInbound"; |
| | | |
| | | if (tasktype == "TaskType_OutsourceInbound") |
| | | if (tasktype == "TaskType_OutsourceInbound" || !string.IsNullOrEmpty(Work.area)) |
| | | TargetLocation = StationTask.GetEmptyLocation(stationinfoRepository); |
| | | else if (tasktype == "TaskType_Inbound") |
| | | TargetLocation = GetLocation.GetEmptyLocation(stationinfoRepository, Work, stationinfo); |
| | |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent FinishWorkOrder(SaveModel saveModel); |
| | | WebResponseContent OutsorcingWorkOrder(SaveModel saveModel); |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Entity.DomainModels; |
| | | using WIDESEA_WCS.IRepositories; |
| | | using WIDESEA_WCS.Jobs; |
| | | using WIDESEA_WCS.JobsPart.Common; |
| | | using WIDESEA_WCS.Repositories; |
| | | using WIDESEA_WCS.WCSClient; |
| | | using WIDESEA_WMS.IRepositories; |
| | |
| | | var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == stationCode).ToList(); |
| | | var PalletSignal = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PalletSignal").First(), client);//读åæçä¿¡å·:1:æ,2æ |
| | | var MaterialSignal = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_MaterialSignal").First(), client);//读åè´§ç©ä¿¡å·:1:æ,2æ |
| | | var station = stationinfoRepository.Find(x => x.stationCode == stationCode).FirstOrDefault(); |
| | | var station = stationinfoRepository.Find(x => x.stationCode == stationCode && x.enable).FirstOrDefault(); |
| | | if (station == null) continue; |
| | | if (PalletSignal == 1 && MaterialSignal == 2 && (station.stationCode.Contains("S0100100") ? station.tray_status == "EmptyTray" : true)) |
| | | { |
| | | var area = station.tray_type == "SmallTray" ? "11" : "10"; |
| | |
| | | continue; |
| | | |
| | | } |
| | | var EmptyStation = GetStation.EmptyPalletStation(area); |
| | | |
| | | #region æ¥æ¾åºåºä¸ç©ºæçç©ºè´§ä½ |
| | | var EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains("A") && x.location_state != LocationStateEnum.Busy.ToString() && x.enable) |
| | | .OrderBy(x => x.column).ThenByDescending(x => x.line).FirstOrDefault();//æ¥æ¾æ²¡æä»»å¡ç空æçè´§ä½ |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains("A") && x.location_state != LocationStateEnum.Busy.ToString() && x.enable) |
| | | //.OrderBy(x => x.column).ThenByDescending(x => x.line).FirstOrDefault();//æ¥æ¾æ²¡æä»»å¡ç空æçè´§ä½ |
| | | |
| | | if (EmptyStation != null) |
| | | { |
| | | if (stationinfoRepository.Find(x => x.area == EmptyStation.area && x.stationCode.Contains("A") && x.column == EmptyStation.column && x.location_state.Contains("Busy")).Any()) |
| | | { |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains("A") && x.column != EmptyStation.column && x.location_state != LocationStateEnum.Busy.ToString() && x.enable).OrderBy(x => x.column).ThenByDescending(x => x.line).FirstOrDefault();//æé¤å½ååå¨ä»»å¡çè´§ä½ |
| | | } |
| | | if (EmptyStation != null && EmptyStation.line == 2)//妿任å¡åå¨ç¬¬äºè¡,ææ¥ç¬¬ä¸è¡æ¯å¦æè´§ |
| | | { |
| | | if (stationinfoRepository.Find(x => x.area == EmptyStation.area && x.stationCode.Contains("A") && x.column == EmptyStation.column && x.line == 1 && x.location_state != LocationStateEnum.Empty.ToString()).Any()) EmptyStation = null; |
| | | } |
| | | } |
| | | // if (EmptyStation != null) |
| | | // { |
| | | // if (stationinfoRepository.Find(x => x.area == EmptyStation.area && x.stationCode.Contains("A") && x.column == EmptyStation.column && x.location_state.Contains("Busy")).Any()) |
| | | // { |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains("A") && x.column != EmptyStation.column && x.location_state != LocationStateEnum.Busy.ToString() && x.enable).OrderBy(x => x.column).ThenByDescending(x => x.line).FirstOrDefault();//æé¤å½ååå¨ä»»å¡çè´§ä½ |
| | | // } |
| | | // if (EmptyStation != null && EmptyStation.line == 2)//妿任å¡åå¨ç¬¬äºè¡,ææ¥ç¬¬ä¸è¡æ¯å¦æè´§ |
| | | // { |
| | | // if (stationinfoRepository.Find(x => x.area == EmptyStation.area && x.stationCode.Contains("A") && x.column == EmptyStation.column && x.line == 1 && x.location_state != LocationStateEnum.Empty.ToString()).Any()) EmptyStation = null; |
| | | // } |
| | | // } |
| | | |
| | | // if (EmptyStation == null) |
| | | // { |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == LocationStateEnum.Busy.ToString() && x.enable).OrderByDescending(x => x.column).FirstOrDefault();//æåä¸ä¸ªè´§ä½æä»»å¡åä¸è½çæå
¥åºä»»å¡ |
| | | // if (EmptyStation != null) continue; |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == LocationStateEnum.Stroge.ToString() && x.enable).OrderByDescending(x => x.column).FirstOrDefault();//æ¾æå¤é¢æ²¡å 满5个çè´§ä½ |
| | | // if (EmptyStation == null) |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.column).FirstOrDefault(); |
| | | // } |
| | | |
| | | #endregion |
| | | |
| | | if (EmptyStation == null) |
| | | { |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == LocationStateEnum.Busy.ToString() && x.enable).OrderByDescending(x => x.column).FirstOrDefault();//æåä¸ä¸ªè´§ä½æä»»å¡åä¸è½çæå
¥åºä»»å¡ |
| | | if (EmptyStation != null) continue; |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == LocationStateEnum.Stroge.ToString() && x.enable).OrderByDescending(x => x.column).FirstOrDefault();//æ¾æå¤é¢æ²¡å 满5个çè´§ä½ |
| | | if (EmptyStation == null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.column).FirstOrDefault(); |
| | | } |
| | | |
| | | if (EmptyStation != null) |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Comm; |
| | | using WIDESEA_Comm.LogInfo; |
| | | using WIDESEA_Core.EFDbContext; |
| | | using WIDESEA_Entity.DomainModels; |
| | | using WIDESEA_WCS.IRepositories; |
| | | using WIDESEA_WCS.Repositories; |
| | | using WIDESEA_WCS.WCSClient; |
| | | using WIDESEA_WMS.IRepositories; |
| | | using WIDESEA_WMS.Repositories; |
| | | |
| | | namespace WIDESEA_WCS.JobsPart.Common |
| | | { |
| | | public class GetStation |
| | | { |
| | | /// <summary> |
| | | /// è·å空æçè´§ä½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static void EmptyPalletStation(dt_agvtask task) |
| | | { |
| | | dt_stationinfo EmptyStation = null; |
| | | try |
| | | { |
| | | VOLContext Context = new VOLContext(); |
| | | Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context); |
| | | Idt_agvtaskRepository agvtaskService = new dt_agvtaskRepository(Context); |
| | | var Pipeline_client = PLCClient.Clients.FirstOrDefault(t => t.PLCName == "龿¡æº"); |
| | | if (Pipeline_client == null) throw new Exception("龿¡æºè°åº¦æå¡æªå¼å¯ï¼"); |
| | | if (!Pipeline_client.IsConnected) throw new Exception("ä¸é¾æ¡æºè¿æ¥è¶
æ¶ï¼"); |
| | | var area = task.agv_Traytype == "SmallTray" ? "11" : "10"; |
| | | |
| | | #region ä¼å
åº3åºåºå
空æç |
| | | if (area == "11") |
| | | { |
| | | EmptyStation = stationinfoRepository.Find(x => x.quantity > 0 && x.stationCode == "C01004001" /*&& x.location_state == "Stroge"*/ && x.tray_status == "EmptyTray" && x.enable).FirstOrDefault(); |
| | | if (EmptyStation == null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.quantity > 0 && x.stationCode == "C01005001"/* && x.location_state == "Stroge"*/ && x.tray_status == "EmptyTray" && x.enable).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.quantity > 0 && x.area == EmptyStation.area && x.line == EmptyStation.line /*&& x.location_state == "Stroge"*/ && x.tray_status == "EmptyTray" && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) EmptyStation = null; |
| | | } |
| | | #endregion |
| | | if (EmptyStation == null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.quantity > 0 && x.area == area /*&& x.location_state == "Stroge"*/ && x.tray_status == "EmptyTray" && x.enable).OrderBy(x => x.column).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) EmptyStation = null; |
| | | if (EmptyStation != null) |
| | | { |
| | | var PalletSignal = Pipeline_client.ReadByOrder<Int16>("R_PalletSignal", task.agv_toaddress);//读åæçä¿¡å·:1:æ,2æ |
| | | var MaterialSignal = Pipeline_client.ReadByOrder<Int16>("R_MaterialSignal", task.agv_toaddress);//读åè´§ç©ä¿¡å·:1:æ,2æ |
| | | if (PalletSignal == 2 && MaterialSignal == 2) |
| | | { |
| | | task.agv_fromaddress = EmptyStation.stationCode; |
| | | task.StarQuantity = EmptyStation.quantity - 1; |
| | | task.agv_taskstate = "Create"; |
| | | agvtaskService.Update(task, true); |
| | | EmptyStation.location_state = LocationStateEnum.Busy.ToString(); |
| | | stationinfoRepository.Update(EmptyStation, true); |
| | | WriteDBLog.Success("æ´æ°ç©ºçéåä»»å¡", $"ä»»å¡ç¼å·ï¼{task.agv_tasknum}", "PCS"); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw; |
| | | } |
| | | } |
| | | public static dt_stationinfo Station(dt_stationinfo EmptyStation, Idt_stationinfoRepository stationinfoRepository) |
| | | { |
| | | dt_stationinfo stationinfo = null; |
| | | try |
| | | { |
| | | if (stationinfoRepository.Find(x => x.area == EmptyStation.area && x.line == EmptyStation.line && x.location_state.Contains("Busy")).Any()) return null; |
| | | |
| | | |
| | | stationinfo = stationinfoRepository.Find(x => x.area == EmptyStation.area && x.line == EmptyStation.line && x.quantity > 0 && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | if (stationinfo != null) |
| | | { |
| | | if (stationinfo.quantity < 5) return stationinfo; |
| | | else |
| | | stationinfo = stationinfoRepository.Find(x => x.area == EmptyStation.area && x.line == EmptyStation.line && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.column).FirstOrDefault(); |
| | | } |
| | | //if (stationinfo == null) |
| | | // stationinfo = stationinfoRepository.Find(x => x.area == EmptyStation.area && x.line == EmptyStation.line && x.quantity < 5 && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.column).FirstOrDefault(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | return stationinfo; |
| | | } |
| | | /// <summary> |
| | | /// 空æå¯å
¥åºè´§ä½ |
| | | /// </summary> |
| | | /// <param name="area"></param> |
| | | /// <returns></returns> |
| | | public static dt_stationinfo EmptyPalletStation(string area) |
| | | { |
| | | dt_stationinfo stationinfo = null; |
| | | try |
| | | { |
| | | VOLContext Context = new VOLContext(); |
| | | Idt_agvtaskRepository agvtaskService = new dt_agvtaskRepository(Context); |
| | | Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context); |
| | | |
| | | #region æ¥æ¾ç©ºæçåºåº |
| | | if (stationinfoRepository.Find(x => x.area == area && x.location_state == LocationStateEnum.Busy.ToString()).Any()) |
| | | { |
| | | var EmptyStation = stationinfoRepository.Find(x => x.stationCode == "C01005001" && x.location_state == LocationStateEnum.Empty.ToString()).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | { |
| | | if (!stationinfoRepository.Find(x => x.line == EmptyStation.line && x.area == EmptyStation.area && x.location_state != LocationStateEnum.Empty.ToString()).Any()) |
| | | return EmptyStation; |
| | | } |
| | | EmptyStation = stationinfoRepository.Find(x => x.quantity > 0 && x.stationCode == "C01005001" && x.location_state == "Stroge" && x.tray_status == "EmptyTray" && x.enable).FirstOrDefault(); |
| | | |
| | | |
| | | if (EmptyStation != null) stationinfo = Station(EmptyStation, stationinfoRepository); |
| | | if (stationinfo != null) return stationinfo; |
| | | |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == EmptyStation.area && x.line == EmptyStation.line && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | |
| | | if (EmptyStation.quantity == 5) |
| | | { |
| | | EmptyStation = stationinfoRepository.Find(x => x.stationCode == "C01004001" && x.location_state == LocationStateEnum.Empty.ToString()).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | { |
| | | if (!stationinfoRepository.Find(x => x.line == EmptyStation.line && x.area == EmptyStation.area && x.location_state != LocationStateEnum.Empty.ToString()).Any()) |
| | | return EmptyStation; |
| | | } |
| | | |
| | | EmptyStation = stationinfoRepository.Find(x => x.quantity > 0 && x.stationCode == "C01004001" && x.location_state == "Stroge" && x.tray_status == "EmptyTray" && x.enable).FirstOrDefault(); |
| | | if (EmptyStation != null) stationinfo = Station(EmptyStation, stationinfoRepository); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | stationinfo = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 /*&& x.location_state == LocationStateEnum.Stroge.ToString()*/ && x.enable).OrderBy(x => x.column).FirstOrDefault(); |
| | | if (stationinfo != null) |
| | | { |
| | | if (stationinfo.quantity < 5) return stationinfo; |
| | | else |
| | | stationinfo = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw; |
| | | } |
| | | return stationinfo; |
| | | } |
| | | } |
| | | } |
| | |
| | | var types = station.tray_type.Split('/'); |
| | | var area = types[0] == "SmallTray" ? "11" : "10"; |
| | | //æ¾1åºåºç空æä½ |
| | | |
| | | var EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains("A") /*&& x.location_state == "Empty"*/ && x.enable) |
| | | .OrderBy(x => x.column).OrderBy(x => x.line).FirstOrDefault(); |
| | | if (EmptyStation == null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") /*&& x.location_state == "Empty"*/ && x.enable) |
| | | .OrderBy(x => x.line).OrderBy(x => x.column).FirstOrDefault(); |
| | | var EmptyStation = GetStation.EmptyPalletStation(area); |
| | | //var EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains("A") /*&& x.location_state == "Empty"*/ && x.enable) |
| | | // .OrderBy(x => x.column).OrderBy(x => x.line).FirstOrDefault(); |
| | | //if (EmptyStation == null) |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity < 5 && x.stationCode.Contains(area == "10" ? "D" : "C") /*&& x.location_state == "Empty"*/ && x.enable) |
| | | // .OrderBy(x => x.line).OrderBy(x => x.column).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | { |
| | | dt_agvtask agvtask = new dt_agvtask() |
| | |
| | | agv_Traytype = types[0] |
| | | }; |
| | | agvtaskRepository.Add(agvtask, true); |
| | | EmptyStation.location_state = LocationStateEnum.Busy.ToString(); |
| | | stationinfoRepository.Update(EmptyStation, true); |
| | | WriteDBLog.Success("åå»ºæ´æ¢ç©ºçä»»å¡", $"ä»»å¡ç¼å·ï¼{agvtask.agv_tasknum}", "PCS"); |
| | | CreatePartQueue(agvtaskRepository, agvtask, types[1]); |
| | | } |
| | |
| | | { |
| | | if (task.agv_tasktype == "TaskType_EmptyPallet")//空æä»»å¡ |
| | | { |
| | | if (task.agv_fromaddress == "" && DateTime.Now - task.agv_createtime >= TimeSpan.FromMinutes(5)) |
| | | if (task.agv_fromaddress == "" && DateTime.Now - task.agv_createtime >= TimeSpan.FromMinutes(1)) |
| | | { |
| | | var Pipeline_client = PLCClient.Clients.FirstOrDefault(t => t.PLCName == "龿¡æº"); |
| | | if (Pipeline_client == null) throw new Exception("龿¡æºè°åº¦æå¡æªå¼å¯ï¼"); |
| | | if (!Pipeline_client.IsConnected) throw new Exception("ä¸é¾æ¡æºè¿æ¥è¶
æ¶ï¼"); |
| | | var area = task.agv_Traytype == "SmallTray" ? "11" : "10"; |
| | | //æ¾1åºåºç空æä½ |
| | | var EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains("A") /*&& x.location_state == "Stroge"*//*LocationStateEnum.Stroge.ToString()*/ && x.enable).OrderBy(x => x.column).ThenBy(x => x.line).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) EmptyStation = null; |
| | | #region ä¸ä¸ªåºååªè½æä¸ä¸ªç©ºæä»»å¡ |
| | | //bool ok = false; |
| | | //if (EmptyStation != null) |
| | | // ok = agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any(); |
| | | //if (EmptyStation == null || ok) |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == "Stroge" /*LocationStateEnum.Stroge.ToString()*/ && x.enable) |
| | | // .OrderBy(x => x.line).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | #endregion |
| | | if (EmptyStation == null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | if (EmptyStation == null) continue; |
| | | #region åºå
åå¨ä»»å¡å ç¨ |
| | | if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) |
| | | continue; |
| | | #endregion |
| | | |
| | | if (EmptyStation == null) |
| | | EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == "Stroge" && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | if (EmptyStation != null) |
| | | if (task.agv_tasknum.Contains("_")) |
| | | { |
| | | #region åºå
åå¨ä»»å¡å ç¨ |
| | | //if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) |
| | | // continue; |
| | | #endregion |
| | | |
| | | //if (agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any()) |
| | | // return; |
| | | #region è¡¥åºå
空æçï¼ä¸éè¦å
çµå¤æ |
| | | var PalletSignal = Pipeline_client.ReadByOrder<Int16>("R_PalletSignal", task.agv_toaddress);//读åæçä¿¡å·:1:æ,2æ |
| | | var MaterialSignal = Pipeline_client.ReadByOrder<Int16>("R_MaterialSignal", task.agv_toaddress);//读åè´§ç©ä¿¡å·:1:æ,2æ |
| | | if (PalletSignal == 2 && MaterialSignal == 2) |
| | | { |
| | | task.agv_fromaddress = EmptyStation.stationCode; |
| | | task.StarQuantity = EmptyStation.quantity - 1; |
| | | task.agv_taskstate = "Create"; |
| | | agvtaskService.Update(task, true); |
| | | EmptyStation.location_state = LocationStateEnum.Busy.ToString(); |
| | | stationinfoRepository.Update(EmptyStation, true); |
| | | WriteDBLog.Success("æ´æ°ç©ºçéåä»»å¡", $"ä»»å¡ç¼å·ï¼{task.agv_tasknum}", "PCS"); |
| | | } |
| | | #endregion |
| | | string mainTaskNum = task.agv_tasknum.Split('_')[0]; |
| | | if (agvtaskService.Find(x => x.agv_tasknum == mainTaskNum && (task.agv_taskstate == "Executing1" || task.agv_taskstate == "Complete1")).Any()) |
| | | GetStation.EmptyPalletStation(task); |
| | | } |
| | | else |
| | | GetStation.EmptyPalletStation(task); |
| | | #region |
| | | //var Pipeline_client = PLCClient.Clients.FirstOrDefault(t => t.PLCName == "龿¡æº"); |
| | | //if (Pipeline_client == null) throw new Exception("龿¡æºè°åº¦æå¡æªå¼å¯ï¼"); |
| | | //if (!Pipeline_client.IsConnected) throw new Exception("ä¸é¾æ¡æºè¿æ¥è¶
æ¶ï¼"); |
| | | //var area = task.agv_Traytype == "SmallTray" ? "11" : "10"; |
| | | ////æ¾1åºåºç空æä½ |
| | | //var EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains("A") /*&& x.location_state == "Stroge"*//*LocationStateEnum.Stroge.ToString()*/ && x.enable).OrderBy(x => x.column).ThenBy(x => x.line).FirstOrDefault(); |
| | | //if (EmptyStation != null) |
| | | // if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) EmptyStation = null; |
| | | //#region ä¸ä¸ªåºååªè½æä¸ä¸ªç©ºæä»»å¡ |
| | | ////bool ok = false; |
| | | ////if (EmptyStation != null) |
| | | //// ok = agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any(); |
| | | ////if (EmptyStation == null || ok) |
| | | //// EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == "Stroge" /*LocationStateEnum.Stroge.ToString()*/ && x.enable) |
| | | //// .OrderBy(x => x.line).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | //#endregion |
| | | //if (EmptyStation == null) |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | //if (EmptyStation == null) continue; |
| | | //#region åºå
åå¨ä»»å¡å ç¨ |
| | | //if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) |
| | | // continue; |
| | | //#endregion |
| | | |
| | | //if (EmptyStation == null) |
| | | // EmptyStation = stationinfoRepository.Find(x => x.area == area && x.quantity > 0 && x.stationCode.Contains(area == "10" ? "D" : "C") && x.location_state == "Stroge" && x.enable).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | //if (EmptyStation != null) |
| | | //{ |
| | | // #region åºå
åå¨ä»»å¡å ç¨ |
| | | // //if (EmptyStation.location_state == LocationStateEnum.Busy.ToString()) |
| | | // // continue; |
| | | // #endregion |
| | | |
| | | // //if (agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any()) |
| | | // // return; |
| | | // #region è¡¥åºå
空æçï¼ä¸éè¦å
çµå¤æ |
| | | // var PalletSignal = Pipeline_client.ReadByOrder<Int16>("R_PalletSignal", task.agv_toaddress);//读åæçä¿¡å·:1:æ,2æ |
| | | // var MaterialSignal = Pipeline_client.ReadByOrder<Int16>("R_MaterialSignal", task.agv_toaddress);//读åè´§ç©ä¿¡å·:1:æ,2æ |
| | | // if (PalletSignal == 2 && MaterialSignal == 2) |
| | | // { |
| | | // task.agv_fromaddress = EmptyStation.stationCode; |
| | | // task.StarQuantity = EmptyStation.quantity - 1; |
| | | // task.agv_taskstate = "Create"; |
| | | // agvtaskService.Update(task, true); |
| | | // EmptyStation.location_state = LocationStateEnum.Busy.ToString(); |
| | | // stationinfoRepository.Update(EmptyStation, true); |
| | | // WriteDBLog.Success("æ´æ°ç©ºçéåä»»å¡", $"ä»»å¡ç¼å·ï¼{task.agv_tasknum}", "PCS"); |
| | | // } |
| | | // #endregion |
| | | //} |
| | | #endregion |
| | | } |
| | | } |
| | | else if (task.agv_tasktype == "TaskType_OutsourceOutbound" || task.agv_tasktype == "TaskType_Outbound")//å¤ååºåºåº/ABåºåºåº |
| | |
| | | { |
| | | |
| | | |
| | | if (/*(mesinfo.quantity <= 50 && string.IsNullOrEmpty(mesinfo.area)) ||*/ item.stationCode.Contains("3")) //å°äº50ä»¶ç´æ¥åºåº |
| | | if (/*(mesinfo.quantity <= 50 &&*/ !string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) //å°äº50ä»¶ç´æ¥åºåº |
| | | { |
| | | //todo 寻æ¾å¯æ¾è´§å¤åæ¾è´§å° |
| | | tasktype = "TaskType_OutsourceInbound"; |
| | |
| | | TargetLocation.location_state = LocationStateEnum.InBusy.ToString(); |
| | | TargetLocation.stationType = agvtask.agv_materielid; |
| | | TargetLocation.heatNumber = item.heatNumber; |
| | | TargetLocation.billetID = item.billetID; |
| | | TargetLocation.Number = agvtask.jobID; |
| | | stationinfoRepository.Update(TargetLocation, true); |
| | | WriteDBLog.Success("å建å
¥åºä»»å¡", $"ä»»å¡ç¼å·ï¼{agvtask.agv_tasknum}", "PCS"); |
| | |
| | | // stationinfoRepository.Update(stationinfo, true); |
| | | // return null; |
| | | //} |
| | | string area1 = ""; |
| | | if (stationinfo.tray_type == "LargeTray") |
| | | area1 = "4"; |
| | | |
| | | #region æ¥æ¾åºå |
| | | dt_inventory inventory = null; |
| | | inventory = inventoryRepository.Find(x => x.FigureNumber == mesinfo.drawingNo).OrderByDescending(x => x.OnlineTime).FirstOrDefault(); |
| | |
| | | if (inventory != null) |
| | | { |
| | | var station = stationinfoRepository.FindFirst(x => x.stationCode == inventory.stationCode); |
| | | if (!string.IsNullOrEmpty(area1) && station.area != area1)//å
¥å¤§æçåºåº |
| | | { |
| | | #region 寻æ¾å·²åé
åå¾å·å
¥åºä»»å¡åºä½ |
| | | TargetLocation = stationinfoRepository.Find(x => x.stationType == stationinfo.stationType && x.location_state == LocationStateEnum.InBusy.ToString() && x.area == area1).FirstOrDefault(); |
| | | if (TargetLocation != null) |
| | | { |
| | | //if (TargetLocation.area == "1") |
| | | //{ |
| | | // //TargetLocation = stationinfoRepository.Find(x => x.column == TargetLocation.column && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == TargetLocation.area).OrderByDescending(x => x.line).FirstOrDefault(); |
| | | |
| | | // TargetLocation = stationinfoRepository.Find(x => x.line == TargetLocation.line && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == TargetLocation.area).OrderBy(x => x.column).FirstOrDefault();//æè¡åæ¾ |
| | | |
| | | // if (TargetLocation != null) |
| | | // { |
| | | // if (!stationinfoRepository.Find(x => x.column == TargetLocation.column && x.area == TargetLocation.area /*&& x.enable*/ && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) |
| | | // return TargetLocation; |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | TargetLocation = stationinfoRepository.Find(x => x.line == TargetLocation.line && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == TargetLocation.area).OrderBy(x => x.column).FirstOrDefault(); |
| | | if (TargetLocation != null) |
| | | { |
| | | if (!stationinfoRepository.Find(x => x.line == TargetLocation.line && x.area == TargetLocation.area && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) |
| | | return TargetLocation; |
| | | } |
| | | //} |
| | | } |
| | | #endregion |
| | | |
| | | #region 寻æ¾ç©ºè´§ä½ |
| | | var TargetLocations1 = stationinfoRepository.Find(x => x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == area1).OrderBy(x => x.line).ThenBy(x => x.column).ToList(); |
| | | foreach (var Location in TargetLocations1) |
| | | { |
| | | //if (Location.area == "1") |
| | | //{ |
| | | // if (stationinfoRepository.Find(x => x.column == Location.column && x.area == Location.area && x.stationType == stationinfo.stationType && x.location_state != LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | //} |
| | | //else |
| | | //{ |
| | | if (stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.stationType == stationinfo.stationType && x.location_state != LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | //} |
| | | } |
| | | //if (TargetLocation != null) |
| | | //{ |
| | | // if (stationinfoRepository.Find(x => x.line == TargetLocation.line && x.column == 1 && x.stationType == stationinfo.stationType).Any()) return TargetLocation; |
| | | //} |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | if (station.area == "1") |
| | | { |
| | | //TargetLocation = stationinfoRepository.Find(x => x.column == station.column && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == inventory.area).OrderByDescending(x => x.line).FirstOrDefault(); |
| | |
| | | #endregion |
| | | |
| | | #region æªæ¾å°åºåæå½ååºåè¡å·²æ»¡,å¯»æ¾æ°çä¸è¡ |
| | | //var area1 = string.IsNullOrEmpty(mesinfo.area) ? GetArea(mesinfo.quantity, e) : mesinfo.area; |
| | | //var area1 = string.IsNullOrEmpty(mesinfo.area) ? GetArea(mesinfo.quantity, e) : mesinfo.area;(area == "2" ? 1 : 10) |
| | | //var area = string.IsNullOrEmpty(mesinfo.area) ? GetArea(mesinfo.quantity, stationinfo.tray_type) : mesinfo.area; |
| | | var area = GetArea(mesinfo.quantity, stationinfo.tray_type); |
| | | TargetLocation = stationinfoRepository.Find(x => x.column == (area == "2" ? 1 : 10) && x.area == area && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.line).ThenBy(x => x.column).FirstOrDefault(); |
| | | TargetLocation = stationinfoRepository.Find(x => x.column == 1 && x.area == area && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.line).ThenBy(x => x.column).FirstOrDefault(); |
| | | if (TargetLocation == null && area != "4") |
| | | { |
| | | if (area == "2") |
| | | area = "3"; |
| | | else if (area == "3") |
| | | area = "2"; |
| | | TargetLocation = stationinfoRepository.Find(x => x.column == (area == "2" ? 1 : 10) && x.area == area && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.line).ThenBy(x => x.column).FirstOrDefault(); |
| | | TargetLocation = stationinfoRepository.Find(x => x.column == 1 && x.area == area && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.line).ThenBy(x => x.column).FirstOrDefault(); |
| | | if (TargetLocation == null) |
| | | TargetLocation = stationinfoRepository.Find(x => x.line == 2 && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == "1").OrderBy(x => x.column).FirstOrDefault(); |
| | | } |
| | |
| | | using WIDESEA_Core.EFDbContext; |
| | | using WIDESEA_WCS.JobsPart.Common; |
| | | using WIDESEA_Core.ManageUser; |
| | | using WIDESEA_Comm.LogInfo; |
| | | |
| | | namespace WIDESEA_WCS.Services |
| | | { |
| | |
| | | //å¤ç§æ·ä¼ç¨å°è¿init代ç ï¼å
¶ä»æ
åµå¯ä»¥ä¸ç¨ |
| | | //base.Init(dbRepository); |
| | | } |
| | | public WebResponseContent OutsorcingWorkOrder(SaveModel model) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | string compeletor = UserContext.Current.UserName; |
| | | try |
| | | { |
| | | List<string> list = new List<string>(); |
| | | foreach (var Key in model.DelKeys) |
| | | { |
| | | var mes_head = _repository.Find(x => x.mes_id.ToString() == Key.ToString()).FirstOrDefault(); |
| | | if (mes_head != null) |
| | | { |
| | | mes_head.area = "å¤å"; |
| | | _repository.Update(mes_head, true); |
| | | list.Add(mes_head.jobID); |
| | | } |
| | | } |
| | | content.OK(); |
| | | WriteDBLog.Success("æå®å·¥ååºåºå¤å", $"å·¥åç¼å·ï¼{list}", "PCS", compeletor); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteDBLog.Error("æå®å·¥ååºåºå¤å", $"é误信æ¯ï¼{ex.Message}", "PCS", compeletor); |
| | | } |
| | | return content; |
| | | } |
| | | public WebResponseContent FinishWorkOrder(SaveModel model) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | VOLContext context = new VOLContext(); |
| | | try |
| | | { |
| | | string compeletor = UserContext.Current.UserName; |
| | |
| | | workOrder = workInfo.workOrder, |
| | | processCode = workInfo.processCode, |
| | | finishNum = 0, |
| | | skip_op_1 = true, |
| | | skip_op_2 = true, |
| | | skip_op_3 = true, |
| | | skip_op_1 = false, |
| | | skip_op_2 = false, |
| | | skip_op_3 = false, |
| | | }; |
| | | freeDB.Add(mes_Head); |
| | | |
| | |
| | | { |
| | | return Service.FinishWorkOrder(saveModel); |
| | | } |
| | | |
| | | [HttpPost, Authorize, Route("OutsorcingWorkOrder"), AllowAnonymous] |
| | | public WebResponseContent OutsorcingWorkOrder([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.OutsorcingWorkOrder(saveModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8098/'; |
| | | axios.defaults.baseURL = 'http://192.168.12.101:8098/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://192.168.12.101:8098/'; |
| | |
| | | url: "/dt_stationinfo/", |
| | | sortName: "id" |
| | | }); |
| | | const editFormFields = ref({"stationCode":"","stationType":"","location_state":"","bindSN":"","tray_status":"","Number":"","heatNumber":"","remark":""}); |
| | | const editFormFields = ref({"stationCode":"","stationType":"","location_state":"","bindSN":"","billetID":"","tray_status":"","Number":"","heatNumber":"","remark":""}); |
| | | const editFormOptions = ref([[{"title":"ç¼åæ¶ç¼å·","field":"stationCode","disabled": true}], |
| | | [{"title":"å¾å·","field":"stationType"}], |
| | | [{"dataKey":"location_states","data":[],"title":"è´§ä½ç¶æ","field":"location_state","type":"select"}], |
| | | [{"title":"车轮SNå·","field":"bindSN"}], |
| | | [{"title":"é¢å¯å·","field":"billetID"}], |
| | | [{"dataKey":"tray_types","data":[],"title":"æçç±»å","field":"tray_type","type":"select"}], |
| | | [{"title":"å·¥ä½ä»¤å·","field":"Number"}], |
| | | [{"title":"çå·","field":"heatNumber","type":"text"}], |
| | |
| | | // {field:'line',title:'è¡',type:'int',width:80,align:'left'}, |
| | | // {field:'column',title:'å',type:'int',width:80,align:'left'}, |
| | | {field:'heatNumber',title:'çå·',type:'string',width:80,align:'left'}, |
| | | // {field:'zj',title:'主é®',type:'int',width:80,hidden:true,require:true,align:'left'}, |
| | | {field:'billetID',title:'é¢å¯å·',type:'string',width:160,align:'left'}, |
| | | {field:'Number',title:'å·¥ä½ä»¤å·',type:'string',width:160,align:'left'}, |
| | | {field:'remark',title:'夿³¨',type:'string',width:220,align:'left'}]); |
| | | const detail = ref({ |
| | |
| | | ///çå· |
| | | /// </summary> |
| | | [Display(Name = "çå·")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName = "nvarchar(50)")] |
| | | [MaxLength(255)] |
| | | [Column(TypeName = "nvarchar(255)")] |
| | | public string heatNumber { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | [MaxLength(100)] |
| | | [Column(TypeName = "nvarchar(100)")] |
| | | public string tray_type { get; set; } |
| | | |
| | | /// <summary> |
| | | ///é¢å¯å· |
| | | /// </summary> |
| | | [Display(Name = "é¢å¯å·")] |
| | | [MaxLength(255)] |
| | | [Column(TypeName = "nvarchar(255)")] |
| | | public string billetID { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_Entity.DomainModels |
| | | { |
| | | [Entity(TableCnName = "å·¥åè§å¾",TableName = "VV_Mes_Workinfo")] |
| | | public partial class VV_Mes_Workinfo:BaseEntity |
| | | [Entity(TableCnName = "å·¥åè§å¾", TableName = "VV_Mes_Workinfo")] |
| | | public partial class VV_Mes_Workinfo : BaseEntity |
| | | { |
| | | /// <summary> |
| | | ///å·¥åç¼å· |
| | | /// </summary> |
| | | [Display(Name ="jobID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName="nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string jobID { get; set; } |
| | | ///å·¥åç¼å· |
| | | /// </summary> |
| | | [Display(Name = "jobID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName = "nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string jobID { get; set; } |
| | | |
| | | /// <summary> |
| | | ///çä»£å· |
| | | /// </summary> |
| | | [Display(Name ="heatID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string heatID { get; set; } |
| | | [Display(Name = "heatID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string heatID { get; set; } |
| | | |
| | | /// <summary> |
| | | ///é¢å¯å· |
| | | /// </summary> |
| | | [Display(Name ="billetID")] |
| | | [Column(TypeName="int")] |
| | | [Editable(true)] |
| | | public int? billetID { get; set; } |
| | | [Display(Name = "billetID")] |
| | | [Column(TypeName = "int")] |
| | | [Editable(true)] |
| | | public int? billetID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="SN")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName="nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string SN { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "SN")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName = "nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string SN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="heatBatchID")] |
| | | [MaxLength(30)] |
| | | [Column(TypeName="nvarchar(30)")] |
| | | [Editable(true)] |
| | | public string heatBatchID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "heatBatchID")] |
| | | [MaxLength(30)] |
| | | [Column(TypeName = "nvarchar(30)")] |
| | | [Editable(true)] |
| | | public string heatBatchID { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å·¥ä½ä»¤å· |
| | | /// </summary> |
| | | [Display(Name ="workOrder")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName="nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string workOrder { get; set; } |
| | | /// <summary> |
| | | ///å·¥ä½ä»¤å· |
| | | /// </summary> |
| | | [Display(Name = "workOrder")] |
| | | [MaxLength(50)] |
| | | [Column(TypeName = "nvarchar(50)")] |
| | | [Editable(true)] |
| | | public string workOrder { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="reqID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName="nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string reqID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "reqID")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName = "nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string reqID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="reqIDLineNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string reqIDLineNo { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "reqIDLineNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string reqIDLineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©æç¼ç |
| | | /// </summary> |
| | | [Display(Name ="materialCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string materialCode { get; set; } |
| | | /// <summary> |
| | | ///ç©æç¼ç |
| | | /// </summary> |
| | | [Display(Name = "materialCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string materialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å¾å· |
| | | /// </summary> |
| | | [Display(Name ="drawingNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string drawingNo { get; set; } |
| | | /// <summary> |
| | | ///å¾å· |
| | | /// </summary> |
| | | [Display(Name = "drawingNo")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string drawingNo { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ææ¯ç¶æ |
| | | /// </summary> |
| | | [Display(Name ="drawingNoVer")] |
| | | [MaxLength(10)] |
| | | [Column(TypeName="nvarchar(10)")] |
| | | [Editable(true)] |
| | | public string drawingNoVer { get; set; } |
| | | /// <summary> |
| | | ///ææ¯ç¶æ |
| | | /// </summary> |
| | | [Display(Name = "drawingNoVer")] |
| | | [MaxLength(10)] |
| | | [Column(TypeName = "nvarchar(10)")] |
| | | [Editable(true)] |
| | | public string drawingNoVer { get; set; } |
| | | |
| | | /// <summary> |
| | | ///产ååç§° |
| | | /// </summary> |
| | | [Display(Name ="productName")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName="nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string productName { get; set; } |
| | | [Display(Name = "productName")] |
| | | [MaxLength(40)] |
| | | [Column(TypeName = "nvarchar(40)")] |
| | | [Editable(true)] |
| | | public string productName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="quantity")] |
| | | [Column(TypeName="int")] |
| | | [Editable(true)] |
| | | public int? quantity { get; set; } |
| | | /// <summary> |
| | | ///åºåº |
| | | /// </summary> |
| | | [Display(Name = "åºåº")] |
| | | [MaxLength(15)] |
| | | [Column(TypeName = "nvarchar(15)")] |
| | | public string area { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name ="typeID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string typeID { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "quantity")] |
| | | [Column(TypeName = "int")] |
| | | [Editable(true)] |
| | | public int? quantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Key] |
| | | [Display(Name ="stackNoRange")] |
| | | [Column(TypeName="int")] |
| | | [Editable(true)] |
| | | [Required(AllowEmptyStrings=false)] |
| | | public int stackNoRange { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Display(Name = "typeID")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string typeID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Key] |
| | | [Display(Name = "stackNoRange")] |
| | | [Column(TypeName = "int")] |
| | | [Editable(true)] |
| | | [Required(AllowEmptyStrings = false)] |
| | | public int stackNoRange { get; set; } |
| | | |
| | | /// <summary> |
| | | ///å·¥åç±»å (17-æºå å·¥ 28-æ£æµçº¿ 101-ç§»åºå¤å) |
| | | /// </summary> |
| | | [Display(Name ="processCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName="nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string processCode { get; set; } |
| | | [Display(Name = "processCode")] |
| | | [MaxLength(20)] |
| | | [Column(TypeName = "nvarchar(20)")] |
| | | [Editable(true)] |
| | | public string processCode { get; set; } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | ////空æä»»å¡éä¿®æ¹é»è¾ |
| | | if (station2.stationCode.Contains("X")) |
| | | station2.quantity = 0;// task.agv_tasktype.Contains("TaskType_EmptyPallet") ? 0 : task.agv_qty; //task.agv_qty; |
| | | else if (station2.area == "10" || station2.area == "11") //å
¥åºç©ºæä»»å¡ |
| | | else if (station2.area == "10" || station2.area == "11" || (station2.stationCode.Contains("C") && task.agv_tasktype == "TaskType_EmptyPallet")) //å
¥åºç©ºæä»»å¡ |
| | | station2.quantity = station2.quantity + task.agv_qty; |
| | | else |
| | | station2.quantity = task.agv_qty; |
| | |
| | | // station1.quantity = 0; |
| | | #endregion |
| | | |
| | | if (station1.area == "10" || station1.area == "11") //åºåºç©ºæä»»å¡ |
| | | if (station1.area == "10" || station1.area == "11" || (station1.stationCode.Contains("C") && task.agv_tasktype == "TaskType_EmptyPallet")) //åºåºç©ºæä»»å¡ |
| | | { |
| | | station1.location_state = LocationStateEnum.Stroge.ToString(); |
| | | station1.quantity = station1.quantity - 1; |
| | |
| | | { |
| | | station1.location_state = LocationStateEnum.Empty.ToString(); |
| | | station1.Number = string.Empty; |
| | | station1.billetID = string.Empty; |
| | | station1.heatNumber = string.Empty; |
| | | station1.stationType = string.Empty; |
| | | station1.tray_status = string.Empty; |
| | |
| | | station.stationType = saveModel.MainData["stationType"].ToString(); |
| | | station.heatNumber = saveModel.MainData["heatNumber"].ToString(); |
| | | station.Number = saveModel.MainData["Number"].ToString(); |
| | | station.billetID = saveModel.MainData["billetID"].ToString(); |
| | | station.remark = saveModel.MainData["remark"].ToString(); |
| | | station.tray_type = saveModel.MainData["tray_type"].ToString(); |
| | | if (list.Count == 0) |
| | |
| | | [Invoke(Begin = "2024-01-01 00:00", Interval = 1000 * 5, /*IsEnabled = true,*/ SkipWhileExecuting = true)] |
| | | public void TaskTime() |
| | | { |
| | | //AGVServer.SendAgvTask(); |
| | | AGVServer.SendAgvTask(); |
| | | } |
| | | } |
| | | } |