Commit 3fa0edccb17540625103e81f39d36b9ea44e8270

Authored by 廖磊
2 parents 9c381365 bac945fd

Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into

minhang
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&lt;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&lt;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 }
... ...