This commit is contained in:
sxu 2023-12-08 20:11:50 +08:00
parent ad76f4b307
commit 0ea8d27694
1 changed files with 25 additions and 22 deletions

View File

@ -2,6 +2,7 @@ package com.bonus.zlpt.order.controller;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo; import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
import com.bonus.zlpt.common.core.utils.poi.ExcelUtil; import com.bonus.zlpt.common.core.utils.poi.ExcelUtil;
@ -98,28 +99,30 @@ public class OrderInfoController extends BaseController
public AjaxResult getInfo(@PathVariable("orderId") Long orderId) public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
{ {
OrderInfoVo orderInfo = orderInfoService.selectOrderInfoByOrderId(orderId); OrderInfoVo orderInfo = orderInfoService.selectOrderInfoByOrderId(orderId);
Map map1 = (Map) remoteDevInfoService.getInfo(orderInfo.getMaId()); if (Objects.nonNull(orderInfo)) {
if (map1 != null) { Map map1 = (Map) remoteDevInfoService.getInfo(orderInfo.getMaId());
Map map2 = (Map) map1.get(DATA_TAG); if (map1 != null) {
if (map2 != null) { Map map2 = (Map) map1.get(DATA_TAG);
String typeName = (String) map2.get("typeName"); if (map2 != null) {
String groupName = (String) map2.get("groupName"); String typeName = (String) map2.get("typeName");
String modelName = (String) map2.get("modelName"); String groupName = (String) map2.get("groupName");
String deviceName = (String) map2.get("deviceName"); String modelName = (String) map2.get("modelName");
orderInfo.setTypeName(typeName); String deviceName = (String) map2.get("deviceName");
orderInfo.setGroupName(groupName); orderInfo.setTypeName(typeName);
orderInfo.setDeviceName(modelName + deviceName); orderInfo.setGroupName(groupName);
//装备编号图片品牌规格位置addressId月租金 orderInfo.setDeviceName(modelName + deviceName);
orderInfo.setDeviceCode((String) map2.get("code")); //装备编号图片品牌规格位置addressId月租金
orderInfo.setDevicePicUrl((String) map2.get("picUrl")); orderInfo.setDeviceCode((String) map2.get("code"));
orderInfo.setDeviceBrand((String) map2.get("brand")); orderInfo.setDevicePicUrl((String) map2.get("picUrl"));
orderInfo.setDeviceSpecification((String) map2.get("specification")); orderInfo.setDeviceBrand((String) map2.get("brand"));
orderInfo.setDeviceLocation((String) map2.get("location")); orderInfo.setDeviceSpecification((String) map2.get("specification"));
try { orderInfo.setDeviceLocation((String) map2.get("location"));
Double price = (Double) map2.get("monthLeasePrice"); try {
orderInfo.setDeviceMonthLeasePrice(price); Double price = (Double) map2.get("monthLeasePrice");
} catch (Exception e) { orderInfo.setDeviceMonthLeasePrice(price);
e.printStackTrace(); } catch (Exception e) {
e.printStackTrace();
}
} }
} }
} }