You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
package com.fr.plugin.tabledata.modify; |
|
|
|
import com.fr.base.TableData; |
|
import com.fr.general.data.DataModel; |
|
import com.fr.plugin.transform.ExecuteFunctionRecord; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
import com.fr.script.Calculator; |
|
import com.fr.stable.fun.impl.AbstractDSModifyProvider; |
|
|
|
|
|
@FunctionRecorder |
|
public class DemoDSModify extends AbstractDSModifyProvider { |
|
|
|
@Override |
|
public boolean accept( TableData ds, Calculator cal, DataModel old ) { |
|
try{ |
|
//每个第三方系统的表单结构都不一样~,这个实例处理的是SYS0792这个系统的 |
|
//SYS0792表单内容是以JSON形式存放在 “第三方表单内容”(第5个字段) 这个字段里面的 |
|
//结构为 {user:'',qnumber:'',addr:''} |
|
Object id = cal.eval("=$sysID"); |
|
return "SYS0792".equals(id); |
|
}catch(Exception e){ |
|
|
|
} |
|
return false; |
|
} |
|
|
|
@Override |
|
@ExecuteFunctionRecord |
|
public DataModel modify(TableData ds, Calculator cal, DataModel old ) { |
|
return new DemoDataModel(old); |
|
} |
|
|
|
}
|
|
|