修改时更新业务类型以及部门

new
cyl 1 year ago
parent 873c5668f8
commit 2b8ec69a9b

@ -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;
}

@ -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;
}

@ -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;
}

@ -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);

@ -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);

@ -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);

@ -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);

@ -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);

@ -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);

Loading…
Cancel
Save