|
@@ -8,6 +8,7 @@ import com.zjugis.business.flow.leave.service.LeaveService;
|
|
|
import com.zjugis.business.flow.leave.service.LeaveTimeService;
|
|
|
import com.zjugis.framework.workflow.exception.BusinessException;
|
|
|
import com.zjugis.framework.workflow.model.BaseController;
|
|
|
+import com.zjugis.framework.workflow.rpc.remote.WorkflowClient;
|
|
|
import com.zjugis.framework.workflow.spring.resovler.ParamModel;
|
|
|
import com.zjugis.module.adm.api.attendance.AttendanceSheetApi;
|
|
|
import com.zjugis.module.system.api.permission.RoleApi;
|
|
@@ -44,7 +45,7 @@ public class LeaveEvent extends BaseController {
|
|
|
@Resource
|
|
|
private AttendanceSheetApi attendanceSheetApi;
|
|
|
@Resource
|
|
|
- private AdminUserApi adminUserApi;
|
|
|
+ private WorkflowClient workflowClient;
|
|
|
@Resource
|
|
|
private RoleApi roleApi;
|
|
|
|
|
@@ -62,17 +63,19 @@ public class LeaveEvent extends BaseController {
|
|
|
String flowInstanceId = activityInstance.get("flowInstanceId").toString();
|
|
|
LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
|
|
|
String flowDesc = "";
|
|
|
- if (!Strings.isNullOrEmpty(entity.getDeptName())) {
|
|
|
- flowDesc += "/" + entity.getDeptName();
|
|
|
- }
|
|
|
if (!Strings.isNullOrEmpty(entity.getUserNickname())) {
|
|
|
flowDesc += "/" + entity.getUserNickname();
|
|
|
}
|
|
|
-
|
|
|
+ if (!Strings.isNullOrEmpty(entity.getLeaveHours().toString())) {
|
|
|
+ flowDesc += "/" + entity.getLeaveHours().toString();
|
|
|
+ }
|
|
|
+ if (!Strings.isNullOrEmpty(entity.getLeaveReason())) {
|
|
|
+ flowDesc += "/" + entity.getLeaveReason();
|
|
|
+ }
|
|
|
entity.setFlowStatus(1);
|
|
|
leaveService.updateLeave(LeaveConvert.INSTANCE.convert(entity));
|
|
|
flowDesc = flowDesc.length() > 1 ? flowDesc.substring(1) : flowDesc;
|
|
|
-// String result = E_FlowUtils.setFlowDesc(flowDesc, flowInstanceId);
|
|
|
+ workflowClient.saveFlowDescribe(flowInstanceId,flowDesc);
|
|
|
return ok("true");
|
|
|
} else {
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|