去除引用common.props
This commit is contained in:
@@ -6,7 +6,6 @@ using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.EquipMgr.Entities.Dto;
|
||||
@@ -40,11 +39,11 @@ namespace Tnb.EquipMgr
|
||||
// queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input?.queryJson ?? "");
|
||||
// }
|
||||
var result = await db.Queryable<EqpWorkshopChangeLog>()
|
||||
.LeftJoin<OrganizeEntity>((a,b)=>a.old_workshop_id==b.Id)
|
||||
.LeftJoin<OrganizeEntity>((a,b,c)=>a.new_workshop_id==c.Id)
|
||||
.WhereIF(input!=null,a=>a.equip_id==input!.equip_id)
|
||||
.LeftJoin<OrganizeEntity>((a, b) => a.old_workshop_id == b.Id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c) => a.new_workshop_id == c.Id)
|
||||
.WhereIF(input != null, a => a.equip_id == input!.equip_id)
|
||||
//.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),a=>a.name.Contains(queryJson["name"]))
|
||||
.Select((a,b,c) => new EquipWorkshopChangeQueryOutput
|
||||
.Select((a, b, c) => new EquipWorkshopChangeQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
old_workshop_id = b.FullName,
|
||||
@@ -52,8 +51,8 @@ namespace Tnb.EquipMgr
|
||||
old_installation_location = a.old_installation_location,
|
||||
new_installation_location = a.new_installation_location,
|
||||
remark = a.remark,
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
}).ToPagedListAsync((input?.currentPage??1), (input?.pageSize??50));
|
||||
create_time = a.create_time == null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
}).ToPagedListAsync((input?.currentPage ?? 1), (input?.pageSize ?? 50));
|
||||
|
||||
return PageResult<EquipWorkshopChangeQueryOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
@@ -62,7 +61,7 @@ namespace Tnb.EquipMgr
|
||||
public async Task<dynamic> WorkshopChange(EquipWorkshopChangeInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||
{
|
||||
EqpEquipment eqpEquipment = await db.Queryable<EqpEquipment>().SingleAsync(x => x.id == input.equip_id);
|
||||
|
||||
@@ -88,7 +87,7 @@ namespace Tnb.EquipMgr
|
||||
|
||||
});
|
||||
|
||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "迁移成功" : result.ErrorMessage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user