Commit 19e9d8a6 authored by danfuman's avatar danfuman

Merge branch 'V20230915' of http://192.168.60.201/root/dsk-operate-sys into V20230915

parents 0abf29ee f6e899ab
package com.dsk; package com.dsk;
import cn.dev33.satoken.secure.BCrypt;
import com.google.api.client.util.SecurityUtils;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup; import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
......
...@@ -2,6 +2,7 @@ package com.dsk.web.controller.system; ...@@ -2,6 +2,7 @@ package com.dsk.web.controller.system;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole; import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.annotation.SaMode;
import cn.hutool.core.lang.tree.Tree; import cn.hutool.core.lang.tree.Tree;
import com.dsk.common.annotation.Log; import com.dsk.common.annotation.Log;
import com.dsk.common.constant.TenantConstants; import com.dsk.common.constant.TenantConstants;
...@@ -67,7 +68,7 @@ public class SysMenuController extends BaseController { ...@@ -67,7 +68,7 @@ public class SysMenuController extends BaseController {
* 获取企业方案菜单下拉树列表 * 获取企业方案菜单下拉树列表
* 剔除"企业管理"相关菜单 * 剔除"企业管理"相关菜单
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@GetMapping("/tenantPackageTreeSelect") @GetMapping("/tenantPackageTreeSelect")
public R<List<Tree<Long>>> tenantPackageTreeSelect(SysMenu menu) { public R<List<Tree<Long>>> tenantPackageTreeSelect(SysMenu menu) {
List<SysMenu> menus = menuService.selectTenantPackageMenuList(menu, getUserId()); List<SysMenu> menus = menuService.selectTenantPackageMenuList(menu, getUserId());
......
...@@ -2,6 +2,7 @@ package com.dsk.web.controller.system; ...@@ -2,6 +2,7 @@ package com.dsk.web.controller.system;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole; import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.annotation.SaMode;
import com.baomidou.lock.annotation.Lock4j; import com.baomidou.lock.annotation.Lock4j;
import com.dsk.common.annotation.Log; import com.dsk.common.annotation.Log;
import com.dsk.common.annotation.RepeatSubmit; import com.dsk.common.annotation.RepeatSubmit;
...@@ -42,8 +43,8 @@ public class SysTenantController extends BaseController { ...@@ -42,8 +43,8 @@ public class SysTenantController extends BaseController {
/** /**
* 查询租户列表 * 查询租户列表
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@SaCheckPermission("system:tenant:list") @SaCheckPermission(value = "system:tenant:list", orRole = "accountAdmin")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<SysTenantVo> list(SysTenantBo bo, PageQuery pageQuery) { public TableDataInfo<SysTenantVo> list(SysTenantBo bo, PageQuery pageQuery) {
return tenantService.queryPageList(bo, pageQuery); return tenantService.queryPageList(bo, pageQuery);
...@@ -66,8 +67,8 @@ public class SysTenantController extends BaseController { ...@@ -66,8 +67,8 @@ public class SysTenantController extends BaseController {
* *
* @param id 主键 * @param id 主键
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@SaCheckPermission("system:tenant:query") @SaCheckPermission(value = "system:tenant:query", orRole = "accountAdmin")
@GetMapping("/{id}") @GetMapping("/{id}")
public R<SysTenantVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { public R<SysTenantVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
return R.ok(tenantService.queryById(id)); return R.ok(tenantService.queryById(id));
...@@ -76,8 +77,8 @@ public class SysTenantController extends BaseController { ...@@ -76,8 +77,8 @@ public class SysTenantController extends BaseController {
/** /**
* 新增租户 * 新增租户
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@SaCheckPermission("system:tenant:add") @SaCheckPermission(value = "system:tenant:add", orRole = "accountAdmin")
@Log(title = "租户", businessType = BusinessType.INSERT) @Log(title = "租户", businessType = BusinessType.INSERT)
@Lock4j @Lock4j
@RepeatSubmit() @RepeatSubmit()
...@@ -92,8 +93,8 @@ public class SysTenantController extends BaseController { ...@@ -92,8 +93,8 @@ public class SysTenantController extends BaseController {
/** /**
* 修改租户 * 修改租户
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@SaCheckPermission("system:tenant:edit") @SaCheckPermission(value = "system:tenant:edit", orRole = "accountAdmin")
@Log(title = "租户", businessType = BusinessType.UPDATE) @Log(title = "租户", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
...@@ -122,8 +123,8 @@ public class SysTenantController extends BaseController { ...@@ -122,8 +123,8 @@ public class SysTenantController extends BaseController {
* *
* @param ids 主键串 * @param ids 主键串
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@SaCheckPermission("system:tenant:remove") @SaCheckPermission(value = "system:tenant:remove", orRole = "accountAdmin")
@Log(title = "租户", businessType = BusinessType.DELETE) @Log(title = "租户", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) { public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
...@@ -145,7 +146,7 @@ public class SysTenantController extends BaseController { ...@@ -145,7 +146,7 @@ public class SysTenantController extends BaseController {
/** /**
* 清除动态租户 * 清除动态租户
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@GetMapping("/dynamic/clear") @GetMapping("/dynamic/clear")
public R<Void> dynamicClear() { public R<Void> dynamicClear() {
TenantHelper.clearDynamic(); TenantHelper.clearDynamic();
...@@ -158,8 +159,8 @@ public class SysTenantController extends BaseController { ...@@ -158,8 +159,8 @@ public class SysTenantController extends BaseController {
* @param tenantId 租户id * @param tenantId 租户id
* @param packageId 套餐id * @param packageId 套餐id
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY,TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY},mode = SaMode.OR)
@SaCheckPermission("system:tenant:edit") @SaCheckPermission(value = "system:tenant:edit", orRole = "accountAdmin")
@Log(title = "租户", businessType = BusinessType.UPDATE) @Log(title = "租户", businessType = BusinessType.UPDATE)
@GetMapping("/syncTenantPackage") @GetMapping("/syncTenantPackage")
public R<Void> syncTenantPackage(@NotBlank(message = "企业ID不能为空") String tenantId, public R<Void> syncTenantPackage(@NotBlank(message = "企业ID不能为空") String tenantId,
......
...@@ -2,6 +2,7 @@ package com.dsk.web.controller.system; ...@@ -2,6 +2,7 @@ package com.dsk.web.controller.system;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole; import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.annotation.SaMode;
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.annotation.RepeatSubmit;
...@@ -46,8 +47,8 @@ public class SysTenantPackageController extends BaseController { ...@@ -46,8 +47,8 @@ public class SysTenantPackageController extends BaseController {
/** /**
* 查询租户套餐列表 * 查询租户套餐列表
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@SaCheckPermission("system:tenantPackage:list") @SaCheckPermission(value = "system:tenantPackage:list", orRole = "accountAdmin")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<SysTenantPackageVo> list(SysTenantPackageBo bo, PageQuery pageQuery) { public TableDataInfo<SysTenantPackageVo> list(SysTenantPackageBo bo, PageQuery pageQuery) {
return tenantPackageService.queryPageList(bo, pageQuery); return tenantPackageService.queryPageList(bo, pageQuery);
...@@ -56,8 +57,8 @@ public class SysTenantPackageController extends BaseController { ...@@ -56,8 +57,8 @@ public class SysTenantPackageController extends BaseController {
/** /**
* 查询租户套餐下拉选列表 * 查询租户套餐下拉选列表
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@SaCheckPermission("system:tenantPackage:list") @SaCheckPermission(value = "system:tenantPackage:list", orRole = "accountAdmin")
@GetMapping("/selectList") @GetMapping("/selectList")
public R<List<SysTenantPackageSelectVo>> selectList() { public R<List<SysTenantPackageSelectVo>> selectList() {
return R.ok(tenantPackageService.selectList()); return R.ok(tenantPackageService.selectList());
...@@ -80,8 +81,8 @@ public class SysTenantPackageController extends BaseController { ...@@ -80,8 +81,8 @@ public class SysTenantPackageController extends BaseController {
* *
* @param packageId 主键 * @param packageId 主键
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@SaCheckPermission("system:tenantPackage:query") @SaCheckPermission(value = "system:tenantPackage:query", orRole = "accountAdmin")
@GetMapping("/{packageId}") @GetMapping("/{packageId}")
public R<SysTenantPackageVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long packageId) { public R<SysTenantPackageVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long packageId) {
return R.ok(tenantPackageService.queryById(packageId)); return R.ok(tenantPackageService.queryById(packageId));
...@@ -90,8 +91,8 @@ public class SysTenantPackageController extends BaseController { ...@@ -90,8 +91,8 @@ public class SysTenantPackageController extends BaseController {
/** /**
* 新增租户套餐 * 新增租户套餐
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@SaCheckPermission("system:tenantPackage:add") @SaCheckPermission(value = "system:tenantPackage:add", orRole = "accountAdmin")
@Log(title = "租户套餐", businessType = BusinessType.INSERT) @Log(title = "租户套餐", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
...@@ -105,8 +106,8 @@ public class SysTenantPackageController extends BaseController { ...@@ -105,8 +106,8 @@ public class SysTenantPackageController extends BaseController {
/** /**
* 修改租户套餐 * 修改租户套餐
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@SaCheckPermission("system:tenantPackage:edit") @SaCheckPermission(value = "system:tenantPackage:edit", orRole = "accountAdmin")
@Log(title = "租户套餐", businessType = BusinessType.UPDATE) @Log(title = "租户套餐", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
...@@ -134,8 +135,8 @@ public class SysTenantPackageController extends BaseController { ...@@ -134,8 +135,8 @@ public class SysTenantPackageController extends BaseController {
* *
* @param packageIds 主键串 * @param packageIds 主键串
*/ */
@SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) @SaCheckRole(value = {TenantConstants.SUPER_ADMIN_ROLE_KEY, TenantConstants.DSK_TENANT_ADMIN_ROLE_KEY}, mode = SaMode.OR)
@SaCheckPermission("system:tenantPackage:remove") @SaCheckPermission(value = "system:tenantPackage:remove", orRole = "accountAdmin")
@Log(title = "租户套餐", businessType = BusinessType.DELETE) @Log(title = "租户套餐", businessType = BusinessType.DELETE)
@DeleteMapping("/{packageIds}") @DeleteMapping("/{packageIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] packageIds) { public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] packageIds) {
......
...@@ -37,6 +37,16 @@ public interface TenantConstants { ...@@ -37,6 +37,16 @@ public interface TenantConstants {
*/ */
String TENANT_ADMIN_ROLE_NAME = "管理员"; String TENANT_ADMIN_ROLE_NAME = "管理员";
/**
* 大司空租户管理员角色
*/
String DSK_TENANT_ADMIN_ROLE_KEY = "accountAdmin";
/**
* 大司空租户管理员角色名称
*/
String DSK_TENANT_ADMIN_ROLE_NAME = "企业账号管理员";
/** /**
* 默认租户ID * 默认租户ID
*/ */
......
package com.dsk.common.utils; package com.dsk.common.utils;
import cn.dev33.satoken.secure.BCrypt;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
...@@ -240,4 +241,9 @@ public class EncryptUtils { ...@@ -240,4 +241,9 @@ public class EncryptUtils {
return SmUtil.sm3(data); return SmUtil.sm3(data);
} }
public static void main(String[] args) {
System.out.println(BCrypt.hashpw("dsk123123"));
}
} }
...@@ -56,11 +56,6 @@ ...@@ -56,11 +56,6 @@
<artifactId>fastjson2</artifactId> <artifactId>fastjson2</artifactId>
<version>2.0.25</version> <version>2.0.25</version>
</dependency> </dependency>
<!-- <dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.3.2</version>
</dependency>-->
<!-- <dependency>--> <!-- <dependency>-->
......
...@@ -47,8 +47,8 @@ public class BusinessInfoController extends BaseController ...@@ -47,8 +47,8 @@ public class BusinessInfoController extends BaseController
* 查询所有项目名称(支持模糊查询) * 查询所有项目名称(支持模糊查询)
*/ */
@PostMapping("/query/project") @PostMapping("/query/project")
public R<List<BusinessLikeProjectNameListVo>> queryprojectName(@RequestBody BusinessListDto dto){ public R<List<BusinessLikeProjectNameListVo>> queryprojectName(@RequestBody BusinessListDto dto,@RequestBody PageQuery pageQuery){
return R.ok(businessInfoService.selectProjectName(dto)); return R.ok(businessInfoService.selectProjectName(dto,pageQuery));
} }
/** /**
......
...@@ -57,7 +57,7 @@ public interface IBusinessInfoService ...@@ -57,7 +57,7 @@ public interface IBusinessInfoService
* 查询所有项目名称(支持模糊查询) * 查询所有项目名称(支持模糊查询)
* @return * @return
*/ */
List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto); List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto,PageQuery pageQuery);
/** /**
* 项目批量导入 * 项目批量导入
......
...@@ -138,11 +138,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -138,11 +138,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
} }
@Override @Override
public List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto) { public List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto,PageQuery pageQuery) {
// List<BusinessLikeProjectNameListVo> vos = businessInfoMapper.selectProjectName(dto); // List<BusinessLikeProjectNameListVo> vos = businessInfoMapper.selectProjectName(dto);
List<BusinessLikeProjectNameListVo> vos = new ArrayList<>(); List<BusinessLikeProjectNameListVo> vos = new ArrayList<>();
try { try {
Map<String, Object> result = dskOpenApiUtil.requestBody("/nationzj/jskBid/news/findByName", toRequestMap(dto)); Map<String, Object> result = dskOpenApiUtil.requestBody("/nationzj/jskBid/news/findByName", toRequestMap(dto,pageQuery));
if (ObjectUtil.isNotEmpty(result.get("data"))) { if (ObjectUtil.isNotEmpty(result.get("data"))) {
List<Map<String, Object>> list = (List<Map<String, Object>>) BeanUtil.beanToMap(result.get("data")).get("list"); List<Map<String, Object>> list = (List<Map<String, Object>>) BeanUtil.beanToMap(result.get("data")).get("list");
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
...@@ -169,10 +169,10 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -169,10 +169,10 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
return vos; return vos;
} }
private Map<String, Object> toRequestMap(BusinessListDto dto) { private Map<String, Object> toRequestMap(BusinessListDto dto,PageQuery pageQuery) {
Map<String, Object> page = new HashMap<>(); Map<String, Object> page = new HashMap<>();
page.put("page", 1); page.put("page", pageQuery.getPageNum());
page.put("limit", 20); page.put("limit", pageQuery.getPageSize());
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("keyword", dto.getProjectName()); map.put("keyword", dto.getProjectName());
map.put("page", page); map.put("page", page);
......
...@@ -151,5 +151,16 @@ public class EnterpriseProjectController { ...@@ -151,5 +151,16 @@ public class EnterpriseProjectController {
return enterpriseProjectService.importantDetail(body); return enterpriseProjectService.importantDetail(body);
} }
/***
*@Description: 公招市场-流程速览
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/9/19 13:49
*/
@RequestMapping(value = "/projectProcess", method = RequestMethod.POST)
public R projectProcess(@RequestBody @Valid EnterpriseProjectProcessDetailBody body) throws Exception {
return enterpriseProjectService.projectProcess(body);
}
} }
package com.dsk.jsk.domain;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class EnterpriseProjectProcessDetailBody {
/**
* id
*/
@NotNull(message = "id不能为空")
private String projectId;
}
...@@ -205,4 +205,16 @@ public class EnterpriseProjectService { ...@@ -205,4 +205,16 @@ public class EnterpriseProjectService {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterpriseProject/importantDetail", BeanUtil.beanToMap(body, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterpriseProject/importantDetail", BeanUtil.beanToMap(body, false, false));
return BeanUtil.toBean(map, R.class); return BeanUtil.toBean(map, R.class);
} }
/***
*@Description: 公招市场-流程速览
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/9/19 13:49
*/
public R projectProcess(EnterpriseProjectProcessDetailBody body) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/recruitmentMarket/projectProcess", BeanUtil.beanToMap(body, false, false));
return BeanUtil.toBean(map, R.class);
}
} }
...@@ -207,7 +207,7 @@ public class JskCombineInfoService { ...@@ -207,7 +207,7 @@ public class JskCombineInfoService {
} }
public TableDataInfo bidPage(JskCombineBidPageDto dto) throws Exception { public TableDataInfo bidPage(JskCombineBidPageDto dto) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/combine/bidPage", BeanUtil.beanToMap(dto, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/project/combine/tenderList", BeanUtil.beanToMap(dto, false, false));
if (ObjectUtil.isNotEmpty(map.get("data"))) { if (ObjectUtil.isNotEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data")); Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
if (!ObjectUtils.isEmpty(data.get("list"))) { if (!ObjectUtils.isEmpty(data.get("list"))) {
......
...@@ -91,12 +91,12 @@ ...@@ -91,12 +91,12 @@
iframeLoading() { iframeLoading() {
let iframeHeight = document.getElementById("companyIframe").clientHeight, number = 0 let iframeHeight = document.getElementById("companyIframe").clientHeight, number = 0
this.iframeTimer = setInterval(()=>{ this.iframeTimer = setInterval(()=>{
number ++ number = number+1000
if(document.getElementById("companyIframe").clientHeight != iframeHeight || number == 5000){ if(document.getElementById("companyIframe").clientHeight != iframeHeight || number == 3000){
this.loading = false this.loading = false
clearInterval(this.iframeTimer) clearInterval(this.iframeTimer)
} }
}) },1000)
} }
} }
} }
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:role:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -68,7 +67,6 @@ ...@@ -68,7 +67,6 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:role:remove']"
>批量删除</el-button> >批量删除</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -104,21 +102,18 @@ ...@@ -104,21 +102,18 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:role:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
>删除</el-button> >删除</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-zoom-in" icon="el-icon-zoom-in"
@click="handleLook(scope.row)" @click="handleLook(scope.row)"
v-hasPermi="['system:role:remove']"
>查看</el-button> >查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:role:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -35,7 +34,6 @@ ...@@ -35,7 +34,6 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:role:remove']"
>批量删除</el-button> >批量删除</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -80,28 +78,24 @@ ...@@ -80,28 +78,24 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:role:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
>删除</el-button> >删除</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-zoom-in" icon="el-icon-zoom-in"
@click="handleLook(scope.row)" @click="handleLook(scope.row)"
v-hasPermi="['system:role:edit']"
>查看</el-button> >查看</el-button>
<!--<el-button--> <!--<el-button-->
<!--size="mini"--> <!--size="mini"-->
<!--type="text"--> <!--type="text"-->
<!--icon="el-icon-upload"--> <!--icon="el-icon-upload"-->
<!--@click="handleSave(scope.row.packageId)"--> <!--@click="handleSave(scope.row.packageId)"-->
<!--v-hasPermi="['system:role:edit']"-->
<!--&gt;同步</el-button>--> <!--&gt;同步</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
...@@ -154,7 +148,7 @@ ...@@ -154,7 +148,7 @@
</template> </template>
<script> <script>
import { treeselect as qytreeselect} from "@/api/system/menu"; import { qytreeselect} from "@/api/system/menu";
import { addTenantPackage ,getTenantPackage,detailTenantPackage,saveTenantPackage,deleteTenantPackage} from "@/api/enterpriseManagement/enterpriseManagement"; import { addTenantPackage ,getTenantPackage,detailTenantPackage,saveTenantPackage,deleteTenantPackage} from "@/api/enterpriseManagement/enterpriseManagement";
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<el-form-item prop="captchaCode" v-if="captchaEnabled"> <el-form-item prop="captchaCode" v-if="captchaEnabled">
<el-input <el-input
v-model="dxform.captchaCode" v-model="dxform.captchaCode"
@focus="getCode"
auto-complete="off" auto-complete="off"
placeholder="请输入图形验证码" placeholder="请输入图形验证码"
style="width: 196px;float: left;" style="width: 196px;float: left;"
...@@ -92,6 +93,7 @@ ...@@ -92,6 +93,7 @@
v-model="loginForm.code" v-model="loginForm.code"
auto-complete="off" auto-complete="off"
placeholder="请输入图形验证码" placeholder="请输入图形验证码"
@focus="getCode"
style="width: 196px;float: left;" style="width: 196px;float: left;"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
...@@ -130,6 +132,7 @@ ...@@ -130,6 +132,7 @@
<el-form-item prop="captchaCode" v-if="captchaEnabled && showcode"> <el-form-item prop="captchaCode" v-if="captchaEnabled && showcode">
<el-input <el-input
v-model="dxform.captchaCode" v-model="dxform.captchaCode"
@focus="getCode"
auto-complete="off" auto-complete="off"
placeholder="请输入验证码" placeholder="请输入验证码"
style="width: 196px;float: left;" style="width: 196px;float: left;"
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
</div> </div>
<el-form class="popform j" :model="queryParam" :rules="rules" ref="ruleForm" label-width="130px"> <el-form class="popform j" :model="queryParam" :rules="rules" ref="ruleForm" label-width="130px">
<el-form-item label="项目名称:" class="row" prop="projectName"> <el-form-item label="项目名称:" class="row" prop="projectName">
<el-input type="text" placeholder="请输入" v-model="queryParam.projectName" @input="getProject" :οnkeyup="queryParam.projectName=queryParam.projectName.replace(/^\s+|\s+$/g,'')"></el-input> <el-input type="text" placeholder="请输入" v-model="queryParam.projectName" @input="getProject(1)" :οnkeyup="queryParam.projectName=queryParam.projectName.replace(/^\s+|\s+$/g,'')"></el-input>
<div class="resultlist" v-if="proList.length>0" id="box1"> <div class="resultlist infinite-list" v-infinite-scroll="load1" v-if="proList.length>0" id="box1">
<div v-for="(item,index) in proList" @click="selProject(item)"><span v-html="item.projectName"></span></div> <div class="infinite-list-item" v-for="(item,index) in proList" @click="selProject(item)"><span v-html="item.projectName"></span></div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="招采单位:" class="row" prop="ownerCompany"> <el-form-item label="招采单位:" class="row" prop="ownerCompany">
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
projectCategory:[],//项目类别 projectCategory:[],//项目类别
proList:[],//项目列表 proList:[],//项目列表
companypage:1, companypage:1,
projectpage:1,
isscroll:false, isscroll:false,
} }
}, },
...@@ -177,16 +178,41 @@ ...@@ -177,16 +178,41 @@
}, },
//获取项目名称 //获取项目名称
getProject(value){ getProject(value){
if (value.length>=2){ this.queryParam.projectStage = null
this.queryParam.investmentAmount = null
this.queryParam.projectType = null
this.queryParam.projectCategory = null
this.queryParam.status = 0
this.queryParam.ownerCompany = ''
if(value == 1){
this.proList = []
this.projectpage = 1
}
if (this.queryParam.projectName.length>=2){
let param = { let param = {
projectName:value, projectName:this.queryParam.projectName,
page:{
limit:20,
page:this.projectpage
}
} }
queryProject(JSON.stringify(param)).then(result=>{ queryProject(JSON.stringify(param)).then(result=>{
if(result.code != 200){ if(result.code != 200){
this.proList = []
return false return false
} }
if(result.data != null && result.data.length>0){
this.isscroll = true
if (this.proList.length===0) {
this.proList = result.data this.proList = result.data
} else {
let arr2 = result.data
arr2.unshift(2, 0);
Array.prototype.splice.apply(this.proList, arr2);
}
this.projectpage += 1
}else{
this.isscroll = false
}
}) })
} }
}, },
...@@ -195,6 +221,11 @@ ...@@ -195,6 +221,11 @@
this.getCompany(2) this.getCompany(2)
} }
}, },
load1(){
if(this.isscroll){
this.getProject(2)
}
},
selCompany(item){ selCompany(item){
this.queryParam.companyId = item.jskEid this.queryParam.companyId = item.jskEid
this.queryParam.ownerCompany = item.name.replace(/<[^>]+>/g, '') this.queryParam.ownerCompany = item.name.replace(/<[^>]+>/g, '')
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-card> </el-card>
<el-card style="margin-top: 16px" v-if="tableDataTotal > 0"> <el-card style="margin-top: 16px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>数据导出</span> <span>数据导出</span>
</div> </div>
...@@ -84,6 +84,12 @@ ...@@ -84,6 +84,12 @@
<div class="pagination-box" v-if="tableDataTotal>params.pageSize"> <div class="pagination-box" v-if="tableDataTotal>params.pageSize">
<el-pagination background :current-page="params.pageNum" :page-size="params.pageSize" :total="tableDataTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" /> <el-pagination background :current-page="params.pageNum" :page-size="params.pageSize" :total="tableDataTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div> </div>
<div class="tables">
<div class="empty" v-if="tableDataTotal==0">
<img class="img" src="@/assets/images/project/empty.png">
<div class="p1">暂无数据展示</div>
</div>
</div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
...@@ -133,6 +139,7 @@ export default { ...@@ -133,6 +139,7 @@ export default {
this.tableData = [] this.tableData = []
this.tableDataTotal = 0 this.tableDataTotal = 0
} }
this.tableDataTotal = 0
this.isSkeleton = false this.isSkeleton = false
}) })
}, },
...@@ -151,3 +158,20 @@ export default { ...@@ -151,3 +158,20 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss">
.empty{
margin: 0 auto;
height: 300px;
text-align: center;
.img{
width: 108px;
height: 108px;
margin-bottom: 24px;
margin-top: 70px;
}
.p1{
color: #333333;
font-size: 16px;
}
}
</style>
...@@ -92,4 +92,10 @@ public interface SysUserMapper extends BaseMapperPlus<SysUserMapper, SysUser, Sy ...@@ -92,4 +92,10 @@ public interface SysUserMapper extends BaseMapperPlus<SysUserMapper, SysUser, Sy
*/ */
SysUser selectUserById(Long userId); SysUser selectUserById(Long userId);
List<SysUser> selectUserByTenantPhone(String phonenumber);
List<SysUser> selectUserByTenantUsername(String username);
} }
...@@ -525,7 +525,7 @@ public class SysLoginService { ...@@ -525,7 +525,7 @@ public class SysLoginService {
} }
SysTenantVo tenant = sysTenantService.queryByTenantId(tenantId); SysTenantVo tenant = sysTenantService.queryByTenantId(tenantId);
if (ObjectUtil.isNull(tenant)) { if (ObjectUtil.isNull(tenant)) {
log.info("登录企业:{} 不存在.", tenant.getCompanyName()); log.info("登录企业:{} 不存在.", tenantId);
RedisUtils.deleteObject(GlobalConstants.PHONE_DEFAULT_TENANT + phoneNumber); RedisUtils.deleteObject(GlobalConstants.PHONE_DEFAULT_TENANT + phoneNumber);
return null; return null;
} else if (TenantStatus.DISABLE.getCode().equals(tenant.getStatus())) { } else if (TenantStatus.DISABLE.getCode().equals(tenant.getStatus())) {
......
...@@ -91,17 +91,16 @@ public class SysMenuServiceImpl implements ISysMenuService { ...@@ -91,17 +91,16 @@ public class SysMenuServiceImpl implements ISysMenuService {
*/ */
@Override @Override
public List<SysMenu> selectTenantPackageMenuList(SysMenu menu, Long userId) { public List<SysMenu> selectTenantPackageMenuList(SysMenu menu, Long userId) {
List<SysMenu> menuList = null; List<SysMenu> menuList;
// 管理员显示所有菜单信息 // 管理员显示所有菜单信息
if (LoginHelper.isSuperAdmin(userId)) {
menuList = baseMapper.selectList(new LambdaQueryWrapper<SysMenu>() menuList = baseMapper.selectList(new LambdaQueryWrapper<SysMenu>()
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName()) .like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible()) .eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus()) .eq(SysMenu::getStatus, "0")
.orderByAsc(SysMenu::getParentId) .orderByAsc(SysMenu::getParentId)
.orderByAsc(SysMenu::getOrderNum)); .orderByAsc(SysMenu::getOrderNum));
menuList = menuList.stream().filter(menu1 -> !menu1.getMenuName().equals("企业管理")).collect(Collectors.toList()); //过滤企业管理权限,考虑今后权限名称可能会修改,因此以ID作为判断依据
} menuList = menuList.stream().filter(menu1 -> menu1.getMenuId() != 1693803090698280961L).collect(Collectors.toList());
return menuList; return menuList;
} }
...@@ -183,8 +182,7 @@ public class SysMenuServiceImpl implements ISysMenuService { ...@@ -183,8 +182,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
if (CollUtil.isEmpty(menus)) { if (CollUtil.isEmpty(menus)) {
return CollUtil.newArrayList(); return CollUtil.newArrayList();
} }
return TreeBuildUtils.build(menus, (menu, tree) -> return TreeBuildUtils.build(menus, (menu, tree) -> tree.setId(menu.getMenuId())
tree.setId(menu.getMenuId())
.setParentId(menu.getParentId()) .setParentId(menu.getParentId())
.setName(menu.getMenuName()) .setName(menu.getMenuName())
.setWeight(menu.getOrderNum())); .setWeight(menu.getOrderNum()));
......
...@@ -139,6 +139,21 @@ ...@@ -139,6 +139,21 @@
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
where u.del_flag = '0' and u.user_id = #{userId} where u.del_flag = '0' and u.user_id = #{userId}
</select> </select>
<select id="selectUserByTenantPhone" resultType="com.dsk.system.domain.SysUser">
select t1.user_id, t1.tenant_id,t1.user_name,t1.status from sys_user t1
inner join sys_tenant t on t1.tenant_id=t.tenant_id and t1.del_flag=0
where t.del_flag=0
and t.status=0
and t1.phonenumber=#{phonenumber}
order by t1.create_time desc
</select>
<select id="selectUserByTenantUsername" resultType="com.dsk.system.domain.SysUser">
select t1.user_id, t1.tenant_id,t1.user_name,t1.status from sys_user t1
left join sys_tenant t on t1.tenant_id=t.tenant_id and t1.del_flag=0
where t.del_flag=0
and t.status=0
and t1.user_name=#{username}
order by t1.create_time desc
</select>
</mapper> </mapper>
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