审核通过和不通过不显示当前审核人

master
Harry Yang 2023-01-04 15:42:29 +08:00
parent d1bae8fbf9
commit 05d2baaf2d
2 changed files with 21 additions and 9 deletions

View File

@ -133,20 +133,30 @@ public class ProjectProcessService {
*
*
* @param processId Id
* @param auditId ID
* @param auditId ID
* @param status
*/
public void updateAudit(int processId, ProcessStatus status, List<Integer> auditId) {
String currentAudit = getCurrentAudit(auditId);
String currentAuditId = auditId.stream().map(String::valueOf).collect(Collectors.joining(","));
if (status != null) {
if (!CollectionUtils.isEmpty(auditId)) {
jdbcTemplate.update(
"update project_process set current_audit=?,current_audit_id=?,status=? where id=?", currentAudit, currentAuditId, status.getValue(), processId);
if (CollectionUtils.isEmpty(auditId)) {
if (status != null) {
jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=?,status=? where id=?",
null, null, status.getValue(), processId);
}
else {
jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=? where id=?",
null, null, processId);
}
}
else {
jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=? where id=?", currentAudit, currentAuditId, processId);
String currentAudit = getCurrentAudit(auditId);
String currentAuditId = auditId.stream().map(String::valueOf).collect(Collectors.joining(","));
if (status != null) {
jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=?,status=? where id=?",
currentAudit, currentAuditId, status.getValue(), processId);
}
else {
jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=? where id=?", currentAudit, currentAuditId, processId);
}
}
}

View File

@ -115,7 +115,9 @@
<span>{{scope.row.status | processStatus}}</span>
</template>
</el-table-column>
<el-table-column prop="currentAudit" label="当前审核人" width="100"></el-table-column>
<el-table-column prop="currentAudit" label="当前审核人" width="100">
<span v-if="scope.row.status!=='audit_passed' || scope.row.status==='audit_not_passed'">{{cope.row.currentAudit}}</span>
</el-table-column>
<el-table-column prop="lastUpdateAt" label="最后更新时间" width="170"></el-table-column>
<el-table-column label="操作" fixed="right" width="230">