Commit 85fe4302 by 徐高华

自建-离职继承

parent b2d22054
...@@ -17,6 +17,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff; ...@@ -17,6 +17,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.service.HandoverService; import com.gic.haoban.manage.service.service.HandoverService;
import com.gic.haoban.manage.service.service.StaffService; import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.util.QwUtils;
import com.gic.mq.sdk.GicMQClient; import com.gic.mq.sdk.GicMQClient;
import com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO; import com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO;
import com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO; import com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO;
...@@ -104,7 +105,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ ...@@ -104,7 +105,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
String cursor = null; String cursor = null;
do { do {
//离职成员客户列表 //离职成员客户列表
unassignedListDTO = qywxUserApiService.getUnassignedList(qwDTO.getThirdCorpid(), config.getWxSuiteid(), cursor); unassignedListDTO = qywxUserApiService.getUnassignedList(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), cursor , qwDTO.isSelf(),qwDTO.getUrlHost());
cursor = unassignedListDTO.getNextCursor(); cursor = unassignedListDTO.getNextCursor();
if (CollectionUtils.isNotEmpty(unassignedListDTO.getInfo())) { if (CollectionUtils.isNotEmpty(unassignedListDTO.getInfo())) {
ret.addAll(unassignedListDTO.getInfo()); ret.addAll(unassignedListDTO.getInfo());
...@@ -145,7 +146,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ ...@@ -145,7 +146,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
logger.info("takeover is null={}",dto.getTakeoverStaffId()); logger.info("takeover is null={}",dto.getTakeoverStaffId());
return; return;
} }
QywxTransferCustomerDTO customerDTO = qywxUserApiService.transferResult(qwDTO.getThirdCorpid(), config.getWxSuiteid(), handover.getWxUserId(), takeover.getWxUserId(), true); QywxTransferCustomerDTO customerDTO = qywxUserApiService.transferResult(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), handover.getWxUserId(), takeover.getWxUserId(), true , qwDTO.isSelf() , qwDTO.getUrlHost());
if (customerDTO.getErrcode() != 0) { if (customerDTO.getErrcode() != 0) {
return; return;
} }
...@@ -255,7 +256,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ ...@@ -255,7 +256,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
for (Map.Entry<String, List<String>> entry : handoverStaffExternalMap.entrySet()) { for (Map.Entry<String, List<String>> entry : handoverStaffExternalMap.entrySet()) {
String wxUserId = entry.getKey(); String wxUserId = entry.getKey();
List<String> list = entry.getValue(); List<String> list = entry.getValue();
QywxTransferCustomerDTO transferCustomerResp = qywxUserApiService.transferCustomer(qwDTO.getThirdCorpid(), config.getWxSuiteid(), wxUserId, takeoverUserId, list); QywxTransferCustomerDTO transferCustomerResp = qywxUserApiService.transferCustomer(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), wxUserId, takeoverUserId, list,qwDTO.isSelf(),qwDTO.getUrlHost());
if (transferCustomerResp.getErrcode() != 0) { if (transferCustomerResp.getErrcode() != 0) {
logger.info("转移异常"); logger.info("转移异常");
} }
......
...@@ -85,12 +85,6 @@ public class DealSyncTest { ...@@ -85,12 +85,6 @@ public class DealSyncTest {
@Test @Test
public void test3() {
List<DepartmentDTO> department = qywxDepartmentApiService.listSelfDepartment("wweac4ef962720aa12", "GFu4FwkfcGFPue-qinB7ThEU4wR2SadbBH1yT5sLDzs", null);
System.out.println(JSONObject.toJSONString(department));
}
@Test
public void test4() { public void test4() {
String s = ""; String s = "";
memberUnionidRelatedApiService.dealQywxExternalUser(s); memberUnionidRelatedApiService.dealQywxExternalUser(s);
......
...@@ -213,7 +213,7 @@ public class WxEnterpriseController extends WebBaseController { ...@@ -213,7 +213,7 @@ public class WxEnterpriseController extends WebBaseController {
} }
int newType = this.wxEnterpriseApiService.calcSecretType(wxEnterpriseId) ; int newType = this.wxEnterpriseApiService.calcSecretType(wxEnterpriseId) ;
String diff = ""; String diff = "";
if(null != wxType && wxType.intValue() != newType) { if(null != wxType && wxType.intValue() != newType && wxType != 5) {
diff = "*"; diff = "*";
} }
return Arrays.asList(wxEnterpriseDTO.getWxCorpid(),wxEnterpriseDTO.getOpenCorpid()).stream().filter(str -> StringUtils.isNotBlank(str)).collect(Collectors.joining(" / ")) + desc + diff; return Arrays.asList(wxEnterpriseDTO.getWxCorpid(),wxEnterpriseDTO.getOpenCorpid()).stream().filter(str -> StringUtils.isNotBlank(str)).collect(Collectors.joining(" / ")) + desc + diff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment