|
@@ -313,19 +313,23 @@ public class PurchaseClosingReportServiceImpl extends ServiceImpl<PurchaseClosin
|
|
|
.eq("delete_flag", "0")
|
|
|
.orderBy("update_date", false));
|
|
|
for(ContractManagementInfo contractManagementInfo: contractManagementInfoList){
|
|
|
+ Float money=0.0f;
|
|
|
+ Float collectMoney=0.0f;
|
|
|
//查采购平仓报表
|
|
|
List<PurchaseClosingReport> purchaseClosingReportList = this.selectList(new EntityWrapper<PurchaseClosingReport>()
|
|
|
.eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
.eq("delete_flag", "0"));
|
|
|
if (!CollectionUtils.isEmpty(purchaseClosingReportList)){
|
|
|
for (PurchaseClosingReport purchaseClosingReport:purchaseClosingReportList){
|
|
|
- //有未付金额
|
|
|
- if (purchaseClosingReport.getAmountNotPayable() > 0) {
|
|
|
- contractManagementInfo.setReportStatus("待结算");
|
|
|
- }
|
|
|
- else {
|
|
|
- contractManagementInfo.setReportStatus("已结算");
|
|
|
- }
|
|
|
+ money=money+purchaseClosingReport.getAmountNotPayable();
|
|
|
+ collectMoney=collectMoney+purchaseClosingReport.getCollectionNotPayable();
|
|
|
+ }
|
|
|
+ //有未付/未收金额
|
|
|
+ if (money > 0||collectMoney>0) {
|
|
|
+ contractManagementInfo.setReportStatus("待结算");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ contractManagementInfo.setReportStatus("已结算");
|
|
|
}
|
|
|
}
|
|
|
}
|