| | |
| | | productHasSendAmount[productNumber] = productHasSendAmount[productNumber].Add(locationSendAmount) |
| | | } |
| | | outputInfoList = append(outputInfoList, &service.OutputInfo{ |
| | | LocationID: int(locationID), |
| | | WarehouseID: int(LocationIDWarehouseIDMap[locationID]), |
| | | Products: productInfoList, |
| | | OperationID: 0, |
| | | SourceNumber: req.OrderNumber, |
| | | LocationID: int(locationID), |
| | | WarehouseID: int(LocationIDWarehouseIDMap[locationID]), |
| | | Products: productInfoList, |
| | | OperationID: 0, |
| | | SourceNumber: req.OrderNumber, |
| | | SaleDetailsNumber: req.OrderNumber, |
| | | }) |
| | | } |
| | | |
| | |
| | | ) |
| | | |
| | | type OutputInfo struct { |
| | | LocationID int |
| | | WarehouseID int |
| | | Products []*ProductInfo |
| | | OperationID int |
| | | SourceNumber string |
| | | LocationID int |
| | | WarehouseID int |
| | | Products []*ProductInfo |
| | | OperationID int |
| | | SourceNumber string |
| | | SaleDetailsNumber string |
| | | } |
| | | |
| | | type ProductInfo struct { |
| | |
| | | continue |
| | | } |
| | | operation := &models.Operation{ |
| | | Id: 0, |
| | | Number: autoCode, |
| | | SourceNumber: output.SourceNumber, |
| | | OperationTypeId: opTypeMap[output.WarehouseID].Id, |
| | | OperationTypeName: opTypeMap[output.WarehouseID].Name, |
| | | Status: constvar.OperationStatus_Ready, |
| | | OperationDate: time.Now().Format("2006-01-02 15:04:05"), |
| | | ContacterID: 0, |
| | | ContacterName: "", |
| | | CompanyID: 0, |
| | | CompanyName: "", |
| | | Comment: "crm发货申请", |
| | | LogisticCompanyId: "", |
| | | LogisticCompany: models.LogisticCompany{}, |
| | | WaybillNumber: "", |
| | | Weight: decimal.Decimal{}, |
| | | LogisticWeight: decimal.Decimal{}, |
| | | Source: "crm", |
| | | Details: details, |
| | | BaseOperationType: constvar.BaseOperationTypeOutgoing, |
| | | LocationID: output.LocationID, |
| | | OperationSource: constvar.OperationSourceSaleDelivery, |
| | | Id: 0, |
| | | Number: autoCode, |
| | | SourceNumber: output.SourceNumber, |
| | | OperationTypeId: opTypeMap[output.WarehouseID].Id, |
| | | OperationTypeName: opTypeMap[output.WarehouseID].Name, |
| | | Status: constvar.OperationStatus_Ready, |
| | | OperationDate: time.Now().Format("2006-01-02 15:04:05"), |
| | | ContacterID: 0, |
| | | ContacterName: "", |
| | | CompanyID: 0, |
| | | CompanyName: "", |
| | | Comment: "crm发货申请", |
| | | LogisticCompanyId: "", |
| | | LogisticCompany: models.LogisticCompany{}, |
| | | WaybillNumber: "", |
| | | Weight: decimal.Decimal{}, |
| | | LogisticWeight: decimal.Decimal{}, |
| | | Source: "crm", |
| | | Details: details, |
| | | BaseOperationType: constvar.BaseOperationTypeOutgoing, |
| | | LocationID: output.LocationID, |
| | | OperationSource: constvar.OperationSourceSaleDelivery, |
| | | SalesDetailsNumber: output.SaleDetailsNumber, |
| | | } |
| | | operations = append(operations, operation) |
| | | autoCode = models.GetAutoCode(maxAutoIncr, codeStandard) |