Commit 2dc38498 by Seniorious

1

parent 03390e27
...@@ -69,6 +69,8 @@ namespace APIs.Controllers ...@@ -69,6 +69,8 @@ namespace APIs.Controllers
private readonly IBussinessInventoryService _bussinessInventoryService; private readonly IBussinessInventoryService _bussinessInventoryService;
private readonly IBussinessInventoryDetailService _bussinessInventoryDetailService; private readonly IBussinessInventoryDetailService _bussinessInventoryDetailService;
private readonly IChannelService _channelService; private readonly IChannelService _channelService;
private readonly IViewWarrantyWarnService _viewWarrantyWarnService;
private readonly DehumidifierHelper _dehumidifierHelper; private readonly DehumidifierHelper _dehumidifierHelper;
public BaseInfoController(IMapper mapper, DehumidifierHelper dehumidifierHelper, IPoliceService policeService, IEquipmentTypeService equipmentTypeService, public BaseInfoController(IMapper mapper, DehumidifierHelper dehumidifierHelper, IPoliceService policeService, IEquipmentTypeService equipmentTypeService,
...@@ -76,8 +78,10 @@ namespace APIs.Controllers ...@@ -76,8 +78,10 @@ namespace APIs.Controllers
IInvService invService, IUsersService usersService, ILogService logService, IDevHistoryService devHistoryService, IInvService invService, IUsersService usersService, ILogService logService, IDevHistoryService devHistoryService,
IDevService devService, IWarehouseService warehouseService, IOrderService orderService, ISupplierService supplierService, IDevService devService, IWarehouseService warehouseService, IOrderService orderService, ISupplierService supplierService,
IThisInfoService thisInfoService, IPrintService printService, IPoliceFingerService policeFingerService, IPoliceInfoService policeInfoService, IThisInfoService thisInfoService, IPrintService printService, IPoliceFingerService policeFingerService, IPoliceInfoService policeInfoService,
IBussinessInventoryService bussinessInventoryService, IBussinessInventoryDetailService bussinessInventoryDetailService, IChannelService channelService) IBussinessInventoryService bussinessInventoryService, IBussinessInventoryDetailService bussinessInventoryDetailService, IChannelService channelService,
IViewWarrantyWarnService viewWarrantyWarnService)
{ {
Mapper = mapper;
_dehumidifierHelper = dehumidifierHelper; _dehumidifierHelper = dehumidifierHelper;
_carService = carService; _carService = carService;
_equipmentSizeService = equipmentSizeService; _equipmentSizeService = equipmentSizeService;
...@@ -99,7 +103,7 @@ namespace APIs.Controllers ...@@ -99,7 +103,7 @@ namespace APIs.Controllers
_bussinessInventoryService = bussinessInventoryService; _bussinessInventoryService = bussinessInventoryService;
_bussinessInventoryDetailService = bussinessInventoryDetailService; _bussinessInventoryDetailService = bussinessInventoryDetailService;
_channelService = channelService; _channelService = channelService;
Mapper = mapper; _viewWarrantyWarnService = viewWarrantyWarnService;
} }
/// <summary> /// <summary>
...@@ -812,11 +816,11 @@ namespace APIs.Controllers ...@@ -812,11 +816,11 @@ namespace APIs.Controllers
updateTime = DateTime.Now, updateTime = DateTime.Now,
price = myOrder.DetailList?.FirstOrDefault(s => s.equipmentSize.Equals(mysize.id))?.price ?? 0, price = myOrder.DetailList?.FirstOrDefault(s => s.equipmentSize.Equals(mysize.id))?.price ?? 0,
}); });
} }
} }
//出入库子单 //出入库子单
var inv = await _inventoryService.QueryOne(s => s.epc.Equals(epc)); var inv = await _inventoryService.QueryOne(s => s.epc.Equals(epc));
logDetailList.Add(new LogDetail() logDetailList.Add(new LogDetail()
{ {
...@@ -831,7 +835,7 @@ namespace APIs.Controllers ...@@ -831,7 +835,7 @@ namespace APIs.Controllers
equipmentType = 0, equipmentType = 0,
supplierId = mysupplier?.id ?? "", supplierId = mysupplier?.id ?? "",
supplierName = mysupplier?.name ?? "", supplierName = mysupplier?.name ?? "",
price = inv?.price ?? 0, price = inv == null ? (myOrder.DetailList?.FirstOrDefault(s => s.equipmentSize.Equals(mysize.id))?.price ?? 0) : (inv?.price ?? 0),
createTime = DateTime.Now, createTime = DateTime.Now,
updateTime = DateTime.Now, updateTime = DateTime.Now,
}); });
......
...@@ -79,7 +79,7 @@ namespace APIs ...@@ -79,7 +79,7 @@ namespace APIs
services.AddScoped<IBussinessInventoryService, BussinessInventoryService>(); services.AddScoped<IBussinessInventoryService, BussinessInventoryService>();
services.AddScoped<IBussinessInventoryDetailService, BussinessInventoryDetailService>(); services.AddScoped<IBussinessInventoryDetailService, BussinessInventoryDetailService>();
services.AddScoped<IChannelService, ChannelService>(); services.AddScoped<IChannelService, ChannelService>();
services.AddScoped<IViewWarrantyWarnService, ViewWarrantyWarnService>();
#endregion #endregion
#region Repository #region Repository
...@@ -107,6 +107,7 @@ namespace APIs ...@@ -107,6 +107,7 @@ namespace APIs
services.AddScoped<IBussinessInventoryRepository, BussinessInventoryRepository>(); services.AddScoped<IBussinessInventoryRepository, BussinessInventoryRepository>();
services.AddScoped<IBussinessInventoryDetailRepository, BussinessInventoryDetailRepository>(); services.AddScoped<IBussinessInventoryDetailRepository, BussinessInventoryDetailRepository>();
services.AddScoped<IChannelRepository, ChannelRepository>(); services.AddScoped<IChannelRepository, ChannelRepository>();
services.AddScoped<IViewWarrantyWarnRepository, ViewWarrantyWarnRepository>();
#endregion #endregion
#region 注册RabbitMQ消费者 #region 注册RabbitMQ消费者
......
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models.Table
{
[SugarTable("view_warranty_warn")]
public class ViewWarrantyWarn : BaseTable
{
[SugarColumn(IsPrimaryKey = true)]
public string? id { get; set; }
[SugarColumn(ColumnName = "type_id")]
public string? typeId { get; set; }
[SugarColumn(ColumnName = "size_id")]
public string? sizeId { get; set; }
[SugarColumn(ColumnName = "supplier_id")]
public string? supplierId { get; set; }
public string? epc { get; set; }
[SugarColumn(ColumnName = "type_name")]
public string? typeName { get; set; }
[SugarColumn(ColumnName = "size_name")]
public string? sizeName { get; set; }
[SugarColumn(ColumnName = "supplier_name")]
public string? supplierName { get; set; }
[SugarColumn(ColumnName = "production_date")]
public DateTime? productionDate { get; set; }
[SugarColumn(ColumnName = "warranty_period")]
public int warrantyPeriod { get; set; }
}
}
using Models.Table;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Repositories.IRepository.IBussiness
{
public interface IViewWarrantyWarnRepository : IBaseRepository<ViewWarrantyWarn>
{
}
}
...@@ -257,7 +257,7 @@ namespace Repositories.Repository.Bussiness ...@@ -257,7 +257,7 @@ namespace Repositories.Repository.Bussiness
myOrder.actualQuantity = summary.number; myOrder.actualQuantity = summary.number;
myOrder.price = sumPrice; myOrder.price = sumPrice;
myOrder.isUpload = 1; myOrder.isUpload = 1;
myOrder.orderState = 0; //myOrder.orderState = 0;
myOrder.updateTime = DateTime.Now; myOrder.updateTime = DateTime.Now;
var orderrs = context.UpdateNav(myOrder).Include(z1 => z1.DetailList).ExecuteCommand(); var orderrs = context.UpdateNav(myOrder).Include(z1 => z1.DetailList).ExecuteCommand();
......
using Models.Table;
using Repositories.IRepository;
using Repositories.IRepository.IBussiness;
using Repositories.IRepository.IUnitOfWork;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Repositories.Repository.Bussiness
{
public class ViewWarrantyWarnRepository : BaseRepository<ViewWarrantyWarn>, IViewWarrantyWarnRepository
{
public ViewWarrantyWarnRepository(ILocalSugarUnitOfWork sugarUnitOfWork) : base(sugarUnitOfWork)
{
}
}
}
using Models.Table;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Services.Interface
{
public interface IViewWarrantyWarnService : IBaseServices<ViewWarrantyWarn>
{
}
}
using Models.Table;
using Repositories.IRepository.IBussiness;
using Services.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Services
{
public class ViewWarrantyWarnService : BaseService<ViewWarrantyWarn>, IViewWarrantyWarnService
{
private readonly IViewWarrantyWarnRepository _viewWarrantyWarnRepository;
public ViewWarrantyWarnService(IViewWarrantyWarnRepository viewWarrantyWarnRepository)
{
base.BaseDal = viewWarrantyWarnRepository;
_viewWarrantyWarnRepository = viewWarrantyWarnRepository;
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论