集中供料操作权限
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace Tnb.WarehouseMgr.Entities.Consts
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Tnb.WarehouseMgr.Entities.Consts
|
||||
{
|
||||
public class WmsWareHouseConst
|
||||
{
|
||||
@@ -751,5 +753,6 @@
|
||||
/// 四厂区仓库vid
|
||||
/// </summary>
|
||||
public const string sichangqucangku_vid = "0001A1100000000AOMIG";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="AppFriendlyException"></exception>
|
||||
[HttpPost, NonUnify, AllowAnonymous]
|
||||
[HttpPost]
|
||||
public async Task<Entities.Dto.Outputs.Result> Distribute(MaterialTransferDistributeInput input)
|
||||
{
|
||||
try
|
||||
@@ -365,6 +365,14 @@ namespace Tnb.WarehouseMgr
|
||||
// 集中供料区三工位
|
||||
if (wmsMaterialTransfer.warehouse_instock == WmsWareHouseConst.WAREHOUSE_JZGL_ID|| wmsMaterialTransfer.warehouse_instock == WmsWareHouseConst.WAREHOUSE_WBZHHC_ID)
|
||||
{
|
||||
// 控制权限 原材料出库到集中供料权限 1.注塑加料工权限 2.注塑领班权限
|
||||
string[] YCLCKPowerRole = new string[2] { "37184163262485", "37183913754133" };
|
||||
var power = _db.Queryable<UserEntity>()
|
||||
.Where(r => r.Id == _userManager.UserId && YCLCKPowerRole.Contains(r.RoleId));
|
||||
if (power.Count() == 0)
|
||||
{
|
||||
throw new AppFriendlyException($@"当前用户:{_userManager.User.RealName} 用户ID:{_userManager.User.Id},没有操作到集中供料仓的转库权限", HttpStatusCode.InternalServerError);
|
||||
}
|
||||
// 根据三工位任务数平均分配任务 暂定
|
||||
endLocations = _db.Queryable<BasLocation>().Where(r => _wareHouseService.GetFloor1GLSGWOutstockLocation().Contains(r.id) && r.is_lock == 0 && r.is_use == "0")
|
||||
.OrderBy("is_lock, task_nums, location_code").ToList();
|
||||
|
||||
@@ -426,6 +426,10 @@ namespace Tnb.WarehouseMgr
|
||||
Logger.Error($"【FinishproductOutstockSign】库位id {wmsCarryH.location_id}没有对应的库位基础资料!");
|
||||
throw new AppFriendlyException($"库位id {wmsCarryH.location_id}没有对应的库位基础资料!", 500);
|
||||
}
|
||||
if (location != null && location.is_type == "0")
|
||||
{
|
||||
throw new Exception($"托盘{wmsCarryH.carry_code}在存储库位中,不能签收!");
|
||||
}
|
||||
|
||||
WmsDistaskH wmsDistaskH = _db.Queryable<WmsDistaskH>().Where(r => r.carry_code == input.carry_code && r.endlocation_id == location.id
|
||||
&& r.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID && r.status != WmsWareHouseConst.TASK_BILL_STATUS_CANCEL_ID).First();
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace Tnb.WarehouseMgr
|
||||
commonCreatePretaskInput1.carry_id = wmsCarryH.id;
|
||||
commonCreatePretaskInput1.carry_code = wmsCarryH.carry_code;
|
||||
commonCreatePretaskInput1.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
|
||||
commonCreatePretaskInput1.biz_type = "";
|
||||
commonCreatePretaskInput1.biz_type = WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID;
|
||||
commonCreatePretaskInput1.require_id = wmsPrdInstockD.id;
|
||||
commonCreatePretaskInput1.isExcuteMission = false;
|
||||
Entities.Dto.Outputs.Result res1 = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput1, db);
|
||||
|
||||
Reference in New Issue
Block a user