Commit 17d17b37 by zhengxj

finish 汽车品牌车型 on 20190306 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18216 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent d408767d
......@@ -971,41 +971,31 @@ public class OrderServiceImpl implements IOrderService {
}
// for (SysOrder order : orderList) {
//
// example.clear();
// SysOrderRepairExample exam = new SysOrderRepairExample();
// exam.createCriteria().andOrderIdEqualTo(order.getId());
// List<SysOrderRepair> subOrders =
// orderRepairDao.selectByExample(exam);
// if (subOrders != null) {
// // TODO 小程序端订单详情查询
// // example.createCriteria().andIdIn(values);
//
// }
// // 订单地址信息
// order.setArea(areaService.getAllChargeItems(order.getDistrict()));
// // 渠道名称
// if (order.getMerchantId() != null) {
// order.setOrderChannel(sysMerchantDao.selectByPrimaryKey(order.getMerchantId()).getShopName());
// }
//
// // 技工信息
// if (order.getMechanicId() != null) {
// MachanicInfo machanicInfo = new MachanicInfo();
//
// SysMechanic sysMechanic =
// sysMechanicDao.selectByPrimaryKey(order.getMechanicId());
// SysUser sysUser =
// sysUserDao.selectByPrimaryKey(sysMechanic.getUserId());
// machanicInfo.setId(sysMechanic.getId());
// // 有可能是username
// machanicInfo.setName(sysUser.getName());
// machanicInfo.setPhone(Integer.parseInt(sysUser.getPhoneNumber()));
// order.setMachanicInfo(machanicInfo);
// }
//
// }
for (SysOrder order : orderList) {// 车辆信息信息
if (order.getCarSeries() != null) {
int serId=order.getCarSeries();
int brandId=order.getCarBrand();
JSONObject series = carBrandClient.getSeriesById(serId);
JSONObject brand = carBrandClient.getBrandById(brandId);
CarInfo carInfo = new CarInfo();
carInfo.setBrand(brand.getString("data"));
carInfo.setSeries(series.getString("data"));
// 车辆信息信息
if (order.getCarType() != null) {
Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
String carType = order.getCarType();
if (pattern.matcher(carType).matches()) {
int typeId=Integer.parseInt(order.getCarType());
JSONObject type = carBrandClient.getCarTypeById(typeId);
if (!com.glsx.common.utils.StringUtils.isEmpty(type.getString("data"))) {
carInfo.setType(type.getString("data"));
}
}
}
order.setCarInfo(carInfo);
}}
return orderList;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!