/**
* 生成变更记录信息
* @param o1 变更前信息
* @param n1 表更后信息
* @param table 表名
* @param aaz308 事件id
* @return
*/
public List<Ae07> getAe07(Object o1,Object n1,String table,Long aaz308){
List<Ae07> ae07List=new ArrayList<>();
JSONObject infoOld = (JSONObject)JSONObject.toJSON(o1);
JSONObject infoNew = (JSONObject)JSONObject.toJSON(n1);
for (Map.Entry<String, Object> entry: infoNew.entrySet()) {
System.out.println("key:" + entry.getKey() + ",value:" + entry.getValue());
if (entry.getValue()!=null&&!"baz002".equals(entry.getKey())&&!"bze300".equals(entry.getKey())){
if (!entry.getValue().equals(infoOld.get(entry.getKey()))){
Ae07 ae07 =new Ae07();
ae07.setAaz308(aaz308);
ae07.setAae120(table);
ae07.setAae121(entry.getKey().toUpperCase());
if(infoOld.get(entry.getKey())!=null) {
ae07.setAae122(infoOld.get(entry.getKey()).toString());
}else{
ae07.setAae122("");
}
ae07.setAae123(entry.getValue().toString());
ae07List.add(ae07);
}
}
}
return ae07List;
}
09-06
3720