Commit 726e5662 by guanzhenshan

1、增加资产负债表

2、调拨单明细增加transitcount字段
parent e2bb6d31
......@@ -189,6 +189,11 @@ namespace Bailun.DC.AllotOrderDetail.Models
/// 入库总数
/// </summary>
public int StorageCount { get; set; }
/// <summary>
/// 在途待上架数量
/// </summary>
public int TransitCount { get; set; }
}
public class Result_Allot
......
......@@ -23,6 +23,8 @@ namespace Bailun.DC.AllotOrderDetail.Models
public int storagecount { get; set; }
public int? transitcount { get; set; }
public DateTime createtime { get; set; }
}
......
......@@ -7,22 +7,22 @@ namespace Bailun.DC.AllotOrderDetail
{
class Program
{
//static async Task Main(string[] args)
//{
// Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// {
// services.AddHostedService<Services>();
// });
static async Task Main(string[] args)
{
Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Services>();
});
// await builder.RunConsoleAsync();
//}
await builder.RunConsoleAsync();
}
static void Main(string[] args)
{
var service = new Services();
service.Init();
}
//static void Main(string[] args)
//{
// var service = new Services();
// service.Init();
//}
}
}
......@@ -75,7 +75,12 @@ namespace Bailun.DC.AllotOrderDetail
var total = -1;
//测试
starttime = DateTime.Parse("2020-07-01");
#if DEBUG
starttime = DateTime.Parse("2020-12-08 09:37:30");
endtime = starttime.AddSeconds(10);
#endif
while (total == -1 || total > ((page-1) * rows))
{
......@@ -195,7 +200,8 @@ namespace Bailun.DC.AllotOrderDetail
productname = sku.ProductName,
sku = sku.Sku,
storagecount = sku.StorageCount,
transferno = item.Code
transferno = item.Code,
transitcount = sku.TransitCount,
};
cn.Insert<dc_base_transfer_info_skus>(s);
......
......@@ -5,12 +5,16 @@ using Dapper;
using MySql.Data.MySqlClient;
using Bailun.DC.Common;
using Bailun.DC.Models;
using System.Data;
using System.Linq;
namespace Bailun.DC.Services
{
public class BalanceSheetServices
{
#region 资产负债表
/// <summary>
/// 获取资产负债表导入表格的汇总金额
/// </summary>
......@@ -97,5 +101,48 @@ namespace Bailun.DC.Services
return result;
}
#endregion
#region 新资产负债表
/// <summary>
/// 获取资产负债表
/// </summary>
/// <param name="type">类型,1:日,2:周,3:月,4:年</param>
/// <param name="date">日期</param>
/// <param name="paycompayvalue">付款主体id</param>
/// <param name="tbtype">0:default,1:result,2:modify,</param>
/// <returns></returns>
public List<dc_balance_sheet_new_result> ListBalanceSheetNew(int type, DateTime start,DateTime end, int paycompayvalue,int tbtype=1)
{
var tbname = "dc_balance_sheet_new_result";
if(tbtype==0)
{
tbname = "dc_balance_sheet_new";
}
else if(tbtype == 2)
{
tbname = "dc_balance_sheet_new_modify";
}
var sql = "select * from "+ tbname + " where company_value=" + paycompayvalue + " and statistical_time >='"+start.ToString("yyyy-MM-dd")+ "' and statistical_time<'"+end.AddDays(1).ToString("yyyy-MM-dd")+"' order by statistical_time";
var list = new List<dc_balance_sheet_new_result>();
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == ConnectionState.Closed)
{
cn.Open();
}
list = cn.Query<dc_balance_sheet_new_result>(sql).AsList();
}
return list.OrderBy(a => a.statistical_time).ToList();
}
#endregion
}
}
......@@ -85,7 +85,7 @@
<script src="/css/bootstrap-select-1.12.4/js/bootstrap-select.js"></script>
<script src="~/js/jquery.cookie.js" type="text/javascript"></script>
<!--常用js方法-->
<script src="/js/common.js?i=20200220003"></script>
<script src="/js/common.js?i=20200220004"></script>
@RenderSection("scripts", required: false)
<script type="text/javascript">
......
......@@ -221,6 +221,7 @@ $.submit = function (data) {
url: data.url,
type: data.type||'GET',
data: data.paramData,
contentType: data.contenttype ||'application/x-www-form-urlencoded',
async: data.async||true,
headers: { Authorization: $.cookie("BailunToken")},
beforeSend: function (request) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment