Browse Source

Merge remote-tracking branch 'origin/dev_abandon_grid' into dev_abandon_grid

# Conflicts:
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
dev
yinzuomei 4 years ago
parent
commit
af1dacd619
  1. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -40,6 +40,7 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
@ -98,6 +99,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
private RedisUtils redisUtils;
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
//迁移网格
@ -989,10 +992,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
public void abandonGridForDealBizData(AbandonGridFormDTO formDTO) {
try {
//根据网格id 获取网格内工作人员及其添加关系
List<StaffOrgRelationDTO> staffList = customerStaffGridDao.getGridStaffList(formDTO.getGridId());
if (CollectionUtils.isEmpty(staffList)){
log.info("abandonGridForDealBizData gridId:{} have any staff", formDTO.getGridId());
return;
List<StaffOrgRelationDTO> staffList = customerStaffGridDao.getGridStaffList(gridId);
if (staffList == null){
staffList = new ArrayList<>();
}
logger.debug("abandonGridForDealBizData staffList:{}", JSON.toJSONString(staffList));
List<StaffOrgRelationEntity> updateList = new ArrayList<>();
@ -1013,9 +1015,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
entity.setOrgId(gridInfo.getPid());
updateList.add(entity);
});
String customerId = loginUserUtil.getLoginUserCustomerId();
//更新工作人员组织关系
String customerId = staffList.get(NumConstant.ZERO).getCustomerId();
dealBizDataForAbandon(customerId,formDTO.getGridId(),formDTO.getUserId(), staffList, updateList);
dealBizDataForAbandon(customerId,gridId, staffList, updateList);
//清空工作人员缓存
staffList.forEach(staff->CustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId()));

Loading…
Cancel
Save