From b44bfe838c65a9ebc192ad03f7b58f1f83204c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Wed, 19 Feb 2025 22:22:39 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ProProjectInfoSubdeptsGroupMapper.xml | 2 +-
.../ProProjectInfoSubdeptsUsersMapper.xml | 1 +
.../common/security/utils/SecurityUtils.java | 10 ++++-
.../yanzhu/file/utils/FileUploadUtils.java | 4 +-
.../controller/wechat/WxController.java | 3 +-
...roProjectInfoSubdeptsUsersServiceImpl.java | 10 +++--
.../system/controller/SysRoleController.java | 7 +--
.../service/impl/SysUserServiceImpl.java | 4 +-
.../miniprogram/pages/project_info/index.wxml | 2 +
.../miniprogram/pages/project_more/index.js | 3 +-
.../miniprogram/pages/project_more/index.wxml | 1 -
.../src/views/manage/busExamInfo/index.vue | 19 +++++---
.../views/manage/busExamQuestion/index.vue | 9 ++--
.../src/views/manage/busExamUser/index.vue | 2 +-
.../views/manage/busTrainingVideo/index.vue | 22 ++++++++--
.../manage/busTrainingVideoUser/index.vue | 2 +-
.../manage/proProjectInfoSubdepts/index.vue | 6 +--
.../proProjectInfoSubdeptsGroup/index.vue | 4 +-
.../proProjectInfoSubdeptsUsers/index.vue | 43 +++++++++++++++----
.../src/views/system/user/index.vue | 27 ++++++------
20 files changed, 120 insertions(+), 61 deletions(-)
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml
index d17fad52..ac8cd115 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml
@@ -159,7 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- update pro_project_info_subdepts_group set use_status = 2 where id sub_dept_id = #{subDeptId}
+ update pro_project_info_subdepts_group set use_status = 2 where sub_dept_id = #{subDeptId}
\ No newline at end of file
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
index 85edd6bd..18811831 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
@@ -96,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and psu.user_phone = #{userPhone}
and psu.approve_status = ]]> 100
and psu.is_del = #{isDel}
+ and date(psu.use_date) between #{params.beginTime} and #{params.endTime}
and psu.is_del != 2
diff --git a/yanzhu-common/yanzhu-common-security/src/main/java/com/yanzhu/common/security/utils/SecurityUtils.java b/yanzhu-common/yanzhu-common-security/src/main/java/com/yanzhu/common/security/utils/SecurityUtils.java
index 42fd8181..ff52a47e 100644
--- a/yanzhu-common/yanzhu-common-security/src/main/java/com/yanzhu/common/security/utils/SecurityUtils.java
+++ b/yanzhu-common/yanzhu-common-security/src/main/java/com/yanzhu/common/security/utils/SecurityUtils.java
@@ -101,7 +101,15 @@ public class SecurityUtils
*/
public static boolean isGSAdmin()
{
- return Objects.nonNull(getLoginUser().getRoles()) && getLoginUser().getRoles().contains("gsAdmin");
+ Set roles = getLoginUser().getRoles();
+ if(Objects.nonNull(roles)){
+ for(String role:roles){
+ if(role.startsWith("gsAdmin")){
+ return true;
+ }
+ }
+ }
+ return false;
}
/**
diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java
index bdfce699..0c3d38c0 100644
--- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java
+++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java
@@ -37,12 +37,12 @@ public class FileUploadUtils
/**
* 默认大小 50M
*/
- public static final long DEFAULT_MAX_SIZE = 500 * 1024 * 1024;
+ public static final long DEFAULT_MAX_SIZE = 5000 * 1024 * 1024;
/**
* 默认的文件名最大长度 100
*/
- public static final int DEFAULT_FILE_NAME_LENGTH = 100;
+ public static final int DEFAULT_FILE_NAME_LENGTH = 800;
/**
* 根据文件路径上传
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java
index 9b23ece9..a5f29782 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java
@@ -9,6 +9,7 @@ import com.yanzhu.manage.enums.SubDeptsEnums;
import com.yanzhu.manage.enums.UserPostEnums;
import com.yanzhu.manage.service.*;
import com.yanzhu.security.utils.DictUtils;
+import com.yanzhu.system.api.domain.SysUser;
import com.yanzhu.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -106,7 +107,7 @@ public class WxController extends BaseController {
public AjaxResult findProSubDeptsUserInfo(@PathVariable("proId") Long proId)
{
LoginUser loginUser = SecurityUtils.getLoginUser();
- if(SecurityUtils.isGSAdmin()){
+ if(SysUser.isAdmin(loginUser.getUserid()) ||SecurityUtils.isGSAdmin()){
ProProjectInfo projectInfo = proProjectInfoService.selectProProjectInfoById(proId);
ProProjectInfoSubdeptsUsers adminUser = new ProProjectInfoSubdeptsUsers();
adminUser.setId(0L);
diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java
index bc7ff2f4..149fb7c8 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java
@@ -102,6 +102,9 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Override
public List selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
+ if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUseStatus()) && Objects.equals(proProjectInfoSubdeptsUsers.getUseStatus(),"-1")){
+ proProjectInfoSubdeptsUsers.setUseStatus(null);
+ }
return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
}
@@ -901,7 +904,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL.getCode())){
ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(proProjectInfoSubdeptsUsers.getSubDeptId());
proProjectInfoSubdepts.setApproveStatus(ApproveStatus.exempt.getCode());
- if(Objects.nonNull(proProjectInfoSubdepts.getUseStatus()) && Objects.equals(proProjectInfoSubdepts.getUseStatus(),UseStateEnums.AW.getCode())){
+ if(Objects.isNull(proProjectInfoSubdepts.getUseStatus()) || Objects.equals(proProjectInfoSubdepts.getUseStatus(),UseStateEnums.AW.getCode())){
proProjectInfoSubdepts.setUseStatus(UseStateEnums.IN.getCode());
}
// 生成二维码
@@ -931,7 +934,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(Objects.nonNull(groups) && groups.size()>0){
ProProjectInfoSubdeptsGroup specialGroup = groups.get(0);
specialGroup.setApproveStatus(ApproveStatus.exempt.getCode());
- if(Objects.nonNull(specialGroup.getUseStatus()) && Objects.equals(specialGroup.getUseStatus(),UseStateEnums.AW.getCode())){
+ if(Objects.isNull(specialGroup.getUseStatus()) || Objects.equals(specialGroup.getUseStatus(),UseStateEnums.AW.getCode())){
specialGroup.setUseStatus(UseStateEnums.IN.getCode());
}
proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(specialGroup);
@@ -952,7 +955,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ.getCode())){
ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(proProjectInfoSubdeptsUsers.getSubDeptGroup());
proProjectInfoSubdeptsGroup.setApproveStatus(ApproveStatus.exempt.getCode());
- if(Objects.nonNull(proProjectInfoSubdeptsGroup.getUseStatus()) && Objects.equals(proProjectInfoSubdeptsGroup.getUseStatus(),UseStateEnums.AW.getCode())){
+ if(Objects.isNull(proProjectInfoSubdeptsGroup.getUseStatus()) || Objects.equals(proProjectInfoSubdeptsGroup.getUseStatus(),UseStateEnums.AW.getCode())){
proProjectInfoSubdeptsGroup.setUseStatus(UseStateEnums.IN.getCode());
}
proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
@@ -972,6 +975,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
}
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
+ proProjectInfoSubdeptsUsers.setUseDate(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.exempt.getCode());
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
// 人员入场信息
diff --git a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysRoleController.java b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysRoleController.java
index ee9cf1b0..d9a988f4 100644
--- a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysRoleController.java
+++ b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysRoleController.java
@@ -103,10 +103,11 @@ public class SysRoleController extends BaseController
{
return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
- /**else if (!roleService.checkRoleKeyUnique(role))
+ else if (!roleService.checkRoleKeyUnique(role))
{
- return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
- }*/
+ role.setRoleKey(role.getRoleKey()+"_"+role.getDeptId());
+ //return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
+ }
role.setCreateBy(SecurityUtils.getUsername());
return toAjax(roleService.insertRole(role));
diff --git a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java
index 79946a8d..10c121ad 100644
--- a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java
+++ b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java
@@ -352,7 +352,9 @@ public class SysUserServiceImpl implements ISysUserService
e.printStackTrace();
}
// 新增用户信息
- user.setUserName(userNameAndCout(user.getNickName()));
+ if(StringUtils.isEmpty(user.getUserName())){
+ user.setUserName(userNameAndCout(user.getNickName()));
+ }
SysDept dept = deptMapper.selectDeptById(user.getDeptId());
if(Objects.isNull(dept)){
throw new ServiceException("所属单位选择异常,必须选择子公司及下属单位");
diff --git a/yanzhu-ui-app/miniprogram/pages/project_info/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_info/index.wxml
index 12a76a9a..d9a5d457 100644
--- a/yanzhu-ui-app/miniprogram/pages/project_info/index.wxml
+++ b/yanzhu-ui-app/miniprogram/pages/project_info/index.wxml
@@ -77,7 +77,9 @@
+
+
劳务人员
diff --git a/yanzhu-ui-app/miniprogram/pages/project_more/index.js b/yanzhu-ui-app/miniprogram/pages/project_more/index.js
index 8f779456..6d2f9469 100644
--- a/yanzhu-ui-app/miniprogram/pages/project_more/index.js
+++ b/yanzhu-ui-app/miniprogram/pages/project_more/index.js
@@ -1,5 +1,6 @@
import {
- getToken
+ getToken,
+ getUserInfo
} from '../../utils/auth'
import {
findUserMenuList
diff --git a/yanzhu-ui-app/miniprogram/pages/project_more/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_more/index.wxml
index 7c665c39..2e871e30 100644
--- a/yanzhu-ui-app/miniprogram/pages/project_more/index.wxml
+++ b/yanzhu-ui-app/miniprogram/pages/project_more/index.wxml
@@ -32,7 +32,6 @@
-
-
+
-
-
+
+
-
-
+
+
@@ -423,6 +423,11 @@ function setStatus(val, row) {
});
}
+/** 岗位类型改变 */
+function changeQueryCraftType() {
+ queryParams.value.craftPost = null;
+}
+
/** 岗位类型改变 */
function changeCraftType() {
form.value.craftPost = null;
diff --git a/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue b/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue
index 7de25f0b..c2cdb8fc 100644
--- a/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue
+++ b/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue
@@ -31,6 +31,7 @@
-
+
试题答案信息
@@ -352,9 +353,6 @@ const casProps = {
/** 查询基础题库列表 */
function getList() {
loading.value = true;
- if(!queryParams.value.craftType && queryParams.value.craftPost){
- queryParams.value.craftPost = null;
- }
listBusExamQuestion(queryParams.value).then(response => {
response.rows.forEach(item => {
item.disabledState = initRowDisabled(item);
@@ -631,9 +629,8 @@ function initPost() {
let craftTypeDatas=pro_craft_type._object.pro_craft_type;
let craftPostDatas=pro_craft_post._object.pro_craft_post;
craftTypeDatas.forEach(item =>{
- item.children = craftPostDatas.filter(deatil=>deatil.elTagClass==item.value);
+ item.children = craftPostDatas.filter(deatil=>deatil.elTagClass==item.value && deatil.remark && deatil.remark.indexOf('4,5')>-1);
});
- console.log("DEFAULT" , craftTypeDatas);
craftPostOptions.value = craftTypeDatas;
}
diff --git a/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue b/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue
index 18536ad5..0de96819 100644
--- a/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue
+++ b/yanzhu-ui-vue3/src/views/manage/busExamUser/index.vue
@@ -39,7 +39,7 @@
-
+
+ {{ dict.label }}
+
+ {{ findCraftPost(dict.elTagClass) }}
+
+
@@ -192,7 +197,7 @@
-
+
-
+
-
-
+
+
-
-
+
+
@@ -30,6 +30,16 @@
:key="dict.value" :label="dict.label" :value="dict.value" />
+
+
+
搜索
重置
@@ -64,6 +74,16 @@
+
+
+
+
+
@@ -119,8 +139,11 @@
离场
-
+
+
+ {{ parseTime(scope.row.useDate, '{y}-{m}-{d}') }}
+
+
{
if (!/^1\d{10}$/.test(value)) {
@@ -354,13 +378,14 @@ const data = reactive({
eduSignPath: null,
eduDate: null,
approveStatus: null,
- useStatus: null,
+ useStatus: "0",
subStep: null,
illnessStatus: null,
supIllnessStatus: null,
isDel: null,
userWorkType: null,
workType: null,
+ activeTags:"finished"
},
rules: {
subDeptId: [{ required: true, trigger: ['blur', 'change'], message: "请选择所属单位" }],
@@ -502,8 +527,7 @@ function getList() {
loading.value = true;
queryParams.value.comId = userStore.currentComId;
queryParams.value.projectId = userStore.currentPrjId;
- queryParams.value.activeTags = "finished";
- listProProjectInfoSubdeptsUsers(queryParams.value).then(response => {
+ listProProjectInfoSubdeptsUsers(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
proProjectInfoSubdeptsUsersList.value = (response.rows || []).map(d => {
d.info = tryToJson(d.userInfos || "{}")
d.user = d.user || {};
@@ -653,6 +677,7 @@ function handleQuery() {
/** 重置按钮操作 */
function resetQuery() {
+ dateRange.value = [];
proxy.resetForm("queryRef");
handleQuery();
}
diff --git a/yanzhu-ui-vue3/src/views/system/user/index.vue b/yanzhu-ui-vue3/src/views/system/user/index.vue
index 493912a4..d1df904c 100644
--- a/yanzhu-ui-vue3/src/views/system/user/index.vue
+++ b/yanzhu-ui-vue3/src/views/system/user/index.vue
@@ -137,7 +137,7 @@
-
+