Ancor nuget vari + fix warnings compilazione (INIZIO!!!)
This commit is contained in:
@@ -79,35 +79,38 @@ namespace WebDoorCreator.API.Controllers
|
||||
// recuper elenco porte...
|
||||
List<DoorCostingDTO> dcDTO = new List<DoorCostingDTO>();
|
||||
var doorsList = await WDCService.DoorGetByOrderId(OrderId);
|
||||
foreach (var door in doorsList)
|
||||
if (doorsList != null)
|
||||
{
|
||||
// recupero i dato DoorOp
|
||||
var doorOpList = await WDCService.DoorOpGetByDoorId(door.DoorId);
|
||||
Dictionary<string, List<string>> currBOMList = new Dictionary<string, List<string>>();
|
||||
// ciclo su tutte le DoorOp
|
||||
foreach (var doorOp in doorOpList)
|
||||
foreach (var door in doorsList)
|
||||
{
|
||||
// cerco se ci sia già o meno nella BOM l'item corrente
|
||||
if (currBOMList.ContainsKey(doorOp.ObjectId))
|
||||
// recupero i dato DoorOp
|
||||
var doorOpList = await WDCService.DoorOpGetByDoorId(door.DoorId);
|
||||
Dictionary<string, List<string>> currBOMList = new Dictionary<string, List<string>>();
|
||||
// ciclo su tutte le DoorOp
|
||||
foreach (var doorOp in doorOpList)
|
||||
{
|
||||
currBOMList[doorOp.ObjectId].Add(doorOp.JsoncActVal);
|
||||
// cerco se ci sia già o meno nella BOM l'item corrente
|
||||
if (currBOMList.ContainsKey(doorOp.ObjectId))
|
||||
{
|
||||
currBOMList[doorOp.ObjectId].Add(doorOp.JsoncActVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> currOp = new List<string>();
|
||||
currOp.Add(doorOp.JsoncActVal);
|
||||
currBOMList.Add(doorOp.ObjectId, currOp);
|
||||
}
|
||||
}
|
||||
else
|
||||
// creo oggetto DTO finale della porta
|
||||
var doorDto = new DoorCostingDTO()
|
||||
{
|
||||
List<string> currOp = new List<string>();
|
||||
currOp.Add(doorOp.JsoncActVal);
|
||||
currBOMList.Add(doorOp.ObjectId, currOp);
|
||||
}
|
||||
DoorId = door.DoorId,
|
||||
Quantity = door.Quantity,
|
||||
EstimatedWorkTime = 0,
|
||||
BOMList = currBOMList
|
||||
};
|
||||
dcDTO.Add(doorDto);
|
||||
}
|
||||
// creo oggetto DTO finale della porta
|
||||
var doorDto = new DoorCostingDTO()
|
||||
{
|
||||
DoorId = door.DoorId,
|
||||
Quantity = door.Quantity,
|
||||
EstimatedWorkTime = 0,
|
||||
BOMList = currBOMList
|
||||
};
|
||||
dcDTO.Add(doorDto);
|
||||
}
|
||||
//answ. = rawOrder.OrderDescript;
|
||||
answ.DoorsList = dcDTO;
|
||||
|
||||
Reference in New Issue
Block a user