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 | 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 | 5 | import org.springframework.data.jpa.domain.Specification; |
| 6 | 6 | import org.springframework.data.jpa.repository.EntityGraph; |
| 7 | 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 | 11 | @Repository |
| 13 | 12 | public interface ChildTaskPlanRepository extends BaseRepository<ChildTaskPlan, Long>{ |
| ... | ... | @@ -15,4 +14,8 @@ public interface ChildTaskPlanRepository extends BaseRepository<ChildTaskPlan, L |
| 15 | 14 | @EntityGraph(value = "childTaskPlan_schedule", type = EntityGraph.EntityGraphType.FETCH) |
| 16 | 15 | @Override |
| 17 | 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 | 394 | return rs; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | - dayOfSchedule.delete(sch); | |
| 398 | - //ScheduleRealInfo sch = dayOfSchedule.delete(id); | |
| 399 | 397 | //数据库删除 |
| 400 | 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 | 407 | return rs; |
| 407 | 408 | } | ... | ... |