diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs
index adac2709..db25d0ab 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs
@@ -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
///
public const string sichangqucangku_vid = "0001A1100000000AOMIG";
+
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
index e4097509..71423cc4 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
@@ -305,7 +305,7 @@ namespace Tnb.WarehouseMgr
///
///
///
- [HttpPost, NonUnify, AllowAnonymous]
+ [HttpPost]
public async Task 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()
+ .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().Where(r => _wareHouseService.GetFloor1GLSGWOutstockLocation().Contains(r.id) && r.is_lock == 0 && r.is_use == "0")
.OrderBy("is_lock, task_nums, location_code").ToList();
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs
index 6cbd517a..5b6e1a6d 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs
@@ -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().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();
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs
index 7f4ceb76..c6b338f8 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs
@@ -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);