去除引用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

@@ -1,7 +1,5 @@
using JNPF;
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Extras.CollectiveOAuth.Models;
@@ -14,20 +12,14 @@ using JNPF.Systems.Interfaces.System;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SqlSugar;
using Tnb.BasicData;
using Tnb.BasicData.Entities;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Interfaces;
using Tnb.WarehouseMgr.Entities;
using Tnb.WarehouseMgr.Entities.Dto;
using Tnb.ProductionMgr.Entities.Consts;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Interfaces;
using Tnb.ProductionMgr.Entities.Consts;
using Tnb.WarehouseMgr;
using Tnb.WarehouseMgr.Entities;
using Tnb.BasicData;
using Tnb.WarehouseMgr.Entities.Dto;
namespace Tnb.ProductionMgr
{
@@ -57,7 +49,7 @@ namespace Tnb.ProductionMgr
_billRullService = billRullService;
}
[HttpPost]
public async Task<dynamic> GetInfoByQrCode(string qrCode)
{
@@ -120,7 +112,7 @@ namespace Tnb.ProductionMgr
carry_name = b.carry_name,
children = SqlFunc.Subqueryable<PrdMaterialReceiptD>()
.LeftJoin<BasMaterial>((c, d) => c.material_id == d.id)
.Where((c, d) => a.id == c.material_receipt_id && c.is_all_feeding==0).ToList((c, d) => new CarryCodeDetailOutput()
.Where((c, d) => a.id == c.material_receipt_id && c.is_all_feeding == 0).ToList((c, d) => new CarryCodeDetailOutput()
{
unit_id = d.unit_id,
// barcode = c.barcode,
@@ -148,14 +140,14 @@ namespace Tnb.ProductionMgr
var moTask = await db.Queryable<PrdMoTask>().FirstAsync(x => x.id == input.mo_task_id);
var inputMaterials = await db.Queryable<BasMbomInput>()
.Where(x => x.mbom_id == moTask.bom_id)
.WhereIF(!string.IsNullOrEmpty(input.mbom_process_id),x=>x.mbom_process_id==input.mbom_process_id)
.Select(x=>x.material_id)
.WhereIF(!string.IsNullOrEmpty(input.mbom_process_id), x => x.mbom_process_id == input.mbom_process_id)
.Select(x => x.material_id)
.ToListAsync();
string code = await _billRullService.GetBillNumber(Tnb.BasicData.CodeTemplateConst.MATERIAL_RECEIPT_CODE);
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(input.station_id, DictConst.RegionCategoryWorklineCode);
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(input.station_id, DictConst.RegionCategoryWorkshopCode);
prdMaterialReceiptH = new PrdMaterialReceiptH()
{
code = code,
@@ -178,9 +170,9 @@ namespace Tnb.ProductionMgr
{
foreach (var item in input.details)
{
if(!inputMaterials.Contains(item["material_id"]))
if (!inputMaterials.Contains(item["material_id"]))
throw new Exception("该物料不是生产bom投入物料不能签收");
list.Add(new PrdMaterialReceiptD
{
material_receipt_id = prdMaterialReceiptH.id,
@@ -205,13 +197,13 @@ namespace Tnb.ProductionMgr
throw new Exception("没有签收物料");
}
// await db.Insertable<PrdMaterialReceiptH>(prdMaterialReceiptH).ExecuteCommandAsync();
// await db.Insertable<PrdMaterialReceiptD>(list).ExecuteCommandAsync();
});
if (result.IsSuccess)
{
//签收后调用载具签收接口
@@ -228,13 +220,13 @@ namespace Tnb.ProductionMgr
create_id = _userManager.UserId,
carry_code = input.carry_code ?? "",
};
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
Dictionary<string, object> header = new Dictionary<string, object>()
{
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
};
var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CARRY_SIGN,JsonConvert.SerializeObject(mesCarrySignInput),header);
var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CARRY_SIGN, JsonConvert.SerializeObject(mesCarrySignInput), header);
Log.Information(sendResult);
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
if (authResponse.code != 200)
@@ -248,11 +240,11 @@ namespace Tnb.ProductionMgr
await db.Insertable<PrdMaterialReceiptH>(prdMaterialReceiptH).ExecuteCommandAsync();
await db.Insertable<PrdMaterialReceiptD>(list).ExecuteCommandAsync();
});
}
}
if(!result.IsSuccess) throw Oops.Bah(result.ErrorMessage);
if(!result2.IsSuccess) throw Oops.Bah(result2.ErrorMessage);
if (!result.IsSuccess) throw Oops.Bah(result.ErrorMessage);
if (!result2.IsSuccess) throw Oops.Bah(result2.ErrorMessage);
return "签收成功";
}
}