作者 tangxuhui

修正 更新退货单是 货品id值的传值

... ... @@ -28,8 +28,8 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
OrderGoodPrice: v.OrderGoodPrice,
OrderGoodQuantity: v.OrderGoodQuantity,
}
orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
good.OrderGoodAmount = orderGoodAmount
// orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
// good.OrderGoodAmount = orderGoodAmount
orderGoods = append(orderGoods, good)
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsOrderCommand.Operator)
... ... @@ -114,8 +114,8 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
OrderGoodPrice: v.OrderGoodPrice,
OrderGoodQuantity: v.OrderGoodQuantity,
}
orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
good.OrderGoodAmount = orderGoodAmount
// orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
// good.OrderGoodAmount = orderGoodAmount
orderGoods = append(orderGoods, good)
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsOrderCommand.Operator)
... ...
... ... @@ -12,7 +12,7 @@ type UpdateDividendsReturnedOrderCommand struct {
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"` //源单号
OrderGoods []struct {
OrderGoodId int64 `json:"orderGoodId,string"` // 订单产品id
OrderGoodId int `json:"orderGoodId,string"` // 订单产品id
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
// OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
OrderGoodName string `json:"orderGoodName"` //订单产品名称
... ...
... ... @@ -21,13 +21,14 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
OrderGoodId: "0",
CooperationContractNumber: v.CooperationContractNumber,
OrderGoodAmount: 0,
OrderGoodName: v.OrderGoodName,
OrderGoodPrice: v.OrderGoodPrice,
OrderGoodQuantity: v.OrderGoodQuantity,
}
good.OrderGoodAmount = good.OrderGoodPrice * float64(good.OrderGoodQuantity)
// good.OrderGoodAmount = good.OrderGoodPrice * float64(good.OrderGoodQuantity)
orderGooods = append(orderGooods, good)
}
result, err := creationCooperationGateway.DividendsReturnedOrderAdd(allied_creation_cooperation.ReqDividendsReturnedOrderAdd{
... ... @@ -97,13 +98,14 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
OrderGoodId: strconv.Itoa(v.OrderGoodId),
CooperationContractNumber: v.CooperationContractNumber,
OrderGoodAmount: 0,
OrderGoodName: v.OrderGoodName,
OrderGoodPrice: v.OrderGoodPrice,
OrderGoodQuantity: v.OrderGoodQuantity,
}
good.OrderGoodAmount = good.OrderGoodPrice * float64(good.OrderGoodQuantity)
// good.OrderGoodAmount = good.OrderGoodPrice * float64(good.OrderGoodQuantity)
orderGooods = append(orderGooods, good)
}
_, err := creationCooperationGateway.DividendsReturnedOrderUpdate(allied_creation_cooperation.ReqDividendsReturnedOrderUpdate{
... ...
... ... @@ -50,6 +50,7 @@ type (
//
ReqDividendsReturnedOrderGood struct {
OrderGoodId string `json:"orderGoodId"`
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
OrderGoodName string `json:"orderGoodName"` //订单产品名称
... ...