Commit 6f289a07f97dd0ddd955f8aabb26bb680d42663f
1 parent
0e1083c8
1.路单入库sql修正
Showing
2 changed files
with
5 additions
and
7 deletions
src/main/java/com/bsth/entity/Waybill.java
| ... | ... | @@ -7,9 +7,7 @@ import org.joda.time.format.DateTimeFormatter; |
| 7 | 7 | |
| 8 | 8 | import javax.persistence.*; |
| 9 | 9 | import java.io.Serializable; |
| 10 | -import java.util.Date; | |
| 11 | -import java.util.HashSet; | |
| 12 | -import java.util.Set; | |
| 10 | +import java.util.*; | |
| 13 | 11 | |
| 14 | 12 | /** |
| 15 | 13 | * 实际排班计划明细。 |
| ... | ... | @@ -148,7 +146,7 @@ public class Waybill { |
| 148 | 146 | |
| 149 | 147 | /** 子任务 */ |
| 150 | 148 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "schedule") |
| 151 | - private Set<ChildTaskPlan> cTasks = new HashSet<>(); | |
| 149 | + private List<ChildTaskPlan> cTasks = new ArrayList<>(); | |
| 152 | 150 | |
| 153 | 151 | /** 关联的公司名称 */ |
| 154 | 152 | private String gsName; |
| ... | ... | @@ -541,11 +539,11 @@ public class Waybill { |
| 541 | 539 | this.qdzArrDatesj = qdzArrDatesj; |
| 542 | 540 | } |
| 543 | 541 | |
| 544 | - public Set<ChildTaskPlan> getcTasks() { | |
| 542 | + public List<ChildTaskPlan> getcTasks() { | |
| 545 | 543 | return cTasks; |
| 546 | 544 | } |
| 547 | 545 | |
| 548 | - public void setcTasks(Set<ChildTaskPlan> cTasks) { | |
| 546 | + public void setcTasks(List<ChildTaskPlan> cTasks) { | |
| 549 | 547 | this.cTasks = cTasks; |
| 550 | 548 | } |
| 551 | 549 | ... | ... |
src/main/java/com/bsth/server_rs/schedule/WaybillService.java
| ... | ... | @@ -134,7 +134,7 @@ public class WaybillService implements InitializingBean { |
| 134 | 134 | }); |
| 135 | 135 | |
| 136 | 136 | if (childTaskPlans.size() > 0) { |
| 137 | - jdbcTemplate.batchUpdate("insert into zyl.bsth_c_s_child_task_1 (type1,type2,startStationName,endStationName,mileageType,mileage,startDate,endDate,destroy,destroyReason,noClerk,remarks,uid) values(?,?,?,?,?,?,?,?,?,?,?,?,?)", new BatchPreparedStatementSetter() { | |
| 137 | + jdbcTemplate.batchUpdate("insert into zyl.bsth_c_s_child_task_1 (type1,type2,start_station_name,end_station_name,mileage_type,mileage,start_date,end_date,destroy,destroy_reason,no_clerk,remarks,uid) values(?,?,?,?,?,?,?,?,?,?,?,?,?)", new BatchPreparedStatementSetter() { | |
| 138 | 138 | @Override |
| 139 | 139 | public void setValues(PreparedStatement ps, int i) throws SQLException { |
| 140 | 140 | ChildTaskPlan plan = childTaskPlans.get(i); | ... | ... |