|
|
|
@ -306,23 +306,23 @@ namespace Admin.Core.Api.Controllers.Business
|
|
|
|
|
int weightResult = 0;
|
|
|
|
|
|
|
|
|
|
MessageModel<List<LR_weigh>> messageModel = new MessageModel<List<LR_weigh>>();
|
|
|
|
|
string materialName = _hw_BarrelService.GetMaterialNameByBarrelID(barrelBarcode.Trim());
|
|
|
|
|
if (string.IsNullOrEmpty(materialName))
|
|
|
|
|
string planID = _hw_BarrelService.GetPlanIDByBarrelID(barrelBarcode.Trim());
|
|
|
|
|
if (string.IsNullOrEmpty(planID))
|
|
|
|
|
{
|
|
|
|
|
weightResult = 1;
|
|
|
|
|
//return Failed<List<LR_weigh_BatchCode>>("查询不到罐号对应的物料ID!");
|
|
|
|
|
//return Failed<List<LR_weigh_BatchCode>>("查询不到罐号对应的PlanID!");
|
|
|
|
|
}
|
|
|
|
|
if (materialName == "-1")
|
|
|
|
|
if (planID == "-1")
|
|
|
|
|
{
|
|
|
|
|
weightResult = 2;
|
|
|
|
|
//return Failed<List<LR_weigh_BatchCode>>("查询不到罐号!");
|
|
|
|
|
}
|
|
|
|
|
List<LR_weigh> wlist = _lr_weighService.GetRecentWeightList(materialName);
|
|
|
|
|
List<LR_weigh_BatchCode> list = new List<LR_weigh_BatchCode>();
|
|
|
|
|
List<LR_weigh> wlist = _lr_weighService.GetRecentWeightList(planID);
|
|
|
|
|
if (wlist.Count == 0 || wlist == null)
|
|
|
|
|
{
|
|
|
|
|
weightResult = 3;
|
|
|
|
|
}
|
|
|
|
|
List<LR_weigh_BatchCode> list = new List<LR_weigh_BatchCode>();
|
|
|
|
|
foreach (LR_weigh weigh in wlist)
|
|
|
|
|
{
|
|
|
|
|
LR_weigh_BatchCode record = new LR_weigh_BatchCode();
|
|
|
|
@ -363,7 +363,7 @@ namespace Admin.Core.Api.Controllers.Business
|
|
|
|
|
if (weightResult == 0)
|
|
|
|
|
WeightString = "称量信息查询成功";
|
|
|
|
|
if (weightResult == 1)
|
|
|
|
|
WeightString = "查询不到罐号对应的物料ID!";
|
|
|
|
|
WeightString = "查询不到罐号对应的PlanID!";
|
|
|
|
|
if (weightResult == 2)
|
|
|
|
|
WeightString = "查询不到罐号!";
|
|
|
|
|
if (weightResult == 3)
|
|
|
|
|