You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
3.2 KiB
C#
75 lines
3.2 KiB
C#
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<BaseLocationInfo> result = new List<BaseLocationInfo>();
|
|
Expression<Func<BaseMaterialStore, bool>> exp = s1 => true;
|
|
exp = exp.And(s1 => s1.materialCode == "1234567890" && s1.deleteFlag == Entity.Enums.DeleteFlag.No && s1.locationArea == Entity.Enums.LocationArea.Location_Left);
|
|
List<BaseMaterialStore> baseMaterialStores = await new BaseServices<BaseMaterialStore>().Query(exp);*/
|
|
|
|
/*Expression<Func<BaseMaterialStore, bool>> 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<BaseMaterialStore> baseMaterialStores = await new BaseServices<BaseMaterialStore>().Query(exp);
|
|
baseMaterialStores.ForEach(x => {
|
|
x.deleteFlag = DeleteFlag.Yes;
|
|
x.recordTime = DateTime.Now;
|
|
});
|
|
var info = await new BaseServices<BaseMaterialStore>().Update(baseMaterialStores);*/
|
|
|
|
//Expression<Func<RecordTask, bool>> exp = s1 => true;
|
|
//exp = exp.And(s1 => s1.taskCode == "21091636");
|
|
//List<RecordTask> recordTask = await new BaseServices<RecordTask>().Query(exp);
|
|
//recordTask.ForEach(x =>
|
|
//{
|
|
// x.taskStatus = TaskStatus.Achieve;
|
|
// x.endTime = DateTime.Now;
|
|
//});
|
|
//var info = await new BaseServices<RecordTask>().Update(recordTask);
|
|
|
|
/*Expression<Func<BasePlcInfo, bool>> expression = s1 => true;
|
|
expression = expression.And(x => x.plcArea == (LocationArea)1 && x.storeCode == "A" && x.deleteFlag == DeleteFlag.No);
|
|
List<BasePlcInfo> basePlcInfos = await new BaseServices<BasePlcInfo>().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<BaseTaskQueue>().Add(task);
|
|
}
|
|
}
|
|
}
|