Bladeren bron

组织更新代码

tags/24080901
PoffyZhang 1 jaar geleden
bovenliggende
commit
45f724602f
2 gewijzigde bestanden met toevoegingen van 25 en 2 verwijderingen
  1. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/ding/task/OrganizationBatchGetTask.java
  2. +21
    -0
      pmapi/src/test/java/com/ningdatech/pmapi/employee/EmployeeTest.java

+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/ding/task/OrganizationBatchGetTask.java Bestand weergeven

@@ -128,6 +128,8 @@ public class OrganizationBatchGetTask {
return;
}

employeeBatchGetTask.batchGetEmployeeTaskByOrdCode(orgCode);

for(String subOrganizationCode : subOrganizationCodeList){
GenericResult<DingOrgInfoDTO> organizationByCode = zwddClient.getOrganizationByCode(subOrganizationCode);
DingOrgInfoDTO dingOrgInfo = organizationByCode.getData();
@@ -137,7 +139,7 @@ public class OrganizationBatchGetTask {
if(Objects.nonNull(old)){
log.info("该单位已经存在 :{}",old.getOrganizationName());
organizationGetSubs(dingOrgInfo.getOrganizationCode());
employeeBatchGetTask.batchGetEmployeeTaskByOrdCode(dingOrgInfo.getOrganizationCode());
// employeeBatchGetTask.batchGetEmployeeTaskByOrdCode(dingOrgInfo.getOrganizationCode());
continue;
}

@@ -156,7 +158,7 @@ public class OrganizationBatchGetTask {
organization.setParentName(dingOrgInfo.getParentName());
if(iDingOrganizationService.save(organization)){
organizationGetSubs(organization.getOrganizationCode());
employeeBatchGetTask.batchGetEmployeeTaskByOrdCode(organization.getOrganizationCode());
// employeeBatchGetTask.batchGetEmployeeTaskByOrdCode(organization.getOrganizationCode());
}
}



+ 21
- 0
pmapi/src/test/java/com/ningdatech/pmapi/employee/EmployeeTest.java Bestand weergeven

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.AppTests;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask;
import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService;
@@ -34,6 +36,12 @@ public class EmployeeTest extends AppTests {
@Autowired
private IUserInfoService userInfoService;

@Autowired
private OrganizationBatchGetTask organizationBatchGetTask;

@Autowired
private EmployeeBatchGetTask employeeBatchGetTask;

@Test
public void test(){
List<DingEmployeeInfo> employees = dingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class)
@@ -72,4 +80,17 @@ public class EmployeeTest extends AppTests {
}
}

@Test
public void test2(){
String orgCode = "GO_4e6be07f25594df88e7bd1b7b7cdf9a8";
organizationBatchGetTask.organizationGetSubs(orgCode);
}

@Test
public void test3(){
String orgCode = "GO_1aceac0b3a664afbb31ea0d627189781";
employeeBatchGetTask.batchGetEmployeeTaskByOrdCode(orgCode);
}


}

Laden…
Annuleren
Opslaan