Commit d874e15b1dbca085285560888d5ced87a2721ae3

Authored by 王通
1 parent 6f289a07

1.

src/main/java/com/bsth/server_rs/schedule/WaybillService.java
@@ -73,7 +73,7 @@ public class WaybillService implements InitializingBean { @@ -73,7 +73,7 @@ public class WaybillService implements InitializingBean {
73 jdbcTemplate.update("delete a from zyl.bsth_c_s_child_task_1 a join zyl.bsth_c_s_sp_info_real_1 b on a.uid = b.uid where schedule_date_str = ? and xl_name = ?", new Object[] { scheduleDateStr, waybill.getXlName() }); 73 jdbcTemplate.update("delete a from zyl.bsth_c_s_child_task_1 a join zyl.bsth_c_s_sp_info_real_1 b on a.uid = b.uid where schedule_date_str = ? and xl_name = ?", new Object[] { scheduleDateStr, waybill.getXlName() });
74 jdbcTemplate.update("delete from zyl.bsth_c_s_sp_info_real_1 where schedule_date_str = ? and xl_name = ?", new Object[] { scheduleDateStr, waybill.getXlName() }); 74 jdbcTemplate.update("delete from zyl.bsth_c_s_sp_info_real_1 where schedule_date_str = ? and xl_name = ?", new Object[] { scheduleDateStr, waybill.getXlName() });
75 jdbcTemplate.batchUpdate("insert into zyl.bsth_c_s_sp_info_real_1 (schedule_date_str,real_exec_date,xl_name,lp_name,cl_zbh,j_gh,j_name,s_gh,s_name," + 75 jdbcTemplate.batchUpdate("insert into zyl.bsth_c_s_sp_info_real_1 (schedule_date_str,real_exec_date,xl_name,lp_name,cl_zbh,j_gh,j_name,s_gh,s_name," +
76 - "xl_dir,qdz_name,qdz_code,zdz_name,zdz_code,fcsj,zdsj,fcno,bcs,jhlc,bcsj,bc_type,fcsj_actual,zdsj_actual,status,dfsj,gs_bm,fgs_bm,remarks,schedule_date,xl_bm,jhlc_orig,adjust_exps,gs_name,fgs_name,uid) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", new BatchPreparedStatementSetter() { 76 + "xl_dir,qdz_name,qdz_code,zdz_name,zdz_code,fcsj,zdsj,fcno,bcs,jhlc,bcsj,bc_type,fcsj_actual,zdsj_actual,status,dfsj,gs_bm,fgs_bm,remarks,schedule_date,xl_bm,jhlc_orig,adjust_exps,gs_name,fgs_name,uid,sflj) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", new BatchPreparedStatementSetter() {
77 @Override 77 @Override
78 public void setValues(PreparedStatement ps, int i) throws SQLException { 78 public void setValues(PreparedStatement ps, int i) throws SQLException {
79 Waybill sri = waybills.get(i); 79 Waybill sri = waybills.get(i);
@@ -121,6 +121,7 @@ public class WaybillService implements InitializingBean { @@ -121,6 +121,7 @@ public class WaybillService implements InitializingBean {
121 ps.setString(34, BasicDataBuffer.getBranchCompanyNameByCode(lineInfo.getBrancheCompany())); 121 ps.setString(34, BasicDataBuffer.getBranchCompanyNameByCode(lineInfo.getBrancheCompany()));
122 String uid = UUID.randomUUID().toString(); 122 String uid = UUID.randomUUID().toString();
123 ps.setString(35, uid); 123 ps.setString(35, uid);
  124 + ps.setBoolean(36, sri.isSflj());
124 for (ChildTaskPlan plan : sri.getcTasks()) { 125 for (ChildTaskPlan plan : sri.getcTasks()) {
125 plan.setUid(uid); 126 plan.setUid(uid);
126 childTaskPlans.add(plan); 127 childTaskPlans.add(plan);
@@ -196,9 +197,10 @@ public class WaybillService implements InitializingBean { @@ -196,9 +197,10 @@ public class WaybillService implements InitializingBean {
196 @Override 197 @Override
197 public void afterPropertiesSet() throws Exception { 198 public void afterPropertiesSet() throws Exception {
198 adjustExps.addAll(Arrays.asList("配车", "保养", "故障", "肇事", "路阻", "纠纷", "缺人", "客稀", "缺车", "气候", "援外", "吊慢", "抽减", "路救抛锚", "其他")); 199 adjustExps.addAll(Arrays.asList("配车", "保养", "故障", "肇事", "路阻", "纠纷", "缺人", "客稀", "缺车", "气候", "援外", "吊慢", "抽减", "路救抛锚", "其他"));
199 - /*BufferedReader reader = new BufferedReader(new FileReader("E:/waybill.txt")); 200 + BufferedReader reader = new BufferedReader(new FileReader("E:/waybill.txt"));
200 String line = reader.readLine(); 201 String line = reader.readLine();
201 List<Waybill> waybills = mapper.readValue(line, mapper.getTypeFactory().constructParametricType(List.class, Waybill.class)); 202 List<Waybill> waybills = mapper.readValue(line, mapper.getTypeFactory().constructParametricType(List.class, Waybill.class));
202 - save(waybills);*/ 203 + save(waybills);
  204 + task();
203 } 205 }
204 } 206 }