Browse Source

废弃字段 integer

dev
jianjun 3 years ago
parent
commit
cfce2fd884
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java
  3. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java

@ -154,5 +154,5 @@ public class CustomerGridDTO implements Serializable {
/**
* 弃用1正常使用0
*/
private Boolean abandonFlag;
private Integer abandonFlag;
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java

@ -113,5 +113,5 @@ public class CustomerGridEntity extends BaseEpmetEntity {
/**
* 弃用1正常使用0
*/
private Boolean abandonFlag;
private Integer abandonFlag;
}

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

@ -1015,7 +1015,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
});
//更新工作人员组织关系
String customerId = staffList.get(NumConstant.ZERO).getCustomerId();
updateGridStaff2Agency(customerId,gridId, staffList, updateList);
dealBizDataForAbandon(customerId,gridId, staffList, updateList);
//清空工作人员缓存
staffList.forEach(staff->CustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId()));
@ -1026,7 +1026,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
}
@Transactional
public void updateGridStaff2Agency(String customerId, String gridId, List<StaffOrgRelationDTO> staffList, List<StaffOrgRelationEntity> updateList) {
public void dealBizDataForAbandon(String customerId, String gridId, List<StaffOrgRelationDTO> staffList, List<StaffOrgRelationEntity> updateList) {
//1.删除工作人员与网格的关系
LambdaQueryWrapper<CustomerStaffGridEntity> updateWrapper = new LambdaQueryWrapper<>();
updateWrapper.eq(CustomerStaffGridEntity::getGridId,gridId);
@ -1037,7 +1037,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
});
//网格对应的人数减少
long reduceCount = NumConstant.ZERO - staffList.stream().map(StaffOrgRelationDTO::getStaffId).distinct().count();
log.debug("updateGridStaff2Agency gridId:{} reduceCount:{}",gridId, reduceCount);
log.debug("dealBizDataForAbandon gridId:{} reduceCount:{}",gridId, reduceCount);
customerGridDao.updateTotalUser(gridId, reduceCount);
//删除正在审核中的徽章认证
Result<Integer> badgeResult = epmetUserFeignClient.deleteBadgeCertificateAuditing(customerId,gridId);
@ -1047,7 +1047,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
//处理成功,隐藏网格
LambdaUpdateWrapper<CustomerGridEntity> updateGrid=new LambdaUpdateWrapper<>();
updateGrid.set(CustomerGridEntity::getAbandonFlag,true);
updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ZERO);
updateGrid.eq(CustomerGridEntity::getId,gridId);
baseDao.update(null,updateGrid);
}

Loading…
Cancel
Save