Data模块数据采集管理功能开发v1

dev-0829
ccongli 1 year ago
parent eaa909691f
commit 8dbdc55399

@ -62,7 +62,7 @@ namespace VOL.Core.Controllers.Basic
/// <returns></returns>
[ApiActionPermission(Enums.ActionPermissionOptions.Search)]
[HttpPost, Route("GetDetailPage")]
[ApiExplorerSettings(IgnoreApi = true)]
[ApiExplorerSettings(IgnoreApi = false)] // 设置swagger文档不忽略改接口
public virtual ActionResult GetDetailPage([FromBody] PageDataOptions loadData)
{
return Content(InvokeService("GetDetailPage", new object[] { loadData }).Serialize());
@ -167,7 +167,7 @@ namespace VOL.Core.Controllers.Basic
/// <returns></returns>
[ApiActionPermission(Enums.ActionPermissionOptions.Delete)]
[HttpPost, Route("Del")]
[ApiExplorerSettings(IgnoreApi = true)]
[ApiExplorerSettings(IgnoreApi = false)] // 设置swagger文档不忽略改接口
public virtual ActionResult Del([FromBody] object[] keys)
{
_baseWebResponseContent = InvokeService("Del", new object[] { keys, true }) as WebResponseContent;
@ -181,7 +181,7 @@ namespace VOL.Core.Controllers.Basic
/// <returns></returns>
[ApiActionPermission(Enums.ActionPermissionOptions.Audit)]
[HttpPost, Route("Audit")]
[ApiExplorerSettings(IgnoreApi = true)]
[ApiExplorerSettings(IgnoreApi = false)] // 设置swagger文档不忽略改接口
public virtual ActionResult Audit([FromBody] object[] id, int? auditStatus, string auditReason)
{
_baseWebResponseContent = InvokeService("Audit", new object[] { id, auditStatus, auditReason }) as WebResponseContent;
@ -195,7 +195,7 @@ namespace VOL.Core.Controllers.Basic
/// <returns></returns>
[ApiActionPermission(Enums.ActionPermissionOptions.Add)]
[HttpPost, Route("Add")]
[ApiExplorerSettings(IgnoreApi = true)]
[ApiExplorerSettings(IgnoreApi = false)] // 设置swagger文档不忽略改接口
public virtual ActionResult Add([FromBody] SaveModel saveModel)
{
_baseWebResponseContent = InvokeService("Add",
@ -213,7 +213,7 @@ namespace VOL.Core.Controllers.Basic
/// <returns></returns>
[ApiActionPermission(Enums.ActionPermissionOptions.Update)]
[HttpPost, Route("Update")]
[ApiExplorerSettings(IgnoreApi = true)]
[ApiExplorerSettings(IgnoreApi = false)] // 设置swagger文档不忽略改接口
public virtual ActionResult Update([FromBody] SaveModel saveModel)
{
_baseWebResponseContent = InvokeService("Update", new object[] { saveModel }) as WebResponseContent;

@ -0,0 +1,7 @@
namespace VOL.Data
{
public class Class1
{
}
}

@ -0,0 +1,18 @@
/*
*,
*RepositoryPartialIData_DeviceRepository
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Extensions.AutofacManager;
namespace VOL.Data.IRepositories
{
public partial interface IData_DeviceRepository : IDependency,IRepository<Data_Device>
{
}
}

@ -0,0 +1,18 @@
/*
*,
*RepositoryPartialIData_ProduceRepository
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Extensions.AutofacManager;
namespace VOL.Data.IRepositories
{
public partial interface IData_ProduceRepository : IDependency,IRepository<Data_Produce>
{
}
}

@ -0,0 +1,12 @@
/*
*,
*/
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
namespace VOL.Data.IServices
{
public partial interface IData_DeviceService : IService<Data_Device>
{
}
}

@ -0,0 +1,12 @@
/*
*,
*/
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
namespace VOL.Data.IServices
{
public partial interface IData_ProduceService : IService<Data_Produce>
{
}
}

@ -0,0 +1,13 @@
/*
*Data_Device
*/
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Utilities;
using System.Linq.Expressions;
namespace VOL.Data.IServices
{
public partial interface IData_DeviceService
{
}
}

@ -0,0 +1,13 @@
/*
*Data_Produce
*/
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Utilities;
using System.Linq.Expressions;
namespace VOL.Data.IServices
{
public partial interface IData_ProduceService
{
}
}

@ -0,0 +1,24 @@
/*
*,
*RepositoryPartialData_DeviceRepository
*/
using VOL.Data.IRepositories;
using VOL.Core.BaseProvider;
using VOL.Core.EFDbContext;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
namespace VOL.Data.Repositories
{
public partial class Data_DeviceRepository : RepositoryBase<Data_Device> , IData_DeviceRepository
{
public Data_DeviceRepository(VOLContext dbContext)
: base(dbContext)
{
}
public static IData_DeviceRepository Instance
{
get { return AutofacContainerModule.GetService<IData_DeviceRepository>(); } }
}
}

@ -0,0 +1,24 @@
/*
*,
*RepositoryPartialData_ProduceRepository
*/
using VOL.Data.IRepositories;
using VOL.Core.BaseProvider;
using VOL.Core.EFDbContext;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
namespace VOL.Data.Repositories
{
public partial class Data_ProduceRepository : RepositoryBase<Data_Produce> , IData_ProduceRepository
{
public Data_ProduceRepository(VOLContext dbContext)
: base(dbContext)
{
}
public static IData_ProduceRepository Instance
{
get { return AutofacContainerModule.GetService<IData_ProduceRepository>(); } }
}
}

@ -0,0 +1,27 @@
/*
*Authorjxx
*Contact283591387@qq.com
*,
*PartialData_DeviceServiceIData_DeviceService
*/
using VOL.Data.IRepositories;
using VOL.Data.IServices;
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
namespace VOL.Data.Services
{
public partial class Data_DeviceService : ServiceBase<Data_Device, IData_DeviceRepository>
, IData_DeviceService, IDependency
{
public Data_DeviceService(IData_DeviceRepository repository)
: base(repository)
{
Init(repository);
}
public static IData_DeviceService Instance
{
get { return AutofacContainerModule.GetService<IData_DeviceService>(); } }
}
}

@ -0,0 +1,27 @@
/*
*Authorjxx
*Contact283591387@qq.com
*,
*PartialData_ProduceServiceIData_ProduceService
*/
using VOL.Data.IRepositories;
using VOL.Data.IServices;
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
namespace VOL.Data.Services
{
public partial class Data_ProduceService : ServiceBase<Data_Produce, IData_ProduceRepository>
, IData_ProduceService, IDependency
{
public Data_ProduceService(IData_ProduceRepository repository)
: base(repository)
{
Init(repository);
}
public static IData_ProduceService Instance
{
get { return AutofacContainerModule.GetService<IData_ProduceService>(); } }
}
}

@ -0,0 +1,41 @@
/*
*Data_Device
*使repository.EF/Dapper
*使repository.DbContextBeginTransaction
*使DBServerProvider.
*使UserContext.Current
*Data_DeviceServiceServiceFunFilter
*/
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
using System.Linq;
using VOL.Core.Utilities;
using System.Linq.Expressions;
using VOL.Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Data.IRepositories;
namespace VOL.Data.Services
{
public partial class Data_DeviceService
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IData_DeviceRepository _repository;//访问数据库
[ActivatorUtilitiesConstructor]
public Data_DeviceService(
IData_DeviceRepository dbRepository,
IHttpContextAccessor httpContextAccessor
)
: base(dbRepository)
{
_httpContextAccessor = httpContextAccessor;
_repository = dbRepository;
//多租户会用到这init代码其他情况可以不用
//base.Init(dbRepository);
}
}
}

@ -0,0 +1,41 @@
/*
*Data_Produce
*使repository.EF/Dapper
*使repository.DbContextBeginTransaction
*使DBServerProvider.
*使UserContext.Current
*Data_ProduceServiceServiceFunFilter
*/
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
using System.Linq;
using VOL.Core.Utilities;
using System.Linq.Expressions;
using VOL.Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Data.IRepositories;
namespace VOL.Data.Services
{
public partial class Data_ProduceService
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IData_ProduceRepository _repository;//访问数据库
[ActivatorUtilitiesConstructor]
public Data_ProduceService(
IData_ProduceRepository dbRepository,
IHttpContextAccessor httpContextAccessor
)
: base(dbRepository)
{
_httpContextAccessor = httpContextAccessor;
_repository = dbRepository;
//多租户会用到这init代码其他情况可以不用
//base.Init(dbRepository);
}
}
}

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\VOL.Core\VOL.Core.csproj" />
<ProjectReference Include="..\VOL.Entity\VOL.Entity.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="IRepositories\" />
<Folder Include="IServices\" />
<Folder Include="Repositories\" />
<Folder Include="Services\" />
</ItemGroup>
</Project>

@ -0,0 +1,125 @@
/*
*,
*Model
*/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;
namespace VOL.Entity.DomainModels
{
[Entity(TableCnName = "设备运行",TableName = "Data_Device")]
public partial class Data_Device:BaseEntity
{
/// <summary>
///ID
/// </summary>
[Key]
[Display(Name ="ID")]
[Column(TypeName="int")]
[Editable(true)]
[Required(AllowEmptyStrings=false)]
public int id { get; set; }
/// <summary>
///电机温度
/// </summary>
[Display(Name ="电机温度")]
[DisplayFormat(DataFormatString="10,2")]
[Column(TypeName="decimal")]
[Editable(true)]
public decimal? temperature { get; set; }
/// <summary>
///母线电压
/// </summary>
[Display(Name ="母线电压")]
[DisplayFormat(DataFormatString="10,2")]
[Column(TypeName="decimal")]
[Editable(true)]
public decimal? potential { get; set; }
/// <summary>
///实际电流
/// </summary>
[Display(Name ="实际电流")]
[DisplayFormat(DataFormatString="10,2")]
[Column(TypeName="decimal")]
[Editable(true)]
public decimal? current { get; set; }
/// <summary>
///加工程序号
/// </summary>
[Display(Name ="加工程序号")]
[MaxLength(60)]
[Column(TypeName="nvarchar(60)")]
[Editable(true)]
public string processno { get; set; }
/// <summary>
///运行模式
/// </summary>
[Display(Name ="运行模式")]
[Column(TypeName="short")]
[Editable(true)]
public short? run_mode { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="CreateID")]
[Column(TypeName="int")]
[Editable(true)]
public int? CreateID { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="Creator")]
[MaxLength(255)]
[Column(TypeName="nvarchar(255)")]
[Editable(true)]
public string Creator { get; set; }
/// <summary>
///记录时间
/// </summary>
[Display(Name ="记录时间")]
[Column(TypeName="datetime")]
[Editable(true)]
public DateTime? CreateDate { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="ModifyID")]
[Column(TypeName="int")]
[Editable(true)]
public int? ModifyID { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="Modifier")]
[MaxLength(255)]
[Column(TypeName="nvarchar(255)")]
[Editable(true)]
public string Modifier { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="ModifyDate")]
[Column(TypeName="datetime")]
[Editable(true)]
public DateTime? ModifyDate { get; set; }
}
}

@ -0,0 +1,137 @@
/*
*,
*Model
*/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;
namespace VOL.Entity.DomainModels
{
[Entity(TableCnName = "生产数据",TableName = "Data_Produce")]
public partial class Data_Produce:BaseEntity
{
/// <summary>
///ID
/// </summary>
[Key]
[Display(Name ="ID")]
[Column(TypeName="int")]
[Editable(true)]
[Required(AllowEmptyStrings=false)]
public int id { get; set; }
/// <summary>
///待机时长
/// </summary>
[Display(Name ="待机时长")]
[Column(TypeName="int")]
[Editable(true)]
public int? standby_time { get; set; }
/// <summary>
///运行时长
/// </summary>
[Display(Name ="运行时长")]
[Column(TypeName="int")]
[Editable(true)]
public int? run_time { get; set; }
/// <summary>
///运行状态
/// </summary>
[Display(Name ="运行状态")]
[Column(TypeName="sbyte")]
[Editable(true)]
public sbyte? status { get; set; }
/// <summary>
///当班产量
/// </summary>
[Display(Name ="当班产量")]
[Column(TypeName="int")]
[Editable(true)]
public int? turnout { get; set; }
/// <summary>
///工单 1 产量
/// </summary>
[Display(Name ="工单 1 产量")]
[Column(TypeName="int")]
[Editable(true)]
public int? turnout_one { get; set; }
/// <summary>
///工单 2 产量
/// </summary>
[Display(Name ="工单 2 产量")]
[Column(TypeName="int")]
[Editable(true)]
public int? turnout_two { get; set; }
/// <summary>
///工单 3 产量
/// </summary>
[Display(Name ="工单 3 产量")]
[Column(TypeName="int")]
[Editable(true)]
public int? turnout_three { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="CreateID")]
[Column(TypeName="int")]
[Editable(true)]
public int? CreateID { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="Creator")]
[MaxLength(255)]
[Column(TypeName="nvarchar(255)")]
[Editable(true)]
public string Creator { get; set; }
/// <summary>
///记录时间
/// </summary>
[Display(Name ="记录时间")]
[Column(TypeName="datetime")]
[Editable(true)]
public DateTime? CreateDate { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="ModifyID")]
[Column(TypeName="int")]
[Editable(true)]
public int? ModifyID { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="Modifier")]
[MaxLength(255)]
[Column(TypeName="nvarchar(255)")]
[Editable(true)]
public string Modifier { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="ModifyDate")]
[Column(TypeName="datetime")]
[Editable(true)]
public DateTime? ModifyDate { get; set; }
}
}

@ -0,0 +1,21 @@
/*
*,
*Model
*/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;
namespace VOL.Entity.DomainModels
{
public partial class Data_Device
{
//此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
}
}

@ -0,0 +1,21 @@
/*
*,
*Model
*/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;
namespace VOL.Entity.DomainModels
{
public partial class Data_Produce
{
//此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
}
}

@ -0,0 +1,16 @@
using VOL.Entity.MappingConfiguration;
using VOL.Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace VOL.Entity.MappingConfiguration
{
public class Data_DeviceMapConfig : EntityMappingConfiguration<Data_Device>
{
public override void Map(EntityTypeBuilder<Data_Device>
builderTable)
{
//b.Property(x => x.StorageName).HasMaxLength(45);
}
}
}

@ -0,0 +1,16 @@
using VOL.Entity.MappingConfiguration;
using VOL.Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace VOL.Entity.MappingConfiguration
{
public class Data_ProduceMapConfig : EntityMappingConfiguration<Data_Produce>
{
public override void Map(EntityTypeBuilder<Data_Produce>
builderTable)
{
//b.Property(x => x.StorageName).HasMaxLength(45);
}
}
}

@ -0,0 +1,30 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using System;
using VOL.Core.Filters;
namespace VOL.WebApi.Controllers.Data
{
/// <summary>
/// 数据采集API类
/// </summary>
[Route("api/Data_Capture")]
[AllowAnonymous]
public class DataCaptureController : Controller
{
/// <summary>
/// 测试采集接口
/// </summary>
/// <returns>IActionResult</returns>
//[ApiTask]
[HttpGet, HttpPost, Route("test")]
public IActionResult Test()
{
return Content(DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss"));
}
}
}

@ -0,0 +1,21 @@
/*
*,
*PartialData_DeviceController
*/
using Microsoft.AspNetCore.Mvc;
using VOL.Core.Controllers.Basic;
using VOL.Entity.AttributeManager;
using VOL.Data.IServices;
namespace VOL.Data.Controllers
{
[Route("api/Data_Device")]
[PermissionTable(Name = "Data_Device")]
public partial class Data_DeviceController : ApiBaseController<IData_DeviceService>
{
public Data_DeviceController(IData_DeviceService service)
: base(service)
{
}
}
}

@ -0,0 +1,21 @@
/*
*,
*PartialData_ProduceController
*/
using Microsoft.AspNetCore.Mvc;
using VOL.Core.Controllers.Basic;
using VOL.Entity.AttributeManager;
using VOL.Data.IServices;
namespace VOL.Data.Controllers
{
[Route("api/Data_Produce")]
[PermissionTable(Name = "Data_Produce")]
public partial class Data_ProduceController : ApiBaseController<IData_ProduceService>
{
public Data_ProduceController(IData_ProduceService service)
: base(service)
{
}
}
}

@ -0,0 +1,33 @@
/*
*...
*ActionAction使
*: [ApiActionPermission("Data_Device",Enums.ActionPermissionOptions.Search)]
*/
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using VOL.Data.IServices;
namespace VOL.Data.Controllers
{
public partial class Data_DeviceController
{
private readonly IData_DeviceService _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public Data_DeviceController(
IData_DeviceService service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
}
}

@ -0,0 +1,33 @@
/*
*...
*ActionAction使
*: [ApiActionPermission("Data_Produce",Enums.ActionPermissionOptions.Search)]
*/
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using VOL.Data.IServices;
namespace VOL.Data.Controllers
{
public partial class Data_ProduceController
{
private readonly IData_ProduceService _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public Data_ProduceController(
IData_ProduceService service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
}
}

@ -44,7 +44,7 @@ namespace VOL.Order.Controllers
[HttpPost]
[ApiActionPermission("SellOrder", Core.Enums.ActionPermissionOptions.Search)]
[Route("getServiceDate"), FixedToken]//FixedToken请求此接口只要token合法就能能过//AllowAnonymous
[Route("getServiceDate"), FixedToken]//FixedToken 接口token永不过期 //AllowAnonymous 无需验证即可访问
public IActionResult GetServiceDate()
{
return Content(Service.GetServiceDate());

@ -31,6 +31,7 @@
<ProjectReference Include="..\VOL.AppManager\VOL.AppManager.csproj" />
<ProjectReference Include="..\VOL.Builder\VOL.Builder.csproj" />
<ProjectReference Include="..\VOL.Core\VOL.Core.csproj" />
<ProjectReference Include="..\VOL.Data\VOL.Data.csproj" />
<ProjectReference Include="..\VOL.Entity\VOL.Entity.csproj" />
<ProjectReference Include="..\VOL.Order\VOL.Order.csproj" />
<ProjectReference Include="..\VOL.System\VOL.System.csproj" />

@ -6,8 +6,8 @@
<PropertyGroup>
<ActiveDebugProfile>VOL.WebApi</ActiveDebugProfile>
<NameOfLastUsedPublishProfile>E:\jxx\Vue.NetCore\.Net6版本\VOL.WebApi\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>

@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Order", "VOL.Order\VOL.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.WebApi", "VOL.WebApi\VOL.WebApi.csproj", "{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VOL.Data", "VOL.Data\VOL.Data.csproj", "{FA76EAA8-C355-4E13-B15C-FF925919F861}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -51,6 +53,10 @@ Global
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Release|Any CPU.Build.0 = Release|Any CPU
{FA76EAA8-C355-4E13-B15C-FF925919F861}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA76EAA8-C355-4E13-B15C-FF925919F861}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA76EAA8-C355-4E13-B15C-FF925919F861}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA76EAA8-C355-4E13-B15C-FF925919F861}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -0,0 +1,75 @@
/*****************************************************************************************
** Author:jxx 2022
** QQ:283591387
**http://v2.volcore.xyz/document/api 【代码生成页面ViewGrid】
**http://v2.volcore.xyz/document/vueDev
**http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
components: {
//查询界面扩展组件
gridHeader: '',
gridBody: '',
gridFooter: '',
//新建、编辑弹出框扩展组件
modelHeader: '',
modelBody: '',
modelFooter: ''
},
tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
buttons: { view: [], box: [], detail: [] }, //扩展的按钮
methods: {
//下面这些方法可以保留也可以删除
onInit() { //框架初始化配置前,
//示例:在按钮的最前面添加一个按钮
// this.buttons.unshift({ //也可以用push或者splice方法来修改buttons数组
// name: '按钮', //按钮名称
// icon: 'el-icon-document', //按钮图标vue2版本见iview文档iconvue3版本见element ui文档icon(注意不是element puls文档)
// type: 'primary', //按钮样式vue2版本见iview文档buttonvue3版本见element ui文档button
// onClick: function () {
// this.$Message.success('点击了按钮');
// }
// });
//示例:设置修改新建、编辑弹出框字段标签的长度
// this.boxOptions.labelWidth = 150;
},
onInited() {
//框架初始化配置后
//如果要配置明细表,在此方法操作
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
//界面查询前,可以给param.wheres添加查询参数
//返回false则不会执行查询
return true;
},
searchAfter(result) {
//查询后result返回的查询数据,可以在显示到表格前处理表格的值
return true;
},
addBefore(formData) {
//新建保存前formData为对象包括明细表可以给给表单设置值自己输出看formData的值
return true;
},
updateBefore(formData) {
//编辑保存前formData为对象包括明细表、删除行的Id
return true;
},
rowClick({ row, column, event }) {
//查询界面点击行事件
// this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
},
modelOpenAfter(row) {
//点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
//(1)判断是编辑还是新建操作: this.currentAction=='Add';
//(2)给弹出框设置默认值
//(3)this.editFormFields.字段='xxx';
//如果需要给下拉框设置默认值请遍历this.editFormOptions找到字段配置对应data属性的key值
//看不懂就把输出看console.log(this.editFormOptions)
}
}
};
export default extension;

@ -0,0 +1,75 @@
/*****************************************************************************************
** Author:jxx 2022
** QQ:283591387
**http://v2.volcore.xyz/document/api 【代码生成页面ViewGrid】
**http://v2.volcore.xyz/document/vueDev
**http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
components: {
//查询界面扩展组件
gridHeader: '',
gridBody: '',
gridFooter: '',
//新建、编辑弹出框扩展组件
modelHeader: '',
modelBody: '',
modelFooter: ''
},
tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
buttons: { view: [], box: [], detail: [] }, //扩展的按钮
methods: {
//下面这些方法可以保留也可以删除
onInit() { //框架初始化配置前,
//示例:在按钮的最前面添加一个按钮
// this.buttons.unshift({ //也可以用push或者splice方法来修改buttons数组
// name: '按钮', //按钮名称
// icon: 'el-icon-document', //按钮图标vue2版本见iview文档iconvue3版本见element ui文档icon(注意不是element puls文档)
// type: 'primary', //按钮样式vue2版本见iview文档buttonvue3版本见element ui文档button
// onClick: function () {
// this.$Message.success('点击了按钮');
// }
// });
//示例:设置修改新建、编辑弹出框字段标签的长度
// this.boxOptions.labelWidth = 150;
},
onInited() {
//框架初始化配置后
//如果要配置明细表,在此方法操作
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
//界面查询前,可以给param.wheres添加查询参数
//返回false则不会执行查询
return true;
},
searchAfter(result) {
//查询后result返回的查询数据,可以在显示到表格前处理表格的值
return true;
},
addBefore(formData) {
//新建保存前formData为对象包括明细表可以给给表单设置值自己输出看formData的值
return true;
},
updateBefore(formData) {
//编辑保存前formData为对象包括明细表、删除行的Id
return true;
},
rowClick({ row, column, event }) {
//查询界面点击行事件
// this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
},
modelOpenAfter(row) {
//点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
//(1)判断是编辑还是新建操作: this.currentAction=='Add';
//(2)给弹出框设置默认值
//(3)this.editFormFields.字段='xxx';
//如果需要给下拉框设置默认值请遍历this.editFormOptions找到字段配置对应data属性的key值
//看不懂就把输出看console.log(this.editFormOptions)
}
}
};
export default extension;

@ -3,132 +3,157 @@ let viewgird = [
{
path: '/Sys_Log',
name: 'sys_Log',
component: () => import('@/views/system/Sys_Log.vue' )
component: () => import('@/views/system/Sys_Log.vue')
},
{
path: '/Sys_User',
name: 'Sys_User',
component: () => import('@/views/system/Sys_User.vue' )
component: () => import('@/views/system/Sys_User.vue')
},
{
path: '/permission',
name: 'permission',
component: () => import('@/views/system/Permission.vue' )
component: () => import('@/views/system/Permission.vue')
},
{
path: '/Sys_Dictionary',
name: 'Sys_Dictionary',
component: () => import('@/views/system/Sys_Dictionary.vue' )
component: () => import('@/views/system/Sys_Dictionary.vue')
},
{
path: '/Sys_Role',
name: 'Sys_Role',
component: () => import('@/views/system/Sys_Role.vue' )
}, {
component: () => import('@/views/system/Sys_Role.vue')
},
{
path: '/Sys_Role1',
name: 'Sys_Role1',
component: () => import('@/views/system/Sys_Role1.vue' )
}
, {
component: () => import('@/views/system/Sys_Role1.vue')
},
{
path: '/Sys_DictionaryList',
name: 'Sys_DictionaryList',
component: () => import('@/views/system/Sys_DictionaryList.vue' )
}
, {
component: () => import('@/views/system/Sys_DictionaryList.vue')
},
{
path: '/SellOrder',
name: 'SellOrder',
component: () => import('@/views/order/SellOrder.vue' )
}, {
component: () => import('@/views/order/SellOrder.vue')
},
{
path: '/SellOrder2',
name: 'SellOrder2',
component: () => import('@/views/order/SellOrder2.vue' )
}, {
component: () => import('@/views/order/SellOrder2.vue')
},
{
path: '/SellOrder3',
name: 'SellOrder3',
component: () => import('@/views/order/SellOrder3.vue' )
}, {
component: () => import('@/views/order/SellOrder3.vue')
},
{
path: '/vSellOrderImg',
name: 'vSellOrderImg',
component: () => import('@/views/order/vSellOrderImg.vue' )
component: () => import('@/views/order/vSellOrderImg.vue')
},
{
path: '/App_Appointment',
name: 'App_Appointment',
component: () => import('@/views/order/App_Appointment.vue' )
component: () => import('@/views/order/App_Appointment.vue')
},
{
path: '/App_Appointment2', //二级表头
name: 'App_Appointment2',
component: () => import('@/views/order/App_Appointment2.vue' )
component: () => import('@/views/order/App_Appointment2.vue')
},
{
path: '/App_TransactionAvgPrice',
name: 'App_TransactionAvgPrice',
component: () => import('@/views/appmanager/App_TransactionAvgPrice.vue' ),
component: () => import('@/views/appmanager/App_TransactionAvgPrice.vue'),
meta: {
keepAlive: false
}
}
, {
},
{
path: '/App_Expert',
name: 'App_Expert',
component: () => import('@/views/appmanager/App_Expert.vue' )
}
, {
component: () => import('@/views/appmanager/App_Expert.vue')
},
{
path: '/App_Expert2',
name: 'App_Expert2',
component: () => import('@/views/appmanager/App_Expert2.vue' )
}
, {
component: () => import('@/views/appmanager/App_Expert2.vue')
},
{
path: '/App_Transaction',
name: 'App_Transaction',
component: () => import('@/views/appmanager/App_Transaction.vue' )
}
, {
component: () => import('@/views/appmanager/App_Transaction.vue')
},
{
path: '/App_Transaction2',
name: 'App_Transaction2',
component: () => import('@/views/appmanager/App_Transaction2.vue' )
}, {
component: () => import('@/views/appmanager/App_Transaction2.vue')
},
{
path: '/App_ReportPrice',
name: 'App_ReportPrice',
component: () => import('@/views/appmanager/App_ReportPrice.vue' )
}, {
component: () => import('@/views/appmanager/App_ReportPrice.vue')
},
{
path: '/App_News',
name: 'App_News',
component: () => import('@/views/appmanager/App_News.vue' )
}, {
component: () => import('@/views/appmanager/App_News.vue')
},
{
path: '/App_NewsEditor',
name: 'App_NewsEditor',
component: () => import('@/views/appmanager/App_NewsEditor.vue' )
} ,{
component: () => import('@/views/appmanager/App_NewsEditor.vue')
},
{
path: '/FormDesignOptions',
name: 'FormDesignOptions',
component: () => import('@/views/system/form/FormDesignOptions.vue')
} ,{
},
{
path: '/FormCollectionObject',
name: 'FormCollectionObject',
component: () => import('@/views/system/form/FormCollectionObject.vue')
} ,{
},
{
path: '/Sys_WorkFlow',
name: 'Sys_WorkFlow',
component: () => import('@/views/system/flow/Sys_WorkFlow.vue')
} ,{
},
{
path: '/Sys_WorkFlowTable',
name: 'Sys_WorkFlowTable',
component: () => import('@/views/system/flow/Sys_WorkFlowTable.vue')
} ,{
},
{
path: '/Sys_QuartzOptions',
name: 'Sys_QuartzOptions',
component: () => import('@/views/system/quartz/Sys_QuartzOptions.vue')
} ,{
},
{
path: '/Sys_QuartzLog',
name: 'Sys_QuartzLog',
component: () => import('@/views/system/quartz/Sys_QuartzLog.vue')
} ,{
},
{
path: '/Sys_Department',
name: 'Sys_Department',
component: () => import('@/views/system/system/Sys_Department.vue')
}]
},
{
path: '/Data_Device',
name: 'Data_Device',
component: () => import('@/views/data/device/Data_Device.vue')
},
{
path: '/Data_Produce',
name: 'Data_Produce',
component: () => import('@/views/data/produce/Data_Produce.vue')
}
]
export default viewgird

@ -0,0 +1,71 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
*业务请在@/extension/data/device/Data_Device.js此处编写
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend">
</view-grid>
</template>
<script>
import extend from "@/extension/data/device/Data_Device.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
setup() {
const table = ref({
key: 'id',
footer: "Foots",
cnName: '设备运行',
name: 'device/Data_Device',
url: "/Data_Device/",
sortName: "id"
});
const editFormFields = ref({"temperature":"","potential":"","current":"","processno":"","run_mode":""});
const editFormOptions = ref([[{"title":"电机温度","field":"temperature","type":"decimal"},
{"title":"母线电压","field":"potential","type":"decimal"},
{"title":"实际电流","field":"current","type":"decimal"}],
[{"title":"加工程序号","field":"processno"},
{"dataKey":"device_status","data":[],"title":"运行模式","field":"run_mode","type":"select"}]]);
const searchFormFields = ref({"processno":"","run_mode":""});
const searchFormOptions = ref([[{"title":"加工程序号","field":"processno","type":"text"},{"dataKey":"device_status","data":[],"title":"运行模式","field":"run_mode","type":"select"}]]);
const columns = ref([{field:'id',title:'ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
{field:'temperature',title:'电机温度',type:'decimal',width:110,align:'left',sort:true},
{field:'potential',title:'母线电压',type:'decimal',width:110,align:'left'},
{field:'current',title:'实际电流',type:'decimal',width:110,align:'left'},
{field:'processno',title:'加工程序号',type:'string',width:110,align:'left'},
{field:'run_mode',title:'运行模式',type:'short',bind:{ key:'device_status',data:[]},width:110,align:'left'},
{field:'CreateID',title:'CreateID',type:'int',width:100,hidden:true,align:'left'},
{field:'Creator',title:'Creator',type:'string',width:100,hidden:true,align:'left'},
{field:'CreateDate',title:'记录时间',type:'datetime',width:180,align:'left',sort:true},
{field:'ModifyID',title:'ModifyID',type:'int',width:100,hidden:true,align:'left'},
{field:'Modifier',title:'Modifier',type:'string',width:100,hidden:true,align:'left'},
{field:'ModifyDate',title:'ModifyDate',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
const detail = ref({
cnName: "#detailCnName",
table: "#detailTable",
columns: [],
sortName: "",
key: ""
});
return {
table,
extend,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
};
},
});
</script>

@ -0,0 +1,75 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
*业务请在@/extension/data/produce/Data_Produce.js此处编写
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend">
</view-grid>
</template>
<script>
import extend from "@/extension/data/produce/Data_Produce.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
setup() {
const table = ref({
key: 'id',
footer: "Foots",
cnName: '生产数据',
name: 'produce/Data_Produce',
url: "/Data_Produce/",
sortName: "id"
});
const editFormFields = ref({"standby_time":"","run_time":"","status":"","turnout":"","turnout_one":"","turnout_two":"","turnout_three":""});
const editFormOptions = ref([[{"title":"待机时长","field":"standby_time","type":"number"},
{"title":"运行时长","field":"run_time","type":"number"},
{"dataKey":"produce_status","data":[],"title":"运行状态","field":"status","type":"select"}],
[{"title":"当班产量","field":"turnout","type":"number"},
{"title":"工单 1 产量","field":"turnout_one","type":"number"},
{"title":"工单 2 产量","field":"turnout_two","type":"number"},
{"title":"工单 3 产量","field":"turnout_three","type":"number"}]]);
const searchFormFields = ref({"status":"","turnout":"","CreateDate":""});
const searchFormOptions = ref([[{"dataKey":"produce_status","data":[],"title":"运行状态","field":"status","type":"select"},{"title":"当班产量","field":"turnout","type":"number"}],[{"title":"记录时间","field":"CreateDate","type":"datetime"}]]);
const columns = ref([{field:'id',title:'ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
{field:'standby_time',title:'待机时长',type:'int',width:110,align:'left',sort:true},
{field:'run_time',title:'运行时长',type:'int',width:110,align:'left'},
{field:'status',title:'运行状态',type:'sbyte',bind:{ key:'produce_status',data:[]},width:110,align:'left'},
{field:'turnout',title:'当班产量',type:'int',width:110,align:'left'},
{field:'turnout_one',title:'工单 1 产量',type:'int',width:110,align:'left'},
{field:'turnout_two',title:'工单 2 产量',type:'int',width:110,align:'left'},
{field:'turnout_three',title:'工单 3 产量',type:'int',width:110,align:'left'},
{field:'CreateID',title:'CreateID',type:'int',width:100,hidden:true,readonly:true,align:'left'},
{field:'Creator',title:'Creator',type:'string',width:100,hidden:true,readonly:true,align:'left'},
{field:'CreateDate',title:'记录时间',type:'datetime',width:180,readonly:true,align:'left',sort:true},
{field:'ModifyID',title:'ModifyID',type:'int',width:100,hidden:true,readonly:true,align:'left'},
{field:'Modifier',title:'Modifier',type:'string',width:100,hidden:true,readonly:true,align:'left'},
{field:'ModifyDate',title:'ModifyDate',type:'datetime',width:150,hidden:true,readonly:true,align:'left',sort:true}]);
const detail = ref({
cnName: "#detailCnName",
table: "#detailTable",
columns: [],
sortName: "",
key: ""
});
return {
table,
extend,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
};
},
});
</script>
Loading…
Cancel
Save