打印尝试 2

This commit is contained in:
2026-04-03 11:07:25 +08:00
parent 791096107f
commit f0a4031484
9 changed files with 213 additions and 108 deletions

View File

@@ -16,6 +16,7 @@ import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -29,7 +30,7 @@ import java.util.List;
* @author Administrator
* @since 2025-02-10
*/
@Service
@DubboService
public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff> implements ShopStaffService {
@Resource
private SysUserService sysUserService;

View File

@@ -116,6 +116,22 @@ public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable
return queryChain().eq(ShopTable::getShopId, shopId).eq(ShopTable::getTableCode, tableCode).one();
}
@Override
public String getTableAreaAndName(Long shopId, String tableCode, String tableName) {
ShopTable shopTable = getOneByTableCode(shopId, tableCode);
if (shopTable == null) {
return tableName;
} else {
ShopTableArea shopArea = shopAreaService.getOne(new QueryWrapper().eq(ShopTableArea::getShopId, shopId)
.eq(ShopTableArea::getId, shopTable.getAreaId()));
if (shopArea == null) {
return tableName;
} else {
return shopArea.getName() + "-" + shopTable.getName();
}
}
}
public static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit) {
response.setCharacterEncoding(request.getCharacterEncoding());
response.setContentType("application/octet-stream");