Browse Source

离职bug调整

wangqiang 1 year ago
parent
commit
45c38880f6
16 changed files with 144 additions and 26 deletions
  1. 4 2
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java
  2. 4 4
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java
  3. 7 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverAccounts.java
  4. 7 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverComputer.java
  5. 6 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverDraft.java
  6. 7 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverImprest.java
  7. 7 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverSocialSecurity.java
  8. 6 2
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverAccountsMapper.xml
  9. 6 2
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverComputerMapper.xml
  10. 4 1
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverDraftMapper.xml
  11. 6 2
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverImprestMapper.xml
  12. 6 2
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverSocialSecurityMapper.xml
  13. 12 10
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java
  14. 40 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/domain/DepartRegistration.java
  15. 21 1
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/mapper/xml/DepartMapper.xml
  16. 1 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/service/DepartService.java

+ 4 - 2
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java

@@ -201,12 +201,13 @@ public class FlowableTaskController {
         String title = map.get("title");
         String recordType = map.get("recordType");
         String assignee = map.get("assignee");
+        String userId = map.get("userId");
 
         if ( StrUtil.isBlank ( procDefKey ) && StrUtil.isNotBlank ( procDefId ) ) {
             procDefKey = StrUtil.split ( procDefId, ":" ).get ( 0 );
         }
 
-        String procInsId = flowTaskService.startProcessForFen ( procDefKey, businessTable, businessId, title,recordType, procDefId );
+        String procInsId = flowTaskService.startProcessForFen ( procDefKey, businessTable, businessId, title,recordType, procDefId ,userId);
 
         //指定下一步处理人
         if ( StringUtils.isNotBlank ( assignee ) ) {
@@ -264,11 +265,12 @@ public class FlowableTaskController {
         String title = valueMap.get("title");
         String recordType = valueMap.get("recordType");
         String assignee = valueMap.get("assignee");
+        String userId = valueMap.get("userId");
         if ( StrUtil.isBlank ( procDefKey ) && StrUtil.isNotBlank ( procDefId ) ) {
             procDefKey = StrUtil.split ( procDefId, ":" ).get ( 0 );
         }
 
-        String procInsId = flowTaskService.startProcessForFen ( procDefKey, businessTable, businessId, title,recordType, procDefId );
+        String procInsId = flowTaskService.startProcessForFen ( procDefKey, businessTable, businessId, title,recordType, procDefId ,userId);
 
         //指定下一步处理人
         if ( StringUtils.isNotBlank ( assignee ) ) {

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

@@ -630,9 +630,9 @@ public class FlowTaskService {
      * @param recordType    项目类型
      * @return 流程实例ID
      */
-    public String startProcessForFen(String procDefKey, String businessTable, String businessId, String title,String recordType, String procDefId) {
+    public String startProcessForFen(String procDefKey, String businessTable, String businessId, String title,String recordType, String procDefId,String userId) {
         Map <String, Object> vars = Maps.newHashMap ( );
-        return startProcessForFen ( procDefKey, businessTable, businessId, title,  vars ,recordType, procDefId);
+        return startProcessForFen ( procDefKey, businessTable, businessId, title,  vars ,recordType, procDefId,userId);
     }
 
     /**
@@ -646,14 +646,14 @@ public class FlowTaskService {
      * @return 流程实例ID
      */
     @SuppressWarnings("unused")
-    public String startProcessForFen(String procDefKey, String businessTable, String businessId, String title, Map <String, Object> vars,String recordType,  String procDefId) {
+    public String startProcessForFen(String procDefKey, String businessTable, String businessId, String title, Map <String, Object> vars,String recordType,  String procDefId, String userId) {
         //String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId())
         // 设置流程变量
         if ( vars == null ) {
             vars = Maps.newHashMap ( );
         }
 
-        String userId = (String) vars.get ( FlowableConstant.INITIATOR );
+//        String userId = (String) vars.get ( FlowableConstant.INITIATOR );
         if ( userId == null ) {
             userId = "1";
         }

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

@@ -19,10 +19,17 @@ public class HandoverAccounts extends BaseEntity {
     private String procInsId;
     private String processDefinitionId;
     private String handoverId;      //离职交接表id
+    private String imprestAmountArrears;      //应收账款欠款金额
 
     @TableField(exist = false)
     private String assigneeId;
 
     @TableField(exist = false)
     private String draftAdministrator;
+
+    @TableField(exist = false)
+    private String name;        //姓名
+
+    @TableField(exist = false)
+    private String department;  //部门
 }

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

@@ -19,10 +19,17 @@ public class HandoverComputer extends BaseEntity {
     private String procInsId;
     private String processDefinitionId;
     private String handoverId;      //离职交接表id
+    private String imprestAmountArrears;      //电脑欠款金额
 
     @TableField(exist = false)
     private String assigneeId;
 
     @TableField(exist = false)
     private String draftAdministrator;
+
+    @TableField(exist = false)
+    private String name;        //姓名
+
+    @TableField(exist = false)
+    private String department;  //部门
 }

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

@@ -25,4 +25,10 @@ public class HandoverDraft extends BaseEntity {
 
     @TableField(exist = false)
     private String draftAdministrator;
+
+    @TableField(exist = false)
+    private String name;        //姓名
+
+    @TableField(exist = false)
+    private String department;  //部门
 }

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

@@ -19,10 +19,17 @@ public class HandoverImprest extends BaseEntity {
     private String procInsId;
     private String processDefinitionId;
     private String handoverId;      //离职交接表id
+    private String imprestAmountArrears;      //备用金欠款金额
 
     @TableField(exist = false)
     private String assigneeId;
 
     @TableField(exist = false)
     private String draftAdministrator;
+
+    @TableField(exist = false)
+    private String name;        //姓名
+
+    @TableField(exist = false)
+    private String department;  //部门
 }

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

@@ -19,10 +19,17 @@ public class HandoverSocialSecurity extends BaseEntity {
     private String procInsId;
     private String processDefinitionId;
     private String handoverId;      //离职交接表id
+    private String imprestAmountArrears;      //社保账款欠款金额
 
     @TableField(exist = false)
     private String assigneeId;
 
     @TableField(exist = false)
     private String draftAdministrator;
+
+    @TableField(exist = false)
+    private String name;        //姓名
+
+    @TableField(exist = false)
+    private String department;  //部门
 }

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

@@ -12,7 +12,8 @@
         a.type,
         a.proc_ins_id,
         a.process_definition_id,
-        a.handover_id
+        a.handover_id,
+        a.imprest_amount_arrears
     </sql>
     <update id="updateStatusById">
         UPDATE human_resources_depart_handover_accounts SET type = #{type}
@@ -23,9 +24,12 @@
         select
         <include refid="Base_Column_List"></include>,
         b.create_by_id as assigneeId,
-        b.draft_administrator as draftAdministrator
+        b.draft_administrator as draftAdministrator,
+        su.name as name,
+        su.office_id as department
         from human_resources_depart_handover_accounts a
         left join human_resources_depart_handover b on a.handover_id = b.id
+        left join sys_user su on a.create_by_id = su.id
         where a.id = #{id} and a.del_flag = '0'
     </select>
     <select id="selectAllActivityIsComplete" resultType="java.lang.Integer">

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

@@ -12,7 +12,8 @@
         a.type,
         a.proc_ins_id,
         a.process_definition_id,
-        a.handover_id
+        a.handover_id,
+        a.imprest_amount_arrears
     </sql>
     <update id="updateStatusById">
         UPDATE human_resources_depart_handover_computer SET type = #{type}
@@ -23,9 +24,12 @@
         select
         <include refid="Base_Column_List"></include>,
         b.create_by_id as assigneeId,
-        b.draft_administrator as draftAdministrator
+        b.draft_administrator as draftAdministrator,
+        su.name as name,
+        su.office_id as department
         from human_resources_depart_handover_computer a
         left join human_resources_depart_handover b on a.handover_id = b.id
+        left join sys_user su on a.create_by_id = su.id
         where a.id = #{id} and a.del_flag = '0'
     </select>
 </mapper>

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

@@ -22,9 +22,12 @@
         select
         <include refid="Base_Column_List"></include>,
         b.create_by_id as assigneeId,
-        b.draft_administrator as draftAdministrator
+        b.draft_administrator as draftAdministrator,
+        su.name as name,
+        su.office_id as department
         from human_resources_depart_handover_draft a
         left join human_resources_depart_handover b on a.handover_id = b.id
+        left join sys_user su on a.create_by_id = su.id
         where a.id = #{id} and a.del_flag = '0'
     </select>
 </mapper>

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

@@ -11,7 +11,8 @@
         a.type,
         a.proc_ins_id,
         a.process_definition_id,
-        a.handover_id
+        a.handover_id,
+        a.imprest_amount_arrears
     </sql>
 
     <update id="updateStatusById">
@@ -23,9 +24,12 @@
         select
         <include refid="Base_Column_List"></include>,
         b.create_by_id as assigneeId,
-        b.draft_administrator as draftAdministrator
+        b.draft_administrator as draftAdministrator,
+        su.name as name,
+        su.office_id as department
         from human_resources_depart_handover_imprest a
         left join human_resources_depart_handover b on a.handover_id = b.id
+        left join sys_user su on a.create_by_id = su.id
         where a.id = #{id} and a.del_flag = '0'
     </select>
 </mapper>

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

@@ -11,7 +11,8 @@
         a.type,
         a.proc_ins_id,
         a.process_definition_id,
-        a.handover_id
+        a.handover_id,
+        a.imprest_amount_arrears
     </sql>
     <update id="updateStatusById">
         UPDATE human_resources_depart_handover_social_security SET type = #{type}
@@ -22,9 +23,12 @@
         select
         <include refid="Base_Column_List"></include>,
         b.create_by_id as assigneeId,
-        b.draft_administrator as draftAdministrator
+        b.draft_administrator as draftAdministrator,
+        su.name as name,
+        su.office_id as department
         from human_resources_depart_handover_social_security a
         left join human_resources_depart_handover b on a.handover_id = b.id
+        left join sys_user su on a.create_by_id = su.id
         where a.id = #{id} and a.del_flag = '0'
     </select>
 </mapper>

+ 12 - 10
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java

@@ -143,7 +143,8 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             String title = "底稿归档检查";
             String assignee = report.getDraftAdministrator();
             String recordType = "";
-            Map<String, String> newMap = pingMap(procDefId, procDefKey, businessTable, businessId, title, assignee, recordType);
+            String userId = report.getCreateById();
+            Map<String, String> newMap = pingMap(procDefId, procDefKey, businessTable, businessId, title, assignee, recordType, userId);
 
             allMap.put("底稿",newMap);
 
@@ -164,14 +165,14 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             String computerProcDefKey = computerMap.get("key")+"";
             String computerBusinessTable = "human_resources_depart_handover_computer";
             String computerBusinessId = computerId;
-            String computerTitle = "电脑欠款回收";
+            String computerTitle = report.getName() + "的离职申请 - 电脑欠款回收";
             //根据角色查用户信息
             PostDTO computerRoleInfo = SpringUtil.getBean(IPostApi.class).getPostDTOByName("电脑款项审查员");
             String computerAssignee = getAssignee(computerRoleInfo.getId());
 
             String computerRecordType = "";
             Map<String, String> computerNewMap = pingMap(computerProcDefId, computerProcDefKey,
-                    computerBusinessTable, computerBusinessId, computerTitle, computerAssignee, computerRecordType);
+                    computerBusinessTable, computerBusinessId, computerTitle, computerAssignee, computerRecordType,userId);
 
             allMap.put("电脑",computerNewMap);
 
@@ -192,7 +193,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             String accountsProcDefKey = accountsMap.get("key")+"";
             String accountsBusinessTable = "human_resources_depart_handover_accounts";
             String accountsBusinessId = accountsId;
-            String accountsTitle = "应收账款检查";
+            String accountsTitle = report.getName() + "的离职申请 - 应收账款检查";
             //根据角色查用户信息
             PostDTO accountsRoleInfo = SpringUtil.getBean(IPostApi.class).getPostDTOByName("应收账款审查员");
 
@@ -200,7 +201,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
 
             String accountsRecordType = "";
             Map<String, String> accountsNewMap = pingMap(accountsProcDefId, accountsProcDefKey,
-                    accountsBusinessTable, accountsBusinessId, accountsTitle, accountsAssignee, accountsRecordType);
+                    accountsBusinessTable, accountsBusinessId, accountsTitle, accountsAssignee, accountsRecordType,userId);
 
             allMap.put("应收账款",accountsNewMap);
 //            SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
@@ -220,7 +221,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             String socialSecurityProcDefKey = socialSecurityMap.get("key")+"";
             String socialSecurityBusinessTable = "human_resources_depart_handover_social_security";
             String socialSecurityBusinessId = socialSecurityId;
-            String socialSecurityTitle = "社保款项检查";
+            String socialSecurityTitle = report.getName() + "的离职申请 - 社保款项检查";
             //根据角色查用户信息
             PostDTO socialSecurityRoleInfo = SpringUtil.getBean(IPostApi.class).getPostDTOByName("社保欠款审查员");
 
@@ -228,7 +229,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
 
             String socialSecurityRecordType = "";
             Map<String, String> socialSecurityNewMap = pingMap(socialSecurityProcDefId, socialSecurityProcDefKey,
-                    socialSecurityBusinessTable, socialSecurityBusinessId, socialSecurityTitle, socialSecurityAssignee, socialSecurityRecordType);
+                    socialSecurityBusinessTable, socialSecurityBusinessId, socialSecurityTitle, socialSecurityAssignee, socialSecurityRecordType,userId);
 
             allMap.put("社保欠款",socialSecurityNewMap);
 
@@ -249,14 +250,14 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             String handoverImprestProcDefKey = handoverImprestMap.get("key")+"";
             String handoverImprestBusinessTable = "human_resources_depart_handover_imprest";
             String handoverImprestBusinessId = handoverImprestId;
-            String handoverImprestTitle = "备用金检查";
+            String handoverImprestTitle = report.getName() + "的离职申请 - 备用金检查";
             //根据角色查用户信息
             PostDTO postInfo = SpringUtil.getBean(IPostApi.class).getPostDTOByName("备用金审查员");
             String handoverImprestAssignee = getAssignee(postInfo.getId());
 
             String handoverImprestRecordType = "";
             Map<String, String> handoverImprestNewMap = pingMap(handoverImprestProcDefId, handoverImprestProcDefKey,
-                    handoverImprestBusinessTable, handoverImprestBusinessId, handoverImprestTitle, handoverImprestAssignee, handoverImprestRecordType);
+                    handoverImprestBusinessTable, handoverImprestBusinessId, handoverImprestTitle, handoverImprestAssignee, handoverImprestRecordType,userId);
 
             allMap.put("备用金",handoverImprestNewMap);
 
@@ -290,7 +291,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
     }
 
     public Map<String,String> pingMap(String procDefId,String procDefKey,String businessTable,
-                                      String businessId,String title,String assignee,String recordType){
+                                      String businessId,String title,String assignee,String recordType,String userId){
         Map<String,String> map = new HashMap();
         map.put("procDefId", procDefId);
         map.put("procDefKey", procDefKey);
@@ -299,6 +300,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
         map.put("title", title);
         map.put("assignee", assignee);
         map.put("recordType", recordType);
+        map.put("userId", userId);
         return map;
     }
 

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

@@ -49,4 +49,44 @@ public class DepartRegistration extends BaseEntity {
 
     @TableField(exist = false)
     private String mobile;
+
+    //备用金检查表
+    @TableField(exist = false)
+    private String imprestId;
+    @TableField(exist = false)
+    private String imprestProcInsId;
+    @TableField(exist = false)
+    private String imprestProcDefId;
+    @TableField(exist = false)
+    private String imprestType;
+
+    //电脑款项检查表
+    @TableField(exist = false)
+    private String computerId;
+    @TableField(exist = false)
+    private String computerProcInsId;
+    @TableField(exist = false)
+    private String computerProcDefId;
+    @TableField(exist = false)
+    private String computerType;
+
+    //应收账款检查表
+    @TableField(exist = false)
+    private String accountsId;
+    @TableField(exist = false)
+    private String accountsProcInsId;
+    @TableField(exist = false)
+    private String accountsProcDefId;
+    @TableField(exist = false)
+    private String accountsType;
+
+    //社保账款检查表
+    @TableField(exist = false)
+    private String securityId;
+    @TableField(exist = false)
+    private String securityProcInsId;
+    @TableField(exist = false)
+    private String securityProcDefId;
+    @TableField(exist = false)
+    private String securityType;
 }

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

@@ -34,13 +34,33 @@
         so.name as departmentName,
         dh.id as handoverId,
         dh.proc_ins_id as handoverProcInsId,
-        ifnull(dh.type,"0") as "handoverType"
+        ifnull(dh.type,"0") as "handoverType",
+        im.id as imprestId,
+        im.proc_ins_id as imprestProcInsId,
+        im.process_definition_id as imprestProcDefId,
+        ifnull(im.type,"0") as "imprestType",
+        ifnull(compu.type,"0") as "computerType",
+        compu.id as computerId,
+        compu.proc_ins_id as computerProcInsId,
+        compu.process_definition_id as computerProcDefId,
+        ifnull(acco.type,"0") as "accountsType",
+        acco.id as accountsId,
+        acco.proc_ins_id as accountsProcInsId,
+        acco.process_definition_id as accountsProcDefId,
+        ifnull(sse.type,"0") as "securityType",
+        sse.id as securityId,
+        sse.proc_ins_id as securityProcInsId,
+        sse.process_definition_id as securityProcDefId
         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_
+        left join human_resources_depart_handover_imprest im on dh.id = im.handover_id
+        left join human_resources_depart_handover_computer compu on dh.id = compu.handover_id
+        left join human_resources_depart_handover_accounts acco on dh.id = acco.handover_id
+        left join human_resources_depart_handover_social_security sse on dh.id = sse.handover_id
         ${ew.customSqlSegment}
         ORDER BY a.create_time DESC
     </select>

+ 1 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/service/DepartService.java

@@ -127,6 +127,7 @@ public class DepartService extends ServiceImpl<DepartMapper, DepartRegistration>
         QueryWrapper<DepartRegistration> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("create_by_id",userDTO.getId());
         queryWrapper.eq("type","5");
+        queryWrapper.eq("del_flag","0");
         Integer integer = mapper.selectCount(queryWrapper);
         if (integer == 0) {
             return false;