拼箱拆箱功能调整,毛坯仓库调整,出库功能调整

This commit is contained in:
2024-05-14 14:55:08 +08:00
parent b73b7a1f0a
commit c6adc9e930
6 changed files with 40 additions and 7 deletions

View File

@@ -218,6 +218,7 @@ namespace ZR.Service.Business
{
Id = SnowFlakeSingle.instance.NextId().ToString(),
Partnumber = list[1].PartNumner,
WorkOrderId = list[1].PatchCode.Substring(4, 12),
PackageCode = list[1].PatchCode,
SerialNumber = list[1].PatchCode.Split('_')[1],
LocationCode = "LS",
@@ -399,6 +400,7 @@ namespace ZR.Service.Business
{
Id = SnowFlakeSingle.instance.NextId().ToString(),
Partnumber = mainNowProduction.Partnumber,
WorkOrderId = jsonObject.newPatchCode1.Substring(4, 12),
PackageCode = jsonObject.newPatchCode1,
SerialNumber = jsonObject.serialNumber1,
LocationCode = mainNowProduction.LocationCode,
@@ -415,6 +417,7 @@ namespace ZR.Service.Business
{
Id = SnowFlakeSingle.instance.NextId().ToString(),
Partnumber = mainNowProduction.Partnumber,
WorkOrderId = jsonObject.newPatchCode2.Substring(4, 12),
PackageCode = jsonObject.newPatchCode2,
SerialNumber = jsonObject.serialNumber2,
LocationCode = "LS",

View File

@@ -68,7 +68,14 @@ namespace ZR.Service.mes.wms
/// <returns></returns>
public WmGoodsOutRecord AddWmGoodsOutProduction(WmGoodsOutRecord model)
{
if(string.IsNullOrEmpty(model.PackageCode))
// 检查成品库数据是否存在
bool hasRecord = Context.Queryable<WmGoodsNowProduction>()
.Where(it => it.Id == model.FkNowProductionId).Any();
if (!hasRecord)
{
throw new Exception("请检查该箱是否已完全出库,或已添加出库记录!");
}
if (string.IsNullOrEmpty(model.PackageCode))
{
model.PackageCode = "L" + DateTime.Now.ToString("yyMMddHHmmss");
}
@@ -76,6 +83,7 @@ namespace ZR.Service.mes.wms
{
model.Id= SnowFlakeSingle.Instance.NextId().ToString();//也可以在程序中直接获取ID
}
//2. 根据成品仓库id修改记录
WmGoodsNowProduction updateModel = new WmGoodsNowProduction();
updateModel.Id = model.FkNowProductionId;