Browse Source

人力资源代码提交

wangqiang 1 year ago
parent
commit
19fbfa1580
59 changed files with 2620 additions and 15 deletions
  1. 10 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java
  2. 6 1
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/HumanApiFallBackFactory.java
  3. 5 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java
  4. 7 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IHumanApi.java
  5. 7 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java
  6. 11 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java
  7. 2 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java
  8. 89 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java
  9. 6 1
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java
  10. 64 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverAccountsController.java
  11. 64 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverComputerController.java
  12. 63 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverController.java
  13. 64 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverDraftController.java
  14. 63 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverImprestController.java
  15. 63 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverRecoveryController.java
  16. 64 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverSocialSecurityController.java
  17. 26 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/Handover.java
  18. 28 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverAccounts.java
  19. 23 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverArrears.java
  20. 28 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverComputer.java
  21. 28 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverDraft.java
  22. 28 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverImprest.java
  23. 28 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverRecovery.java
  24. 28 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverSocialSecurity.java
  25. 29 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverAccountsMapper.java
  26. 17 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverArrearsMapper.java
  27. 22 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverComputerMapper.java
  28. 22 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverDraftMapper.java
  29. 21 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverImprestMapper.java
  30. 22 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverMapper.java
  31. 22 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverRecoveryMapper.java
  32. 21 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverSocialSecurityMapper.java
  33. 39 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverAccountsMapper.xml
  34. 4 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverArrearsMapper.xml
  35. 31 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverComputerMapper.xml
  36. 30 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverDraftMapper.xml
  37. 31 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverImprestMapper.xml
  38. 33 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverMapper.xml
  39. 29 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverRecoveryMapper.xml
  40. 30 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverSocialSecurityMapper.xml
  41. 140 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverAccountsService.java
  42. 17 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverArrearsService.java
  43. 143 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverComputerService.java
  44. 146 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverDraftService.java
  45. 142 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverImprestService.java
  46. 156 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverRecoveryService.java
  47. 294 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java
  48. 144 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverSocialSecurityService.java
  49. 11 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/domain/DepartRegistration.java
  50. 7 1
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/mapper/xml/DepartMapper.xml
  51. 9 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/EnrollmentRegistrationMapper.java
  52. 11 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/xml/EnrollmentRegistrationMapper.xml
  53. 32 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java
  54. 20 5
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRiceCardService.java
  55. 15 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/practice/register/controller/RegisterController.java
  56. 29 5
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/practice/register/service/RegistrationService.java
  57. 7 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java
  58. 62 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/jeeplus/domain/EnrollmentRegistrationInfo.java
  59. 27 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

+ 10 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java

@@ -47,6 +47,16 @@ public class FlowableApiFallbackFactory implements FallbackFactory <IFlowableApi
             }
 
             @Override
+            public Map<String ,String > startForFenNew(Map<String, Map<String, String>> map) {
+                return null;
+            }
+
+            @Override
+            public String updateAssignee(Map<String, String> map) {
+                return null;
+            }
+
+            @Override
             public void insertMyNotice(Map<String, String> map) {
 
             }

+ 6 - 1
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/HumanApiFallBackFactory.java

@@ -16,7 +16,7 @@ public class HumanApiFallBackFactory implements FallbackFactory<IHumanApi> {
 
     @Override
     public IHumanApi create(Throwable cause) {
-        log.error ( "财务服务调用失败:{}", cause.getMessage ( ) );
+        log.error ( "人力资源服务调用失败:{}", cause.getMessage ( ) );
         return new IHumanApi() {
 
 
@@ -29,6 +29,11 @@ public class HumanApiFallBackFactory implements FallbackFactory<IHumanApi> {
             public String getTimeOutReimburseRegisters() {
                 return null;
             }
+
+            @Override
+            public String getFormalUserInfo() {
+                return null;
+            }
         };
     }
 }

+ 5 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java

@@ -29,6 +29,11 @@ public interface IFlowableApi {
     @RequestMapping(value = "/flowable/task/startForFen", method = RequestMethod.POST)
     String startForFen(@RequestBody Map<String ,String > map);
 
+    @RequestMapping(value = "/flowable/task/startForFenNew", method = RequestMethod.POST)
+    Map<String ,String > startForFenNew(@RequestBody Map<String ,Map<String ,String > > map);
+
+    @RequestMapping(value = "/flowable/task/updateAssignee", method = RequestMethod.POST)
+    String updateAssignee(@RequestBody Map<String ,String > map);
     /**
      * 根据通知信息查询数据
      * @param map

+ 7 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IHumanApi.java

@@ -26,4 +26,11 @@ public interface IHumanApi {
      */
     @GetMapping(value = "/register/getTimeOutReimburseRegisters")
     String getTimeOutReimburseRegisters();
+
+    /**
+     * 获取正式工在职状态为离职的,并且user表中未删除的
+     * @return
+     */
+    @GetMapping(value = "/register/getFormalUserInfo")
+    String getFormalUserInfo();
 }

+ 7 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java

@@ -11,8 +11,10 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
 
+import java.io.IOException;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 /**
@@ -28,6 +30,11 @@ public class UserApiFallbackFactory implements FallbackFactory <IUserApi> {
         log.error ( "用户服务调用失败:{}", throwable.getMessage ( ) );
         throwable.printStackTrace ( );
         return new IUserApi ( ) {
+            @Override
+            public Map<String, Object> sendRandomCodes(String mobile, String randomCode) throws IOException {
+                return null;
+            }
+
             public UserDTO getByLoginName(String loginName, String tenantId) {
                 return null;
             }

+ 11 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java

@@ -10,7 +10,9 @@ import com.jeeplus.sys.service.dto.UserDTO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
+import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 
@@ -20,6 +22,15 @@ public interface IUserApi {
     String BASE_URL = "/feign/sys/user";
 
     /**
+     * 发送短信
+     * @param mobile
+     * @param randomCode
+     * @return
+     */
+    @GetMapping(value = BASE_URL + "/sendRandomCodes")
+    Map<String ,Object> sendRandomCodes(@RequestParam(value = "mobile")String mobile, @RequestParam(value = "randomCode")String randomCode) throws IOException;
+
+    /**
      * 根据登录名获取用户
      *
      * @param loginName

+ 2 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java

@@ -98,8 +98,8 @@ public class CwProjectReportController {
     @PostMapping("saveSignFiles")
     public ResponseEntity saveSignFiles(@RequestBody CwProjectReportData reportData) {
         System.out.println("进入controller前");
-        //UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
-        UserDTO userDTO = new UserDTO();
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+//        UserDTO userDTO = new UserDTO();
         if (CollectionUtil.isEmpty(reportData.getCwFileInfoList())) {
             reportData.setCwFileInfoList(new ArrayList<>());
         }

+ 89 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java

@@ -47,6 +47,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -225,6 +226,94 @@ public class FlowableTaskController {
     }
 
     /**
+     * 启动流程
+     */
+    @PostMapping("startForFenNew")
+    public Map<String ,String > startForFenNew(@RequestBody Map<String ,Map<String ,String > > map) {
+
+        Map<String ,String > map1 = new HashMap();
+
+        for (Map.Entry<String ,Map<String ,String >> entry : map.entrySet()) {
+            String key = entry.getKey();
+            if (key.equals("底稿")){
+                String procInsId = getProcInsId(entry);
+                map1.put("底稿", procInsId);
+            } else if (key.equals("电脑")){
+                String procInsId = getProcInsId(entry);
+                map1.put("电脑", procInsId);
+            } else if (key.equals("应收账款")){
+                String procInsId = getProcInsId(entry);
+                map1.put("应收账款", procInsId);
+            } else if (key.equals("社保欠款")){
+                String procInsId = getProcInsId(entry);
+                map1.put("社保欠款", procInsId);
+            } else if (key.equals("备用金")){
+                String procInsId = getProcInsId(entry);
+                map1.put("备用金", procInsId);
+            }
+        }
+        return map1 ;
+    }
+
+    public String getProcInsId(Map.Entry<String ,Map<String ,String >> entry){
+        Map<String ,String > valueMap = entry.getValue();
+        String procDefKey = valueMap.get("procDefKey");
+        String procDefId = valueMap.get("procDefId");
+        String businessTable = valueMap.get("businessTable");
+        String businessId = valueMap.get("businessId");
+        String title = valueMap.get("title");
+        String recordType = valueMap.get("recordType");
+        String assignee = valueMap.get("assignee");
+        if ( StrUtil.isBlank ( procDefKey ) && StrUtil.isNotBlank ( procDefId ) ) {
+            procDefKey = StrUtil.split ( procDefId, ":" ).get ( 0 );
+        }
+
+        String procInsId = flowTaskService.startProcessForFen ( procDefKey, businessTable, businessId, title,recordType, procDefId );
+
+        //指定下一步处理人
+        if ( StringUtils.isNotBlank ( assignee ) ) {
+            Task task = taskService.createTaskQuery ( ).processInstanceId ( procInsId ).active ( ).singleResult ( );
+            if(task != null){
+                String[] split = assignee.split(",");
+                if (split.length == 1) {
+                    taskService.setAssignee(task.getId(), assignee);
+                } else {
+                    for (String i : split) {
+                        taskService.addCandidateUser(task.getId(),i);
+                    }
+                }
+            }
+        }
+        return procInsId;
+    }
+
+    /**
+     * 设置下一节点审核人
+     */
+    @PostMapping("updateAssignee")
+    public String updateAssignee(@RequestBody Map<String ,String > map) {
+
+        String procInsId = map.get("procInsId");
+        String assignee = map.get("assignee");
+
+        //指定下一步处理人
+        if ( StringUtils.isNotBlank ( assignee ) ) {
+            Task task = taskService.createTaskQuery ( ).processInstanceId ( procInsId ).active ( ).singleResult ( );
+            if(task != null){
+                String[] split = assignee.split(",");
+                if (split.length == 1) {
+                    taskService.setAssignee(task.getId(), assignee);
+                } else {
+                    for (String i : split) {
+                        taskService.addCandidateUser(task.getId(),i);
+                    }
+                }
+            }
+        }
+        return procInsId ;
+    }
+
+    /**
      * 签收任务
      */
     @PostMapping("claim")

+ 6 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

@@ -707,7 +707,12 @@ public class FlowTaskService {
 
         String userId = (String) vars.get ( FlowableConstant.INITIATOR );
         if ( userId == null ) {
-            userId = userApi.getByToken ( TokenProvider.getCurrentToken ( ) ).getId ( );
+            if (TokenProvider.getCurrentToken ( ) == null) {
+                userId = "1";
+            } else {
+                userId = userApi.getByToken ( TokenProvider.getCurrentToken ( ) ).getId ( );
+            }
+
         }
         String userName = userApi.getById ( userId ).getName ( );
         vars.put ( FlowableConstant.USERNAME, userName );

+ 64 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverAccountsController.java

@@ -0,0 +1,64 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.HandoverAccounts;
+import com.jeeplus.human.depart.handover.domain.HandoverComputer;
+import com.jeeplus.human.depart.handover.service.HandoverAccountsService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-06 16:03
+ */
+@RestController
+@Api("应收账款")
+@RequestMapping(value = "/handoverAccounts")
+public class HandoverAccountsController {
+
+    @Resource
+    private HandoverAccountsService accountsService;
+
+    /**
+     * 保存应收账款信息
+     * @param accounts
+     * @return
+     */
+    @ApiLog(value = "保存应收账款信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody HandoverAccounts accounts) throws Exception {
+        HandoverAccounts s = accountsService.saveComputer(accounts);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover_draft")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<HandoverAccounts> findById(@RequestParam String id) throws Exception{
+        HandoverAccounts dto = accountsService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody HandoverAccounts dto) {
+        accountsService.updateStatusById(dto);
+    }
+}

+ 64 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverComputerController.java

@@ -0,0 +1,64 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.HandoverComputer;
+import com.jeeplus.human.depart.handover.domain.HandoverDraft;
+import com.jeeplus.human.depart.handover.service.HandoverComputerService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-06 10:57
+ */
+@RestController
+@Api("电脑款项检查")
+@RequestMapping(value = "/handoverComputer")
+public class HandoverComputerController {
+
+    @Resource
+    private HandoverComputerService computerService;
+
+    /**
+     * 保存电脑款项信息
+     * @param computer
+     * @return
+     */
+    @ApiLog(value = "保存电脑款项信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody HandoverComputer computer) throws Exception {
+        HandoverComputer s = computerService.saveComputer(computer);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover_draft")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<HandoverComputer> findById(@RequestParam String id) throws Exception{
+        HandoverComputer dto = computerService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody HandoverComputer dto) {
+        computerService.updateStatusById(dto);
+    }
+}

+ 63 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverController.java

@@ -0,0 +1,63 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.handover.service.HandoverService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:04
+ */
+@RestController
+@Api("离职交接")
+@RequestMapping(value = "/handover")
+public class HandoverController {
+
+    @Resource
+    private HandoverService handoverService;
+
+    /**
+     * 保存离职交接信息
+     * @param handover
+     * @return
+     */
+    @ApiLog(value = "保存离职交接信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody Handover handover) throws Exception {
+        Handover s = handoverService.saveRegistration(handover);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<Handover> findById(@RequestParam String id) throws Exception{
+        Handover dto = handoverService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody Handover dto) {
+        handoverService.updateStatusById(dto);
+    }
+}

+ 64 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverDraftController.java

@@ -0,0 +1,64 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.handover.domain.HandoverDraft;
+import com.jeeplus.human.depart.handover.service.HandoverDraftService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-02 9:49
+ */
+@RestController
+@Api("底稿归档检查")
+@RequestMapping(value = "/handoverDraft")
+public class HandoverDraftController {
+
+    @Resource
+    private HandoverDraftService draftService;
+
+    /**
+     * 保存离职交接信息
+     * @param draft
+     * @return
+     */
+    @ApiLog(value = "保存底稿归档信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody HandoverDraft draft) throws Exception {
+        HandoverDraft s = draftService.saveDraft(draft);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover_draft")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<HandoverDraft> findById(@RequestParam String id) throws Exception{
+        HandoverDraft dto = draftService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody HandoverDraft dto) {
+        draftService.updateStatusById(dto);
+    }
+}

+ 63 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverImprestController.java

@@ -0,0 +1,63 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.HandoverImprest;
+import com.jeeplus.human.depart.handover.service.HandoverImprestService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-14 9:11
+ */
+@RestController
+@Api("备用金")
+@RequestMapping(value = "/handoverImprest")
+public class HandoverImprestController {
+
+    @Resource
+    private HandoverImprestService imprestService;
+
+    /**
+     * 保存应收账款信息
+     * @param imprest
+     * @return
+     */
+    @ApiLog(value = "保存社保账款信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody HandoverImprest imprest) throws Exception {
+        HandoverImprest s = imprestService.saveImprest(imprest);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover_imprest")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<HandoverImprest> findById(@RequestParam String id) throws Exception{
+        HandoverImprest dto = imprestService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody HandoverImprest dto) {
+        imprestService.updateStatusById(dto);
+    }
+}

+ 63 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverRecoveryController.java

@@ -0,0 +1,63 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.service.HandoverRecoveryService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-15 8:56
+ */
+@RestController
+@Api("门卡回收")
+@RequestMapping(value = "/handoverRecovery")
+public class HandoverRecoveryController {
+
+    @Resource
+    private HandoverRecoveryService recoveryService;
+
+    /**
+     * 保存应收账款信息
+     * @param handoverRecovery
+     * @return
+     */
+    @ApiLog(value = "保存社保账款信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody HandoverRecovery handoverRecovery) throws Exception {
+        HandoverRecovery s = recoveryService.saveHandoverRecovery(handoverRecovery);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover_recovery")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<HandoverRecovery> findById(@RequestParam String id) throws Exception{
+        HandoverRecovery dto = recoveryService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody HandoverRecovery dto) {
+        recoveryService.updateStatusById(dto);
+    }
+}

+ 64 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverSocialSecurityController.java

@@ -0,0 +1,64 @@
+package com.jeeplus.human.depart.handover.controller;
+
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.depart.handover.domain.HandoverAccounts;
+import com.jeeplus.human.depart.handover.domain.HandoverSocialSecurity;
+import com.jeeplus.human.depart.handover.service.HandoverSocialSecurityService;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-07 9:34
+ */
+@RestController
+@Api("社保账款")
+@RequestMapping(value = "/handoverSocialSecurity")
+public class HandoverSocialSecurityController {
+
+    @Resource
+    private HandoverSocialSecurityService securityService;
+
+    /**
+     * 保存应收账款信息
+     * @param socialSecurity
+     * @return
+     */
+    @ApiLog(value = "保存社保账款信息", type = LogTypeEnum.SAVE)
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody HandoverSocialSecurity socialSecurity) throws Exception {
+        HandoverSocialSecurity s = securityService.saveSocialSecurity(socialSecurity);
+        return ResponseUtil.newInstance().add("businessTable", "human_resources_depart_handover_social_security")
+                .add("businessId", s.getId())
+                .ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<HandoverSocialSecurity> findById(@RequestParam String id) throws Exception{
+        HandoverSocialSecurity dto = securityService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 根据id修改状态status
+     */
+    @ApiOperation(value = "根据id修改状态status")
+    @PostMapping(value = "updateStatusById")
+    public void updateStatusById(@RequestBody HandoverSocialSecurity dto) {
+        securityService.updateStatusById(dto);
+    }
+}

+ 26 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/Handover.java

@@ -0,0 +1,26 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 离职交接表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover")
+public class Handover extends BaseEntity {
+
+    private String name;
+    private String projectManager;      //项目经理
+    private String remarks;                 //备注
+    private String department;              //所属部门
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String draftAdministrator;  //底稿管理员
+    private String registrationId;      //离职申请表id
+}

+ 28 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverAccounts.java

@@ -0,0 +1,28 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 应收账款表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_accounts")
+public class HandoverAccounts extends BaseEntity {
+
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+
+    @TableField(exist = false)
+    private String assigneeId;
+
+    @TableField(exist = false)
+    private String draftAdministrator;
+}

+ 23 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverArrears.java

@@ -0,0 +1,23 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 欠款回收
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_arrears")
+public class HandoverArrears extends BaseEntity {
+
+    private String name;
+    private String remarks;                 //备注
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+}

+ 28 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverComputer.java

@@ -0,0 +1,28 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 电脑款项检查表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_computer")
+public class HandoverComputer extends BaseEntity {
+
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+
+    @TableField(exist = false)
+    private String assigneeId;
+
+    @TableField(exist = false)
+    private String draftAdministrator;
+}

+ 28 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverDraft.java

@@ -0,0 +1,28 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 底稿归档表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_draft")
+public class HandoverDraft extends BaseEntity {
+
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+
+    @TableField(exist = false)
+    private String assigneeId;
+
+    @TableField(exist = false)
+    private String draftAdministrator;
+}

+ 28 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverImprest.java

@@ -0,0 +1,28 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 备用金检查表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_imprest")
+public class HandoverImprest extends BaseEntity {
+
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+
+    @TableField(exist = false)
+    private String assigneeId;
+
+    @TableField(exist = false)
+    private String draftAdministrator;
+}

+ 28 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverRecovery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 门卡回收表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_recovery")
+public class HandoverRecovery extends BaseEntity {
+
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+
+    @TableField(exist = false)
+    private String assigneeId;
+
+    @TableField(exist = false)
+    private String draftAdministrator;
+}

+ 28 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverSocialSecurity.java

@@ -0,0 +1,28 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 社保账款表
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:00
+ */
+@Data
+@TableName("human_resources_depart_handover_social_security")
+public class HandoverSocialSecurity extends BaseEntity {
+
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String handoverId;      //离职交接表id
+
+    @TableField(exist = false)
+    private String assigneeId;
+
+    @TableField(exist = false)
+    private String draftAdministrator;
+}

+ 29 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverAccountsMapper.java

@@ -0,0 +1,29 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverAccounts;
+import com.jeeplus.human.depart.handover.domain.HandoverComputer;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-06 16:01
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverAccountsMapper extends BaseMapper<HandoverAccounts> {
+
+    HandoverAccounts getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+
+    /**
+     * 根据离职交接表id查询 底稿归档检查流程、电脑款项检查流程、应收账款检查流程、社保账款检查流程、备用金检查流程是否都已经 审核结束
+     * @param handoverId
+     * @return
+     */
+    int selectAllActivityIsComplete(@Param("handoverId")String handoverId);
+}

+ 17 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverArrearsMapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverArrears;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 15:59
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverArrearsMapper extends BaseMapper<HandoverArrears> {
+
+}

+ 22 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverComputerMapper.java

@@ -0,0 +1,22 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverComputer;
+import com.jeeplus.human.depart.handover.domain.HandoverDraft;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-06 10:54
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverComputerMapper extends BaseMapper<HandoverComputer> {
+
+    HandoverComputer getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+}

+ 22 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverDraftMapper.java

@@ -0,0 +1,22 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverDraft;
+import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentWageCard;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 16:19
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverDraftMapper extends BaseMapper<HandoverDraft> {
+
+    HandoverDraft getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+}

+ 21 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverImprestMapper.java

@@ -0,0 +1,21 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverImprest;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-14 9:09
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverImprestMapper extends BaseMapper<HandoverImprest> {
+
+    HandoverImprest getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+}

+ 22 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverMapper.java

@@ -0,0 +1,22 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.registration.domain.DepartRegistration;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:02
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverMapper extends BaseMapper<Handover> {
+
+    Handover getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+}

+ 22 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverRecoveryMapper.java

@@ -0,0 +1,22 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.domain.HandoverSocialSecurity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-15 8:53
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverRecoveryMapper extends BaseMapper<HandoverRecovery> {
+
+    HandoverRecovery getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+}

+ 21 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverSocialSecurityMapper.java

@@ -0,0 +1,21 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.HandoverSocialSecurity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-07 9:30
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverSocialSecurityMapper extends BaseMapper<HandoverSocialSecurity> {
+
+    HandoverSocialSecurity getById(@Param("id") String id);
+
+    void updateStatusById(@Param("id") String id, @Param("type") String type);
+}

+ 39 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverAccountsMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverAccountsMapper">
+
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.handover_id
+    </sql>
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover_accounts SET type = #{type}
+		WHERE id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.HandoverAccounts">
+        select
+        <include refid="Base_Column_List"></include>,
+        b.create_by_id as assigneeId,
+        b.draft_administrator as draftAdministrator
+        from human_resources_depart_handover_accounts a
+        left join human_resources_depart_handover b on a.handover_id = b.id
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+    <select id="selectAllActivityIsComplete" resultType="java.lang.Integer">
+        SELECT count(*) FROM `human_resources_depart_handover_draft` a
+        inner JOIN human_resources_depart_handover_accounts b on a.handover_id = b.handover_id and b.type = '5'
+        inner JOIN human_resources_depart_handover_computer c on a.handover_id = c.handover_id and c.type = '5'
+        inner JOIN human_resources_depart_handover_imprest d on a.handover_id = d.handover_id and d.type = '5'
+        inner JOIN human_resources_depart_handover_social_security e on a.handover_id = e.handover_id and e.type = '5'
+        WHERE a.type = '5' and a.handover_id = #{handoverId}
+    </select>
+</mapper>

+ 4 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverArrearsMapper.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverArrearsMapper">
+</mapper>

+ 31 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverComputerMapper.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverComputerMapper">
+
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.handover_id
+    </sql>
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover_computer SET type = #{type}
+		WHERE id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.HandoverComputer">
+        select
+        <include refid="Base_Column_List"></include>,
+        b.create_by_id as assigneeId,
+        b.draft_administrator as draftAdministrator
+        from human_resources_depart_handover_computer a
+        left join human_resources_depart_handover b on a.handover_id = b.id
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+</mapper>

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverDraftMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverDraftMapper">
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.handover_id
+    </sql>
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover_draft SET type = #{type}
+		WHERE id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.HandoverDraft">
+        select
+        <include refid="Base_Column_List"></include>,
+        b.create_by_id as assigneeId,
+        b.draft_administrator as draftAdministrator
+        from human_resources_depart_handover_draft a
+        left join human_resources_depart_handover b on a.handover_id = b.id
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+</mapper>

+ 31 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverImprestMapper.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverImprestMapper">
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.handover_id
+    </sql>
+
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover_imprest SET type = #{type}
+		WHERE id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.HandoverImprest">
+        select
+        <include refid="Base_Column_List"></include>,
+        b.create_by_id as assigneeId,
+        b.draft_administrator as draftAdministrator
+        from human_resources_depart_handover_imprest a
+        left join human_resources_depart_handover b on a.handover_id = b.id
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+</mapper>

+ 33 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverMapper">
+
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.name,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.project_manager,
+        a.remarks,
+        a.department,
+        a.draft_administrator,
+        a.registration_id
+    </sql>
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover SET type = #{type}
+		WHERE id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.Handover">
+        select
+        <include refid="Base_Column_List"></include>
+        from human_resources_depart_handover a
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+</mapper>

+ 29 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverRecoveryMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverRecoveryMapper">
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.handover_id
+    </sql>
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.HandoverRecovery">
+        select
+        <include refid="Base_Column_List"></include>,
+        b.create_by_id as assigneeId,
+        b.draft_administrator as draftAdministrator
+        from human_resources_depart_handover_recovery a
+        left join human_resources_depart_handover b on a.handover_id = b.id
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover_recovery SET type = #{type}
+		WHERE id = #{id}
+    </update>
+</mapper>

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverSocialSecurityMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.human.depart.handover.mapper.HandoverSocialSecurityMapper">
+    <sql id="Base_Column_List">
+        a.id,
+        a.create_by_id,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.type,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.handover_id
+    </sql>
+    <update id="updateStatusById">
+        UPDATE human_resources_depart_handover_social_security SET type = #{type}
+		WHERE id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.HandoverSocialSecurity">
+        select
+        <include refid="Base_Column_List"></include>,
+        b.create_by_id as assigneeId,
+        b.draft_administrator as draftAdministrator
+        from human_resources_depart_handover_social_security a
+        left join human_resources_depart_handover b on a.handover_id = b.id
+        where a.id = #{id} and a.del_flag = '0'
+    </select>
+</mapper>

+ 140 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverAccountsService.java

@@ -0,0 +1,140 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.HandoverAccounts;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.mapper.HandoverAccountsMapper;
+import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentRiceCard;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-06 16:02
+ */
+@Service
+@Transactional
+public class HandoverAccountsService extends ServiceImpl<HandoverAccountsMapper, HandoverAccounts> {
+
+    @Resource
+    private HandoverAccountsMapper accountsMapper;
+
+    @Resource
+    private HandoverRecoveryService recoveryService;
+
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<HandoverAccounts> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("handover_id",id);
+        accountsMapper.delete(queryWrapper);
+    }
+
+    public HandoverAccounts findById(String id) throws Exception {
+        // 查询基础信息表
+        HandoverAccounts info = accountsMapper.getById(id);
+        return info;
+    }
+
+    public void updateStatusById(HandoverAccounts dto) {
+        accountsMapper.updateStatusById(dto.getId(), dto.getType());
+
+    }
+
+    public HandoverAccounts saveComputer(HandoverAccounts accounts) throws Exception {
+        if (StringUtils.isNotEmpty(accounts.getId())){
+
+            HandoverAccounts report = accountsMapper.getById(accounts.getId());
+            if (report != null){
+                accounts.setCreateById(report.getCreateById());
+                return update(accounts);
+            }
+        }
+        return add(accounts);
+    }
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverAccounts add(HandoverAccounts reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverAccounts report = new HandoverAccounts();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        accountsMapper.insert(report);
+
+        return report;
+    }
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverAccounts update(HandoverAccounts reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverAccounts report = new HandoverAccounts();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        accountsMapper.updateById(report);
+
+        if (report.getType().equals("5")) {
+            int i = accountsMapper.selectAllActivityIsComplete(report.getHandoverId());
+            if (i != 0) {
+                //发起门卡回收流程
+                Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("门卡回收流程");
+                String procDefId = map.get("id")+"";
+                //发起完善餐补卡号流程
+                String uid = UUID.randomUUID().toString().replace("-", "");
+                HandoverRecovery recovery = new HandoverRecovery();
+                recovery.setId(uid);
+                recovery.setCreateById("1");
+                recovery.setUpdateById("1");
+                recovery.setProcessDefinitionId(procDefId);
+                recovery.setHandoverId(report.getHandoverId());
+                recoveryService.save(recovery);
+
+                String procDefKey = map.get("key")+"";
+                String businessTable = "human_resources_depart_handover_recovery";
+                String businessId = uid;
+                String title = "门卡回收";
+                String assignee = report.getCreateById();
+                String recordType = "";
+                Map<String,String> newMap = new HashMap();
+                newMap.put("procDefId", procDefId);
+                newMap.put("procDefKey", procDefKey);
+                newMap.put("businessTable", businessTable);
+                newMap.put("businessId", businessId);
+                newMap.put("title", title);
+                newMap.put("assignee", assignee);
+                newMap.put("recordType", recordType);
+                SpringUtil.getBean(IFlowableApi.class).startForFen(newMap);
+                recovery.setType("2");
+                recoveryService.saveOrUpdate(recovery);
+            }
+        }
+
+        return report;
+    }
+}

+ 17 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverArrearsService.java

@@ -0,0 +1,17 @@
+package com.jeeplus.human.depart.handover.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.human.depart.handover.domain.HandoverArrears;
+import com.jeeplus.human.depart.handover.mapper.HandoverArrearsMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 16:00
+ */
+@Service
+@Transactional
+public class HandoverArrearsService extends ServiceImpl<HandoverArrearsMapper, HandoverArrears> {
+}

+ 143 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverComputerService.java

@@ -0,0 +1,143 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.HandoverComputer;
+import com.jeeplus.human.depart.handover.domain.HandoverDraft;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.mapper.HandoverAccountsMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverComputerMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-06 10:56
+ */
+@Service
+@Transactional
+public class HandoverComputerService extends ServiceImpl<HandoverComputerMapper, HandoverComputer> {
+
+    @Resource
+    private HandoverComputerMapper computerMapper;
+
+    @Resource
+    private HandoverAccountsMapper accountsMapper;
+
+    @Resource
+    private HandoverRecoveryService recoveryService;
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<HandoverComputer> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("handover_id",id);
+        computerMapper.delete(queryWrapper);
+    }
+
+    public HandoverComputer findById(String id) throws Exception {
+        // 查询基础信息表
+        HandoverComputer info = computerMapper.getById(id);
+        return info;
+    }
+
+    public void updateStatusById(HandoverComputer dto) {
+        computerMapper.updateStatusById(dto.getId(), dto.getType());
+
+    }
+
+    public HandoverComputer saveComputer(HandoverComputer computer) throws Exception {
+        if (StringUtils.isNotEmpty(computer.getId())){
+
+            HandoverComputer report = computerMapper.getById(computer.getId());
+            if (report != null){
+                return update(computer);
+            }
+        }
+        return add(computer);
+    }
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverComputer add(HandoverComputer reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverComputer report = new HandoverComputer();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        computerMapper.insert(report);
+
+        return report;
+    }
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverComputer update(HandoverComputer reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverComputer report = new HandoverComputer();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        computerMapper.updateById(report);
+
+        if (report.getType().equals("5")) {
+            int i = accountsMapper.selectAllActivityIsComplete(report.getHandoverId());
+            if (i != 0) {
+                //发起门卡回收流程
+                Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("门卡回收流程");
+                String procDefId = map.get("id")+"";
+                //发起完善餐补卡号流程
+                String uid = UUID.randomUUID().toString().replace("-", "");
+                HandoverRecovery recovery = new HandoverRecovery();
+                recovery.setId(uid);
+                recovery.setCreateById("1");
+                recovery.setUpdateById("1");
+                recovery.setProcessDefinitionId(procDefId);
+                recovery.setHandoverId(report.getHandoverId());
+                recoveryService.save(recovery);
+
+                String procDefKey = map.get("key")+"";
+                String businessTable = "human_resources_depart_handover_recovery";
+                String businessId = uid;
+                String title = "门卡回收";
+                String assignee = report.getCreateById();
+                String recordType = "";
+                Map<String,String> newMap = new HashMap();
+                newMap.put("procDefId", procDefId);
+                newMap.put("procDefKey", procDefKey);
+                newMap.put("businessTable", businessTable);
+                newMap.put("businessId", businessId);
+                newMap.put("title", title);
+                newMap.put("assignee", assignee);
+                newMap.put("recordType", recordType);
+                SpringUtil.getBean(IFlowableApi.class).startForFen(newMap);
+                recovery.setType("2");
+                recoveryService.saveOrUpdate(recovery);
+
+            }
+        }
+
+        return report;
+    }
+}

+ 146 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverDraftService.java

@@ -0,0 +1,146 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.handover.domain.HandoverDraft;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.mapper.HandoverAccountsMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverDraftMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverMapper;
+import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentWageCard;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 16:27
+ */
+@Service
+@Transactional
+public class HandoverDraftService extends ServiceImpl<HandoverDraftMapper, HandoverDraft> {
+
+    @Resource
+    private HandoverDraftMapper draftMapper;
+
+    @Resource
+    private HandoverAccountsMapper accountsMapper;
+
+    @Resource
+    private HandoverRecoveryService recoveryService;
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<HandoverDraft> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("handover_id",id);
+        draftMapper.delete(queryWrapper);
+    }
+
+    public HandoverDraft findById(String id) throws Exception {
+        // 查询基础信息表
+        HandoverDraft info = draftMapper.getById(id);
+        return info;
+    }
+
+    public void updateStatusById(HandoverDraft dto) {
+        draftMapper.updateStatusById(dto.getId(), dto.getType());
+
+    }
+
+    public HandoverDraft saveDraft(HandoverDraft draft) throws Exception {
+        if (StringUtils.isNotEmpty(draft.getId())){
+
+            HandoverDraft report = draftMapper.getById(draft.getId());
+            if (report != null){
+                return update(draft);
+            }
+        }
+        return add(draft);
+    }
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverDraft add(HandoverDraft reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverDraft report = new HandoverDraft();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        draftMapper.insert(report);
+
+        return report;
+    }
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverDraft update(HandoverDraft reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverDraft report = new HandoverDraft();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        draftMapper.updateById(report);
+
+        if (report.getType().equals("5")) {
+            int i = accountsMapper.selectAllActivityIsComplete(report.getHandoverId());
+            if (i != 0) {
+                //发起门卡回收流程
+                Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("门卡回收流程");
+                String procDefId = map.get("id")+"";
+                //发起完善餐补卡号流程
+                String uid = UUID.randomUUID().toString().replace("-", "");
+                HandoverRecovery recovery = new HandoverRecovery();
+                recovery.setId(uid);
+                recovery.setCreateById("1");
+                recovery.setUpdateById("1");
+                recovery.setProcessDefinitionId(procDefId);
+                recovery.setHandoverId(report.getHandoverId());
+                recoveryService.save(recovery);
+
+                String procDefKey = map.get("key")+"";
+                String businessTable = "human_resources_depart_handover_recovery";
+                String businessId = uid;
+                String title = "门卡回收";
+                String assignee = report.getCreateById();
+                String recordType = "";
+                Map<String,String> newMap = new HashMap();
+                newMap.put("procDefId", procDefId);
+                newMap.put("procDefKey", procDefKey);
+                newMap.put("businessTable", businessTable);
+                newMap.put("businessId", businessId);
+                newMap.put("title", title);
+                newMap.put("assignee", assignee);
+                newMap.put("recordType", recordType);
+                SpringUtil.getBean(IFlowableApi.class).startForFen(newMap);
+                recovery.setType("2");
+                recoveryService.saveOrUpdate(recovery);
+
+            }
+        }
+
+        return report;
+    }
+}

+ 142 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverImprestService.java

@@ -0,0 +1,142 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.HandoverImprest;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.mapper.HandoverAccountsMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverImprestMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-14 9:10
+ */
+@Service
+@Transactional
+public class HandoverImprestService extends ServiceImpl<HandoverImprestMapper, HandoverImprest> {
+
+    @Resource
+    private HandoverImprestMapper imprestMapper;
+
+    @Resource
+    private HandoverAccountsMapper accountsMapper;
+
+    @Resource
+    private HandoverRecoveryService recoveryService;
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<HandoverImprest> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("handover_id",id);
+        imprestMapper.delete(queryWrapper);
+    }
+
+    public HandoverImprest findById(String id) throws Exception {
+        // 查询基础信息表
+        HandoverImprest info = imprestMapper.getById(id);
+        return info;
+    }
+
+    public void updateStatusById(HandoverImprest dto) {
+        imprestMapper.updateStatusById(dto.getId(), dto.getType());
+
+    }
+
+    public HandoverImprest saveImprest(HandoverImprest accounts) throws Exception {
+        if (StringUtils.isNotEmpty(accounts.getId())){
+
+            HandoverImprest report = imprestMapper.getById(accounts.getId());
+            if (report != null){
+                return update(accounts);
+            }
+        }
+        return add(accounts);
+    }
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverImprest add(HandoverImprest reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverImprest report = new HandoverImprest();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        imprestMapper.insert(report);
+
+        return report;
+    }
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverImprest update(HandoverImprest reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverImprest report = new HandoverImprest();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        imprestMapper.updateById(report);
+
+        if (report.getType().equals("5")) {
+            int i = accountsMapper.selectAllActivityIsComplete(report.getHandoverId());
+            if (i != 0) {
+                //发起门卡回收流程
+                Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("门卡回收流程");
+                String procDefId = map.get("id")+"";
+                //发起完善餐补卡号流程
+                String uid = UUID.randomUUID().toString().replace("-", "");
+                HandoverRecovery recovery = new HandoverRecovery();
+                recovery.setId(uid);
+                recovery.setCreateById("1");
+                recovery.setUpdateById("1");
+                recovery.setProcessDefinitionId(procDefId);
+                recovery.setHandoverId(report.getHandoverId());
+                recoveryService.save(recovery);
+
+                String procDefKey = map.get("key")+"";
+                String businessTable = "human_resources_depart_handover_recovery";
+                String businessId = uid;
+                String title = "门卡回收";
+                String assignee = report.getCreateById();
+                String recordType = "";
+                Map<String,String> newMap = new HashMap();
+                newMap.put("procDefId", procDefId);
+                newMap.put("procDefKey", procDefKey);
+                newMap.put("businessTable", businessTable);
+                newMap.put("businessId", businessId);
+                newMap.put("title", title);
+                newMap.put("assignee", assignee);
+                newMap.put("recordType", recordType);
+                SpringUtil.getBean(IFlowableApi.class).startForFen(newMap);
+                recovery.setType("2");
+                recoveryService.saveOrUpdate(recovery);
+
+            }
+        }
+
+        return report;
+    }
+}

+ 156 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverRecoveryService.java

@@ -0,0 +1,156 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.mapper.HandoverMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverRecoveryMapper;
+import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentRegistrationMapper;
+import com.jeeplus.sys.feign.IRoleApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.RoleDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-15 8:54
+ */
+@Service
+@Transactional
+public class HandoverRecoveryService extends ServiceImpl<HandoverRecoveryMapper, HandoverRecovery> {
+
+    @Resource
+    private HandoverRecoveryMapper recoveryMapper;
+
+    @Resource
+    private HandoverMapper handoverMapper;
+
+    @Resource
+    private EnrollmentRegistrationMapper registrationMapper;
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<HandoverRecovery> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("handover_id",id);
+        recoveryMapper.delete(queryWrapper);
+    }
+
+    public HandoverRecovery findById(String id) throws Exception {
+        // 查询基础信息表
+        HandoverRecovery info = recoveryMapper.getById(id);
+        return info;
+    }
+
+    public void updateStatusById(HandoverRecovery dto) {
+        recoveryMapper.updateStatusById(dto.getId(), dto.getType());
+
+    }
+
+    public HandoverRecovery saveHandoverRecovery(HandoverRecovery accounts) throws Exception {
+        if (StringUtils.isNotEmpty(accounts.getId())){
+
+            HandoverRecovery report = recoveryMapper.getById(accounts.getId());
+            if (report != null){
+                accounts.setCreateById(report.getCreateById());
+                return update(accounts);
+            }
+        }
+        return add(accounts);
+    }
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverRecovery add(HandoverRecovery reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverRecovery report = new HandoverRecovery();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        recoveryMapper.insert(report);
+
+        return report;
+    }
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverRecovery update(HandoverRecovery reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverRecovery report = new HandoverRecovery();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        recoveryMapper.updateById(report);
+
+        if (report.getType().equals("5")){
+            //根据用户id将在职状态改为离职
+            Handover handover = handoverMapper.getById(report.getHandoverId());
+            registrationMapper.updateByUserId(handover.getCreateById());
+            //发送通知给角色【考勤统计人】
+            RoleDTO roleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("考勤统计人");
+            String userId = getAssignee(roleInfo.getId());
+
+            String uuid = UUID.randomUUID().toString();
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+            String day = format.format(new Date());
+            String userName = SpringUtil.getBean(IUserApi.class).getById(userId).getName();
+            Map<String ,String > map = new HashMap<>();
+
+            map.put("taskId",uuid);
+            map.put("title","员工:" + handover.getName() +"离职提醒");
+            map.put("defId",report.getId());
+            map.put("taskName","员工:" + handover.getName() +"离职提醒");
+            map.put("createUser",userDTO.getLoginName());
+            map.put("createTime",day);
+            map.put("noticeName",userName);
+            map.put("noticeId",userId);
+            map.put("createById",report.getCreateById());
+            SpringUtil.getBean(IFlowableApi.class).add(map);
+            //发送通知给员工,可下载盖电子章的离职证明
+            Map<String ,String > map2 = new HashMap<>();
+
+            map2.put("taskId",uuid);
+            map2.put("title","离职交接审批完成,请点击下载离职证明");
+            map2.put("defId",report.getId());
+            map2.put("taskName","离职交接审批完成,请点击下载离职证明");
+            map2.put("createUser",userDTO.getLoginName());
+            map2.put("createTime",day);
+            map2.put("noticeName",userName);
+            map2.put("noticeId",handover.getCreateById());
+            map2.put("createById",userDTO.getId());
+            SpringUtil.getBean(IFlowableApi.class).add(map2);
+        }
+
+        return report;
+    }
+
+    public String getAssignee(String roleId){
+        List<UserDTO> userDTOS = SpringUtil.getBean(IUserApi.class).findListByRoleId(roleId);
+        StringJoiner idJoiner = new StringJoiner(",");
+        for (UserDTO user : userDTOS) {
+            idJoiner.add(String.valueOf(user.getId()));
+        }
+
+        return idJoiner.toString();
+    }
+}

+ 294 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java

@@ -0,0 +1,294 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.*;
+import com.jeeplus.human.depart.handover.mapper.HandoverMapper;
+import com.jeeplus.human.depart.registration.domain.DepartRegistration;
+import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentKeyCard;
+import com.jeeplus.sys.feign.IRoleApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.RoleDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:04
+ */
+@Service
+@Transactional
+public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
+
+    @Resource
+    private HandoverMapper mapper;
+
+    @Resource
+    private HandoverDraftService draftService;
+
+    @Resource
+    private HandoverComputerService handoverComputerService;
+
+    @Resource
+    private HandoverAccountsService handoverAccountsService;
+
+    @Resource
+    private HandoverSocialSecurityService handoverSocialSecurityService;
+
+    @Resource
+    private HandoverImprestService handoverImprestService;
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<Handover> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("registration_id",id);
+        mapper.delete(queryWrapper);
+    }
+
+    public void updateStatusById(Handover dto) {
+        mapper.updateStatusById(dto.getId(), dto.getType());
+    }
+
+    public Handover findById(String id) {
+        // 查询基础信息表
+        Handover info = mapper.getById(id);
+        return info;
+    }
+
+    public Handover saveRegistration(Handover handover) throws Exception {
+        if (StringUtils.isNotEmpty(handover.getId())){
+
+            Handover report = mapper.getById(handover.getId());
+            handover.setCreateById(report.getCreateById());
+            if (report != null){
+                return update(handover);
+            }
+        }
+        return add(handover);
+    }
+
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public Handover update(Handover reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        Handover report = new Handover();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        mapper.updateById(report);
+
+        if (report.getType().equals("5")){
+
+            //发起底稿归档检查流程
+            Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("底稿归档检查");
+            String procDefId = map.get("id")+"";
+            HandoverDraft draft = new HandoverDraft();
+            String uid = UUID.randomUUID().toString().replace("-", "");
+            draft.setId(uid);
+            draft.setCreateById(report.getCreateById());
+            draft.setUpdateById(report.getUpdateById());
+            draft.setProcessDefinitionId(procDefId);
+            draft.setHandoverId(report.getId());
+            draftService.save(draft);
+
+            Map<String ,Map<String,String >>  allMap = new HashMap<>();
+
+            String procDefKey = map.get("key")+"";
+            String businessTable = "human_resources_depart_handover_draft";
+            String businessId = uid;
+            String title = "底稿归档检查";
+            String assignee = report.getDraftAdministrator();
+            String recordType = "";
+            Map<String, String> newMap = pingMap(procDefId, procDefKey, businessTable, businessId, title, assignee, recordType);
+
+            allMap.put("底稿",newMap);
+
+//            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
+
+            //发起电脑欠款回收流程
+            Map computerMap = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("电脑欠款回收");
+            String computerProcDefId = computerMap.get("id")+"";
+            HandoverComputer computer = new HandoverComputer();
+            String computerId = UUID.randomUUID().toString().replace("-", "");
+            computer.setId(computerId);
+            computer.setCreateById(report.getCreateById());
+            computer.setUpdateById(report.getUpdateById());
+            computer.setProcessDefinitionId(computerProcDefId);
+            computer.setHandoverId(report.getId());
+            handoverComputerService.save(computer);
+
+            String computerProcDefKey = computerMap.get("key")+"";
+            String computerBusinessTable = "human_resources_depart_handover_computer";
+            String computerBusinessId = computerId;
+            String computerTitle = "电脑欠款回收";
+            //根据角色查用户信息
+            RoleDTO computerRoleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("电脑款项审查员");
+            String computerAssignee = getAssignee(computerRoleInfo.getId());
+
+            String computerRecordType = "";
+            Map<String, String> computerNewMap = pingMap(computerProcDefId, computerProcDefKey,
+                    computerBusinessTable, computerBusinessId, computerTitle, computerAssignee, computerRecordType);
+
+            allMap.put("电脑",computerNewMap);
+
+//            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
+
+            //应收账款流程发起
+            Map accountsMap = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("应收账款检查");
+            String accountsProcDefId = accountsMap.get("id")+"";
+            HandoverAccounts accounts = new HandoverAccounts();
+            String accountsId = UUID.randomUUID().toString().replace("-", "");
+            accounts.setId(accountsId);
+            accounts.setCreateById(report.getCreateById());
+            accounts.setUpdateById(report.getUpdateById());
+            accounts.setProcessDefinitionId(accountsProcDefId);
+            accounts.setHandoverId(report.getId());
+            handoverAccountsService.save(accounts);
+
+            String accountsProcDefKey = accountsMap.get("key")+"";
+            String accountsBusinessTable = "human_resources_depart_handover_accounts";
+            String accountsBusinessId = accountsId;
+            String accountsTitle = "应收账款检查";
+            //根据角色查用户信息
+            RoleDTO accountsRoleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("应收账款审查员");
+
+            String accountsAssignee = getAssignee(accountsRoleInfo.getId());
+
+            String accountsRecordType = "";
+            Map<String, String> accountsNewMap = pingMap(accountsProcDefId, accountsProcDefKey,
+                    accountsBusinessTable, accountsBusinessId, accountsTitle, accountsAssignee, accountsRecordType);
+
+            allMap.put("应收账款",accountsNewMap);
+//            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
+
+            //社保款项检查流程发起
+            Map socialSecurityMap = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("社保款项检查");
+            String socialSecurityProcDefId = socialSecurityMap.get("id")+"";
+            HandoverSocialSecurity socialSecurity = new HandoverSocialSecurity();
+            String socialSecurityId = UUID.randomUUID().toString().replace("-", "");
+            socialSecurity.setId(socialSecurityId);
+            socialSecurity.setCreateById(report.getCreateById());
+            socialSecurity.setUpdateById(report.getUpdateById());
+            socialSecurity.setProcessDefinitionId(socialSecurityProcDefId);
+            socialSecurity.setHandoverId(report.getId());
+            handoverSocialSecurityService.save(socialSecurity);
+
+            String socialSecurityProcDefKey = socialSecurityMap.get("key")+"";
+            String socialSecurityBusinessTable = "human_resources_depart_handover_social_security";
+            String socialSecurityBusinessId = socialSecurityId;
+            String socialSecurityTitle = "社保款项检查";
+            //根据角色查用户信息
+            RoleDTO socialSecurityRoleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("社保欠款审查员");
+
+            String socialSecurityAssignee = getAssignee(socialSecurityRoleInfo.getId());
+
+            String socialSecurityRecordType = "";
+            Map<String, String> socialSecurityNewMap = pingMap(socialSecurityProcDefId, socialSecurityProcDefKey,
+                    socialSecurityBusinessTable, socialSecurityBusinessId, socialSecurityTitle, socialSecurityAssignee, socialSecurityRecordType);
+
+            allMap.put("社保欠款",socialSecurityNewMap);
+
+//            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
+
+            //发起备用金检查流程  handoverImprestService
+            Map handoverImprestMap = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("备用金检查");
+            String handoverImprestProcDefId = handoverImprestMap.get("id")+"";
+            HandoverImprest handoverImprest = new HandoverImprest();
+            String handoverImprestId = UUID.randomUUID().toString().replace("-", "");
+            handoverImprest.setId(handoverImprestId);
+            handoverImprest.setCreateById(report.getCreateById());
+            handoverImprest.setUpdateById(report.getUpdateById());
+            handoverImprest.setProcessDefinitionId(handoverImprestProcDefId);
+            handoverImprest.setHandoverId(report.getId());
+            handoverImprestService.save(handoverImprest);
+
+            String handoverImprestProcDefKey = handoverImprestMap.get("key")+"";
+            String handoverImprestBusinessTable = "human_resources_depart_handover_imprest";
+            String handoverImprestBusinessId = handoverImprestId;
+            String handoverImprestTitle = "备用金检查";
+            //根据角色查用户信息
+            RoleDTO roleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("备用金审查员");
+            String handoverImprestAssignee = getAssignee(roleInfo.getId());
+
+            String handoverImprestRecordType = "";
+            Map<String, String> handoverImprestNewMap = pingMap(handoverImprestProcDefId, handoverImprestProcDefKey,
+                    handoverImprestBusinessTable, handoverImprestBusinessId, handoverImprestTitle, handoverImprestAssignee, handoverImprestRecordType);
+
+            allMap.put("备用金",handoverImprestNewMap);
+
+            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
+
+            draft.setType("2");
+            draftService.saveOrUpdate(draft);
+            computer.setType("2");
+            handoverComputerService.saveOrUpdate(computer);
+            accounts.setType("2");
+            handoverAccountsService.saveOrUpdate(accounts);
+            socialSecurity.setType("2");
+            handoverSocialSecurityService.saveOrUpdate(socialSecurity);
+            handoverImprest.setType("2");
+            handoverImprestService.saveOrUpdate(handoverImprest);
+        }
+
+        return report;
+    }
+
+
+
+    public String getAssignee(String roleId){
+        List<UserDTO> userDTOS = SpringUtil.getBean(IUserApi.class).findListByRoleId(roleId);
+        StringJoiner idJoiner = new StringJoiner(",");
+        for (UserDTO user : userDTOS) {
+            idJoiner.add(String.valueOf(user.getId()));
+        }
+
+        return idJoiner.toString();
+    }
+
+    public Map<String,String> pingMap(String procDefId,String procDefKey,String businessTable,
+                                      String businessId,String title,String assignee,String recordType){
+        Map<String,String> map = new HashMap();
+        map.put("procDefId", procDefId);
+        map.put("procDefKey", procDefKey);
+        map.put("businessTable", businessTable);
+        map.put("businessId", businessId);
+        map.put("title", title);
+        map.put("assignee", assignee);
+        map.put("recordType", recordType);
+        return map;
+    }
+
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public Handover add(Handover reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        Handover report = new Handover();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+
+        mapper.insert(report);
+
+        return report;
+    }
+}

+ 144 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverSocialSecurityService.java

@@ -0,0 +1,144 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.HandoverAccounts;
+import com.jeeplus.human.depart.handover.domain.HandoverRecovery;
+import com.jeeplus.human.depart.handover.domain.HandoverSocialSecurity;
+import com.jeeplus.human.depart.handover.mapper.HandoverAccountsMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverSocialSecurityMapper;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-11-07 9:33
+ */
+@Service
+@Transactional
+public class HandoverSocialSecurityService extends ServiceImpl<HandoverSocialSecurityMapper, HandoverSocialSecurity> {
+
+    @Resource
+    private HandoverSocialSecurityMapper socialSecurityMapper;
+
+    @Resource
+    private HandoverAccountsMapper accountsMapper;
+
+    @Resource
+    private HandoverRecoveryService recoveryService;
+
+
+    public void deleteByRegistrationId(String id){
+        QueryWrapper<HandoverSocialSecurity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("handover_id",id);
+        socialSecurityMapper.delete(queryWrapper);
+    }
+
+    public HandoverSocialSecurity findById(String id) throws Exception {
+        // 查询基础信息表
+        HandoverSocialSecurity info = socialSecurityMapper.getById(id);
+        return info;
+    }
+
+    public void updateStatusById(HandoverSocialSecurity dto) {
+        socialSecurityMapper.updateStatusById(dto.getId(), dto.getType());
+
+    }
+
+    public HandoverSocialSecurity saveSocialSecurity(HandoverSocialSecurity accounts) throws Exception {
+        if (StringUtils.isNotEmpty(accounts.getId())){
+
+            HandoverSocialSecurity report = socialSecurityMapper.getById(accounts.getId());
+            if (report != null){
+                return update(accounts);
+            }
+        }
+        return add(accounts);
+    }
+
+    /**
+     * 新增
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverSocialSecurity add(HandoverSocialSecurity reportData) throws Exception{
+
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverSocialSecurity report = new HandoverSocialSecurity();
+        BeanUtils.copyProperties(reportData, report);
+        report.setCreateById(userDTO.getId());
+        report.setCreateTime(new Date());
+        report.setUpdateTime(new Date());
+        report.setUpdateById(userDTO.getId());
+        socialSecurityMapper.insert(report);
+
+        return report;
+    }
+    /**
+     * 修改
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public HandoverSocialSecurity update(HandoverSocialSecurity reportData) throws Exception{
+        //获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+
+        HandoverSocialSecurity report = new HandoverSocialSecurity();
+        BeanUtils.copyProperties(reportData, report);
+        report.setUpdateById(userDTO.getId());
+        report.setUpdateTime(new Date());
+        socialSecurityMapper.updateById(report);
+
+        if (report.getType().equals("5")) {
+            int i = accountsMapper.selectAllActivityIsComplete(report.getHandoverId());
+            if (i != 0) {
+                //发起门卡回收流程
+                Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("门卡回收流程");
+                String procDefId = map.get("id")+"";
+                //发起完善餐补卡号流程
+                String uid = UUID.randomUUID().toString().replace("-", "");
+                HandoverRecovery recovery = new HandoverRecovery();
+                recovery.setId(uid);
+                recovery.setCreateById("1");
+                recovery.setUpdateById("1");
+                recovery.setProcessDefinitionId(procDefId);
+                recovery.setHandoverId(report.getHandoverId());
+                recoveryService.save(recovery);
+
+                String procDefKey = map.get("key")+"";
+                String businessTable = "human_resources_depart_handover_recovery";
+                String businessId = uid;
+                String title = "门卡回收";
+                String assignee = report.getCreateById();
+                String recordType = "";
+                Map<String,String> newMap = new HashMap();
+                newMap.put("procDefId", procDefId);
+                newMap.put("procDefKey", procDefKey);
+                newMap.put("businessTable", businessTable);
+                newMap.put("businessId", businessId);
+                newMap.put("title", title);
+                newMap.put("assignee", assignee);
+                newMap.put("recordType", recordType);
+                SpringUtil.getBean(IFlowableApi.class).startForFen(newMap);
+                recovery.setType("2");
+                recoveryService.saveOrUpdate(recovery);
+
+            }
+        }
+
+        return report;
+    }
+}

+ 11 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/domain/DepartRegistration.java

@@ -35,4 +35,15 @@ public class DepartRegistration extends BaseEntity {
 
     @TableField(exist = false)
     private String departmentName;
+
+    @TableField(exist = false)
+    private String handoverProcInsId;   //离职交接表的
+
+    @TableField(exist = false)
+    private String handoverId;  //离职交接表id
+
+    @TableField(exist = false)
+    private String handoverType;  //离职交接表状态
+    @TableField(exist = false)
+    private String handoverTaskId;  //离职交接表流程id
 }

+ 7 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/mapper/xml/DepartMapper.xml

@@ -28,12 +28,18 @@
         select
         <include refid="Base_Column_List"></include>,
         d.ID_ AS task_id,
+        e.ID_ AS handover_task_id,
         su.name as projectManagerName,
-        so.name as departmentName
+        so.name as departmentName,
+        dh.id as handoverId,
+        dh.proc_ins_id as handoverProcInsId,
+        ifnull(dh.type,"0") as "handoverType"
         from human_resources_depart_registration a
         LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
         left join sys_user su on a.project_manager = su.id
         LEFT JOIN sys_office so on a.department = so.id
+        left join human_resources_depart_handover dh on a.id = dh.registration_id
+        LEFT JOIN act_ru_task e ON dh.proc_ins_id = e.PROC_INST_ID_
         ${ew.customSqlSegment}
         ORDER BY a.create_time DESC
     </select>

+ 9 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/EnrollmentRegistrationMapper.java

@@ -11,6 +11,8 @@ import com.jeeplus.human.practice.register.domain.Registration;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * @author 王强
  * @version 1.0
@@ -34,4 +36,11 @@ public interface EnrollmentRegistrationMapper extends BaseMapper<EnrollmentRegis
     void updateStatusById(@Param("id") String id, @Param("type") String type);
 
     void removeById(@Param("id") String id);
+
+    /**
+     * 根据用户id修改状态
+     */
+    void updateByUserId(@Param("userId") String userId);
+
+    List<EnrollmentRegistration> getFormalUserInfo();
 }

+ 11 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/xml/EnrollmentRegistrationMapper.xml

@@ -49,6 +49,9 @@
         UPDATE human_resources_enrollment_registration SET del_flag = '1'
 		WHERE id = #{id}
     </update>
+    <update id="updateByUserId">
+        update human_resources_enrollment_registration SET on_job_status = '离职' where user_id = #{userId}
+    </update>
 
     <select id="findList"
             resultType="com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentRegistration">
@@ -74,4 +77,12 @@
         left join human_resources_enrollment_social_security_card b on a.id = b.enrollment_registration_id and b.del_flag = '0'
         where a.id = #{id} and a.del_flag = '0'
     </select>
+    <select id="getFormalUserInfo"
+            resultType="com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentRegistration">
+        SELECT
+        <include refid="Base_Column_List"></include>
+        FROM `human_resources_enrollment_registration`  a
+        LEFT JOIN sys_user su on a.user_id = su.id and su.del_flag = '0'
+        WHERE a.on_job_status = '离职'
+    </select>
 </mapper>

+ 32 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java

@@ -15,6 +15,7 @@ import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentSoci
 import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentWageCard;
 import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentRegistrationMapper;
 import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentSocialSecurityCardMapper;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.feign.IRoleApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.OfficeDTO;
@@ -161,6 +162,29 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
 
                 report.setOnJobStatus("正式");
                 //发送短信通知 (未实现)
+                String officeName = "";
+                OfficeDTO office = SpringUtil.getBean(IOfficeApi.class).getOfficeById(report.getDepartment());
+                if (office.getTenantDTO().getId().equals("10003")){
+                    officeName = "兴光会计";
+                }else if (office.getTenantDTO().getId().equals("10004")) {
+                    officeName = "中审";
+                }
+                RoleDTO roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("门卡管理员");
+                List<UserDTO> listByRoleId = SpringUtil.getBean(IUserApi.class).findListByRoleId(roleDTO.getId());
+
+                String randomCode = report.getName() + "你好!欢迎入职" + officeName + ",请尽快登录公司系统:" + "www.baidu.com"
+                        + "完善个人信息(包括社保卡号与工资卡号)并修改初始密码,系统初始账号密码为:" + report.getName() +
+                        "/123456,人事部门已在为你办理门禁卡,办理成功后将由系统告知,在收到系统通知后,请及时到办公室"+ listByRoleId.get(0).getName() +"处领取门禁卡!"+
+                        "注:工资卡需同时提供中信银行、招商银行卡号";
+                Map<String, Object> stringObjectMap = SpringUtil.getBean(IUserApi.class).sendRandomCodes(report.getMobilePhone(), randomCode);
+                String statusCode = (String) stringObjectMap.get("statusCode");
+                if (("000000").equals(statusCode)) {
+                    System.out.println("短信发送成功!");
+                }else if(statusCode.equals("160040")){
+                    System.out.println("手机号获取验证码次数已达每日上限!");
+                }else{
+                    System.out.println("短信发送失败,错误代码:101,请联系管理员!");
+                }
 
                 //当流程结束的时候,发起工资卡信息完善流程
                 Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("工资卡信息完善");
@@ -302,4 +326,12 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         Integer integer = mapper.selectCount(queryWrapper);
         return integer;
     }
+
+    /**
+     * 获取正式工在职状态为离职的,并且user表中未删除的
+     * @return
+     */
+    public List<EnrollmentRegistration> getFormalUserInfo() {
+        return mapper.getFormalUserInfo();
+    }
 }

+ 20 - 5
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRiceCardService.java

@@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jeeplus.common.TokenProvider;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentKeyCard;
+import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentRegistration;
 import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentRiceCard;
 import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentRiceCardMapper;
+import com.jeeplus.sys.feign.IRoleApi;
 import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.RoleDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -17,10 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 /**
  * @author 王强
@@ -34,6 +34,9 @@ public class EnrollmentRiceCardService extends ServiceImpl<EnrollmentRiceCardMap
     @Resource
     private EnrollmentRiceCardMapper riceCardMapper;
 
+    @Resource
+    private EnrollmentRegistrationService enrollmentRegistrationService;
+
     public void deleteByRegistrationId(String id){
         QueryWrapper<EnrollmentRiceCard> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("enrollment_registration_id",id);
@@ -94,7 +97,19 @@ public class EnrollmentRiceCardService extends ServiceImpl<EnrollmentRiceCardMap
         riceCardMapper.updateById(report);
         if (report.getType().equals("5")){
             //发送短信
-            System.out.println("我出来了,我出来了");
+            EnrollmentRegistration registration = enrollmentRegistrationService.getById(report.getEnrollmentRegistrationId());
+            RoleDTO roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("考勤统计员");
+            List<UserDTO> listByRoleId = SpringUtil.getBean(IUserApi.class).findListByRoleId(roleDTO.getId());
+            String randomCode = "员工:" + registration.getName() + "已办理入职!";
+            Map<String, Object> stringObjectMap = SpringUtil.getBean(IUserApi.class).sendRandomCodes(listByRoleId.get(0).getMobile(), randomCode);
+            String statusCode = (String) stringObjectMap.get("statusCode");
+            if (("000000").equals(statusCode)) {
+                System.out.println("短信发送成功!");
+            }else if(statusCode.equals("160040")){
+                System.out.println("手机号获取验证码次数已达每日上限!");
+            }else{
+                System.out.println("短信发送失败,错误代码:101,请联系管理员!");
+            }
         }
 
         return report;

+ 15 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/practice/register/controller/RegisterController.java

@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentRegistration;
+import com.jeeplus.human.enrollment.enrollmentRegistration.service.EnrollmentRegistrationService;
 import com.jeeplus.human.practice.register.domain.Registration;
 import com.jeeplus.human.practice.register.service.RegistrationService;
 import com.jeeplus.human.practice.register.service.dto.RegistrationDto;
@@ -36,6 +38,9 @@ public class RegisterController {
     @Resource
     private RegistrationService service;
 
+    @Resource
+    private EnrollmentRegistrationService enrollmentRegistrationService;
+
     /**
      * 查询财务项目信息列表
      * @param projectReportData
@@ -130,4 +135,14 @@ public class RegisterController {
         List<Registration> listInfos = service.getTimeOutReimburseRegisters();
         return JSON.toJSONString(listInfos);
     }
+
+    /**
+     * 获取正式工在职状态为离职的,并且user表中未删除的
+     * @return
+     */
+    @GetMapping("getFormalUserInfo")
+    public String getFormalUserInfo(){
+        List<EnrollmentRegistration> listInfos = enrollmentRegistrationService.getFormalUserInfo();
+        return JSON.toJSONString(listInfos);
+    }
 }

+ 29 - 5
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/practice/register/service/RegistrationService.java

@@ -160,6 +160,26 @@ public class RegistrationService extends ServiceImpl<InterRegistrationMapper, Re
                 dto.setRoleDTOList(roleIdList);
                 SpringUtil.getBean ( IUserApi.class ).saveOrUpdate(dto);
                 //发送短信通知
+                String officeName = "";
+                OfficeDTO office = SpringUtil.getBean(IOfficeApi.class).getOfficeById(report.getPracticeOffice());
+                if (office.getTenantDTO().getId().equals("10003")){
+                    officeName = "兴光会计";
+                }else if (office.getTenantDTO().getId().equals("10004")) {
+                    officeName = "中审";
+                }
+
+                String randomCode = report.getName() + "你好!你好!欢迎来" + officeName + "实习,实习期间请及时在公司系统:" + "www.baidu.com"
+                        + "中填写实习日志,系统初始账号密码为,系统初始账号密码为:" + report.getName() +
+                        "/123456,请尽快登陆系统并修改初始密码!";
+                Map<String, Object> stringObjectMap = SpringUtil.getBean(IUserApi.class).sendRandomCodes(report.getMobilePhone(), randomCode);
+                String statusCode = (String) stringObjectMap.get("statusCode");
+                if (("000000").equals(statusCode)) {
+                    System.out.println("短信发送成功!");
+                }else if(statusCode.equals("160040")){
+                    System.out.println("手机号获取验证码次数已达每日上限!");
+                }else{
+                    System.out.println("短信发送失败,错误代码:101,请联系管理员!");
+                }
 
                 report.setPracticeStatus("实习中");
                 report.setUserId(dto.getId());
@@ -213,12 +233,16 @@ public class RegistrationService extends ServiceImpl<InterRegistrationMapper, Re
     @Transactional(rollbackFor = Exception.class)
     public Registration add(Registration reportData) throws Exception{
 
-        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+//        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
 
         Registration report = new Registration();
         BeanUtils.copyProperties(reportData, report);
         String id = UUID.randomUUID().toString().replace("-", "");
         report.setId(id);
+        report.setCreateById("1");
+        report.setCreateTime(new Date());
+        report.setUpdateById("1");
+        report.setUpdateTime(new Date());
 
         //先删除家庭成员信息,在重新添加
         familyMembersMapper.deleteByRegisterId(report.getId());
@@ -229,9 +253,9 @@ public class RegistrationService extends ServiceImpl<InterRegistrationMapper, Re
                 // 生成id
                 String amountId = UUID.randomUUID().toString().replace("-", "");
                 familyMember.setId(amountId);
-                familyMember.setCreateById(userDTO.getId());
+                familyMember.setCreateById("1");
                 familyMember.setCreateTime(new Date());
-                familyMember.setUpdateById(userDTO.getId());
+                familyMember.setUpdateById("1");
                 familyMember.setUpdateTime(new Date());
                 familyMember.setDelFlag(0);
                 familyMember.setRegistrationId(report.getId());
@@ -246,9 +270,9 @@ public class RegistrationService extends ServiceImpl<InterRegistrationMapper, Re
                 // 生成id
                 String amountId = UUID.randomUUID().toString().replace("-", "");
                 experience.setId(amountId);
-                experience.setCreateById(userDTO.getId());
+                experience.setCreateById("1");
                 experience.setCreateTime(new Date());
-                experience.setUpdateById(userDTO.getId());
+                experience.setUpdateById("1");
                 experience.setUpdateTime(new Date());
                 experience.setDelFlag(0);
                 experience.setRegistrationId(report.getId());

+ 7 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java

@@ -19,7 +19,9 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -30,6 +32,11 @@ public class UserApiImpl implements IUserApi {
     private UserService userService;
 
     @Override
+    public Map<String, Object> sendRandomCodes(String mobile, String randomCode) throws IOException {
+        return UserUtils.sendRandomCodes(mobile, randomCode);
+    }
+
+    @Override
     public UserDTO getByLoginName(String loginName, String tenantId) {
         if ( StrUtil.isBlank ( loginName ) || StrUtil.isBlank ( tenantId ) ) {
             return null;

+ 62 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/jeeplus/domain/EnrollmentRegistrationInfo.java

@@ -0,0 +1,62 @@
+package com.jeeplus.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 入职人员登记
+ * @author 王强
+ * @version 1.0
+ * @date 2023-09-27 14:14
+ */
+@Data
+@TableName("human_resources_enrollment_registration")
+public class EnrollmentRegistrationInfo extends BaseEntity {
+    private String name;                //姓名
+    private String sex;                 //性别
+    private String age;                 //年龄
+    private String birthday;            //出生日期
+    private String politicalOutlook;    //政治面貌
+    private String nativePlace;         //籍贯
+    private String nation;              //民族
+    private String maritalStatus;       //婚姻状况
+    private String mobilePhone;         //联系电话
+    private String idCard;              //身份证号码
+    private String homeAddress;         //家庭住址
+    private String permanentAddress;    //常住地址
+    private String graduatedFrom;       //毕业院校
+    private String speciality;          //专业
+    private String startTime;           //开始时间
+    private String endTime;             //毕业时间
+    private String education;           //学历
+    private String educationNature;     //学历性质
+    private String graduatedOrNot;      //是否毕业
+    private String englishLevel;        //英语等级
+    private String ncre;                //计算机等级
+    private String department;          //所属部门
+    private String entryDate;           //进所日期
+    private String contractStartDate;   //合同开始日期
+    private String remarks;             //备注
+    private String type;                //流程状态
+    private String procInsId;
+    private String processDefinitionId;
+    private String userId;              //用户id
+    private String projectManager;      //项目经理
+
+    @TableField(exist = false)
+    private String socialSecurityNumber;        //社保编号
+    @TableField(exist = false)
+    private String socialSecurityBankNumber;    //社保银行卡号
+    @TableField(exist = false)
+    private String socialSecurityPictureFront;       //社保卡照片正面
+    @TableField(exist = false)
+    private String socialSecurityPictureFrontUrl;       //社保卡照片正面URL
+    @TableField(exist = false)
+    private String socialSecurityPictureOpposite;       //社保卡照片反面
+    @TableField(exist = false)
+    private String socialSecurityPictureOppositeUrl;       //社保卡照片反面URL
+    private String onJobStatus;       //在职状态
+
+}

+ 27 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

@@ -3,6 +3,7 @@ package com.xxl.job.executor.service.jobhandler;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.TypeReference;
+import com.jeeplus.domain.EnrollmentRegistrationInfo;
 import com.jeeplus.domain.MyNoticeList;
 import com.jeeplus.domain.ProgramProjectListInfo;
 import com.jeeplus.domain.RegistrationInfo;
@@ -71,6 +72,32 @@ public class SampleXxlJob {
         //如果没删除则删除
         for (RegistrationInfo info : infos){
             SpringUtil.getBean(IUserApi.class).deleteById(info.getUserId());
+            //发送短信
+            String randomCode = info.getName() + "您好,您的账号已冻结!";
+            Map<String, Object> stringObjectMap = SpringUtil.getBean(IUserApi.class).sendRandomCodes(info.getMobilePhone(), randomCode);
+            String statusCode = (String) stringObjectMap.get("statusCode");
+            if (("000000").equals(statusCode)) {
+                System.out.println("短信发送成功!");
+            }else if(statusCode.equals("160040")){
+                System.out.println("手机号获取验证码次数已达每日上限!");
+            }else{
+                System.out.println("短信发送失败,错误代码:101,请联系管理员!");
+            }
+        }
+
+    }
+
+    /**
+     * 5、正式工冻结账号发送短信(Bean模式)
+     */
+    @XxlJob("formalAccount")
+    public void formalAccount() throws Exception {
+        //每天晚上十二点查询实习生的实习状态为结束,并且报销登记流程走完的实习生用户信息
+        String json = SpringUtil.getBean ( HumanFeignApi.class ).getFormalUserInfo();
+        List<EnrollmentRegistrationInfo> infos = JSON.parseObject(json, new TypeReference<List<EnrollmentRegistrationInfo>>() {});
+        //如果没删除则删除
+        for (EnrollmentRegistrationInfo info : infos){
+            SpringUtil.getBean(IUserApi.class).deleteById(info.getUserId());
         }
 
     }