涂装数据采集
This commit is contained in:
92
ZR.Service/mes/dc/FnproductionService.cs
Normal file
92
ZR.Service/mes/dc/FnproductionService.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.Business;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.Business.IBusinessService;
|
||||
using System.Linq;
|
||||
using ZR.Model.dc;
|
||||
using ZR.Model.MES.dc.Dto;
|
||||
|
||||
namespace ZR.Service.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// 机器人涂装数据采集表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IFnproductionService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class FnproductionService : BaseService<Fnproduction>, IFnproductionService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询机器人涂装数据采集表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<FnproductionDto> GetList(FnproductionQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<Fnproduction>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<Fnproduction, FnproductionDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public Fnproduction GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
//.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加机器人涂装数据采集表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public Fnproduction AddFnproduction(Fnproduction model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改机器人涂装数据采集表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateFnproduction(Fnproduction model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new Fnproduction()
|
||||
//{
|
||||
// DateTimeSt = model.DateTimeSt,
|
||||
// DateTimeEnd = model.DateTimeEnd,
|
||||
// PlcStyle = model.PlcStyle,
|
||||
// PlcColor = model.PlcColor,
|
||||
// PlcVar = model.PlcVar,
|
||||
// PlcStartphoncount = model.PlcStartphoncount,
|
||||
// PlcStartlsshiftcount = model.PlcStartlsshiftcount,
|
||||
// RobotNo = model.RobotNo,
|
||||
// RobotProNo = model.RobotProNo,
|
||||
// RobotCcv = model.RobotCcv,
|
||||
// RobotVar = model.RobotVar,
|
||||
// RobotFlux = model.RobotFlux,
|
||||
// RobotBrushNo = model.RobotBrushNo,
|
||||
// EndStatus = model.EndStatus,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
25
ZR.Service/mes/dc/IService/IFnproductionService.cs
Normal file
25
ZR.Service/mes/dc/IService/IFnproductionService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.Business;
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model.MES.dc.Dto;
|
||||
using ZR.Model.dc;
|
||||
|
||||
namespace ZR.Service.Business.IBusinessService
|
||||
{
|
||||
/// <summary>
|
||||
/// 机器人涂装数据采集表service接口
|
||||
/// </summary>
|
||||
public interface IFnproductionService : IBaseService<Fnproduction>
|
||||
{
|
||||
PagedInfo<FnproductionDto> GetList(FnproductionQueryDto parm);
|
||||
|
||||
Fnproduction GetInfo(int Id);
|
||||
|
||||
Fnproduction AddFnproduction(Fnproduction parm);
|
||||
|
||||
int UpdateFnproduction(Fnproduction parm);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user