Commit d37cb5df by 徐高华

多人活码

parent c1de36f8
......@@ -48,18 +48,18 @@ public class HmClerkRelationApiServiceImpl implements HmClerkRelationApiService
hmQrcodeApiService.delById(hmQrcodeBO.getHmId(), invokingType, null);
}
// 多人活码逻辑
List<HmClerkRelationBO> hmClerkRelationBOS = hmClerkRelationService.queryByClerkId(clerkId, enterpriseId);
if (CollectionUtils.isEmpty(hmClerkRelationBOS)) {
logger.info("无多人活码");
List<HmClerkRelationBO> hmClerkRelationList = hmClerkRelationService.queryByClerkId(clerkId, enterpriseId);
logger.info("无多人活码,newClerkId={}",newClerkId);
if (CollectionUtils.isEmpty(hmClerkRelationList)) {
return ServiceResponse.success();
}
if(StringUtils.isNotBlank(newClerkId)) {
this.hmClerkRelationService.updateByClerkChangeStore(enterpriseId, clerkId ,newClerkId);
}else {
for (HmClerkRelationBO hmClerkRelationBO : hmClerkRelationBOS) {
Long hmId = hmClerkRelationBO.getHmId();
for (HmClerkRelationBO item : hmClerkRelationList) {
Long hmId = item.getHmId();
List<String> clerkIds = hmClerkRelationService.getClerkIdByHmId(hmId);
hmClerkRelationService.updateStatusById(0, hmClerkRelationBO.getRelationId());
hmClerkRelationService.updateStatusById(0, item.getRelationId());
clerkIds.remove(clerkId);
if (CollectionUtils.isNotEmpty(clerkIds)) {
// 更新活码
......
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