#region << 版 本 注 释 >>
|
/*----------------------------------------------------------------
|
* 命名空间:WIDESEAWCS_TaskInfoService
|
* 创建者:胡童庆
|
* 创建时间:2024/8/2 16:13:36
|
* 版本:V1.0.0
|
* 描述:
|
*
|
* ----------------------------------------------------------------
|
* 修改人:
|
* 修改时间:
|
* 版本:V1.0.1
|
* 修改说明:
|
*
|
*----------------------------------------------------------------*/
|
#endregion << 版 本 注 释 >>
|
|
using AutoMapper;
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
using NetTaste;
|
using Newtonsoft.Json;
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
|
using SqlSugar;
|
using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Diagnostics;
|
using System.Diagnostics.CodeAnalysis;
|
using System.Linq;
|
using System.Linq.Expressions;
|
using System.Reflection;
|
using System.Reflection.Metadata;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEA_Comm.Http;
|
using WIDESEAWCS_Core;
|
using WIDESEAWCS_Core.BaseServices;
|
using WIDESEAWCS_Core.Enums;
|
using WIDESEAWCS_DTO.Enum;
|
using WIDESEAWCS_DTO.TaskInfo;
|
using WIDESEAWCS_ISystemRepository;
|
using WIDESEAWCS_ISystemServices;
|
using WIDESEAWCS_Model.Models;
|
using WIDESEAWCS_Model.Models.System;
|
using static WIDESEAWCS_ISystemServices.IOrderDetailsService;
|
|
namespace WIDESEAWCS_SystemServices
|
{
|
public class OrderDetailsService : ServiceBase<OrderDetails, IOrderDetailsRepository>, IOrderDetailsService
|
{
|
public OrderDetailsService(IOrderDetailsRepository BaseDal) : base(BaseDal)
|
{
|
|
}
|
public int GetOrderDetails(string Barcodes)
|
{
|
OrderDetails orderDetails = BaseDal.QueryData(x=>x.Orderdetails_outid == Barcodes).FirstOrDefault();
|
if(orderDetails != null)
|
{
|
if (orderDetails.Orderdetails_cutLength <= 800 && orderDetails.Orderdetails_cutLength>=50)
|
{
|
Random random = new Random();
|
return random.Next(0, 2) == 0 ? 2 : 3;
|
}
|
else if (orderDetails.Orderdetails_cutLength >= 800 && orderDetails.Orderdetails_cutLength <= 1220)
|
{
|
return 2;
|
}
|
else
|
{
|
return -1;
|
}
|
}
|
else
|
{
|
return -1;
|
}
|
}
|
|
|
public string ToMesScan_sync = WIDESEAWCS_Core.Helper.AppSettings.Configuration["ToMesScan_sync"];
|
|
public bool ToMesBarc(int Barcodes)
|
{
|
ToMesBarc toMes = new ToMesBarc()
|
{
|
id = Barcodes.ToString(),
|
type = "1",
|
};
|
ToMesBarcRes toMesBarc=HttpHelper.Post<ToMesBarcRes>($"{ToMesScan_sync}", toMes);
|
if (toMesBarc.code == 1)
|
{
|
return true;
|
}
|
else
|
{
|
return false;
|
}
|
}
|
|
|
}
|
}
|