Bladeren bron

开票添加邮箱功能,签字注师一去除指定人员100份限制

user5 1 jaar geleden
bovenliggende
commit
0762eb1f4f

+ 3 - 3
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java

@@ -63,11 +63,11 @@ public interface CwProjectRecordsMapper extends BaseMapper<CwProjectRecords> {
 
     List<String> getHaveProjectIds(@Param("currentUser") UserDTO currentUser);
 
-    List<String> isUseByReport(String[] idArray);
+    List<String> isUseByReport(@Param("idArray")List<String> idArray);
 
-    List<String> isUseByReim(String[] idArray);
+    List<String> isUseByReim(@Param("idArray")List<String> idArray);
 
-    List<String> isUseByFinance(String[] idArray);
+    List<String> isUseByFinance(@Param("idArray")List<String> idArray);
 
     @InterceptorIgnore(tenantLine = "true")
     void updatereportReviewById(CwProjectRecords records);

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwProjectRecordsService.java

@@ -487,7 +487,7 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
      */
     public ResponseEntity deleteByIds(String ids) {
         // 查询项目是否被引用(报告、报销、发票)
-        String idArray[] =ids.split(",");
+        List<String> idArray = Arrays.asList(ids.split(","));
         List<String> useProjects = new ArrayList<>();
         // 查询项目是否被引用(报告)
         List<String> useByReport = cwProjectRecordsMapper.isUseByReport(idArray);

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

@@ -27,7 +27,6 @@ import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.logging.constant.enums.LogTypeEnum;
 //import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
-import com.jeeplus.pubmodules.collect.service.dto.CollectDto;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import com.jeeplus.sys.feign.IDictApi;
 import com.jeeplus.sys.feign.IUserApi;

+ 25 - 50
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -69,6 +69,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -763,9 +764,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
             //根据报告类型查询下一节点用户
             List<ReviewUser> stringList = new ArrayList<>();
             //如果是苏州分部,这里写死
-            String officeId = reportMapper.getOfficeId("苏州分部");
-            if (reportData.getOfficeId().equals(officeId)){
-                stringList = reportMapper.getReviewByPost("质控-苏州分");
+            String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
+            if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
+                stringList = reportMapper.getReviewByPost("质控-苏州分");
             }else if (reportData.getReportType().equals("1")) {
                 stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
             } else {
@@ -923,16 +924,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                     //根据报告类型查询下一节点用户
                     List<ReviewUser> stringList = new ArrayList<>();
                     //如果是苏州分部,这里写死
-                    String officeId = reportMapper.getOfficeId("苏州分部");
-                    /*if (reportData.getOfficeId().equals(officeId)){
-                        stringList = reportMapper.getReviewByS("13");
-                    }else if (reportData.getReportType().equals("1")) {
-                        stringList = reportMapper.getReviewByS("1");
-                    } else {
-                        stringList = reportMapper.getReviewByS("非苏兴会基字");
-                    }*/
-                    if (reportData.getOfficeId().equals(officeId)){
-                        stringList = reportMapper.getReviewByPost("质控-苏州分布");
+                    String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
+                    if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
+                        stringList = reportMapper.getReviewByPost("质控-苏州分部");
                     }else if (reportData.getReportType().equals("1")) {
                         stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
                     } else {
@@ -1112,16 +1106,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
             //根据报告类型查询下一节点用户
             List<ReviewUser> stringList = new ArrayList<>();
             //如果是苏州分部,这里写死
-            String officeId = reportMapper.getOfficeId("苏州分部");
-            /*if (reportData.getOfficeId().equals(officeId)){
-                stringList = reportMapper.getReviewByS("13");
-            }else if (reportData.getReportType().equals("1")) {
-                stringList = reportMapper.getReviewByS("1");
-            } else {
-                stringList = reportMapper.getReviewByS("2");
-            }*/
-            if (reportData.getOfficeId().equals(officeId)){
-                stringList = reportMapper.getReviewByPost("质控-苏州分布");
+            String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
+            if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
+                stringList = reportMapper.getReviewByPost("质控-苏州分部");
             }else if (reportData.getReportType().equals("1")) {
                 stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
             } else {
@@ -1262,16 +1249,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                     //根据报告类型查询下一节点用户
                     List<ReviewUser> stringList = new ArrayList<>();
                     //如果是苏州分部,这里写死
-                    String officeId = reportMapper.getOfficeId("苏州分部");
-                    /*if (reportData.getOfficeId().equals(officeId)){
-                        stringList = reportMapper.getReviewByS("13");
-                    }else if (reportData.getReportType().equals("1")) {
-                        stringList = reportMapper.getReviewByS("1");
-                    } else {
-                        stringList = reportMapper.getReviewByS("2");
-                    }*/
-                    if (reportData.getOfficeId().equals(officeId)){
-                        stringList = reportMapper.getReviewByPost("质控-苏州分布");
+                    String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
+                    if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
+                        stringList = reportMapper.getReviewByPost("质控-苏州分部");
                     }else if (reportData.getReportType().equals("1")) {
                         stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
                     } else {
@@ -2970,9 +2950,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
             //根据报告类型查询下一节点用户
             List<ReviewUser> stringList = new ArrayList<>();
             //如果是苏州分部,这里写死
-            String officeId = reportMapper.getOfficeId("苏州分部");
-            if (reportData.getOfficeId().equals(officeId)){
-                stringList = reportMapper.getReviewByPost("质控-苏州分");
+            String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
+            if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
+                stringList = reportMapper.getReviewByPost("质控-苏州分");
             }else if (reportData.getReportType().equals("1")) {
                 stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
             } else {
@@ -3113,16 +3093,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                     //根据报告类型查询下一节点用户
                     List<ReviewUser> stringList = new ArrayList<>();
                     //如果是苏州分部,这里写死
-                    String officeId = reportMapper.getOfficeId("苏州分部");
-                    /*if (reportData.getOfficeId().equals(officeId)){
-                        stringList = reportMapper.getReviewByS("13");
-                    }else if (reportData.getReportType().equals("1")) {
-                        stringList = reportMapper.getReviewByS("1");
-                    } else {
-                        stringList = reportMapper.getReviewByS("非苏兴会基字");
-                    }*/
-                    if (reportData.getOfficeId().equals(officeId)){
-                        stringList = reportMapper.getReviewByPost("质控-苏州分布");
+                    String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
+                    if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
+                        stringList = reportMapper.getReviewByPost("质控-苏州分部");
                     }else if (reportData.getReportType().equals("1")) {
                         stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
                     } else {
@@ -3183,8 +3156,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                         try {
                             CwProjectReportArchive cwProjectReportArchive = new CwProjectReportArchive();
                             cwProjectReportArchive.setReportId(reportByReportNo.getId());
-                            float v = Float.parseFloat(dto.getAuditFees());
-                            String result = Float.toString(v * 10000);
+                            BigDecimal b = new BigDecimal(dto.getAuditFees());
+                            BigDecimal multiply = b.multiply(new BigDecimal(10000));
+                            String result = multiply.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
                             cwProjectReportArchive.setAuditMoney(result);
                             cwProjectReportArchiveMapper.updateAuditMoneyByReportId(cwProjectReportArchive);
                         }catch (Exception e){
@@ -3198,8 +3172,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                         try {
                             CwProjectRecords projectRecords = new CwProjectRecords();
                             projectRecords.setId(reportByReportNo.getProjectId());
-                            float v = Float.parseFloat(dto.getProjectMoney());
-                            String result = Float.toString(v * 10000);
+                            BigDecimal b = new BigDecimal(dto.getProjectMoney());
+                            BigDecimal multiply = b.multiply(new BigDecimal(10000));
+                            String result = multiply.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
                             projectRecords.setProjectMoney(result);
                             cwProjectRecordsService.updateById(projectRecords);
                         }catch (Exception e){

+ 14 - 8
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/MyExecutionListener.java

@@ -6,6 +6,7 @@ import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
@@ -72,14 +73,19 @@ public class MyExecutionListener implements ExecutionListener {
                 if(actName.equals("会计-报告签章-电子公章")){
                     UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
                     OfficeDTO officeDTO = userDTO.getOfficeDTO();
-                    //如果是苏州分部发送的签章申请,则会给徐珊发送通知
-                    if(null != officeDTO && "苏州分部".equals(officeDTO.getName())){
-                        //获取角色为“苏州报告签字盖章代办”的角色对应人员信息
-                        List<UserDTO> userDTOList = SpringUtil.getBean(IUserApi.class).getUserInfoByEnName("szbgqzgzdb");
-                        for (UserDTO dto : userDTOList) {
-                            SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
-                                    flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
-                                    dto.getName(),dto.getId(),userDTO.getId());
+                    if(null != officeDTO){
+                        //根据officeId获取office信息
+                        OfficeDTO officeById = SpringUtil.getBean(IOfficeApi.class).getOfficeById(officeDTO.getId());
+                        OfficeDTO parentOffice = SpringUtil.getBean(IOfficeApi.class).getOfficeById(officeById.getParentId());
+                        //如果是苏州分部发送的签章申请,则会给徐珊发送通知
+                        if(null != parentOffice && "苏州分公司".equals(parentOffice.getName())){
+                            //获取角色为“苏州报告签字盖章代办”的角色对应人员信息
+                            List<UserDTO> userDTOList = SpringUtil.getBean(IUserApi.class).getUserInfoByEnName("szbgqzgzdb");
+                            for (UserDTO dto : userDTOList) {
+                                SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                                        flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
+                                        dto.getName(),dto.getId(),userDTO.getId());
+                            }
                         }
                     }
                 }

+ 12 - 7
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/SZSignatureInformExecutionListener.java

@@ -5,6 +5,7 @@ import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
@@ -71,13 +72,17 @@ public class SZSignatureInformExecutionListener implements ExecutionListener {
                 UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
                 OfficeDTO officeDTO = userDTO.getOfficeDTO();
                 //如果是苏州分部发送的签章申请,则会给徐珊发送通知
-                if(null != officeDTO && "苏州分部".equals(officeDTO.getName())){
-                    //获取角色为“苏州报告签字盖章代办”的角色对应人员信息
-                    List<UserDTO> userDTOList = SpringUtil.getBean(IUserApi.class).getUserInfoByEnName("苏州报告签字盖章代办");
-                    for (UserDTO dto : userDTOList) {
-                        SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
-                                flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
-                                dto.getName(),dto.getId(),userDTO.getId());
+                if(null != officeDTO){
+                    OfficeDTO parentOffice = SpringUtil.getBean(IOfficeApi.class).getOfficeById(officeDTO.getParentId());
+                    //如果是苏州分部发送的签章申请,则会给徐珊发送通知
+                    if(null != parentOffice && "苏州分公司".equals(parentOffice.getName())){
+                        //获取角色为“苏州报告签字盖章代办”的角色对应人员信息
+                        List<UserDTO> userDTOList = SpringUtil.getBean(IUserApi.class).getUserInfoByEnName("szbgqzgzdb");
+                        for (UserDTO dto : userDTOList) {
+                            SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                                    flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
+                                    dto.getName(),dto.getId(),userDTO.getId());
+                        }
                     }
                 }
 

+ 121 - 8
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -283,22 +283,62 @@ public class UserController {
         if (ObjectUtil.isNotEmpty(userDTO)) {
             // 当certType传值时,获取拥有此资格证类型的人员
             if (StringUtils.isNotBlank(userDTO.getCertType())) {
-                queryWrapper.eq("sc.type",userDTO.getCertType());
+
+                //获取当前登录人信息
+                UserDTO loginUserDTO = UserUtils.getCurrentUserDTO();
+                //如果当前登录人是中审的管理咨询部人员,则注会列表中添加该部门选择项
+                if(null != loginUserDTO && null != loginUserDTO.getOfficeDTO()){
+                    OfficeDTO officeDTO = loginUserDTO.getOfficeDTO();
+                    if(StringUtils.isNotBlank(officeDTO.getId())){
+                        if("1602840084816138241".equals(officeDTO.getId())){
+                            queryWrapper.and(
+                                    wrapper -> wrapper.eq("sc.type",userDTO.getCertType()).or().eq("a.office_id","1602840084816138241")
+                            );
+                            //queryWrapper.eq("sc.type",userDTO.getCertType()).or().eq("a.office_id","1602840084816138241");
+                        }else{
+                            queryWrapper.eq("sc.type",userDTO.getCertType());
+                        }
+                    }else{
+                        queryWrapper.eq("sc.type",userDTO.getCertType());
+                    }
+                }else{
+                    queryWrapper.eq("sc.type",userDTO.getCertType());
+                }
+
             }
             if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
                 queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
             }
         }
         IPage <UserDTO> result = userService.findPage ( page, queryWrapper );
+        IPage<UserDTO> result2 = userService.findPage3(userDTO);
         //判断 如果是签字注师筛选,则获取签字注师的被选择次数
         if(StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())){
             List<UserDTO> userList = result.getRecords();
+            List<UserDTO> user2List = result2.getRecords();
+            List<String> idList = Lists.newArrayList();
+            for (UserDTO dto : user2List) {
+                idList.add(dto.getId());
+            }
             for (UserDTO info : userList) {
-                if("潘中".equals(info.getName())){
+                if(idList.size()>0){
+                    if(idList.contains(info.getId())){
+                        info.setAccountantUserFlag(0);
+                    }else{
+                        info.setAccountantUserFlag(1);
+                    }
+                }else{
+                    if("潘中".equals(info.getName())){
+                        info.setAccountantUserFlag(0);
+                    }else{
+                        info.setAccountantUserFlag(1);
+                    }
+                }
+                /*if("潘中".equals(info.getName())){
                     info.setAccountantUserFlag(0);
                 }else{
                     info.setAccountantUserFlag(1);
-                }
+                }*/
                 Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
                 info.setAccountantUserCount(accountantUserCount);
             }
@@ -313,11 +353,22 @@ public class UserController {
     @GetMapping("getCount")
     public ResponseEntity getCount(String id){
         UserDTO userDTO = userService.get(id);
-        if (userDTO.getName().equals("潘中")){
+        List<UserDTO> signatureAnnotator2List = userService.getSignatureAnnotator2List(new UserDTO());
+        for (UserDTO dto : signatureAnnotator2List) {
+
+            if (userDTO.getId().equals(dto.getId())){
+                userDTO.setAccountantUserFlag(0);
+                break;
+            }else{
+                userDTO.setAccountantUserFlag(1);
+                // break;
+            }
+        }
+        /*if (userDTO.getName().equals("潘中")){
             userDTO.setAccountantUserFlag(0);
         }else{
             userDTO.setAccountantUserFlag(1);
-        }
+        }*/
         userDTO.setAccountantUserCount(userService.getAccountantUserCount(id));
         return ResponseEntity.ok(userDTO);
     }
@@ -412,11 +463,11 @@ 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())) {
+                    //if ("潘中".equals(info.getName())) {
                         info.setAccountantUserFlag(0);
-                    } else {
+                    /*} else {
                         info.setAccountantUserFlag(1);
-                    }
+                    }*/
                     Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
                     info.setAccountantUserCount(accountantUserCount);
                 }
@@ -975,6 +1026,68 @@ public class UserController {
             List rootTree = officeService.getFinanceTree (objects, extId, type, showAll, "1");
             return ResponseEntity.ok (rootTree);
 
+        }else if (id.equals("10006")){
+            String 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);
+            }
+            String officeName1="苏州分公司";
+            List<OfficeDTO> list1 = officeService.getOfficeAllByOfficeName (officeName1);
+            if(list1.size()>0){
+                List<String> officeIds = Lists.newArrayList();
+                for (OfficeDTO info : list1) {
+                    info.setTypeFlag(true);
+                    officeIds.add(info.getId());
+                }
+                //根据部门查询对应部门下的所有数据
+                List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+                list1.addAll(officeDTOList);
+            }
+            List<OfficeDTO> objects = new ArrayList<>();
+            objects.addAll(list);
+            objects.addAll(list1);
+            List rootTree = officeService.getFinanceTree (objects, extId, type, showAll, "1");
+            return ResponseEntity.ok (rootTree);
+
+        }else if (id.equals("10004")){
+            String 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);
+            }
+            String officeName1="中审江苏分所";
+            List<OfficeDTO> list1 = officeService.getOfficeAllByOfficeName (officeName1);
+            if(list1.size()>0){
+                List<String> officeIds = Lists.newArrayList();
+                for (OfficeDTO info : list1) {
+                    info.setTypeFlag(true);
+                    officeIds.add(info.getId());
+                }
+                //根据部门查询对应部门下的所有数据
+                List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+                list1.addAll(officeDTOList);
+            }
+            List<OfficeDTO> objects = new ArrayList<>();
+            objects.addAll(list);
+            objects.addAll(list1);
+            List rootTree = officeService.getFinanceTree (objects, extId, type, showAll, "1");
+            return ResponseEntity.ok (rootTree);
+
         }else {
             String officeName="兴光会计师事务所";
             List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);

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

@@ -54,7 +54,7 @@ public interface UserMapper extends BaseMapper <User> {
      * @param userId
      * @return
      */
-    Integer getAccountantUserCount(@Param("userId") String userId);
+    Integer getAccountantUserCount(@Param("userId") String userId, @Param("yearStr") String yearStr);
 
     /**
      * 根据角色英文名称查询角色下人员信息

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

@@ -357,6 +357,7 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
     <select id="getAccountantUserCount" resultType="java.lang.Integer">
         select count(id) from cw_project_report
 		    where del_flag = 0 and (signature_annotator1 = #{userId} or signature_annotator2 = #{userId})
+		    and document_no like concat('%',#{yearStr},'%')
     </select>
     <select id="findList3" resultType="com.jeeplus.sys.service.dto.UserDTO">
         SELECT

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

@@ -549,6 +549,17 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
                     }
                 }
                 break;
+            case "10004":   //中审
+                for (OfficeDTO root : rootTrees) {
+                    if (root.getId().equals("1588068195545808898")||root.getId().equals("1615171302381182978")){
+                        if (this.isUseAble ( extId, type,root, showAll )){
+                            // 不是被排除节点的子节点
+                            List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
+                            offices.addAll (officeList);
+                        }
+                    }
+                }
+                break;
             case "10005":   //项目公司
                 for (OfficeDTO root : rootTrees) {
                     if (root.getId().equals("1588068195545808898")||root.getId().equals("1619953441268330498")){
@@ -560,6 +571,17 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
                     }
                 }
                 break;
+            case "10006":   //苏州分公司
+                for (OfficeDTO root : rootTrees) {
+                    if (root.getId().equals("1588068195545808898")||root.getId().equals("1703668499751649282")){
+                        if (this.isUseAble ( extId, type,root, showAll )){
+                            // 不是被排除节点的子节点
+                            List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
+                            offices.addAll (officeList);
+                        }
+                    }
+                }
+                break;
             default:
                 for (OfficeDTO root : rootTrees) {
                     if (root.getId().equals("1588068195545808898")){

+ 42 - 3
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -36,8 +36,10 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import javax.validation.constraints.NotNull;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Calendar;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -83,7 +85,10 @@ public class UserService extends ServiceImpl <UserMapper, User> {
      * @return
      */
     public Integer getAccountantUserCount(String userId) {
-        return userMapper.getAccountantUserCount (userId);
+        Calendar cal = Calendar.getInstance();
+        String yearStr = String.valueOf(cal.get(Calendar.YEAR));
+        yearStr = yearStr + "-";
+        return userMapper.getAccountantUserCount (userId,yearStr);
     }
 
     public List<CertDTO> getCertListByUserId(){
@@ -334,12 +339,14 @@ public class UserService extends ServiceImpl <UserMapper, User> {
      * @param userDTO
      */
     public void saveOrUpdate(UserDTO userDTO) {
-        ArrayList<UserDTO> users = new ArrayList<>();
         User user = userWrapper.toEntity ( userDTO );
         if(StringUtils.isNotBlank(userDTO.getManageOfficeIds())){
             user.setManageOfficeIds(userDTO.getManageOfficeIds());
         }
         super.saveOrUpdate ( user );
+        if ( StrUtil.isBlank ( userDTO.getId ( ) ) ) {
+            userDTO.setId ( user.getId ( ) );
+        }
         // 更新用户与角色关联
         baseMapper.deleteUserRole ( userDTO.getId ( ) );
         if ( userDTO.getRoleDTOList ( ) != null ) {
@@ -484,7 +491,7 @@ public class UserService extends ServiceImpl <UserMapper, User> {
     }
 
     /**
-     * 岗位分页检索
+     * 查询签字注师二信息列表
      * @param page
      * @param
      * @return
@@ -501,6 +508,24 @@ public class UserService extends ServiceImpl <UserMapper, User> {
         return  page;
     }
 
+
+
+    /**
+     * 查询签字注师二信息集合
+     * @param page
+     * @param
+     * @return
+     */
+    public List <UserDTO> getSignatureAnnotator2List(UserDTO dto) {
+        OfficeDTO officeDTO = dto.getCompanyDTO();
+        String companyId = "";
+        if (null != officeDTO){
+            companyId = officeDTO.getId();
+        }
+        List <UserDTO> signatureAnnotator2List = baseMapper.findList1(dto,companyId);
+        return  signatureAnnotator2List;
+    }
+
     public Boolean isUpdatePassword(String userId) {
         String updatePassword = userMapper.isUpdatePassword(userId);
         if (StringUtils.isNotBlank(updatePassword)) {
@@ -577,6 +602,20 @@ public class UserService extends ServiceImpl <UserMapper, User> {
         List<String> hasUser = userMapper.getHasUser();
         List<String> hasUserFather = userMapper.getHasUserFather();
         hasUser.addAll(hasUserFather);
+
+        //获取当前登录人信息
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        //如果当前登录人是中审的管理咨询部人员,则注会列表中添加该部门选择项
+        if(null != userDTO && null != userDTO.getOfficeDTO()){
+            OfficeDTO officeDTO = userDTO.getOfficeDTO();
+            if(StringUtils.isNotBlank(officeDTO.getId())){
+                if("1602840084816138241".equals(officeDTO.getId())){
+                    hasUser.add("1602840084816138241");
+                    hasUser.add("1615171302381182978");
+                }
+            }
+        }
+
         return hasUser;
     }