diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicconsultation/vo/ElectronicConsultationUpdateReqVO.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicconsultation/vo/ElectronicConsultationUpdateReqVO.java index 1c096efa..edf808af 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicconsultation/vo/ElectronicConsultationUpdateReqVO.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicconsultation/vo/ElectronicConsultationUpdateReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -15,4 +16,8 @@ public class ElectronicConsultationUpdateReqVO extends ElectronicConsultationBas @NotNull(message = "主键 不能为空") private Long id; + @Schema(description = "部门Id", example = "部门Id") + @TableField(exist = false) + private Long deptId; + } diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electroniccustomercomplaint/vo/ElectronicCustomerComplaintUpdateReqVO.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electroniccustomercomplaint/vo/ElectronicCustomerComplaintUpdateReqVO.java index 72caa89d..26230135 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electroniccustomercomplaint/vo/ElectronicCustomerComplaintUpdateReqVO.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electroniccustomercomplaint/vo/ElectronicCustomerComplaintUpdateReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -15,4 +16,8 @@ public class ElectronicCustomerComplaintUpdateReqVO extends ElectronicCustomerCo @NotNull(message = "主键不能为空") private Long id; + @Schema(description = "部门Id", example = "部门Id") + @TableField(exist = false) + private Long deptId; + } diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicemployee/vo/ElectronicEmployeeUpdateReqVO.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicemployee/vo/ElectronicEmployeeUpdateReqVO.java index 339012fb..48a14b4f 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicemployee/vo/ElectronicEmployeeUpdateReqVO.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/controller/admin/electronicemployee/vo/ElectronicEmployeeUpdateReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.ea.controller.admin.electronicemployee.vo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; @@ -94,4 +95,8 @@ public class ElectronicEmployeeUpdateReqVO extends ElectronicEmployeeBaseVO { @Schema(description = "特长", example = "你说的对") private String personalDescription; + @Schema(description = "部门Id", example = "部门Id") + @TableField(exist = false) + private Long deptId; + } diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicassets/ElectronicAssetsServiceImpl.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicassets/ElectronicAssetsServiceImpl.java index e1af8706..6bfc71eb 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicassets/ElectronicAssetsServiceImpl.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicassets/ElectronicAssetsServiceImpl.java @@ -63,6 +63,15 @@ public class ElectronicAssetsServiceImpl implements ElectronicAssetsService { public void updateElectronicAssets(ElectronicAssetsUpdateReqVO updateReqVO) { // 校验存在 validateElectronicAssetsExists(updateReqVO.getId()); + //更新业务类型以及部门 + GetPositionUtils getPositionUtils = new GetPositionUtils(); + + GetPositionDo positionDo = getPositionUtils.getPosition( + updateReqVO.getOrganizationId(), updateReqVO.getDepotId(), updateReqVO.getCabinetId(), updateReqVO.getDeptId()); + + updateReqVO.setPosition(positionDo.getPosition()) + .setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName()); + // 更新 ElectronicAssetsDO updateObj = ElectronicAssetsConvert.INSTANCE.convert(updateReqVO); electronicAssetsMapper.updateById(updateObj); diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicconsultation/ElectronicConsultationServiceImpl.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicconsultation/ElectronicConsultationServiceImpl.java index 3715ca9f..d0fcca8b 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicconsultation/ElectronicConsultationServiceImpl.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicconsultation/ElectronicConsultationServiceImpl.java @@ -62,6 +62,15 @@ public class ElectronicConsultationServiceImpl implements ElectronicConsultation public void updateElectronicConsultation(ElectronicConsultationUpdateReqVO updateReqVO) { // 校验存在 validateElectronicConsultationExists(updateReqVO.getId()); + //更新业务类型以及部门 + GetPositionUtils getPositionUtils = new GetPositionUtils(); + + GetPositionDo positionDo = getPositionUtils.getPosition( + updateReqVO.getOrganizationId(), updateReqVO.getDepotId(), updateReqVO.getCabinetId(), updateReqVO.getDeptId()); + + updateReqVO.setPosition(positionDo.getPosition()) + .setCreateBy(positionDo.getCreateBy()).setSystemDept(positionDo.getDeptName()); + // 更新 ElectronicConsultationDO updateObj = ElectronicConsultationConvert.INSTANCE.convert(updateReqVO); electronicConsultationMapper.updateById(updateObj); diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccontracts/ElectronicContractsServiceImpl.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccontracts/ElectronicContractsServiceImpl.java index cd2e8a30..55c1de08 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccontracts/ElectronicContractsServiceImpl.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccontracts/ElectronicContractsServiceImpl.java @@ -63,6 +63,15 @@ public class ElectronicContractsServiceImpl implements ElectronicContractsServic public void updateElectronicContracts(ElectronicContractsUpdateReqVO updateReqVO) { // 校验存在 validateElectronicContractsExists(updateReqVO.getId()); + //更新业务类型以及部门 + GetPositionUtils getPositionUtils = new GetPositionUtils(); + + GetPositionDo positionDo = getPositionUtils.getPosition( + updateReqVO.getOrganizationId(), updateReqVO.getDepotId(), updateReqVO.getCabinetId(), updateReqVO.getDeptId()); + + updateReqVO.setPosition(positionDo.getPosition()) + .setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName()); + // 更新 ElectronicContractsDO updateObj = ElectronicContractsConvert.INSTANCE.convert(updateReqVO); electronicContractsMapper.updateById(updateObj); diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccustomercomplaint/ElectronicCustomerComplaintServiceImpl.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccustomercomplaint/ElectronicCustomerComplaintServiceImpl.java index 879c8b9a..da763286 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccustomercomplaint/ElectronicCustomerComplaintServiceImpl.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electroniccustomercomplaint/ElectronicCustomerComplaintServiceImpl.java @@ -60,6 +60,13 @@ public class ElectronicCustomerComplaintServiceImpl implements ElectronicCustome public void updateElectronicCustomerComplaint(ElectronicCustomerComplaintUpdateReqVO updateReqVO) { // 校验存在 validateElectronicCustomerComplaintExists(updateReqVO.getId()); + //更新业务类型以及部门 + GetPositionUtils getPositionUtils = new GetPositionUtils(); + GetPositionDo positionDo = getPositionUtils.getPosition( + updateReqVO.getOrganizationId(), updateReqVO.getDepotId(), updateReqVO.getCabinetId(), updateReqVO.getDeptId()); + + updateReqVO.setPosition(positionDo.getPosition()) + .setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName()); // 更新 ElectronicCustomerComplaintDO updateObj = ElectronicCustomerComplaintConvert.INSTANCE.convert(updateReqVO); electronicCustomerComplaintMapper.updateById(updateObj); diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicemployee/ElectronicEmployeeServiceImpl.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicemployee/ElectronicEmployeeServiceImpl.java index 7f2ef73a..37ccff32 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicemployee/ElectronicEmployeeServiceImpl.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicemployee/ElectronicEmployeeServiceImpl.java @@ -60,6 +60,15 @@ public class ElectronicEmployeeServiceImpl implements ElectronicEmployeeService public void updateElectronicEmployee(ElectronicEmployeeUpdateReqVO updateReqVO) { // 校验存在 validateElectronicEmployeeExists(updateReqVO.getId()); + //更新业务类型以及部门 + GetPositionUtils getPositionUtils = new GetPositionUtils(); + + GetPositionDo positionDo = getPositionUtils.getPosition( + updateReqVO.getOrganizationId(), updateReqVO.getDepotId(), updateReqVO.getCabinetId(), updateReqVO.getDeptId()); + + updateReqVO.setPosition(positionDo.getPosition()) + .setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName()); + // 更新 ElectronicEmployeeDO updateObj = ElectronicEmployeeConvert.INSTANCE.convert(updateReqVO); electronicEmployeeMapper.updateById(updateObj); diff --git a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicother/ElectronicOtherServiceImpl.java b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicother/ElectronicOtherServiceImpl.java index ae791b95..0049e8b3 100644 --- a/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicother/ElectronicOtherServiceImpl.java +++ b/yudao-module-electronic/yudao-module-ea-biz/src/main/java/cn/iocoder/yudao/module/ea/service/electronicother/ElectronicOtherServiceImpl.java @@ -60,6 +60,14 @@ public class ElectronicOtherServiceImpl implements ElectronicOtherService { public void updateElectronicOther(ElectronicOtherUpdateReqVO updateReqVO) { // 校验存在 validateElectronicOtherExists(updateReqVO.getId()); + //更新业务类型以及部门 + GetPositionUtils getPositionUtils = new GetPositionUtils(); + + GetPositionDo positionDo = getPositionUtils.getPosition( + updateReqVO.getOrganizationId(), updateReqVO.getDepotId(), updateReqVO.getCabinetId(), updateReqVO.getDeptId()); + + updateReqVO.setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName()); + // 更新 ElectronicOtherDO updateObj = ElectronicOtherConvert.INSTANCE.convert(updateReqVO); electronicOtherMapper.updateById(updateObj);