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.

111 lines
4.4 KiB
C#

using AUCMA.STORE.Common;
using AUCMA.STORE.Entity.DAO;
using AUCMA.STORE.Entity.DTO;
using AUCMA.STORE.Entity.Enums;
using AUCMA.STORE.SqlSugar.serviceImpl;
using AutoMapper;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace AUCMA.STORE.UnitTest
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
//List<BASE_MATERIAL_INFO> baseMaterialTypes = await new BaseServices<BASE_MATERIAL_INFO>().Query();
//var db = Base.GetInstance(ConfigHelper.GetConfig("OracleDataSource"));
//db.DbFirst.Where("BASE_MATERIAL_INFO").CreateClassFile("E:\\桌面\\Oracle测试\\SqlSugar.Oracle\\SqlSugar.Oracle.Model", "SqlSugar.Oracle.Model");
test();
/*Mapper.Initialize(cret => cret.CreateMap<TaskDTO, RecordTask>());
TaskDTO task = new TaskDTO();
task.taskCode = "123";
task.locationCode = "123";
task.locationArea = LocationArea.Location_Left;
task.row = 1;
task.line = 2;
task.tier = 1;
task.taskType = TaskType.InStore;
task.storeCode = "123";
task.materialCode = "123";
task.materialType = 1;
task.operationType = OperationType.Automatic;
task.taskStatus = Entity.Enums.TaskStatus.Await;
task.beginTime = DateTime.Now;
task.recordTime = DateTime.Now;
RecordTask recordTask = Mapper.Map<RecordTask>(task);
recordTask.objid = System.Guid.NewGuid().ToString();*/
}
public async static void test()
{
//var info = await new BaseServices<BASEMATERIALINFO>().Add(new BASEMATERIALINFO(System.Guid.NewGuid().ToString(), "测试"));
/* List<BaseMaterialInfo> baseMaterialTypes = await new BaseServices<BaseMaterialInfo>().Query();
LogHelper.Info(JsonChange.ModeToJson(baseMaterialTypes));*/
/*for (int i = 1; i <= 15; i++)
{
BaseLocationInfo baseLocation = new BaseLocationInfo();
baseLocation.objid = System.Guid.NewGuid().ToString();
baseLocation.locationCode = "3-3-" + i;
baseLocation.locationName = "3-3-" + i;
baseLocation.materialType = "2";
baseLocation.storeCode = "A";
baseLocation.locationArea = Entity.Enums.LocationArea.Location_Left;
baseLocation.locationRow = 3;
baseLocation.locationLine = 3;
baseLocation.locationTier = i;
baseLocation.locationStatus = Entity.Enums.LocationStatus.UnUsed;
baseLocation.efficiency = 5 - i;
baseLocation.recordTime = DateTime.Now;
var info = await new BaseServices<BaseLocationInfo>().Add(baseLocation);
}
*/
// List<BaseLocationInfo> baseLocations = await new BaseServices<BaseLocationInfo>().Query();
List<ImosTeBom> baseLocations = await new BaseServices<ImosTeBom>().Query();
/*PrepareInStoreInfo prepareInStoreInfo = new PrepareInStoreInfo();
prepareInStoreInfo.taskCode = "R202109080002";
prepareInStoreInfo.storeCode = "12344";
string whereStr = "x=>x.TASK_CODE=prepareInStoreInfo.taskCode";
await new BaseServices<PrepareInStoreInfo>().Update(prepareInStoreInfo, whereStr);*/
/*TaskDTO task = new TaskDTO();
task.taskCode = "123";
task.locationCode = "123";
task.locationArea =LocationArea.Location_Left;
task.row = 1;
task.line = 2;
task.tier = 1;
task.taskType = TaskType.InStore;
task.storeCode = "123";
task.materialCode = "123";
task.materialType = 1;
task.operationType = OperationType.Automatic;
task.taskStatus = Entity.Enums.TaskStatus.Await;
task.beginTime = DateTime.Now;
task.recordTime = DateTime.Now;
RecordTask recordTask = Mapper.Map<RecordTask>(task);
recordTask.objid = System.Guid.NewGuid().ToString();*/
//var info = await new BaseServices<BaseMaterialInfo>().Add(new BaseMaterialInfo(System.Guid.NewGuid().ToString(), "测试"));
}
}
}