|
|
@ -756,7 +756,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(sid); |
|
|
|
BeanUtil.copyProperties(busDeliveredApply, vo); |
|
|
|
|
|
|
|
if (vo.getIsTerminal().equals(1)) { |
|
|
|
if (vo.getIsTerminal().equals("1")) { |
|
|
|
//根据出库申请单的sid查询需要出库的车辆信息
|
|
|
|
List<AppCarListVo> voList = busDeliveredApplyDetailsService.appDetailsList(sid); |
|
|
|
voList.removeAll(Collections.singleton(null)); |
|
|
|
if (!voList.isEmpty()) { |
|
|
@ -772,7 +773,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
} |
|
|
|
vo.setCarList(voList); |
|
|
|
|
|
|
|
} else if (vo.getIsTerminal().equals(0)) { |
|
|
|
} else if (vo.getIsTerminal().equals("0")) { |
|
|
|
//根据出库申请单的sid查询需要出库的车辆信息
|
|
|
|
List<AppCarListVo> voList = busDeliveredApplyDetailsService.appDetailsList(sid); |
|
|
|
for (int i = 0; i < voList.size(); i++) { |
|
|
@ -789,42 +790,42 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<AppDeliveredApplyInfoVo> getRetrievalDetail(String contractSid) { |
|
|
|
ResultBean<AppDeliveredApplyInfoVo> rb = ResultBean.fireFail(); |
|
|
|
AppDeliveredApplyInfoVo vo = new AppDeliveredApplyInfoVo(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(contractSid); |
|
|
|
BeanUtils.copyProperties(busDeliveredApply,vo); |
|
|
|
|
|
|
|
if (vo.getIsTerminal().equals(1)) { |
|
|
|
List<AppCarListVo> voList = busDeliveredApplyDetailsService.appDetailsList(contractSid); |
|
|
|
voList.removeAll(Collections.singleton(null)); |
|
|
|
if (!voList.isEmpty()) { |
|
|
|
for (AppCarListVo v : voList) { |
|
|
|
CrmCustomerTempVo data = crmCustomerTempFeign.selByMobile(vo.getMobile()).getData(); |
|
|
|
AppUseInfoVo appUseInfoVo = new AppUseInfoVo(); |
|
|
|
appUseInfoVo.setMobile(data.getMobile()); |
|
|
|
appUseInfoVo.setCustomer(data.getName()); |
|
|
|
appUseInfoVo.setAddress(data.getAddress()); |
|
|
|
appUseInfoVo.setIdNumber(data.getIDNumber()); |
|
|
|
v.setUseInfo(appUseInfoVo); |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setCarList(voList); |
|
|
|
|
|
|
|
} else if (vo.getIsTerminal().equals(0)) { |
|
|
|
//根据出库申请单的sid查询需要出库的车辆信息
|
|
|
|
List<AppCarListVo> voList = busDeliveredApplyDetailsService.appDetailsList(contractSid); |
|
|
|
for (int i = 0; i < voList.size(); i++) { |
|
|
|
BusDeliveredUseMessage busDeliveredUseMessage = busDeliveredUseMessageService.fetchBySid(voList.get(i).getUseMessageSid()); |
|
|
|
AppUseInfoVo appUseInfoVo = new AppUseInfoVo(); |
|
|
|
appUseInfoVo.setMobile(busDeliveredUseMessage.getMobile()); |
|
|
|
appUseInfoVo.setCustomer(busDeliveredUseMessage.getName()); |
|
|
|
appUseInfoVo.setAddress(busDeliveredUseMessage.getAddress()); |
|
|
|
appUseInfoVo.setIdNumber(busDeliveredUseMessage.getIdNo()); |
|
|
|
voList.get(i).setUseInfo(appUseInfoVo); |
|
|
|
} |
|
|
|
vo.setCarList(voList); |
|
|
|
} |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
// public ResultBean<AppDeliveredApplyInfoVo> getRetrievalDetail(String contractSid) {
|
|
|
|
// ResultBean<AppDeliveredApplyInfoVo> rb = ResultBean.fireFail();
|
|
|
|
// AppDeliveredApplyInfoVo vo = new AppDeliveredApplyInfoVo();
|
|
|
|
// BusDeliveredApply busDeliveredApply = fetchBySid(contractSid);
|
|
|
|
// BeanUtils.copyProperties(busDeliveredApply,vo);
|
|
|
|
//
|
|
|
|
// if (vo.getIsTerminal().equals(1)) {
|
|
|
|
// List<AppCarListVo> voList = busDeliveredApplyDetailsService.appDetailsList(contractSid);
|
|
|
|
// voList.removeAll(Collections.singleton(null));
|
|
|
|
// if (!voList.isEmpty()) {
|
|
|
|
// for (AppCarListVo v : voList) {
|
|
|
|
// CrmCustomerTempVo data = crmCustomerTempFeign.selByMobile(vo.getMobile()).getData();
|
|
|
|
// AppUseInfoVo appUseInfoVo = new AppUseInfoVo();
|
|
|
|
// appUseInfoVo.setMobile(data.getMobile());
|
|
|
|
// appUseInfoVo.setCustomer(data.getName());
|
|
|
|
// appUseInfoVo.setAddress(data.getAddress());
|
|
|
|
// appUseInfoVo.setIdNumber(data.getIDNumber());
|
|
|
|
// v.setUseInfo(appUseInfoVo);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// vo.setCarList(voList);
|
|
|
|
//
|
|
|
|
// } else if (vo.getIsTerminal().equals(0)) {
|
|
|
|
// //根据出库申请单的sid查询需要出库的车辆信息
|
|
|
|
// List<AppCarListVo> voList = busDeliveredApplyDetailsService.appDetailsList(contractSid);
|
|
|
|
// for (int i = 0; i < voList.size(); i++) {
|
|
|
|
// BusDeliveredUseMessage busDeliveredUseMessage = busDeliveredUseMessageService.fetchBySid(voList.get(i).getUseMessageSid());
|
|
|
|
// AppUseInfoVo appUseInfoVo = new AppUseInfoVo();
|
|
|
|
// appUseInfoVo.setMobile(busDeliveredUseMessage.getMobile());
|
|
|
|
// appUseInfoVo.setCustomer(busDeliveredUseMessage.getName());
|
|
|
|
// appUseInfoVo.setAddress(busDeliveredUseMessage.getAddress());
|
|
|
|
// appUseInfoVo.setIdNumber(busDeliveredUseMessage.getIdNo());
|
|
|
|
// voList.get(i).setUseInfo(appUseInfoVo);
|
|
|
|
// }
|
|
|
|
// vo.setCarList(voList);
|
|
|
|
// }
|
|
|
|
// return rb.success().setData(vo);
|
|
|
|
// }
|
|
|
|
} |