Commit 96c4bb19 by pengjinyang

提交

parent e441a1e4
......@@ -52,6 +52,7 @@ namespace Domain.Domain.TakeStock
[SugarColumn(IsNullable = true, Length = 500)]
public string Description { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true)]
public DateTime CreationTime { get; set; }
[SugarColumn(IsNullable = true)]
......
......@@ -44,7 +44,8 @@ namespace Domain.Domain.TakeStock
/// </summary>
[SugarColumn(IsNullable = true, Length = 500)]
public string Description { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true)]
public DateTime CreationTime { get; set; }
[SugarColumn(IsNullable = true)]
......
......@@ -174,7 +174,7 @@ namespace Domain
////
//// 返回结果:
//// List of all entities
//List<TEntity> GetAllList(Expression<Func<TEntity, bool>> predicate);
List<TEntity> GetAllList(Expression<Func<TEntity, bool>> predicate);
////
//// 摘要:
//// Used to get all entities.
......
......@@ -13,6 +13,20 @@ namespace IService.TakeStock
/// <returns></returns>
Task<bool> CreateTakeStockOrderAsync(TakeStockSchedule record, List<TakeStockOrder> orders);
/// <summary>
/// 发起线下盘点
/// </summary>
/// <param name="order"></param>
/// <returns></returns>
Task<bool> StartTakeStock(int id, int beforeQuantity);
/// <summary>
/// 盘点结果反馈
/// </summary>
/// <param name="order"></param>
/// <returns></returns>
Task<bool> Feedback(int id, int afterQuantity);
///// <summary>
///// 冻结库存
///// </summary>
......
......@@ -49,14 +49,17 @@ namespace TakeStock.API.Controllers
var result = await takeStockAppService.CreateCheckRecord(record);
return result;
}
[HttpPost("StartTakeStock")]
public async Task<bool> StartTakeStock([FromBody] StartTakeStockInputDto input)
{
return await takeStockAppService.StartTakeStock(input);
}
// PUT: api/TakeStock/5
[HttpPut("{id}")]
public void Put(int id)
[HttpPost("Feedback")]
public async Task<bool> Feedback([FromBody] FeedbackInputDto input)
{
//queryStockPoolService.AcquireStockPool().Wait();
//takeStockAppService.FreezeStockAsync(id).Wait();
//takeStockAppService.RollbackStockAsync(id).Wait();
return await takeStockAppService.Feedback(input);
}
// DELETE: api/ApiWithActions/5
......
......@@ -82,6 +82,9 @@ namespace TakeStock.API
{
app.UseDeveloperExceptionPage();
}
app.UseCors("Default");
var options = new DashboardOptions
{
IgnoreAntiforgeryToken = true,
......
......@@ -32,4 +32,6 @@
<ProjectReference Include="..\TakeStock.SqlSugar\TakeStock.SqlSugar.csproj" />
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
</Project>
......@@ -13,10 +13,9 @@
"Timeout": 120
},
"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=db;database=takestock;uid=root;pwd=123456;port=3306;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": "172.31.3.191"
"Redis": "172.31.255.235"
},
"App": {
"CorsOrigins": "*"
......
using System;
using System.Collections.Generic;
using System.Text;
namespace TakeStock.Application.TakeStock.Dto
{
public class FeedbackInputDto
{
public int Id { get; set; }
public int AfterQuantity { get; set; }
}
}
......@@ -23,6 +23,11 @@ namespace TakeStock.Application.TakeStock.Dto
public int ExecutorId { get; set; }
/// <summary>
/// 系统自动盘点
/// </summary>
public bool IsAutomation { get; set; }
/// <summary>
/// 状态
/// </summary>
public TSScheduleState State { get; set; }
......
using System;
using System.Collections.Generic;
using System.Text;
namespace TakeStock.Application.TakeStock.Dto
{
public class StartTakeStockInputDto
{
public int Id { get; set; }
public int BeforeQuantity { get; set; }
}
}
......@@ -27,14 +27,14 @@ namespace TakeStock.Application.TakeStock
return await takeStockService.CreateTakeStockOrderAsync(schedule, orders);
}
//public async Task<bool> FreezeStockAsync(int id)
//{
// return await takeStockService.FreezeStockAsync(id);
//}
public async Task<bool> StartTakeStock(StartTakeStockInputDto input)
{
return await takeStockService.StartTakeStock(input.Id, input.BeforeQuantity);
}
//public async Task<bool> RollbackStockAsync(int id)
//{
// return await takeStockService.RollbackStockAsync(id);
//}
public async Task<bool> Feedback(FeedbackInputDto input)
{
return await takeStockService.Feedback(input.Id, input.AfterQuantity);
}
}
}
......@@ -2,6 +2,7 @@
using SqlSugar;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace TakeStock.SqlSugar
......@@ -100,10 +101,10 @@ namespace TakeStock.SqlSugar
// throw new NotImplementedException();
//}
//public List<TEntity> GetAllList(System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate)
//{
// throw new NotImplementedException();
//}
public List<TEntity> GetAllList(System.Linq.Expressions.Expression<Func<TEntity, bool>> predicate)
{
return client.Queryable<TEntity>().Where(predicate).ToList();
}
//public List<TEntity> GetAllList()
//{
......
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