diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyController.java index 27fd209a..1a483be6 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyController.java @@ -2,38 +2,32 @@ package cn.iocoder.yudao.module.company.controller.admin; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.common.CommonErrorCodeConstants; import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import cn.iocoder.yudao.module.company.entity.Company; +import cn.iocoder.yudao.module.company.service.CompanyService; +import cn.iocoder.yudao.module.company.vo.CompanyReqVO; import cn.iocoder.yudao.module.company.vo.CompanyRespVO; import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import cn.iocoder.yudao.module.company.vo.CompanyReqVO; -import io.swagger.v3.oas.annotations.Parameter; -import org.apache.commons.lang3.StringUtils; -import org.springframework.context.annotation.Lazy; -import org.springframework.web.bind.annotation.*; -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import cn.iocoder.yudao.module.company.service.CompanyService; +import org.springframework.context.annotation.Lazy; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; @@ -43,6 +37,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + /** * 企业信息表(每个租户的下属企业信息);(dl_company)表控制层 * @@ -198,4 +196,23 @@ public class CompanyController { } return success(companyService.getById(dept.getCorpId())); } + + /** + * 查某租户下某个业务系统的企业信息 + * @author vinjor-M + * @date 15:08 2024/11/15 + * @param tenantId 租户ID + * @param systemCode 系统标识 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @GetMapping("/getCompanyByTenantId") + @Operation(summary = "查某租户下某个业务系统的企业信息") + public CommonResult getCompanyByTenantId(String tenantId,String systemCode){ + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() + .eq(TenantBaseDO::getTenantId,tenantId) + .like(Company::getServiceCodes,systemCode) + .orderByDesc(BaseDO::getCreateTime); + List list = this.companyService.list(queryWrapper); + return success(list.isEmpty()?null:list.get(0)); + } } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java index 08d61e7d..acbd50cc 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java @@ -30,6 +30,9 @@ public class Company extends TenantBaseDO { /** 企业名称 */ @ExcelProperty("企业名称") private String corpName ; + /** 企业简称 */ + @ExcelProperty("企业简称") + private String simpleName ; /** 统一社会信用代码 */ @ExcelProperty("统一社会信用代码") private String orgCard ; diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 38c0080e..2c080f98 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -852,6 +852,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl