From 4a1009e02e4c768c1d2dbd958ed5a98144f68a6b Mon Sep 17 00:00:00 2001 From: hdka <823267011@qq.com> Date: Fri, 7 Mar 2025 18:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E8=81=8C=E6=B5=81=E7=A8=8B=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysUserController.java | 6 +- .../workflow/WfProcessController.java | 2 - .../common/core/domain/entity/SysUser.java | 9 - .../ruoyi/oa/domain/EmployeeOnboarding.java | 46 +--- .../oa/domain/bo/EmployeeOnboardingBo.java | 58 ----- .../oa/domain/vo/EmployeeOnboardingVo.java | 67 ----- .../oa/mapper/EmployeeOnboardingMapper.java | 1 + .../impl/EmployeeOnboardingServiceImpl.java | 13 +- .../mapper/oa/EmployeeOnboardingMapper.xml | 35 ++- .../ruoyi/system/mapper/SysRoleMapper.java | 4 + .../ruoyi/system/service/ISysRoleService.java | 2 +- .../service/impl/SysRoleServiceImpl.java | 5 +- .../service/impl/WfProcessServiceImpl.java | 6 +- .../resources/mapper/system/SysRoleMapper.xml | 5 +- ruoyi-ui/.env.development | 4 +- ruoyi-ui/src/api/system/user.js | 7 + ruoyi-ui/src/api/workflow/task.js | 7 + ruoyi-ui/src/utils/generator/parser.js | 11 +- ruoyi-ui/src/views/oa/onboarding/add.vue | 26 +- ruoyi-ui/src/views/oa/onboarding/index.vue | 244 +++--------------- ruoyi-ui/src/views/temp.vue | 173 ++++++++++--- ruoyi-ui/src/views/workflow/work/detail.vue | 75 +++--- ruoyi-ui/src/views/workflow/work/index.vue | 1 - ruoyi-ui/src/views/workflow/work/start.vue | 1 + ruoyi-ui/src/views/workflow/work/todo.vue | 3 +- 25 files changed, 296 insertions(+), 515 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 279ce53..14f3333 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -271,9 +271,9 @@ public class SysUserController extends BaseController { */ @SaCheckPermission("system:user:edit") @Log(title = "用户管理", businessType = BusinessType.GRANT) - @GetMapping("/tempRole") - public R insertTempRole(Long userId) { - Long[] roleId = roleService.selectRoleByName(); + @GetMapping("/tempRole/{userId}") + public R insertTempRole(@PathVariable("userId") Long userId) { + Long[] roleId = roleService.selectTempRoleByName(); userService.insertUserAuth(userId, roleId); return R.ok(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java index 6a44d3b..d25aa6d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java @@ -66,8 +66,6 @@ public class WfProcessController extends BaseController { @SaCheckPermission("workflow:process:todoList") @GetMapping(value = "/todoList") public TableDataInfo todoProcessList(ProcessQuery processQuery, PageQuery pageQuery) { - System.out.println("processQuery====" + processQuery); - System.out.println("pageQuery====" + pageQuery); return processService.selectPageTodoProcessList(processQuery, pageQuery); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java index 40041ce..82aa639 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java @@ -44,16 +44,11 @@ public class SysUser extends BaseEntity { /** * 用户账号 */ - @Xss(message = "用户账号不能包含脚本字符") - @NotBlank(message = "用户账号不能为空") - @Size(min = 0, max = 30, message = "用户账号长度不能超过{max}个字符") private String userName; /** * 用户昵称 */ - @Xss(message = "用户昵称不能包含脚本字符") - @Size(min = 0, max = 30, message = "用户昵称长度不能超过{max}个字符") private String nickName; /** @@ -64,15 +59,11 @@ public class SysUser extends BaseEntity { /** * 用户邮箱 */ - @Sensitive(strategy = SensitiveStrategy.EMAIL) - @Email(message = "邮箱格式不正确") - @Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符") private String email; /** * 手机号码 */ - @Sensitive(strategy = SensitiveStrategy.PHONE) private String phonenumber; /** diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/EmployeeOnboarding.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/EmployeeOnboarding.java index 19062b7..13a1d5f 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/EmployeeOnboarding.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/EmployeeOnboarding.java @@ -41,10 +41,7 @@ public class EmployeeOnboarding extends BaseEntity { * 入职日期 */ private Date joiningDate; - /** - * 试用期结束日期 - */ - private Date probationPeriodEnd; + private String address; @@ -52,42 +49,7 @@ public class EmployeeOnboarding extends BaseEntity { * 直属经理ID */ private Long managerId; - /** - * 是否提交入职资料 - */ - private Integer documentsSubmitted; - /** - * 是否完成入职培训 - */ - private Integer orientationCompleted; - /** - * 入职状态(pending,completed,onboarding) - */ - private Long joiningStatus; - /** - * 是否完成招聘与面试 - */ - private Integer recruitmentCompleted; - /** - * 是否已发放Offer - */ - private Integer offerIssued; - /** - * 是否已签署合同 - */ - private Integer contractSigned; - /** - * 入职材料/工作准备是否完成 - */ - private Integer materialsPrepared; - /** - * 是否完成入职培训 - */ - private Integer trainingCompleted; - /** - * 是否完成工作条件准备(权限分配、工位等) - */ - private Integer workConditionsPrepared; + /** * 最高学历 */ @@ -129,10 +91,6 @@ public class EmployeeOnboarding extends BaseEntity { * 体重 */ private Long weight; - /** - * 编制类型 - */ - private String staffType; /** * 紧急联系人1 */ diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/EmployeeOnboardingBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/EmployeeOnboardingBo.java index 8e3c2b6..c5a24a2 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/EmployeeOnboardingBo.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/EmployeeOnboardingBo.java @@ -46,65 +46,11 @@ public class EmployeeOnboardingBo extends BaseEntity { @DateTimeFormat(pattern = "yyyy-MM-dd") private Date joiningDate; - /** - * 试用期结束日期 - */ - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date probationPeriodEnd; - /** * 直属经理ID */ private Long managerId; - /** - * 是否提交入职资料 - */ - private Integer documentsSubmitted; - - /** - * 是否完成入职培训 - */ - private Integer orientationCompleted; - - /** - * 入职状态(pending,completed,onboarding) - */ - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private Long joiningStatus; - - /** - * 是否完成招聘与面试 - */ - private Integer recruitmentCompleted; - - /** - * 是否已发放Offer - */ - private Integer offerIssued; - - /** - * 是否已签署合同 - */ - private Integer contractSigned; - - /** - * 入职材料/工作准备是否完成 - */ - private Integer materialsPrepared; - - /** - * 是否完成入职培训 - */ - private Integer trainingCompleted; - - /** - * 是否完成工作条件准备(权限分配、工位等) - */ - private Integer workConditionsPrepared; - /** * 最高学历 */ @@ -154,10 +100,6 @@ public class EmployeeOnboardingBo extends BaseEntity { */ private Long weight; - /** - * 编制类型 - */ - private String staffType; /** * 紧急联系人1 diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/EmployeeOnboardingVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/EmployeeOnboardingVo.java index 2236e6d..2b210eb 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/EmployeeOnboardingVo.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/EmployeeOnboardingVo.java @@ -48,11 +48,6 @@ public class EmployeeOnboardingVo extends EmployeeOnboarding { @ExcelProperty(value = "入职日期") private Date joiningDate; - /** - * 试用期结束日期 - */ - @ExcelProperty(value = "试用期结束日期") - private Date probationPeriodEnd; /** * 直属经理ID @@ -60,62 +55,6 @@ public class EmployeeOnboardingVo extends EmployeeOnboarding { @ExcelProperty(value = "直属经理ID") private Long managerId; - /** - * 是否提交入职资料 - */ - @ExcelProperty(value = "是否提交入职资料") - private Integer documentsSubmitted; - - /** - * 是否完成入职培训 - */ - @ExcelProperty(value = "是否完成入职培训") - private Integer orientationCompleted; - - /** - * 入职状态(pending,completed,onboarding) - */ - @ExcelProperty(value = "入职状态(pending,completed,onboarding)", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "joining_status") - private Long joiningStatus; - - /** - * 是否完成招聘与面试 - */ - @ExcelProperty(value = "是否完成招聘与面试") - private Integer recruitmentCompleted; - - /** - * 是否已发放Offer - */ - @ExcelProperty(value = "是否已发放Offer") - private Integer offerIssued; - - /** - * 是否已签署合同 - */ - @ExcelProperty(value = "是否已签署合同") - private Integer contractSigned; - - /** - * 入职材料/工作准备是否完成 - */ - @ExcelProperty(value = "入职材料/工作准备是否完成") - private Integer materialsPrepared; - - /** - * 是否完成入职培训 - */ - @ExcelProperty(value = "是否完成入职培训") - private Integer trainingCompleted; - - /** - * 是否完成工作条件准备(权限分配、工位等) - */ - @ExcelProperty(value = "是否完成工作条件准备", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "权=限分配、工位等") - private Integer workConditionsPrepared; - /** * 最高学历 */ @@ -170,12 +109,6 @@ public class EmployeeOnboardingVo extends EmployeeOnboarding { @ExcelProperty(value = "体重") private Long weight; - /** - * 编制类型 - */ - @ExcelProperty(value = "编制类型") - private String staffType; - /** * 紧急联系人1 */ diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/EmployeeOnboardingMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/EmployeeOnboardingMapper.java index bf7ae6d..1c95d43 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/EmployeeOnboardingMapper.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/EmployeeOnboardingMapper.java @@ -13,4 +13,5 @@ import com.ruoyi.oa.domain.vo.EmployeeOnboardingVo; */ public interface EmployeeOnboardingMapper extends BaseMapperPlus { + Boolean updateByUserId(EmployeeOnboarding update); } diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/EmployeeOnboardingServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/EmployeeOnboardingServiceImpl.java index 8554b8a..2ebe550 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/EmployeeOnboardingServiceImpl.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/EmployeeOnboardingServiceImpl.java @@ -83,17 +83,7 @@ public class EmployeeOnboardingServiceImpl implements IEmployeeOnboardingService LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); lqw.eq(bo.getUserId() != null, EmployeeOnboarding::getUserId, bo.getUserId()); lqw.eq(bo.getJoiningDate() != null, EmployeeOnboarding::getJoiningDate, bo.getJoiningDate()); - lqw.eq(bo.getProbationPeriodEnd() != null, EmployeeOnboarding::getProbationPeriodEnd, bo.getProbationPeriodEnd()); lqw.eq(bo.getManagerId() != null, EmployeeOnboarding::getManagerId, bo.getManagerId()); - lqw.eq(bo.getDocumentsSubmitted() != null, EmployeeOnboarding::getDocumentsSubmitted, bo.getDocumentsSubmitted()); - lqw.eq(bo.getOrientationCompleted() != null, EmployeeOnboarding::getOrientationCompleted, bo.getOrientationCompleted()); - lqw.eq(bo.getJoiningStatus() != null, EmployeeOnboarding::getJoiningStatus, bo.getJoiningStatus()); - lqw.eq(bo.getRecruitmentCompleted() != null, EmployeeOnboarding::getRecruitmentCompleted, bo.getRecruitmentCompleted()); - lqw.eq(bo.getOfferIssued() != null, EmployeeOnboarding::getOfferIssued, bo.getOfferIssued()); - lqw.eq(bo.getContractSigned() != null, EmployeeOnboarding::getContractSigned, bo.getContractSigned()); - lqw.eq(bo.getMaterialsPrepared() != null, EmployeeOnboarding::getMaterialsPrepared, bo.getMaterialsPrepared()); - lqw.eq(bo.getTrainingCompleted() != null, EmployeeOnboarding::getTrainingCompleted, bo.getTrainingCompleted()); - lqw.eq(bo.getWorkConditionsPrepared() != null, EmployeeOnboarding::getWorkConditionsPrepared, bo.getWorkConditionsPrepared()); return lqw; } @@ -118,7 +108,8 @@ public class EmployeeOnboardingServiceImpl implements IEmployeeOnboardingService public Boolean updateByBo(EmployeeOnboardingBo bo) { EmployeeOnboarding update = BeanUtil.toBean(bo, EmployeeOnboarding.class); validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; + + return baseMapper.updateByUserId(update); } /** diff --git a/ruoyi-oa/src/main/resources/mapper/oa/EmployeeOnboardingMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/EmployeeOnboardingMapper.xml index fdd1fc2..115ebe8 100644 --- a/ruoyi-oa/src/main/resources/mapper/oa/EmployeeOnboardingMapper.xml +++ b/ruoyi-oa/src/main/resources/mapper/oa/EmployeeOnboardingMapper.xml @@ -9,17 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - - - - - - - @@ -34,10 +24,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + update employee_onboarding + + id_photo = #{idPhoto}, + joining_date = #{joiningDate}, + manager_id = #{managerId}, + highest_degree = #{highestDegree}, + remark = #{remark}, + del_flag = #{delFlag}, + birth_date = #{birthDate}, + ethnicity = #{ethnicity}, + confirm_date = #{confirmDate}, + marital_status = #{maritalStatus}, + political_status = #{politicalStatus}, + height = #{height}, + weight = #{weight}, + emergency_contact1 = #{emergencyContact1}, + emergency_contact2 = #{emergencyContact2}, + + where user_id = #{userId} + + + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java index d0a34f5..3cf24ec 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java @@ -65,4 +65,8 @@ public interface SysRoleMapper extends BaseMapperPlus - + @@ -76,5 +76,8 @@ join sys_user_role sur on sur.role_id = r.role_id where #{userId} = sur.user_id + diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index ef39f1b..301f7ab 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -5,8 +5,8 @@ VUE_APP_TITLE = 福安德综合办公系统 ENV = 'development' # 若依管理系统/开发环境 -# VUE_APP_BASE_API = '/dev-api' -VUE_APP_BASE_API = 'http://110.41.139.73:8080' +VUE_APP_BASE_API = '/prod-api' +# VUE_APP_BASE_API = 'http://110.41.139.73:8080' # 应用访问路径 例如使用前缀 /admin/ VUE_APP_CONTEXT_PATH = '/' diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index e37bef2..2486509 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -9,6 +9,13 @@ export function listUser(query) { params: query }) } +// 查询用户列表 +export function tempRole(userId) { + return request({ + url: '/system/user/tempRole/'+userId, + method: 'get', + }) +} // 查询员工列表 export function listWorker(query) { diff --git a/ruoyi-ui/src/api/workflow/task.js b/ruoyi-ui/src/api/workflow/task.js index caaaf7d..8b95f17 100644 --- a/ruoyi-ui/src/api/workflow/task.js +++ b/ruoyi-ui/src/api/workflow/task.js @@ -62,3 +62,10 @@ export function returnList(data) { data: data }) } + +export function getTaskFormDetail(taskId) { + return request({ + url: '/workflow/task/processVariables/'+taskId, + method: 'get', + }) +} diff --git a/ruoyi-ui/src/utils/generator/parser.js b/ruoyi-ui/src/utils/generator/parser.js index 3017773..461d351 100644 --- a/ruoyi-ui/src/utils/generator/parser.js +++ b/ruoyi-ui/src/utils/generator/parser.js @@ -159,18 +159,20 @@ export default { Authorization: "Bearer " + getToken(), } cur['on-success'] = (res, file, fileList) => { + formData[cur.__vModel__] = fileList; if (res.code === 200 && fileList) { config.defaultValue = fileList; fileList.forEach(val =>{ - val.url = val.response.data.url; - val.ossId = val.response.data.ossId; + val.url = val.response.url; + val.fileName = val.response.fileName; }) } }; + // 点击文件列表中已上传的文件时的钩子 cur['on-preview'] = (file) => { - this.$download(file.ossId) + this.$download.resource(file.fileName) } } if (config.children) { @@ -235,7 +237,8 @@ export default { debugger this.$emit('getData', this[this.formConf.formModel]) // this.$emit('getData',this.formConfCopy) - } + }, + }, render(h) { return renderFrom.call(this, h) diff --git a/ruoyi-ui/src/views/oa/onboarding/add.vue b/ruoyi-ui/src/views/oa/onboarding/add.vue index b0284ec..fe78c17 100644 --- a/ruoyi-ui/src/views/oa/onboarding/add.vue +++ b/ruoyi-ui/src/views/oa/onboarding/add.vue @@ -194,7 +194,7 @@ @@ -163,6 +243,14 @@ export default { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05); } +.form-content { + padding-top: 360px; +} + +.form-conf { + margin-top: 40px; +} + .form-actions { margin-top: 40px; display: flex; @@ -175,7 +263,6 @@ export default { align-items: center; justify-content: center; position: relative; - overflow: hidden; padding: 2rem; height: 100vh; } @@ -253,6 +340,7 @@ export default { .process-steps { margin: 2rem 0; + ::v-deep .el-step__head { width: 24px; height: 24px; @@ -286,7 +374,7 @@ export default { .form-container { background: white; border-radius: 16px; - padding: 40px; + padding: 20px; width: 100%; max-width: 800px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05); @@ -294,7 +382,8 @@ export default { z-index: 1; .form-header { - margin-bottom: 2rem; + margin-bottom: 5rem; + h3 { font-size: 1.5rem; margin-bottom: 1rem; @@ -327,14 +416,14 @@ export default { top: 10px; width: 95%; padding: 10px; - + ::v-deep .el-step__title { font-size: 12px; } } - + .onboarding-container { padding-top: 80px; } } - \ No newline at end of file + diff --git a/ruoyi-ui/src/views/workflow/work/detail.vue b/ruoyi-ui/src/views/workflow/work/detail.vue index ab4bb04..97cd3ef 100644 --- a/ruoyi-ui/src/views/workflow/work/detail.vue +++ b/ruoyi-ui/src/views/workflow/work/detail.vue @@ -8,7 +8,7 @@ 填写表单 - + @@ -21,7 +21,7 @@ - + {{ item.nickName }} - + {{ item.nickName }} - + @@ -72,7 +74,7 @@ - + @@ -210,15 +212,16 @@ diff --git a/ruoyi-ui/src/views/workflow/work/index.vue b/ruoyi-ui/src/views/workflow/work/index.vue index 8401c50..d0e009a 100644 --- a/ruoyi-ui/src/views/workflow/work/index.vue +++ b/ruoyi-ui/src/views/workflow/work/index.vue @@ -153,7 +153,6 @@ export default { getList() { this.loading = true; listProcess(this.queryParams).then(response => { - console.log(3333,response) this.processList = response.rows; this.total = response.total; this.loading = false diff --git a/ruoyi-ui/src/views/workflow/work/start.vue b/ruoyi-ui/src/views/workflow/work/start.vue index 05a2bd8..5b49414 100644 --- a/ruoyi-ui/src/views/workflow/work/start.vue +++ b/ruoyi-ui/src/views/workflow/work/start.vue @@ -49,6 +49,7 @@ export default { this.formOpen = true } }) + }, /** 接收子组件传的值 */ getData(data) { diff --git a/ruoyi-ui/src/views/workflow/work/todo.vue b/ruoyi-ui/src/views/workflow/work/todo.vue index fa10adf..6a057e0 100644 --- a/ruoyi-ui/src/views/workflow/work/todo.vue +++ b/ruoyi-ui/src/views/workflow/work/todo.vue @@ -144,6 +144,7 @@ export default { getList() { this.loading = true; listTodoProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => { + console.log(response); if(this.queryParams.description != null){ this.todoList = this.searchList(response.rows, this.queryParams.description); }else { @@ -170,7 +171,7 @@ export default { query: { taskId: row.taskId, processed: true, - category:row.category, + category:row.procDefName==="入职流程"?'onboarding':row.category, } }) },