Commit 6eec02b7 authored by Administrator's avatar Administrator

Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司

parents 07c09cfa cb5084db
...@@ -9,6 +9,7 @@ import cn.hutool.core.lang.tree.Tree; ...@@ -9,6 +9,7 @@ import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.dsk.common.annotation.Log; import com.dsk.common.annotation.Log;
import com.dsk.common.annotation.RepeatSubmit;
import com.dsk.common.constant.GlobalConstants; import com.dsk.common.constant.GlobalConstants;
import com.dsk.common.constant.TenantConstants; import com.dsk.common.constant.TenantConstants;
import com.dsk.common.core.controller.BaseController; import com.dsk.common.core.controller.BaseController;
...@@ -187,6 +188,7 @@ public class SysUserController extends BaseController { ...@@ -187,6 +188,7 @@ public class SysUserController extends BaseController {
/** /**
* 新增用户 * 新增用户
*/ */
@RepeatSubmit
@SaCheckPermission("system:user:add") @SaCheckPermission("system:user:add")
@Log(title = "用户管理", businessType = BusinessType.INSERT) @Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
......
package com.dsk.web.schedule; package com.dsk.web.schedule;
import com.dsk.common.tenant.helper.TenantHelper; import com.dsk.common.tenant.helper.TenantHelper;
import com.dsk.cscec.service.AdvisoryBodyService;
import com.dsk.system.service.ISysTenantService; import com.dsk.system.service.ISysTenantService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -19,9 +20,10 @@ import org.springframework.stereotype.Component; ...@@ -19,9 +20,10 @@ import org.springframework.stereotype.Component;
public class TenantTimerTask { public class TenantTimerTask {
private final ISysTenantService tenantService; private final ISysTenantService tenantService;
private final AdvisoryBodyService advisoryBodyService;
/** /**
* 每6小时扫描并禁用已过期租户账号 * 每10分钟扫描并禁用已过期租户账号
*/ */
@Scheduled(cron = "0 0/10 * * * ? ") @Scheduled(cron = "0 0/10 * * * ? ")
public void updateExpiredTenantStatus() { public void updateExpiredTenantStatus() {
...@@ -29,4 +31,13 @@ public class TenantTimerTask { ...@@ -29,4 +31,13 @@ public class TenantTimerTask {
TenantHelper.ignore(tenantService::handleExpiredTenant); TenantHelper.ignore(tenantService::handleExpiredTenant);
} }
/**
* 每小时更新一次咨询机构经营范围
*/
@Scheduled(cron = "0 0 * 1/1 * ? ")
public void updateAdvisoryBodyBusinessScope() {
log.info("执行定时更新咨询机构经营范围(1h/次)");
TenantHelper.ignore(advisoryBodyService::updateAdvisoryBodyBusinessScope);
}
} }
\ No newline at end of file
...@@ -187,7 +187,7 @@ sms: ...@@ -187,7 +187,7 @@ sms:
territory: ap-guangzhou territory: ap-guangzhou
dsk: dsk:
exportBackUrl: http://47.104.91.229:9099/prod-api/export/backUrl exportBackUrl: http://111.204.34.146:9099/prod-api/export/backUrl
sa-token: sa-token:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
......
...@@ -187,7 +187,7 @@ sms: ...@@ -187,7 +187,7 @@ sms:
territory: ap-guangzhou territory: ap-guangzhou
dsk: dsk:
exportBackUrl: http://47.104.91.229:9099/prod-api/export/backUrl exportBackUrl: http://111.204.34.146:9099/prod-api/export/backUrl
sa-token: sa-token:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
......
...@@ -5,23 +5,19 @@ import com.dsk.common.core.controller.BaseController; ...@@ -5,23 +5,19 @@ import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R; import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo; import com.dsk.cscec.domain.bo.*;
import com.dsk.cscec.domain.bo.CooperateProjectDetailSearchBo; import com.dsk.cscec.domain.vo.*;
import com.dsk.cscec.domain.bo.ProjectDetailBo;
import com.dsk.cscec.domain.bo.ProjectSearchBo;
import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo;
import com.dsk.cscec.domain.vo.CooperateProjectDetailSearchVo;
import com.dsk.cscec.domain.vo.ProjectDetailVo;
import com.dsk.cscec.domain.vo.ProjectSearchVo;
import com.dsk.cscec.service.AdvisoryBodyProjectService; import com.dsk.cscec.service.AdvisoryBodyProjectService;
import com.dsk.cscec.service.AdvisoryBodyService; import com.dsk.cscec.service.AdvisoryBodyService;
import com.dsk.cscec.service.IDProjectService; import com.dsk.cscec.service.IDProjectService;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;
/** /**
* 咨询机构管理控制层 * 咨询机构管理控制层
...@@ -65,10 +61,26 @@ public class AdvisoryBodyManageController extends BaseController { ...@@ -65,10 +61,26 @@ public class AdvisoryBodyManageController extends BaseController {
} }
/** /**
* 根据项目主键查询项目详情 * 获取项目详情
*/ */
@GetMapping("/getProjectDetail") @GetMapping("/getProjectDetail")
public R<ProjectDetailVo> getProjectDetail(ProjectDetailBo projectDetailBo) { public R<ProjectDetailVo> getProjectDetail(ProjectDetailBo projectDetailBo) {
return R.ok(baseService.queryProjectDetail(projectDetailBo)); return R.ok(baseService.queryProjectDetail(projectDetailBo));
} }
/**
* 校验咨询机构是否存在
*/
@GetMapping("/checkAdvisoryBodyExist")
public R<AdvisoryBodyExistVo> checkAdvisoryBodyExist(@NotBlank(message = "咨询机构名称不能为空") String advisoryBodyName) {
return R.ok(advisoryBodyService.checkAdvisoryBodyExist(advisoryBodyName));
}
/**
* 新增咨询机构
*/
@PostMapping("/addAdvisoryBody")
public R<Void> addAdvisoryBody(AddAdvisoryBodyBo addAdvisoryBodyBo) {
return toAjax(advisoryBodyService.addAdvisoryBody(addAdvisoryBodyBo));
}
} }
\ No newline at end of file
package com.dsk.cscec.domain; package com.dsk.cscec.domain;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.dsk.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* 咨询机构(SysAdvisoryBody)表实体类 * 咨询机构(SysAdvisoryBody)表实体类
...@@ -14,10 +15,11 @@ import java.util.Date; ...@@ -14,10 +15,11 @@ import java.util.Date;
* @author sxk * @author sxk
* @since 2023-12-12 10:12:06 * @since 2023-12-12 10:12:06
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class AdvisoryBody implements Serializable { public class AdvisoryBody extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -38,24 +40,5 @@ public class AdvisoryBody implements Serializable { ...@@ -38,24 +40,5 @@ public class AdvisoryBody implements Serializable {
* 经营范围 * 经营范围
*/ */
private String businessScope; private String businessScope;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
} }
package com.dsk.cscec.domain; package com.dsk.cscec.domain;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.dsk.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -11,8 +13,9 @@ import java.util.Date; ...@@ -11,8 +13,9 @@ import java.util.Date;
* @date 2023.12.15 * @date 2023.12.15
* @time 15:58 * @time 15:58
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
public class AdvisoryBodyProject implements Serializable { public class AdvisoryBodyProject extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -61,20 +64,4 @@ public class AdvisoryBodyProject implements Serializable { ...@@ -61,20 +64,4 @@ public class AdvisoryBodyProject implements Serializable {
* 是否为终审单位(0代表是 1代表否) * 是否为终审单位(0代表是 1代表否)
*/ */
private String isFinalJudgeUnit; private String isFinalJudgeUnit;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
} }
package com.dsk.cscec.domain; package com.dsk.cscec.domain;
import com.dsk.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -11,9 +13,10 @@ import java.util.Date; ...@@ -11,9 +13,10 @@ import java.util.Date;
* @author sxk * @author sxk
* @since 2023-12-10 15:34:49 * @since 2023-12-10 15:34:49
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
public class DProject implements Serializable { public class DProject extends BaseEntity implements Serializable {
private static final long serialVersionUID = -39953154592938442L; private static final long serialVersionUID = 1L;
/** /**
* 项目主键 * 项目主键
......
package com.dsk.cscec.domain.bo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @author sxk
* @date 2023.12.19
* @time 09:54
*/
@Data
public class AddAdvisoryBodyBo {
/**
* 是否为新资讯机构
*/
@NotNull(message = "是否为新咨询机构不能为空")
private Boolean isNewAdvisoryBody;
/**
* 项目主键
*/
@NotNull(message = "项目主键不能为空")
private Long projectKey;
/**
* 咨询机构cid(用于查询建设库数据)
*/
@NotNull(message = "咨询机构cid不能为空")
private Integer advisoryBodyCid;
/**
* 咨询机构名称
*/
@NotBlank(message = "咨询机构名称不能为空")
private String advisoryBodyName;
/**
* 经营范围
*/
@NotBlank(message = "经营范围不能为空")
private String businessScope;
/**
* 项目负责人
*/
private String projectLeader;
/**
* 项目负责人专业
*/
private String projectLeaderMajor;
/**
* 项目负责人联系电话
*/
private String projectLeaderPhone;
/**
* 结算金额(万元)
*/
private Double settleAmount;
/**
* 结算开始时间
*/
private Date settleStartTime;
/**
* 结算完成时间
*/
private Date settleFinishTime;
/**
* 是否为终审单位(0代表是 1代表否)
*/
private String isFinalJudgeUnit;
}
package com.dsk.cscec.domain.vo;
import com.dsk.cscec.domain.AdvisoryBody;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author sxk
* @date 2023.12.19
* @time 14:20
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class AdvisoryBodyExistVo extends AdvisoryBody {
/**
* 是否为新资讯机构
*/
private Boolean isNewAdvisoryBody;
}
...@@ -3,6 +3,7 @@ package com.dsk.cscec.domain.vo; ...@@ -3,6 +3,7 @@ package com.dsk.cscec.domain.vo;
import com.dsk.cscec.domain.AdvisoryBody; import com.dsk.cscec.domain.AdvisoryBody;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.Date; import java.util.Date;
...@@ -12,6 +13,7 @@ import java.util.Date; ...@@ -12,6 +13,7 @@ import java.util.Date;
* @date 2023.12.13 * @date 2023.12.13
* @time 10:32 * @time 10:32
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
......
package com.dsk.cscec.domain.vo; package com.dsk.cscec.domain.vo;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -149,6 +150,7 @@ public class DCustomerListVo implements Serializable { ...@@ -149,6 +150,7 @@ public class DCustomerListVo implements Serializable {
* 准入时间 * 准入时间
*/ */
@Excel(name = "准入时间", width = 10 , dateFormat = "yyyy-MM-dd") @Excel(name = "准入时间", width = 10 , dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date approveDate2; private Date approveDate2;
/** /**
* 企业合作数量 * 企业合作数量
......
package com.dsk.cscec.domain.vo; package com.dsk.cscec.domain.vo;
import com.dsk.cscec.domain.AdvisoryBody; import com.dsk.cscec.domain.AdvisoryBody;
import com.dsk.cscec.domain.AdvisoryBodyProject;
import com.dsk.cscec.domain.DProject; import com.dsk.cscec.domain.DProject;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -29,4 +30,8 @@ public class ProjectDetailVo extends DProject { ...@@ -29,4 +30,8 @@ public class ProjectDetailVo extends DProject {
* 注册地址 * 注册地址
*/ */
private String regAddress; private String regAddress;
/**
* 项目信息
*/
private AdvisoryBodyProject advisoryBodyProject;
} }
...@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.AdvisoryBody; import com.dsk.cscec.domain.AdvisoryBody;
import com.dsk.cscec.domain.bo.AddAdvisoryBodyBo;
import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo; import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo;
import com.dsk.cscec.domain.vo.AdvisoryBodyExistVo;
import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo; import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo;
/** /**
...@@ -22,5 +24,26 @@ public interface AdvisoryBodyService extends IService<AdvisoryBody> { ...@@ -22,5 +24,26 @@ public interface AdvisoryBodyService extends IService<AdvisoryBody> {
* @return 所有数据 * @return 所有数据
*/ */
TableDataInfo<AdvisoryBodySearchVo> queryAdvisoryBodyList(AdvisoryBodySearchBo advisoryBodySearchBo, PageQuery pageQuery); TableDataInfo<AdvisoryBodySearchVo> queryAdvisoryBodyList(AdvisoryBodySearchBo advisoryBodySearchBo, PageQuery pageQuery);
/**
* 校验咨询机构是否存在
*
* @param advisoryBodyName 咨询机构名称
* @return 校验结果
*/
AdvisoryBodyExistVo checkAdvisoryBodyExist(String advisoryBodyName);
/**
* 新增咨询机构
*
* @param addAdvisoryBodyBo 新增信息
* @return 添加结果
*/
Integer addAdvisoryBody(AddAdvisoryBodyBo addAdvisoryBodyBo);
/**
* 每小时更新一次咨询机构经营范围
*/
void updateAdvisoryBodyBusinessScope();
} }
...@@ -9,10 +9,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -9,10 +9,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.exception.ServiceException;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.domain.AdvisoryBody; import com.dsk.cscec.domain.AdvisoryBody;
import com.dsk.cscec.domain.AdvisoryBodyProject; import com.dsk.cscec.domain.AdvisoryBodyProject;
import com.dsk.cscec.domain.bo.AddAdvisoryBodyBo;
import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo; import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo;
import com.dsk.cscec.domain.vo.AdvisoryBodyExistVo;
import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo; import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo;
import com.dsk.cscec.mapper.AdvisoryBodyMapper; import com.dsk.cscec.mapper.AdvisoryBodyMapper;
import com.dsk.cscec.mapper.AdvisoryBodyProjectMapper; import com.dsk.cscec.mapper.AdvisoryBodyProjectMapper;
...@@ -21,8 +24,11 @@ import com.dsk.jsk.domain.EnterpriseInfoHeaderBody; ...@@ -21,8 +24,11 @@ import com.dsk.jsk.domain.EnterpriseInfoHeaderBody;
import com.dsk.system.utils.DskOpenApiUtil; import com.dsk.system.utils.DskOpenApiUtil;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -100,5 +106,83 @@ public class AdvisoryBodyServiceImpl extends ServiceImpl<AdvisoryBodyMapper, Adv ...@@ -100,5 +106,83 @@ public class AdvisoryBodyServiceImpl extends ServiceImpl<AdvisoryBodyMapper, Adv
} }
return TableDataInfo.build(page); return TableDataInfo.build(page);
} }
/**
* 校验咨询机构是否存在
*
* @param advisoryBodyName 咨询机构名称
* @return 校验结果
*/
@Override
public AdvisoryBodyExistVo checkAdvisoryBodyExist(String advisoryBodyName) {
//先从咨询机构表查询是否存在,存在则直接返回
AdvisoryBody advisoryBody = baseMapper.selectOne(new LambdaQueryWrapper<AdvisoryBody>()
.eq(AdvisoryBody::getAdvisoryBodyName, advisoryBodyName));
if (ObjectUtil.isNotNull(advisoryBody)) {
//咨询机构表中有记录,则设置为非新咨询机构
AdvisoryBodyExistVo advisoryBodyExistVo = BeanUtil.toBean(advisoryBody, AdvisoryBodyExistVo.class);
advisoryBodyExistVo.setIsNewAdvisoryBody(false);
return advisoryBodyExistVo;
} else {
Map<String, Object> params = new HashMap<>();
params.put("keyword", advisoryBodyName);
Map jskData = MapUtils.getMap(dskOpenApiUtil.requestBody("/nationzj/enterprice/index", params), "data", null);
//防止没有数据而导致强转错误,所以先判断下total
if (MapUtils.getInteger(jskData, "total", 0) > 0) {
List<Map<String, Object>> data = (List<Map<String, Object>>) jskData.get("list");
for (Map<String, Object> companyData : data) {
//企业名称完全匹配上,则直接返回给前端
if (advisoryBodyName.equals(companyData.get("name"))) {
AdvisoryBodyExistVo advisoryBodyExistVo = new AdvisoryBodyExistVo();
advisoryBodyExistVo.setAdvisoryBodyCid(Math.toIntExact(MapUtils.getLong(companyData, "jskEid")));
advisoryBodyExistVo.setAdvisoryBodyName(MapUtils.getString(companyData, "name"));
advisoryBodyExistVo.setBusinessScope(MapUtils.getString(companyData, "businessScope"));
advisoryBodyExistVo.setIsNewAdvisoryBody(true);
break;
}
}
//查不到则抛异常
throw new ServiceException("咨询机构不存在");
}
}
return null;
}
/**
* 新增咨询机构
*
* @param addAdvisoryBodyBo 新增信息
* @return 添加结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Integer addAdvisoryBody(AddAdvisoryBodyBo addAdvisoryBodyBo) {
//如果是新增咨询机构,则需要新增记录到咨询机构表
if (addAdvisoryBodyBo.getIsNewAdvisoryBody()) {
AdvisoryBody newAdvisoryBody = BeanUtil.toBean(addAdvisoryBodyBo, AdvisoryBody.class);
newAdvisoryBody.setCreateTime(new Date());
baseMapper.insert(newAdvisoryBody);
}
return advisoryBodyProjectMapper.insert(BeanUtil.toBean(addAdvisoryBodyBo, AdvisoryBodyProject.class));
}
/**
* 每小时更新一次咨询机构经营范围
*/
@Override
public void updateAdvisoryBodyBusinessScope() {
EnterpriseInfoHeaderBody infoHeaderBody = new EnterpriseInfoHeaderBody();
for (AdvisoryBody advisoryBody : baseMapper.selectList(null)) {
infoHeaderBody.setCompanyId(Math.toIntExact(advisoryBody.getAdvisoryBodyCid()));
Map<String, Object> companyMap = dskOpenApiUtil.requestBody("/api/jsk/enterprise/infoHeader", BeanUtil.beanToMap(infoHeaderBody, false, false));
Map companyData = MapUtils.getMap(companyMap, "data", null);
String businessScope = MapUtils.getString(companyData, "businessScope", "empty");
if (!"empty".equals(businessScope)) {
advisoryBody.setBusinessScope(businessScope);
baseMapper.updateById(advisoryBody);
}
}
}
} }
...@@ -11,15 +11,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -11,15 +11,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.constant.QueryConstants; import com.dsk.cscec.constant.QueryConstants;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo; import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
import com.dsk.cscec.domain.bo.CustomerCooperationBo; import com.dsk.cscec.domain.bo.CustomerCooperationBo;
import com.dsk.cscec.domain.bo.CustomerInfoBo; import com.dsk.cscec.domain.bo.CustomerInfoBo;
import com.dsk.cscec.domain.vo.AdvisoryBodyVo; import com.dsk.cscec.domain.vo.*;
import com.dsk.cscec.domain.vo.CustomerApproveVo;
import com.dsk.cscec.domain.vo.CustomerCooperationVo;
import com.dsk.cscec.domain.vo.CustomerInfoVo;
import com.dsk.cscec.mapper.AdvisoryBodyMapper; import com.dsk.cscec.mapper.AdvisoryBodyMapper;
import com.dsk.cscec.mapper.DCustomerMapper; import com.dsk.cscec.mapper.DCustomerMapper;
import com.dsk.cscec.mapper.DSubcontractMapper; import com.dsk.cscec.mapper.DSubcontractMapper;
...@@ -65,10 +63,19 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto ...@@ -65,10 +63,19 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
Page<CustomerInfoVo> page = baseMapper.queryListByType(query.build(), bo); Page<CustomerInfoVo> page = baseMapper.queryListByType(query.build(), bo);
if (CollectionUtils.isNotEmpty(page.getRecords())) { if (CollectionUtils.isNotEmpty(page.getRecords())) {
page.getRecords().parallelStream().forEach(item->{ page.getRecords().parallelStream().forEach(item->{
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量 //企业合作数量
item.setEnterpriseCooperationCount(subcontractMapper.selectEnterpriseCountByCustomerId(item.getCustomerId())); item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount());
//项目合作数量 //项目合作数量
item.setProjectCooperationCount(subcontractMapper.selectProjectCountByCustomerId(item.getCustomerId())); item.setProjectCooperationCount(vo.getProjectCooperationCount());
//关键字标红
if(!ObjectUtils.isEmpty(bo.getCustomerName())){
item.setCustomerName(StringUtils.markInRed(item.getCustomerName(), bo.getCustomerName()));
}
//关键字标红
if(!ObjectUtils.isEmpty(bo.getLeaderName())){
item.setCustomerName(StringUtils.markInRed(item.getLeaderName(), bo.getLeaderName()));
}
try { try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(item.getCustomerName()); Map<String, Object> map = opportunityRadarService.enterpriseByName(item.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) { if (!ObjectUtils.isEmpty(map.get("data"))) {
......
...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.DCustomerSearchBo; import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.domain.vo.DCustomerListVo; import com.dsk.cscec.domain.vo.DCustomerListVo;
...@@ -44,12 +45,17 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -44,12 +45,17 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
dealWithCustomerClass(bo); dealWithCustomerClass(bo);
Page<DCustomerListVo> page = baseMapper.allSearchList(query.build(), bo); Page<DCustomerListVo> page = baseMapper.allSearchList(query.build(), bo);
if (CollectionUtils.isNotEmpty(page.getRecords())) { if (CollectionUtils.isNotEmpty(page.getRecords())) {
page.getRecords().parallelStream().forEach(item->{ page.getRecords().parallelStream().forEach(item -> {
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId()); DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量 //企业合作数量
item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount()); item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount());
//项目合作数量 //项目合作数量
item.setProjectCooperationCount(vo.getProjectCooperationCount()); item.setProjectCooperationCount(vo.getProjectCooperationCount());
showCustomerClass(item);
//关键字标红
if (!ObjectUtils.isEmpty(bo.getCustomerName())) {
item.setCustomerName(StringUtils.markInRed(item.getCustomerName(), bo.getCustomerName()));
}
try { try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(item.getCustomerName()); Map<String, Object> map = opportunityRadarService.enterpriseByName(item.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) { if (!ObjectUtils.isEmpty(map.get("data"))) {
...@@ -57,7 +63,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -57,7 +63,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
Integer companyId = MapUtil.getInt(data, "jskEid"); Integer companyId = MapUtil.getInt(data, "jskEid");
item.setCompanyId(companyId); item.setCompanyId(companyId);
} }
}catch (Exception e){ } catch (Exception e) {
// //
} }
}); });
...@@ -70,13 +76,14 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -70,13 +76,14 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
dealWithCustomerClass(bo); dealWithCustomerClass(bo);
PageQuery query = new PageQuery(); PageQuery query = new PageQuery();
List<DCustomerListVo> records = baseMapper.allSearchList(query.build(), bo).getRecords(); List<DCustomerListVo> records = baseMapper.allSearchList(query.build(), bo).getRecords();
if(CollectionUtils.isNotEmpty(records)){ if (CollectionUtils.isNotEmpty(records)) {
records.parallelStream().forEach(item->{ records.parallelStream().forEach(item -> {
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId()); DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量 //企业合作数量
item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount()); item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount());
//项目合作数量 //项目合作数量
item.setProjectCooperationCount(vo.getProjectCooperationCount()); item.setProjectCooperationCount(vo.getProjectCooperationCount());
showCustomerClass(item);
}); });
} }
return records; return records;
...@@ -87,7 +94,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -87,7 +94,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
Integer isTeam = null; Integer isTeam = null;
for (String customerClass : bo.getCustomerClass()) { for (String customerClass : bo.getCustomerClass()) {
switch (customerClass){ switch (customerClass) {
case "专业分包": case "专业分包":
list.add("专业分包"); list.add("专业分包");
break; break;
...@@ -98,17 +105,17 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -98,17 +105,17 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
list.add("租赁"); list.add("租赁");
break; break;
case "劳务分包": case "劳务分包":
if(isTeam == null){ if (isTeam == null) {
isTeam = 0; isTeam = 0;
}else if(isTeam == 1) { } else if (isTeam == 1) {
isTeam = null; isTeam = null;
} }
list.add("劳务分包"); list.add("劳务分包");
break; break;
case "劳务队伍": case "劳务队伍":
if(isTeam == null) { if (isTeam == null) {
isTeam = 1; isTeam = 1;
}else if(isTeam == 0) { } else if (isTeam == 0) {
isTeam = null; isTeam = null;
} }
list.add("劳务分包"); list.add("劳务分包");
...@@ -121,5 +128,25 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -121,5 +128,25 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
bo.setIsTeam(isTeam); bo.setIsTeam(isTeam);
} }
} }
private void showCustomerClass(DCustomerListVo vo) {
if (!ObjectUtils.isEmpty(vo.getCustomerClass())) {
switch (vo.getCustomerClass()) {
case "分供":
vo.setCustomerClass("物资设备");
break;
case "租赁":
vo.setCustomerClass("施工机械");
break;
case "劳务分包":
if (!ObjectUtils.isEmpty(vo.getLeaderName())) {
vo.setCustomerClass("劳务队伍");
}
break;
default:
break;
}
}
}
} }
...@@ -194,6 +194,9 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject> ...@@ -194,6 +194,9 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
projectDetailVo.setCorporatePerson(MapUtils.getString(companyData, "corporatePerson", "")); projectDetailVo.setCorporatePerson(MapUtils.getString(companyData, "corporatePerson", ""));
//注册地址 //注册地址
projectDetailVo.setRegAddress(MapUtils.getString(companyData, "addressDetail", "")); projectDetailVo.setRegAddress(MapUtils.getString(companyData, "addressDetail", ""));
//查询项目信息并填充
projectDetailVo.setAdvisoryBodyProject(advisoryBodyProjectMapper.selectById(projectDetailBo.getProjectKey()));
return projectDetailVo; return projectDetailVo;
} }
} }
......
...@@ -5,6 +5,7 @@ import com.dsk.common.core.domain.AjaxResult; ...@@ -5,6 +5,7 @@ import com.dsk.common.core.domain.AjaxResult;
import com.dsk.component.UploadComponent; import com.dsk.component.UploadComponent;
import com.dsk.jsk.domain.bo.ComposeQueryDto; import com.dsk.jsk.domain.bo.ComposeQueryDto;
import com.dsk.search.service.BusinessOpportunityRadarService; import com.dsk.search.service.BusinessOpportunityRadarService;
import com.dsk.search.util.PageQueryLimit;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -2,9 +2,9 @@ package com.dsk.search.controller; ...@@ -2,9 +2,9 @@ package com.dsk.search.controller;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.utils.StringUtils;
import com.dsk.jsk.domain.bo.ComposeQueryDto; import com.dsk.jsk.domain.bo.ComposeQueryDto;
import com.dsk.search.service.BusinessOpportunityRadarService; import com.dsk.search.service.BusinessOpportunityRadarService;
import com.dsk.search.util.PageQueryLimit;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
......
...@@ -54,8 +54,11 @@ public class ExportService { ...@@ -54,8 +54,11 @@ public class ExportService {
list.add(companyNameList.get(i).getCompanyName()); list.add(companyNameList.get(i).getCompanyName());
} }
composeQueryDto.setKeyword(String.join(",",list)); composeQueryDto.setKeyword(String.join(",",list));
SimpleDateFormat sdf =new SimpleDateFormat("yyyyMMdd");
String dayformat = sdf.format(new Date());
SysUserFileRecord fileRecord = new SysUserFileRecord(); SysUserFileRecord fileRecord = new SysUserFileRecord();
fileRecord.setFileName("批量导出".concat(Constants.SUFFIX_XLSX)); String fileName = "供应商资质批量查询".concat(dayformat);
fileRecord.setFileName(fileName);
fileRecord.setType(1); fileRecord.setType(1);
//生成中 //生成中
fileRecord.setStatus(2); fileRecord.setStatus(2);
...@@ -64,9 +67,7 @@ public class ExportService { ...@@ -64,9 +67,7 @@ public class ExportService {
composeQueryDto.setExportUniqueCode(fileId.toString()); composeQueryDto.setExportUniqueCode(fileId.toString());
//回调函数 //回调函数
composeQueryDto.setExportBackUrl(EXPORT_BACK_URL); composeQueryDto.setExportBackUrl(EXPORT_BACK_URL);
SimpleDateFormat sdf =new SimpleDateFormat("yyyyMMdd"); composeQueryDto.setExportExeclName(fileName);
String dayformat = sdf.format(new Date());
composeQueryDto.setExportExeclName("供应商资质批量查询"+dayformat+".xlsx");
dskOpenApiUtil.requestBody("/operate/export/zjyj/aptitude", BeanUtil.beanToMap(composeQueryDto,false,false)); dskOpenApiUtil.requestBody("/operate/export/zjyj/aptitude", BeanUtil.beanToMap(composeQueryDto,false,false));
return AjaxResult.success(); return AjaxResult.success();
} }
......
package com.dsk.search.controller; package com.dsk.search.util;
import com.dsk.jsk.domain.bo.Page; import com.dsk.jsk.domain.bo.Page;
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</foreach> </foreach>
</if> </if>
<if test="bo.approveDateBegion != null and bo.approveDateBegion != '' ">and approve_date2 &gt;= #{bo.approveDateBegion}</if> <if test="bo.approveDateBegion != null and bo.approveDateBegion != '' ">and approve_date2 &gt;= #{bo.approveDateBegion}</if>
<if test="bo.approveDateEnd != null and bo.approveDateEnd != '' ">and approve_date2 &lt;= #{bo.approveDateBegion} </if> <if test="bo.approveDateEnd != null and bo.approveDateEnd != '' ">and approve_date2 &lt;= #{bo.approveDateEnd} </if>
<if test="bo.isTeam != null"> and leader_name is <if test="bo.isTeam == 1">not</if> null </if> <if test="bo.isTeam != null"> and leader_name is <if test="bo.isTeam == 1">not</if> null </if>
order by approve_date2 desc order by approve_date2 desc
</select> </select>
...@@ -114,29 +114,28 @@ ...@@ -114,29 +114,28 @@
<if test="bo.customerName != null and bo.customerName != '' "> <if test="bo.customerName != null and bo.customerName != '' ">
and customer_name like concat('%',#{bo.customerName},'%') and customer_name like concat('%',#{bo.customerName},'%')
</if> </if>
<if test="bo.registerProvince != null and bo.registerCity == null"> <if test="bo.registerRegion != null and bo.registerRegion.size > 0 or (bo.registerProvince != null and bo.registerProvince.size > 0) or (bo.registerCity != null and bo.registerCity.size > 0)">
and register_province in and
<foreach collection="bo.registerProvince" item="registerProvince" separator="," open="(" close=")"> <trim prefix="(" suffix=")" prefixOverrides="or">
#{registerProvince} <if test="bo.registerRegion != null and bo.registerRegion.size > 0 ">
or register_region in
<foreach collection="bo.registerRegion" item="registerRegion" open="(" close=")" separator=",">
#{registerRegion}
</foreach> </foreach>
</if> </if>
<if test="bo.registerProvince == null and bo.registerCity != null "> <if test="bo.registerProvince != null and bo.registerProvince.size > 0 ">
and register_city in or register_province in
<foreach collection="bo.registerCity" item="registerCity" separator="," open="(" close=")"> <foreach collection="bo.registerProvince" item="registerProvince" open="(" close=")" separator=",">
#{registerCity}
</foreach>
</if>
<if test="bo.registerProvince != null and bo.registerCity != null ">
and (
register_province in
<foreach collection="bo.registerProvince" item="registerProvince" separator="," open="(" close=")">
#{registerProvince} #{registerProvince}
</foreach> </foreach>
</if>
<if test="bo.registerCity != null and bo.registerCity.size > 0 ">
or register_city in or register_city in
<foreach collection="bo.registerCity" item="registerCity" separator="," open="(" close=")"> <foreach collection="bo.registerCity" item="registerCity" open="(" close=")" separator=",">
#{registerCity} #{registerCity}
</foreach> </foreach>
) </if>
</trim>
</if> </if>
<if test="bo.groupSpecialtyId != null "> <if test="bo.groupSpecialtyId != null ">
<foreach collection="bo.groupSpecialtyId" item="groupSpecialtyId"> <foreach collection="bo.groupSpecialtyId" item="groupSpecialtyId">
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<select id="selectStatisticByCustomerId" resultType="com.dsk.cscec.domain.vo.DCustomerListVo"> <select id="selectStatisticByCustomerId" resultType="com.dsk.cscec.domain.vo.DCustomerListVo">
select select
count(DISTINCT org.customer_id) enterpriseCooperationCount, count(DISTINCT org.sign_org_id) enterpriseCooperationCount,
count(DISTINCT project.customer_id) projectCooperationCount count(DISTINCT project.project_id) projectCooperationCount
from d_customer dc from d_customer dc
left join d_subcontract org on org.customer_id = dc.customer_id left join d_subcontract org on org.customer_id = dc.customer_id
left join d_subcontract project on project.customer_id = dc.customer_id left join d_subcontract project on project.customer_id = dc.customer_id
...@@ -45,13 +45,28 @@ ...@@ -45,13 +45,28 @@
<if test="bo.customerName != null and bo.customerName != ''"> <if test="bo.customerName != null and bo.customerName != ''">
and ds.customer_name =#{bo.customerName} and ds.customer_name =#{bo.customerName}
</if> </if>
<if test="bo.areaName != null and bo.areaName.size > 0"> <if test="bo.areaName != null and bo.areaName.size > 0 or (bo.provinceName != null and bo.provinceName.size > 0) or (bo.cityName != null and bo.cityName.size > 0)">
and ( and
ds.areaName in <trim prefix="(" suffix=")" prefixOverrides="or">
<if test="bo.areaName != null and bo.areaName.size > 0 ">
or dp.area_name in
<foreach collection="bo.areaName" item="areaName" open="(" close=")" separator=","> <foreach collection="bo.areaName" item="areaName" open="(" close=")" separator=",">
#{areaName} #{areaName}
</foreach> </foreach>
) </if>
<if test="bo.provinceName != null and bo.provinceName.size > 0 ">
or dp.province_name in
<foreach collection="bo.provinceName" item="provinceName" open="(" close=")" separator=",">
#{provinceName}
</foreach>
</if>
<if test="bo.cityName != null and bo.cityName.size > 0 ">
or dp.city_name in
<foreach collection="bo.cityName" item="cityName" open="(" close=")" separator=",">
#{cityName}
</foreach>
</if>
</trim>
</if> </if>
</where> </where>
order by ds.sign_date desc order by ds.sign_date desc
......
...@@ -21,7 +21,8 @@ export function customerExport(param) { ...@@ -21,7 +21,8 @@ export function customerExport(param) {
url: '/customer/export', url: '/customer/export',
method: 'post', method: 'post',
data:param, data:param,
responseType: 'blob' responseType: 'blob',
timeout: 60000
}); });
} }
//专业类别选项列表 //专业类别选项列表
......
.el-icon-arrow-down{
color: #C0C4CC;
}
.title_wrap,.el-divider{ .title_wrap,.el-divider{
border-color: #eee; border-color: #eee;
} }
...@@ -203,3 +206,6 @@ ...@@ -203,3 +206,6 @@
} }
} }
.table-supplier .fixed-table .el-table__fixed-header-wrapper{
top: -16px !important;
}
This diff is collapsed.
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
type="text" type="text"
auto-complete="off" auto-complete="off"
placeholder="请输入登录账号" placeholder="请输入登录账号"
:onkeyup="loginForm.username = loginForm.username.replace(/\s+/g,'')"
> >
<img class="img" slot="prefix" src="../assets/images/user.png"/> <img class="img" slot="prefix" src="../assets/images/user.png"/>
</el-input> </el-input>
...@@ -88,6 +89,7 @@ ...@@ -88,6 +89,7 @@
auto-complete="off" auto-complete="off"
placeholder="请输入账号密码" placeholder="请输入账号密码"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
:onkeyup="loginForm.password = loginForm.password.replace(/\s+/g,'')"
> >
<img class="img" slot="prefix" src="../assets/images/password.png"/> <img class="img" slot="prefix" src="../assets/images/password.png"/>
</el-input> </el-input>
...@@ -99,6 +101,7 @@ ...@@ -99,6 +101,7 @@
placeholder="请输入图形验证码" placeholder="请输入图形验证码"
style="width: 290px;float: left;" style="width: 290px;float: left;"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
:onkeyup="loginForm.code = loginForm.code.replace(/\s+/g,'')"
> >
<img class="img" slot="prefix" src="../assets/images/txyzm.png"/> <img class="img" slot="prefix" src="../assets/images/txyzm.png"/>
</el-input> </el-input>
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="qyVisible=false">取消</el-button> <el-button @click="handleCancel1">取消</el-button>
<el-button type="primary" @click="handleAdd">确定</el-button> <el-button type="primary" @click="handleAdd">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -227,13 +227,17 @@ ...@@ -227,13 +227,17 @@
this.addEnterprise() this.addEnterprise()
}, },
changeCheckbox(item){ changeCheckbox(item){
console.log(item)
if (this.cid.indexOf(item.id) == -1) { if (this.cid.indexOf(item.id) == -1) {
this.cid.push(item.id) this.cid.push(item.id)
} else { } else {
this.cid.splice(this.cid.indexOf(item.id), 1) this.cid.splice(this.cid.indexOf(item.id), 1)
} }
}, },
handleCancel1(){
this.qyVisible=false;
this.companyName=''
this.dataList=[]
},
handleAdd(){ handleAdd(){
let data={ let data={
cid:this.cid cid:this.cid
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</div> </div>
<div class="main-item" style="line-height: 32px;"> <div class="main-item" style="line-height: 32px;">
<div class="label">手机号码</div> <div class="label">手机号码</div>
<el-input class="phone" v-model="queryParams.phones" placeholder="请输入手机号"></el-input> <el-input class="phone" v-model="queryParams.phones" placeholder="请输入手机号" oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</div> </div>
</div> </div>
<div class="search"> <div class="search">
......
...@@ -236,6 +236,7 @@ ...@@ -236,6 +236,7 @@
height: 550px; height: 550px;
text-align: center; text-align: center;
border-top: 1px solid #EFEFEF; border-top: 1px solid #EFEFEF;
background: #ffffff;
.img{ .img{
width: 108px; width: 108px;
height: 108px; height: 108px;
......
...@@ -120,6 +120,11 @@ ...@@ -120,6 +120,11 @@
</el-table-column> </el-table-column>
<el-table-column label="营业执照号码" min-width="180">
<template slot-scope="scope">
{{scope.row.unifySocialCode||"--"}}
</template>
</el-table-column>
<el-table-column label="推荐单位" min-width="280"> <el-table-column label="推荐单位" min-width="280">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.recommendOrg||"--"}} {{scope.row.recommendOrg||"--"}}
...@@ -140,14 +145,24 @@ ...@@ -140,14 +145,24 @@
{{scope.row.registerCity||"--"}} {{scope.row.registerCity||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="专业类别" min-width="85" :resizable="false"> <el-table-column label="法人代表" min-width="85" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.groupSpecialty||"--"}} {{scope.row.representative||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="法人代表" min-width="85" :resizable="false"> <el-table-column label="公司联系人" min-width="120" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.representative||"--"}} {{scope.row.contactPerson||"--"}}
</template>
</el-table-column>
<el-table-column label="联系人电话" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.contactPhone||"--"}}
</template>
</el-table-column>
<el-table-column label="注册资本(万元)" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.registerCapital||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="纳税人身份" min-width="120" :resizable="false"> <el-table-column label="纳税人身份" min-width="120" :resizable="false">
...@@ -160,29 +175,44 @@ ...@@ -160,29 +175,44 @@
{{scope.row.taxRate||"--"}} {{scope.row.taxRate||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="施工承包范围" min-width="120" :resizable="false"> <el-table-column label="资质等级" min-width="85" :resizable="false">
<template slot-scope="scope">
{{scope.row.credential||"--"}}
</template>
</el-table-column>
<el-table-column label="主项资质" min-width="85" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.constructJobScope||"--"}} --
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="资质等级" min-width="85" :resizable="false"> <el-table-column label="劳务资质" min-width="85" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.credential||"--"}} --
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="注册资本(万元)" min-width="120" :resizable="false"> <el-table-column label="施工队长" min-width="85" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.registerCapital||"--"}} {{scope.row.leaderName||'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="公司联系人" min-width="120" :resizable="false"> <el-table-column label="联系电话" min-width="120" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.contactPerson||"--"}} {{scope.row.laborCaptainPhone||'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="联系人电话" min-width="120" :resizable="false"> <el-table-column label="身份证号" min-width="180" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.contactPhone||"--"}} {{scope.row.laborCaptainIdcard||'--'}}
</template>
</el-table-column>
<el-table-column label="队伍规模" min-width="85" :resizable="false">
<template slot-scope="scope">
{{scope.row.serviceTeamPersonnum||'--'}}
</template>
</el-table-column>
<el-table-column label="专业特长" min-width="85" :resizable="false">
<template slot-scope="scope">
{{scope.row.serviceTeamSpeciality||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="准入时间" min-width="120" :resizable="false"> <el-table-column label="准入时间" min-width="120" :resizable="false">
......
...@@ -204,12 +204,12 @@ ...@@ -204,12 +204,12 @@
</el-table-column> </el-table-column>
<el-table-column label="联系人电话" min-width="120" :resizable="false"> <el-table-column label="联系人电话" min-width="120" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.legalPerson||"--"}} {{scope.row.contactPhone||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="准入时间" min-width="120" :resizable="false"> <el-table-column label="准入时间" min-width="120" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.contactPhone||"--"}} {{scope.row.approveDate2||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="公司合作数量" min-width="120" :resizable="false"> <el-table-column label="公司合作数量" min-width="120" :resizable="false">
......
...@@ -21,7 +21,6 @@ import com.dsk.common.core.service.UserService; ...@@ -21,7 +21,6 @@ import com.dsk.common.core.service.UserService;
import com.dsk.common.exception.ServiceException; import com.dsk.common.exception.ServiceException;
import com.dsk.common.helper.DataBaseHelper; import com.dsk.common.helper.DataBaseHelper;
import com.dsk.common.helper.LoginHelper; import com.dsk.common.helper.LoginHelper;
import com.dsk.common.tenant.helper.TenantHelper;
import com.dsk.common.utils.PasswordUtils; import com.dsk.common.utils.PasswordUtils;
import com.dsk.common.utils.StreamUtils; import com.dsk.common.utils.StreamUtils;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
...@@ -515,8 +514,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService { ...@@ -515,8 +514,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
*/ */
@Override @Override
public int updateUserStatus(SysUser user) { public int updateUserStatus(SysUser user) {
Set<String> rolePermission = Objects.requireNonNull(LoginHelper.getLoginUser()).getRolePermission();
//如果禁用用户 //如果禁用用户
if (UserConstants.USER_DISABLE.equals(user.getStatus())) { if (UserConstants.USER_DISABLE.equals(user.getStatus())
&& (rolePermission.contains(TenantConstants.TENANT_SUPER_ADMIN_ROLE_KEY)
|| rolePermission.contains(TenantConstants.TENANT_ADMIN_ROLE_KEY))) {
//校验企业管理员角色下是否至少有一个可用账号 //校验企业管理员角色下是否至少有一个可用账号
checkAdminHasUsers(baseMapper.selectUserById(user.getUserId())); checkAdminHasUsers(baseMapper.selectUserById(user.getUserId()));
} }
......
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