Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
2b8d66a0c3
  1. 14
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Exception.cs
  2. 23
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs
  3. 7
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  4. 180
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs

14
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Exception.cs

@ -0,0 +1,14 @@
using Microsoft.AspNetCore.Mvc.Filters;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
using Volo.Abp.Authorization;
using Volo.Abp.Validation;
namespace Win.Sfs.SettleAccount
{
}

23
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs

@ -52,6 +52,7 @@ using Volo.Abp.Hangfire;
using Win.Sfs.SettleAccount.ImportExcelCommon; using Win.Sfs.SettleAccount.ImportExcelCommon;
using Volo.Abp.RabbitMQ; using Volo.Abp.RabbitMQ;
using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.EventBus.RabbitMq;
using Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
namespace Win.Sfs.SettleAccount namespace Win.Sfs.SettleAccount
{ {
@ -85,8 +86,12 @@ namespace Win.Sfs.SettleAccount
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
// System.AbpStringExtensions.ToCamelCase(System.String, Boolean)'
var configuration = context.Services.GetConfiguration();
// System.AbpStringExtensions.ToCamelCase(System.String, Boolean)'
var configuration = context.Services.GetConfiguration();
//文件上传大小限制 //文件上传大小限制
ConfigureBodyLengthLimit(context); ConfigureBodyLengthLimit(context);
@ -120,6 +125,20 @@ namespace Win.Sfs.SettleAccount
ConfigureBLOBTSecSummaryServices(configuration); ConfigureBLOBTSecSummaryServices(configuration);
ConfigureHangfire(context, configuration); ConfigureHangfire(context, configuration);
//context.Services.Configure<AbpExceptionHttpStatusCodeOptions>(options =>
//{
// options.Map("Volo.Qa:010002", System.Net.HttpStatusCode.Conflict);
//});
//context.Services.Configure<AbpExceptionHandlingOptions>(options =>
//{
// options.SendExceptionsDetailsToClients = false;
//});
/* /*
Configure<AbpRabbitMqOptions>(options => Configure<AbpRabbitMqOptions>(options =>
{ {

7
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -354,6 +354,13 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
string year, string period, string version,string sapCode, string customerCode, string factory, string matialCode, string state string year, string period, string version,string sapCode, string customerCode, string factory, string matialCode, string state
) )
{ {
//if (!_settleAccountVersionrepository.Any(p => p.Version == version)) //if (!_settleAccountVersionrepository.Any(p => p.Version == version))
//{ //{
// throw new BusinessException("8989", string.Format("不存结算{0}期间",version)); // throw new BusinessException("8989", string.Format("不存结算{0}期间",version));

180
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs

@ -1,6 +1,8 @@
using Dapper; using Dapper;
using Magicodes.ExporterAndImporter.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -16,9 +18,46 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string wms_seq { set; get; } public string wms_seq { set; get; }
public string wms_table { set; get; } public string wms_table { set; get; }
public string wms_state { set; get; } public string wms_state { set; get; }
public string SourceBillNum { set; get; } public string SourceBillNum { set; get; }//单号
public DateTime AccountDate { set; get; }//过账日期
}
public class TA_WMS_JSKH
{ [ExporterHeader(DisplayName ="GUID",IsIgnore =true)]
public string wms_seq { set; get; }
[ExporterHeader(DisplayName = "行号")]
public string POSNR { set; get; }
[ExporterHeader(DisplayName ="结算单号")]
public string ZVBELN { set; get; }
[ExporterHeader(DisplayName ="售达方")]
public string KUNNR { set; get; }
[ExporterHeader(DisplayName ="订单原因")]
public string AUGRU { set; get; }
[ExporterHeader(DisplayName ="物料编码")]
public string MATNR { set; get; }
[ExporterHeader(DisplayName ="销售价格")]
public string ZPR0 { set; get; }
[ExporterHeader(DisplayName ="数量")]
public string KWMENG { set; get; }
[ExporterHeader(DisplayName ="工厂")]
public string ZNOTE1 { set; get; }
[ExporterHeader(DisplayName ="单价")]
public string ZNOTE5 { set; get; }
[ExporterHeader(DisplayName ="状态")]
public string STATE { set; get; }
[ExporterHeader(DisplayName ="单号")]
public string REMARK { set; get; }
public DateTime AccountDate { set; get; }
} }
@ -35,15 +74,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
if (!string.IsNullOrEmpty(begin)) if (!string.IsNullOrEmpty(begin))
{ {
str += string.Format(" and AccountDate>={0} ", begin); str += string.Format(" and AccountDate>='{0}' ", begin);
} }
if (!string.IsNullOrEmpty(end)) if (!string.IsNullOrEmpty(end))
{ {
str += string.Format(" and AccountDate<={0} ", end); str += string.Format(" and AccountDate<='{0}' ", end);
} }
var sql = "SELECT TOP (1000) [wms_seq]\n" + var sql = "SELECT TOP (1000) [wms_seq]\n" +
" ,[wms_table]\n" + " ,[wms_table]\n" +
" ,[wms_table_qty]\n" + " ,[wms_table_qty]\n" +
" ,[wms_state]\n" + " ,[wms_state]\n" +
@ -65,6 +104,52 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
} }
public virtual List<TA_WMS_CTRL> GetTaskList(string begin, string end)
{
var str = "";
if (!string.IsNullOrEmpty(begin))
{
str += string.Format(" and AccountDate>='{0}' ", begin);
}
if (!string.IsNullOrEmpty(end))
{
str += string.Format(" and AccountDate<='{0}' ", end);
}
var sql = "SELECT TOP (1000) [wms_seq]\n" +
" ,[wms_table]\n" +
" ,[wms_table_qty]\n" +
" ,[wms_state]\n" +
" ,[remark]\n" +
" ,[createtime]\n" +
" ,[wms_domin]\n" +
" ,[SourceBillNum]\n" +
" ,[updatetime]\n" +
" ,[wms_uid]\n" +
" ,[JsonString]\n" +
" ,[AccountDate]\n" +
" FROM [TA_WMS_CTRL] WHERE {0}" +
" SourceBillNum LIKE 'S2%' order by createtime desc2";
sql = string.Format(sql, str);
var query = DbConnection.Query<TA_WMS_CTRL>(sql);
return query.ToList();
}
public virtual void InsertWmsSum(List<WmsOutputSumReport> p_list,string version,DateTime accountDate) public virtual void InsertWmsSum(List<WmsOutputSumReport> p_list,string version,DateTime accountDate)
{ {
StringBuilder _buffer = new StringBuilder(); StringBuilder _buffer = new StringBuilder();
@ -73,52 +158,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
foreach (var itm in p_list) foreach (var itm in p_list)
{ {
// var sql ="INSERT INTO [dbo].[TA_WMS_JSKH]\n" +
//" ([wms_seq]\n" +
//" ,[POSNR]\n" +
//" ,[ZVBELN]\n" +
//" ,[AUART]\n" +
//" ,[VKORG]\n" +
//" ,[SPART]\n" +
//" ,[VTWEG]\n" +
//" ,[KUNNR]\n" +
//" ,[KUNNR2]\n" +
//" ,[AUGRU]\n" +
//" ,[MATNR]\n" +
//" ,[WERKS]\n" +
//" ,[LGORT]\n" +
//" ,[ZPR0]\n" +
//" ,[KWMENG]\n" +
//" ,[ZNOTE1]\n" +
//" ,[ZNOTE2]\n" +
//" ,[ZNOTE3]\n" +
//" ,[ZNOTE4]\n" +
//" ,[ZNOTE5]\n" +
//" ,[STATE]\n" +
//" ,[REMARK])\n" +
//" VALUES\n" +
//" ( '{0}' wms_seq,\n" +
//" '{1}' POSNR, \n" +
//" '{2}' ZVBELN, \n" +
//" '{3}' AUART, \n" +
//" '{4}' VKORG, \n" +
//" '{5}' SPART, \n" +
//" '{6}' VTWEG, \n" +
//" '{7}' KUNNR, \n" +
//" '{8}' KUNNR2, \n" +
//" '{9}' AUGRU, \n" +
//" '{10}' MATNR, \n" +
//" '{11}' WERKS, \n" +
//" '{12}' LGORT, \n" +
//" '{13}' ZPR0, \n" +
//" '{14}' KWMENG, \n" +
//" '{15}' ZNOTE1, \n" +
//" '{16}' ZNOTE2, \n" +
//" '{17}' ZNOTE3, \n" +
//" '{18}' ZNOTE4, \n" +
//" '{19}' ZNOTE5, \n" +
//" {20} STATE, \n" +
//" '{21}' REMARK ) \n"+
var sql = "INSERT INTO [dbo].[TA_WMS_JSKH]\n" + var sql = "INSERT INTO [dbo].[TA_WMS_JSKH]\n" +
" ([wms_seq]\n" + " ([wms_seq]\n" +
" ,[POSNR]\n" + " ,[POSNR]\n" +
@ -244,45 +283,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//" \n" +
//"SELECT NEWID() [wms_seq] \n" +
//" ,[行号] [POSNR] \n" +
//" ,[结算单] [ZVBELN] \n" +
//" ,'ZOR1' [AUART] \n" +
//" ,'1001' [VKORG] \n" +
//" ,'00' [SPART] \n" +
//" ,[销售渠道] [VTWEG] \n" +
//" ,[客户代码] [KUNNR] \n" +
//" ,[客户代码] [KUNNR2] \n" +
//" ,[结算编码] [AUGRU] \n" +
//" ,[物料号] [MATNR] \n" +
//" ,'1000' [WERKS] \n" +
//" ,[寄售类别] [LGORT] \n" +
//" ,[实际出库数量] [KWMENG] \n" +
//" ,已出库金额 [ZPR0]\n" +
//" ,'' [ZNOTE1] \n" +
//" ,'' [ZNOTE2] \n" +
//" ,'' [ZNOTE3] \n" +
//" ,'' [ZNOTE4] \n" +
//" ,'' [ZNOTE5] \n" +
//" ,0 [STATE] \n" +
//" ,'' [REMARK] \n" +
//" \n" +
//" FROM [CPAT_WMS_TEST].[dbo].[temp1]"
//DbConnection.Execute("INSERT ")
} }
} }
} }

Loading…
Cancel
Save