开发视图展示数据映射问题
This commit is contained in:
parent
b80b99c7d1
commit
e12e98cbfc
@ -0,0 +1,31 @@
|
||||
package com.awspaas.user.apps.docview.event;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
|
||||
import com.actionsoft.bpms.dw.design.event.DataWindowFormatDataEventInterface;
|
||||
import com.actionsoft.bpms.dw.exec.data.DataSourceEngine;
|
||||
import com.actionsoft.bpms.server.UserContext;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Author: yuandongqiang
|
||||
* @Date: 2025/7/30
|
||||
* @Description:
|
||||
*/
|
||||
public class DyYyFileDwEvent implements DataWindowFormatDataEventInterface {
|
||||
@Override
|
||||
public void formatData(UserContext userContext, JSONArray datas) {
|
||||
for (Object datao : datas) {
|
||||
JSONObject data = (JSONObject) datao;
|
||||
String columnValue = data.getString("FILEID"); // 注意有些特殊组件的值为JSONObject请根据情况使用getJSONObject获取相应值
|
||||
PALRepositoryPropertyModel propModel = PALRepositoryPropertyCache.getPropertyByPropertyId(columnValue, "Issuing_department");
|
||||
if (propModel != null) {
|
||||
String issuingDeptment = propModel.getPropertyValue();
|
||||
data.put("FILEID" + DataSourceEngine.AWS_DW_FIXED_CLOMUN_SHOW_RULE_SUFFIX, issuingDeptment);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user