去掉垫资利息和垫资峰值状态,列表增加提交审核按钮
parent
064a49f1e7
commit
a4fa58e81f
|
@ -541,4 +541,16 @@ public class ProjectController extends BaseController {
|
|||
}
|
||||
return ResponseMsg.buildSuccessMsg("成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目提交审核
|
||||
*/
|
||||
@RequestMapping("/saveApprove")
|
||||
@ResponseBody
|
||||
public ResponseMsg saveApprove(int id) throws Exception {
|
||||
Project project = projectRepository.findOne(id);
|
||||
projectService.saveApprove(project, InterfaceUtil.getAdmin());
|
||||
|
||||
return ResponseMsg.buildSuccessMsg("成功");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -755,6 +755,11 @@ public class ProjectBudgetService {
|
|||
|
||||
budgetEditSave(project, projectInDb, budgetBean, admin, ApproveStatusEnum.APPROVAL_PENDING);
|
||||
|
||||
budgetApprove(approveStatusBudget, projectInDb, admin);
|
||||
}
|
||||
|
||||
public void budgetApprove(Integer approveStatusBudget, Project projectInDb, Admin admin) throws Exception {
|
||||
|
||||
if(null != approveStatusBudget &&
|
||||
ApproveStatusEnum.APPROVAL_UNPASS.getApproveStatus() == approveStatusBudget){
|
||||
//审核不通过的情况下重新编辑后就完成当前任务
|
||||
|
@ -769,6 +774,7 @@ public class ProjectBudgetService {
|
|||
projectInstanceService.startBudgetProcessInstance(projectInDb, admin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑预算保存项目
|
||||
*/
|
||||
|
|
|
@ -261,6 +261,10 @@ public class ProjectEstimateService {
|
|||
|
||||
estimateEditSave(project, projectInDb, estimateBean, admin, ApproveStatusEnum.APPROVAL_PENDING);
|
||||
|
||||
estimateApprove(approveStatusEstimate, projectInDb, admin);
|
||||
}
|
||||
|
||||
public void estimateApprove(Integer approveStatusEstimate, Project projectInDb, Admin admin) {
|
||||
if(null != approveStatusEstimate &&
|
||||
ApproveStatusEnum.APPROVAL_UNPASS.getApproveStatus() == approveStatusEstimate){
|
||||
//审核不通过的情况下重新编辑后就完成当前任务【此时任务节点在第一个,也就是发起审批】
|
||||
|
@ -275,6 +279,7 @@ public class ProjectEstimateService {
|
|||
projectInstanceService.startEstimateProcessInstance(projectInDb, admin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑概算保存项目
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,10 @@ public class ProjectService {
|
|||
private AdminRepository adminRepository;
|
||||
@Autowired
|
||||
private ProjectEstimateService projectEstimateService;
|
||||
|
||||
@Autowired
|
||||
private ProjectInstanceService projectInstanceService;
|
||||
@Autowired
|
||||
private ProjectBudgetService projectBudgetService;
|
||||
|
||||
private QueryHelper getQueryHelper(Map<String, String> searchInfo) {
|
||||
/*"CASE p.type WHEN 1 THEN '工程集成类' WHEN 2 THEN '设备集成类' WHEN 3 THEN '战略合作类' ELSE '未知' AS typeDesc," +
|
||||
|
@ -337,4 +340,20 @@ public class ProjectService {
|
|||
|
||||
return ResponseMsg.buildSuccessMsg("删除成功");
|
||||
}
|
||||
|
||||
public void saveApprove(Project project, Admin admin) throws Exception {
|
||||
if (project.getApproveStatusEstimate() == 0) {
|
||||
Integer approveStatusEstimate = project.getApproveStatusEstimate();
|
||||
|
||||
projectEstimateService.estimateApprove(approveStatusEstimate, project, admin);
|
||||
} else if (project.getApproveStatusBudget() == 0) {
|
||||
Integer approveStatusBudget = project.getApproveStatusBudget();
|
||||
|
||||
projectBudgetService.budgetApprove(approveStatusBudget, project, admin);
|
||||
} else if (project.getApproveStatusSettle() == 0) {
|
||||
projectInstanceService.startSettleProcessInstance(project, InterfaceUtil.getAdmin());
|
||||
} else if (project.getApproveStatusFinal() == 0) {
|
||||
projectInstanceService.startFinalProcessInstance(project.getId(), InterfaceUtil.getAdmin());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,24 +134,24 @@
|
|||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资利息</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资利息"
|
||||
name="advanceInterestAmount" placeholder="单位(元)" maxlength="20"
|
||||
value="${Utils.format(project.advanceInterestAmount)}" required />
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资峰值</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资峰值"
|
||||
name="advancePeakAmount" placeholder="单位(元)" maxlength="20"
|
||||
value="${Utils.format(project.advancePeakAmount)}" required />
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<#-- <div class="am-g am-form-group am-margin-top">-->
|
||||
<#-- <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资利息</div>-->
|
||||
<#-- <div class="am-u-sm-6 am-u-md-6">-->
|
||||
<#-- <input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资利息"-->
|
||||
<#-- name="advanceInterestAmount" placeholder="单位(元)" maxlength="20"-->
|
||||
<#-- value="${Utils.format(project.advanceInterestAmount)}" required />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-u-sm-2 am-u-md-4 input-msg"></div>-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-g am-form-group am-margin-top">-->
|
||||
<#-- <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资峰值</div>-->
|
||||
<#-- <div class="am-u-sm-6 am-u-md-6">-->
|
||||
<#-- <input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资峰值"-->
|
||||
<#-- name="advancePeakAmount" placeholder="单位(元)" maxlength="20"-->
|
||||
<#-- value="${Utils.format(project.advancePeakAmount)}" required />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-u-sm-2 am-u-md-4 input-msg"></div>-->
|
||||
<#-- </div>-->
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>合同金额</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
|
|
|
@ -109,24 +109,24 @@
|
|||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资利息</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资利息"
|
||||
name="advanceInterestAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"
|
||||
value="" required />
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资峰值</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资峰值"
|
||||
name="advancePeakAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"
|
||||
value="" required />
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<#-- <div class="am-g am-form-group am-margin-top">-->
|
||||
<#-- <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资利息</div>-->
|
||||
<#-- <div class="am-u-sm-6 am-u-md-6">-->
|
||||
<#-- <input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资利息"-->
|
||||
<#-- name="advanceInterestAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"-->
|
||||
<#-- value="" required />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-u-sm-2 am-u-md-4 input-msg"></div>-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-g am-form-group am-margin-top">-->
|
||||
<#-- <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资峰值</div>-->
|
||||
<#-- <div class="am-u-sm-6 am-u-md-6">-->
|
||||
<#-- <input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资峰值"-->
|
||||
<#-- name="advancePeakAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"-->
|
||||
<#-- value="" required />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-u-sm-2 am-u-md-4 input-msg"></div>-->
|
||||
<#-- </div>-->
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>合同金额</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
|
|
|
@ -116,24 +116,24 @@
|
|||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资利息</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资利息"
|
||||
name="advanceInterestAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"
|
||||
value="${Utils.format(project.advanceInterestAmount)}" required />
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资峰值</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资峰值"
|
||||
name="advancePeakAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"
|
||||
value="${Utils.format(project.advancePeakAmount)}" required />
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
<#-- <div class="am-g am-form-group am-margin-top">-->
|
||||
<#-- <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资利息</div>-->
|
||||
<#-- <div class="am-u-sm-6 am-u-md-6">-->
|
||||
<#-- <input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资利息"-->
|
||||
<#-- name="advanceInterestAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"-->
|
||||
<#-- value="${Utils.format(project.advanceInterestAmount)}" required />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-u-sm-2 am-u-md-4 input-msg"></div>-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-g am-form-group am-margin-top">-->
|
||||
<#-- <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>垫资峰值</div>-->
|
||||
<#-- <div class="am-u-sm-6 am-u-md-6">-->
|
||||
<#-- <input type="number" class="am-input" data-validate-async data-validation-message="请输入垫资峰值"-->
|
||||
<#-- name="advancePeakAmount" placeholder="单位(元)" min="0.00" max="9999999999.99" step="0.01" maxlength="13"-->
|
||||
<#-- value="${Utils.format(project.advancePeakAmount)}" required />-->
|
||||
<#-- </div>-->
|
||||
<#-- <div class="am-u-sm-2 am-u-md-4 input-msg"></div>-->
|
||||
<#-- </div>-->
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>合同金额</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
|
|
|
@ -278,6 +278,13 @@
|
|||
onclick="location.href='${base}/project/detail?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>查看
|
||||
</button>-->
|
||||
<#if list.approveStatusEstimate == 0 || list.approveStatusBudget == 0 || list.approveStatusSettle == 0 || list.approveStatusFinal == 0>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/saveApprove?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>提交审核
|
||||
</button>
|
||||
</#if>
|
||||
|
||||
|
||||
<#if adminId==list.approveId>
|
||||
|
|
Loading…
Reference in New Issue