PDA仓库存货调整
This commit is contained in:
@@ -70,16 +70,16 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
[HttpGet("shortPatchsearch")]
|
[HttpGet("shortPatchsearch")]
|
||||||
public IActionResult QueryshortPatch(CommonQueryDto parm)
|
public IActionResult QueryshortPatch(CommonQueryDto parm)
|
||||||
{
|
{
|
||||||
List<WmGoodShortPackageCodeDto> response = _WmGoodsNowProductionService.QueryshortPatch(parm);
|
(List<WmGoodShortPackageCodeDto>,int) response = _WmGoodsNowProductionService.QueryshortPatch(parm);
|
||||||
var json = new
|
var json = new
|
||||||
{
|
{
|
||||||
list = response,
|
list = response.Item1,
|
||||||
total = response.Count
|
total = response.Item2
|
||||||
};
|
};
|
||||||
return ToResponse(new ApiResult(200, "ok", json));
|
return ToResponse(new ApiResult(200, "ok", json));
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 移动端 短批次号查询
|
/// 移动端 短批次号详细信息查询
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parm"></param>
|
/// <param name="parm"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
@@ -87,7 +87,12 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
public IActionResult Patchsearchdetail(WmGoodsNowProductionQueryDto parm)
|
public IActionResult Patchsearchdetail(WmGoodsNowProductionQueryDto parm)
|
||||||
{
|
{
|
||||||
var response = _WmGoodsNowProductionService.Patchsearchdetail(parm);
|
var response = _WmGoodsNowProductionService.Patchsearchdetail(parm);
|
||||||
return SUCCESS(response);
|
var json = new
|
||||||
|
{
|
||||||
|
list = response.Item1,
|
||||||
|
total = response.Item2
|
||||||
|
};
|
||||||
|
return ToResponse(new ApiResult(200, "ok", json));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ namespace ZR.Service.mes.wms.IService
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parm"></param>
|
/// <param name="parm"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<WmGoodShortPackageCodeDto> QueryshortPatch(CommonQueryDto parm);
|
(List<WmGoodShortPackageCodeDto>,int) QueryshortPatch(CommonQueryDto parm);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 移动端 查询短批次号 细则详情
|
/// 移动端 查询短批次号 细则详情
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parm"></param>
|
/// <param name="parm"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<WmGoodsNowProductionDto> Patchsearchdetail(WmGoodsNowProductionQueryDto parm);
|
(List<WmGoodsNowProductionDto>,int) Patchsearchdetail(WmGoodsNowProductionQueryDto parm);
|
||||||
|
|
||||||
WmGoodsNowProduction GetInfo(string Id);
|
WmGoodsNowProduction GetInfo(string Id);
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace ZR.Service.mes.wms
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parm"></param>
|
/// <param name="parm"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<WmGoodShortPackageCodeDto> QueryshortPatch(CommonQueryDto parm)
|
public (List<WmGoodShortPackageCodeDto>, int) QueryshortPatch(CommonQueryDto parm)
|
||||||
{
|
{
|
||||||
// 结果集
|
// 结果集
|
||||||
List<WmGoodShortPackageCodeDto> resultList = new();
|
List<WmGoodShortPackageCodeDto> resultList = new();
|
||||||
@@ -211,7 +211,7 @@ namespace ZR.Service.mes.wms
|
|||||||
{
|
{
|
||||||
resultList = resultList.Skip(startIndex).Take(startIndex + rows).ToList();
|
resultList = resultList.Skip(startIndex).Take(startIndex + rows).ToList();
|
||||||
}
|
}
|
||||||
return resultList;
|
return (resultList, sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -219,7 +219,9 @@ namespace ZR.Service.mes.wms
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parm"></param>
|
/// <param name="parm"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<WmGoodsNowProductionDto> Patchsearchdetail(WmGoodsNowProductionQueryDto parm)
|
public (List<WmGoodsNowProductionDto>, int) Patchsearchdetail(
|
||||||
|
WmGoodsNowProductionQueryDto parm
|
||||||
|
)
|
||||||
{
|
{
|
||||||
var predicate = Expressionable
|
var predicate = Expressionable
|
||||||
.Create<WmGoodsNowProduction>()
|
.Create<WmGoodsNowProduction>()
|
||||||
@@ -246,6 +248,8 @@ namespace ZR.Service.mes.wms
|
|||||||
WmMaterial material = Context
|
WmMaterial material = Context
|
||||||
.Queryable<WmMaterial>()
|
.Queryable<WmMaterial>()
|
||||||
.Where(it => it.Partnumber == item.Partnumber)
|
.Where(it => it.Partnumber == item.Partnumber)
|
||||||
|
.Where(it => it.Type == 1)
|
||||||
|
.Where(it => it.Status == 1)
|
||||||
.First();
|
.First();
|
||||||
if (material == null)
|
if (material == null)
|
||||||
{
|
{
|
||||||
@@ -256,7 +260,7 @@ namespace ZR.Service.mes.wms
|
|||||||
? material.Description
|
? material.Description
|
||||||
: material.ProductName;
|
: material.ProductName;
|
||||||
}
|
}
|
||||||
return response;
|
return (response, response.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -413,16 +417,20 @@ namespace ZR.Service.mes.wms
|
|||||||
List<WmGoodsNowProduction> updateList = new List<WmGoodsNowProduction>();
|
List<WmGoodsNowProduction> updateList = new List<WmGoodsNowProduction>();
|
||||||
foreach (string id in parm.Ids)
|
foreach (string id in parm.Ids)
|
||||||
{
|
{
|
||||||
WmGoodsNowProduction nowProduction = new()
|
WmGoodsNowProduction nowProduction =
|
||||||
{
|
new()
|
||||||
Id = id,
|
{
|
||||||
LocationCode = parm.LocationCode,
|
Id = id,
|
||||||
UpdatedBy = parm.UpdatedBy,
|
LocationCode = parm.LocationCode,
|
||||||
UpdatedTime = parm.UpdatedTime,
|
UpdatedBy = parm.UpdatedBy,
|
||||||
};
|
UpdatedTime = parm.UpdatedTime,
|
||||||
|
};
|
||||||
updateList.Add(nowProduction);
|
updateList.Add(nowProduction);
|
||||||
}
|
}
|
||||||
return Context.Updateable(updateList).IgnoreColumns(ignoreAllNullColumns:true).ExecuteCommand();
|
return Context
|
||||||
|
.Updateable(updateList)
|
||||||
|
.IgnoreColumns(ignoreAllNullColumns: true)
|
||||||
|
.ExecuteCommand();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user