|
@@ -4,6 +4,7 @@ import com.galaxis.capsule.util.GalaxisRepository;
|
|
|
import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunProjectCostDO;
|
|
|
import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunWeekMemberHourDO;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
+import org.springframework.data.repository.query.Param;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -41,6 +42,26 @@ public interface ChuanyunWeekMemberHourDao extends GalaxisRepository<ChuanyunWee
|
|
|
List<ChuanyunWeekMemberHourDO> getWeekMemberHour();
|
|
|
|
|
|
/**
|
|
|
+ * 判断是否有流程中数据
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Query(value="SELECT chuanyun_self_work_hour.object_id," +
|
|
|
+ "DATE_FORMAT(day_log_date,'%Y') as year," +
|
|
|
+ "WEEKOFYEAR(chuanyun_self_work_hour.day_log_date) AS week," +
|
|
|
+ "project_id,user_id," +
|
|
|
+ "SUM(standard_work_hour)AS standard_work_hour," +
|
|
|
+ "project_type," +
|
|
|
+ "`status`" +
|
|
|
+ "FROM chuanyun_self_work_hour " +
|
|
|
+ "WHERE project_id=?1 and user_id=?2 and DATE_FORMAT(day_log_date,'%Y')=?3 and WEEKOFYEAR(chuanyun_self_work_hour.day_log_date)=?4 and status=2" +
|
|
|
+ " GROUP BY chuanyun_self_work_hour.project_id," +
|
|
|
+ "chuanyun_self_work_hour.user_id," +
|
|
|
+ "DATE_FORMAT(day_log_date,'%Y')," +
|
|
|
+ "WEEKOFYEAR(chuanyun_self_work_hour.day_log_date)," +
|
|
|
+ "chuanyun_self_work_hour.`status`",nativeQuery = true)
|
|
|
+ ChuanyunWeekMemberHourDO getProcessWeekHour(@Param("projectId")String projectId,@Param("userId")String userId,@Param("year")String year,@Param("week")String week);
|
|
|
+
|
|
|
+ /**
|
|
|
* 项目人员周度是否存在
|
|
|
* @param projectId
|
|
|
* @param userId
|
|
@@ -48,4 +69,9 @@ public interface ChuanyunWeekMemberHourDao extends GalaxisRepository<ChuanyunWee
|
|
|
* @return
|
|
|
*/
|
|
|
ChuanyunWeekMemberHourDO findByProjectIdAndUserIdAndWeekAndStatusAndProjectTypeAndYear(String projectId,String userId,String week,String status,String projectType,String year);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除状态为审核中的数据
|
|
|
+ */
|
|
|
+ void deleteByProjectIdAndUserIdAndYearAndWeekAndStatus(String projectId,String userId,String year,String week,String status);
|
|
|
}
|