人员转换部门
This commit is contained in:
parent
39854353ef
commit
ea26bbe890
|
@ -1,6 +1,7 @@
|
|||
package com.hzya.frame.u8c.ax.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.u8c.ax.entity.ArchivesEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
@ -38,4 +39,6 @@ public interface IAxService extends IBaseService<ArchivesEntity, String>{
|
|||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
Object thirdInterfaceArchivesDelete(JSONObject object);
|
||||
|
||||
SysExtensionApiEntity changeData(SysExtensionApiEntity entity);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package com.hzya.frame.u8c.ax.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.cbs8.dto.req.PayResultRequestDTO;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.u8c.ax.dao.IAxDao;
|
||||
import com.hzya.frame.u8c.ax.entity.ArchivesEntity;
|
||||
import com.hzya.frame.u8c.ax.entity.Ass;
|
||||
|
@ -14,6 +17,7 @@ import com.hzya.frame.u8c.ax.entity.VoucherRoot;
|
|||
import com.hzya.frame.u8c.ax.service.IAxService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
|
@ -827,4 +831,34 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysExtensionApiEntity changeData(SysExtensionApiEntity entity) {
|
||||
String bodys = entity.getBodys();
|
||||
JSONObject jsonObject = JSONObject.parseObject(bodys);
|
||||
JSONArray psn = jsonObject.getJSONArray("psn");
|
||||
for (int i = 0; i < psn.size(); i++) {
|
||||
JSONObject parentvo = psn.getJSONObject(i);
|
||||
JSONObject parentvo1 = parentvo.getJSONObject("parentvo");
|
||||
JSONObject psnmanvo = parentvo1.getJSONObject("psnmanvo");
|
||||
String pk_deptdoc = psnmanvo.getString("pk_deptdoc");
|
||||
String currentcorp = parentvo1.getString("currentcorp");
|
||||
ArchivesEntity archivesEntity = new ArchivesEntity();
|
||||
archivesEntity.setArchivesType("2");
|
||||
archivesEntity.setLeftCode(pk_deptdoc);
|
||||
archivesEntity.setLeftOrg(currentcorp);
|
||||
List<ArchivesEntity> archivesEntities = axDao.queryArchivesData(archivesEntity);
|
||||
if(archivesEntities != null && archivesEntities.size() > 0){
|
||||
psnmanvo.put("pk_deptdoc",archivesEntities.get(0).getRightCode());
|
||||
}
|
||||
}
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue