Commit 332f3eaf by tangzhaoqian

审批优化

parent 056481b0
......@@ -58,7 +58,7 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@ApiModelProperty(value = "意见 ", example = "意见")
private String opinion;
@ApiModelProperty(value = "状态 0未执行 1执行中 2同意 3拒接", example = "101")
@ApiModelProperty(value = "状态 0未执行 1执行中 2同意 3拒接 4转派", example = "101")
private Integer sts;
@TableField(fill = FieldFill.INSERT)
......
......@@ -47,6 +47,7 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.SpmkEnumInterface;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
......@@ -604,7 +605,7 @@ public class SpmkController {
// 查询该 审批的状态 是否为 1 审批中
Integer count = SpmkExecutor.builder().build().selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getSts, "1"));
.eq(SpmkExecutor::getSts, ExecutorSts.IN_EXECUTION.ordinal()));
if (count == 0) {
return ResultUtil.error("您已审批过!");
......
......@@ -52,6 +52,8 @@ import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.clazz.CommonArea;
import cn.timer.api.bean.clazz.SysRegion;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
......@@ -519,7 +521,36 @@ public class YgglController {
return ResultUtil.data(ygglMainEmpPage, "员工搜索成功");
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
}
/**
* 导入员工档案
*/
@PostMapping(value = "/import_emp_record")
@ApiOperation(value = "导入员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> importEmpRecord(
@CurrentUser UserBean userBean/* ,@Validated @RequestBody List<AddygdaDto> listAddygdaDto */) {
List<QyzxEmpLogin> listEl = qyzxEmpLoginMapper.selectList(new QueryWrapper<QyzxEmpLogin>().lambda()
.select(QyzxEmpLogin::getPhone));
// listEl.stream().filter(predicate)
// listEl.stream().filter(item -> objId.equals(item.getUpId())).forEach(zzglBmgwM -> {
// list.add(zzglBmgwM.getId());
// getDepts(list, zzglBmgwM.getId(), objs);
// });
//抽取 登录表 的phone的集合
List<String> listPhone = listEl.stream()
.filter(o -> o.getPhone() != null)
.map(QyzxEmpLogin::getPhone)
.collect(Collectors.toList());
System.out.println(JSONUtil.parseObj(listPhone));
listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList());
return null;
}
/**
* 导入威力加强版
*
......@@ -528,7 +559,6 @@ public class YgglController {
*/
@PostMapping(value = "/ygdas")
@ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean, @RequestBody YgDrsDto drList) {
drList.setErrorList(new ArrayList<YgDrjqbDto>());
drList.setOrgCode(userBean.getOrgCode());
......@@ -546,7 +576,7 @@ public class YgglController {
// 证件类型为0
Integer jobType = Integer.valueOf(e.getJobType());// 工作类型
Integer syq = Integer.valueOf(e.getSyq());// 试用期
Integer sex = Integer.valueOf(e.getSex());// 性别,还差一个岗位
Integer sex = Integer.valueOf(e.getSex());// 性别
Integer gw = e.getHavebmid();
String jobNum = e.getYgnbgh();
Integer jg = e.getJg();
......@@ -821,7 +851,7 @@ public class YgglController {
if (ygnbgh != null && ygnbgh.length() != 0) {
d.setYgnbgh(ygnbgh.trim());
} else {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
String bh = format.format(new Date()) + orgCode + i + System.currentTimeMillis();
d.setYgnbgh(bh);
}
......
......@@ -61,7 +61,7 @@ public class YgDrjqbDto {
@ApiModelProperty(value="员工状态 ",example="1")
private String jobStatus;
@ApiModelProperty(value="入职日期 ",example="2020-3-12")
@ApiModelProperty(value="入职日期 ",example="2020-3-12 10:10:10")
private String rzTime;
@ApiModelProperty(value="试用期 ",example="试用期")
......
......@@ -19,6 +19,7 @@ import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.bean.spmk.SpmkExecutor;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.dto.spmk.Condition;
import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData;
......@@ -316,7 +317,7 @@ public class RouterUtils {
.empNum(Integer.parseInt(user.getId()))
.operatorHeaderUrl(user.getHeadUrl())
.executorName(user.getName())
.sts(2)
.sts(ExecutorSts.AGREE.ordinal())
.build()
.insert();
break;
......@@ -334,7 +335,6 @@ public class RouterUtils {
// 新增 执行人
List<User> listUser = listFlowChildren.get(i).getRelation().get(0).getUsers();
executor:
for (User user2 : listUser) {
SpmkExecutor executor = SpmkExecutor.builder()
.approveExecuteRecordId(aer2.getId())
......@@ -344,11 +344,11 @@ public class RouterUtils {
.build();
switch (user2.getExecute()) {
case EXECUTING:
executor.setSts(1);
executor.setSts(ExecutorSts.IN_EXECUTION.ordinal());
executor.insert();
break for_insert;
case EXECUTED:
executor.setSts(2);
executor.setSts(ExecutorSts.AGREE.ordinal());
executor.insert();
break;
}
......@@ -377,7 +377,7 @@ public class RouterUtils {
.empNum(Integer.parseInt(user2.getId()))
.executorName(user2.getName())
.operatorHeaderUrl(user2.getHeadUrl())
.sts(2)
.sts(ExecutorSts.AGREE.ordinal())
.build();
executor.insert();
}
......@@ -451,7 +451,7 @@ public class RouterUtils {
.empNum(Integer.parseInt(listUser.get(i_user).getId()))
.executorName(listUser.get(i_user).getName())
.operatorHeaderUrl(listUser.get(i_user).getHeadUrl())
.sts(1)
.sts(ExecutorSts.IN_EXECUTION.ordinal())
.build()
.insert();
hasNextApprover = true;
......@@ -498,7 +498,7 @@ public class RouterUtils {
.empNum(Integer.parseInt(user.getId()))
.executorName(user.getName())
.operatorHeaderUrl(user.getHeadUrl())
.sts(2)
.sts(ExecutorSts.AGREE.ordinal())
.build()
.insert();
......@@ -521,7 +521,7 @@ public class RouterUtils {
.empNum(Integer.parseInt(listUser.get(i_user2).getId()))
.executorName(listUser.get(i_user2).getName())
.operatorHeaderUrl(listUser.get(i_user2).getHeadUrl())
.sts(1)
.sts(ExecutorSts.IN_EXECUTION.ordinal())
.build();
executor.insert();
......@@ -553,7 +553,7 @@ public class RouterUtils {
.empNum(Integer.parseInt(user2.getId()))
.executorName(user2.getName())
.operatorHeaderUrl(user2.getHeadUrl())
.sts(2)
.sts(ExecutorSts.AGREE.ordinal())
.build();
executor.insert();
}
......
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