合同档案表,员工档案表,咨询档案表,客诉档案表修改借阅状态默认值和归档状态默认值及新增字段立档单位ID 库房ID 案柜ID.修改修改归档表file_type字段大小,修改借阅模块后通过申请报错.串通电子档案-归档-鉴定-移交-借阅

new
parent 55f91ca50c
commit f8a58b52f5

@ -0,0 +1,55 @@
--
alter table ea_electronic_contracts alter column borrow_status set default 2;
alter table ea_electronic_contracts alter column file_status set default 0;
--
alter table ea_electronic_employee alter column borrow_status set default 2;
alter table ea_electronic_employee alter column file_status set default 0;
--
alter table ea_electronic_assets alter column borrow_status set default 2;
alter table ea_electronic_assets alter column file_status set default 0;
--
alter table electronic_consultation alter column borrow_status set default 2;
alter table electronic_consultation alter column file_status set default 0;
--
alter table electronic_customer_complaint alter column borrow_status set default 2;
alter table electronic_customer_complaint alter column file_status set default 0;
-- file_type
ALTER TABLE archives_record MODIFY COLUMN file_type VARCHAR(64) COMMENT '';
-- ID ID ID
ALTER TABLE ea_electronic_assets ADD COLUMN `organization_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE ea_electronic_assets ADD COLUMN `depot_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE ea_electronic_assets ADD COLUMN `cabinet_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
-- ID ID ID
ALTER TABLE ea_electronic_contracts ADD COLUMN `organization_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE ea_electronic_contracts ADD COLUMN `depot_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE ea_electronic_contracts ADD COLUMN `cabinet_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
-- ID ID ID
ALTER TABLE ea_electronic_employee ADD COLUMN `organization_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE ea_electronic_employee ADD COLUMN `depot_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE ea_electronic_employee ADD COLUMN `cabinet_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
-- ID ID ID
ALTER TABLE electronic_consultation ADD COLUMN `organization_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE electronic_consultation ADD COLUMN `depot_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE electronic_consultation ADD COLUMN `cabinet_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
-- ID ID ID
ALTER TABLE electronic_customer_complaint ADD COLUMN `organization_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE electronic_customer_complaint ADD COLUMN `depot_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
ALTER TABLE electronic_customer_complaint ADD COLUMN `cabinet_id` bigint(20) NULL DEFAULT NULL COMMENT 'ID';
--
ALTER TABLE archives_borrow_apply ADD COLUMN `file_type` varchar(64) NULL DEFAULT NULL COMMENT '';
ALTER TABLE archives_borrow_apply ADD COLUMN `site` varchar(64) NULL DEFAULT NULL COMMENT '';
ALTER TABLE archives_borrow_apply ADD COLUMN `files_num` varchar(64) NULL DEFAULT NULL COMMENT '';

@ -66,15 +66,12 @@ public class BorrowApplyBaseVO {
private Long recordId;
@Schema(description = "档案类型", example = "档案类型")
@TableField(exist = false)
private String fileType;
@Schema(description = "档案位置", example = "档案位置")
@TableField(exist = false)
private String site;
@Schema(description = "案卷号", example = "案卷号")
@TableField(exist = false)
private String filesNum;

@ -62,7 +62,17 @@ public class BorrowApplyExcelVO {
@ExcelProperty("描述")
private String remark;
@ExcelProperty("创建日期")
@Schema(description = "档案id", example = "档案id")
private Long recordId;
private LocalDateTime createTime;
@Schema(description = "档案类型", example = "档案类型")
private String fileType;
@Schema(description = "档案位置", example = "档案位置")
private String site;
@Schema(description = "案卷号", example = "案卷号")
private String filesNum;
}

@ -60,4 +60,16 @@ public class BorrowApplyExportReqVO {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "档案id", example = "档案id")
private Long recordId;
@Schema(description = "档案类型", example = "档案类型")
private String fileType;
@Schema(description = "档案位置", example = "档案位置")
private String site;
@Schema(description = "案卷号", example = "案卷号")
private String filesNum;
}

@ -79,4 +79,6 @@ public class BorrowApplyPageReqVO extends PageParam {
@Schema(description = "判断调用历史接口还是新增列表接口", example = "判断调用历史接口还是新增列表接口")
private String historyOrList;
}

@ -94,19 +94,16 @@ public class BorrowApplyDO extends BaseDO {
/**
*
*/
@TableField(exist = false)
private String fileType;
/**
*
*/
@TableField(exist = false)
private String site;
/**
*
*/
@TableField(exist = false)
private String filesNum;

@ -81,9 +81,9 @@ public interface RecordMapper extends BaseMapperX<RecordDO> {
.eqIfPresent(RecordDO::getAttr3, reqVO.getAttr3())
.eqIfPresent(RecordDO::getAttr4, reqVO.getAttr4())
.eqIfPresent(RecordDO::getUserId, reqVO.getUserId())
.eq(RecordDO::getIdentifyStatus,0)
.eqIfPresent(RecordDO::getCreateBy, reqVO.getCreateBy())
.orderByDesc(RecordDO::getId)
.isNull(RecordDO::getIdentifyStatus));
.orderByDesc(RecordDO::getId));
}
default List<RecordDO> selectList(RecordExportReqVO reqVO) {

@ -66,7 +66,8 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
RecordDO record = recordService.getRecord(borrowApply.getRecordId());
BeanUtils.copyProperties(record,recordUpdateReqVO);
if (StringUtils.isNotNull(updateReqVO.getBorrowState())){
// 新增时这里的借阅状态是null 所以加个判断区分 修改和借阅申请与驳回
if (StringUtils.isNotNull(recordUpdateReqVO.getBorrowStatus())){
//驳回状态处理
if (updateReqVO.getBorrowState().equals("1")){
recordUpdateReqVO.setBorrowStatus(updateReqVO.getBorrowState());

@ -29,6 +29,12 @@
<version>1.7.3-snapshot</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-setting-biz</artifactId>
<version>1.7.3-snapshot</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

@ -91,4 +91,14 @@ public class ElectronicAssetsBaseVO {
@Schema(description = "制单人")
private String createBy;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -94,4 +94,12 @@ public class ElectronicAssetsExcelVO {
@ExcelProperty("制单人")
private String createBy;
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -90,4 +90,13 @@ public class ElectronicAssetsExportReqVO {
@Schema(description = "制单人")
private String createBy;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -92,4 +92,13 @@ public class ElectronicAssetsPageReqVO extends PageParam {
@Schema(description = "制单人")
private String createBy;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -78,4 +78,13 @@ public class ElectronicConsultationBaseVO {
@Schema(description = "归档状态", example = "2")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -81,4 +81,13 @@ public class ElectronicConsultationExcelVO {
@ExcelProperty("归档状态")
private String fileStatus;
@ExcelProperty("立档单位ID")
private Long organizationId;
@ExcelProperty( "库房ID")
private Long depotId;
@ExcelProperty( "档案柜ID")
private Long cabinetId;
}

@ -79,4 +79,13 @@ public class ElectronicConsultationExportReqVO {
private Long recordId;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -79,4 +79,13 @@ public class ElectronicConsultationPageReqVO extends PageParam {
@Schema(description = "归档状态", example = "2")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -91,4 +91,13 @@ public class ElectronicContractsBaseVO {
@Schema(description = "归档状态", example = "1")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -99,4 +99,13 @@ public class ElectronicContractsExcelVO {
@ExcelProperty("归档状态")
private String fileStatus;
@ExcelProperty("立档单位ID")
private Long organizationId;
@ExcelProperty("库房ID")
private Long depotId;
@ExcelProperty("档案柜ID")
private Long cabinetId;
}

@ -98,4 +98,13 @@ public class ElectronicContractsExportReqVO {
@Schema(description = "归档状态", example = "1")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -100,4 +100,13 @@ public class ElectronicContractsPageReqVO extends PageParam {
@Schema(description = "归档状态", example = "1")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -78,4 +78,13 @@ public class ElectronicCustomerComplaintBaseVO {
@Schema(description = "归档状态", example = "2")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -81,4 +81,13 @@ public class ElectronicCustomerComplaintExcelVO {
@ExcelProperty("归档状态")
private String fileStatus;
@ExcelProperty("立档单位ID")
private Long organizationId;
@ExcelProperty("库房ID")
private Long depotId;
@ExcelProperty("档案柜ID")
private Long cabinetId;
}

@ -77,4 +77,13 @@ public class ElectronicCustomerComplaintExportReqVO {
@Schema(description = "归档状态", example = "2")
private String fileStatus;
private Long recordId;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -79,4 +79,13 @@ public class ElectronicCustomerComplaintPageReqVO extends PageParam {
@Schema(description = "归档状态", example = "2")
private String fileStatus;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -141,5 +141,14 @@ public class ElectronicEmployeeBaseVO {
@Schema(description = "特长")
private String personalDescription;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.ea.controller.admin.electronicemployee.vo;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@ -66,4 +67,13 @@ public class ElectronicEmployeeExcelVO {
@ExcelProperty("归档状态")
private String fileStatus;
@ExcelProperty("立档单位ID")
private Long organizationId;
@ExcelProperty("库房ID")
private Long depotId;
@ExcelProperty("档案柜ID")
private Long cabinetId;
}

@ -63,4 +63,13 @@ public class ElectronicEmployeeExportReqVO {
@Schema(description = "归档状态", example = "2")
private String fileStatus;
private Long recordId;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -70,4 +70,13 @@ public class ElectronicEmployeePageReqVO extends PageParam {
@Schema(description = "薪酬")
private Long salary;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -74,4 +74,13 @@ public class ElectronicOtherBaseVO {
@Schema(description = "归档状态")
private String archiveState;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -82,4 +82,13 @@ public class ElectronicOtherExcelVO {
@ExcelProperty("归档状态")
private String archiveState;
@ExcelProperty("立档单位ID")
private Long organizationId;
@ExcelProperty("库房ID")
private Long depotId;
@ExcelProperty("档案柜ID")
private Long cabinetId;
}

@ -77,4 +77,13 @@ public class ElectronicOtherExportReqVO {
@Schema(description = "归档状态")
private String archiveState;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -79,4 +79,13 @@ public class ElectronicOtherPageReqVO extends PageParam {
@Schema(description = "归档状态")
private String archiveState;
@Schema(description = "立档单位ID")
private Long organizationId;
@Schema(description = "库房ID")
private Long depotId;
@Schema(description = "档案柜ID")
private Long cabinetId;
}

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.ea.dal.dataobject.electronicassets;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
@ -122,5 +123,17 @@ public class ElectronicAssetsDO extends BaseDO {
*
*/
private String createBy;
/**
* ID
*/
private Long organizationId;
/**
* ID
*/
private Long depotId;
/**
* ID
*/
private Long cabinetId;
}

@ -130,4 +130,17 @@ public class ElectronicConsultationDO extends BaseDO {
*/
private String fileStatus;
/**
* ID
*/
private Long organizationId;
/**
* ID
*/
private Long depotId;
/**
* ID
*/
private Long cabinetId;
}

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.ea.dal.dataobject.electroniccontracts;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDate;
@ -128,5 +129,16 @@ public class ElectronicContractsDO extends BaseDO {
*
*/
private String fileStatus;
/**
* ID
*/
private Long organizationId;
/**
* ID
*/
private Long depotId;
/**
* ID
*/
private Long cabinetId;
}

@ -126,4 +126,17 @@ public class ElectronicCustomerComplaintDO extends BaseDO {
*/
private String fileStatus;
/**
* ID
*/
private Long organizationId;
/**
* ID
*/
private Long depotId;
/**
* ID
*/
private Long cabinetId;
}

@ -222,4 +222,17 @@ public class ElectronicEmployeeDO extends BaseDO {
*/
private String fileStatus;
/**
* ID
*/
private Long organizationId;
/**
* ID
*/
private Long depotId;
/**
* ID
*/
private Long cabinetId;
}

@ -108,4 +108,17 @@ public class ElectronicOtherDO extends BaseDO {
*/
private String archiveState;
/**
* ID
*/
private Long organizationId;
/**
* ID
*/
private Long depotId;
/**
* ID
*/
private Long cabinetId;
}

@ -1,5 +1,15 @@
package cn.iocoder.yudao.module.ea.service.electronicassets;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -27,10 +37,45 @@ public class ElectronicAssetsServiceImpl implements ElectronicAssetsService {
@Resource
private ElectronicAssetsMapper electronicAssetsMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createElectronicAssets(ElectronicAssetsCreateReqVO createReqVO) {
// 插入
ElectronicAssetsDO electronicAssets = ElectronicAssetsConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId();
Long depotId = createReqVO.getDepotId();
Long cabinetId = createReqVO.getCabinetId();
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
DepotDO depotDO = depotMapper.selectById(depotId);
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
String position="";
if (organizationDO != null){
position=position+organizationDO.getOrganizationName();
if (depotDO != null){
position=position+"/"+depotDO.getName();
if (depotCabinetDO != null){
position= position+"/"+depotCabinetDO.getName();
}else {
position= position+"/默认档案柜";
}
}else {
position=position+"/默认库房/默认档案柜";
}
}
electronicAssets.setPosition(position);
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
electronicAssets.setCreateBy(adminUserDO.getUsername());
electronicAssetsMapper.insert(electronicAssets);
// 返回
return electronicAssets.getId();

@ -1,5 +1,15 @@
package cn.iocoder.yudao.module.ea.service.electronicconsultation;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -27,10 +37,45 @@ public class ElectronicConsultationServiceImpl implements ElectronicConsultation
@Resource
private ElectronicConsultationMapper electronicConsultationMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createElectronicConsultation(ElectronicConsultationCreateReqVO createReqVO) {
// 插入
ElectronicConsultationDO electronicConsultation = ElectronicConsultationConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId();
Long depotId = createReqVO.getDepotId();
Long cabinetId = createReqVO.getCabinetId();
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
DepotDO depotDO = depotMapper.selectById(depotId);
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
String position="";
if (organizationDO != null){
position=position+organizationDO.getOrganizationName();
if (depotDO != null){
position=position+"/"+depotDO.getName();
if (depotCabinetDO != null){
position= position+"/"+depotCabinetDO.getName();
}else {
position= position+"/默认档案柜";
}
}else {
position=position+"/默认库房/默认档案柜";
}
}
electronicConsultation.setPosition(position);
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
electronicConsultation.setCreateBy(adminUserDO.getUsername());
electronicConsultationMapper.insert(electronicConsultation);
// 返回
return electronicConsultation.getId();

@ -1,5 +1,15 @@
package cn.iocoder.yudao.module.ea.service.electroniccontracts;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -27,10 +37,45 @@ public class ElectronicContractsServiceImpl implements ElectronicContractsServic
@Resource
private ElectronicContractsMapper electronicContractsMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createElectronicContracts(ElectronicContractsCreateReqVO createReqVO) {
// 插入
ElectronicContractsDO electronicContracts = ElectronicContractsConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId();
Long depotId = createReqVO.getDepotId();
Long cabinetId = createReqVO.getCabinetId();
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
DepotDO depotDO = depotMapper.selectById(depotId);
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
String position="";
if (organizationDO != null){
position=position+organizationDO.getOrganizationName();
if (depotDO != null){
position=position+"/"+depotDO.getName();
if (depotCabinetDO != null){
position= position+"/"+depotCabinetDO.getName();
}else {
position= position+"/默认档案柜";
}
}else {
position=position+"/默认库房/默认档案柜";
}
}
electronicContracts.setPosition(position);
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
electronicContracts.setCreateBy(adminUserDO.getUsername());
electronicContractsMapper.insert(electronicContracts);
// 返回
return electronicContracts.getId();

@ -1,5 +1,15 @@
package cn.iocoder.yudao.module.ea.service.electroniccustomercomplaint;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -27,10 +37,45 @@ public class ElectronicCustomerComplaintServiceImpl implements ElectronicCustome
@Resource
private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createElectronicCustomerComplaint(ElectronicCustomerComplaintCreateReqVO createReqVO) {
// 插入
ElectronicCustomerComplaintDO electronicCustomerComplaint = ElectronicCustomerComplaintConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId();
Long depotId = createReqVO.getDepotId();
Long cabinetId = createReqVO.getCabinetId();
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
DepotDO depotDO = depotMapper.selectById(depotId);
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
String position="";
if (organizationDO != null){
position=position+organizationDO.getOrganizationName();
if (depotDO != null){
position=position+"/"+depotDO.getName();
if (depotCabinetDO != null){
position= position+"/"+depotCabinetDO.getName();
}else {
position= position+"/默认档案柜";
}
}else {
position=position+"/默认库房/默认档案柜";
}
}
electronicCustomerComplaint.setPosition(position);
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
electronicCustomerComplaint.setCreateBy(adminUserDO.getUsername());
electronicCustomerComplaintMapper.insert(electronicCustomerComplaint);
// 返回
return electronicCustomerComplaint.getId();

@ -1,5 +1,15 @@
package cn.iocoder.yudao.module.ea.service.electronicemployee;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -26,11 +36,45 @@ public class ElectronicEmployeeServiceImpl implements ElectronicEmployeeService
@Resource
private ElectronicEmployeeMapper electronicEmployeeMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createElectronicEmployee(ElectronicEmployeeCreateReqVO createReqVO) {
// 插入
ElectronicEmployeeDO electronicEmployee = ElectronicEmployeeConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId();
Long depotId = createReqVO.getDepotId();
Long cabinetId = createReqVO.getCabinetId();
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
DepotDO depotDO = depotMapper.selectById(depotId);
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
String position="";
if (organizationDO != null){
position=position+organizationDO.getOrganizationName();
if (depotDO != null){
position=position+"/"+depotDO.getName();
if (depotCabinetDO != null){
position= position+"/"+depotCabinetDO.getName();
}else {
position= position+"/默认档案柜";
}
}else {
position=position+"/默认库房/默认档案柜";
}
}
electronicEmployee.setPosition(position);
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
electronicEmployee.setCreateBy(adminUserDO.getUsername());
electronicEmployeeMapper.insert(electronicEmployee);
// 返回
return electronicEmployee.getId();

@ -1,5 +1,15 @@
package cn.iocoder.yudao.module.ea.service.electronicother;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -27,10 +37,45 @@ public class ElectronicOtherServiceImpl implements ElectronicOtherService {
@Resource
private ElectronicOtherMapper electronicOtherMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createElectronicOther(ElectronicOtherCreateReqVO createReqVO) {
// 插入
ElectronicOtherDO electronicOther = ElectronicOtherConvert.INSTANCE.convert(createReqVO);
Long organizationId = createReqVO.getOrganizationId();
Long depotId = createReqVO.getDepotId();
Long cabinetId = createReqVO.getCabinetId();
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
DepotDO depotDO = depotMapper.selectById(depotId);
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
String position="";
if (organizationDO != null){
position=position+organizationDO.getOrganizationName();
if (depotDO != null){
position=position+"/"+depotDO.getName();
if (depotCabinetDO != null){
position= position+"/"+depotCabinetDO.getName();
}else {
position= position+"/默认档案柜";
}
}else {
position=position+"/默认库房/默认档案柜";
}
}
electronicOther.setSource(position);
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
electronicOther.setCreateBy(adminUserDO.getUsername());
electronicOtherMapper.insert(electronicOther);
// 返回
return electronicOther.getId();

Loading…
Cancel
Save