1
czw
7 天以前 c97f5e8db6360135d481e933fdac5d3682057adc
HH.WCS.QingXiNongfu/wms/TaskHelper.cs
@@ -18,13 +18,24 @@
            var date = DateTime.Now.ToString("yyMMdd");
            return $"TN{date}{id.ToString().PadLeft(4, '0')}";
        }
        internal static bool UpdateStatus(WMSTask task, string status)
        internal static bool UpdateStatus(WMSTask task, string status, CntrItemRel CntItem = null)
        {
            var res = false;
            var db = new SqlHelper<WMSTask>().GetInstance();
            task.S_B_STATE = status;
            db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE }).ExecuteCommand();
            return res;
            if (CntItem != null)
            {
                task.S_ITEM_NAME = CntItem?.S_ITEM_NAME;
                task.S_ITEM_CODE = CntItem?.S_ITEM_CODE;
                task.S_B_STATE = status;
                db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE, it.S_ITEM_NAME, it.S_ITEM_CODE }).ExecuteCommand();
                return res;
            }
            else
            {
                task.S_B_STATE = status;
                db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE }).ExecuteCommand();
                return res;
            }
        }
        internal static bool UpdateInfo(WMSTask task, string sourceNo, string endBit, string status)
        {
@@ -106,7 +117,7 @@
            else if (endLoc.S_AREA_CODE == "YWLWJJB")
            {
                //查询任务表  要求是只能生成两个任务 起点库区为YWLWJJB  hh_plg  2025年6月9日 
                List<string> TaskState = new List<string>() { "完成", "取消" };
                List<string> TaskState = new List<string>() { "完成", "取消", "推送异常" };
                var TaskListNum = LocationHelper.GetList<WMSTask>(x => x.S_END_LAREA == "YWLWJJB" && !TaskState.Contains(x.S_B_STATE));
                if (TaskListNum.Count() >= 2)
                {