报价单

new
Agoni 1 year ago
parent 6fc3a3587a
commit b8c337de51

@ -188,4 +188,7 @@ public class QuotationSheetDO extends TenantBaseDO {
private Integer biddingStatus;
private String money;
@TableField(exist = false)
private String tenantName;
}

@ -16,6 +16,8 @@ import cn.iocoder.yudao.module.bs.service.quotationsheetdetail.QuotationSheetDet
import cn.iocoder.yudao.module.bs.service.quotationsheetdetail.QuotationSheetDetailServiceImpl;
import cn.iocoder.yudao.module.bs.service.suppliercompany.SupplierCompanyService;
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
import cn.iocoder.yudao.module.system.api.tenant.TenantApi;
import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import com.alibaba.fastjson.JSON;
@ -78,6 +80,9 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl<QuotationSheet
@Resource
private DeptApi deptApi;
@Resource
private TenantApi tenantApi;
@Override
public Long createQuotationSheet(QuotationSheetCreateReqVO createReqVO) {
// 插入
@ -416,6 +421,14 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl<QuotationSheet
public PageResult<QuotationSheetDO> tendereeQuery(QuotationSheetPageReqVO pageVO) {
pageVO.setStatus(2);
PageResult<QuotationSheetDO> sheetDOPageResult = quotationSheetMapper.selectPages(pageVO);
if (sheetDOPageResult!=null&&sheetDOPageResult.getList().size()>0){
sheetDOPageResult.getList().forEach(s->{
TenantDTO tenant = tenantApi.getTenant(s.getTenantId());
if (null!=tenant){
s.setTenantName(tenant.getName());
}
});
}
return sheetDOPageResult;
}

@ -1,5 +1,7 @@
package cn.iocoder.yudao.module.system.api.tenant;
import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO;
import java.util.List;
/**
@ -23,4 +25,6 @@ public interface TenantApi {
*/
void validateTenant(Long id);
TenantDTO getTenant(Long id);
}

@ -0,0 +1,64 @@
package cn.iocoder.yudao.module.system.api.tenant.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class TenantDTO {
/**
* -
*/
public static final Long PACKAGE_ID_SYSTEM = 0L;
/**
*
*/
private Long id;
/**
*
*/
private String name;
/**
*
*
* {@link AdminUserDO#getId()}
*/
private Long contactUserId;
/**
*
*/
private String contactName;
/**
*
*/
private String contactMobile;
/**
*
*
* {@link CommonStatusEnum}
*/
private Integer status;
/**
*
*
* TODO
*/
private String domain;
/**
*
*
* {@link TenantPackageDO#getId()}
* 使使 {@link #PACKAGE_ID_SYSTEM}
*/
private Long packageId;
/**
*
*/
private LocalDateTime expireTime;
/**
*
*/
private Integer accountCount;
}

@ -1,6 +1,9 @@
package cn.iocoder.yudao.module.system.api.tenant;
import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO;
import cn.iocoder.yudao.module.system.service.tenant.TenantService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -27,4 +30,15 @@ public class TenantApiImpl implements TenantApi {
tenantService.validTenant(id);
}
@Override
public TenantDTO getTenant(Long id) {
TenantDO tenant = tenantService.getTenant(id);
TenantDTO tenantDTO = null;
if (tenant!=null){
tenantDTO = new TenantDTO();
BeanUtils.copyProperties(tenant, tenantDTO);
}
return tenantDTO;
}
}

Loading…
Cancel
Save