parent
52fc7f7af2
commit
456d3e43d1
|
|
@ -0,0 +1,44 @@
|
|||
package shkd.sys.sys.plugin.api;
|
||||
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.openapi.api.plugin.ApiSavePlugin;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class RyApiSavePlugin implements Serializable, ApiSavePlugin {
|
||||
private static final long serialVersionUID = -1040058184785738857L;
|
||||
private static final Log logger = LogFactory.getLog(RyApiSavePlugin.class);
|
||||
/**
|
||||
* 人员API保存插件
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> preHandleRequestData(List<Map<String, Object>> reqData) {
|
||||
logger.info("API起始推送数据 → 人员 → " + reqData);
|
||||
for (Map<String, Object> oneLevel : reqData) {
|
||||
Map<String, Object> shkdLcbm = (Map<String, Object>) oneLevel.get("shkd_lcbm");//浪潮部门
|
||||
|
||||
|
||||
List<Map<String, Object>> entryentity = new ArrayList<>();
|
||||
Map<String, Object> twoLevel = new HashMap<>();
|
||||
|
||||
if (shkdLcbm != null) {
|
||||
Map<String, Object> dpt = new HashMap<>();
|
||||
dpt.put("shkd_lcid", shkdLcbm.get("shkd_lcid"));
|
||||
twoLevel.put("dpt", dpt);
|
||||
}
|
||||
|
||||
twoLevel.put("seq", 1);
|
||||
twoLevel.put("ispartjob", false);
|
||||
twoLevel.put("position", "职员");
|
||||
entryentity.add(twoLevel);
|
||||
oneLevel.put("entryentity", entryentity);
|
||||
}
|
||||
logger.info("API最终推送数据 → 人员 → " + reqData);
|
||||
return reqData;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue