varmother_data=_connection.QueryFirstOrDefault<dc_base_mother_sku>(" select * from dc_base_mother_sku where id=@id ",new{id=input_data.mother_id});
varconn=MyMySqlConnection._connection;
conn.Open();
using(vart=conn.BeginTransaction())
{
try
{
varmother_data=conn.QueryFirstOrDefault<dc_base_mother_sku>(" select * from dc_base_mother_sku where id=@id ",new{id=input_data.mother_id});
foreach(varitemininput_data.ids)
{
vartrunData=conn.QueryFirstOrDefault<AutoTurnOver.Models.dc_auto_turnover>(" select * from dc_auto_turnover where id=@id ",new{id=item});
vartrunData=conn.QueryFirstOrDefault<AutoTurnOver.Models.dc_auto_turnover>(" select * from dc_auto_turnover where id=@id ",new{id=item});
// 查询是否有旧记录
varoldLog=conn.QueryFirstOrDefault<dc_base_mother_sku_map>(" select * from dc_base_mother_sku_map where bailun_sku_warehouse_code=@bailun_sku_warehouse_code ",new
return_connection.Query<dc_base_mother_sku_dto>(" select t1.*,t2.warehouse_name from dc_base_mother_sku as t1 left join dc_base_warehouse as t2 on t1.warehouse_code=t2.warehouse_code where t1.sku like @name ",new{name=$"%{name}%"}).ToList();
return_connection.Query<dc_base_mother_sku_dto>(" select t1.*,t2.warehouse_name from dc_base_mother_sku as t1 left join dc_base_warehouse as t2 on t1.warehouse_code=t2.warehouse_code where t1.sku like @name ",new{name=$"%{name}%"}).ToList();
varskus=_connection.Query<dc_base_mother_sku_map>(" select * from dc_base_mother_sku_map where mother_sku_warehouse_code=@mother_sku_warehouse_code ",new
storage_capacity=_connection.QueryFirstOrDefault<int?>(" select * from dc_base_storage_capacity where bailun_sku_warehouse_code in @bailun_sku_warehouse_codes ",new
varmother_sku_map_data=_connection.QueryFirstOrDefault<dc_base_mother_sku_map>(" select * from dc_base_mother_sku_map where bailun_sku_warehouse_code=@bailun_sku_warehouse_code ",new{