去除引用common.props

This commit is contained in:
2023-11-06 19:35:59 +08:00
parent 6a2154edd9
commit c6b8dfc861
810 changed files with 3910 additions and 6695 deletions

View File

@@ -6,8 +6,6 @@ using JNPF.Systems.Interfaces.System;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.BasicData.Entities;
using Tnb.BasicData.Entities.Dto;
using Tnb.BasicData.Entitys.Dto.BasProcess;
using Tnb.BasicData.Interfaces;
using Tnb.EquipMgr.Entities;
using Tnb.WarehouseMgr.Entities;
@@ -19,14 +17,14 @@ namespace Tnb.BasicData
/// </summary>
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 1102)]
[Route("api/[area]/[controller]/[action]")]
public class BasQrcodeService : IBasQrcodeService,IDynamicApiController, ITransient
public class BasQrcodeService : IBasQrcodeService, IDynamicApiController, ITransient
{
private readonly ISqlSugarRepository<BasMaterial> _repository;
private readonly DataBaseManager _dbManager;
private readonly IDictionaryDataService _dictionaryDataService;
public BasQrcodeService(
ISqlSugarRepository<BasMaterial> repository,DataBaseManager dbManager,IDictionaryDataService dictionaryDataService)
ISqlSugarRepository<BasMaterial> repository, DataBaseManager dbManager, IDictionaryDataService dictionaryDataService)
{
_repository = repository;
_dbManager = dbManager;
@@ -34,22 +32,26 @@ namespace Tnb.BasicData
}
[HttpPost]
public async Task<dynamic> GetQrcodeByCode(Dictionary<string, string> dic)
public async Task<dynamic?> GetQrcodeByCode(Dictionary<string, string> dic)
{
string code = dic.ContainsKey("code") ? dic["code"] : "";
if (string.IsNullOrEmpty(code)) return null;
if (string.IsNullOrEmpty(code))
{
return null;
}
var result = await _repository.AsSugarClient().Queryable<BasQrcode>()
.LeftJoin<OrganizeEntity>((a, b) => a.source_id == b.Id)
.LeftJoin<EqpEquipment>((a, b, c) => a.source_id == c.id)
.LeftJoin<ToolLocation>((a, b, c, d) => a.source_id == d.id)
.LeftJoin<BasLocation>((a,b,c,d,e)=>a.source_id==e.id)
.LeftJoin<WmsCarryH>((a,b,c,d,e,f)=>a.source_id==f.id)
.LeftJoin<BasLocation>((a, b, c, d, e) => a.source_id == e.id)
.LeftJoin<WmsCarryH>((a, b, c, d, e, f) => a.source_id == f.id)
.Where((a, b, c, d) => a.code == code)
.Select((a, b, c, d,e,f) => new
.Select((a, b, c, d, e, f) => new
{
id = a.id,
source_id = a.source_id,
source_name = a.source_name,
a.id,
a.source_id,
a.source_name,
org_code = b.EnCode,
org_name = b.FullName,
equip_code = a.code,
@@ -57,27 +59,31 @@ namespace Tnb.BasicData
tool_location_code = d.location_code,
bas_location_name = e.location_name,
bas_location_code = e.location_code,
carry_name = f.carry_name,
carry_code = f.carry_code,
f.carry_name,
f.carry_code,
}).FirstAsync();
return result;
}
[HttpPost]
public async Task<dynamic> GetWorkStationByCode(Dictionary<string, string> dic)
public async Task<dynamic?> GetWorkStationByCode(Dictionary<string, string> dic)
{
string code = dic.ContainsKey("code") ? dic["code"] : "";
if (string.IsNullOrEmpty(code)) return null;
if (string.IsNullOrEmpty(code))
{
return null;
}
var result = await _repository.AsSugarClient().Queryable<BasQrcode>()
.LeftJoin<OrganizeEntity>((a, b) => a.source_id == b.Id)
.LeftJoin<OrganizeRelationEntity>((a,b,c)=>a.source_id==c.ObjectId && c.ObjectType=="Eqp")
.LeftJoin<OrganizeEntity>((a,b,c,d)=>c.OrganizeId==d.Id)
.LeftJoin<OrganizeRelationEntity>((a, b, c) => a.source_id == c.ObjectId && c.ObjectType == "Eqp")
.LeftJoin<OrganizeEntity>((a, b, c, d) => c.OrganizeId == d.Id)
.Where((a, b, c) => a.code == code)
.Select((a, b, c,d) => new
.Select((a, b, c, d) => new
{
id = a.id,
source_id = a.source_id,
source_name = a.source_name,
a.id,
a.source_id,
a.source_name,
org_id = b.Id,
org_code = b.EnCode,
org_name = b.FullName,