Просмотр исходного кода

新增人员项目数的统计

anderx недель назад: 4
Родитель
Сommit
08cc168b7e
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 4 - 1
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -397,7 +397,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		update sys_user
 		update sys_user
 		set duration=(select sum(a.duration)
 		set duration=(select sum(a.duration)
 					  from project_staff_record a
 					  from project_staff_record a
-					  where a.aid = #{aid})
+					  where a.aid = #{aid}),
+		project_quantity=(select count(*)
+						  from project_task a left join project_staff b on a.id =b.pid
+						  where b.aid = #{aid})
 		where user_id = #{aid}
 		where user_id = #{aid}
 	</update>
 	</update>