rev:修改任务参数

This commit is contained in:
zhangzq
2024-06-19 15:07:40 +08:00
parent 129d717fb8
commit 56db66f531
23 changed files with 102 additions and 36 deletions

View File

@@ -15,6 +15,7 @@
*/ */
package org.nl.common.domain.exception.handler; package org.nl.common.domain.exception.handler;
import cn.hutool.http.HttpStatus;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
@@ -29,7 +30,7 @@ import java.time.LocalDateTime;
@Data @Data
class ApiError { class ApiError {
private Integer status = 400; private String code = "400";
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime timestamp; private LocalDateTime timestamp;
private String message; private String message;
@@ -46,7 +47,7 @@ class ApiError {
public static ApiError error(Integer status, String message){ public static ApiError error(Integer status, String message){
ApiError apiError = new ApiError(); ApiError apiError = new ApiError();
apiError.setStatus(status); apiError.setCode(String.valueOf(status));
apiError.setMessage(message); apiError.setMessage(message);
return apiError; return apiError;
} }

View File

@@ -85,6 +85,6 @@ public class GlobalExceptionHandler {
* 统一返回 * 统一返回
*/ */
private ResponseEntity<ApiError> buildResponseEntity(ApiError apiError) { private ResponseEntity<ApiError> buildResponseEntity(ApiError apiError) {
return new ResponseEntity<>(apiError, HttpStatus.valueOf(apiError.getStatus())); return new ResponseEntity<>(apiError, HttpStatus.valueOf(Integer.valueOf(apiError.getCode())));
} }
} }

View File

@@ -69,7 +69,7 @@ public class SchBaseTaskController {
} }
@PutMapping("/operation") @PutMapping("/operation")
public ResponseEntity<Object> update(@RequestBody Map<String, Object> map) { public ResponseEntity<Object> update(@RequestBody JSONObject map) {
schBaseTaskService.operation(map); schBaseTaskService.operation(map);
return new ResponseEntity<>(HttpStatus.NO_CONTENT); return new ResponseEntity<>(HttpStatus.NO_CONTENT);
} }

View File

@@ -12,6 +12,8 @@ import org.nl.common.publish.BussEventMulticaster;
import org.nl.common.utils.MapOf; import org.nl.common.utils.MapOf;
import org.nl.wms.dispatch_manage.task.handler.AbstractTask; import org.nl.wms.dispatch_manage.task.handler.AbstractTask;
import org.nl.wms.dispatch_manage.task.service.dao.SchBaseTask; import org.nl.wms.dispatch_manage.task.service.dao.SchBaseTask;
import org.nl.wms.flow_manage.flow.service.deployment.IActReProcdefService;
import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef;
import org.nl.wms.flow_manage.monitor.event.FlowStartEvent; import org.nl.wms.flow_manage.monitor.event.FlowStartEvent;
import org.nl.wms.md_manage.group_dick.service.IMdGruopDickService; import org.nl.wms.md_manage.group_dick.service.IMdGruopDickService;
import org.nl.wms.md_manage.group_dick.service.dao.MdGruopDick; import org.nl.wms.md_manage.group_dick.service.dao.MdGruopDick;
@@ -42,6 +44,8 @@ public class GroupDickInStorageTask extends AbstractTask {
private IMdPbVehicleMaterService iMdPbVehicleMaterService; private IMdPbVehicleMaterService iMdPbVehicleMaterService;
@Autowired @Autowired
private IMdGruopDickService iMdGruopDickService; private IMdGruopDickService iMdGruopDickService;
@Autowired
private IActReProcdefService iActReProcdefService;
@Override @Override
public JSONObject createTask(JSONObject data) { public JSONObject createTask(JSONObject data) {
@@ -59,12 +63,21 @@ public class GroupDickInStorageTask extends AbstractTask {
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"组盘信息不存在"); throw new BadRequestException("申请任务失败:载具"+vehicle_code+"组盘信息不存在");
} }
JSONObject mstJ = (JSONObject) JSONObject.toJSON(mst); JSONObject mstJ = (JSONObject) JSONObject.toJSON(mst);
mstJ.put("stor_code",item.get(0).getStor_code()); MdPbVehicleMaterVo vehicleMater = item.get(0);
mstJ.put("stor_code", vehicleMater.getStor_code());
//更新载具proc_inst_id //更新载具proc_inst_id
String currentInstId = vehicleMater.getProc_inst_id();
String model_key = "md_group";
if (StringUtils.isNotEmpty(currentInstId)){
ActReProcdef procdefByInst = iActReProcdefService.getProcdefByInst(currentInstId);
if (procdefByInst!=null){
model_key = procdefByInst.getModel_key();
}
}
BussEventMulticaster.Publish( BussEventMulticaster.Publish(
new FlowStartEvent("md_group", new FlowStartEvent(model_key,
proc_inst_id -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>().set("proc_inst_id",proc_inst_id).eq("vehicle_code",vehicle_code)) proc_inst_id -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>().set("proc_inst_id",proc_inst_id).eq("vehicle_code",vehicle_code))
,new JSONObject(MapOf.of("target_point", point_code1))) ,new JSONObject(MapOf.of("start_point", point_code1)))
.build("md_group_dick",mst.getId(),mst.getSource_form_type(),mst.getSource_form_id(), mstJ) .build("md_group_dick",mst.getId(),mst.getSource_form_type(),mst.getSource_form_id(), mstJ)
.build("md_pb_vehicleMater",item) .build("md_pb_vehicleMater",item)
); );

View File

@@ -1,5 +1,6 @@
package org.nl.wms.dispatch_manage.task.service; package org.nl.wms.dispatch_manage.task.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.nl.common.domain.entity.PageQuery; import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.dispatch_manage.task.service.dao.SchBaseTask; import org.nl.wms.dispatch_manage.task.service.dao.SchBaseTask;
@@ -58,6 +59,6 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
* *
* @param param * @param param
*/ */
void operation(Map<String, Object> param); void operation(JSONObject param);
} }

View File

@@ -1,5 +1,8 @@
package org.nl.wms.dispatch_manage.task.service.impl; package org.nl.wms.dispatch_manage.task.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
@@ -100,8 +103,10 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
} }
@Override @Override
public void operation(Map<String, Object> param) { public void operation(JSONObject param) {
String taskStatus = param.getString("method_name");
this.update(new UpdateWrapper<SchBaseTask>()
.set("status",taskStatus)
.eq("task_code",param.getString("task_code")));
} }
} }

View File

@@ -3,6 +3,7 @@ package org.nl.wms.external_system.acs.controller;
import cn.dev33.satoken.annotation.SaIgnore; import cn.dev33.satoken.annotation.SaIgnore;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.TableDataInfo;
import org.nl.wms.external_system.GateWayService; import org.nl.wms.external_system.GateWayService;
import org.nl.wms.external_system.dto.InteracteDto; import org.nl.wms.external_system.dto.InteracteDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +29,6 @@ public class AcsToWmsController {
@SaIgnore @SaIgnore
public ResponseEntity<Object> apply(@RequestBody InteracteDto form) { public ResponseEntity<Object> apply(@RequestBody InteracteDto form) {
gateWayService.apply(form); gateWayService.apply(form);
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
} }
} }

View File

@@ -87,6 +87,7 @@ public class ExecutionController {
jsonObject.put("form_id", actHiExecution.getForm_id()); jsonObject.put("form_id", actHiExecution.getForm_id());
jsonObject.put("form_type", actHiExecution.getForm_type()); jsonObject.put("form_type", actHiExecution.getForm_type());
jsonObject.put("form_data", actHiExecution.getForm_data()); jsonObject.put("form_data", actHiExecution.getForm_data());
jsonObject.put("aux_param", actHiExecution.getAux_param());
array.add(jsonObject); array.add(jsonObject);
} }
return new ResponseEntity<>(array, HttpStatus.OK); return new ResponseEntity<>(array, HttpStatus.OK);

View File

@@ -6,6 +6,7 @@ import org.nl.wms.flow_manage.flow.framework.BpmnModel;
import org.nl.wms.flow_manage.flow.framework.converter.node.BaseNodeConverter; import org.nl.wms.flow_manage.flow.framework.converter.node.BaseNodeConverter;
import org.nl.wms.flow_manage.flow.framework.entity.node.base.impl.FlowNode; import org.nl.wms.flow_manage.flow.framework.entity.node.base.impl.FlowNode;
import org.nl.wms.flow_manage.flow.framework.entity.node.impl.task.impl.ServerTask; import org.nl.wms.flow_manage.flow.framework.entity.node.impl.task.impl.ServerTask;
import org.springframework.util.CollectionUtils;
import java.util.Iterator; import java.util.Iterator;
@@ -24,14 +25,13 @@ public class ServerTaskConverter extends BaseNodeConverter {
form.setType(node.getString("type")); form.setType(node.getString("type"));
form.setCategory(properties.getString("category")); form.setCategory(properties.getString("category"));
form.setForm_type(properties.getString("form_type")); form.setForm_type(properties.getString("form_type"));
form.setAuxParam(properties.getJSONObject("auxParam")); JSONObject auxParam = properties.getJSONObject("auxParam");
JSONObject carry = model.getAuxParam(); if (!CollectionUtils.isEmpty(auxParam)){
if (carry!=null){ JSONObject carry = model.getAuxParam();
if (form.getAuxParam()!=null){ if (carry!=null){
form.getAuxParam().putAll(carry); auxParam.putAll(carry);
}else {
form.setAuxParam(carry);
} }
form.setAuxParam(auxParam);
} }
form.setName(properties.getString("name")); form.setName(properties.getString("name"));
form.setDocumentation(properties.getString("documentation")); form.setDocumentation(properties.getString("documentation"));

View File

@@ -52,6 +52,7 @@ public abstract class FlowNodeActivityBehavior<T> {
.set("activity_id", entity.getActivityId()) .set("activity_id", entity.getActivityId())
.set("activity_name", entity.getActivityName()) .set("activity_name", entity.getActivityName())
.set("form_type", entity.getForm_type()) .set("form_type", entity.getForm_type())
.set("aux_param", entity.getAuxParam().toString())
.set("form_id", entity.getForm_id()) .set("form_id", entity.getForm_id())
.set("remark", "") .set("remark", "")
.set("status", StatusEnum.FLOW_STATUS.code("启动")) .set("status", StatusEnum.FLOW_STATUS.code("启动"))
@@ -64,6 +65,7 @@ public abstract class FlowNodeActivityBehavior<T> {
.eq("proc_inst_id",entity.getProc_inst_id()) .eq("proc_inst_id",entity.getProc_inst_id())
.set("status", StatusEnum.FLOW_STATUS.code("节点完成")) .set("status", StatusEnum.FLOW_STATUS.code("节点完成"))
.set("form_data", entity.getT().toString()) .set("form_data", entity.getT().toString())
.set("aux_param", entity.getAuxParam().toString())
.set("form_type",entity.getForm_type()) .set("form_type",entity.getForm_type())
.set("form_id",entity.getForm_id()) .set("form_id",entity.getForm_id())
.set("update_time", DateUtil.now())); .set("update_time", DateUtil.now()));
@@ -92,6 +94,7 @@ public abstract class FlowNodeActivityBehavior<T> {
historyEntity.setForm_type(entity.getForm_type()); historyEntity.setForm_type(entity.getForm_type());
historyEntity.setForm_id(entity.getForm_id()); historyEntity.setForm_id(entity.getForm_id());
historyEntity.setForm_data((JSONObject) entity.getT()); historyEntity.setForm_data((JSONObject) entity.getT());
historyEntity.setAux_param(entity.getAuxParam());
historyEntity.setUpdate_time(DateUtil.now()); historyEntity.setUpdate_time(DateUtil.now());
history.save(historyEntity); history.save(historyEntity);
this.leave(entity); this.leave(entity);

View File

@@ -88,6 +88,7 @@ public class EndEventActivityBehavior extends FlowNodeActivityBehavior<JSONObjec
entity.setT(parent.getForm_data()); entity.setT(parent.getForm_data());
entity.setForm_type(parent.getForm_type()); entity.setForm_type(parent.getForm_type());
entity.setForm_id(parent.getForm_id()); entity.setForm_id(parent.getForm_id());
entity.setAuxParam(parent.getAux_param());
entity.setCurrentFlowElement(flowNode); entity.setCurrentFlowElement(flowNode);
entity.setDeploymentId(parent.getDeployment_id()); entity.setDeploymentId(parent.getDeployment_id());
entity.setProc_inst_id(parent.getProc_inst_id()); entity.setProc_inst_id(parent.getProc_inst_id());

View File

@@ -80,6 +80,7 @@ public class StartEventActivityBehavior extends FlowNodeActivityBehavior {
execution.setParent_id(entity.getParent_id()); execution.setParent_id(entity.getParent_id());
execution.setForm_id(entity.getForm_id()); execution.setForm_id(entity.getForm_id());
execution.setForm_data((JSONObject) JSONObject.toJSON(entity.getT())); execution.setForm_data((JSONObject) JSONObject.toJSON(entity.getT()));
execution.setAux_param(entity.getAuxParam());
execution.setActivity_id(entity.getActivityId()); execution.setActivity_id(entity.getActivityId());
execution.setActivity_name(entity.getActivityName()); execution.setActivity_name(entity.getActivityName());
execution.setCreate_time(DateUtil.now()); execution.setCreate_time(DateUtil.now());

View File

@@ -57,6 +57,8 @@ public class ExecutionEntity<T> implements Cloneable{
//没有用到? //没有用到?
protected BmFormStruc form_struc; protected BmFormStruc form_struc;
//流程全局变量
protected JSONObject auxParam = new JSONObject();
//回调执行 //回调执行
protected Consumer callback = null; protected Consumer callback = null;
@@ -76,6 +78,13 @@ public class ExecutionEntity<T> implements Cloneable{
this.form_type = form_type; this.form_type = form_type;
} }
public void setAuxParam(JSONObject auxParam) {
if (auxParam == null){
auxParam = new JSONObject();
}
this.auxParam = auxParam;
}
@Override @Override
public Object clone() { public Object clone() {
try { try {

View File

@@ -11,6 +11,7 @@ import org.nl.wms.flow_manage.flow.framework.entity.node.impl.task.impl.ServerTa
import org.nl.wms.flow_manage.flow.framework.process.nodeType.TypeHandler; import org.nl.wms.flow_manage.flow.framework.process.nodeType.TypeHandler;
import org.nl.wms.flow_manage.flow.framework.process.nodeType.excess.impl.process.classprocess.ClassProcess; import org.nl.wms.flow_manage.flow.framework.process.nodeType.excess.impl.process.classprocess.ClassProcess;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List; import java.util.List;
@@ -32,7 +33,14 @@ public class ClassHandler extends TypeHandler<JSONObject,ExecutionEntity<JSONOb
if (process==null){ if (process==null){
throw new BadRequestException("当前serverTask配置的类信息不存在"); throw new BadRequestException("当前serverTask配置的类信息不存在");
} }
JSONObject form = process.process(dto.getT(), flowNode.getAuxParam()); JSONObject auxParam = new JSONObject();
auxParam.putAll(flowNode.getAuxParam());
if (!CollectionUtils.isEmpty(entity.getAuxParam())){
auxParam.putAll(entity.getAuxParam());
}
JSONObject form = process.process(dto.getT(), auxParam);
//清空全局配置的数据
entity.setAuxParam(new JSONObject());
result.put("t",form); result.put("t",form);
//后续:涉及框架的参数提到框架中处理 //后续:涉及框架的参数提到框架中处理
String source_form_type = dto.getForm_type(); String source_form_type = dto.getForm_type();

View File

@@ -33,7 +33,6 @@ import java.util.stream.Collectors;
* @Date 2024/5/6 14:34 * @Date 2024/5/6 14:34
* 出库任务入库任务 * 出库任务入库任务
*/ */
@Service
public class OutStorageTaskHandler implements ClassProcess { public class OutStorageTaskHandler implements ClassProcess {
@Autowired @Autowired

View File

@@ -15,4 +15,6 @@ import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef;
public interface IActReProcdefService extends IService<ActReProcdef> { public interface IActReProcdefService extends IService<ActReProcdef> {
ActReProcdef getCurrentVersion(String model_key); ActReProcdef getCurrentVersion(String model_key);
ActReProcdef getProcdefByInst(String proc_inst_id);
} }

View File

@@ -2,6 +2,7 @@ package org.nl.wms.flow_manage.flow.service.deployment.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef; import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef;
/** /**
@@ -15,4 +16,8 @@ import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef;
public interface ActReProcdefMapper extends BaseMapper<ActReProcdef> { public interface ActReProcdefMapper extends BaseMapper<ActReProcdef> {
ActReProcdef getCurrentVersion(@Param("modelKey") String modelKey, @Param("version")String version); ActReProcdef getCurrentVersion(@Param("modelKey") String modelKey, @Param("version")String version);
@Select("select act_re_procdef.* from act_re_procdef \n" +
"left join act_ru_execution on act_ru_execution.deployment_id = act_re_procdef.deployment_id \n" +
"where act_ru_execution.status < '90' and act_ru_execution.deployment_id = #{proc_inst_id} GROUP BY model_key")
ActReProcdef getProcdefByInst(String proc_inst_id);
} }

View File

@@ -1,6 +1,7 @@
package org.nl.wms.flow_manage.flow.service.deployment.impl; package org.nl.wms.flow_manage.flow.service.deployment.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.nl.wms.flow_manage.flow.service.deployment.dao.mapper.ActReProcdefMapper; import org.nl.wms.flow_manage.flow.service.deployment.dao.mapper.ActReProcdefMapper;
import org.nl.wms.flow_manage.flow.service.deployment.IActReProcdefService; import org.nl.wms.flow_manage.flow.service.deployment.IActReProcdefService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -22,4 +23,12 @@ public class ActReProcdefServiceImpl extends ServiceImpl<ActReProcdefMapper, Act
public ActReProcdef getCurrentVersion(String model_key) { public ActReProcdef getCurrentVersion(String model_key) {
return this.baseMapper.getCurrentVersion(model_key,null); return this.baseMapper.getCurrentVersion(model_key,null);
} }
@Override
public ActReProcdef getProcdefByInst(String proc_inst_id) {
if (StringUtils.isNotEmpty(proc_inst_id)){
return this.baseMapper.getProcdefByInst(proc_inst_id);
}
return null;
}
} }

View File

@@ -97,11 +97,16 @@ public class ActRuExecution implements Serializable {
* 业务类型 * 业务类型
*/ */
private String form_type; private String form_type;
/**
* 业务类型
*/
@TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject aux_param = new JSONObject();
/** /**
* 业务数据 * 业务数据
*/ */
@TableField(typeHandler = FastjsonTypeHandler.class) @TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject form_data = new JSONObject();; private JSONObject form_data = new JSONObject();
@TableField(exist = false) @TableField(exist = false)
private List<ActRuExecution> children = new ArrayList<>(); private List<ActRuExecution> children = new ArrayList<>();

View File

@@ -62,13 +62,15 @@ public class FlowOperationServiceImpl implements IFlowOperationService {
String model_json_string = deployment.getModel_editor_json(); String model_json_string = deployment.getModel_editor_json();
//转流程实例: //转流程实例:
JSONObject model_json = JSONObject.parseObject(model_json_string); JSONObject model_json = JSONObject.parseObject(model_json_string);
BpmnModel bpmnModel = bpmnJSONConverter.convertToBpmnModel(deployment.getModel_key(), deployment.getVersion(), model_json,auxParam); BpmnModel bpmnModel = bpmnJSONConverter.convertToBpmnModel(deployment.getModel_key(), deployment.getVersion(), model_json);
System.out.println(bpmnModel.getNodeFlow().size()); System.out.println(bpmnModel.getNodeFlow().size());
//auxParam流程扩展数据1。要么下一个流程才有要么所有servierTasK都有要么设置为全局变量消费完就没有否则一直传递
//创建流程参数ExecutionEntity执行流程 //创建流程参数ExecutionEntity执行流程
ExecutionEntity entity = new ExecutionEntity(); ExecutionEntity entity = new ExecutionEntity();
entity.setCurrentFlowElement(bpmnModel.getStartEvent()); entity.setCurrentFlowElement(bpmnModel.getStartEvent());
entity.setT(JSONObject.toJSON(dto)); entity.setT(JSONObject.toJSON(dto));
entity.setCallback(callback); entity.setCallback(callback);
entity.setAuxParam(auxParam);
entity.setForm_type(dto.getForm_type()); entity.setForm_type(dto.getForm_type());
entity.setForm_id(dto.getForm_id()); entity.setForm_id(dto.getForm_id());
entity.setStartActivityId(entity.getActivityId()); entity.setStartActivityId(entity.getActivityId());
@@ -105,18 +107,11 @@ public class FlowOperationServiceImpl implements IFlowOperationService {
JSONObject model_json = JSONObject.parseObject(model_json_string); JSONObject model_json = JSONObject.parseObject(model_json_string);
BpmnModel bpmnModel = bpmnJSONConverter.convertToBpmnModel(deployment.getModel_key(), deployment.getVersion(), model_json); BpmnModel bpmnModel = bpmnJSONConverter.convertToBpmnModel(deployment.getModel_key(), deployment.getVersion(), model_json);
FlowNode flowNode = bpmnModel.getProcesses().get(execution.getActivity_id()); FlowNode flowNode = bpmnModel.getProcesses().get(execution.getActivity_id());
if (auxParam!=null){
JSONObject param = flowNode.getAuxParam();
if (param!=null){
flowNode.getAuxParam().putAll(auxParam);
}else {
flowNode.setAuxParam(auxParam);
}
}
ExecutionEntity entity = new ExecutionEntity(); ExecutionEntity entity = new ExecutionEntity();
entity.setCurrentFlowElement(flowNode); entity.setCurrentFlowElement(flowNode);
entity.setProc_inst_id(execution.getProc_inst_id()); entity.setProc_inst_id(execution.getProc_inst_id());
entity.setParent_id(execution.getParent_id()); entity.setParent_id(execution.getParent_id());
entity.setAuxParam(execution.getAux_param());
entity.setForm_type(execution.getForm_type()); entity.setForm_type(execution.getForm_type());
entity.setForm_id(execution.getForm_id()); entity.setForm_id(execution.getForm_id());
entity.setStartActivityId(execution.getActivity_id()); entity.setStartActivityId(execution.getActivity_id());

View File

@@ -70,7 +70,11 @@ public class ActHiExecution implements Serializable {
* 业务数据 * 业务数据
*/ */
@TableField(typeHandler = FastjsonTypeHandler.class) @TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject form_data = new JSONObject();; private JSONObject form_data = new JSONObject();; /**
* 业务数据
*/
@TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject aux_param = new JSONObject();;
} }

View File

@@ -230,8 +230,11 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
StIvtIostorinv iostorinv = form.toJavaObject(StIvtIostorinv.class); StIvtIostorinv iostorinv = form.toJavaObject(StIvtIostorinv.class);
//查询明细/api/bmFormStruc/getTypes //查询明细/api/bmFormStruc/getTypes
List<StIvtIostorinvdtlVo> dtlVo = iStIvtIostorinvDtlService.getDtlVo(iostorinv.getId()); List<StIvtIostorinvdtlVo> dtlVo = iStIvtIostorinvDtlService.getDtlVo(iostorinv.getId());
Set<String> vechiles = dtlVo.stream().map(StIvtIostorinvdtlVo::getVehicle_code).collect(Collectors.toSet());
//扔一个物料信息进去 //扔一个物料信息进去
BussEventMulticaster.Publish(new FlowStartEvent("st_ivt_iostorinv_"+(iostorinv.getIn_storage()?"in":"out"), null,null) BussEventMulticaster.Publish(new FlowStartEvent("st_ivt_iostorinv_"+(iostorinv.getIn_storage()?"in":"out"),
proc_inst_id -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
.set("proc_inst_id",proc_inst_id).in("vehicle_code",vechiles)),null)
.build("st_ivt_iostorinv",iostorinv.getId(),iostorinv.getSource_form_type(),iostorinv.getSource_form_id(),form) .build("st_ivt_iostorinv",iostorinv.getId(),iostorinv.getSource_form_type(),iostorinv.getSource_form_id(),form)
.build("st_ivt_iostorinvdtl",dtlVo) .build("st_ivt_iostorinvdtl",dtlVo)
); );

View File

@@ -264,13 +264,13 @@ export default {
let method_name = '' let method_name = ''
switch (command) { switch (command) {
case 'a':// 完成 case 'a':// 完成
method_name = 'forceFinish' method_name = '90'
break break
case 'b':// 取消 case 'b':// 取消
method_name = 'cancel' method_name = '100'
break break
case 'c':// 下发 case 'c':// 下发
method_name = 'immediateNotifyAcs' method_name = '20'
break break
case 'd':// 详情 case 'd':// 详情
method_name = 'view' method_name = 'view'