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