Commit f06da3e7 by leialin

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!345
parents 6609adc0 0b9f1226
......@@ -65,7 +65,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
private String approveName;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "101")
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝 4:已审批 5:全部", example = "101")
private Integer sts;
@ApiModelProperty(value = "当前审批人 ", example = "当前审批人")
......
package cn.timer.api.controller.spmk;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
......@@ -378,6 +379,7 @@ public class SpmkController {
ca.setOrgCode(userBean.getOrgCode());
ca.setFroms(ObjectUtil.serialize(spmkCustomApprovalDto.getFroms()));
ca.setRouter(ObjectUtil.serialize(spmkCustomApprovalDto.getRouter()));
ca.setUpdateTime(new Date());
//1.新增 SpmkCustomApproval-自定义审批
if (!ca.insertOrUpdate())
......
......@@ -159,22 +159,27 @@ public class RouterUtils {
if(router.getRelation().size() > 0) {
// if (r != null && RELATION_TYPE_USERS.equals(r.getType())) {
List<User> listUser = router.getRelation().get(0).getUsers();
user:
for (int i = 0; i < listUser.size(); i++) {
String execute = listUser.get(i).getExecute();
switch (execute) {
case UNEXECUTED:
listUser.get(i).setExecute(EXECUTING);
// 首次发起申请时,写入 审批人名称 至 obj 中
if (isFirse && obj.getStr("current_approver") == null ) {
obj.set("current_approver", listUser.get(i).getName());
if(listUser != null) {
user:
for (int i = 0; i < listUser.size(); i++) {
String execute = listUser.get(i).getExecute();
switch (execute) {
case UNEXECUTED:
listUser.get(i).setExecute(EXECUTING);
// 首次发起申请时,写入 审批人名称 至 obj 中
if (isFirse && obj.getStr("current_approver") == null ) {
obj.set("current_approver", listUser.get(i).getName());
}
isAuditNext = true;
break user;
}
}
isAuditNext = true;
break user;
}
}else {
throw new Exception("发起审批有误");
}
// }
}else {
throw new Exception("审批人为空");
......
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