|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.model.lac;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord;
|
|
|
|
|
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackTemplate;
|
|
|
|
|
import cn.estsh.i3plus.pojo.lac.bean.LacSuitTask;
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
|
@ -22,12 +25,6 @@ public class LacCommandStackModel {
|
|
|
|
|
private Long recordId;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 指令集模板
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
private LacCommandStackTemplate commandStackTemplate;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 指令集记录
|
|
|
|
|
*/
|
|
|
|
|
private LacCommandStackRecord commandStackRecord;
|
|
|
|
@ -47,13 +44,50 @@ public class LacCommandStackModel {
|
|
|
|
|
* key : 任务编号
|
|
|
|
|
* value : 原始报文
|
|
|
|
|
*/
|
|
|
|
|
private Map<Long, Object> orginMessage = new ConcurrentHashMap<>();
|
|
|
|
|
private Map<Long, Object> orginMessageMap = new ConcurrentHashMap<>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 任务转换后报文
|
|
|
|
|
* key : 任务编号
|
|
|
|
|
* value : 转换后报文
|
|
|
|
|
*/
|
|
|
|
|
private Map<Long, String> transMessage = new ConcurrentHashMap<>();
|
|
|
|
|
private Map<Long, Object> transMessageMap = new ConcurrentHashMap<>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 异常信息
|
|
|
|
|
*/
|
|
|
|
|
private Exception exception;
|
|
|
|
|
|
|
|
|
|
public void setException(Exception exception){
|
|
|
|
|
LoggerFactory.getLogger("YYYY").error("异常信息:{}",exception);
|
|
|
|
|
this.exception = exception;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCommandStackRecord(LacCommandStackRecord commandStackRecord){
|
|
|
|
|
this.commandStackRecord = commandStackRecord;
|
|
|
|
|
this.recordId = commandStackRecord.getId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<TaskParam> getTaskRequestParam(String taskCode){
|
|
|
|
|
for (Task task : this.getRequest().getTaskList()) {
|
|
|
|
|
if(task.getCode().equals(taskCode)){
|
|
|
|
|
return task.getParamList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void putOrginMessage(LacSuitTask lacSuitTask,Object orginMessage){
|
|
|
|
|
if(lacSuitTask == null || lacSuitTask.getTaskInstanceId() ==null){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.orginMessageMap.put(lacSuitTask.getTaskInstanceId(), orginMessage == null ? StringUtils.EMPTY : orginMessage);
|
|
|
|
|
}
|
|
|
|
|
public void putTransMessage(LacSuitTask lacSuitTask,Object transMessage){
|
|
|
|
|
if(lacSuitTask == null || lacSuitTask.getTaskInstanceId() ==null){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.transMessageMap.put(lacSuitTask.getTaskInstanceId(), transMessage == null ? StringUtils.EMPTY : transMessage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|