垫资金额
parent
1227a12ad1
commit
4795b8ec5c
|
@ -151,6 +151,8 @@ public class ProcessController {
|
||||||
List<ProcessAttachment> attachments = JSONArray.parseArray(process.getAttachmentUri(), ProcessAttachment.class);
|
List<ProcessAttachment> attachments = JSONArray.parseArray(process.getAttachmentUri(), ProcessAttachment.class);
|
||||||
model.addAttribute("attachments", attachments);
|
model.addAttribute("attachments", attachments);
|
||||||
model.addAttribute("isPrepaid", isPrepaid(project));
|
model.addAttribute("isPrepaid", isPrepaid(project));
|
||||||
|
BigDecimal repaidAmount = getRepaidAmount(id);
|
||||||
|
model.addAttribute("repaidAmount", repaidAmount);
|
||||||
|
|
||||||
if (process.getProcessType() != null) {
|
if (process.getProcessType() != null) {
|
||||||
switch (process.getProcessType()) {
|
switch (process.getProcessType()) {
|
||||||
|
@ -178,6 +180,12 @@ public class ProcessController {
|
||||||
return "/admin/business/process-detail";
|
return "/admin/business/process-detail";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private BigDecimal getRepaidAmount(int id) {
|
||||||
|
Map<String, Object> map = jdbcTemplate.queryForMap(
|
||||||
|
"select ifnull(sum(underwritten_plan), 0) repaidAmount from project_budget_plan_detail where project_id = ?", id);
|
||||||
|
return (BigDecimal) map.values().iterator().next();
|
||||||
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/projects")
|
@GetMapping("/projects")
|
||||||
public List<Map<String, Object>> query(@RequestParam String q) {
|
public List<Map<String, Object>> query(@RequestParam String q) {
|
||||||
|
@ -220,7 +228,7 @@ public class ProcessController {
|
||||||
public String isPrepaid;
|
public String isPrepaid;
|
||||||
|
|
||||||
// 垫资金额
|
// 垫资金额
|
||||||
public final String repaidAmount = "50000元";
|
public String repaidAmount;
|
||||||
|
|
||||||
// 预算毛利率
|
// 预算毛利率
|
||||||
public BigDecimal budgetGrossMargin;
|
public BigDecimal budgetGrossMargin;
|
||||||
|
@ -232,6 +240,9 @@ public class ProcessController {
|
||||||
Project project = projectRepository.findById(id);
|
Project project = projectRepository.findById(id);
|
||||||
Admin admin = InterfaceUtil.getAdmin();
|
Admin admin = InterfaceUtil.getAdmin();
|
||||||
|
|
||||||
|
// project_budget_plan_detail 垫资金额计算
|
||||||
|
|
||||||
|
BigDecimal repaidAmount = getRepaidAmount(id);
|
||||||
// 可以在对应表数据查询 是否存在再启用
|
// 可以在对应表数据查询 是否存在再启用
|
||||||
List<ProjectBudgetIncomeDetail> incomeDetails = projectBudgetService.getBudgetIncomeDetail(project);
|
List<ProjectBudgetIncomeDetail> incomeDetails = projectBudgetService.getBudgetIncomeDetail(project);
|
||||||
return ProjectReturnValue.builder()
|
return ProjectReturnValue.builder()
|
||||||
|
@ -239,6 +250,7 @@ public class ProcessController {
|
||||||
.projectId(project.getId())
|
.projectId(project.getId())
|
||||||
.incomeDetails(incomeDetails)
|
.incomeDetails(incomeDetails)
|
||||||
.projectName(project.getName())
|
.projectName(project.getName())
|
||||||
|
.repaidAmount(repaidAmount + "元")
|
||||||
.budgetGrossMargin(project.getGrossProfitMargin())
|
.budgetGrossMargin(project.getGrossProfitMargin())
|
||||||
.projectNo(project.getProjectNo())
|
.projectNo(project.getProjectNo())
|
||||||
.applyPersonName(admin.getRealName())
|
.applyPersonName(admin.getRealName())
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="垫资金额">
|
<el-form-item label="垫资金额">
|
||||||
<span>${project.repaidAmount}</span>
|
<span>${repaidAmount}元</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="预算毛利率">
|
<el-form-item label="预算毛利率">
|
||||||
|
|
Loading…
Reference in New Issue