海波 张
14 小时以前 5321419f5fddb4e877fe90ccd90ebdc1a115af64
wms/TaskHelper.cs
@@ -1,4 +1,5 @@
using HH.WCS.ZhongCeJinTan.api;
using HH.WCS.ZhongCeJinTan.core;
using HH.WCS.ZhongCeJinTan.device;
using HH.WCS.ZhongCeJinTan.dispatch;
using HH.WCS.ZhongCeJinTan.util;
@@ -874,6 +875,14 @@
        internal static bool CreateTask(WMSTask wmsTask) {
            var db = new SqlHelper<WMSTask>().GetInstance();
             var task = db.Queryable<WMSTask>().Where(a => a.S_CODE == wmsTask.S_CODE).First();
            if (task!=null)
            {
                return false;
            }
            return db.Insertable(wmsTask).ExecuteCommand() > 0;
        }
@@ -923,6 +932,8 @@
            return db.Queryable<WorkFlow>().Where(a => a.FLOWCODE == flowCode && a.TOOLSTYPE == type).First();
        }
        //根据流程编号和起点库区查找作业流程
        public static WorkFlow selectWorkFlowByStratArea(string flowCode, string startArea)
        {
@@ -930,6 +941,14 @@
            return db.Queryable<WorkFlow>().Where(a => a.FLOWCODE == flowCode && a.STARTAREA==startArea).First();
        }
        //根据流程编号和终点库区查找作业流程
        public static WorkFlow selectWorkFlowByEndArea(string flowCode, string endArea)
        {
            var db = new SqlHelper<WorkFlow>().GetInstance();
            return db.Queryable<WorkFlow>().Where(a => a.FLOWCODE == flowCode && a.ENDAREA == endArea).First();
        }
        /// <summary>
        /// 根据任务状态获取agv任务
        /// </summary>