Commit 236d1c49 by chenweisong

更新

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