去除引用common.props
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Models;
|
||||
@@ -9,12 +8,6 @@ using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Systems.Common;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Interfaces.Common;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
@@ -45,13 +38,13 @@ namespace Tnb.EquipMgr
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<string> Upload([FromForm]string equip_id,[FromForm] ChunkModel input)
|
||||
public async Task<string> Upload([FromForm] string equip_id, [FromForm] ChunkModel input)
|
||||
{
|
||||
string msg = "";
|
||||
try
|
||||
{
|
||||
var attachment = await _fileService.Uploader("annexpic", input);
|
||||
|
||||
|
||||
EqpEquipFile eqpEquipFile = new EqpEquipFile()
|
||||
{
|
||||
file_name = input.file.FileName,
|
||||
@@ -85,21 +78,21 @@ namespace Tnb.EquipMgr
|
||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||
}
|
||||
var result = await db.Queryable<EqpEquipFile>()
|
||||
.LeftJoin<UserEntity >((a, b) => a.create_id == b.Id)
|
||||
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
||||
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||
.WhereIF(queryJson!=null && queryJson.ContainsKey("file_name"),(a,b,c,d)=>a.file_name.Contains(queryJson!["file_name"]))
|
||||
.Select((a, b, c,d) => new EquipFileQueryOutput
|
||||
.LeftJoin<UserEntity>((a, b) => a.create_id == b.Id)
|
||||
.LeftJoin<UserEntity>((a, b, c) => a.modify_id == c.Id)
|
||||
.LeftJoin<EqpEquipment>((a, b, c, d) => a.equip_id == d.id)
|
||||
.Where((a, b, c, d) => a.equip_id == input.equip_id)
|
||||
.WhereIF(queryJson != null && queryJson.ContainsKey("file_name"), (a, b, c, d) => a.file_name.Contains(queryJson!["file_name"]))
|
||||
.Select((a, b, c, d) => new EquipFileQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
attachment = a.attachment,
|
||||
create_id = b.RealName,
|
||||
create_id_id = a.create_id,
|
||||
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
equip_id=d.name,
|
||||
equip_id_id= a.equip_id,
|
||||
file_name=a.file_name,
|
||||
create_time = a.create_time == null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||
equip_id = d.name,
|
||||
equip_id_id = a.equip_id,
|
||||
file_name = a.file_name,
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
return PageResult<EquipFileQueryOutput>.SqlSugarPageResult(result);
|
||||
|
||||
Reference in New Issue
Block a user