change-生成大条码时物料规格修正

dev
liuwf 3 months ago
parent 734ad9e2fc
commit 50fa076c0a

@ -52,6 +52,7 @@ namespace SlnMesnac.Business
private readonly IMesProductPlanService _mesProductPlanService;
private readonly IMesProductOrderService _mesProductOrderService;
private readonly IMesPrdBarCodeService _barCodeTaskService;
private readonly IBaseMaterialInfoService _baseMaterialInfoService;
private readonly IMesBaseBarcodeInfoService _mesBaseBarcodeInfoService;
public readonly IMesPrdBarCodeService _mesPrdBarCodeService;
private readonly IRealPalletTaskService _realPalletTaskService;
@ -67,6 +68,7 @@ namespace SlnMesnac.Business
_mesBaseBarcodeInfoService = serviceProvider.GetRequiredService<IMesBaseBarcodeInfoService>();
_mesPrdBarCodeService = serviceProvider.GetRequiredService<IMesPrdBarCodeService>();
_mesProductOrderService = serviceProvider.GetRequiredService<IMesProductOrderService>();
_baseMaterialInfoService = serviceProvider.GetRequiredService<IBaseMaterialInfoService>();
Init();
}
@ -220,8 +222,12 @@ namespace SlnMesnac.Business
mesBaseBarcodeInfo.updateTime = DateTime.Now;
mesBaseBarcodeInfo.completeFlag = "1";
mesBaseBarcodeInfo.singleFlag = "0";
var materialInfo = _baseMaterialInfoService.Query(x => x.MaterialId == productPlanDto.MaterialId).FirstOrDefault();
// 改成spec
mesBaseBarcodeInfo.barcodeSpec = productPlanDto.MaterialName;
if(materialInfo != null)
{
mesBaseBarcodeInfo.barcodeSpec = materialInfo.MaterialSpec;
}
sqlSugarClient.AsTenant().GetConnection("mes").Insertable(mesBaseBarcodeInfo).ExecuteCommand();
return bigBarcode;
}

Loading…
Cancel
Save