Browse Source

的法国队

gqx 2 years ago
parent
commit
8f00a2f903

+ 26 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/controller/FwLivingJxController.java

@@ -7,11 +7,16 @@ import java.util.stream.Collectors;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.business.entity.BusBookingRooms;
+import org.jeecg.modules.business.entity.BusRoomsLivingOrder;
+import org.jeecg.modules.business.service.IBusBookingRoomsService;
+import org.jeecg.modules.business.service.IBusRoomsLivingOrderService;
 import org.jeecg.modules.fw.entity.FwLivingJx;
 import org.jeecg.modules.fw.service.IFwLivingJxService;
 
@@ -20,6 +25,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
+import org.jeecg.modules.rooms.entity.CesRooms;
+import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -50,6 +57,12 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
 public class FwLivingJxController extends JeecgController<FwLivingJx, IFwLivingJxService> {
 	@Autowired
 	private IFwLivingJxService fwLivingJxService;
+@Resource
+private IBusRoomsLivingOrderService busRoomsLivingOrderService;
+@Resource
+private IBusBookingRoomsService busBookingRoomsService;
+@Resource
+private CesRoomsServiceImpl cesRoomsService;
 
 	/**
 	 * 分页列表查询
@@ -70,6 +83,19 @@ public class FwLivingJxController extends JeecgController<FwLivingJx, IFwLivingJ
 		QueryWrapper<FwLivingJx> queryWrapper = QueryGenerator.initQueryWrapper(fwLivingJx, req.getParameterMap());
 		Page<FwLivingJx> page = new Page<FwLivingJx>(pageNo, pageSize);
 		IPage<FwLivingJx> pageList = fwLivingJxService.page(page, queryWrapper);
+		pageList.getRecords().forEach(t -> {
+			BusRoomsLivingOrder busRoomsLivingOrder = busRoomsLivingOrderService.getById(t.getLivingOrderId());
+			if (busRoomsLivingOrder != null) {
+				BusBookingRooms busBookingRooms = busBookingRoomsService.getById(busRoomsLivingOrder.getBookingRoomId());
+				if (busBookingRooms != null) {
+					t.setRoomId(busBookingRooms.getRoomId());
+					CesRooms cesRooms = cesRoomsService.getById(busBookingRooms.getRoomId());
+					if (cesRooms != null) {
+						t.setRoomName(cesRooms.getName());
+					}
+				}
+			}
+		});
 		return Result.OK(pageList);
 	}
 

+ 8 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/entity/FwLivingJx.java

@@ -4,10 +4,8 @@ import java.io.Serializable;
 import java.io.UnsupportedEncodingException;
 import java.util.Date;
 import java.math.BigDecimal;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableLogic;
+
+import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -50,4 +48,10 @@ public class FwLivingJx implements Serializable {
 	@Excel(name = "叫醒时间", width = 15)
     @ApiModelProperty(value = "叫醒时间")
     private String jxTime;
+
+	@TableField(exist = false)
+	private String roomName;
+
+    @TableField(exist = false)
+    private String roomId;
 }