Commit d5a9fd82 by 阮思源

1002881 平台端资源管理-书刊管理收益优化

parent 1b4233b7
...@@ -649,6 +649,9 @@ public class BookDto extends BaseDto { ...@@ -649,6 +649,9 @@ public class BookDto extends BaseDto {
@ApiModelProperty("目的标签名称") @ApiModelProperty("目的标签名称")
private String purLabelName; private String purLabelName;
@ApiModelProperty("书刊所有收益")
private BigDecimal allBookIncome;
public Integer getIsOpenRobotProcess() { public Integer getIsOpenRobotProcess() {
return isOpenRobotProcess; return isOpenRobotProcess;
} }
...@@ -1770,6 +1773,14 @@ public class BookDto extends BaseDto { ...@@ -1770,6 +1773,14 @@ public class BookDto extends BaseDto {
this.purLabelName = purLabelName; this.purLabelName = purLabelName;
} }
public BigDecimal getAllBookIncome() {
return allBookIncome;
}
public void setAllBookIncome(BigDecimal allBookIncome) {
this.allBookIncome = allBookIncome;
}
@Override @Override
public String toString() { public String toString() {
return "BookDto{" + return "BookDto{" +
...@@ -1903,6 +1914,9 @@ public class BookDto extends BaseDto { ...@@ -1903,6 +1914,9 @@ public class BookDto extends BaseDto {
", proLabelName='" + proLabelName + '\'' + ", proLabelName='" + proLabelName + '\'' +
", depLabelName='" + depLabelName + '\'' + ", depLabelName='" + depLabelName + '\'' +
", purLabelName='" + purLabelName + '\'' + ", purLabelName='" + purLabelName + '\'' +
'}'; ", allBookIncome=" + allBookIncome +
", isOpenRobotProcess=" + isOpenRobotProcess +
", classifyId=" + classifyId +
"} " + super.toString();
} }
} }
...@@ -79,6 +79,7 @@ import com.pcloud.resourcecenter.product.dto.SpecificationDto; ...@@ -79,6 +79,7 @@ import com.pcloud.resourcecenter.product.dto.SpecificationDto;
import com.pcloud.settlementcenter.pay.constants.PayConstant; import com.pcloud.settlementcenter.pay.constants.PayConstant;
import com.pcloud.settlementcenter.record.dto.AgentBookIncomeDTO; import com.pcloud.settlementcenter.record.dto.AgentBookIncomeDTO;
import com.pcloud.settlementcenter.record.dto.AgentBookIncomeParamDTO; import com.pcloud.settlementcenter.record.dto.AgentBookIncomeParamDTO;
import com.pcloud.settlementcenter.record.dto.AllBookIncomeParamDTO;
import com.pcloud.settlementcenter.record.dto.BookIncomeDto; import com.pcloud.settlementcenter.record.dto.BookIncomeDto;
import com.pcloud.usercenter.common.dto.BookCaseParamDto; import com.pcloud.usercenter.common.dto.BookCaseParamDto;
import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto; import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto;
...@@ -1457,6 +1458,11 @@ public class BookSet { ...@@ -1457,6 +1458,11 @@ public class BookSet {
return; return;
} }
Map<String, BigDecimal> incomeMap = bookConsr.getBookIncome(bookIdList, channelIdList, adviserIdList); Map<String, BigDecimal> incomeMap = bookConsr.getBookIncome(bookIdList, channelIdList, adviserIdList);
AllBookIncomeParamDTO paramDTO=new AllBookIncomeParamDTO();
paramDTO.setBookIds(bookIdList);
paramDTO.setAdviserIds(adviserIdList);
paramDTO.setChannelIds(channelIdList);
Map<String, BigDecimal> getAllBookIncome = settlementConsr.getAllBookIncome(paramDTO);
// 设置图书收益,如果没有查到,则默认图书总收益为0 // 设置图书收益,如果没有查到,则默认图书总收益为0
if (incomeMap != null && !incomeMap.isEmpty()) { if (incomeMap != null && !incomeMap.isEmpty()) {
for (Object obj : recordList) { for (Object obj : recordList) {
...@@ -1470,6 +1476,8 @@ public class BookSet { ...@@ -1470,6 +1476,8 @@ public class BookSet {
bookDto.setIncome(new BigDecimal(0)); bookDto.setIncome(new BigDecimal(0));
} }
bookDto.setIncome(income); bookDto.setIncome(income);
BigDecimal allBookIncome = getAllBookIncome.get(key);
bookDto.setAllBookIncome(allBookIncome != null ? allBookIncome : BigDecimal.ZERO);
} }
} }
} }
......
...@@ -8,6 +8,7 @@ import com.pcloud.common.utils.ListUtils; ...@@ -8,6 +8,7 @@ import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil; import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.settlementcenter.record.dto.AgentBookIncomeDTO; import com.pcloud.settlementcenter.record.dto.AgentBookIncomeDTO;
import com.pcloud.settlementcenter.record.dto.AgentBookIncomeParamDTO; import com.pcloud.settlementcenter.record.dto.AgentBookIncomeParamDTO;
import com.pcloud.settlementcenter.record.dto.AllBookIncomeParamDTO;
import com.pcloud.settlementcenter.record.dto.ProductStaticUnderAppMapDTO; import com.pcloud.settlementcenter.record.dto.ProductStaticUnderAppMapDTO;
import com.pcloud.settlementcenter.record.dto.ResourcesStatisticVO; import com.pcloud.settlementcenter.record.dto.ResourcesStatisticVO;
import com.pcloud.settlementcenter.record.service.BookService; import com.pcloud.settlementcenter.record.service.BookService;
...@@ -110,4 +111,20 @@ public class SettlementConsr { ...@@ -110,4 +111,20 @@ public class SettlementConsr {
} }
return agentBookIncomeDTO; return agentBookIncomeDTO;
} }
@ParamLog("获取书刊收益")
public Map<String, BigDecimal> getAllBookIncome(AllBookIncomeParamDTO paramDTO) throws BizException {
Map<String, BigDecimal> map = new HashMap<>();
if (paramDTO == null || ListUtils.isEmpty(paramDTO.getBookIds())
|| ListUtils.isEmpty(paramDTO.getAdviserIds())
|| ListUtils.isEmpty(paramDTO.getChannelIds())) {
return map;
}
try {
map = ResponseHandleUtil.parseMapResponse(settlementService.getAllBookIncome(paramDTO), String.class, BigDecimal.class);
} catch (Exception e) {
LOGGER.error("获取书刊收益.[getAllBookIncome]:" + e.getMessage(), e);
}
return map;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment