是否垫资 重新判断
parent
2cbe6902ed
commit
418ba023f3
|
@ -189,8 +189,8 @@ public class ProcessController {
|
|||
model.addAttribute("cooperationType", Enumerable.of(CooperationType.class, project.getCooperateType()).getDescription());
|
||||
List<ProcessAttachment> attachments = JSONArray.parseArray(process.getAttachmentUri(), ProcessAttachment.class);
|
||||
model.addAttribute("attachments", attachments);
|
||||
model.addAttribute("isPrepaid", isPrepaid(project));
|
||||
BigDecimal repaidAmount = getRepaidAmount(process.getProjectId());
|
||||
model.addAttribute("isPrepaid", isPrepaid(repaidAmount));
|
||||
model.addAttribute("repaidAmount", repaidAmount);
|
||||
|
||||
if (isAdministrator(getLoginUser())) {
|
||||
|
@ -324,7 +324,7 @@ public class ProcessController {
|
|||
BudgetBean budgetBean = projectBudgetService.getBudget(project);
|
||||
|
||||
return ProjectReturnValue.builder()
|
||||
.isPrepaid(isPrepaid(project))
|
||||
.isPrepaid(isPrepaid(repaidAmount))
|
||||
.projectId(project.getId())
|
||||
.incomeDetails(incomeDetails)
|
||||
.procurementDetails(procurementDetails)
|
||||
|
@ -340,8 +340,8 @@ public class ProcessController {
|
|||
.build();
|
||||
}
|
||||
|
||||
private String isPrepaid(Project project) {
|
||||
return processService.isProjectPrepaid(project) ? "是" : "否";
|
||||
private String isPrepaid(BigDecimal repaidAmount) {
|
||||
return processService.isProjectPrepaid(repaidAmount) ? "是" : "否";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -378,7 +378,7 @@ public class ProcessController {
|
|||
procurementDetails = processService.getProcurementDetails(project.getId(), id);
|
||||
}
|
||||
|
||||
detail.setIsPrepaid(isPrepaid(project));
|
||||
detail.setIsPrepaid(isPrepaid(repaidAmount));
|
||||
detail.setContract(contract);
|
||||
detail.setIncomeDetails(incomeDetails);
|
||||
detail.setSupplierMaterials(supplierMaterials);
|
||||
|
|
|
@ -456,7 +456,14 @@ public class ProjectProcessService {
|
|||
* 是否垫资
|
||||
*/
|
||||
public boolean isProjectPrepaid(Project project) {
|
||||
return project.getUnderwrittenMode() == 2 || project.getUnderwrittenMode() == 3;
|
||||
return BigDecimal.ZERO.equals(getProjectRepaidAmount(project.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否垫资
|
||||
*/
|
||||
public boolean isProjectPrepaid(BigDecimal repaidAmount) {
|
||||
return BigDecimal.ZERO.equals(repaidAmount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue