WIN-B904R0U0NNS\Administrator 2 rokov pred
rodič
commit
f430e72cc7

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

@@ -125,6 +125,7 @@ public class BusPrintTemplateController extends JeecgController<BusPrintTemplate
 			}
 		}
 		BusPrintTemplate editModel = busPrintTemplateService.getById(busPrintTemplate.getId());
+		editModel.setHotelLogo(busPrintTemplate.getHotelLogo());
 		editModel.setName(busPrintTemplate.getName());
 		editModel.setSpecs(busPrintTemplate.getSpecs());
 		editModel.setRemarks(busPrintTemplate.getRemarks());
@@ -141,12 +142,38 @@ public class BusPrintTemplateController extends JeecgController<BusPrintTemplate
 		editModel.setIsShowBreakfast(busPrintTemplate.getIsShowBreakfast());
 		editModel.setIsShowAddress(busPrintTemplate.getIsShowAddress());
 		editModel.setIsShowPhone(busPrintTemplate.getIsShowPhone());
+		editModel.setIsShowQrCode(busPrintTemplate.getIsShowQrCode());
 
 		busPrintTemplateService.updateById(editModel);
 //		busPrintTemplateService.updateById(busPrintTemplate);
 		return Result.OK("编辑成功!");
 	}
 
+	 /**
+	  *  编辑
+	  *
+	  * @param busPrintTemplate
+	  * @return
+	  */
+	 @AutoLog(value = "打印模板-编辑")
+	 @ApiOperation(value="打印模板-编辑", notes="打印模板-编辑")
+	 //@RequiresPermissions("business:bus_print_template_info:edit")
+	 @RequestMapping(value = "/editLogo", method = {RequestMethod.PUT,RequestMethod.POST})
+	 public Result<String> editLogo(@RequestBody BusPrintTemplate busPrintTemplate) {
+		 if(busPrintTemplate.getTenantId() == null || busPrintTemplate.getTenantId().equals("")){
+			 LoginUser user = TokenUtils.getAuthUser();
+			 if(user.getRelTenantIds() != null && !user.getRelTenantIds().equals("")){
+				 busPrintTemplate.setTenantId(user.getRelTenantIds());
+			 } else {
+				 throw new JeecgBootException("当前登录人租户信息错误");
+			 }
+		 }
+		 BusPrintTemplate editModel = busPrintTemplateService.getById(busPrintTemplate.getId());
+		 editModel.setHotelLogo(busPrintTemplate.getHotelLogo());
+		 busPrintTemplateService.updateById(editModel);
+		 return Result.OK("上传成功!");
+	 }
+
 	/**
 	 *   通过id删除
 	 *

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

@@ -126,4 +126,14 @@ public class BusPrintTemplate implements Serializable {
     @Excel(name = "是否显示客人电话(0-是;1-否)", width = 15)
     @ApiModelProperty(value = "是否显示客人电话(0-是;1-否)")
     private java.lang.Integer isShowPhone;
+
+    /**打印Logo*/
+    @Excel(name = "打印Logo", width = 15)
+    @ApiModelProperty(value = "打印Logo")
+    private String hotelLogo;
+
+    /**是否显示二维码(0-是;1-否)*/
+    @Excel(name = "是否显示二维码(0-是;1-否)", width = 15)
+    @ApiModelProperty(value = "是否显示二维码(0-是;1-否)")
+    private java.lang.Integer isShowQrCode;
 }