Przeglądaj źródła

修改批量新增失败

车车 2 miesięcy temu
rodzic
commit
9ab9795d35

+ 12 - 4
ktg-admin/src/main/java/com/ktg/web/controller/system/SysUserController.java

@@ -275,7 +275,10 @@ public class SysUserController extends BaseController
                 isUserWorkstation.setWorkstationId(workstationId);
                 isUserWorkstations.add(isUserWorkstation);
             }
-            iIsUserWorkstationService.saveBatch(isUserWorkstations);
+            // iIsUserWorkstationService.saveBatch(isUserWorkstations);
+            for (IsUserWorkstation isUserWorkstation : isUserWorkstations) {
+                iIsUserWorkstationService.save(isUserWorkstation);
+            }
         }
         // 关联单位
         if (user.getUnitIds() != null && user.getUnitIds().length > 0) {
@@ -286,7 +289,10 @@ public class SysUserController extends BaseController
                 isUserUnit.setUnitId(unitId);
                 userUnits.add(isUserUnit);
             }
-            iIsUserUnitService.saveBatch(userUnits);
+            // iIsUserUnitService.saveBatch(userUnits);
+            for (IsUserUnit userUnit : userUnits) {
+                iIsUserUnitService.save(userUnit);
+            }
         }
         return toAjax(true);
     }
@@ -324,8 +330,9 @@ public class SysUserController extends BaseController
                 isUserWorkstation.setUserId(user.getUserId());
                 isUserWorkstation.setWorkstationId(workstationId);
                 isUserWorkstations.add(isUserWorkstation);
+                iIsUserWorkstationService.save(isUserWorkstation);
             }
-            iIsUserWorkstationService.saveBatch(isUserWorkstations);
+            // iIsUserWorkstationService.saveBatch(isUserWorkstations);
         }
         // 关联单位
         if (user.getUnitIds() != null && user.getUnitIds().length > 0) {
@@ -337,8 +344,9 @@ public class SysUserController extends BaseController
                 isUserUnit.setUserId(user.getUserId());
                 isUserUnit.setUnitId(unitId);
                 userUnits.add(isUserUnit);
+                iIsUserUnitService.save(isUserUnit);
             }
-            iIsUserUnitService.saveBatch(userUnits);
+            // iIsUserUnitService.saveBatch(userUnits);
         }
         return toAjax(true);
     }

+ 0 - 1
ktg-iscs/src/main/java/com/ktg/iscs/domain/IsJobTicketKey.java

@@ -24,7 +24,6 @@ public class IsJobTicketKey extends BaseBean
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value = "记录ID")
-    @TableId(type = IdType.AUTO)
     private Long recordId;
 
     @ApiModelProperty(value = "作业票ID")

+ 2 - 0
ktg-iscs/src/main/java/com/ktg/iscs/domain/IsMaterialsPlanCabinet.java

@@ -1,6 +1,8 @@
 package com.ktg.iscs.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ktg.common.annotation.Excel;
 import io.swagger.annotations.ApiModelProperty;

+ 4 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/HardwareMaterialApiServiceImpl.java

@@ -1206,7 +1206,10 @@ public class HardwareMaterialApiServiceImpl implements HardwareMaterialApiServic
         }
         // 3.如果有数据则插入
         if (!isMaterialsChangeRecords.isEmpty()) {
-            isMaterialsChangeRecordService.saveBatch(isMaterialsChangeRecords);
+            // isMaterialsChangeRecordService.saveBatch(isMaterialsChangeRecords);
+            for (IsMaterialsChangeRecord isMaterialsChangeRecord : isMaterialsChangeRecords) {
+                isMaterialsChangeRecordService.save(isMaterialsChangeRecord);
+            }
         }
         // 4.开始整理此次的总结
         AutoReplaceReportVO autoReplaceReportVO = new AutoReplaceReportVO();

+ 4 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsBlacklistServiceImpl.java

@@ -48,7 +48,10 @@ public class IsBlacklistServiceImpl extends ServiceImpl<IsBlacklistMapper, IsBla
             isBlacklist.removeIf(o -> list.stream().map(IsBlacklist::getUserId).collect(Collectors.toSet()).contains(o.getUserId()));
         }
         // 开始拉黑
-        saveBatch(isBlacklist);
+        // saveBatch(isBlacklist);
+        for (IsBlacklist blacklist : isBlacklist) {
+            save(blacklist);
+        }
         return true;
     }
 

+ 21 - 7
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketServiceImpl.java

@@ -195,12 +195,14 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
             jobTicketPoints.setMachineryId(point.getMachineryId());
             jobTicketPoints.setPointId(point.getPointId());
             isJobTicketPoints.add(jobTicketPoints);
+            iIsJobTicketPointsService.save(jobTicketPoints);
         }
-        iIsJobTicketPointsService.saveBatch(isJobTicketPoints);
+        // iIsJobTicketPointsService.saveBatch(isJobTicketPoints);
         // 3.1新增作业票和钥匙的关联关系(两条数据,一条上锁,一条解锁)
         saveJobTicketKey(jobTicket.getTicketId());
         // 3.2新增作业票和挂锁的关联关// 3.3新增作业票和锁具的关联关系
         List<Long> pointIds = points.stream().map(IsMachineryPoints::getPointId).collect(Collectors.toList());
+        Assert.isFalse(pointIds.isEmpty(), "点位信息不能为空!");
         List<IsIsolationPoint> pointList = iIsIsolationPointService.listByIds(pointIds);
         saveJobTicketLockAndSet(pointList, jobTicket.getTicketId());
 
@@ -217,8 +219,9 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
             isJobTicketStep.setStepContent(steps.get(i-1));
             isJobTicketStep.setAndroidStepContent(androidSteps.get(i-1));
             isJobTicketSteps.add(isJobTicketStep);
+            iIsJobTicketStepService.save(isJobTicketStep);
         }
-        iIsJobTicketStepService.saveBatch(isJobTicketSteps);
+        // iIsJobTicketStepService.saveBatch(isJobTicketSteps);
         // 操作确认
         for (IsJobTicketStep isJobTicketStep : isJobTicketSteps) {
             if (isJobTicketStep.getStepStatus().equals("1")) {
@@ -259,8 +262,9 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
             jobTicketPoints.setMachineryId(point.getMachineryId());
             jobTicketPoints.setPointId(point.getPointId());
             isJobTicketPoints.add(jobTicketPoints);
+            iIsJobTicketPointsService.save(jobTicketPoints);
         }
-        iIsJobTicketPointsService.saveBatch(isJobTicketPoints);
+        // iIsJobTicketPointsService.saveBatch(isJobTicketPoints);
         // 3.1新增作业票和钥匙的关联关系(两条数据,一条上锁,一条解锁)
         saveJobTicketKey(jobTicket.getTicketId());
         // 3.2新增作业票和挂锁的关联关// 3.3新增作业票和锁具的关联关系
@@ -280,7 +284,10 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
             isJobTicketStep.setStepContent(steps.get(i-1));
             isJobTicketSteps.add(isJobTicketStep);
         }
-        iIsJobTicketStepService.saveBatch(isJobTicketSteps);
+        // iIsJobTicketStepService.saveBatch(isJobTicketSteps);
+        for (IsJobTicketStep isJobTicketStep : isJobTicketSteps) {
+            iIsJobTicketStepService.save(isJobTicketStep);
+        }
         // 操作确认
         for (IsJobTicketStep isJobTicketStep : isJobTicketSteps) {
             if (isJobTicketStep.getStepStatus().equals("1")) {
@@ -309,7 +316,10 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
         List<IsJobTicketKey> isJobTicketKeys = new ArrayList<>();
         isJobTicketKeys.add(isJobTicketKey);
         isJobTicketKeys.add(jobTicketKey);
-        return iIsJobTicketKeyService.saveBatch(isJobTicketKeys);
+        for (IsJobTicketKey ticketKey : isJobTicketKeys) {
+            iIsJobTicketKeyService.save(ticketKey);
+        }
+        return true; // iIsJobTicketKeyService.saveBatch(isJobTicketKeys);
     }
 
     private boolean saveJobTicketLockAndSet(List<IsIsolationPoint> pointList, Long ticketId) {
@@ -331,7 +341,10 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
             }*/
         }
         // 开始批量新增
-        iIsJobTicketLockService.saveBatch(isJobTicketLocks);
+        // iIsJobTicketLockService.saveBatch(isJobTicketLocks);
+        for (IsJobTicketLock isJobTicketLock : isJobTicketLocks) {
+            iIsJobTicketLockService.save(isJobTicketLock);
+        }
         // iIsJobTicketLocksetService.saveBatch(isJobTicketLocksets);
         return true;
     }
@@ -438,8 +451,9 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
             jobTicketPoints.setPointId(isJobTicketPoints.getPointId());
             jobTicketPoints.setPrePointId(isJobTicketPoints.getPrePointId());
             isJobTicketPointsArrayList.add(jobTicketPoints);
+            iIsJobTicketPointsService.save(jobTicketPoints);
         }
-        iIsJobTicketPointsService.saveBatch(isJobTicketPointsArrayList);
+        // iIsJobTicketPointsService.saveBatch(isJobTicketPointsArrayList);
         // 3.2新增作业票和挂锁的关联关// 3.3新增作业票和锁具的关联关系 ----先清除
         iIsJobTicketLockService.remove(Wrappers.<IsJobTicketLock>lambdaQuery().eq(IsJobTicketLock::getTicketId, dto.getTicketId()));
         iIsJobTicketLocksetService.remove(Wrappers.<IsJobTicketLockset>lambdaQuery().eq(IsJobTicketLockset::getJobTicketId, dto.getTicketId()));

+ 2 - 2
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLotoStationServiceImpl.java

@@ -57,7 +57,7 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
         IsLotoStation lotoStation = getById(lotoId);
         // 3.解析map
         List<PointsMapVO> points = new ArrayList<>();
-        if (lotoStation != null && StringUtils.isNotBlank(lotoStation.getMap())) {
+        /*if (lotoStation != null && StringUtils.isNotBlank(lotoStation.getMap())) {
             String map = lotoStation.getMap();
             ObjectMapper objectMapper = new ObjectMapper();
             try {
@@ -126,7 +126,7 @@ public class IsLotoStationServiceImpl extends ServiceImpl<IsLotoStationMapper, I
                 Assert.isTrue(false, "map数据解析失败!");
                 e.printStackTrace();
             }
-        }
+        }*/
         return points;
     }
 

+ 2 - 2
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsLotoSwitchMapServiceImpl.java

@@ -104,13 +104,13 @@ public class IsLotoSwitchMapServiceImpl extends ServiceImpl<IsLotoSwitchMapMappe
             // 开始绑定
             iIsIsolationPointService.update(Wrappers.<IsIsolationPoint>lambdaUpdate()
                     .in(IsIsolationPoint::getPointId, dto.getBindingPointIds())
-                    .set(IsIsolationPoint::getLotoId, dto.getSwitchMapId()));
+                    .set(IsIsolationPoint::getSwitchMapId, dto.getSwitchMapId()));
         }
         if (!dto.getUnbindPointIds().isEmpty()) {
             // 开始解绑
             iIsIsolationPointService.update(Wrappers.<IsIsolationPoint>lambdaUpdate()
                     .in(IsIsolationPoint::getPointId, dto.getUnbindPointIds())
-                    .set(IsIsolationPoint::getLotoId, null));
+                    .set(IsIsolationPoint::getSwitchMapId, null));
         }
         return true;
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMachineryServiceImpl.java

@@ -137,8 +137,9 @@ public class IsMachineryServiceImpl extends ServiceImpl<IsMachineryMapper, IsMac
             isMachineryPoint.setMachineryId(dto.getMachineryId());
             isMachineryPoint.setPointId(pointId);
             isMachineryPoints.add(isMachineryPoint);
+            iIsMachineryPointsService.save(isMachineryPoint);
         }
-        iIsMachineryPointsService.saveBatch(isMachineryPoints);
+        // iIsMachineryPointsService.saveBatch(isMachineryPoints);
         return true;
     }
 

+ 12 - 3
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMapPointServiceImpl.java

@@ -40,17 +40,26 @@ public class IsMapPointServiceImpl extends ServiceImpl<IsMapPointMapper, IsMapPo
         // 1.绑定
         if (!dto.getBindingPoints().isEmpty()) {
             List<IsMapPoint> bindingBean = BeanUtils.toBean(dto.getBindingPoints(), IsMapPoint.class);
-            saveBatch(bindingBean);
+            for (IsMapPoint isMapPoint : bindingBean) {
+                save(isMapPoint);
+            }
+            // saveBatch(bindingBean);
         }
         // 2.移动
         if (!dto.getMovePoints().isEmpty()) {
             List<IsMapPoint> moveBean = BeanUtils.toBean(dto.getMovePoints(), IsMapPoint.class);
-            updateBatchById(moveBean);
+            for (IsMapPoint isMapPoint : moveBean) {
+                updateById(isMapPoint);
+            }
+            // updateBatchById(moveBean);
         }
         // 3.解绑
         if (!dto.getUnbindingPoints().isEmpty()) {
             List<IsMapPoint> moveBean = BeanUtils.toBean(dto.getUnbindingPoints(), IsMapPoint.class);
-            removeBatchByIds(moveBean);
+            for (IsMapPoint isMapPoint : moveBean) {
+                removeById(isMapPoint.getId());
+            }
+            // removeBatchByIds(moveBean);
         }
         return true;
     }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMarsSopServiceImpl.java

@@ -182,8 +182,9 @@ public class IsMarsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implem
                 isSopPoint.setSopId(sopId);
                 isSopPoint.setPointId(isMachineryPoints.getPointId());
                 isSopPoints.add(isSopPoint);
+                iIsSopPointsService.save(isSopPoint);
             }
-            iIsSopPointsService.saveBatch(isSopPoints);
+            // iIsSopPointsService.saveBatch(isSopPoints);
         }
         return true;
     }

+ 4 - 2
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsMaterialsCheckPlanServiceImpl.java

@@ -105,8 +105,9 @@ public class IsMaterialsCheckPlanServiceImpl extends ServiceImpl<IsMaterialsChec
             isMaterialsPlanCabinet.setCabinetId(cabinetId);
             isMaterialsPlanCabinet.setCheckUserId(dto.getCheckUserId());
             isMaterialsPlanCabinets.add(isMaterialsPlanCabinet);
+            iIsMaterialsPlanCabinetService.save(isMaterialsPlanCabinet);
         }
-        iIsMaterialsPlanCabinetService.saveBatch(isMaterialsPlanCabinets);
+        // iIsMaterialsPlanCabinetService.saveBatch(isMaterialsPlanCabinets);
         // 4.开始计算倒计时,给检查员发送邮件
         addMail(dto, materialsCheckPlan);
         return true;
@@ -193,8 +194,9 @@ public class IsMaterialsCheckPlanServiceImpl extends ServiceImpl<IsMaterialsChec
             isMaterialsPlanCabinet.setCabinetId(cabinetId);
             isMaterialsPlanCabinet.setCabinetId(dto.getCheckUserId());
             isMaterialsPlanCabinets.add(isMaterialsPlanCabinet);
+            iIsMaterialsPlanCabinetService.save(isMaterialsPlanCabinet);
         }
-        iIsMaterialsPlanCabinetService.saveBatch(isMaterialsPlanCabinets);
+        // iIsMaterialsPlanCabinetService.saveBatch(isMaterialsPlanCabinets);
         // 4.邮件也是先删除再新增
         addMail(dto, materialsCheckPlan);
         return true;

+ 1 - 0
ktg-iscs/src/main/resources/mapper/IsIsolationPointMapper.xml

@@ -215,6 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         max(w.workstation_name) AS workstation_name,
         STRING_AGG(ma.machinery_name, ', ') AS machinery_name,
         max(r.rfid) as point_nfc,
+        MAX(p.switch_map_id) AS switch_map_id,
         MAX(lsm.switch_map_name) AS switch_map_name
         FROM is_isolation_point p
         LEFT JOIN is_lock_type l ON l.lock_type_id = p.lock_type_id

+ 1 - 1
ktg-iscs/src/main/resources/mapper/IsMaterialsCheckPlanMapper.xml

@@ -13,7 +13,7 @@
         p.plan_date,
         p.check_user_id,
         p.status,
-        u.nick_name
+        u.nick_name as check_user_name
         FROM is_materials_check_plan p
         LEFT JOIN is_materials_plan_cabinet c ON c.plan_id = p.plan_id
         LEFT JOIN sys_user u ON u.user_id = p.check_user_id

+ 89 - 69
ktg-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -58,75 +58,95 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectUserList" parameterType="SysUser" resultType="SysUser">
-		<!-- select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status,
-		       u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, Rand(d.dept_name), Rand(d.leader),
-		max(uu.unit_id) as unit_id, max(t.unit_name) unit_name -->
-		select
-		u.user_id,
-		max(u.dept_id) AS dept_id,
-		max(u.nick_name) AS nick_name,
-		max(u.user_name) AS user_name,
-		max(u.email) AS email,
-		max(u.avatar) AS avatar,
-		max(u.phonenumber) AS phonenumber,
-		max(u.PASSWORD) AS PASSWORD,
-		max(u.sex) AS sex,
-		max(u.STATUS) AS STATUS,
-		max(u.del_flag) AS del_flag,
-		max(u.login_ip) AS login_ip,
-		max(u.login_date) AS login_date,
-		max(u.create_by) ascreate_by,
-		max(u.create_time) AS create_time,
-		max(u.remark) AS remark,
-		max(d.dept_name) AS dept_name,
-		max(d.leader) AS leader,
-		max(uu.unit_id) AS unit_id,
-		max(t.unit_name) unit_name
-		from sys_user u
-		left join sys_dept d on u.dept_id = d.dept_id
-		left join is_user_unit uu on uu.user_id = u.user_id
-		left join is_unit t on t.unit_id = uu.unit_id
-		left join is_user_workstation w on w.user_id = u.user_id
-		where u.del_flag = '0'
-		<if test="userIds.size > 0">
-			AND u.user_id in
-			<foreach collection="userIds" index="index" item="item" open="(" separator="," close=")">
-				#{item}
-			</foreach>
-		</if>
-		<if test="unitId != null">
-			AND uu.unit_id = #{unitId}
-		</if>
-		<if test="userId != null and userId != 0">
-			AND u.user_id = #{userId}
-		</if>
-		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="nickName != null and nickName != ''">
-			AND u.nick_name like concat('%', #{nickName}, '%')
-		</if>
-		<if test="status != null and status != ''">
-			AND u.status = #{status}
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-		</if>
-		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-		</if>
-		<if test="deptId != null and deptId != 0">
-			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-		${paramMap.workstationScope}
-		group by u.user_id
-		order by u.user_id
-	</select>
+        <!-- select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status,
+               u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, Rand(d.dept_name), Rand(d.leader),
+        max(uu.unit_id) as unit_id, max(t.unit_name) unit_name -->
+        select
+        u.user_id,
+		u.dept_id,
+        u.nick_name,
+        u.user_name,
+        u.email,
+        u.avatar,
+        u.phonenumber,
+        u.PASSWORD,
+        u.sex,
+        u.STATUS,
+        u.del_flag,
+        u.login_ip,
+        u.login_date,
+        u.create_by,
+        u.create_time,
+        u.remark,
+        d.dept_name,
+        d.leader,
+        uu.unit_id,
+        t.unit_name
+        from sys_user u
+        left join sys_dept d on u.dept_id = d.dept_id
+        left join is_user_unit uu on uu.user_id = u.user_id
+        left join is_unit t on t.unit_id = uu.unit_id
+        left join is_user_workstation w on w.user_id = u.user_id
+        where u.del_flag = '0'
+        <if test="userIds.size > 0">
+            AND u.user_id in
+            <foreach collection="userIds" index="index" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="unitId != null">
+            AND uu.unit_id = #{unitId}
+        </if>
+        <if test="userId != null and userId != 0">
+            AND u.user_id = #{userId}
+        </if>
+        <if test="userName != null and userName != ''">
+            AND u.user_name like concat('%', #{userName}, '%')
+        </if>
+        <if test="nickName != null and nickName != ''">
+            AND u.nick_name like concat('%', #{nickName}, '%')
+        </if>
+        <if test="status != null and status != ''">
+            AND u.status = #{status}
+        </if>
+        <if test="phonenumber != null and phonenumber != ''">
+            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        </if>
+        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+            AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+        </if>
+        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+            AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+        </if>
+        <if test="deptId != null and deptId != 0">
+            AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
+            ancestors) ))
+        </if>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        ${paramMap.workstationScope}
+        group by u.user_id,
+        u.dept_id,
+        u.nick_name,
+        u.user_name,
+        u.email,
+        u.avatar,
+        u.phonenumber,
+        u.PASSWORD,
+        u.sex,
+        u.STATUS,
+        u.del_flag,
+        u.login_ip,
+        u.login_date,
+        u.create_by,
+        u.create_time,
+        u.remark,
+        d.dept_name,
+        d.leader,
+        uu.unit_id,
+        t.unit_name
+        order by u.user_id
+    </select>
 
 	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
 	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time