From 493aa6cef3d036702558bde1a6994dff705e12c1 Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期三, 12 十月 2022 10:41:42 +0800
Subject: [PATCH] Merge branch 'zigonggao_dev' into huacheng_test

---
 flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java b/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
index d02e7ae..5c3b91a 100644
--- a/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
+++ b/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
@@ -15,7 +15,8 @@
 import java.util.List;
 
 @Service
-public class GuideRepairOrderServiceImpl extends ServiceImpl<GuideRepairOrderMapper, GuideRepairOrder>  implements IGuideRepairOrderService {
+public class GuideRepairOrderServiceImpl extends ServiceImpl<GuideRepairOrderMapper, GuideRepairOrder>
+        implements IGuideRepairOrderService {
 
     @Resource
     private TransactionEventMapper transactionEventMapper;
@@ -49,7 +50,7 @@
                 departmentIds.add(organizationChart.getId().toString());
             }
             List<SysUser> sysUsers = sysUserMapper.selectListByDepartmentId(departmentIds, "," + transactionEvent.getClassifyId(), transactionEvent.getClassifyId() + ",");//获取导半人员
-            if (sysUsers==null) {//如果此所属地区部门没有导半人员则看其下级地区有没有相关分类导办人员
+            if (sysUsers.size()==0) {//如果此所属地区部门没有导半人员则看其下级地区有没有相关分类导办人员
                 for (OrganizationChartEntity organizationChart:organizationChartEntities) {
                     //获取下级部门
                     List<OrganizationChartEntity> organizationChartEntitiesUser = organizationChartMapper.selectList(new QueryWrapper<OrganizationChartEntity>().lambda()
@@ -58,13 +59,13 @@
                         departmentIds=this.getDepartmentIds(organizationChartEntitiesUser,departmentIds);
                 }
                 sysUsers = sysUserMapper.selectListByDepartmentId(departmentIds, "," + transactionEvent.getClassifyId(), transactionEvent.getClassifyId() + ",");//获取导半人员
-                if (sysUsers==null){//如果其下级部门仍没有该分类的导半人员则查询所以该所属地区的导办人员
+                if (sysUsers.size()==0){//如果其下级部门仍没有该分类的导半人员则查询所以该所属地区的导办人员
                     sysUsers = sysUserMapper.selectListByDepartmentId(departmentIds,null,null);//获取导半人员
-                    if(sysUsers==null)//如果该所属地区没有导办人员则为特殊单据需要手动分配
+                    if(sysUsers.size()==0)//如果该所属地区没有导办人员则为特殊单据需要手动分配
                         guideRepairOrder.setState("1");
                 }
             }
-            if (sysUsers!=null){//系统分配导办人员
+            if (sysUsers.size()>0){//系统分配导办人员
                 SysUser sysUser = sysUsers.get(0);//因为sql用了升序排序所以第一条就是待办结最少的人员之一
                 guideRepairOrder.setState("2");
                 sysUser.setTransactionNum(sysUser.getTransactionNum()+1);
@@ -144,8 +145,11 @@
 
     @Override
     public int updateConfig(GuideRepairOrder order) {
-        SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, order.getGuideUserId()));
-        order.setGuideUserPhone(sysUser.getPhonenumber());
+        if  ( order.getGuideUserId()!=null&&!order.getGuideUserId().equals(""))
+        {
+            SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, order.getGuideUserId()));
+            order.setGuideUserPhone(sysUser.getPhonenumber());
+        }
         return baseMapper.updateConfig(order);
     }
 
@@ -188,8 +192,9 @@
      * @return
      */
     @Override
-    public int countStatisticsNum(String state,List<String> ids,String time,String isTimeout,String evaluateState) {
-        return baseMapper.countStatisticsNum(state,ids,time,isTimeout,evaluateState);
+    public int countStatisticsNum(String state,List<String> ids,String time,
+                                  String isTimeout,String evaluateState,List<String> classifyIds) {
+        return baseMapper.countStatisticsNum(state,ids,time,isTimeout,evaluateState,classifyIds);
     }
 
     @Override

--
Gitblit v1.7.1