项目查看审核页面实现
parent
0aeb024e40
commit
13e47b6317
|
@ -1,9 +1,6 @@
|
||||||
package cn.palmte.work.controller.backend;
|
package cn.palmte.work.controller.backend;
|
||||||
|
|
||||||
import cn.palmte.work.bean.ApproveStatusEnum;
|
import cn.palmte.work.bean.*;
|
||||||
import cn.palmte.work.bean.BudgetBean;
|
|
||||||
import cn.palmte.work.bean.EstimateBean;
|
|
||||||
import cn.palmte.work.bean.ResponseMsg;
|
|
||||||
import cn.palmte.work.model.*;
|
import cn.palmte.work.model.*;
|
||||||
import cn.palmte.work.service.ProjectBudgetService;
|
import cn.palmte.work.service.ProjectBudgetService;
|
||||||
import cn.palmte.work.service.ProjectEstimateService;
|
import cn.palmte.work.service.ProjectEstimateService;
|
||||||
|
@ -35,6 +32,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目管理功能
|
* 项目管理功能
|
||||||
|
*
|
||||||
* @author xiongshiyan at 2021/10/29 , contact me with email yanshixiong@126.com or phone 15208384257
|
* @author xiongshiyan at 2021/10/29 , contact me with email yanshixiong@126.com or phone 15208384257
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
|
@ -125,6 +123,7 @@ public class ProjectController extends BaseController{
|
||||||
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
||||||
return "admin/project_estimate_edit";
|
return "admin/project_estimate_edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/estimateEditSave")
|
@RequestMapping("/estimateEditSave")
|
||||||
public String estimateEditSave(Project project, EstimateBean estimateBean, Map<String, Object> model) {
|
public String estimateEditSave(Project project, EstimateBean estimateBean, Map<String, Object> model) {
|
||||||
projectService.estimateEditSave(project, estimateBean, InterfaceUtil.getAdmin(), ApproveStatusEnum.APPROVAL_UNCOMMIT);
|
projectService.estimateEditSave(project, estimateBean, InterfaceUtil.getAdmin(), ApproveStatusEnum.APPROVAL_UNCOMMIT);
|
||||||
|
@ -175,6 +174,7 @@ public class ProjectController extends BaseController{
|
||||||
projectService.budgetEditSave(project, budgetBean, InterfaceUtil.getAdmin(), ApproveStatusEnum.APPROVAL_UNCOMMIT);
|
projectService.budgetEditSave(project, budgetBean, InterfaceUtil.getAdmin(), ApproveStatusEnum.APPROVAL_UNCOMMIT);
|
||||||
return "redirect:/project/list";
|
return "redirect:/project/list";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进行项目预算保存并提交审核
|
* 进行项目预算保存并提交审核
|
||||||
*/
|
*/
|
||||||
|
@ -204,6 +204,7 @@ public class ProjectController extends BaseController{
|
||||||
|
|
||||||
return ResponseMsg.buildSuccessMsg("成功");
|
return ResponseMsg.buildSuccessMsg("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存成本明细
|
* 保存成本明细
|
||||||
*/
|
*/
|
||||||
|
@ -224,6 +225,7 @@ public class ProjectController extends BaseController{
|
||||||
|
|
||||||
return ResponseMsg.buildSuccessMsg("成功");
|
return ResponseMsg.buildSuccessMsg("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存项目管理成本明细
|
* 保存项目管理成本明细
|
||||||
*/
|
*/
|
||||||
|
@ -244,6 +246,7 @@ public class ProjectController extends BaseController{
|
||||||
|
|
||||||
return ResponseMsg.buildSuccessMsg("成功");
|
return ResponseMsg.buildSuccessMsg("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存项资金计划明细
|
* 保存项资金计划明细
|
||||||
*/
|
*/
|
||||||
|
@ -266,8 +269,6 @@ public class ProjectController extends BaseController{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 待我审核项目列表
|
* 待我审核项目列表
|
||||||
*/
|
*/
|
||||||
|
@ -298,14 +299,78 @@ public class ProjectController extends BaseController{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目查看页面
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/detail")
|
||||||
|
public String detail(@RequestParam("id") int id, Map<String, Object> model) {
|
||||||
|
Project project = projectService.getProject(id);
|
||||||
|
EstimateBean estimateBean = projectEstimateService.getEstimate(project);
|
||||||
|
model.put("estimateBean", estimateBean);
|
||||||
|
model.put("project", project);
|
||||||
|
BudgetBean budgetBean = projectBudgetService.getBudget(project);
|
||||||
|
//预算主页面数据
|
||||||
|
model.put("budgetBean", budgetBean);
|
||||||
|
//收入明细
|
||||||
|
model.put("incomeDetails", projectBudgetService.getBudgetIncomeDetail(project));
|
||||||
|
//成本明细
|
||||||
|
model.put("costDetails", projectBudgetService.getBudgetCostDetail(project));
|
||||||
|
//项目管理成本明细
|
||||||
|
model.put("costProjectManageDetails", projectBudgetService.getBudgetCostProjectManageDetail(project));
|
||||||
|
List<ProjectBudgetPlanDetail> projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project);
|
||||||
|
//资金计划明细
|
||||||
|
model.put("projectBudgetPlanDetails", projectBudgetPlanDetails);
|
||||||
|
//资金计划总【上面汇总表】
|
||||||
|
model.put("projectBudgetPlanDetailTotal", projectBudgetService.getProjectBudgetPlanDetailTotal(project, projectBudgetPlanDetails));
|
||||||
|
//资金计划表中的统计信息【下面资金小表】
|
||||||
|
model.put("underwrittenPlanStatistic", projectBudgetService.getProjectUnderwrittenPlanStatisticBean(projectBudgetPlanDetails));
|
||||||
|
//现金表
|
||||||
|
model.put("cashFlowBean", projectBudgetService.getCashFlowBean(project, projectBudgetPlanDetails));
|
||||||
|
model.put("finalBean", new FinalBean());
|
||||||
|
//freemarker可以利用的静态方法
|
||||||
|
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
||||||
|
return "admin/project_detail";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核页面
|
||||||
|
* @param id
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/approve")
|
||||||
|
public String approve(@RequestParam("id") int id, Map<String, Object> model) {
|
||||||
|
Project project = projectService.getProject(id);
|
||||||
|
EstimateBean estimateBean = projectEstimateService.getEstimate(project);
|
||||||
|
model.put("estimateBean", estimateBean);
|
||||||
|
model.put("project", project);
|
||||||
|
BudgetBean budgetBean = projectBudgetService.getBudget(project);
|
||||||
|
//预算主页面数据
|
||||||
|
model.put("budgetBean", budgetBean);
|
||||||
|
//收入明细
|
||||||
|
model.put("incomeDetails", projectBudgetService.getBudgetIncomeDetail(project));
|
||||||
|
//成本明细
|
||||||
|
model.put("costDetails", projectBudgetService.getBudgetCostDetail(project));
|
||||||
|
//项目管理成本明细
|
||||||
|
model.put("costProjectManageDetails", projectBudgetService.getBudgetCostProjectManageDetail(project));
|
||||||
|
List<ProjectBudgetPlanDetail> projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project);
|
||||||
|
//资金计划明细
|
||||||
|
model.put("projectBudgetPlanDetails", projectBudgetPlanDetails);
|
||||||
|
//资金计划总【上面汇总表】
|
||||||
|
model.put("projectBudgetPlanDetailTotal", projectBudgetService.getProjectBudgetPlanDetailTotal(project, projectBudgetPlanDetails));
|
||||||
|
//资金计划表中的统计信息【下面资金小表】
|
||||||
|
model.put("underwrittenPlanStatistic", projectBudgetService.getProjectUnderwrittenPlanStatisticBean(projectBudgetPlanDetails));
|
||||||
|
//现金表
|
||||||
|
model.put("cashFlowBean", projectBudgetService.getCashFlowBean(project, projectBudgetPlanDetails));
|
||||||
|
model.put("finalBean", new FinalBean());
|
||||||
|
//freemarker可以利用的静态方法
|
||||||
|
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
||||||
|
return "admin/project_approve";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@InitBinder
|
@InitBinder
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -219,6 +219,16 @@
|
||||||
onclick="location.href='${base}/project/final/edit?id=${list.id}'"><span
|
onclick="location.href='${base}/project/final/edit?id=${list.id}'"><span
|
||||||
class="am-icon-pencil-square-o"></span>发起决算
|
class="am-icon-pencil-square-o"></span>发起决算
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button"
|
||||||
|
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||||
|
onclick="location.href='${base}/project/detail?id=${list.id}'"><span
|
||||||
|
class="am-icon-pencil-square-o"></span>查看
|
||||||
|
</button>
|
||||||
|
<button type="button"
|
||||||
|
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||||
|
onclick="location.href='${base}/project/approve?id=${list.id}'"><span
|
||||||
|
class="am-icon-pencil-square-o"></span>审核
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue