库位表重新生成,一些数据使用enum type status
加上数据权限zoneCode
This commit is contained in:
1 parent
b0a6dcc035
commit
b005422b01
25 files changed
+361
-541
No files matched your search
@@ -1,11 +1,11 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web;
|
||||
using System.Collections.Generic;
|
||||
using HHWMS.Web.Models;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
@@ -14,11 +14,13 @@ namespace HHWMS.Web.Controllers
|
||||
[ActionDescription("库位管理")]
|
||||
public partial class LocationController : BaseController
|
||||
{
|
||||
private readonly IUnitWork _unitwork;
|
||||
private readonly IUnitWork _unitWork;
|
||||
|
||||
public LocationController(IUnitWork unitWork)
|
||||
{
|
||||
_unitwork = unitWork;
|
||||
_unitWork = unitWork;
|
||||
}
|
||||
|
||||
#region Search
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Index()
|
||||
@@ -140,7 +142,6 @@ namespace HHWMS.Web.Controllers
|
||||
public ActionResult Details(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<LocationVM>(id);
|
||||
vm.Inventorys.SearcherMode = ListVMSearchModeEnum.MasterDetail;
|
||||
return PartialView(vm);
|
||||
}
|
||||
#endregion
|
||||
@@ -259,16 +260,16 @@ namespace HHWMS.Web.Controllers
|
||||
locationList.Add(new Location
|
||||
{
|
||||
Code = $"{vm.Entity.Type}{vm.Entity.RoadWay.ToString().PadLeft(2, '0')}-{row.ToString().PadLeft(2, '0')}-{line.ToString().PadLeft(2, '0')}-{layer.ToString().PadLeft(2, '0')}",
|
||||
ZoneCode = vm.Entity.ZoneCode,
|
||||
LocationZoneId = vm.Entity.LocationZoneId,
|
||||
Type = vm.Entity.Type,
|
||||
RoadWay = vm.Entity.RoadWay,
|
||||
Row = row,
|
||||
Line = line,
|
||||
Layer = layer,
|
||||
RowFlag = (short?)(vm.RoadwayType == 1 || vm.RoadwayType == 2 ? 0 : (row == 1 || row == 4 ? 1 : 0)),
|
||||
RowFlag = (vm.RoadwayType == 1 || vm.RoadwayType == 2 ? RowFlagEnum.Outer : (row == 1 || row == 4 ? RowFlagEnum.Inner : RowFlagEnum.Outer)),
|
||||
ContiguousCode = vm.RoadwayType == 4 ? $"{vm.Entity.Type}{vm.Entity.RoadWay.ToString().PadLeft(2, '0')}-{(row % 2 == 0?row-1:row+1) .ToString().PadLeft(2, '0')}-{line.ToString().PadLeft(2, '0')}-{layer.ToString().PadLeft(2, '0')}" : null,
|
||||
IsStop = false,
|
||||
Status = LocationStatus.空仓位,
|
||||
Status = LocationStatusEnum.Empty,
|
||||
Length = vm.Entity.Length,
|
||||
Width = vm.Entity.Width,
|
||||
Height = vm.Entity.Height
|
||||
@@ -276,16 +277,11 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
_unitwork.BatchAdd(locationList.ToArray());
|
||||
_unitWork.BatchAdd(locationList.ToArray());
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
#endregion 新增库位
|
||||
[ActionDescription("Sys.Print")]
|
||||
public ActionResult Print()
|
||||
{
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user