Commit bac945fdcd8db8d220f8f4f480e6ee5c6629b4f0
1 parent
68f800a0
update
Showing
2 changed files
with
14 additions
and
10 deletions
src/main/java/com/bsth/repository/realcontrol/ChildTaskPlanRepository.java
| 1 | package com.bsth.repository.realcontrol; | 1 | package com.bsth.repository.realcontrol; |
| 2 | 2 | ||
| 3 | -import java.util.List; | ||
| 4 | - | 3 | +import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | import org.springframework.data.jpa.domain.Specification; | 5 | import org.springframework.data.jpa.domain.Specification; |
| 6 | import org.springframework.data.jpa.repository.EntityGraph; | 6 | import org.springframework.data.jpa.repository.EntityGraph; |
| 7 | import org.springframework.stereotype.Repository; | 7 | import org.springframework.stereotype.Repository; |
| 8 | 8 | ||
| 9 | -import com.bsth.entity.realcontrol.ChildTaskPlan; | ||
| 10 | -import com.bsth.repository.BaseRepository; | 9 | +import java.util.List; |
| 11 | 10 | ||
| 12 | @Repository | 11 | @Repository |
| 13 | public interface ChildTaskPlanRepository extends BaseRepository<ChildTaskPlan, Long>{ | 12 | public interface ChildTaskPlanRepository extends BaseRepository<ChildTaskPlan, Long>{ |
| @@ -15,4 +14,8 @@ public interface ChildTaskPlanRepository extends BaseRepository<ChildTaskPlan, L | @@ -15,4 +14,8 @@ public interface ChildTaskPlanRepository extends BaseRepository<ChildTaskPlan, L | ||
| 15 | @EntityGraph(value = "childTaskPlan_schedule", type = EntityGraph.EntityGraphType.FETCH) | 14 | @EntityGraph(value = "childTaskPlan_schedule", type = EntityGraph.EntityGraphType.FETCH) |
| 16 | @Override | 15 | @Override |
| 17 | List<ChildTaskPlan> findAll(Specification<ChildTaskPlan> spec); | 16 | List<ChildTaskPlan> findAll(Specification<ChildTaskPlan> spec); |
| 17 | + | ||
| 18 | + @EntityGraph(value = "childTaskPlan_schedule", type = EntityGraph.EntityGraphType.FETCH) | ||
| 19 | + @Override | ||
| 20 | + ChildTaskPlan findOne(Long id); | ||
| 18 | } | 21 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -394,14 +394,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -394,14 +394,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 394 | return rs; | 394 | return rs; |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | - dayOfSchedule.delete(sch); | ||
| 398 | - //ScheduleRealInfo sch = dayOfSchedule.delete(id); | ||
| 399 | //数据库删除 | 397 | //数据库删除 |
| 400 | rs = super.delete(id); | 398 | rs = super.delete(id); |
| 401 | - //更新起点应到时间 | ||
| 402 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | ||
| 403 | - rs.put("ts", ts); | ||
| 404 | - rs.put("delete", sch); | 399 | + if(rs.get("status").equals(ResponseCode.SUCCESS)){ |
| 400 | + dayOfSchedule.delete(sch); | ||
| 401 | + //更新起点应到时间 | ||
| 402 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | ||
| 403 | + rs.put("ts", ts); | ||
| 404 | + rs.put("delete", sch); | ||
| 405 | + } | ||
| 405 | 406 | ||
| 406 | return rs; | 407 | return rs; |
| 407 | } | 408 | } |