Commit 236d1c49 by chenweisong

更新

parent 3e4517b9
......@@ -158,6 +158,7 @@ public class TaskController {
CommonValidator.isTrue(excelForm.getNeedConfirm() != null && excelForm.getNeedConfirm() != 0, "模板needConfirm不能为空");
RecordScope scope = recordScopeService.findById(excelForm.getScopeId());
CommonValidator.isTrue(scope != null, "补录范围不能为空");
CommonValidator.isFalse((StringUtils.isEmpty(excelForm.getUpStreamAddr()) && StringUtils.isNotEmpty(excelForm.getBackStreamAddr())
|| (StringUtils.isNotEmpty(excelForm.getUpStreamAddr()) && StringUtils.isEmpty(excelForm.getBackStreamAddr()))), "上游地址和回流地址需同时填写或者同时为空");
......@@ -309,7 +310,9 @@ public class TaskController {
public User getAdmin() {
return userService.findAllByUsername("发起人").get(0);
User user = new User();
user.setUsername("发起人");
return user;
}
}
......@@ -21,8 +21,6 @@ public class UserController {
@Autowired
private UserService userService;
@Autowired
private UserFeignService userFeignService;
@Autowired
private GroupService groupService;
@Autowired
private RecordScopeService recordScopeService;
......@@ -56,7 +54,6 @@ public class UserController {
map.put("userList", users);
userList.add(map);
});
// List<User> userList = userService.findAll();
return ApiResponse.ok(userList);
}
......
......@@ -26,7 +26,9 @@ public class Activity implements Serializable {
public static int TYPE_AUTO = 2;
public static int TYPE_MANUAL = 1;
// 报送频度 按年 按周 按月 按日 自动推送
/**
* 报送频度 按年 按周 按月 按日 自动推送
*/
public static int FREQ_YEAR = 1;
public static int FREQ_WEEK = 2;
public static int FREQ_MONTH = 3;
......@@ -55,13 +57,14 @@ public class Activity implements Serializable {
@OneToMany(fetch = FetchType.EAGER, mappedBy = "activity")
private List<Template> excelList;
/*
发送人
*/
/**
* 发送人
*/
@ManyToOne
private User user;
/*
/**
* 该活动跑过得所有流程
*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
......
package com.keymobile.rest.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -38,6 +37,17 @@ public class Group implements Serializable {
@Column(name = "parent_id", columnDefinition = ("bigint(22) default 0 comment '父机构id'"))
private long parentId;
/**
* 常见的父子数据结构
* {
* node: {
* id: 0,
* name: "",
* fullName: ""
* },
* subNodes: []
* }
*/
@Transient
private List<Group> children;
......
......@@ -27,7 +27,6 @@ public class Mission implements Serializable {
public static int STATUS_BEGIN = 1;
public static int STATUS_COMPLETED = 2;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
......@@ -45,21 +44,21 @@ public class Mission implements Serializable {
@Column(nullable = false, columnDefinition = ("integer(2) default 1 COMMENT '状态'"))
private int status;
/*
补录模板
/**
* 补录模板
*/
@OneToOne
private Template template;
/*
操作人员
/**
* 操作人员
*/
@OneToOne
private User user;
/*
补录数据
*/
/**
* 补录数据
*/
@OneToOne(fetch = FetchType.EAGER)
private DataInfo dataInfo;
......
......@@ -21,25 +21,25 @@ import java.util.List;
@Table(name = "t_process")
public class Process implements Serializable {
public static int STATUS_BEGIN = 0;
public static int STATUS_RECORDING = 1;
public static int STATUS_AUDIT = 2;
public static int STATUS_COMPLETED = 3;
public static int STATUS_BEGIN = 0; // 起始状态
public static int STATUS_RECORDING = 1; // 补录中
public static int STATUS_AUDIT = 2; // 审核中
public static int STATUS_COMPLETED = 3; // 已经完成
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
/*
activiti运行中的流程实例id
*/
/**
* activiti运行中的流程实例id
*/
@Column(name = "process_id", unique = true, columnDefinition = ("varchar(100) comment '当前活动在跑进程 id'"))
private String processId;
@Column(nullable = false, columnDefinition = ("integer(2) default 0 comment '进程状态'"))
private int status;
/*
/**
* 该进程启动得所有子任务
*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "process")
......
......@@ -34,9 +34,6 @@ public class RecordScope implements Serializable {
@Column(name = "`desc`", nullable = false, columnDefinition = ("varchar(100) comment '补录角色描述'"))
private String desc;
@Column(nullable = false, columnDefinition = ("integer(2) comment '补录角色'"))
private int role;
@ManyToOne(fetch = FetchType.EAGER)
@JsonIgnore
private Group group;
......
......@@ -28,12 +28,10 @@ public class RecordScopeService {
if (exists.size() != 2) {
RecordScope scope = new RecordScope();
scope.setGroup(group);
scope.setRole(RecordScope.ROLE_RECORD);
scope.setDesc(group.getName() + RecordScope.ROLE_RECORD_DESC);
recordScopeDao.save(scope);
scope = new RecordScope();
scope.setGroup(group);
scope.setRole(RecordScope.ROLE_AUDIT);
scope.setDesc(group.getName() + RecordScope.ROLE_AUDIT_DESC);
recordScopeDao.save(scope);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment