Commit 9ccbb2fb6eb8e0adbd14af1619812fcec8b9a083

Authored by 娄高锋
1 parent 630b2012

工单2022-0001:直放(班次类型:venting)班次不参与首末班统计;调度日报导出后备注内容没导出的问题修复。

src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -5189,7 +5189,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
5189 5189 }
5190 5190 tempMap.put("fcsjk" + x, fcsjk);
5191 5191 tempMap.put("fcsjm" + x, fcsjm.equals("0")?"":fcsjm);
5192   - tempMap.put("remarks" + x, schedule.getRemark() != null ? schedule.getRemark() : "");
  5192 + tempMap.put("remarks" + x, schedule.getRemarks() != null ? schedule.getRemarks() : "");
5193 5193  
5194 5194 size++;
5195 5195 }
... ...
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
... ... @@ -1268,20 +1268,29 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1268 1268 if(date.length() == 0)
1269 1269 date = sdf.format(new Date());
1270 1270  
  1271 + List<String> strList = new ArrayList<String>();
  1272 + strList.add(date);
  1273 +
1271 1274 try {
1272 1275 String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
1273 1276 + " a.xl_bm, a.fgs_bm, a.cc_service, (select start_opt from bsth_c_line_config where id ="
1274 1277 + " (select max(id) from bsth_c_line_config where line = (select id from bsth_c_line where line_code = a.xl_bm))) start_opt"
1275   - + " from bsth_c_s_sp_info_real a where schedule_date_str = '"+date+"'"
1276   - + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1277   - if(line.trim().length() != 0)
1278   - sql += " and xl_bm = '"+line+"'";
1279   - if(company.length() != 0)
1280   - sql += " and gs_bm = '"+company+"'";
1281   - if(subCompany.length() != 0)
1282   - sql += " and fgs_bm = '"+subCompany+"'";
  1278 + + " from bsth_c_s_sp_info_real a where schedule_date_str = ?"
  1279 + + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region' and bc_type != 'venting'";
  1280 + if(line.trim().length() != 0){
  1281 + sql += " and xl_bm = ?";
  1282 + strList.add(line);
  1283 + }
  1284 + if(company.length() != 0){
  1285 + sql += " and gs_bm = ?";
  1286 + strList.add(company);
  1287 + }
  1288 + if(subCompany.length() != 0){
  1289 + sql += " and fgs_bm = ?";
  1290 + strList.add(subCompany);
  1291 + }
1283 1292  
1284   - list = jdbcTemplate.query(sql,
  1293 + list = jdbcTemplate.query(sql, strList.toArray(),
1285 1294 new RowMapper<ScheduleRealInfo>(){
1286 1295 @Override
1287 1296 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
... ... @@ -1540,20 +1549,30 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1540 1549 +split2[0]+"年"+split2[1]+"月"+split2[2]+"日";
1541 1550 }
1542 1551  
  1552 + List<String> strList = new ArrayList<String>();
  1553 + strList.add(startDate);
  1554 + strList.add(endDate);
  1555 +
1543 1556 try {
1544 1557 String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_bm, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
1545 1558 + " a.fgs_bm, a.cc_service, a.remarks, a.adjust_exps, (select start_opt from bsth_c_line_config where id = "
1546 1559 + " (select max(id) from bsth_c_line_config where line = (select id from bsth_c_line where line_code = a.xl_bm))) start_opt"
1547   - + " from bsth_c_s_sp_info_real a where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'"
1548   - + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1549   - if(line.length() != 0)
1550   - sql += " and xl_bm = '"+line+"'";
1551   - if(company.length() != 0)
1552   - sql += " and gs_bm = '"+company+"'";
1553   - if(subCompany.length() != 0)
1554   - sql += " and fgs_bm = '"+subCompany+"'";
  1560 + + " from bsth_c_s_sp_info_real a where schedule_date_str >= ? and schedule_date_str <= ?"
  1561 + + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region' and bc_type != 'venting'";
  1562 + if(line.length() != 0){
  1563 + sql += " and xl_bm = ?";
  1564 + strList.add(line);
  1565 + }
  1566 + if(company.length() != 0){
  1567 + sql += " and gs_bm = ?";
  1568 + strList.add(company);
  1569 + }
  1570 + if(subCompany.length() != 0){
  1571 + sql += " and fgs_bm = ?";
  1572 + strList.add(subCompany);
  1573 + }
1555 1574  
1556   - list = jdbcTemplate.query(sql,
  1575 + list = jdbcTemplate.query(sql, strList.toArray(),
1557 1576 new RowMapper<ScheduleRealInfo>(){
1558 1577 @Override
1559 1578 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
... ...