using AUCMA.STORE.Common; using AUCMA.STORE.Entity.DAO; using AUCMA.STORE.Entity.Enums; using AUCMA.STORE.SqlSugar.serviceImpl; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq.Expressions; namespace AUCMA.STORE.UnitTest { [TestClass] public class UnitTest5 { [TestMethod] public void TestMethod1() { test(); } public async void test() { /*List result = new List(); Expression> exp = s1 => true; exp = exp.And(s1 => s1.materialCode == "1234567890" && s1.deleteFlag == Entity.Enums.DeleteFlag.No && s1.locationArea == Entity.Enums.LocationArea.Location_Left); List baseMaterialStores = await new BaseServices().Query(exp);*/ /*Expression> exp = s1 => true; exp = exp.And(s1 => s1.materialCode == "1234567890" && s1.locationArea == Entity.Enums.LocationArea.Location_Left && s1.locationCode == "1-2-6" && s1.deleteFlag == DeleteFlag.No); List baseMaterialStores = await new BaseServices().Query(exp); baseMaterialStores.ForEach(x => { x.deleteFlag = DeleteFlag.Yes; x.recordTime = DateTime.Now; }); var info = await new BaseServices().Update(baseMaterialStores);*/ //Expression> exp = s1 => true; //exp = exp.And(s1 => s1.taskCode == "21091636"); //List recordTask = await new BaseServices().Query(exp); //recordTask.ForEach(x => //{ // x.taskStatus = TaskStatus.Achieve; // x.endTime = DateTime.Now; //}); //var info = await new BaseServices().Update(recordTask); /*Expression> expression = s1 => true; expression = expression.And(x => x.plcArea == (LocationArea)1 && x.storeCode == "A" && x.deleteFlag == DeleteFlag.No); List basePlcInfos = await new BaseServices().Query(expression);*/ BaseTaskQueue task = new BaseTaskQueue(); task.pilerTaskCode = "123456"; /*task.plcCode = 1002; // task.boxCode = "8208001992BG1231"; //task.materialCode = "8208001992"; task.storeCode = "A"; task.taskStatus = Entity.Enums.TaskStatus.Await; task.pilerTaskType = Entity.Enums.TaskType.OutStore; task.locationArea = Entity.Enums.LocationArea.Location_Left; task.operationType = Entity.Enums.OperationType.Automatic; task.pilerClaimGoodsRows = 1; task.pilerClaimGoodsLine = 2; task.pilerClaimGoodsTier = 3; task.pilerUnloadRows = 2; task.pilerUnloadLine = 2; task.pilerUnloadTier = 2;*/ task.uuid = System.Guid.NewGuid().ToString("N"); int info = await new BaseServices().Add(task); } } }