Merge branch 'repair' of http://122.51.230.86:3000/dianliang/lanan-system into repair
This commit is contained in:
commit
01f5aa9017
@ -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<Company> queryWrapper = new LambdaQueryWrapper<Company>()
|
||||
.eq(TenantBaseDO::getTenantId,tenantId)
|
||||
.like(Company::getServiceCodes,systemCode)
|
||||
.orderByDesc(BaseDO::getCreateTime);
|
||||
List<Company> list = this.companyService.list(queryWrapper);
|
||||
return success(list.isEmpty()?null:list.get(0));
|
||||
}
|
||||
}
|
@ -30,6 +30,9 @@ public class Company extends TenantBaseDO {
|
||||
/** 企业名称 */
|
||||
@ExcelProperty("企业名称")
|
||||
private String corpName ;
|
||||
/** 企业简称 */
|
||||
@ExcelProperty("企业简称")
|
||||
private String simpleName ;
|
||||
/** 统一社会信用代码 */
|
||||
@ExcelProperty("统一社会信用代码")
|
||||
private String orgCard ;
|
||||
|
@ -852,6 +852,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
String userRoleCode = getUserRole();
|
||||
if (userRoleCode.equals(RepairRoleEnum.ADMIN.getCode())) {
|
||||
//维修管理员看所有数据
|
||||
}else if (userRoleCode.equals(RepairRoleEnum.WAREHOUSE.getCode())) {
|
||||
//仓管看到所有数据
|
||||
} else if (userRoleCode.equals(RepairRoleEnum.INSPECTION.getCode())) {
|
||||
//总检
|
||||
if (RepairCons.TICKETS_WAITING.equals(repairTicketsReqVO.getSelectType())) {
|
||||
|
Loading…
Reference in New Issue
Block a user