卢江海、出货改动

This commit is contained in:
卢江海
2025-03-12 17:31:32 +08:00
parent 7d23adb53b
commit ab8c1dbb9b
3 changed files with 43 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ public interface IReportFlowService: IBaseService<ProReportwork01>
bool ProcessReportWork(string workorder, int process, int finish_num,int bad_num,string Worker);
bool ShipmentProcessReportwork(string workorder, int processId, int finish_num, int bad_num, string customer_order, string Worker);
int ShipmentProcessReportwork(string workorder, int processId, int finish_num, int bad_num, string customer_order, string Worker);
List<ProReportWorkDetialDto> GetWorkOrderReportWorkList(string workorder);
PagedInfo<ProReportWorkDetialDto> GetReportInfoByName(ProReportWorkDto2 query);

View File

@@ -12,6 +12,7 @@ using DOAN.Service.Public.IPublicService;
using Infrastructure.Attribute;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using NPOI.SS.Formula.Functions;
using SqlSugar.DistributedSystem.Snowflake;
using System.Diagnostics;
@@ -140,9 +141,25 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
/// <param name="feed_order"></param>
/// <param name="Worker"></param>
/// <returns></returns>
public bool ShipmentProcessReportwork(string workorder, int processId, int finish_num, int bad_num, string customer_order, string Worker)
public int ShipmentProcessReportwork(string workorder, int processId, int finish_num, int bad_num, string customer_order, string Worker)
{
int result = 0;
//采购订单号和工单号是否匹配
bool isexistfree_order = Context.Queryable<ProWorkorder>().Where(o=>o.FeedOrder==customer_order).Any();
if (isexistfree_order)
{
OrderPurchase orderPurchase= Context.Queryable<OrderPurchase>().Where(o => o.OrderNoMes == customer_order).First();
if (orderPurchase.DeliveryQuantity + finish_num> orderPurchase.DemandQuantity)
{
return 3;//超额
}
}
else
{
return 2;//采购订单号和工单号不匹配
}
int result = 0;
bool Exist = Context.Queryable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == processId).Any();
string NickName = Context.Queryable<SysUser>().Where(it => it.UserName == Worker).Select(it => it.NickName).First();
Worker = string.IsNullOrEmpty(NickName) ? Worker + "|异常人员|" : NickName;
@@ -216,7 +233,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
}
return result > 0;
return result > 0?1:0;
}
public List<ProReportWorkDetialDto> GetWorkOrderReportWorkList(string workorder)