|
@@ -18,20 +18,20 @@ import java.util.List;
|
|
|
public interface ChuanyunDayWorkAbcDao extends GalaxisRepository<ChuanyunDayWorkAbcDO,String> {
|
|
|
|
|
|
@Query(value = "select d.project_code,d.project_name,a.object_id,a.project_id,sum(a.standard_work_hour) as total_time,r.plan_time,p.sell_time,q.other_time from chuanyun_self_work_hour a " +
|
|
|
- " left join (select c.project_id,c.user_type,sum(c.standard_work_hour) as plan_time from (select a.*,b.user_type from chuanyun_self_work_hour a " +
|
|
|
- " left join chuanyun_user_company b on a.user_id = b.user_id) c " +
|
|
|
+ "left join (select c.project_id,c.user_type,sum(c.standard_work_hour) as plan_time from (select a.*,b.user_type from chuanyun_self_work_hour a " +
|
|
|
+ "left join chuanyun_user_company b on a.user_id = b.user_id) c " +
|
|
|
"where c.user_type = 0 " +
|
|
|
- "group by c.project_id) r on a.project_id = r.project_id " +
|
|
|
- "left join( select c.project_id,c.user_type,sum(c.standard_work_hour) as sell_time from (select a.*,b.user_type from chuanyun_self_work_hour a " +
|
|
|
- "left join chuanyun_user_company b on a.user_id = b.user_id) c " +
|
|
|
- "where c.user_type = 1" +
|
|
|
- " group by c.project_id) p on a.project_id = p.project_id " +
|
|
|
- " left join (select c.project_id,c.user_type,sum(c.standard_work_hour) as other_time from (select a.*,b.user_type from chuanyun_self_work_hour a " +
|
|
|
- " left join chuanyun_user_company b on a.user_id = b.user_id) c " +
|
|
|
- " where c.user_type = 2 " +
|
|
|
- " group by c.project_id) q on a.project_id = q.project_id " +
|
|
|
- " left join chuanyun_project d on a.project_id = d.object_id " +
|
|
|
- " group by a.project_id" ,
|
|
|
+ "group by c.project_id) r on a.project_id = r.project_id " +
|
|
|
+ "left join( select c.project_id,c.user_type,sum(c.standard_work_hour) as sell_time from (select a.*,b.user_type from chuanyun_self_work_hour a " +
|
|
|
+ "left join chuanyun_user_company b on a.user_id = b.user_id) c " +
|
|
|
+ "where c.user_type = 1 " +
|
|
|
+ "group by c.project_id) p on a.project_id = p.project_id " +
|
|
|
+ "left join (select c.project_id,c.user_type,sum(c.standard_work_hour) as other_time from (select a.*,b.user_type from chuanyun_self_work_hour a " +
|
|
|
+ "left join chuanyun_user_company b on a.user_id = b.user_id) c " +
|
|
|
+ "where c.user_type = 2 " +
|
|
|
+ "group by c.project_id) q on a.project_id = q.project_id " +
|
|
|
+ "left join chuanyun_project d on a.project_id = d.object_id " +
|
|
|
+ "group by a.project_id" ,
|
|
|
nativeQuery = true)
|
|
|
List<ChuanyunDayWorkAbcDO> queryDayWorkAbc();
|
|
|
|