Merge remote-tracking branch 'origin/master'

master
xxssyyyyssxx 2021-11-23 18:39:52 +08:00
commit 1de3f791c6
11 changed files with 62 additions and 50 deletions

View File

@ -458,7 +458,7 @@ public class AccountService {
return new ArrayList<>();
}
String sql = "select u.id as id from sys_user_role ur left join sys_user u on u.id=ur.user_id where ur.role_id in (?)";
String ids = roleIds.stream().collect(Collectors.joining());
String ids = String.join("", roleIds);
List<Record> records = pagination.find(sql, ids);
if (records == null || records.isEmpty()) {
return new ArrayList<>();
@ -466,7 +466,10 @@ public class AccountService {
List<String> userIds = new ArrayList<>(roleIds.size());
for (Record record : records) {
userIds.add(record.getInt("id") + "");
Integer id = record.getInt("id");
if (id != null) {
userIds.add(id.toString());
}
}
return userIds;
}

View File

@ -1,6 +1,8 @@
package cn.palmte.work.service;
import cn.palmte.work.config.activiti.ActConstant;
import cn.palmte.work.model.ActTaskDef;
import cn.palmte.work.model.Admin;
import cn.palmte.work.model.AdminRepository;
import cn.palmte.work.utils.ActUtil;
@ -55,8 +57,9 @@ public class ActListenerService {
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(procInsId).singleResult();
logger.info("addCandidateUsers : {}, taskName:{}, hasProcIns:{}", candidateUsers, delegateTask.getName(), processInstance != null);
if (actUtil.isProjectProcessIns(processInstance)) {
updateProjectApprover(candidateUsers, processInstance);
updateProjectApprover(candidateUsers, processInstance, procDefId, taskDefKey);
}
delegateTask.addCandidateUsers(candidateUsers);
@ -87,13 +90,15 @@ public class ActListenerService {
* @param candidateUsers
* @param processInstance
*/
private void updateProjectApprover(List<String> candidateUsers, ProcessInstance processInstance) {
private void updateProjectApprover(List<String> candidateUsers, ProcessInstance processInstance, String procDefId, String taskDefKey) {
String businessKey = processInstance.getBusinessKey();
logger.info("businessKey : {}", businessKey);
ActTaskDef actTaskDef = actTaskDefService.findFirstByProcDefIdAndTaskKey(procDefId, taskDefKey);
try {
int adminId = 0;
if (!candidateUsers.isEmpty()) {
if (!candidateUsers.isEmpty() && actTaskDef!=null && actTaskDef.getTaskIndex() != ActConstant.TASK_INDEX_FIRST_USER_TASK) {
//回退到发起节点 审批人设置为空
for (String id : candidateUsers) {
Admin one = adminRepository.findOne(Integer.parseInt(id));
if (!one.isDeleted() && one.getEnabled() == 1) {
@ -103,6 +108,7 @@ public class ActListenerService {
}
}
}
projectInstanceService.updateApprover(Integer.parseInt(businessKey), adminId);
} catch (Exception e) {
logger.error("", e);

View File

@ -204,6 +204,9 @@ public class ActUtil {
for (IdentityLink identityLink : identityLinkList) {
if ("assignee".equals(identityLink.getType()) || "candidate".equals(identityLink.getType())) {
String assigneeUserId = identityLink.getUserId();
if (StrKit.isBlank(assigneeUserId) || "null".equals(assigneeUserId)) {
continue;
}
namesBuilder.append(accountService.getNameById(Integer.parseInt(assigneeUserId)));
namesBuilder.append(",");
}

View File

@ -49,17 +49,17 @@ function calculateFinal() {
$("input[name='saleIncomeCash']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calNetCashFlow();
calNetIncreaseMonetaryFunds();
});
$("input[name='taxReturn']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calNetCashFlow();
calNetIncreaseMonetaryFunds();
});
$("input[name='earnestMoneyIncome']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calNetCashFlow();
calNetIncreaseMonetaryFunds();
});
@ -69,46 +69,46 @@ function calculateFinal() {
calNetIncreaseMonetaryFunds();
});
$("input[name='taxCost']").change(function () {
calCashFluxFinalTotal();
// calCashFluxFinalTotal();
calNetCashFlow();
calNetIncreaseMonetaryFunds();
});
$("input[name='earnestMoneyCost']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calNetCashFlow();
calNetIncreaseMonetaryFunds();
});
$("input[name='netCashFlow']").change(function () {
calCashFluxFinalTotal();
// calCashFluxFinalTotal();
});
$("input[name='cashInflowFromInvestingActivities']").change(function () {
calCashFluxFinalTotal();
// calCashFluxFinalTotal();
calNetCashFromInvestingActivities();
calNetIncreaseMonetaryFunds();
})
$("input[name='cashOutflowFromInvestingActivities']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calNetCashFromInvestingActivities();
calNetIncreaseMonetaryFunds();
});
$("input[name='netCashFromInvestingActivities']").change(function () {
calCashFluxFinalTotal();
// calCashFluxFinalTotal();
});
$("input[name='financingCapitalInflow']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calFinancingCapitalCashflow();
calNetIncreaseMonetaryFunds();
});
$("input[name='financingCapitalOutflow']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
calFinancingCapitalCashflow();
calNetIncreaseMonetaryFunds();
});
$("input[name='financingCapitalCashflow']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
});
$("input[name='netIncreaseMonetaryFunds']").change(function () {
calCashFluxFinalTotal();
//calCashFluxFinalTotal();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

View File

@ -60,13 +60,13 @@
</head>
<body onload="checkParent()">
<div class="am-g am-g-collapse" id="allPage">
<#-- <div class="am-u-sm-4 am-u-md-6 am-u-lg-8" style="overflow: hidden;">-->
<#-- <div id="img" style="overflow: hidden;">-->
<#-- <image class="am-hide-md-down" src="${base}/img/login_bg2.png">-->
<#-- </div>-->
<#-- </div>-->
<div class="am-u-sm-8 am-u-md-6 am-u-lg-4" style="float: right;margin-right: 30px">
<div class="am-g am-g-collapse" >
<div class="am-u-sm-4 am-u-md-6 am-u-lg-8" style="overflow: hidden;">
<div id="img" style="overflow: hidden;margin-left: 135px">
<img class="am-hide-md-down" src="${base}/img/login_bg1.png"/>
</div>
</div>
<div class="am-u-sm-8 am-u-md-6 am-u-lg-4" >
<div id="login">
<h1>项目四算管理系统</h1>
<form method="post" id="loginForm" class="am-form" action="${base}/admin/singIn" >

View File

@ -99,13 +99,13 @@
<div class="am-tabs am-margin" data-am-tabs>
<ul class="am-tabs-nav am-nav am-nav-tabs">
<li class="am-active"><a href="#tab1">项目基本信息</a></li>
<#if project.status==1>
<#if project.status==1 || project.status==5 || project.status==10 || project.status==15>
<li><a href="#tab2">项目概算信息</a></li>
</#if>
<#if project.status==5>
<#if project.status==5 || project.status==10 || project.status==15>
<li><a href="#tab3">项目预算信息</a></li>
</#if>
<#if project.status==10>
<#if project.status==10 || project.status==15>
<li><a href="#tab4">项目结算信息</a></li>
</#if>
<#if project.status==15>
@ -255,13 +255,13 @@
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab2">
<#if project.status ==1 && project.approveStatusEstimate == 1>
<#if (project.status==1 || project.status==5 || project.status==10 || project.status==15) && project.approveStatusEstimate == 1>
<div class="approve-topass"></div>
</#if>
<#if project.status ==1 && project.approveStatusEstimate == 2>
<#if (project.status==1 || project.status==5 || project.status==10 || project.status==15) && project.approveStatusEstimate == 2>
<div class="approve-passed"></div>
</#if>
<#if project.status ==1 && project.approveStatusEstimate == 3>
<#if (project.status==1 || project.status==5 || project.status==10 || project.status==15) && project.approveStatusEstimate == 3>
<div class="approve-nopass"></div>
</#if>
<span class="am-text-lg">收入</span>
@ -407,13 +407,13 @@
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab3">
<#if project.status ==5 && project.approveStatusEstimate == 1>
<#if (project.status==5 || project.status==10 || project.status==15) && project.approveStatusEstimate == 1>
<div class="approve-topass"></div>
</#if>
<#if project.status ==5 && project.approveStatusEstimate == 2>
<#if (project.status==5 || project.status==10 || project.status==15) && project.approveStatusEstimate == 2>
<div class="approve-passed"></div>
</#if>
<#if project.status ==5 && project.approveStatusEstimate == 3>
<#if (project.status==5 || project.status==10 || project.status==15) && project.approveStatusEstimate == 3>
<div class="approve-nopass"></div>
</#if>
<span class="am-text-lg">收入</span>
@ -630,13 +630,13 @@
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab4">
<#if project.status ==10 && project.approveStatusEstimate == 1>
<#if (project.status==10 || project.status==15) && project.approveStatusEstimate == 1>
<div class="approve-topass"></div>
</#if>
<#if project.status ==10 && project.approveStatusEstimate == 2>
<#if (project.status==10 || project.status==15) && project.approveStatusEstimate == 2>
<div class="approve-passed"></div>
</#if>
<#if project.status ==10 && project.approveStatusEstimate == 3>
<#if (project.status==10 || project.status==15) && project.approveStatusEstimate == 3>
<div class="approve-nopass"></div>
</#if>
<input name="id" id="id" type="hidden" value="${project.id}" />
@ -985,14 +985,14 @@
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" value="${Utils.format(monthBean.netIncreaseMonetaryFunds,'0')}" required readonly title="本月结算金额"></td>
<td><input name="netIncreaseMonetaryFundsSettle" type="number" value="${Utils.format(currentBean.netIncreaseMonetaryFunds,'0')}" readonly title="结算总额"></td>
</tr>
<tr>
<#--<tr>
<td>合计</td>
<td><input name="cashFlowBudgetTotal" type="number" value="${Utils.format(cashFlowBean.saleIncomeCash + cashFlowBean.earnestMoneyIncome + cashFlowBean.purchaseCost + cashFlowBean.earnestMoneyCost + cashFlowBean.getNetCashFlow() +
cashFlowBean.financingCapitalInflow + cashFlowBean.financingCapitalOutflow + cashFlowBean.getFinancingCapitalCashflow() + cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFlowFormerSettleTotal" type="number" value="${Utils.format(formerBean.getCashFlowTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFlowTotal" type="number" value="${Utils.format(monthBean.getCashFlowTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFlowSettleTotal" type="number" value="${Utils.format(currentBean.getCashFlowTotal(),'0')}" readonly required title="此列累计"></td>
</tr>
</tr>-->
</tbody>
</table>
</div>
@ -1311,12 +1311,12 @@
<td><input name="type14SettleTotal" type="number" value="${Utils.format(currentBean.netIncreaseMonetaryFunds,'0')}" readonly required title="结算总额"></td>
<td><input name="netIncreaseMonetaryFunds" type="number" value="${Utils.format(finalBean.netIncreaseMonetaryFunds,'0')}" required readonly title="决算总额"></td>
</tr>
<tr>
<#--<tr>
<td>合计</td>
<td><input name="cashFluxBudgetTotal" type="number" value="${Utils.format(cashFlowBean.getCashFluxTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFluxSettleTotal" type="number" value="${Utils.format(currentBean.getCashFlowTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFluxFinalTotal" type="number" value="${Utils.format(finalBean.getCashFluxTotal(),'0')}" readonly required title="此列累计"></td>
</tr>
</tr>-->
</tbody>
</table>
</div>
@ -1872,7 +1872,7 @@
<button type="button" class="am-btn am-btn-warning am-btn-xs" onclick="javascript:history.go(-1);">
返回上一级
</button>
<#if project.creatorId!=project.approveId && adminId==project.approveId>
<#if adminId==project.approveId>
<button type="submit" class="am-btn am-btn-primary am-btn-xs" id="saveFinal">审核</button>
</#if>
</div>

View File

@ -333,12 +333,12 @@
<td><input name="type14SettleTotal" type="number" value="${Utils.format(settleBean.netIncreaseMonetaryFunds,'0')}" readonly required title="结算总额"></td>
<td><input name="netIncreaseMonetaryFunds" type="number" readonly required title="决算总额"></td>
</tr>
<tr>
<#--<tr>
<td>合计</td>
<td><input name="cashFluxBudgetTotal" type="number" value="${Utils.format(cashFlowBean.getCashFluxTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFluxSettleTotal" type="number" value="${Utils.format(settleBean.getCashFlowTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFluxFinalTotal" type="number" readonly required title="此列累计"></td>
</tr>
</tr>-->
</tbody>
</table>
</div>

View File

@ -333,12 +333,12 @@
<td><input name="type14SettleTotal" type="number" value="${Utils.format(settleBean.netIncreaseMonetaryFunds,'0')}" readonly required title="结算总额"></td>
<td><input name="netIncreaseMonetaryFunds" type="number" value="${Utils.format(finalBean.netIncreaseMonetaryFunds,'0')}" readonly required title="决算总额"></td>
</tr>
<tr>
<#--<tr>
<td>合计</td>
<td><input name="cashFluxBudgetTotal" type="number" value="${Utils.format(cashFlowBean.getCashFluxTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFluxSettleTotal" type="number" value="${Utils.format(settleBean.getCashFlowTotal(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFluxFinalTotal" type="number" value="${Utils.format(finalBean.getCashFluxTotal(),'0')}" readonly required title="此列累计"></td>
</tr>
</tr>-->
</tbody>
</table>
</div>

View File

@ -271,7 +271,7 @@
</button>-->
<#if list.creatorId!=list.approveId && adminId==list.approveId>
<#if adminId==list.approveId>
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/approve?listFrom=list&id=${list.id}'"><span

View File

@ -19,7 +19,7 @@
</ul>
<div class="am-topbar-right">
<ul class="am-nav am-nav-pills am-topbar-nav admin-header-list">
<li><marquee align="left" behavior="scroll" direction="left" height="20" width="200" hspace="50" vspace="20" loop="-1" scrollamount="10" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()"><a href="${base}/project/listApprove" target="mainFrame">${hasApproveProjectsMessage!""}</a></marquee></li>
<li style="margin-top: -10px"><marquee align="left" behavior="scroll" direction="left" height="20" width="200" hspace="50" vspace="20" loop="-1" scrollamount="10" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()"><a href="${base}/project/listApprove" target="mainFrame">${hasApproveProjectsMessage!""}</a></marquee></li>
<li style="margin-top: 15px"><span style="color: red;">${message!""}</span></li>
<li class="am-dropdown" data-am-dropdown>
<a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
@ -27,9 +27,9 @@
</a>
<ul class="am-dropdown-content">
<li><a id="change" href="javascript:void(0)"><span class="am-icon-user"></span> 修改密码</a></li>
<#if ((Session.hasDZG!"")=="Y")>
<#-- <#if ((Session.hasDZG!"")=="Y")>
<li><a href="${base}/admin/toDzg?userName=${userName}"><span class="am-icon-exchange"></span> 切换到大掌柜</a></li>
</#if>
</#if>-->
<li><a href="${base}/admin/logout"><span class="am-icon-power-off"></span> 退出</a></li>
</ul>
</li>