Przeglądaj źródła

评估、财务代码提交

wangqiang 1 rok temu
rodzic
commit
e91cb2a3c9

+ 2 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/workContract/mapper/WorkContractFileMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.assess.workContract.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.assess.workContract.domain.WorkContractFile;
 import org.apache.ibatis.annotations.Mapper;
@@ -9,6 +10,6 @@ import org.apache.ibatis.annotations.Param;
 public interface WorkContractFileMapper extends BaseMapper<WorkContractFile> {
 
     void updateStatusById(@Param("id") String id, @Param("filedType")String filedType);
-
+    @InterceptorIgnore(tenantLine = "true")
     WorkContractFile selectFileByContractInfoId (@Param("id") String id);
 }

+ 32 - 30
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/MyExecutionListener.java

@@ -33,45 +33,47 @@ public class MyExecutionListener implements ExecutionListener {
             //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
             ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
 
-            List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
-            //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
-            String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
-            String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
 
-            String titleName = "";
-            // 根据流程定义ID查询流程实例
-            ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
-                    .processInstanceId(task.getProcInstId())
-                    .singleResult();
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
 
-            if (processInstance != null) {
-                // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
-                String titleVariableName = "title";
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
 
-                // 查询流程实例的标题变量
-                Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
 
-                if (title != null) {
-                    titleName = title.toString();
-                } else {
-                    // 如果标题变量不存在或者没有值,可以返回默认标题
-                    titleName = "";
+                    if (title != null) {
+                        titleName = title.toString();
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
                 }
-            }
-            Flow flow = new Flow();
-            for (int i=0;i<flows.size();i++){
-                if (flows.get(i).getComment().getMessage().equals("发起流程")){
-                     flow = flows.get(i);
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
                 }
-            }
 
-            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
-            UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+                UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
 
-            SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
-                    flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
-                    flow.getAssigneeName(),flow.getAssigneeId(),userDTO.getId());
+                SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                        flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
+                        flow.getAssigneeName(),flow.getAssigneeId(),userDTO.getId());
+            }
 
             System.out.println ( "end=========" );
         } else if ( "take".equals ( eventName ) ) {//连线监听

+ 1 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java

@@ -119,6 +119,7 @@ public class OfficeController {
                                                       @RequestParam(required = false) String extId,
                                                       @RequestParam(required = false) String type,
                                                       @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        //根据签字注师2岗位用户所在部门查部门数据
         List <OfficeDTO> list = officeService.findList ( tenantId, parentId );
         //List <OfficeDTO> rootTree = officeService.getRootTree (list, extId, type, showAll,"1" );
         List <OfficeDTO> rootTree = officeService.getOldRootTree (parentId,list, extId, type, showAll );

+ 34 - 5
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -324,11 +324,12 @@ public class UserController {
             if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
                 List<UserDTO> userList = result.getRecords();
                 for (UserDTO info : userList) {
-                    if ("潘中".equals(info.getName())) {
-                        info.setAccountantUserFlag(0);
-                    } else {
-                        info.setAccountantUserFlag(1);
-                    }
+//                    if ("潘中".equals(info.getName())) {
+//                        info.setAccountantUserFlag(0);
+//                    } else {
+//                        info.setAccountantUserFlag(1);
+//                    }
+                    info.setAccountantUserFlag(0);
                     Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
                     info.setAccountantUserCount(accountantUserCount);
                 }
@@ -604,6 +605,34 @@ public class UserController {
     }
 
     /**
+     * 获取评估机构JSON数据。
+     *
+     * @param officeName 部门名称
+     * @param extId 排除的ID
+     * @param type  类型(1:公司;2:部门)
+     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @return
+     */
+    @ApiLog("获取评估部门用户数据")
+    @GetMapping("treeUserDataAccessOffice")
+    public ResponseEntity treeUserDataAccessOffice(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        officeName = "评估部";
+        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
+        if(list.size()>0){
+            List<String> officeIds = Lists.newArrayList();
+            for (OfficeDTO info : list) {
+                info.setTypeFlag(true);
+                officeIds.add(info.getId());
+            }
+            //根据部门查询对应部门下的所有数据
+            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+            list.addAll(officeDTOList);
+        }
+        List rootTree = officeService.getAccessRootTree (list, extId, type, showAll, "1");
+        return ResponseEntity.ok (rootTree);
+    }
+
+    /**
      * 判断当前用户是否是管理员
      *
      * @return

+ 8 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java

@@ -78,4 +78,12 @@ public interface OfficeMapper extends TreeMapper <Office> {
      */
     @InterceptorIgnore(tenantLine = "true")
     List<Office> getChildren(@Param("rootId")String rootId);
+
+    /**
+     * 获取到所有parent_id为‘0’的评估部门数据
+     * @param rootId
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<Office> getAccessChildren(@Param("rootId")String rootId);
 }

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

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

+ 33 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml

@@ -192,5 +192,38 @@
             del_flag = 0
             and parent_id = #{rootId}
     </select>
+    <select id="getAccessChildren" resultType="com.jeeplus.sys.domain.Office">
+        SELECT
+            id,
+            is_public,
+            area,
+            CODE,
+            type,
+            grade,
+            address,
+            zip_code,
+            MASTER,
+            phone,
+            fax,
+            email,
+            useable,
+            remarks,
+            parent_id,
+            parent_ids,
+            NAME,
+            sort,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            sys_office
+        WHERE
+            del_flag = 0
+            and parent_id = #{rootId}
+            and NAME LIKE concat('%','评估','%')
+    </select>
 
 </mapper>

+ 43 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -57,6 +57,8 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
      */
     public List <OfficeDTO> findList(String tenantId, String parentId) {
         QueryWrapper queryWrapper = new QueryWrapper ( );
+        //查询签字注师2岗位用户信息
+
         queryWrapper.like ( StringUtils.isNotBlank ( parentId ), "a.parent_ids", "," + parentId + "," );
         queryWrapper.eq ( StringUtils.isNotBlank ( tenantId ), "a.tenant_id", tenantId );
         queryWrapper.eq ( "a.del_flag", 0 );
@@ -64,6 +66,47 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
         return baseMapper.findList ( queryWrapper );
     }
 
+    public List <OfficeDTO> getAccessRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
+        List<OfficeDTO> offices = Lists.newArrayList ();
+        // 获取到所有parent_id为‘0’的部门数据
+        List<Office> children = officeMapper.getAccessChildren(OfficeDTO.getRootId());
+//        List<Office> children = super.getChildren(new Office(OfficeDTO.getRootId()));
+        List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (children);
+        for (OfficeDTO root : rootTrees) {
+            if (this.isUseAble ( extId, type,root, showAll )){
+                // 不是被排除节点的子节点
+                List<OfficeDTO> officeList = formatListToTree (root, list, extId, type, showAll);
+                offices.addAll (officeList);
+            }
+        }
+        if (StringUtils.isNotBlank(showMyOffice)) {
+            OfficeDTO officeDTO = UserUtils.getCurrentUserDTO().getOfficeDTO();
+            // 排除管理员
+            if (!UserUtils.getCurrentUserDTO().isAdmin()){
+                if (org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())) {
+                    String[] split = officeDTO.getParentIds().split(",");
+                    if (split.length > 2) {
+                        Office office = officeMapper.selectById(split[2]);
+                        if ("0".equals(office.getIsPublic())) {
+                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
+                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
+                                offices = this.getCompanyFromTree(offices);
+                            }
+                        }
+                    } else {
+                        if ("0".equals(officeDTO.getIsPublic())) {
+                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
+                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
+                                offices = this.getCompanyFromTree(offices);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return offices;
+    }
+
     public List <OfficeDTO> getRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
         List<OfficeDTO> offices = Lists.newArrayList ();
         // 获取到所有parent_id为‘0’的部门数据