添加版本删除
parent
bcbbef2554
commit
df65b3d7bf
|
@ -11,6 +11,9 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DataValueRows {
|
||||
/**
|
||||
* json
|
||||
*/
|
||||
private String key;
|
||||
private DataValue[][] dataValue;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.muyu.rule.common.engine;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.muyu.etl.domain.DataValue;
|
||||
import com.muyu.rule.common.basic.abstracts.DataEngineDataSetActuator;
|
||||
import com.muyu.rule.common.domain.DataValueRows;
|
||||
|
@ -13,7 +15,7 @@ import java.util.List;
|
|||
* @Author:张承志
|
||||
* @Package:com.muyu.rule.server.basic.engine.row
|
||||
* @Project:cloud-etl-rule
|
||||
* @name:ENGINE_ROW_HANG_R1
|
||||
* @name:数据集根据字段去空
|
||||
* @Date:2024/8/30 11:13
|
||||
*/
|
||||
|
||||
|
@ -23,10 +25,14 @@ public class ENGINE_DataSet_asdf_S1 extends DataEngineDataSetActuator {
|
|||
public void run() {
|
||||
DataValueRows dataValueRows = get();
|
||||
DataValue[][] dataValue = dataValueRows.getDataValue();
|
||||
String key1 = dataValueRows.getKey();
|
||||
JSONObject jsonObject = JSON.parseObject(key1);
|
||||
String key = (String)jsonObject.get("key");
|
||||
|
||||
ArrayUtil<DataValue[]> arrayUtil = new ArrayUtil<>(dataValue);
|
||||
while (arrayUtil.hasNext()) {
|
||||
DataValue[] dataStructures = arrayUtil.next();
|
||||
List<DataValue> dataStructureList = Arrays.stream(dataStructures).filter(dataStructure -> dataStructure.getKey().equals("name") && dataStructure.getValue() == null).toList();
|
||||
List<DataValue> dataStructureList = Arrays.stream(dataStructures).filter(dataStructure -> dataStructure.getKey().equals(key) && dataStructure.getValue() == null).toList();
|
||||
if (dataStructureList.size() > 0) {
|
||||
arrayUtil.remove();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue