Browse Source

本地测试日志

master
qian 4 months ago
parent
commit
a72fc98af9
  1. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json
  2. 19
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs
  3. 4
      WebApiService/src/Win_in.Sfs.Scp.WebApi.DbMigrator/appsettings.json
  4. 5
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.Production.json
  5. 6
      WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json
  6. 1
      WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbReceiptDetailRepository.cs
  7. 1
      WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbReceiptRepository.cs

4
WebApiService/src/Win_in.Sfs.Scp.WebApi.Agent/appsettings.json

@ -1,6 +1,8 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;" "Default": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;",
"V1Scp": "Server=dev.ccwin-in.com,6207;Database=SCP_TJ_PRD;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;"
}, },
"Serilog": { "Serilog": {
"Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.MSSqlServer" ], "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.MSSqlServer" ],

19
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs

@ -14,6 +14,7 @@ using Volo.Abp.Validation;
using Win_in.Sfs.Scp.v1.Domain; using Win_in.Sfs.Scp.v1.Domain;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Logging;
using Microsoft.Extensions.Logging;
namespace Win_in.Sfs.Scp.WebApi namespace Win_in.Sfs.Scp.WebApi
{ {
@ -98,15 +99,22 @@ namespace Win_in.Sfs.Scp.WebApi
Validator.CheckSite(_tenantRepository, entity.Site); Validator.CheckSite(_tenantRepository, entity.Site);
Validator.CheckSite(_tenantRepository, entity.Company); Validator.CheckSite(_tenantRepository, entity.Company);
var tenant = await _tenantStore.FindAsync(entity.Site); var tenant = await _tenantStore.FindAsync(entity.Site);
//bool flag = true; bool flag = true;
using (CurrentTenant.Change(tenant.Id, tenant.Name)) using (CurrentTenant.Change(tenant.Id, tenant.Name))
{ {
using (_dataFilter.Disable<IMultiTenant>()) using (_dataFilter.Disable<IMultiTenant>())
{ {
Validator.CheckSupplierCode(_taVenderRepository, entity.Site, entity.SupplierCode); Validator.CheckSupplierCode(_taVenderRepository, entity.Site, entity.SupplierCode);
/*flag = */ flag =await _tbReceiptRepository.GetCountAsync(ObjectMapper.Map<Receipt, TB_RECEIVE_QAD>(entity));
await _tbReceiptRepository.GetCountAsync(ObjectMapper.Map<Receipt, TB_RECEIVE_QAD>(entity)); if (!flag)
{
var tbReceipt = ObjectMapper.Map<Receipt, TB_RECEIVE_QAD>(entity);
Logger.LogInformation("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " +
tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime +
" State = " + tbReceipt.State
);
}
await UpsertTbReceiptAndTbReceiptDetailAsync(entity, tenant.Id/*, flag*/); await UpsertTbReceiptAndTbReceiptDetailAsync(entity, tenant.Id/*, flag*/);
} }
@ -115,12 +123,13 @@ namespace Win_in.Sfs.Scp.WebApi
catch (Exception ex) catch (Exception ex)
{ {
var qad = ObjectMapper.Map<Receipt, TB_RECEIVE_QAD>(entity); var qad = ObjectMapper.Map<Receipt, TB_RECEIVE_QAD>(entity);
LogHelper.LogInformation("TB_RECEIVE_QAD!Site = " + qad.Site + " ErpRecvBillNum = " +
Logger.LogInformation("TB_RECEIVE_QAD!Site = " + qad.Site + " ErpRecvBillNum = " +
qad.ErpRecvBillNum + " AsnBillNum = " + qad.AsnBillNum + " BillType = " + qad.BillType + " CreateTime = " + qad.CreateTime + qad.ErpRecvBillNum + " AsnBillNum = " + qad.AsnBillNum + " BillType = " + qad.BillType + " CreateTime = " + qad.CreateTime +
" State = " + qad.State " State = " + qad.State
); );
var detail_qad = ObjectMapper.Map<Receipt,TB_RECEIVE_DETAIL_QAD>(entity); var detail_qad = ObjectMapper.Map<Receipt,TB_RECEIVE_DETAIL_QAD>(entity);
LogHelper.LogInformation("TB_RECEIVE_DETAIL_QAD!Site = " + detail_qad.Site + " ErpRecvBillNum = " + Logger.LogInformation("TB_RECEIVE_DETAIL_QAD!Site = " + detail_qad.Site + " ErpRecvBillNum = " +
detail_qad.ErpRecvBillNum + " PoLine = " + detail_qad.PoLine + " BillType = " + detail_qad.BillType + " CreateTime = " + detail_qad.CreateTime + detail_qad.ErpRecvBillNum + " PoLine = " + detail_qad.PoLine + " BillType = " + detail_qad.BillType + " CreateTime = " + detail_qad.CreateTime +
" State = " + detail_qad.State + " qty = " + detail_qad.Qty + " DockCode = " + detail_qad.DockCode + " Batch =" + detail_qad.Batch + " State = " + detail_qad.State + " qty = " + detail_qad.Qty + " DockCode = " + detail_qad.DockCode + " Batch =" + detail_qad.Batch +
" VendBatch = " + detail_qad.VendBatch + " Remark =" + detail_qad.Remark + " PoUnit= " + detail_qad.PoUnit + " Rate =" + detail_qad.Rate " VendBatch = " + detail_qad.VendBatch + " Remark =" + detail_qad.Remark + " PoUnit= " + detail_qad.PoUnit + " Rate =" + detail_qad.Rate

4
WebApiService/src/Win_in.Sfs.Scp.WebApi.DbMigrator/appsettings.json

@ -1,6 +1,8 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Scp_WebApi;User ID=sa;Password=Microsoft2008;connection timeout=600;" "Default": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;",
"V1Scp": "Server=dev.ccwin-in.com,6207;Database=SCP_TJ_PRD;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;"
}, },
"IdentityServer": { "IdentityServer": {
"Clients": { "Clients": {

5
WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.Production.json

@ -5,7 +5,8 @@
"RedirectAllowedUrls": "https://scp.iacchina.net:9988" "RedirectAllowedUrls": "https://scp.iacchina.net:9988"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1,13314;Database=Scp_WebApi;User ID=superadmin;Password=Microsoft@2021;connection timeout=600;" "Default": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;",
"V1Scp": "Server=dev.ccwin-in.com,6207;Database=SCP_TJ_PRD;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;"
}, },
"AuthServer": { "AuthServer": {
"Authority": "https://scp.iacchina.net:9988", "Authority": "https://scp.iacchina.net:9988",
@ -68,7 +69,7 @@
{ {
"Name": "MSSqlServer", "Name": "MSSqlServer",
"Args": { "Args": {
"connectionString": "Server=127.0.0.1;Database=Scp_WebApi;User ID=sa;Password=Microsoft2008;connection timeout=600;", "connectionString": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;",
"tableName": "AppLogs", "tableName": "AppLogs",
"autoCreateSqlTable": true "autoCreateSqlTable": true
} }

6
WebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json

@ -5,8 +5,8 @@
"RedirectAllowedUrls": "https://localhost:9988" "RedirectAllowedUrls": "https://localhost:9988"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Scp_WebApi;User ID=sa;Password=Microsoft2008;connection timeout=600;" "Default": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;",
//"V1Scp": "Server=127.0.0.1;Database=SCP_HZ;User ID=sa;Password=Microsoft2008;connection timeout=600;" "V1Scp": "Server=dev.ccwin-in.com,6207;Database=SCP_TJ_PRD;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;"
}, },
"AuthServer": { "AuthServer": {
@ -70,7 +70,7 @@
{ {
"Name": "MSSqlServer", "Name": "MSSqlServer",
"Args": { "Args": {
"connectionString": "Server=127.0.0.1;Database=Scp_WebApi;User ID=sa;Password=Microsoft2008;connection timeout=600;", "connectionString": "Server=dev.ccwin-in.com,6207;Database=Scp_WebApi_UAT;User ID=sa;Password=ChangkeTec@2021;connection timeout=600;",
"tableName": "AppLogs", "tableName": "AppLogs",
"autoCreateSqlTable": true "autoCreateSqlTable": true
} }

1
WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbReceiptDetailRepository.cs

@ -23,6 +23,7 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore
if (current == null) if (current == null)
{ {
ret = await InsertAsync(tbReceiptDetail); ret = await InsertAsync(tbReceiptDetail);
LogHelper.LogInformation("TB_RECEIVE_QAD不存在!Site = " + tbReceiptDetail.Site + " ErpRecvBillNum = " + LogHelper.LogInformation("TB_RECEIVE_QAD不存在!Site = " + tbReceiptDetail.Site + " ErpRecvBillNum = " +
tbReceiptDetail.ErpRecvBillNum + " PoLine = " + tbReceiptDetail.PoLine + " BillType = " + tbReceiptDetail.BillType + " CreateTime = " + tbReceiptDetail.CreateTime + tbReceiptDetail.ErpRecvBillNum + " PoLine = " + tbReceiptDetail.PoLine + " BillType = " + tbReceiptDetail.BillType + " CreateTime = " + tbReceiptDetail.CreateTime +
" State = " + tbReceiptDetail.State +" qty = "+ tbReceiptDetail.Qty + " DockCode = " + tbReceiptDetail.DockCode + " Batch =" +tbReceiptDetail.Batch + " State = " + tbReceiptDetail.State +" qty = "+ tbReceiptDetail.Qty + " DockCode = " + tbReceiptDetail.DockCode + " Batch =" +tbReceiptDetail.Batch +

1
WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Repositories/TbReceiptRepository.cs

@ -61,6 +61,7 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore
flag = false; flag = false;
Console.WriteLine("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " + Console.WriteLine("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " +
tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime); tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime);
LogHelper.LogInformation("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " + LogHelper.LogInformation("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " +
tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime + tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime +
" State = " + tbReceipt.State " State = " + tbReceipt.State

Loading…
Cancel
Save