|
|
@ -984,15 +984,15 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
} |
|
|
|
|
|
|
|
//可以弃用、处理数据(网格工作人员所属关系(网格工作人员人数), 删除正在审核中的徽章认证)
|
|
|
|
this.abandonGridForDealBizData(formDTO.getGridId()); |
|
|
|
this.abandonGridForDealBizData(formDTO); |
|
|
|
CustomerOrgRedis.delGridInfo(formDTO.getGridId()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void abandonGridForDealBizData(String gridId) { |
|
|
|
public void abandonGridForDealBizData(AbandonGridFormDTO formDTO) { |
|
|
|
try { |
|
|
|
//根据网格id 获取网格内工作人员及其添加关系
|
|
|
|
List<StaffOrgRelationDTO> staffList = customerStaffGridDao.getGridStaffList(gridId); |
|
|
|
List<StaffOrgRelationDTO> staffList = customerStaffGridDao.getGridStaffList(formDTO.getGridId()); |
|
|
|
if (staffList == null){ |
|
|
|
staffList = new ArrayList<>(); |
|
|
|
} |
|
|
@ -1017,7 +1017,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
}); |
|
|
|
String customerId = loginUserUtil.getLoginUserCustomerId(); |
|
|
|
//更新工作人员组织关系
|
|
|
|
dealBizDataForAbandon(customerId,gridId, staffList, updateList); |
|
|
|
dealBizDataForAbandon(customerId,formDTO.getGridId(),formDTO.getUserId(), staffList, updateList); |
|
|
|
//清空工作人员缓存
|
|
|
|
staffList.forEach(staff->CustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId())); |
|
|
|
|
|
|
@ -1028,7 +1028,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
|
|
|
|
} |
|
|
|
@Transactional |
|
|
|
public void dealBizDataForAbandon(String customerId, String gridId, List<StaffOrgRelationDTO> staffList, List<StaffOrgRelationEntity> updateList) { |
|
|
|
public void dealBizDataForAbandon(String customerId, String gridId, String userId,List<StaffOrgRelationDTO> staffList, List<StaffOrgRelationEntity> updateList) { |
|
|
|
//1.删除工作人员与网格的关系
|
|
|
|
LambdaQueryWrapper<CustomerStaffGridEntity> updateWrapper = new LambdaQueryWrapper<>(); |
|
|
|
updateWrapper.eq(CustomerStaffGridEntity::getGridId,gridId); |
|
|
@ -1050,6 +1050,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
//处理成功,隐藏网格
|
|
|
|
LambdaUpdateWrapper<CustomerGridEntity> updateGrid=new LambdaUpdateWrapper<>(); |
|
|
|
updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ONE); |
|
|
|
updateGrid.set(CustomerGridEntity::getUpdatedBy,userId); |
|
|
|
updateGrid.set(CustomerGridEntity::getUpdatedTime,new Date()); |
|
|
|
updateGrid.eq(CustomerGridEntity::getId,gridId); |
|
|
|
baseDao.update(null,updateGrid); |
|
|
|
} |
|
|
|