Commit 252a220c authored by huangjie's avatar huangjie
parents 819348b5 7f448876
......@@ -88,10 +88,12 @@ public class BusinessFileController extends BaseController {
//校验是否上传同名文件
File newFile = new File(filePath);
// 获取当前目录下的文件和文件夹
File[] files = newFile.listFiles();
for (File allFile : files) {
if(filename.equals(allFile.getName())) return error("文件已存在");
if (newFile.exists()) {
// 获取当前目录下的文件和文件夹
File[] files = newFile.listFiles();
for (File allFile : files) {
if (filename.equals(allFile.getName())) return error("文件已存在");
}
}
// 上传并返回文件全路径
......
......@@ -15,6 +15,11 @@ public class BusinessIdDto {
*/
private Integer businessId;
/**
* 项目标签id
*/
private Integer labelId;
/**
* 项目标签名称
*/
......
......@@ -2,8 +2,6 @@ package com.dsk.system.domain.vo;
import lombok.Data;
import java.util.List;
/**
* @author lxl
* @Description:
......@@ -90,7 +88,7 @@ public class BusinessBrowseVo {
/**
* 项目标签
*/
private List<String> labelList;
private String labelList;
/** 建设单位 */
private String constructionUnit;
......
package com.dsk.system.domain.vo;
import lombok.Data;
/**
* @author lxl
* @Description:
* @Date 2023/6/27 下午 2:51
**/
@Data
public class BusinessLabelVo {
//主键
private Integer id;
//标签
private String label;
}
......@@ -3,6 +3,7 @@ package com.dsk.system.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.config.RuoYiConfig;
import com.dsk.common.constant.HttpStatus;
import com.dsk.common.core.domain.AjaxResult;
......@@ -21,10 +22,10 @@ import com.dsk.system.domain.BusinessListDto;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.vo.BusinessBrowseVo;
import com.dsk.system.domain.vo.BusinessLabelVo;
import com.dsk.system.domain.vo.BusinessListVo;
import com.dsk.system.mapper.BusinessInfoMapper;
import com.dsk.system.mapper.BusinessLabelMapper;
import com.dsk.system.mapper.BusinessRelateCompanyMapper;
import com.dsk.system.mapper.BusinessUserMapper;
import com.dsk.system.service.IBusinessInfoService;
import lombok.extern.slf4j.Slf4j;
......@@ -36,7 +37,6 @@ import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 项目详情Service业务层处理
......@@ -52,8 +52,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Resource
private BusinessUserMapper businessUserMapper;
@Resource
private BusinessRelateCompanyMapper businessRelateCompanyMapper;
@Resource
private BusinessLabelMapper businessLabelMapper;
@Resource
private ReadBusinessInfoExcel readBusinessInfoExcel;
......@@ -108,12 +106,14 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//商务团队
businessBrowseVo.setTeam(businessUserMapper.selectCreatorByBusinessId(businessId));
//查询是否是项目创建人
Long userId = SecurityUtils.getLoginUser().getUserId();
if (userId == null) throw new BaseException("请登录");
// Long userId = SecurityUtils.getLoginUser().getUserId();
// if (userId == null) throw new BaseException("请登录");
Long userId = 103l;
Integer founder = businessUserMapper.selectFounder(businessId, userId);
businessBrowseVo.setIsFounder(founder == null ? 0 : founder);
//查询项目标签
businessBrowseVo.setLabelList(businessLabelMapper.selectBusinessLabelList(new BusinessLabel(businessId)).stream().map(p -> p.getLabel()).collect(Collectors.toList()));
List<BusinessLabel> labels = businessLabelMapper.selectBusinessLabelList(new BusinessLabel(businessId));
businessBrowseVo.setLabelList(JSONObject.toJSONString(BeanUtil.copyToList(labels, BusinessLabelVo.class)));
//相关数据统计
BusinessBrowseVo total = businessInfoMapper.selectTotal(businessId);
businessBrowseVo.setBacklogCount(total.getBacklogCount());
......
......@@ -62,7 +62,7 @@
<delete id="deleteBusinessLabelById">
delete
from business_label
where business_id = #{businessId} and label = #{label}
where id = #{labelId}
</delete>
<delete id="deleteBusinessLabelByIds" parameterType="String">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment