60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
using MyCode.Project.Repositories.Common;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using MyCode.Project.Domain.Message;
|
|
using MyCode.Project.Domain.Model;
|
|
using MyCode.Project.Domain.Repositories;
|
|
using MyCode.Project.Infrastructure.Common;
|
|
using MyCode.Project.Infrastructure.Search;
|
|
using MyCode.Project.Domain.Message.Response.JackYun;
|
|
using SqlSugar;
|
|
|
|
namespace MyCode.Project.Repositories
|
|
{
|
|
public class WMStoJackyunInventoryMovementView1Repository: Repository<WMStoJackyunInventoryMovementView1>, IWMStoJackyunInventoryMovementView1Repository
|
|
{
|
|
public WMStoJackyunInventoryMovementView1Repository(MyCodeSqlSugarClient context) : base(context)
|
|
{ }
|
|
|
|
/// <summary>
|
|
/// 查询可执行申请入库/出库数据
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public List<CreateAndStockinResp> GetInventoryMovement()
|
|
{
|
|
string sql = $@"
|
|
SELECT [单据号] AS relDataId
|
|
,[单据行号] AS [relDetailId]
|
|
,[变动方向] AS [type]
|
|
,[SKU] AS [outSkuCode]
|
|
,[BARCODE] AS [skuBarcode]
|
|
,[单位] AS [unitName]
|
|
,[数量] AS [skuCount]
|
|
,[仓库] AS [inWarehouseCode]
|
|
,[过账日期] AS [applyDate]
|
|
,[备注] AS [rowRemark]
|
|
,[status] AS [status]
|
|
FROM [dbo].[WMStoJackyun_InventoryMovement_View1]
|
|
WHERE [status] = 0";
|
|
var list = this.SelectList<CreateAndStockinResp>(sql);
|
|
return list;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 更新
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public void UpdateStatus(int status,string relDataId)
|
|
{
|
|
string sql = $@"
|
|
UPDATE [dbo].[WMStoJackyun_InventoryMovement_View1] SET [status] = {status}
|
|
WHERE [单据号] = '{relDataId}'";
|
|
this.Add(sql);
|
|
}
|
|
|
|
}
|
|
} |