卢江海、出货改动
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user