Commit 7613fd063b6b8d7ef32c1320f68571d726ed87ec

Authored by panzhaov5
1 parent d6d2a007

update...

src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -190,6 +190,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -190,6 +190,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
190 ScheduleRealInfo sch = dayOfSchedule.get(schId); 190 ScheduleRealInfo sch = dayOfSchedule.get(schId);
191 String gsbm = sch.getGsBm(), fgsbm = sch.getFgsBm(); 191 String gsbm = sch.getGsBm(), fgsbm = sch.getFgsBm();
192 192
  193 + if(StringUtils.isBlank(jGh) || "/".equals(StringUtils.trim(jGh))){
  194 + rs.put("msg", "无效的参数【驾驶员】");
  195 + rs.put("status", ResponseCode.ERROR);
  196 + return rs;
  197 + }
193 //校验运营公司 198 //校验运营公司
194 Personnel jsy = BasicData.perMap.get(gsbm + "-" + jGh); 199 Personnel jsy = BasicData.perMap.get(gsbm + "-" + jGh);
195 if (null == jsy) { 200 if (null == jsy) {
@@ -197,6 +202,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -197,6 +202,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
197 rs.put("msg", msg); 202 rs.put("msg", msg);
198 return rs; 203 return rs;
199 } 204 }
  205 +
200 if (!carExist(gsbm, nbbm)) { 206 if (!carExist(gsbm, nbbm)) {
201 msg = sch.getGsName() + "没有自编号为" + "[" + nbbm + "]的车辆"; 207 msg = sch.getGsName() + "没有自编号为" + "[" + nbbm + "]的车辆";
202 rs.put("msg", msg); 208 rs.put("msg", msg);
@@ -1508,10 +1514,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -1508,10 +1514,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
1508 } 1514 }
1509 } 1515 }
1510 1516
  1517 + if(StringUtils.isBlank(jsy) || "/".equals(StringUtils.trim(jsy))){
  1518 + rs.put("status", ResponseCode.ERROR);
  1519 + rs.put("msg", "无效的参数【驾驶员】");
  1520 + return rs;
  1521 + }
  1522 +
1511 /** 1523 /**
1512 * 换驾驶员 1524 * 换驾驶员
1513 */ 1525 */
1514 - if (StringUtils.isNotEmpty(jsy) && jsy.indexOf("/") != -1) { 1526 + if (StringUtils.isNotEmpty(jsy)) {
1515 String jGh = jsy.split("/")[0]; 1527 String jGh = jsy.split("/")[0];
1516 String jName = getPersonName(sch.getGsBm(), jGh); 1528 String jName = getPersonName(sch.getGsBm(), jGh);
1517 if (StringUtils.isEmpty(jName)) { 1529 if (StringUtils.isEmpty(jName)) {
@@ -1528,8 +1540,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -1528,8 +1540,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
1528 * 换售票员 1540 * 换售票员
1529 */ 1541 */
1530 String spy = map.get("spy"); 1542 String spy = map.get("spy");
1531 - if (StringUtils.isNotEmpty(spy) && spy.indexOf("/") != -1 && !spy.equals("/")) { 1543 + if (StringUtils.isNotEmpty(spy) && !StringUtils.trim(spy).equals("/")) {
1532 String sGh = spy.split("/")[0]; 1544 String sGh = spy.split("/")[0];
  1545 +
1533 String sName = getPersonName(sch.getGsBm(), sGh); 1546 String sName = getPersonName(sch.getGsBm(), sGh);
1534 if (StringUtils.isEmpty(sName)) { 1547 if (StringUtils.isEmpty(sName)) {
1535 rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sGh + "】的售票员"); 1548 rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sGh + "】的售票员");
@@ -3337,6 +3350,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -3337,6 +3350,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
3337 } 3350 }
3338 } 3351 }
3339 3352
  3353 +
3340 //为换人换车情况表写入数据 3354 //为换人换车情况表写入数据
3341 schModifyLog.saveChangetochange(sch, cpc, userId); 3355 schModifyLog.saveChangetochange(sch, cpc, userId);
3342 //日志记录 3356 //日志记录
@@ -3344,8 +3358,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -3344,8 +3358,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
3344 3358
3345 //换驾驶员 3359 //换驾驶员
3346 if (StringUtils.isNotEmpty(cpc.getJsy())) { 3360 if (StringUtils.isNotEmpty(cpc.getJsy())) {
3347 - /*if(!jGh.equals(sch.getjGh()))  
3348 - sb.append(sch.getjGh() + " 换 " + jGh + ";");*/  
3349 //换驾驶员 3361 //换驾驶员
3350 if (persoChange(sch, jGh)) 3362 if (persoChange(sch, jGh))
3351 set.add(sch); 3363 set.add(sch);
@@ -3353,8 +3365,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -3353,8 +3365,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
3353 3365
3354 //换售票员 3366 //换售票员
3355 if (StringUtils.isNotEmpty(cpc.getSpy()) 3367 if (StringUtils.isNotEmpty(cpc.getSpy())
3356 - && cpc.getSpy().indexOf("/") != -1  
3357 - && cpc.getSpy().length() > 1) { 3368 + && !"/".equals(StringUtils.trim(cpc.getSpy()))) {
  3369 +
3358 sGh = cpc.getSpy().split("/")[0]; 3370 sGh = cpc.getSpy().split("/")[0];
3359 sName = getPersonName(sch.getGsBm(), sGh); 3371 sName = getPersonName(sch.getGsBm(), sGh);
3360 if (StringUtils.isEmpty(sName)) { 3372 if (StringUtils.isEmpty(sName)) {