新增前端vue
This commit is contained in:
@@ -47,7 +47,7 @@ public class BizCalendarFlow extends DataEntity<BizCalendarFlow> implements Seri
|
||||
private String operationUser; // 操作人
|
||||
private String operationType; // 操作类型
|
||||
private String statusName; // 操作状态
|
||||
private String flowContent;
|
||||
private String flowContent; //更新内容
|
||||
|
||||
public BizCalendarFlow() {
|
||||
this(null);
|
||||
|
||||
@@ -99,19 +99,14 @@ public class BizCalendarScheduleController extends BaseController {
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated BizCalendarSchedule bizCalendarSchedule) {
|
||||
boolean isReachable = bizCalendarSchedule.getIsNewRecord();
|
||||
User user = UserUtils.getUser();
|
||||
User fUser = UserUtils.getByLoginCode(bizCalendarSchedule.getParticipantUser());
|
||||
BizCalendarFlow calendarFlow = new BizCalendarFlow();
|
||||
calendarFlow.setScheduleId(bizCalendarSchedule.getScheduleId());
|
||||
calendarFlow.setOperationType(isReachable ? "新增" : "变更");
|
||||
calendarFlow.setOperationUser(user.getUserName());
|
||||
calendarFlow.setFlowContent(bizCalendarSchedule.getContent());
|
||||
calendarFlow.setStatusName(DictUtils.getDictLabel("todo_status", bizCalendarSchedule.getUstatus(), "0"));
|
||||
if (!bizCalendarSchedule.getIsNewRecord()) {
|
||||
getScheduleFlow(bizCalendarSchedule, user);
|
||||
}
|
||||
bizCalendarSchedule.setCreatorUser(user.getLoginCode());
|
||||
bizCalendarSchedule.setParticipantName(fUser.getUserName());
|
||||
bizCalendarSchedule.setUpdateTime(vDate.getUpdateTime(bizCalendarSchedule.getIsNewRecord()));
|
||||
flowService.save(calendarFlow);
|
||||
bizCalendarScheduleService.save(bizCalendarSchedule);
|
||||
return renderResult(Global.TRUE, text("保存日程信息成功!"));
|
||||
}
|
||||
@@ -169,4 +164,21 @@ public class BizCalendarScheduleController extends BaseController {
|
||||
return renderResult(Global.TRUE, text("删除日程信息成功!"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 流程新增
|
||||
*/
|
||||
private void getScheduleFlow(BizCalendarSchedule bizCalendarSchedule, User user) {
|
||||
BizCalendarSchedule schedule = bizCalendarScheduleService.get(bizCalendarSchedule.getScheduleId());
|
||||
if (!schedule.getParticipantUser().equals(bizCalendarSchedule.getParticipantUser())) {
|
||||
BizCalendarFlow calendarFlow = new BizCalendarFlow();
|
||||
calendarFlow.setOperationUser(user.getUserName());
|
||||
calendarFlow.setFlowContent(bizCalendarSchedule.getContent());
|
||||
calendarFlow.setScheduleId(bizCalendarSchedule.getScheduleId());
|
||||
calendarFlow.setOperationType("变更通知人-->" + bizCalendarSchedule.getParticipantName());
|
||||
calendarFlow.setStatusName(DictUtils.getDictLabel("todo_status", bizCalendarSchedule.getUstatus(), "0"));
|
||||
flowService.save(calendarFlow);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user