Commit 361ac7b2a095b6b0884d97e454927acd0bf5b37b

Authored by yiming
1 parent b93c22a4

推送使用克隆对象

src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -21,7 +21,7 @@ import java.util.Set; @@ -21,7 +21,7 @@ import java.util.Set;
21 @NamedAttributeNode("cTasks") 21 @NamedAttributeNode("cTasks")
22 }) 22 })
23 }) 23 })
24 -public class ScheduleRealInfo { 24 +public class ScheduleRealInfo implements Cloneable{
25 /** 主键Id */ 25 /** 主键Id */
26 @Id 26 @Id
27 private Long id; 27 private Long id;
@@ -1054,4 +1054,10 @@ public class ScheduleRealInfo { @@ -1054,4 +1054,10 @@ public class ScheduleRealInfo {
1054 public void setOperationType(String operationType) { 1054 public void setOperationType(String operationType) {
1055 this.operationType = operationType; 1055 this.operationType = operationType;
1056 } 1056 }
  1057 +
  1058 + @Override
  1059 + public ScheduleRealInfo clone() throws CloneNotSupportedException {
  1060 + ScheduleRealInfo cloned = (ScheduleRealInfo) super.clone();
  1061 + return cloned;
  1062 + }
1057 } 1063 }
src/main/java/com/bsth/service/zndd/impl/LoggerZnddServiceImpl.java
1 package com.bsth.service.zndd.impl; 1 package com.bsth.service.zndd.impl;
2 2
3 import com.alibaba.fastjson.JSON; 3 import com.alibaba.fastjson.JSON;
  4 +import com.alibaba.fastjson.JSONObject;
4 import com.bsth.common.ResponseCode; 5 import com.bsth.common.ResponseCode;
5 import com.bsth.controller.realcontrol.dto.DfsjChange; 6 import com.bsth.controller.realcontrol.dto.DfsjChange;
6 import com.bsth.data.schedule.DayOfSchedule; 7 import com.bsth.data.schedule.DayOfSchedule;
@@ -154,7 +155,13 @@ public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer> @@ -154,7 +155,13 @@ public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer>
154 155
155 156
156 public ScheduleRealInfo thissch(Integer ids){ 157 public ScheduleRealInfo thissch(Integer ids){
157 - ScheduleRealInfo sch=dayOfSchedule.get(ids); 158 + ScheduleRealInfo sch2=dayOfSchedule.get(ids);
  159 + ScheduleRealInfo sch= null;
  160 + try {
  161 + sch = sch2.clone();
  162 + } catch (CloneNotSupportedException e) {
  163 + e.printStackTrace();
  164 + }
158 Line line = lineService.findByLineCode(sch.getXlBm()); 165 Line line = lineService.findByLineCode(sch.getXlBm());
159 List<Map<String, Object>> lineList=reportService.lineList(); 166 List<Map<String, Object>> lineList=reportService.lineList();
160 Set<String> lines = new HashSet<>(); 167 Set<String> lines = new HashSet<>();