Commit f57f7b60 by pengjinyang

提交

parent 59866969
...@@ -9,6 +9,12 @@ namespace Domain.Domain.TakeStock ...@@ -9,6 +9,12 @@ namespace Domain.Domain.TakeStock
[SugarTable("stock_takestockorder")] [SugarTable("stock_takestockorder")]
public class TakeStockOrder public class TakeStockOrder
{ {
public TakeStockOrder()
{
this.Code = "TSO" + DateTime.Now.ToString("yyMMddHHmmssfff");
this.CreationTime = DateTime.Now;
}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; } public int Id { get; set; }
...@@ -47,6 +53,18 @@ namespace Domain.Domain.TakeStock ...@@ -47,6 +53,18 @@ namespace Domain.Domain.TakeStock
public int? AfterQuantity { get; set; } public int? AfterQuantity { get; set; }
/// <summary> /// <summary>
/// 等待完结的配货单号
/// </summary>
[SugarColumn(IsNullable = true, Length = 1000)]
public string WaitCodes { get; set; }
/// <summary>
/// 取消的配货单号
/// </summary>
[SugarColumn(IsNullable = true, Length = 1000)]
public string CancelCodes { get; set; }
/// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
[SugarColumn(IsNullable = true, Length = 500)] [SugarColumn(IsNullable = true, Length = 500)]
...@@ -62,5 +80,13 @@ namespace Domain.Domain.TakeStock ...@@ -62,5 +80,13 @@ namespace Domain.Domain.TakeStock
[SugarColumn(IsNullable = true)] [SugarColumn(IsNullable = true)]
public long? LastModifierUserId { get; set; } public long? LastModifierUserId { get; set; }
public bool IsDeleted { get; set; }
[SugarColumn(IsNullable = true)]
public long? DeleterUserId { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? DeletionTime { get; set; }
} }
} }
...@@ -9,6 +9,11 @@ namespace Domain.Domain.TakeStock ...@@ -9,6 +9,11 @@ namespace Domain.Domain.TakeStock
[SugarTable("stock_takestockorder_log")] [SugarTable("stock_takestockorder_log")]
public class TakeStockOrderLog public class TakeStockOrderLog
{ {
public TakeStockOrderLog()
{
this.CreationTime = DateTime.Now;
}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; } public int Id { get; set; }
......
...@@ -9,6 +9,12 @@ namespace Domain.Domain.TakeStock ...@@ -9,6 +9,12 @@ namespace Domain.Domain.TakeStock
[SugarTable("stock_takestockschedule")] [SugarTable("stock_takestockschedule")]
public class TakeStockSchedule public class TakeStockSchedule
{ {
public TakeStockSchedule()
{
this.Code = "TSS" + DateTime.Now.ToString("yyMMddHHmmssfff");
this.CreationTime = DateTime.Now;
}
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; } public int Id { get; set; }
......
...@@ -44,9 +44,9 @@ namespace TakeStock.API.Controllers ...@@ -44,9 +44,9 @@ namespace TakeStock.API.Controllers
//} //}
[HttpPost] [HttpPost]
public async Task<bool> PostCheckRecord([FromBody] ScheduleInputDto record) public async Task<bool> CreateTakeStockSchedule([FromBody] ScheduleInputDto record)
{ {
var result = await takeStockAppService.CreateCheckRecord(record); var result = await takeStockAppService.CreateTakeStockSchedule(record);
return result; return result;
} }
......
...@@ -96,7 +96,7 @@ namespace TakeStock.API ...@@ -96,7 +96,7 @@ namespace TakeStock.API
app.UseHangfireDashboard("/hangfire", options); app.UseHangfireDashboard("/hangfire", options);
app.UseMvc(); app.UseMvc();
dbContext.Migration(); //dbContext.Migration();
} }
public void RegisterHttpClient(IServiceCollection services) public void RegisterHttpClient(IServiceCollection services)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"ConnectionStrings": { "ConnectionStrings": {
"Localhost": "server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;Allow User Variables=true;", "Localhost": "server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;Allow User Variables=true;",
//"Redis": "127.0.0.1" //"Redis": "127.0.0.1"
"Redis": "172.31.1.74" "Redis": "172.31.1.74"
}, },
"App": { "App": {
"CorsOrigins": "*" "CorsOrigins": "*"
......
...@@ -8,43 +8,15 @@ namespace TakeStock.Application.TakeStock.Dto ...@@ -8,43 +8,15 @@ namespace TakeStock.Application.TakeStock.Dto
public class OrderInputDto public class OrderInputDto
{ {
/// <summary> /// <summary>
/// 盘点单号
/// </summary>
public string Code { get; set; }
/// <summary>
/// 仓库编码 /// 仓库编码
/// </summary> /// </summary>
public string WarehouseCode { get; set; } public string WarehouseCode { get; set; }
public TSOrderState State { get; set; }
/// <summary> /// <summary>
/// 产品sku /// 产品sku
/// </summary> /// </summary>
public string Sku { get; set; } public string Sku { get; set; }
/// <summary> public long? CreatorUserId { get; set; }
/// 盘点前数量
/// </summary>
public int? BeforeQuantity { get; set; }
/// <summary>
/// 盘点后数量
/// </summary>
public int? AfterQuantity { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Description { get; set; }
public DateTime CreationTime { get; set; }
public long? CreatorUserId { get; set; }
public DateTime? LastModificationTime { get; set; }
public long? LastModifierUserId { get; set; }
} }
} }
...@@ -8,11 +8,6 @@ namespace TakeStock.Application.TakeStock.Dto ...@@ -8,11 +8,6 @@ namespace TakeStock.Application.TakeStock.Dto
public class ScheduleInputDto public class ScheduleInputDto
{ {
/// <summary> /// <summary>
/// 盘点单号
/// </summary>
public string Code { get; set; }
/// <summary>
/// 仓库编码 /// 仓库编码
/// </summary> /// </summary>
public string WarehouseCode { get; set; } public string WarehouseCode { get; set; }
...@@ -28,29 +23,12 @@ namespace TakeStock.Application.TakeStock.Dto ...@@ -28,29 +23,12 @@ namespace TakeStock.Application.TakeStock.Dto
public bool IsAutomation { get; set; } public bool IsAutomation { get; set; }
/// <summary> /// <summary>
/// 状态
/// </summary>
public TSScheduleState State { get; set; }
/// <summary>
/// 描述 /// 描述
/// </summary> /// </summary>
public string Description { get; set; } public string Description { get; set; }
public DateTime CreationTime { get; set; }
public long? CreatorUserId { get; set; } public long? CreatorUserId { get; set; }
public DateTime? LastModificationTime { get; set; }
public long? LastModifierUserId { get; set; }
public bool IsDeleted { get; set; }
public long? DeleterUserId { get; set; }
public DateTime? DeletionTime { get; set; }
public virtual List<OrderInputDto> Orders { get; set; } public virtual List<OrderInputDto> Orders { get; set; }
} }
} }
...@@ -19,7 +19,7 @@ namespace TakeStock.Application.TakeStock ...@@ -19,7 +19,7 @@ namespace TakeStock.Application.TakeStock
this.takeStockService = takeStockService; this.takeStockService = takeStockService;
} }
public async Task<bool> CreateCheckRecord(ScheduleInputDto input) public async Task<bool> CreateTakeStockSchedule(ScheduleInputDto input)
{ {
var str = JsonConvert.SerializeObject(input); var str = JsonConvert.SerializeObject(input);
TakeStockSchedule schedule = JsonConvert.DeserializeObject<TakeStockSchedule>(str); TakeStockSchedule schedule = JsonConvert.DeserializeObject<TakeStockSchedule>(str);
......
...@@ -59,8 +59,8 @@ namespace SqlSugar ...@@ -59,8 +59,8 @@ namespace SqlSugar
public void Migration() public void Migration()
{ {
//Db.CodeFirst.SetStringDefaultLength(20/*设置varchar默认长度为200*/) Db.CodeFirst.SetStringDefaultLength(20/*设置varchar默认长度为200*/)
// .InitTables(typeof(TakeStockSchedule), typeof(TakeStockOrder), typeof(TakeStockOrderLog));//执行完数据库就有这个表了 .InitTables(typeof(TakeStockSchedule), typeof(TakeStockOrder), typeof(TakeStockOrderLog));//执行完数据库就有这个表了
} }
} }
} }
\ No newline at end of file
using Domain; using Domain;
using SqlSugar; using SqlSugar;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -241,5 +240,12 @@ namespace TakeStock.SqlSugar ...@@ -241,5 +240,12 @@ namespace TakeStock.SqlSugar
else else
return client.Updateable(entity).ExecuteCommandAsync(); return client.Updateable(entity).ExecuteCommandAsync();
} }
// public void PageList(TEntity entity)
// {
// var pageJoin = client.Queryable<Student, School>((st, sc) => new object[] {
// JoinType.Left,st.SchoolId==sc.Id
//}).ToPageList(pageIndex, pageSize, ref totalCount);
// }
} }
} }
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