合同,员工,客诉,咨询,资产档案新增部门名称

new
parent e7db84d542
commit 6af0da03bb

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo; package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -11,4 +12,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ElectronicConsultationCreateReqVO extends ElectronicConsultationBaseVO { public class ElectronicConsultationCreateReqVO extends ElectronicConsultationBaseVO {
@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; package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -11,4 +12,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ElectronicCustomerComplaintCreateReqVO extends ElectronicCustomerComplaintBaseVO { public class ElectronicCustomerComplaintCreateReqVO extends ElectronicCustomerComplaintBaseVO {
@Schema(description = "部门Id", example = "部门Id")
@TableField(exist = false)
private Long deptId;
} }

@ -1,10 +1,13 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicemployee.vo; package cn.iocoder.yudao.module.ea.controller.admin.electronicemployee.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*; import lombok.*;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.*; import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.experimental.Accessors;
import javax.validation.constraints.*; import javax.validation.constraints.*;
/** /**
@ -97,4 +100,8 @@ public class ElectronicEmployeeCreateReqVO extends ElectronicEmployeeBaseVO {
@Schema(description = "特长", example = "你说的对") @Schema(description = "特长", example = "你说的对")
private String personalDescription; private String personalDescription;
@Schema(description = "部门Id", example = "部门Id")
@TableField(exist = false)
private Long deptId;
} }

@ -1,7 +1,10 @@
package cn.iocoder.yudao.module.ea.service.electronicassets; package cn.iocoder.yudao.module.ea.service.electronicassets;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.ea.utils.common.GetElectronicDept;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -49,6 +52,10 @@ public class ElectronicAssetsServiceImpl implements ElectronicAssetsService {
@Override @Override
public Long createElectronicAssets(ElectronicAssetsCreateReqVO createReqVO) { public Long createElectronicAssets(ElectronicAssetsCreateReqVO createReqVO) {
if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
GetElectronicDept getElectronicDept = new GetElectronicDept();
createReqVO.setDeptName(getElectronicDept.getDeptName(createReqVO.getDeptId()));
}
// 插入 // 插入
ElectronicAssetsDO electronicAssets = ElectronicAssetsConvert.INSTANCE.convert(createReqVO); ElectronicAssetsDO electronicAssets = ElectronicAssetsConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId(); Long organizationId = createReqVO.getOrganizationId();

@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.ea.service.electronicconsultation; package cn.iocoder.yudao.module.ea.service.electronicconsultation;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.ea.utils.common.GetElectronicDept;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -49,6 +51,10 @@ public class ElectronicConsultationServiceImpl implements ElectronicConsultation
@Override @Override
public Long createElectronicConsultation(ElectronicConsultationCreateReqVO createReqVO) { public Long createElectronicConsultation(ElectronicConsultationCreateReqVO createReqVO) {
if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
GetElectronicDept getElectronicDept = new GetElectronicDept();
createReqVO.setSystemDept(getElectronicDept.getDeptName(createReqVO.getDeptId()));
}
// 插入 // 插入
ElectronicConsultationDO electronicConsultation = ElectronicConsultationConvert.INSTANCE.convert(createReqVO); ElectronicConsultationDO electronicConsultation = ElectronicConsultationConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId(); Long organizationId = createReqVO.getOrganizationId();

@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.ea.service.electroniccontracts; package cn.iocoder.yudao.module.ea.service.electroniccontracts;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.ea.utils.common.GetElectronicDept;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -49,6 +51,10 @@ public class ElectronicContractsServiceImpl implements ElectronicContractsServic
@Override @Override
public Long createElectronicContracts(ElectronicContractsCreateReqVO createReqVO) { public Long createElectronicContracts(ElectronicContractsCreateReqVO createReqVO) {
if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
GetElectronicDept getElectronicDept = new GetElectronicDept();
createReqVO.setDeptName(getElectronicDept.getDeptName(createReqVO.getDeptId()));
}
// 插入 // 插入
ElectronicContractsDO electronicContracts = ElectronicContractsConvert.INSTANCE.convert(createReqVO); ElectronicContractsDO electronicContracts = ElectronicContractsConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId(); Long organizationId = createReqVO.getOrganizationId();

@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.ea.service.electroniccustomercomplaint; package cn.iocoder.yudao.module.ea.service.electroniccustomercomplaint;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.ea.utils.common.GetElectronicDept;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -49,6 +51,10 @@ public class ElectronicCustomerComplaintServiceImpl implements ElectronicCustome
@Override @Override
public Long createElectronicCustomerComplaint(ElectronicCustomerComplaintCreateReqVO createReqVO) { public Long createElectronicCustomerComplaint(ElectronicCustomerComplaintCreateReqVO createReqVO) {
if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
GetElectronicDept getElectronicDept = new GetElectronicDept();
createReqVO.setDeptName(getElectronicDept.getDeptName(createReqVO.getDeptId()));
}
// 插入 // 插入
ElectronicCustomerComplaintDO electronicCustomerComplaint = ElectronicCustomerComplaintConvert.INSTANCE.convert(createReqVO); ElectronicCustomerComplaintDO electronicCustomerComplaint = ElectronicCustomerComplaintConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId(); Long organizationId = createReqVO.getOrganizationId();

@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.ea.service.electronicemployee; package cn.iocoder.yudao.module.ea.service.electronicemployee;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.ea.utils.common.GetElectronicDept;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -48,6 +50,10 @@ public class ElectronicEmployeeServiceImpl implements ElectronicEmployeeService
@Override @Override
public Long createElectronicEmployee(ElectronicEmployeeCreateReqVO createReqVO) { public Long createElectronicEmployee(ElectronicEmployeeCreateReqVO createReqVO) {
if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
GetElectronicDept getElectronicDept = new GetElectronicDept();
createReqVO.setDeptName(getElectronicDept.getDeptName(createReqVO.getDeptId()));
}
// 插入 // 插入
ElectronicEmployeeDO electronicEmployee = ElectronicEmployeeConvert.INSTANCE.convert(createReqVO); ElectronicEmployeeDO electronicEmployee = ElectronicEmployeeConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId(); Long organizationId = createReqVO.getOrganizationId();

@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.ea.service.electronicother; package cn.iocoder.yudao.module.ea.service.electronicother;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.ea.utils.common.GetElectronicDept;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -49,6 +51,10 @@ public class ElectronicOtherServiceImpl implements ElectronicOtherService {
@Override @Override
public Long createElectronicOther(ElectronicOtherCreateReqVO createReqVO) { public Long createElectronicOther(ElectronicOtherCreateReqVO createReqVO) {
if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
GetElectronicDept getElectronicDept = new GetElectronicDept();
createReqVO.setDeptName(getElectronicDept.getDeptName(createReqVO.getDeptId()));
}
// 插入 // 插入
ElectronicOtherDO electronicOther = ElectronicOtherConvert.INSTANCE.convert(createReqVO); ElectronicOtherDO electronicOther = ElectronicOtherConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId(); Long organizationId = createReqVO.getOrganizationId();

@ -0,0 +1,38 @@
package cn.iocoder.yudao.module.ea.utils.common;
import cn.hutool.extra.spring.SpringUtil;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper;
import cn.iocoder.yudao.module.system.service.dept.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
/**
*
*/
public class GetElectronicDept {
@Resource
private DeptService deptService = SpringUtil.getBean(DeptService.class);
/** Tree
* dept
* dept1
* dept2
* @param deptId
* @return
*/
public String getDeptName(Long deptId){
DeptDO dept = deptService.getDept(deptId);
if (dept.getParentId()==0){
return dept.getName();
}
DeptDO dept1 = deptService.getDept(dept.getParentId());
if (dept1.getParentId()==0){
return dept1.getName()+"/"+dept.getName();
}
DeptDO dept2 = deptService.getDept(dept1.getParentId());
return dept2.getName()+"/"+dept1.getName()+"/"+dept.getName();
}
}
Loading…
Cancel
Save