Pārlūkot izejas kodu

添加撤回,审批人为空处理

huangguoce 16 stundas atpakaļ
vecāks
revīzija
7c6830fb35

+ 13 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/controller/EnrollmentRegistrationController.java

@@ -272,6 +272,19 @@ public class EnrollmentRegistrationController {
         return ResponseUtil.newInstance().ok("操作成功");
     }
 
+
+    /**
+     * 修改用户信息状态
+     * @param registration
+     * @return
+     */
+    @ApiLog(value = "修改用户信息状态", type = LogTypeEnum.SAVE)
+    @PostMapping("updateStatusByIdUserInfo")
+    public ResponseEntity updateStatusByIdUserInfo(@Valid @RequestBody EnrollmentRegistration registration) throws Exception {
+        userInfoAuditService.updateStatusByIdUserInfo(registration);
+        return ResponseUtil.newInstance().ok("操作成功");
+    }
+
     /**
      * 获取用户信息审核数据
      * @param enrollmentUserInfoAudit

+ 1 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/EnrollmentUserInfoAuditMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentUserInfoAudit;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * @version 1.0
@@ -13,5 +14,4 @@ import org.apache.ibatis.annotations.Mapper;
 @InterceptorIgnore(tenantLine = "true")
 public interface EnrollmentUserInfoAuditMapper extends BaseMapper<EnrollmentUserInfoAudit> {
 
-
 }

+ 3 - 28
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/xml/EnrollmentUserInfoAuditMapper.xml

@@ -29,34 +29,6 @@
         a.registration_id
     </sql>
 
-    <select id="getByRegistrationId"
-            resultType="com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentUserInfoAudit">
-        select
-        <include refid="Base_Column_List"></include>
-        from human_resources_enrollment_edu_info a
-        where a.del_flag = '0'
-        <if test="userId != null and userId != ''">
-            and a.user_id = #{userId}
-        </if>
-    </select>
-
-    <select id="getById"
-            resultType="com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentUserInfoAudit">
-        select
-        <include refid="Base_Column_List"></include>,
-        re.name as userName,
-        so.name as departmentName
-        from human_resources_enrollment_edu_info a
-        left join human_resources_enrollment_registration re on a.user_id = re.user_id
-        left join sys_office so on re.department = so.id
-        where a.id = #{id} and a.del_flag = '0'
-    </select>
-
-    <delete id="deleteByRegistrationId" parameterType="String">
-        DELETE FROM human_resources_enrollment_edu_info
-        WHERE enrollment_registration_id = #{enrollmentRegistrationId}
-    </delete>
-
     <select id="findDtos" resultType="com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO">
         SELECT
             id,
@@ -71,4 +43,7 @@
             del_flag = 0
           AND attachment_id = #{id}
     </select>
+
+
+
 </mapper>

+ 31 - 13
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java

@@ -992,10 +992,10 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             String businessId = enrollmentUserInfoAudit.getId();
             String title = enrollmentUserInfoAudit.getName() + "发起了- [" + enrollmentUserInfoAudit.getName() + "员工信息完善]";
             //根据角色查用户信息
-            //RoleDTO roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName2("实习信息审核员");
-            //String assignee = getAssignee(roleDTO.getId());
+            RoleDTO roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName2("实习信息审核员");
+            String assignee = getAssignee(roleDTO.getId());
             String recordType = "";
-            Map<String, String> newMap = pingMap(procDefId, procDefKey, businessTable, businessId, title,"", recordType);
+            Map<String, String> newMap = pingMap(procDefId, procDefKey, businessTable, businessId, title,assignee, recordType);
             newMap.put("userId",registrationData.getUserId());
             allMap.put("员工信息审批", newMap);
             SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
@@ -1008,7 +1008,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
                 saveAttachments(enrollmentUserInfoAudit.getIdCardBack(), "idCardBack", enrollmentUserInfoAudit.getId(), userDTO, workAttachmentApi);
                 saveEnrollmentDetailInfo(registrationData);
             } else {
-                updateEnrollmentDetailInfo(registrationData);
+                updateEnrollmentDetailInfo(registrationData,"2");
             }
         } catch (Exception e) {
             throw new RuntimeException(e);
@@ -1100,12 +1100,12 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         }
     }
 
-    public void updateEnrollmentDetailInfo(EnrollmentRegistration dto) {
+    public void updateEnrollmentDetailInfo(EnrollmentRegistration dto,String status) {
         // 教育经历
         List<EnrollmentEduInfo> eduList = dto.getEduInfoList();
         if (CollectionUtils.isNotEmpty(eduList)) {
             eduList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 eduInfoService.saveOrUpdate(item);
             });
         }
@@ -1114,7 +1114,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         List<EnrollmentWorkInfo> workList = dto.getWorkInfoList();
         if (CollectionUtils.isNotEmpty(workList)) {
             workList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 workInfoService.saveOrUpdate(item);
             });
         }
@@ -1124,7 +1124,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         if (CollectionUtils.isNotEmpty(trainingList)) {
             trainingList.forEach(item -> item.setStatus("2"));
             trainingList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 trainingInfoService.saveOrUpdate(item);
             });
         }
@@ -1133,7 +1133,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         List<EnrollmentCertificateInfo> certificateList = dto.getCertificateInfoList();
         if (CollectionUtils.isNotEmpty(certificateList)) {
             certificateList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 certificateInfoService.saveOrUpdate(item);
             });
         }
@@ -1142,7 +1142,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         List<EnrollmentSkillInfo> skillList = dto.getSkillInfoList();
         if (CollectionUtils.isNotEmpty(skillList)) {
             skillList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 skillInfoService.saveOrUpdate(item);
             });
         }
@@ -1151,7 +1151,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         List<EnrollmentLanguageInfo> languageList = dto.getLanguageInfoList();
         if (CollectionUtils.isNotEmpty(languageList)) {
             languageList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 languageInfoService.saveOrUpdate(item);
             });
 
@@ -1161,7 +1161,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         List<EnrollmentFamilyInfo> familyList = dto.getFamilyInfoList();
         if (CollectionUtils.isNotEmpty(familyList)) {
             familyList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 familyInfoService.saveOrUpdate(item);
             });
         }
@@ -1170,7 +1170,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         List<EnrollmentRewardInfo> rewardList = dto.getRewardInfoList();
         if (CollectionUtils.isNotEmpty(rewardList)) {
             rewardList.forEach(item -> {
-                item.setStatus("2");
+                item.setStatus(status);
                 rewardInfoService.saveOrUpdate(item);
             });
 
@@ -1683,6 +1683,24 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         return enrollmentRegistrations;
     }
 
+    public void updateStatusByIdUserInfo(EnrollmentRegistration registrationData) {
+        try {
+            EnrollmentUserInfoAudit enrollmentUserInfoAudit = new EnrollmentUserInfoAudit();
+            enrollmentUserInfoAudit.setStatus("4");
+            enrollmentUserInfoAudit.setId(registrationData.getId());
+            enrollmentUserInfoAudit.setProcInsId("");
+            enrollmentUserInfoAudit.setProcessDefinitionId("");
+            enrollmentUserInfoAudit.setRegistrationId(registrationData.getRegistrationId());
+            userInfoAuditService.saveOrUpdate(enrollmentUserInfoAudit);
+            //更新提交审批的时间
+            mapper.updateApprovalTime(registrationData.getUserId());
+            updateEnrollmentDetailInfo(registrationData,"4");
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+
     /**
      * 批量下载附件压缩包
      *

+ 5 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentUserInfoAuditService.java

@@ -353,4 +353,9 @@ public class EnrollmentUserInfoAuditService extends ServiceImpl<EnrollmentUserIn
     }
 
 
+    public void updateStatusByIdUserInfo(EnrollmentRegistration registration){
+        enrollmentRegistrationService.updateStatusByIdUserInfo(registration);
+    }
+
+
 }

+ 1 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -135,6 +135,7 @@ public interface UserMapper extends BaseMapper <User> {
      * @param queryWrapper
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     IPage <UserDTO> findListByRole(Page <UserDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);