src/KopSoftWms/Controllers/DeviceController.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using IServices;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System;
using System.Linq;
using YL.Core.Dto;
using YL.Core.Entity;
using YL.Core.Entity.Fluent.Validation;
using YL.NetCore.Attributes;
using YL.NetCore.NetCoreApp;
using YL.Utils.Extensions;
using YL.Utils.Pub;
namespace KopSoftWms.Controllers
{
public class DeviceController : BaseController
{
private readonly IWms_deviceServices _deviceServices;
private readonly ISys_deptServices _deptServices;
private readonly ISys_dictServices _dictServices;
public DeviceController(ISys_dictServices dictServices, ISys_deptServices deptServices, IWms_deviceServices deviceServices)
{
_dictServices = dictServices;
_deviceServices = deviceServices;
_deptServices = deptServices;
}
[HttpGet]
[CheckMenu]
public IActionResult Index()
{
ViewBag.Dept = _deptServices.QueryableToList(c => c.IsDel == 1);
ViewBag.Device = _dictServices.Queryable().Where(c => c.IsDel == 1 && c.DictType == SqlFunc.ToString(Convert.ToInt32(PubDictType.device))).ToList();
ViewBag.Property = _dictServices.Queryable().Where(c => c.IsDel == 1 && c.DictType == SqlFunc.ToString(Convert.ToInt32(PubDictType.property))).ToList(); ;
return View();
}
[HttpPost]
[OperationLog(LogType.select)]
public ContentResult List([FromForm] PubParams.DeviceBootstrapParams bootstrap)
{
var sd = _deviceServices.PageList(bootstrap);
return Content(sd);
}
[HttpGet]
public IActionResult Add(string id)
{
var model = new Wms_device();
if (id.IsEmpty())
{
return View(model);
}
else
{
model = _deviceServices.QueryableToEntity(c => c.DeviceId == SqlFunc.ToInt64(id));
return View(model);
}
}
后面还有 44 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。