|
@@ -14,8 +14,16 @@ import java.util.List;
|
|
public interface ChuanyunSelfCostDao extends GalaxisRepository<ChuanyunSelfCostDO,String> {
|
|
public interface ChuanyunSelfCostDao extends GalaxisRepository<ChuanyunSelfCostDO,String> {
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 根据状态查询月工时统计记录
|
|
|
|
+ * @param status 状态
|
|
|
|
+ * @param userId 用户Id
|
|
|
|
+ * @return 月工时统计列表
|
|
|
|
+ */
|
|
|
|
+ List<ChuanyunSelfCostDO> findAllByStatusAndUserId(String status,String userId);
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 获取项目人员总工时
|
|
* 获取项目人员总工时
|
|
- * @return
|
|
|
|
|
|
+ * @return 月工时统计列表
|
|
*/
|
|
*/
|
|
@Query(value="SELECT chuanyun_self_cost.object_id,SUM(chuanyun_self_cost.total_hour) AS total_hour,SUM(chuanyun_self_cost.cost) AS cost,chuanyun_self_cost.project_id,chuanyun_self_cost.user_id"+
|
|
@Query(value="SELECT chuanyun_self_cost.object_id,SUM(chuanyun_self_cost.total_hour) AS total_hour,SUM(chuanyun_self_cost.cost) AS cost,chuanyun_self_cost.project_id,chuanyun_self_cost.user_id"+
|
|
" FROM chuanyun_self_cost GROUP BY chuanyun_self_cost.project_id,chuanyun_self_cost.user_id",nativeQuery = true)
|
|
" FROM chuanyun_self_cost GROUP BY chuanyun_self_cost.project_id,chuanyun_self_cost.user_id",nativeQuery = true)
|
|
@@ -23,19 +31,11 @@ public interface ChuanyunSelfCostDao extends GalaxisRepository<ChuanyunSelfCostD
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据用户ID和项目ID,日期获取工时成本数据
|
|
* 根据用户ID和项目ID,日期获取工时成本数据
|
|
- * @param userId
|
|
|
|
- * @param projectId
|
|
|
|
- * @param dayLogDate
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @param userId 用户Id
|
|
|
|
+ * @param projectId 项目Id
|
|
|
|
+ * @param dayLogDate 日期
|
|
|
|
+ * @return 月工时统计列表
|
|
*/
|
|
*/
|
|
@Query(value="SELECT * FROM chuanyun_self_cost WHERE user_id = ?1 AND project_id = ?2 AND DATE_FORMAT(chuanyun_self_cost.day_log_date,'%Y-%m')=DATE_FORMAT(?3,'%Y-%m')",nativeQuery = true)
|
|
@Query(value="SELECT * FROM chuanyun_self_cost WHERE user_id = ?1 AND project_id = ?2 AND DATE_FORMAT(chuanyun_self_cost.day_log_date,'%Y-%m')=DATE_FORMAT(?3,'%Y-%m')",nativeQuery = true)
|
|
ChuanyunSelfCostDO getOldSelfDO(@Param("userId")String userId,@Param("projectId")String projectId,@Param("dayLogDate")String dayLogDate);
|
|
ChuanyunSelfCostDO getOldSelfDO(@Param("userId")String userId,@Param("projectId")String projectId,@Param("dayLogDate")String dayLogDate);
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 根据流程状态删除数据
|
|
|
|
- * @param status
|
|
|
|
- */
|
|
|
|
- @Transactional
|
|
|
|
- void deleteAllByStatus(String status);
|
|
|
|
-
|
|
|
|
}
|
|
}
|