|
@@ -190,17 +190,19 @@ public class BizWorkOrderController extends BaseController {
|
|
|
collectionDetails.setTaskTypeId(detailList.get(0).getTaskTypeId());
|
|
|
collectionDetails.setCollectionId(collectionList.get(0).getId());
|
|
|
List<BizCollectionDetail> collectionDetail = bizCollectionDetailService.getListByBean(collectionDetails);
|
|
|
-
|
|
|
- for (BizCollectionDetail d : collectionDetail) {
|
|
|
- if (d.getTaskTypeId() == detailList.get(0).getTaskTypeId()) {
|
|
|
- if (d.getAmount().compareTo(d.getArriveAmount()) <= 0) {
|
|
|
- v.setClosingMonth("已收款");
|
|
|
- } else if (d.getAmount().compareTo(d.getArriveAmount()) > 0 && d.getArriveAmount().compareTo(new BigDecimal(0)) != 0) {
|
|
|
- v.setClosingMonth("部分收款");
|
|
|
- } else if (d.getArriveAmount() == new BigDecimal(0)) {
|
|
|
- v.setClosingMonth("未收款");
|
|
|
- } else {
|
|
|
- v.setClosingMonth("未收款");
|
|
|
+ if (collectionDetail != null && !collectionDetail.isEmpty() && detailList != null && !detailList.isEmpty()) {
|
|
|
+ for (BizCollectionDetail d : collectionDetail) {
|
|
|
+ if (d.getTaskTypeId() == detailList.get(0).getTaskTypeId()) {
|
|
|
+ d.setAmount( d.getAmount()== null ? new BigDecimal(0) : d.getAmount());
|
|
|
+ if (d.getAmount().compareTo(d.getArriveAmount()) <= 0) {
|
|
|
+ v.setClosingMonth("已收款");
|
|
|
+ } else if (d.getAmount().compareTo(d.getArriveAmount()) > 0 && d.getArriveAmount().compareTo(new BigDecimal(0)) != 0) {
|
|
|
+ v.setClosingMonth("部分收款");
|
|
|
+ } else if (d.getArriveAmount() == new BigDecimal(0)) {
|
|
|
+ v.setClosingMonth("未收款");
|
|
|
+ } else {
|
|
|
+ v.setClosingMonth("未收款");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|