Selaa lähdekoodia

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-backend

覃浩 2 vuotta sitten
vanhempi
commit
bd8090fd7e
16 muutettua tiedostoa jossa 523 lisäystä ja 41 poistoa
  1. 4 3
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusDictController.java
  2. 3 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusDictItemController.java
  3. 33 5
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusHotelController.java
  4. 8 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusOtherRoomCardController.java
  5. 9 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusPrintTemplateController.java
  6. 4 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusOtherRoomCard.java
  7. 17 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusPrintTemplate.java
  8. 2 2
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/IBusDictService.java
  9. 4 2
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusDictServiceImpl.java
  10. 178 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/controller/FwRoomExamineController.java
  11. 96 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/entity/FwRoomExamine.java
  12. 17 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/mapper/FwRoomExamineMapper.java
  13. 5 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/mapper/xml/FwRoomExamineMapper.xml
  14. 14 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/service/IFwRoomExamineService.java
  15. 19 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/service/impl/FwRoomExamineServiceImpl.java
  16. 110 29
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/pos/controller/PosTableController.java

+ 4 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusDictController.java

@@ -216,7 +216,8 @@ public class BusDictController extends JeecgController<BusDict, IBusDictService>
 	  * @return
 	  */
 	 @RequestMapping(value = "/queryTreeList", method = RequestMethod.GET)
-	 public Result<List<BusDictTreeModel>> queryTreeList(@RequestParam(name = "ids", required = false) String ids) {
+	 public Result<List<BusDictTreeModel>> queryTreeList(@RequestParam(name = "ids", required = false) String ids
+	 ,@RequestParam(name = "hotelId", required = false) String hotelId) {
 		 Result<List<BusDictTreeModel>> result = new Result<>();
 		 try {
 			 // 从内存中读取
@@ -225,10 +226,10 @@ public class BusDictController extends JeecgController<BusDict, IBusDictService>
 //				list = sysDepartService.queryTreeList();
 //			}
 			 if(oConvertUtils.isNotEmpty(ids)){
-				 List<BusDictTreeModel> departList = busDictService.queryTreeList(ids);
+				 List<BusDictTreeModel> departList = busDictService.queryTreeList(ids,hotelId);
 				 result.setResult(departList);
 			 }else{
-				 List<BusDictTreeModel> list = busDictService.queryTreeList();
+				 List<BusDictTreeModel> list = busDictService.queryTreeList(hotelId);
 				 result.setResult(list);
 			 }
 			 result.setSuccess(true);

+ 3 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusDictItemController.java

@@ -308,9 +308,12 @@ public class BusDictItemController extends JeecgController<BusDictItem, IBusDict
 		 }
 		 List<BusDictItem> list = new ArrayList<>();
 		 String dictName = req.getParameter("dictName");
+		 String hotelId = req.getParameter("hotelId");
 		 if(oConvertUtils.isNotEmpty(dictName)){
 			 LambdaQueryWrapper<BusDict> queryDictWrapper = new LambdaQueryWrapper<>();
 			 queryDictWrapper.eq(BusDict::getDictName,dictName);
+			 queryDictWrapper.eq(BusDict::getTenantId,user.getRelTenantIds());
+			 queryDictWrapper.eq(BusDict::getHotelId,hotelId);
 			 BusDict busDict = busDictService.getOne(queryDictWrapper);
 
 			 if (busDict != null) {

+ 33 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusHotelController.java

@@ -1,9 +1,6 @@
 package org.jeecg.modules.business.controller;
 
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
@@ -28,7 +25,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
 import org.jeecg.modules.base.service.BaseCommonService;
+import org.jeecg.modules.business.entity.BusDict;
 import org.jeecg.modules.business.entity.BusHotel;
+import org.jeecg.modules.business.service.IBusDictService;
 import org.jeecg.modules.business.service.IBusHotelService;
 import org.jeecg.modules.business.util.MapUtil;
 import org.jeecg.modules.system.entity.SysTenant;
@@ -68,6 +67,9 @@ public class BusHotelController extends JeecgController<BusHotel, IBusHotelServi
 	 @Autowired
 	 private ISysTenantService sysTenantService;
 
+	 @Autowired
+	 private IBusDictService busDictService;
+
 	/**
 	 * 分页列表查询
 	 *
@@ -118,8 +120,8 @@ public class BusHotelController extends JeecgController<BusHotel, IBusHotelServi
 		busHotel.setStatus(1);
 		busHotel.setDelFlag(CommonConstant.DEL_FLAG_0);
 		busHotel.setCheckStatus(0);
+		LoginUser user = TokenUtils.getAuthUser();
 		if(busHotel.getTenantId() == null || busHotel.getTenantId().equals("")){
-			LoginUser user = TokenUtils.getAuthUser();
 			if(user.getRelTenantIds() != null && !user.getRelTenantIds().equals("")){
 				busHotel.setTenantId(user.getRelTenantIds());
 			} else {
@@ -127,6 +129,32 @@ public class BusHotelController extends JeecgController<BusHotel, IBusHotelServi
 			}
 		}
 		busHotelService.save(busHotel);
+
+		//添加酒店后需要初始化部分数据
+		//初始化系统设置-字典管理
+		LambdaQueryWrapper<BusDict> queryDict = new LambdaQueryWrapper<BusDict>();
+		queryDict.eq(BusDict::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+		queryDict.eq(BusDict::getHotelId, "0");
+		queryDict.eq(BusDict::getTenantId, "0");
+		List<BusDict> listDict = busDictService.list(queryDict);
+		if (listDict != null && listDict.size() > 0){
+//			for (BusDict busDict : listDict) {
+//
+//			}
+			List<BusDict> batchDict = new ArrayList<>();
+			listDict.forEach( busDict -> {
+				BusDict newDict = busDict;
+				newDict.setTenantId(busHotel.getTenantId());
+				newDict.setHotelId(busHotel.getId());
+				batchDict.add(newDict);
+			});
+			busDictService.saveBatch(batchDict);
+		}
+
+		//初始化打印模板
+		//初始化参数设置
+
+
 		return Result.OK("添加成功!");
 	}
 

+ 8 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusOtherRoomCardController.java

@@ -89,6 +89,14 @@ public class BusOtherRoomCardController extends JeecgController<BusOtherRoomCard
 	//@RequiresPermissions("business:bus_other_room_card_info:add")
 	@PostMapping(value = "/add")
 	public Result<String> add(@RequestBody BusOtherRoomCard busOtherRoomCard) {
+		if(busOtherRoomCard.getTenantId() == null || busOtherRoomCard.getTenantId().equals("")){
+			LoginUser user = TokenUtils.getAuthUser();
+			if(user.getRelTenantIds() != null && !user.getRelTenantIds().equals("")){
+				busOtherRoomCard.setTenantId(user.getRelTenantIds());
+			} else {
+				throw new JeecgBootException("当前登录人租户信息错误");
+			}
+		}
 		busOtherRoomCardService.save(busOtherRoomCard);
 		return Result.OK("添加成功!");
 	}

+ 9 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusPrintTemplateController.java

@@ -26,6 +26,7 @@ import org.jeecg.modules.business.entity.BusPrintTemplate;
 import org.jeecg.modules.business.entity.BusRoomPayType;
 import org.jeecg.modules.business.entity.BusWaiter;
 import org.jeecg.modules.business.service.IBusPrintTemplateService;
+import org.jeecg.modules.system.entity.SysPermission;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -74,6 +75,7 @@ public class BusPrintTemplateController extends JeecgController<BusPrintTemplate
 								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 								   HttpServletRequest req) {
 		QueryWrapper<BusPrintTemplate> queryWrapper = QueryGenerator.initQueryWrapper(busPrintTemplate, req.getParameterMap());
+//		queryWrapper.orderByAsc("id");
 		Page<BusPrintTemplate> page = new Page<BusPrintTemplate>(pageNo, pageSize);
 		IPage<BusPrintTemplate> pageList = busPrintTemplateService.page(page, queryWrapper);
 		return Result.OK(pageList);
@@ -133,6 +135,13 @@ public class BusPrintTemplateController extends JeecgController<BusPrintTemplate
 		editModel.setPrintSum(busPrintTemplate.getPrintSum());
 		editModel.setPrintContentOffset(busPrintTemplate.getPrintContentOffset());
 		editModel.setPrintPaperOffset(busPrintTemplate.getPrintPaperOffset());
+
+		//增加需求
+		editModel.setIsShowIdcard(busPrintTemplate.getIsShowIdcard());
+		editModel.setIsShowBreakfast(busPrintTemplate.getIsShowBreakfast());
+		editModel.setIsShowAddress(busPrintTemplate.getIsShowAddress());
+		editModel.setIsShowPhone(busPrintTemplate.getIsShowPhone());
+
 		busPrintTemplateService.updateById(editModel);
 //		busPrintTemplateService.updateById(busPrintTemplate);
 		return Result.OK("编辑成功!");

+ 4 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusOtherRoomCard.java

@@ -74,4 +74,8 @@ public class BusOtherRoomCard implements Serializable {
     @Excel(name = "结账离店时,是否强制性先注销房卡,才能结账", width = 15)
     @ApiModelProperty(value = "结账离店时,是否强制性先注销房卡,才能结账")
     private Boolean logoutCard;
+    /**业主分成税率*/
+    @Excel(name = "业主分成税率", width = 15)
+    @ApiModelProperty(value = "业主分成税率")
+    private BigDecimal taxRate;
 }

+ 17 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusPrintTemplate.java

@@ -109,4 +109,21 @@ public class BusPrintTemplate implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "更新时间")
     private Date updateTime;
+
+    /**是否显示证件信息(0-是;1-否)*/
+    @Excel(name = "是否显示证件信息(0-是;1-否)", width = 15)
+    @ApiModelProperty(value = "是否显示证件信息(0-是;1-否)")
+    private java.lang.Integer isShowIdcard;
+    /**是否显示早餐(0-是;1-否)*/
+    @Excel(name = "是否显示早餐(0-是;1-否)", width = 15)
+    @ApiModelProperty(value = "是否显示早餐(0-是;1-否)")
+    private java.lang.Integer isShowBreakfast;
+    /**是否显示客人地址(0-是;1-否)*/
+    @Excel(name = "是否显示客人地址(0-是;1-否)", width = 15)
+    @ApiModelProperty(value = "是否显示客人地址(0-是;1-否)")
+    private java.lang.Integer isShowAddress;
+    /**是否显示客人电话(0-是;1-否)*/
+    @Excel(name = "是否显示客人电话(0-是;1-否)", width = 15)
+    @ApiModelProperty(value = "是否显示客人电话(0-是;1-否)")
+    private java.lang.Integer isShowPhone;
 }

+ 2 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/IBusDictService.java

@@ -18,11 +18,11 @@ public interface IBusDictService extends IService<BusDict> {
      * 查询所有字典信息,并分节点进行显示
      * @return
      */
-    List<BusDictTreeModel> queryTreeList();
+    List<BusDictTreeModel> queryTreeList(String hotelId);
     /**
      * 查询所有部门信息,并分节点进行显示
      * @param ids 多个部门id
      * @return
      */
-    List<BusDictTreeModel> queryTreeList(String ids);
+    List<BusDictTreeModel> queryTreeList(String ids,String hotelId);
 }

+ 4 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusDictServiceImpl.java

@@ -32,9 +32,10 @@ public class BusDictServiceImpl extends ServiceImpl<BusDictMapper, BusDict> impl
      * queryTreeList 对应 queryTreeList 查询所有的部门数据,以树结构形式响应给前端
      */
     @Override
-    public List<BusDictTreeModel> queryTreeList() {
+    public List<BusDictTreeModel> queryTreeList(String hotelId) {
         LambdaQueryWrapper<BusDict> query = new LambdaQueryWrapper<BusDict>();
         query.eq(BusDict::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+        query.eq(BusDict::getHotelId, hotelId);
 //        query.orderByAsc(BusDict::getCreateTime);
         List<BusDict> list = this.list(query);
         //update-begin---author:wangshuai ---date:20220307  for:[JTC-119]在部门管理菜单下设置部门负责人 创建用户的时候不需要处理
@@ -50,10 +51,11 @@ public class BusDictServiceImpl extends ServiceImpl<BusDictMapper, BusDict> impl
      * queryTreeList 根据部门id查询,前端回显调用
      */
     @Override
-    public List<BusDictTreeModel> queryTreeList(String ids) {
+    public List<BusDictTreeModel> queryTreeList(String ids,String hotelId) {
         List<BusDictTreeModel> listResult=new ArrayList<>();
         LambdaQueryWrapper<BusDict> query = new LambdaQueryWrapper<BusDict>();
         query.eq(BusDict::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
+        query.eq(BusDict::getHotelId, hotelId);
         if(oConvertUtils.isNotEmpty(ids)){
             query.in(true,BusDict::getId,ids.split(","));
         }

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

@@ -0,0 +1,178 @@
+package org.jeecg.modules.fw.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+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.fw.entity.FwRoomExamine;
+import org.jeecg.modules.fw.service.IFwRoomExamineService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: fw_room_examine
+ * @Author: jeecg-boot
+ * @Date:   2023-05-23
+ * @Version: V1.0
+ */
+@Api(tags="fw_room_examine")
+@RestController
+@RequestMapping("/fw/fwRoomExamine")
+@Slf4j
+public class FwRoomExamineController extends JeecgController<FwRoomExamine, IFwRoomExamineService> {
+	@Autowired
+	private IFwRoomExamineService fwRoomExamineService;
+
+	/**
+	 * 分页列表查询
+	 *
+	 * @param fwRoomExamine
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "fw_room_examine-分页列表查询")
+	@ApiOperation(value="fw_room_examine-分页列表查询", notes="fw_room_examine-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<FwRoomExamine>> queryPageList(FwRoomExamine fwRoomExamine,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<FwRoomExamine> queryWrapper = QueryGenerator.initQueryWrapper(fwRoomExamine, req.getParameterMap());
+		Page<FwRoomExamine> page = new Page<FwRoomExamine>(pageNo, pageSize);
+		IPage<FwRoomExamine> pageList = fwRoomExamineService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+
+	/**
+	 *   添加
+	 *
+	 * @param fwRoomExamine
+	 * @return
+	 */
+	@AutoLog(value = "fw_room_examine-添加")
+	@ApiOperation(value="fw_room_examine-添加", notes="fw_room_examine-添加")
+	//@RequiresPermissions("fw:fw_room_examine:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody FwRoomExamine fwRoomExamine) {
+		fwRoomExamineService.save(fwRoomExamine);
+		return Result.OK("添加成功!");
+	}
+
+	/**
+	 *  编辑
+	 *
+	 * @param fwRoomExamine
+	 * @return
+	 */
+	@AutoLog(value = "fw_room_examine-编辑")
+	@ApiOperation(value="fw_room_examine-编辑", notes="fw_room_examine-编辑")
+	//@RequiresPermissions("fw:fw_room_examine:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody FwRoomExamine fwRoomExamine) {
+		fwRoomExamineService.updateById(fwRoomExamine);
+		return Result.OK("编辑成功!");
+	}
+
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "fw_room_examine-通过id删除")
+	@ApiOperation(value="fw_room_examine-通过id删除", notes="fw_room_examine-通过id删除")
+	//@RequiresPermissions("fw:fw_room_examine:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		fwRoomExamineService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "fw_room_examine-批量删除")
+	@ApiOperation(value="fw_room_examine-批量删除", notes="fw_room_examine-批量删除")
+	//@RequiresPermissions("fw:fw_room_examine:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.fwRoomExamineService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "fw_room_examine-通过id查询")
+	@ApiOperation(value="fw_room_examine-通过id查询", notes="fw_room_examine-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<FwRoomExamine> queryById(@RequestParam(name="id",required=true) String id) {
+		FwRoomExamine fwRoomExamine = fwRoomExamineService.getById(id);
+		if(fwRoomExamine==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(fwRoomExamine);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param fwRoomExamine
+    */
+    //@RequiresPermissions("fw:fw_room_examine:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, FwRoomExamine fwRoomExamine) {
+        return super.exportXls(request, fwRoomExamine, FwRoomExamine.class, "fw_room_examine");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("fw:fw_room_examine:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, FwRoomExamine.class);
+    }
+
+}

+ 96 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/entity/FwRoomExamine.java

@@ -0,0 +1,96 @@
+package org.jeecg.modules.fw.entity;
+
+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 lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: fw_room_examine
+ * @Author: jeecg-boot
+ * @Date:   2023-05-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("fw_room_examine")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="fw_room_examine对象", description="fw_room_examine")
+public class FwRoomExamine implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+    private String id;
+	/**关联租户*/
+	@Excel(name = "关联租户", width = 15)
+    @ApiModelProperty(value = "关联租户")
+    private String tenantId;
+	/**关联酒店*/
+	@Excel(name = "关联酒店", width = 15)
+    @ApiModelProperty(value = "关联酒店")
+    private String hotelId;
+	/**房号id*/
+	@Excel(name = "房号id", width = 15)
+    @ApiModelProperty(value = "房号id")
+    private String roomId;
+	/**查房备注*/
+	@Excel(name = "查房备注", width = 15)
+    @ApiModelProperty(value = "查房备注")
+    private String remark;
+	/**查房服务员id*/
+	@Excel(name = "查房服务员id", width = 15)
+    @ApiModelProperty(value = "查房服务员id")
+    private String waiterId;
+	/**状态 0待查房 1等待查房 2正在查房 3查房完毕 4取消查房*/
+	@Excel(name = "状态 0待查房 1等待查房 2正在查房 3查房完毕 4取消查房", width = 15)
+    @ApiModelProperty(value = "状态 0待查房 1等待查房 2正在查房 3查房完毕 4取消查房")
+    private Integer state;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+	/**入住订单id*/
+	@Excel(name = "入住订单id", width = 15)
+    @ApiModelProperty(value = "入住订单id")
+    private String livingOrderId;
+	/**查房反馈*/
+	@Excel(name = "查房反馈", width = 15)
+    @ApiModelProperty(value = "查房反馈")
+    private String feedback;
+	/**查房发起时间*/
+	@Excel(name = "查房发起时间", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "查房发起时间")
+    private Date promoterTime;
+	/**查房完成时间*/
+	@Excel(name = "查房完成时间", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "查房完成时间")
+    private Date completedTime;
+	/**查房完成人*/
+	@Excel(name = "查房完成人", width = 15)
+    @ApiModelProperty(value = "查房完成人")
+    private String completedBy;
+	/**查房发起人*/
+	@Excel(name = "查房发起人", width = 15)
+    @ApiModelProperty(value = "查房发起人")
+    private String promoterBy;
+}

+ 17 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/mapper/FwRoomExamineMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.fw.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.fw.entity.FwRoomExamine;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: fw_room_examine
+ * @Author: jeecg-boot
+ * @Date:   2023-05-23
+ * @Version: V1.0
+ */
+public interface FwRoomExamineMapper extends BaseMapper<FwRoomExamine> {
+
+}

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/mapper/xml/FwRoomExamineMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.fw.mapper.FwRoomExamineMapper">
+
+</mapper>

+ 14 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/service/IFwRoomExamineService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.fw.service;
+
+import org.jeecg.modules.fw.entity.FwRoomExamine;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: fw_room_examine
+ * @Author: jeecg-boot
+ * @Date:   2023-05-23
+ * @Version: V1.0
+ */
+public interface IFwRoomExamineService extends IService<FwRoomExamine> {
+
+}

+ 19 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/fw/service/impl/FwRoomExamineServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.fw.service.impl;
+
+import org.jeecg.modules.fw.entity.FwRoomExamine;
+import org.jeecg.modules.fw.mapper.FwRoomExamineMapper;
+import org.jeecg.modules.fw.service.IFwRoomExamineService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: fw_room_examine
+ * @Author: jeecg-boot
+ * @Date:   2023-05-23
+ * @Version: V1.0
+ */
+@Service
+public class FwRoomExamineServiceImpl extends ServiceImpl<FwRoomExamineMapper, FwRoomExamine> implements IFwRoomExamineService {
+
+}

+ 110 - 29
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/pos/controller/PosTableController.java

@@ -230,35 +230,35 @@ public class PosTableController extends JeecgController<PosTable, IPosTableServi
 				 }
 			 }
 
-			 posTable.setId(UUIDGenerator.generate());
-			 LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-			 lambdaQueryWrapper.eq(WxAppConfig::getTenantId, posTable.getTenantId());
-			 WxAppConfig wxApp = wxAppConfigService.getOne(lambdaQueryWrapper);
-			 if (wxApp == null) {
-				 throw new JeecgBootException("没有找到此appid");
-			 }
-			 //获取小程序二维码
-			 try {
-				 WxMaInRedisConfigStorage configStorage = new WxMaInRedisConfigStorage(redisTemplate);
-				 configStorage.setAppid(wxApp.getAppId());
-				 configStorage.setSecret(wxApp.getAppSecret());
-				 WxMaService wxMaService = new WxMaServiceImpl();
-				 wxMaService.setWxMaConfig(configStorage);
-
-				 File file = wxMaService.getQrcodeService().createQrcode("page/dc/index?id=" + posTable.getId(), 430);
-				 try {
-					 MultipartFile cMultiFile = new MockMultipartFile("file", file.getName(), null, new FileInputStream(file));
-					 String path = CommonUtils.upload(cMultiFile, "temp", CommonConstant.UPLOAD_TYPE_OSS);
-					 posTable.setQrCode(path);
-				 } catch (IOException e) {
-					 e.printStackTrace();
-				 }
-
-			 } catch (WxErrorException e) {
-				 e.printStackTrace();
-
-				 throw new JeecgBootException("获取小程序二维码失败:" + e.getMessage());
-			 }
+//			 posTable.setId(UUIDGenerator.generate());
+//			 LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+//			 lambdaQueryWrapper.eq(WxAppConfig::getTenantId, posTable.getTenantId());
+//			 WxAppConfig wxApp = wxAppConfigService.getOne(lambdaQueryWrapper);
+//			 if (wxApp == null) {
+//				 throw new JeecgBootException("没有找到此appid");
+//			 }
+//			 //获取小程序二维码
+//			 try {
+//				 WxMaInRedisConfigStorage configStorage = new WxMaInRedisConfigStorage(redisTemplate);
+//				 configStorage.setAppid(wxApp.getAppId());
+//				 configStorage.setSecret(wxApp.getAppSecret());
+//				 WxMaService wxMaService = new WxMaServiceImpl();
+//				 wxMaService.setWxMaConfig(configStorage);
+//
+//				 File file = wxMaService.getQrcodeService().createQrcode("page/dc/index?id=" + posTable.getId(), 430);
+//				 try {
+//					 MultipartFile cMultiFile = new MockMultipartFile("file", file.getName(), null, new FileInputStream(file));
+//					 String path = CommonUtils.upload(cMultiFile, "temp", CommonConstant.UPLOAD_TYPE_OSS);
+//					 posTable.setQrCode(path);
+//				 } catch (IOException e) {
+//					 e.printStackTrace();
+//				 }
+//
+//			 } catch (WxErrorException e) {
+//				 e.printStackTrace();
+//
+//				 throw new JeecgBootException("获取小程序二维码失败:" + e.getMessage());
+//			 }
 		 });
 		 posTableService.saveBatch(posTables);
 		 return Result.OK("添加成功!");
@@ -358,6 +358,55 @@ public class PosTableController extends JeecgController<PosTable, IPosTableServi
 		 return Result.OK(posTable);
 	 }
 
+
+	 /**
+	  * 生成二维码
+	  *
+	  * @param id
+	  * @return
+	  */
+	 //@AutoLog(value = "pos_table-通过id查询")
+	 @ApiOperation(value = "生成二维码", notes = "生成二维码")
+	 @GetMapping(value = "/generateQRCode")
+	 public Result<PosTable> generateQRCode (@RequestParam(name = "id", required = true) String id) {
+		 PosTable posTable = posTableService.getById(id);
+		 if (posTable == null) {
+			 return Result.error("未找到对应数据");
+		 }
+		 if (StringUtils.isBlank(posTable.getQrCode())) {
+			 LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+			 lambdaQueryWrapper.eq(WxAppConfig::getTenantId, posTable.getTenantId());
+			 WxAppConfig wxApp = wxAppConfigService.getOne(lambdaQueryWrapper);
+			 if (wxApp == null) {
+				 throw new JeecgBootException("没有找到此appid");
+			 }
+			 //获取小程序二维码
+			 try {
+				 WxMaInRedisConfigStorage configStorage = new WxMaInRedisConfigStorage(redisTemplate);
+				 configStorage.setAppid(wxApp.getAppId());
+				 configStorage.setSecret(wxApp.getAppSecret());
+				 WxMaService wxMaService = new WxMaServiceImpl();
+				 wxMaService.setWxMaConfig(configStorage);
+
+				 File file = wxMaService.getQrcodeService().createQrcode("page/dc/index?id=" + posTable.getId(), 430);
+				 try {
+					 MultipartFile cMultiFile = new MockMultipartFile("file", file.getName(), null, new FileInputStream(file));
+					 String path = CommonUtils.upload(cMultiFile, "temp", CommonConstant.UPLOAD_TYPE_OSS);
+					 posTable.setQrCode(path);
+					 posTableService.updateById(posTable);
+				 } catch (IOException e) {
+					 e.printStackTrace();
+				 }
+
+			 } catch (WxErrorException e) {
+				 e.printStackTrace();
+
+				 throw new JeecgBootException("获取小程序二维码失败:" + e.getMessage());
+			 }
+		 }
+		 return Result.OK(posTable);
+	 }
+
 	 /**
 	  * 导出excel
 	  *
@@ -390,6 +439,38 @@ public class PosTableController extends JeecgController<PosTable, IPosTableServi
 		 ZipOutputStream zip = new ZipOutputStream(outputStream);
 		 List<PosTable> posTables = this.posTableService.listByIds(Arrays.asList(ids.split(",")));
 		 for (PosTable posTable : posTables) {
+			 if (StringUtils.isBlank(posTable.getQrCode())) {
+				 LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+				 lambdaQueryWrapper.eq(WxAppConfig::getTenantId, posTable.getTenantId());
+				 WxAppConfig wxApp = wxAppConfigService.getOne(lambdaQueryWrapper);
+				 if (wxApp == null) {
+					 throw new JeecgBootException("没有找到此appid");
+				 }
+				 //获取小程序二维码
+				 try {
+					 WxMaInRedisConfigStorage configStorage = new WxMaInRedisConfigStorage(redisTemplate);
+					 configStorage.setAppid(wxApp.getAppId());
+					 configStorage.setSecret(wxApp.getAppSecret());
+					 WxMaService wxMaService = new WxMaServiceImpl();
+					 wxMaService.setWxMaConfig(configStorage);
+
+					 File file = wxMaService.getQrcodeService().createQrcode("page/dc/index?id=" + posTable.getId(), 430);
+					 try {
+						 MultipartFile cMultiFile = new MockMultipartFile("file", file.getName(), null, new FileInputStream(file));
+						 String path = CommonUtils.upload(cMultiFile, "temp", CommonConstant.UPLOAD_TYPE_OSS);
+						 posTable.setQrCode(path);
+						 posTableService.updateById(posTable);
+					 } catch (IOException e) {
+						 e.printStackTrace();
+					 }
+
+				 } catch (WxErrorException e) {
+					 e.printStackTrace();
+
+					 throw new JeecgBootException("获取小程序二维码失败:" + e.getMessage());
+				 }
+			 }
+
 			 if (StringUtils.isNotBlank(posTable.getQrCode())) {
 				 URL url3 = null;
 				 try {