仓库管理:库位:update
This commit is contained in:
@@ -54,5 +54,9 @@
|
||||
/// 清空数据
|
||||
/// </summary>
|
||||
CLEAN = 9,
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
QUERY = 10,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("production_warehouse_info")]
|
||||
public IActionResult Queryproduction_warehouse_info(string shelf = "", int layer = 0, int pageNum = 0, int pageSize = 0)
|
||||
public IActionResult Queryproduction_warehouse_info(string shelf , int? layer , int pageNum = 0, int pageSize = 0)
|
||||
{
|
||||
(List<WmInfo>, int) data = wm_locationInfoService.Getwminfo_product(shelf, layer, pageNum, pageSize);
|
||||
(List<WmInfo>, int) data = wm_locationInfoService.Getwminfo_product(shelf, layer??0, pageNum, pageSize);
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
[Log(Title = "成品库当前货物表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmGoodsNowProduction(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
long[] idsArr = Tools.SpitLongArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _WmGoodsNowProductionService.Delete(idsArr);
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmGoodsOutProduction(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
long[] idsArr = Tools.SpitLongArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _WmGoodsOutProductionService.Delete(idsArr);
|
||||
|
||||
@@ -107,6 +107,20 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("getInfoByPatchCode")]
|
||||
[Log(Title = "物料记录表", BusinessType = BusinessType.QUERY)]
|
||||
public IActionResult GetInfoByPatchCode(string patchCode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(patchCode))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
WmGoodsNowProduction nowProduction= _WmMaterialService.GetInfoByPatchCode(patchCode);
|
||||
return SUCCESS(nowProduction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using ZR.Service.mes.wms.IService;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.wms;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
//创建时间:2024-03-18
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
@@ -150,6 +151,8 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
List<WmMaterialQuery_print> data = _WmOutOrderService.Queryoutoder_matrials(shipment_num);
|
||||
return SUCCESS(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生成出货单的出货计划
|
||||
/// </summary>
|
||||
@@ -166,7 +169,43 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
|
||||
return SUCCESS(WmOutOrderPlanList);
|
||||
}
|
||||
/// <summary>
|
||||
/// 5 成品出库
|
||||
/// </summary>
|
||||
/// <param name="doMaterialOut"></param>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
[HttpPost("doMaterialOut")]
|
||||
public IActionResult DoMaterialOut([FromBody] WmDoMaterialOut_Dto doMaterialOut)
|
||||
{
|
||||
if(doMaterialOut == null||doMaterialOut.ShipmentNum==null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
|
||||
(int,int) data= _WmOutOrderService.DoMaterialOut(doMaterialOut, HttpContext.GetName());
|
||||
|
||||
return SUCCESS(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 6 出库单完成
|
||||
/// </summary>
|
||||
/// <param name="shipment_num"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("over_outorderplan")]
|
||||
public IActionResult OverOutorderplan(string shipment_num)
|
||||
{
|
||||
if (shipment_num == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
|
||||
bool status = _WmOutOrderService.OverOutorderplan(shipment_num);
|
||||
return SUCCESS(status);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -34,9 +34,16 @@ namespace ZR.Admin.WebApi.Filters
|
||||
{
|
||||
ApiResult response = new();
|
||||
response.Code = (int)ResultCode.PARAM_ERROR;
|
||||
|
||||
// todo 模型校验
|
||||
/*
|
||||
在.Net Core的时代中,框架会帮你自动验证model的state,也就是ModelState。
|
||||
框架会为你自动注册ModelStateInvalidFilter,
|
||||
这个会运行在OnActionExecuting事件里面。
|
||||
*/
|
||||
var values = context.ModelState.Values;
|
||||
//todo 在干啥???
|
||||
|
||||
// return next();
|
||||
|
||||
foreach (var item in values)
|
||||
{
|
||||
foreach (var err in item.Errors)
|
||||
@@ -64,6 +71,7 @@ namespace ZR.Admin.WebApi.Filters
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入操作日志
|
||||
/// OnActionExecuted是在Action中的代码执行之后运行的方法。
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
|
||||
@@ -2,6 +2,7 @@ using AspNetCoreRateLimit;
|
||||
using Infrastructure;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System.Text.Json.Serialization;
|
||||
using ZR.Admin.WebApi.AutoMapperProfile;
|
||||
@@ -92,7 +93,11 @@ builder.Services.AddMvc(options =>
|
||||
builder.Services.AddSwaggerConfig();
|
||||
|
||||
builder.Services.AddAutoMapper(typeof(AutoMapperProfile));
|
||||
|
||||
//关闭参数自动校验,我们需要返回自定义的格式
|
||||
builder.Services.Configure<ApiBehaviorOptions>((o) =>
|
||||
{
|
||||
o.SuppressModelStateInvalidFilter = true;
|
||||
});
|
||||
var app = builder.Build();
|
||||
InternalApp.ServiceProvider = app.Services;
|
||||
InternalApp.Configuration = builder.Configuration;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace ZR.Model.MES.wms.Dto
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public string Quantity { get; set; }
|
||||
public int? Quantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产时间
|
||||
|
||||
@@ -7,6 +7,36 @@ namespace ZR.Model.MES.wms.Dto
|
||||
/// </summary>
|
||||
public class WmGoodsNowProductionQueryDto : PagerInfo
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
|
||||
public string PackageCode { get; set; }
|
||||
|
||||
|
||||
public string PackageCodeClient { get; set; }
|
||||
|
||||
public string PackageCodeOriginal { get; set; }
|
||||
|
||||
|
||||
public string LocationCode { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public int? GoodsNumLogic { get; set; }
|
||||
|
||||
public int? GoodsNumAction { get; set; }
|
||||
|
||||
public DateTime? EntryWarehouseTime { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -17,15 +47,15 @@ namespace ZR.Model.MES.wms.Dto
|
||||
[Required(ErrorMessage = "雪花id不能为空")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "箱子编号(MES)不能为空")]
|
||||
|
||||
public string PackageCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "箱子编号(客户)不能为空")]
|
||||
|
||||
public string PackageCodeClient { get; set; }
|
||||
|
||||
public string PackageCodeOriginal { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "库位编号不能为空")]
|
||||
|
||||
public string LocationCode { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
@@ -7,6 +7,41 @@ namespace ZR.Model.MES.wms.Dto
|
||||
/// </summary>
|
||||
public class WmGoodsOutProductionQueryDto : PagerInfo
|
||||
{
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public string FkNowProductionId { get; set; }
|
||||
|
||||
public string FkOutOrderId { get; set; }
|
||||
|
||||
public string PackageCode { get; set; }
|
||||
|
||||
|
||||
public string PackageCodeClient { get; set; }
|
||||
|
||||
public string PackageCodeOriginal { get; set; }
|
||||
|
||||
public string LocationCode { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public int? GoodsNumLogic { get; set; }
|
||||
|
||||
public int? GoodsNumAction { get; set; }
|
||||
|
||||
public DateTime? EntryWarehouseTime { get; set; }
|
||||
|
||||
public DateTime? OutTime { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -68,6 +68,23 @@ namespace ZR.Model.MES.wms.Dto
|
||||
|
||||
}
|
||||
|
||||
// 出货到出货记录表
|
||||
public class WmDoMaterialOut_Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库单号
|
||||
/// </summary>
|
||||
public string ShipmentNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次号
|
||||
/// </summary>
|
||||
public string[] PatchCode { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -37,6 +37,7 @@ namespace ZR.Model.MES.wms
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -40,6 +40,16 @@ namespace ZR.Model.MES.wms
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "location")]
|
||||
public string Location { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
///</summary>
|
||||
|
||||
@@ -20,5 +20,7 @@ namespace ZR.Service.mes.wms.IService
|
||||
|
||||
int UpdateWmMaterial(WmMaterial parm);
|
||||
|
||||
WmGoodsNowProduction GetInfoByPatchCode(string patchCode);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,5 +31,10 @@ namespace ZR.Service.mes.wms.IService
|
||||
|
||||
List<WmOutOrderPlan> Generate_outorderplan(string shipment_num);
|
||||
|
||||
(int, int) DoMaterialOut(WmDoMaterialOut_Dto doMaterialOut, string Createby);
|
||||
|
||||
|
||||
bool OverOutorderplan(string shipment_num);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace ZR.Service.mes.wms
|
||||
resultionPackageCode.ProductionTime = "20" + workoderidid.Substring(0, 6);
|
||||
//todo 解析箱子中产品数量
|
||||
string product_num = splitstr[3].Substring(4);
|
||||
resultionPackageCode.Quantity = product_num;
|
||||
resultionPackageCode.Quantity = int.Parse(product_num);
|
||||
//todo 产品描述 partnumber
|
||||
// ProWorklplan_v2 plan= Context.Queryable<ProWorklplan_v2>().Where(it => it.Partnumber == partnumber).First();
|
||||
//if(plan != null)
|
||||
|
||||
@@ -62,9 +62,11 @@ namespace ZR.Service.mes.wms
|
||||
string workorder_id = resultionPackage.WorkoderID;
|
||||
|
||||
|
||||
wmGood.GoodsNumLogic = Context.Queryable<WmPackingrecord>()
|
||||
.Where(it => it.WorkOrderNum == workorder_id)
|
||||
.Count();
|
||||
//wmGood.GoodsNumLogic = Context.Queryable<WmPackingrecord>()
|
||||
// .Where(it => it.WorkOrderNum == workorder_id)
|
||||
// .Count();
|
||||
|
||||
wmGood.GoodsNumLogic = (resultionPackage.Quantity)??0;
|
||||
wmGood.GoodsNumAction= wmGood.GoodsNumLogic;
|
||||
wmGood.EntryWarehouseTime = DateTime.Now;
|
||||
wmGood.CreatedBy = createName;
|
||||
@@ -217,7 +219,7 @@ namespace ZR.Service.mes.wms
|
||||
resultionPackageCode.ProductionTime="20"+ workoderidid.Substring(0,6);
|
||||
//todo 解析箱子中产品数量
|
||||
string product_num = splitstr[3].Substring(4);
|
||||
resultionPackageCode.Quantity = product_num;
|
||||
resultionPackageCode.Quantity = int.Parse(product_num);
|
||||
//todo 产品描述 partnumber
|
||||
// ProWorklplan_v2 plan= Context.Queryable<ProWorklplan_v2>().Where(it => it.Partnumber == partnumber).First();
|
||||
//if(plan != null)
|
||||
@@ -228,7 +230,9 @@ namespace ZR.Service.mes.wms
|
||||
// {
|
||||
// resultionPackageCode.ProductionDescribe = "生产计划无此零件号";
|
||||
// }
|
||||
ProWorkorder_v2 workorder= Context.Queryable<ProWorkorder_v2>().Where(it => it.FinishedPartNumber == partnumber).First();
|
||||
ProWorkorder_v2 workorder= Context.Queryable<ProWorkorder_v2>()
|
||||
.Where(it => it.FinishedPartNumber == partnumber)
|
||||
.First();
|
||||
|
||||
if (workorder != null)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace ZR.Service.mes.wms
|
||||
{
|
||||
int totalNum = 0;
|
||||
var predicate = Expressionable.Create<WmInfo>()
|
||||
.AndIF(!string.IsNullOrEmpty(shelf), it => it.Shelf == shelf)
|
||||
.AndIF(!string.IsNullOrEmpty(shelf), it => it.Shelf.Contains(shelf))
|
||||
.AndIF(layer > 0, it => it.Layer == layer)
|
||||
.ToExpression();
|
||||
List<WmInfo> product_wminfoList = Context.Queryable<WmInfo>().Where(predicate).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
|
||||
@@ -25,7 +25,11 @@ namespace ZR.Service.mes.wms
|
||||
/// <returns></returns>
|
||||
public PagedInfo<WmGoodsNowProductionDto> GetList(WmGoodsNowProductionQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmGoodsNowProduction>();
|
||||
var predicate = Expressionable.Create<WmGoodsNowProduction>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.Partnumber), it => it.Partnumber.Contains(parm.Partnumber))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.PackageCodeClient), it => it.PackageCodeClient.Contains(parm.PackageCodeClient))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.LocationCode), it => it.LocationCode.Contains(parm.LocationCode))
|
||||
;
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
|
||||
@@ -26,7 +26,12 @@ namespace ZR.Service.mes.wms
|
||||
/// <returns></returns>
|
||||
public PagedInfo<WmGoodsOutProductionDto> GetList(WmGoodsOutProductionQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmGoodsOutRecord>();
|
||||
var predicate = Expressionable.Create<WmGoodsOutRecord>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.Partnumber),it=>it.Partnumber.Contains(parm.Partnumber))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.PackageCodeClient),it=>it.PackageCodeClient.Contains(parm.PackageCodeClient))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.LocationCode),it=>it.LocationCode.Contains(parm.LocationCode))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.FkOutOrderId),it=>it.FkOutOrderId.Contains(parm.FkOutOrderId))
|
||||
;
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
|
||||
@@ -104,5 +104,17 @@ namespace ZR.Service.mes.wms
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过外箱标签解析后得到的批次号,获取货物仓库内的货物信息
|
||||
/// </summary>
|
||||
/// <param name="patchCode"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public WmGoodsNowProduction GetInfoByPatchCode(string patchCode)
|
||||
{
|
||||
return Context.Queryable<WmGoodsNowProduction>()
|
||||
.Where(it => it.PackageCodeClient == patchCode).First();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,10 +65,14 @@ namespace ZR.Service.mes.wms
|
||||
foreach (var moItem in moList)
|
||||
{
|
||||
WmMaterial material = Context.Queryable<WmMaterial>().Where(it => it.Id == moItem.FkMaterialId).First();
|
||||
if(material != null)
|
||||
{
|
||||
WmMaterialQuery_stockQuantityDto2 dto2 = material.Adapt<WmMaterialQuery_stockQuantityDto2>();
|
||||
dto2.requireOutNum = moItem.OuthouseNum;
|
||||
Material_stock.Add(dto2);
|
||||
}
|
||||
|
||||
}
|
||||
wmOutOrderItem.MaterialList = Material_stock;
|
||||
}
|
||||
}
|
||||
@@ -347,10 +351,10 @@ namespace ZR.Service.mes.wms
|
||||
|
||||
List<WmGoodsNowProduction> wmGoodsNowsList = Context.Queryable<WmGoodsNowProduction>().Where(it => it.Partnumber == partnumber)
|
||||
.OrderByDescending(it => it.PackageCodeClient).ToList();
|
||||
foreach(var witem in wmGoodsNowsList)
|
||||
foreach (var witem in wmGoodsNowsList)
|
||||
{
|
||||
int accumulation_num = 0;
|
||||
if (require_num>= accumulation_num)
|
||||
if (require_num >= accumulation_num)
|
||||
{
|
||||
WmOutOrderPlan orderPlan = new WmOutOrderPlan();
|
||||
orderPlan.FkOutOrderId = shipment_num;
|
||||
@@ -358,12 +362,12 @@ namespace ZR.Service.mes.wms
|
||||
orderPlan.Patchcode = witem.PackageCodeClient;
|
||||
orderPlan.MaterialCode = witem.Partnumber;
|
||||
orderPlan.WarehouseCode = witem.LocationCode;
|
||||
orderPlan.PackageNum =int.Parse( witem.PackageCodeClient.Split("_")[1] );
|
||||
orderPlan.PackageNum = int.Parse(witem.PackageCodeClient.Split("_")[1]);
|
||||
orderPlan.RequireNum = require_num;
|
||||
orderPlan.Patchtime = Resolution_bath(witem.PackageCodeClient);
|
||||
wmOutOrderPlans.Add(orderPlan);
|
||||
|
||||
accumulation_num = accumulation_num+ witem.GoodsNumLogic??0;
|
||||
accumulation_num = accumulation_num + witem.GoodsNumLogic ?? 0;
|
||||
|
||||
}
|
||||
else
|
||||
@@ -391,6 +395,71 @@ namespace ZR.Service.mes.wms
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据出库单号与货物批次号,向出库记录添加数据,并且成品库表数据删除
|
||||
/// </summary>
|
||||
/// <param name="doMaterialOut"></param>
|
||||
/// <returns></returns>
|
||||
public (int,int) DoMaterialOut(WmDoMaterialOut_Dto doMaterialOut, string Createby)
|
||||
{
|
||||
int sum_delete = 0;
|
||||
int sum_insert = 0;
|
||||
string shipnumber = doMaterialOut.ShipmentNum;
|
||||
if(doMaterialOut.PatchCode!=null&& doMaterialOut.PatchCode.Length > 0)
|
||||
{
|
||||
foreach(var item in doMaterialOut.PatchCode)
|
||||
{
|
||||
UseTran2(() =>
|
||||
{
|
||||
WmGoodsOutRecord record = new WmGoodsOutRecord();
|
||||
record.Id = SnowFlakeSingle.Instance.NextId().ToString();
|
||||
WmGoodsNowProduction nowProduction = Context.Queryable<WmGoodsNowProduction>()
|
||||
.Where(it => it.PackageCodeClient == item).First();
|
||||
|
||||
if (nowProduction != null)
|
||||
{
|
||||
record.FkNowProductionId = nowProduction.Id;
|
||||
record.PackageCodeClient= nowProduction.PackageCodeClient;
|
||||
record.PackageCode = nowProduction.PackageCode;
|
||||
record.PackageCodeOriginal = nowProduction.PackageCodeOriginal;
|
||||
record.LocationCode = nowProduction.LocationCode;
|
||||
record.Partnumber = nowProduction.Partnumber;
|
||||
record.GoodsNumLogic = nowProduction.GoodsNumLogic;
|
||||
record.GoodsNumAction = nowProduction.GoodsNumAction;
|
||||
record.EntryWarehouseTime = nowProduction.EntryWarehouseTime;
|
||||
record.OutTime = DateTime.Now;
|
||||
record.CreatedTime = DateTime.Now;
|
||||
record.CreatedBy = Createby;
|
||||
record.FkOutOrderId = shipnumber;
|
||||
sum_insert= Context.Insertable(record).ExecuteCommand();
|
||||
sum_delete+= Context.Deleteable<WmGoodsNowProduction>()
|
||||
.Where(it => it.PackageCodeClient == item)
|
||||
.ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
return (sum_delete, sum_insert);
|
||||
}
|
||||
|
||||
public bool OverOutorderplan(string shipment_num)
|
||||
{
|
||||
int reult= Context.Updateable<WmOutOrder>().Where(it=>it.ShipmentNum==shipment_num)
|
||||
.SetColumns(it => it.Type == 2)
|
||||
.ExecuteCommand();
|
||||
if(reult>0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 传入批次号 解析出时间 BNW240318007_105
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user