Browse Source

#定时任务抽离

zhongwei
yang_shj 1 year ago
parent
commit
8ef2479103
  1. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.operational.access.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -146,7 +147,7 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service{
* @param entity
*/
private void startProcess(AccessPlanV4DTO entity) {
Map<String, Object> variables = JSONObject.parseObject(JSONObject.toJSONString(entity), Map.class);
Map<String, Object> variables = JSONObject.parseObject(JSONObject.toJSONStringWithDateFormat(entity,DateUtil.PATTERN_DATETIME), Map.class);
variables.put("creator", TaskUtil.getTaskUser(String.valueOf(AuthUtil.getUserId())));
R<BladeFlow> result = flowClient.startProcessInstanceContainNameByKey("overhaul_plan", FlowUtil.getBusinessKey("access_plan_v4",String.valueOf(entity.getId())), entity.getName(), variables);
log.error("start_process_planV4 :{}",result);

Loading…
Cancel
Save