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.
|
|
|
|
using AUCMA.STORE.Entity.DAO;
|
|
|
|
|
using AUCMA.STORE.SqlSugar;
|
|
|
|
|
using AUCMA.STORE.SqlSugar.serviceImpl;
|
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace AUCMA.STORE.UnitTest
|
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class UnitTest12
|
|
|
|
|
{
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void TestMethod1()
|
|
|
|
|
{
|
|
|
|
|
//获取数据访问类对象
|
|
|
|
|
SqlSugarClient sqlServerDB = SqlGenerator.GetOracleInstance();
|
|
|
|
|
|
|
|
|
|
var imosTeBoms = sqlServerDB.Ado.SqlQuery<ImosTeBom>("select A.Bar_Code,nvl(C.Detial_Material_Code,A.Order_Material_Code) Detial_Material_Code," +
|
|
|
|
|
"nvl(C.Detial_Material_Name, A.Order_Material_Name) Detial_Material_Name, A.Order_No, A.material_name " +
|
|
|
|
|
" from imos_pr_barcode_record A left join imos_te_bom C ON A.Order_Material_code = C.Master_Material_Code " +
|
|
|
|
|
"where A.Bar_Code = @BarCode AND C.Detial_Type_Code_d = @DetialTypeCoded",
|
|
|
|
|
new List<SugarParameter>(){
|
|
|
|
|
new SugarParameter("@BarCode","81060198752B000XCM5053"),
|
|
|
|
|
new SugarParameter("@DetialTypeCoded","1000") //执行sql语句
|
|
|
|
|
});
|
|
|
|
|
var info = sqlServerDB.Queryable<BaseLocationInfo>().ToList();
|
|
|
|
|
|
|
|
|
|
sqlServerDB.Close();
|
|
|
|
|
}
|
|
|
|
|
private async void test()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|