diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java index 1d1aca23e1..85f8d7fd34 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java @@ -11,4 +11,5 @@ import java.io.Serializable; public class AbandonGridFormDTO implements Serializable { @NotBlank(message = "网格id不能为空",groups = AddGroup.class) private String gridId; + private String userId; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java index 20c4dd4aef..8f026e9f44 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java @@ -235,7 +235,8 @@ public class GridController { */ @RequirePermission(requirePermission = RequirePermissionEnum.ORG_GRID_DELETE) @PostMapping("abandon") - public Result abandonGrid(@RequestBody AbandonGridFormDTO formDTO){ + public Result abandonGrid(@LoginUser TokenDto tokenDto,@RequestBody AbandonGridFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, AddGroup.class); customerGridService.abandonGrid(formDTO); return new Result(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java index 504555fbc7..c3ba7c1286 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java @@ -384,7 +384,7 @@ public interface CustomerGridService extends BaseService { /** * desc:移除网格内的工作人员关系 并迁移到组织 - * @param gridId + * @param formDTO */ - void abandonGridForDealBizData(String gridId); + void abandonGridForDealBizData(AbandonGridFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index 53d3242cfa..c337f989e3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -984,15 +984,15 @@ public class CustomerGridServiceImpl extends BaseServiceImpl staffList = customerStaffGridDao.getGridStaffList(gridId); + List staffList = customerStaffGridDao.getGridStaffList(formDTO.getGridId()); if (staffList == null){ staffList = new ArrayList<>(); } @@ -1017,7 +1017,7 @@ public class CustomerGridServiceImpl extends BaseServiceImplCustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId())); @@ -1028,7 +1028,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl staffList, List updateList) { + public void dealBizDataForAbandon(String customerId, String gridId, String userId,List staffList, List updateList) { //1.删除工作人员与网格的关系 LambdaQueryWrapper updateWrapper = new LambdaQueryWrapper<>(); updateWrapper.eq(CustomerStaffGridEntity::getGridId,gridId); @@ -1050,6 +1050,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl 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); }