|
|
@@ -312,7 +312,9 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.values()); // 转换回 List
|
|
|
|
|
|
// 如果申领教材列表为空,应该使用基础数据维护的
|
|
|
+ boolean isCourseFlag = false;
|
|
|
if(CollectionUtils.isEmpty(mergedDistinctList)){
|
|
|
+ isCourseFlag = true;
|
|
|
mergedDistinctList = courselList;
|
|
|
}
|
|
|
|
|
|
@@ -352,18 +354,18 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
|
|
|
categoryTotalPrice = BigDecimal.ZERO;
|
|
|
for (HeadTeaLookClassBookCategoryDetailVo vo : value) {
|
|
|
- textbookStudentClaim = byTextbookId.get(vo.getTextbookId());
|
|
|
- if (ObjectUtils.isNotEmpty(textbookStudentClaim)) {
|
|
|
- vo.setTextbookStudentClaimId(textbookStudentClaim.getId());
|
|
|
- vo.setIsClaim(textbookStudentClaim.getIsClaim());
|
|
|
- vo.setPrice(textbookStudentClaim.getPrice());
|
|
|
- } else {
|
|
|
- vo.setIsClaim(0);
|
|
|
- vo.setPrice(BigDecimal.ZERO);
|
|
|
- }
|
|
|
- if (ObjectUtils.isEmpty(vo.getPrice())) {
|
|
|
- vo.setPrice(BigDecimal.ZERO);
|
|
|
+ if(!isCourseFlag){
|
|
|
+ textbookStudentClaim = byTextbookId.get(vo.getTextbookId());
|
|
|
+ if (ObjectUtils.isNotEmpty(textbookStudentClaim)) {
|
|
|
+ vo.setTextbookStudentClaimId(textbookStudentClaim.getId());
|
|
|
+ vo.setIsClaim(textbookStudentClaim.getIsClaim());
|
|
|
+ vo.setPrice(textbookStudentClaim.getPrice());
|
|
|
+ } else {
|
|
|
+ vo.setIsClaim(0);
|
|
|
+ vo.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
categoryTotalPrice = categoryTotalPrice.add(vo.getPrice().multiply(BigDecimal.valueOf(vo.getClaimNum())));
|
|
|
totalPrice = totalPrice.add(vo.getPrice().multiply(BigDecimal.valueOf(vo.getClaimNum())));
|
|
|
}
|