人员接口对照转换
This commit is contained in:
parent
6be7091e2a
commit
3d25eba30e
|
@ -356,10 +356,23 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
|
||||||
JSONArray jsonArray = object1.getJSONArray("psn");
|
JSONArray jsonArray = object1.getJSONArray("psn");
|
||||||
if(jsonArray != null && jsonArray.size() > 0){
|
if(jsonArray != null && jsonArray.size() > 0){
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
JSONObject jo =jsonArray.getJSONObject(i);
|
||||||
|
JSONObject psnmanvo= jo.getJSONObject("parentvo");
|
||||||
|
JSONObject pk_deptdoc= psnmanvo.getJSONObject("psnmanvo");
|
||||||
|
ArchivesEntity archivesEntity = new ArchivesEntity();
|
||||||
|
archivesEntity.setArchivesType("2");
|
||||||
|
archivesEntity.setLeftCode(pk_deptdoc.getString("pk_deptdoc"));
|
||||||
|
archivesEntity.setLeftOrg(psnmanvo.getString("currentcorp"));
|
||||||
|
List<ArchivesEntity> archivesEntities = axDao.queryArchivesData(archivesEntity);
|
||||||
|
if(archivesEntities != null && archivesEntities.size() > 0){
|
||||||
|
pk_deptdoc.put("pk_deptdoc",archivesEntities.get(0).getRightCode());
|
||||||
|
}
|
||||||
|
logger.info("人员部门转换结果:"+jo.toJSONString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sendbody = object1.toJSONString();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ByteArrayEntity byteArrayEntity = new ByteArrayEntity(sendbody.getBytes("UTF-8"));
|
ByteArrayEntity byteArrayEntity = new ByteArrayEntity(sendbody.getBytes("UTF-8"));
|
||||||
byteArrayEntity.setContentType("application/json");
|
byteArrayEntity.setContentType("application/json");
|
||||||
post.setEntity(byteArrayEntity);
|
post.setEntity(byteArrayEntity);
|
||||||
|
|
Loading…
Reference in New Issue