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": {
"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": {
"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 Volo.Abp.TenantManagement;
using Microsoft.IdentityModel.Logging;
using Microsoft.Extensions.Logging;
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.Company);
var tenant = await _tenantStore.FindAsync(entity.Site);
//bool flag = true;
bool flag = true;
using (CurrentTenant.Change(tenant.Id, tenant.Name))
{
using (_dataFilter.Disable<IMultiTenant>())
{
Validator.CheckSupplierCode(_taVenderRepository, entity.Site, entity.SupplierCode);
/*flag = */
await _tbReceiptRepository.GetCountAsync(ObjectMapper.Map<Receipt, TB_RECEIVE_QAD>(entity));
flag =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*/);
}
@ -115,12 +123,13 @@ namespace Win_in.Sfs.Scp.WebApi
catch (Exception ex)
{
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 +
" State = " + qad.State
);
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 +
" 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

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

@ -1,6 +1,8 @@
{
"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": {
"Clients": {

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

@ -5,7 +5,8 @@
"RedirectAllowedUrls": "https://scp.iacchina.net:9988"
},
"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": {
"Authority": "https://scp.iacchina.net:9988",
@ -68,7 +69,7 @@
{
"Name": "MSSqlServer",
"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",
"autoCreateSqlTable": true
}

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

@ -5,8 +5,8 @@
"RedirectAllowedUrls": "https://localhost:9988"
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Scp_WebApi;User ID=sa;Password=Microsoft2008;connection timeout=600;"
//"V1Scp": "Server=127.0.0.1;Database=SCP_HZ;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;"
},
"AuthServer": {
@ -70,7 +70,7 @@
{
"Name": "MSSqlServer",
"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",
"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)
{
ret = await InsertAsync(tbReceiptDetail);
LogHelper.LogInformation("TB_RECEIVE_QAD不存在!Site = " + tbReceiptDetail.Site + " ErpRecvBillNum = " +
tbReceiptDetail.ErpRecvBillNum + " PoLine = " + tbReceiptDetail.PoLine + " BillType = " + tbReceiptDetail.BillType + " CreateTime = " + tbReceiptDetail.CreateTime +
" 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;
Console.WriteLine("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " +
tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime);
LogHelper.LogInformation("TB_RECEIVE_QAD存在!Site = " + tbReceipt.Site + " ErpRecvBillNum = " +
tbReceipt.ErpRecvBillNum + " AsnBillNum = " + tbReceipt.AsnBillNum + " BillType = " + tbReceipt.BillType + " CreateTime = " + tbReceipt.CreateTime +
" State = " + tbReceipt.State

Loading…
Cancel
Save