zhaoy 10 місяці тому
джерело
коміт
c0cc097cbe
10 змінених файлів з 157 додано та 4 видалено
  1. +1
    -1
      BPA.SAAS.Manage.Application/Device/DeviceVesionServices.cs
  2. +13
    -0
      BPA.SAAS.Manage.Application/Device/Dtos/Device/TechnologyQueryInputDto.cs
  3. +1
    -1
      BPA.SAAS.Manage.Application/Device/Interface/IDeviceVesionService.cs
  4. +15
    -0
      BPA.SAAS.Manage.Application/Device/Interface/ITechnologyService.cs
  5. +0
    -1
      BPA.SAAS.Manage.Application/Device/Services/ProductFunctionService.cs
  6. +50
    -0
      BPA.SAAS.Manage.Application/Device/Services/TechnologyService.cs
  7. +26
    -0
      BPA.SAAS.Manage.Application/Device/TechnologyServices.cs
  8. +23
    -0
      BPA.SAAS.Manage.Core/Device/BPA_Technology.cs
  9. +27
    -0
      BPA.SAAS.Manage.Core/Device/BPA_TechnologyAction.cs
  10. +1
    -1
      BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs

+ 1
- 1
BPA.SAAS.Manage.Application/Device/DeviceVesionServices.cs Переглянути файл

@@ -1,7 +1,7 @@
using BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Product;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Collections.Generic;


+ 13
- 0
BPA.SAAS.Manage.Application/Device/Dtos/Device/TechnologyQueryInputDto.cs Переглянути файл

@@ -0,0 +1,13 @@
using BPA.SAAS.Manage.Core.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.Device.Dtos.Device
{
public class TechnologyQueryInputDto: PageInputBase
{
}
}

+ 1
- 1
BPA.SAAS.Manage.Application/Device/Interface/IDeviceVesionService.cs Переглянути файл

@@ -1,6 +1,6 @@
using BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Product;
using System;
using System.Collections.Generic;
using System.Linq;


+ 15
- 0
BPA.SAAS.Manage.Application/Device/Interface/ITechnologyService.cs Переглянути файл

@@ -0,0 +1,15 @@
using BPA.SAAS.Manage.Application.Device.Dtos.Device;
using BPA.SAAS.Manage.Core.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.Device.Interface
{
public interface ITechnologyService
{
Task<PageUtil> GetTechnologyPage(TechnologyQueryInputDto inputDto);
}
}

+ 0
- 1
BPA.SAAS.Manage.Application/Device/Services/ProductFunctionService.cs Переглянути файл

@@ -3,7 +3,6 @@ using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Comm.Const;
using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Product;
using NPOI.POIFS.Crypt.Dsig;
using NPOI.Util;


+ 50
- 0
BPA.SAAS.Manage.Application/Device/Services/TechnologyService.cs Переглянути файл

@@ -0,0 +1,50 @@
using BPA.SAAS.Manage.Application.Device.Dtos.Device;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Product;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.Device.Services
{
public class TechnologyService : ITechnologyService, ITransient
{
private readonly ISqlSugarClient _db;
public TechnologyService(ISqlSugarClient db)
{
_db=db;
}
/// <summary>
/// 分页查询
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
public async Task<PageUtil> GetTechnologyPage(TechnologyQueryInputDto inputDto)
{
var total = new RefAsync<int>();
var data = await _db.Queryable<BPA_ProductVesion,BPA_Technology, BPA_Product>((a, b,c) => new JoinQueryInfos(
JoinType.Left, a.Id == b.DeviceVersionId,
JoinType.Left, a.ProductId == c.Id
)).Select((a, b, c) => new
{
Id=b.Id,
Vesion=a.Vesion,
ProductName=c.Name,
CreateAt=b.CreateAt,
})
.OrderBy(x => x.CreateAt, OrderByType.Desc)
.ToPageListAsync(inputDto.Current, inputDto.PageSize, total);

return new PageUtil()
{
Data = data,
Total = total

};
}
}
}

+ 26
- 0
BPA.SAAS.Manage.Application/Device/TechnologyServices.cs Переглянути файл

@@ -0,0 +1,26 @@
using BPA.SAAS.Manage.Application.Device.Dtos.Device;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.Device
{
[ApiDescriptionSettings("Technology", Tag = "设备工艺")]
public class TechnologyServices: IDynamicApiController, ITransient
{
ITechnologyService _technologyService;
public TechnologyServices(ITechnologyService technologyService)
{
_technologyService= technologyService;
}
[HttpPost("/api/technology/page")]
public async Task<PageUtil> GetTechnologyPage(TechnologyQueryInputDto inputDto)
{
return await _technologyService.GetTechnologyPage(inputDto);
}
}
}

+ 23
- 0
BPA.SAAS.Manage.Core/Device/BPA_Technology.cs Переглянути файл

@@ -0,0 +1,23 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.Device
{
[SugarTable("bpa_technology")]
public class BPA_Technology
{
/// <summary>
/// 主键 Guid
/// </summary>
[SugarColumn(IsPrimaryKey = true, ColumnDataType = "Nvarchar(64)", IsNullable = false)]
public string Id { get; set; }
public string Name { get; set; }
public string DeviceVersionId { get; set; }
public string ForeignKeyRe { get; set; }
public DateTime CreateAt { get; set; }
}
}

+ 27
- 0
BPA.SAAS.Manage.Core/Device/BPA_TechnologyAction.cs Переглянути файл

@@ -0,0 +1,27 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.Device
{
[SugarTable("bpa_technologyaction")]
public class BPA_TechnologyAction
{
/// <summary>
/// 主键 Guid
/// </summary>
[SugarColumn(IsPrimaryKey = true, ColumnDataType = "Nvarchar(64)", IsNullable = false)]
public string Id { get; set; }
public string TechnologyId { get; set; }
public string ActionName { get; set; }
public string ActionValue { get; set; }
public string ActionType { get; set; }
public string Unit { get; set; }
public bool IsBatch { get; set; }
public DateTime CreateAt { get; set; }
public int Sort { get; set; }
}
}

BPA.SAAS.Manage.Core/Device/BPA_ProductVesion.cs → BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs Переглянути файл

@@ -7,7 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.Device
namespace BPA.SAAS.Manage.Core.Product
{
[SugarTable("bpa_productvesion")]
public class BPA_ProductVesion : IBaseEntity

Завантаження…
Відмінити
Зберегти