增加表单代理人字段设置
This commit is contained in:
parent
a70461ab8f
commit
65e9e0f7c8
@ -13,6 +13,8 @@ import java.util.List;
|
||||
public class ConfirmAssigneeVO {
|
||||
|
||||
private String nodeType;
|
||||
private String assigneeType;
|
||||
private String formAssigneeField;
|
||||
private String btnText;
|
||||
private String btnExc;
|
||||
private Boolean isNextEndEvent;
|
||||
@ -26,6 +28,22 @@ public class ConfirmAssigneeVO {
|
||||
this.nodeType = nodeType;
|
||||
}
|
||||
|
||||
public String getAssigneeType() {
|
||||
return assigneeType == null ? "" : assigneeType.trim();
|
||||
}
|
||||
|
||||
public void setAssigneeType(String assigneeType) {
|
||||
this.assigneeType = assigneeType;
|
||||
}
|
||||
|
||||
public String getFormAssigneeField() {
|
||||
return formAssigneeField == null ? "" : formAssigneeField.trim();
|
||||
}
|
||||
|
||||
public void setFormAssigneeField(String formAssigneeField) {
|
||||
this.formAssigneeField = formAssigneeField;
|
||||
}
|
||||
|
||||
public String getBtnText() {
|
||||
return btnText == null ? "提交" : btnText.trim();
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.interfaces.user.IUserBaseService;
|
||||
import ink.wgink.module.activiti.enums.oa.TaskCommentTypeEnum;
|
||||
import ink.wgink.module.activiti.enums.oa.assignee.AssigneeTypeEnum;
|
||||
import ink.wgink.module.activiti.pojo.bos.oa.TaskCommentBO;
|
||||
import ink.wgink.module.activiti.pojo.dtos.oa.NodeButtonDTO;
|
||||
import ink.wgink.module.activiti.pojo.dtos.oa.NodeFieldDTO;
|
||||
@ -432,6 +433,11 @@ public class OaFormReportRouteServiceImpl extends DefaultBaseService implements
|
||||
continue;
|
||||
}
|
||||
OaNodeAssigneePO oaNodeAssigneePO = nodeAssigneeService.getPOByDeploymentIdAndNodeId(deploymentId, userTask.getId());
|
||||
confirmAssigneeVO.setAssigneeType(oaNodeAssigneePO.getAssigneeType());
|
||||
// 候选人来源于表单,设置表单候选人字段,表单候选人的字段值为 assignee 的值
|
||||
if (StringUtils.equals(AssigneeTypeEnum.FORM.getValue(), oaNodeAssigneePO.getAssigneeType())) {
|
||||
confirmAssigneeVO.setFormAssigneeField(oaNodeAssigneePO.getAssignee());
|
||||
}
|
||||
// 设置节点类型
|
||||
confirmAssigneeVO.setNodeType(oaNodeAssigneePO.getNodeType());
|
||||
// 设置节点代理人列表
|
||||
@ -441,13 +447,15 @@ public class OaFormReportRouteServiceImpl extends DefaultBaseService implements
|
||||
} else {
|
||||
assigneeList = nodeAssigneeService.listAssigneeUserId(processInstanceId, currentUserId, oaNodeAssigneePO);
|
||||
}
|
||||
List<UserDTO> userDTOs = userBaseService.listByUserIds(assigneeList);
|
||||
List<ConfirmAssigneeVO.AssigneeVO> assigneeVOs = userDTOs.stream().map(userDTO -> {
|
||||
ConfirmAssigneeVO.AssigneeVO assigneeVO = new ConfirmAssigneeVO.AssigneeVO();
|
||||
BeanUtils.copyProperties(userDTO, assigneeVO);
|
||||
return assigneeVO;
|
||||
}).collect(Collectors.toList());
|
||||
confirmAssigneeVO.setAssignees(assigneeVOs);
|
||||
if(!assigneeList.isEmpty()) {
|
||||
List<UserDTO> userDTOs = userBaseService.listByUserIds(assigneeList);
|
||||
List<ConfirmAssigneeVO.AssigneeVO> assigneeVOs = userDTOs.stream().map(userDTO -> {
|
||||
ConfirmAssigneeVO.AssigneeVO assigneeVO = new ConfirmAssigneeVO.AssigneeVO();
|
||||
BeanUtils.copyProperties(userDTO, assigneeVO);
|
||||
return assigneeVO;
|
||||
}).collect(Collectors.toList());
|
||||
confirmAssigneeVO.setAssignees(assigneeVOs);
|
||||
}
|
||||
}
|
||||
confirmAssigneeVOs.add(confirmAssigneeVO);
|
||||
}
|
||||
|
@ -616,6 +616,17 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
||||
}
|
||||
}
|
||||
}
|
||||
if (assignee.assigneeType === 'form') {
|
||||
if (!assignee.assignee) {
|
||||
top.dialog.msg('请输入表单代理人表单字段名')
|
||||
return;
|
||||
}
|
||||
if (!(/[\w\d\_]+/g.test(assignee.assignee))) {
|
||||
top.dialog.msg('代理人表单字段名只能是 字母、数字、下划线 的组合');
|
||||
return;
|
||||
}
|
||||
assignee.assigneeName = ''
|
||||
}
|
||||
|
||||
$scope.property.value = {};
|
||||
$scope.property.value = $scope.oaNodeManage;
|
||||
|
@ -301,6 +301,20 @@
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 自动获取代理人 end -->
|
||||
<!-- 表单获取代理人 start -->
|
||||
<tr ng-if="oaNodeManage.assignee.assigneeType == 'form'">
|
||||
<td>
|
||||
<h5>代理人字段名</h5>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-if="oaNodeManage.assignee.assigneeType == 'form'">
|
||||
<td>
|
||||
<div>
|
||||
<input ng-model="oaNodeManage.assignee.assignee" type="text" name="formAssignee" placeholder="请输入表单代理人字段名" style="width: 300px">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 表单获取代理人 end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -57,7 +57,7 @@
|
||||
cols: [
|
||||
[
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field:'taskName', width:200, title: '流程名称', align:'center',
|
||||
{field:'processName', width:200, title: '流程名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
|
Loading…
Reference in New Issue
Block a user