瀏覽代碼

新增人员项目数的统计

anderx 1 天之前
父節點
當前提交
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
 		set duration=(select sum(a.duration)
 					  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}
 	</update>