|
|
@ -7,6 +7,7 @@ import com.zdxt.auth.common.exception.BusinessException; |
|
|
import com.zdxt.auth.common.utils.StringUtils; |
|
|
import com.zdxt.auth.common.utils.StringUtils; |
|
|
import com.zdxt.auth.common.utils.security.ShiroUtils; |
|
|
import com.zdxt.auth.common.utils.security.ShiroUtils; |
|
|
import com.zdxt.auth.project.system.dept.mapper.DeptMapper; |
|
|
import com.zdxt.auth.project.system.dept.mapper.DeptMapper; |
|
|
|
|
|
import com.zdxt.auth.project.system.user.service.UserServiceImpl; |
|
|
import com.zdxt.common.annotation.DataScope; |
|
|
import com.zdxt.common.annotation.DataScope; |
|
|
import com.zdxt.common.domain.Ztree; |
|
|
import com.zdxt.common.domain.Ztree; |
|
|
import com.zdxt.domain.auth.Dept; |
|
|
import com.zdxt.domain.auth.Dept; |
|
|
@ -22,6 +23,8 @@ import org.apache.http.entity.StringEntity; |
|
|
import org.apache.http.impl.client.CloseableHttpClient; |
|
|
import org.apache.http.impl.client.CloseableHttpClient; |
|
|
import org.apache.http.impl.client.HttpClientBuilder; |
|
|
import org.apache.http.impl.client.HttpClientBuilder; |
|
|
import org.apache.http.util.EntityUtils; |
|
|
import org.apache.http.util.EntityUtils; |
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
@ -41,6 +44,8 @@ import java.util.Map; |
|
|
@Service |
|
|
@Service |
|
|
public class DeptServiceImpl implements IDeptService |
|
|
public class DeptServiceImpl implements IDeptService |
|
|
{ |
|
|
{ |
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(DeptServiceImpl.class); |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private DeptMapper deptMapper; |
|
|
private DeptMapper deptMapper; |
|
|
|
|
|
|
|
|
@ -438,10 +443,16 @@ public class DeptServiceImpl implements IDeptService |
|
|
for (int i = 0; i < dataArr.size(); i++) { |
|
|
for (int i = 0; i < dataArr.size(); i++) { |
|
|
JSONObject jsonObject = dataArr.getJSONObject(i); |
|
|
JSONObject jsonObject = dataArr.getJSONObject(i); |
|
|
if (StringUtils.isEmpty(jsonObject.getString("organizationId"))) { continue; } |
|
|
if (StringUtils.isEmpty(jsonObject.getString("organizationId"))) { continue; } |
|
|
// 返回每条拉取的成功情况
|
|
|
|
|
|
String taskId = jsonObject.getString("taskId"); |
|
|
try { |
|
|
String params = "{\"token\":\""+token+"\",[{\"taskId\":\""+taskId+"\",\"result\":\"SUCCESS\"}]}"; |
|
|
// 返回每条拉取的成功情况
|
|
|
connect("/ebus/sfrzhqxglmk/sysDoneTacc", params); |
|
|
String taskId = jsonObject.getString("taskId"); |
|
|
|
|
|
String params = "{\"token\":\"" + token + "\",[{\"taskId\":\"" + taskId + "\",\"result\":\"SUCCESS\"}]}"; |
|
|
|
|
|
connect("/ebus/sfrzhqxglmk/sysDoneTorg", params); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.info("部门数据下拉完成异常,异常任务id:{}",jsonObject.getString("taskId")); |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
Dept dept = new Dept(); |
|
|
Dept dept = new Dept(); |
|
|
dept.setDeptId(jsonObject.getString("organizationId")); |
|
|
dept.setDeptId(jsonObject.getString("organizationId")); |
|
|
dept.setParentId(jsonObject.getString("parentId")); |
|
|
dept.setParentId(jsonObject.getString("parentId")); |
|
|
|