作者 陈志颖

fix:修复分红预算信息列表无退货单问题

... ... @@ -1288,8 +1288,8 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncenti
} else {
var dividendsIncentivesEstimateDtos []*dto.DividendsIncentivesEstimateDto
for _, orderGood := range orderGoods {
dividendsIncentivesEstimateDto := &dto.DividendsIncentivesEstimateDto{}
if orderGood.DividendsOrderNumber != "" { // 查询分红订单
dividendsIncentivesEstimateDto := &dto.DividendsIncentivesEstimateDto{}
dividendsOrder, err := dividendsOrderRepository.FindOne(map[string]interface{}{
"dividendsOrderNumber": orderGood.DividendsOrderNumber,
"companyId": searchDividendsIncentivesEstimateQuery.CompanyId,
... ... @@ -1308,6 +1308,7 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsIncenti
}
dividendsIncentivesEstimateDtos = append(dividendsIncentivesEstimateDtos, dividendsIncentivesEstimateDto)
} else if orderGood.DividendsReturnedOrderNumber != "" { // 查询分红退货单
dividendsIncentivesEstimateDto := &dto.DividendsIncentivesEstimateDto{}
dividendsReturnedOrder, err := dividendsReturnedOrderRepository.FindOne(map[string]interface{}{
"dividendsReturnedOrderNumber": orderGood.DividendsReturnedOrderNumber,
"companyId": searchDividendsIncentivesEstimateQuery.CompanyId,
... ...
... ... @@ -7,19 +7,20 @@ import (
func TransformToOrderGoodDomainModelFromPgModels(orderGoodModel *models.OrderGood) (*domain.OrderGood, error) {
return &domain.OrderGood{
OrderGoodId: orderGoodModel.OrderGoodId,
OrderGoodAmount: orderGoodModel.OrderGoodAmount,
OrderGoodName: orderGoodModel.OrderGoodName,
OrderGoodPrice: orderGoodModel.OrderGoodPrice,
OrderGoodQuantity: orderGoodModel.OrderGoodQuantity,
DividendsOrderNumber: orderGoodModel.DividendsOrderNumber,
CooperationContractNumber: orderGoodModel.CooperationContractNumber,
OrderGoodExpense: orderGoodModel.OrderGoodExpense,
OrderGoodDividendsStatus: orderGoodModel.OrderGoodDividendsStatus,
OrgId: orderGoodModel.OrgId,
CompanyId: orderGoodModel.CompanyId,
CreatedAt: orderGoodModel.CreatedAt,
DeletedAt: orderGoodModel.DeletedAt,
UpdatedAt: orderGoodModel.UpdatedAt,
OrderGoodId: orderGoodModel.OrderGoodId,
OrderGoodAmount: orderGoodModel.OrderGoodAmount,
OrderGoodName: orderGoodModel.OrderGoodName,
OrderGoodPrice: orderGoodModel.OrderGoodPrice,
OrderGoodQuantity: orderGoodModel.OrderGoodQuantity,
DividendsOrderNumber: orderGoodModel.DividendsOrderNumber,
DividendsReturnedOrderNumber: orderGoodModel.DividendsReturnedOrderNumber,
CooperationContractNumber: orderGoodModel.CooperationContractNumber,
OrderGoodExpense: orderGoodModel.OrderGoodExpense,
OrderGoodDividendsStatus: orderGoodModel.OrderGoodDividendsStatus,
OrgId: orderGoodModel.OrgId,
CompanyId: orderGoodModel.CompanyId,
CreatedAt: orderGoodModel.CreatedAt,
DeletedAt: orderGoodModel.DeletedAt,
UpdatedAt: orderGoodModel.UpdatedAt,
}, nil
}
... ...