Commit 96c4bb19 by pengjinyang

提交

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