日志优化,成品库添加移库,AGV上料功能修正,出库计划过滤呆料,毛坯仓库添加实际操作时间
This commit is contained in:
@@ -42,7 +42,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// <summary>
|
||||
/// 7 判断箱子是否存在成品库仓库里
|
||||
/// </summary>
|
||||
/// <param name="PatchCode"></param>
|
||||
/// <param name="originalCode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_existed_warehouse")]
|
||||
public IActionResult IsExistedWarehouse(string originalCode = "")
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询毛坯库存库存变动记录表详情
|
||||
/// </summary>
|
||||
@@ -71,15 +70,22 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 1.增加库存
|
||||
/// 1.增加库存(入库)
|
||||
/// </summary>
|
||||
/// <param name="fkBlankInventoryId">库存id</param>
|
||||
/// <param name="blankNum">毛坯号</param>
|
||||
/// <param name="changeQuantity">变动量</param>
|
||||
/// <param name="actionTime">入库/出库时间</param>
|
||||
/// <param name="remark">备注</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("add_inventory")]
|
||||
public IActionResult AddInventory(string fkBlankInventoryId, string blankNum, int changeQuantity, string remark)
|
||||
public IActionResult AddInventory(
|
||||
string fkBlankInventoryId,
|
||||
string blankNum,
|
||||
int changeQuantity,
|
||||
string remark,
|
||||
DateTime? actionTime
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -91,26 +97,39 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
return ToResponse(new ApiResult(500, "毛坯号为空!", "毛坯号为空!"));
|
||||
}
|
||||
var response = _WmBlankRecordService.AddInventory(fkBlankInventoryId, blankNum, changeQuantity, HttpContext.GetName(), remark);
|
||||
var response = _WmBlankRecordService.AddInventory(
|
||||
fkBlankInventoryId,
|
||||
blankNum,
|
||||
changeQuantity,
|
||||
HttpContext.GetName(),
|
||||
remark,
|
||||
actionTime
|
||||
);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, ex.Message, "添加记录失败"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2.减少库存
|
||||
/// 2.减少库存(出库)
|
||||
/// </summary>
|
||||
/// <param name="fkBlankInventoryId">库存id</param>
|
||||
/// <param name="blankNum">毛坯号</param>
|
||||
/// <param name="changeQuantity">变动量</param>
|
||||
/// <param name="actionTime">操作时间(出库时间)</param>
|
||||
/// <param name="remark">备注</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("delete_inventory")]
|
||||
public IActionResult DeleteInventory(string fkBlankInventoryId, string blankNum, int changeQuantity, string remark)
|
||||
public IActionResult DeleteInventory(
|
||||
string fkBlankInventoryId,
|
||||
string blankNum,
|
||||
int changeQuantity,
|
||||
string remark,
|
||||
DateTime? actionTime
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -122,16 +141,22 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
return ToResponse(new ApiResult(500, "毛坯号为空!", "毛坯号为空!"));
|
||||
}
|
||||
var response = _WmBlankRecordService.DeleteInventory(fkBlankInventoryId, blankNum, changeQuantity, HttpContext.GetName(), remark);
|
||||
var response = _WmBlankRecordService.DeleteInventory(
|
||||
fkBlankInventoryId,
|
||||
blankNum,
|
||||
changeQuantity,
|
||||
HttpContext.GetName(),
|
||||
remark,
|
||||
actionTime
|
||||
);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, ex.Message, "添加记录失败"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新毛坯库存库存变动记录表
|
||||
/// </summary>
|
||||
@@ -157,15 +182,14 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
public IActionResult DeleteWmBlankRecord(string ids)
|
||||
{
|
||||
string[] idsArr = ids.Split(',');
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
if (idsArr.Length <= 0)
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"删除失败Id 不能为空"));
|
||||
}
|
||||
|
||||
var response = _WmBlankRecordService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("getBatchTreeTableData")]
|
||||
[Log(Title = "根据查询条件聚合批量查询出库数据,并生成树列表数据", BusinessType = BusinessType.QUERY)]
|
||||
// [Log(Title = "根据查询条件聚合批量查询出库数据,并生成树列表数据", BusinessType = BusinessType.QUERY)]
|
||||
public IActionResult GetBatchTreeTableData([FromBody] WmGoodsBatchSearchDto parm)
|
||||
{
|
||||
if (parm is null)
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsnowproduction:add")]
|
||||
[Log(Title = "成品库当前货物表", BusinessType = BusinessType.INSERT)]
|
||||
[Log(Title = "添加成品库当前货物表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmGoodsNowProduction([FromBody] WmGoodsNowProductionDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmGoodsNowProduction>().ToCreate(HttpContext);
|
||||
@@ -127,7 +127,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsnowproduction:edit")]
|
||||
[Log(Title = "成品库当前货物表", BusinessType = BusinessType.UPDATE)]
|
||||
[Log(Title = "更新成品库当前货物表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmGoodsNowProduction([FromBody] WmGoodsNowProductionDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmGoodsNowProduction>().ToUpdate(HttpContext);
|
||||
@@ -142,7 +142,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsnowproduction:delete")]
|
||||
[Log(Title = "成品库当前货物表", BusinessType = BusinessType.DELETE)]
|
||||
[Log(Title = "删除成品库当前货物表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmGoodsNowProduction(string ids)
|
||||
{
|
||||
long[] idsArr = Tools.SpitLongArrary(ids);
|
||||
@@ -160,6 +160,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <param name="stack_num"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("modifyInventoryQuantity")]
|
||||
[Log(Title = "修改库存数量", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult ModifyInventoryQuantity(string id, int stack_num)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
@@ -170,6 +171,21 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量修改成品库仓库编码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("batchUpdateGoodsNowProductionLocationCode")]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsnowproduction:edit")]
|
||||
[Log(Title = "批量修改成品库仓库编码(移入呆滞品)", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult BatchUpdateGoodsNowProductionLocationCode([FromBody] BatchUpdateLocationCodeDto parm)
|
||||
{
|
||||
parm.UpdatedBy = HttpContext.GetName();
|
||||
parm.UpdatedTime = DateTime.Now;
|
||||
var response = _WmGoodsNowProductionService.BatchUpdateLocationCode(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsoutproduction:add")]
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.INSERT)]
|
||||
[Log(Title = "添加出库货物记录表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmGoodsOutProduction([FromBody] WmGoodsOutProductionDto parm)
|
||||
{
|
||||
try
|
||||
@@ -86,7 +86,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsoutproduction:edit")]
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.UPDATE)]
|
||||
[Log(Title = "更新出库货物记录表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmGoodsOutProduction([FromBody] WmGoodsOutProductionDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmGoodsOutRecord>().ToUpdate(HttpContext);
|
||||
@@ -101,7 +101,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmgoodsoutproduction:delete")]
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.DELETE)]
|
||||
[Log(Title = "删除出库货物记录表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmGoodsOutProduction(string ids)
|
||||
{
|
||||
long[] idsArr = Tools.SpitLongArrary(ids);
|
||||
|
||||
@@ -108,7 +108,6 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
|
||||
|
||||
[HttpGet("getInfoByPatchCode")]
|
||||
[Log(Title = "物料记录表", BusinessType = BusinessType.QUERY)]
|
||||
public IActionResult GetInfoByPatchCode(string patchCode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(patchCode))
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
///
|
||||
/// </returns>
|
||||
[HttpPost("doMaterialOut")]
|
||||
[Log(Title = "出库", BusinessType = BusinessType.INSERT)]
|
||||
[Log(Title = "成品出库", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult DoMaterialOut([FromBody] WmDoMaterialOut_Dto doMaterialOut)
|
||||
{
|
||||
if (doMaterialOut == null || doMaterialOut.ShipmentNum == null)
|
||||
|
||||
Reference in New Issue
Block a user