站长信息
jeffery.xu
jeffery.xu

软件工程师

欢迎访问我的个人笔记网站!我是一名热爱技术的开发者,专注于Web开发和技术分享。

811495111@qq.com
18521510875
筛选

个人笔记

删除 dangling 镜像(无标签的镜像)
人工智能学习

## 删除 dangling 镜像(无标签的镜像)

那个 `<none>` 的是"悬空镜像",是旧版本残留,可以删除。

---

### 方法一:删除指定ID的镜像

```bash
sudo docker rmi cd9d58ad8338
```

---

### 方法二:删除所有悬空镜像

```bash
sudo docker image prune
```

---

### 方法三:一次性清理

```bash
# 删除所有未使用的镜像
sudo docker image prune -a
```

---

## 解释

| 状态 | 说明 |
|------|------|
| `diary-website latest` | ✅ 正在使用的镜像 |
| `<none>` | ❌ 悬空镜像(旧版本残留,可以删除) |

删除后不会影响网站运行,放心删除!

Ubuntu Docker安装完整指南 📦
人工智能学习

## Ubuntu Docker安装完整指南 📦

---

### 方法一:一键安装(推荐,国内服务器)

```bash
# 使用阿里云镜像安装(国内服务器首选)
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
```

---

### 方法二:手动安装(Ubuntu 24.04/22.04/20.04)

#### 1. 更新系统
```bash
sudo apt update && sudo apt upgrade -y
```

#### 2. 安装依赖
```bash
sudo apt install -y ca-certificates curl gnupg lsb-release
```

#### 3. 添加Docker官方GPG密钥
```bash
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
```

#### 4. 添加Docker仓库
```bash
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```

#### 5. 安装Docker
```bash
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

---

### 启动Docker

```bash
# 启动Docker
sudo systemctl start docker

# 设置开机自启
sudo systemctl enable docker

# 验证安装
docker --version
```

---

### 常见问题解决

#### 问题1:权限问题
```bash
# 将当前用户加入docker组
sudo usermod -aG docker $USER

# 重新登录后生效,或执行
newgrp docker
```

#### 问题2:临时解决方案(每次命令前加sudo)
```bash
# 修改socket权限(不推荐生产环境)
sudo chmod 666 /var/run/docker.sock
```

---

### 验证Docker

```bash
# 查看Docker版本
docker --version

# 运行测试容器
docker run hello-world

# 查看运行中的容器
docker ps
```

---

### Docker常用命令

| 命令 | 说明 |
|------|------|
| `docker ps` | 查看运行中的容器 |
| `docker ps -a` | 查看所有容器 |
| `docker stop 容器名` | 停止容器 |
| `docker rm 容器名` | 删除容器 |
| `docker images` | 查看镜像列表 |
| `docker rmi 镜像名` | 删除镜像 |
| `docker logs 容器名` | 查看容器日志 |

---

### 完整流程

```bash
# 1. 一键安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

# 2. 启动
sudo systemctl start docker
sudo systemctl enable docker

# 3. 验证
docker --version
```

安装完成后就可以部署您的网站了!

Docker SCP部署完整流程 📦
人工智能学习

## Docker SCP部署完整流程 📦

---

### 一、本地操作(Windows)

#### 1. 构建Docker镜像
```powershell
cd c:\Users\jeff\Documents\GitHub\Diary
docker build -t diary-website .
```

#### 2. 导出镜像为tar文件
```powershell
docker save -o diary-website.tar diary-website:latest
```

#### 3. 传输到服务器
```powershell
scp diary-website.tar ubuntu@106.54.42.242:/home/ubuntu/
```
> 第一次会提示输入yes确认,然后输入服务器密码

---

### 二、服务器操作(腾讯云Ubuntu)

#### 1. 加载镜像
```bash
docker load -i diary-website.tar
```

#### 2. 停止并删除旧容器(如有)
```bash
sudo docker stop diary-website
sudo docker rm diary-website
```

#### 3. 运行新容器
```bash
sudo docker run -d -p 80:80 --name diary-website diary-website
```

#### 4. 验证运行状态
```bash
sudo docker ps
```

---

### 三、完整命令汇总

**本地:**
```powershell
# 构建 → 导出 → 传输
cd c:\Users\jeff\Documents\GitHub\Diary
docker build -t diary-website .
docker save -o diary-website.tar diary-website:latest
scp diary-website.tar ubuntu@106.54.42.242:/home/ubuntu/
```

**服务器:**
```bash
# 加载 → 重启
docker load -i diary-website.tar
sudo docker stop diary-website
sudo docker rm diary-website
sudo docker run -d -p 80:80 --name diary-website diary-website
```

---

### 四、注意事项

| 项目 | 说明 |
|------|------|
| 端口 | 腾讯云安全组需开放80端口 |
| 镜像大小 | 约390MB |
| 首次SSH | 输入yes确认服务器指纹 |
| Docker权限 | 使用sudo执行docker命令 |

---

### 五、访问网站

```
http://106.54.42.242
```

---

需要我帮您执行这些命令吗?

腾讯云服务器安装 XFCE 桌面完整指南
人工智能学习

# 腾讯云服务器安装 XFCE 桌面完整指南

## 一、环境要求
- 服务器:腾讯云 Ubuntu 20.04/22.04
- 网络:已开放 5901 端口(安全组)

---

## 二、安装步骤

### 1. 更新系统
```bash
sudo apt update && sudo apt upgrade -y
```

### 2. 安装 XFCE 桌面环境
```bash
sudo apt install xfce4 xfce4-goodies dbus-x11 -y
```

### 3. 安装 TigerVNC
```bash
sudo apt install tigervnc-standalone-server tigervnc-common -y
```

### 4. 创建普通用户(可选,推荐使用非 root 用户)
```bash
sudo adduser ubuntu
```

### 5. 切换到目标用户并配置
```bash
su - ubuntu
vncpasswd          # 设置 VNC 密码
touch ~/.Xresources
```

### 6. 创建 xstartup 启动脚本
```bash
cat > ~/.vnc/xstartup << 'EOF'
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
unset XDG_SESSION_DIR
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP=XFCE
export XDG_SESSION_TYPE=x11
export DISPLAY=:1
xrdb ~/.Xresources
xsetroot -solid grey
/usr/bin/startxfce4
EOF

chmod +x ~/.vnc/xstartup
```

### 7. 测试启动 VNC
```bash
vncserver -localhost no -geometry 1920x1080 :1
```

### 8. 配置腾讯云安全组
在腾讯云控制台 → 安全组 → 添加入站规则:
- 协议:TCP
- 端口:5901
- 来源:0.0.0.0/0

---

## 三、配置开机自启(推荐)

### 创建 systemd 服务
```bash
sudo tee /etc/systemd/system/vnc.service << 'EOF'
[Unit]
Description=VNC Server
After=network.target

[Service]
Type=forking
User=ubuntu
ExecStart=/usr/bin/vncserver -localhost no -geometry 1920x1080 :1
ExecStop=/usr/bin/vncserver -kill :1
WorkingDirectory=/home/ubuntu

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable vnc
sudo systemctl start vnc
```

---

## 四、连接方式

1. 下载 VNC 客户端(TigerVNC Viewer)
2. 连接地址:`服务器公网IP:5901`
3. 输入 VNC 密码

---

## 五、常见问题排查

| 问题 | 解决方法 |
|------|----------|
| 连接不上 | 检查腾讯云安全组是否开放 5901 端口 |
| 黑屏 | 检查 xstartup 脚本是否正确,查看日志 `cat ~/.vnc/*.log` |
| 端口被占用 | `vncserver -kill :1` 停止后重新启动 |
| 服务启动失败 | `systemctl status vnc.service` 查看错误 |

---

## 六、日常使用

```bash
# 手动启动
vncserver -localhost no -geometry 1920x1080 :1

# 手动停止
vncserver -kill :1

# 查看状态
vncserver -list
systemctl status vnc
```

 

Gore修改内容
工作笔记
1 植入报告导出
Implant Report Export
上次CR的一个需求变更:病历号导出的excel表格里面显示完整还是显示****1234按照当前用户系统界面上展示的结果来
A requirement change from last CR: The excel table for exporting the medical record number shows complete or ****1234 according to the results displayed on the current user system interface
2 GSP报表
GSP Reports
QA提出把所有GSP报表字段描述里的“有效期”改成“失效日期”。GSP报表包括:验收管理、入库记录、贮存管理、检查管理、销售管理、出库管理、复核管理、售后退回管理、报损管理。同时E-Order下的经销商发货报表的有效期也同步改成失效日期
QA proposed to change "expiry date" to "expiration date" in all GSP report field descriptions. GSP reports include: Acceptance management, inbound records, storage management, inspection management, sales management, outbound management, review management, post-sale return management, and loss reporting management. At the same time, the validity period of the dealer shipping report under E-Order is also changed to expiration date
3 供货企业资质预警功能
Supplier qualification warning function
1.增加供货企业资质预警:当供货企业资质证书的自然有效期至跟当前时间比分别是30天和1天的时候,会发送邮件提醒RA和 QA;
2. 生产企业资质预警暂不关闭
1 Add supply enterprise qualification warning: When the natural validity period of the supply enterprise qualification certificate is 30 days and 1 day respectively from the current time, an email will be sent to alert RA and QA;
2 The production enterprise qualification warning will not be turned off for the time being
4 暂存订单折扣金额锁定
The discount amount of the temporarily stored orders is locked
1.新增暂存订单折扣金额锁定表,暂存采购单时记录有补偿金额抵扣的订单信息。删除暂存订单时,解锁之前锁定的补偿金额。
2.已有锁定补偿金额的暂存订单,不允许新增、修改、删除订购的产品信息。只能整单做删除。
3.在新增订单或编辑无锁定补偿金额的暂存订单时,系统在计算当前订单的补偿金额需要先去除
1中其它订单锁定的补偿金额
4.包括总部采购订单录入和经销商采购订单录入功能同步修改
1. Add a table for locking discount amounts for temporary orders, which records the information of orders with compensation amount deductions when temporarily storing purchase orders. When deleting a temporary order, unlock the previously locked compensation amount.
2 For a temporary order with a locked compensation amount, it is not allowed to add, modify, or delete the ordered product information. Only the entire order can be deleted.
3. When adding a new order or editing a temporary order without a locked compensation amount, the system needs to remove the compensation amount locked in other orders in 1 before calculating the compensation amount for the current order
4. Including the simultaneous modification of headquarters purchase order entry and dealer purchase order entry functions
5 总部用户邮件提醒的链接调整
Link adjustment for email alerts from headquarters users
因戈尔内部员工登录方式从pingone换成了Entra,登录方式有所不一样,所以需要把总部用户系统接受到的通知所有邮件里面的链接换成https://myapplications.microsoft.com
For gore staff login mode changed from pingone Entra, login way is different, so need to accept headquarters user system to inform all the inside of the email link for https://myapplications.microsoft.com
6 发送订单给仓库
Send the order to the warehouse
1. 创建一个邮件组:HTDK Order,用于发送订单信息给仓库(维护方式与现在一样,该功能不需要开发,只需要在现在的【邮件组管理】菜单去维护即可)
2. 我们在订单审批界面增加一个勾选框,勾选框的内容是【发邮件给仓库】,默认是不勾选的。Melody在审批订单的时候根据实际情况勾选该勾选框   
3. 基于第2点增加判断,如该笔订单的【发邮件给仓库】勾选了且CS点击了审批通过,在审批通过完成后同步推送邮件给HTDK。如【发邮件给仓库】勾选了但是操作的是审批拒绝或者返回,则不发送邮件。
4. 订单审批界面增加【CS填写给仓库的备注】字段,
不管是否勾选了【发邮件给仓库】均为非必填,Melody在审批订单时根据实际情况填写该内容
5.考虑到以上功能是三个业务线共用且目前只for B277的订单,所以【发邮件给仓库】的勾选框和【CS填写给仓库的备注】均为非必填项,CS审批的时候根据实际情况操作
1 Create a mail group: HTDK Order for sending order information to the warehouse (the maintenance method is the same as it is now. This feature does not need to be developed and can be maintained in the current [Mail Group Management] menu)
2. We add a checkbox to the order approval interface, with the content of the checkbox being [Email to the Warehouse], which is unchecked by default. Melody will check the box when approving orders based on the actual situation
3 Add a judgment based on point 2, such as the [Email to Warehouse] option for this order is checked and CS clicks approval, then send an email to HTDK simultaneously after approval is completed. If [Email to Warehouse] is checked but the operation is a rejection or return of approval, no email will be sent.
4 Add a [CS Note to warehouse] field to the order approval interface, which is not required regardless of whether [Email to Warehouse] is checked or not, Melody fills in this content based on the actual situation when approving the order
5. Considering that the above functions are shared by the three business lines and currently only for B277 orders, the checkbox for "Email to Warehouse" and the "CS Notes to Warehouse" are both non-required fields, and CS will operate according to the actual situation during the approval process
7 人工返利附件下载
Download of the manual rebate attachment
经销商下载人工返利附件报错
Dealers have reported an error when downloading the manual rebate attachment
8 补偿类型选项框查询功能
Compensation type option box query function
完善一下补偿申请录入界面(总部+经销商)和人工返利的补偿类型选项框的查询功能(即在选项界面的上方增加补偿代码、补偿名称的查询条件)
Refine the query functionality of the compensation type option box for compensation claims (headquarters + dealer) and manual rebates (i.e. add a query area above the option interface)
9 经销商系统 经销商系统所有查询功能如有可以用【经销商名称】查询的,把【经销商名称】查询提交去掉
10 退货报表打印功能 退货报表打印功能把打印报表的仓库地址和联系人删掉,包括B185跟B277的

 

减肥计划
生活经验

作息(雷打不动)

 
  • 6:20 起床 → 喝一杯温水
  • 6:50 送老婆地铁站
  • 7:20 回小区快走 10 分钟
  • 7:38 公交
  • 9:00–18:00 上班(多喝水、少久坐)
  • 19:10–19:20 到家
  • 19:20–19:40 吃晚餐
  • 19:40–20:20 运动(40 分钟)
  • 23:00 睡觉
 

 

运动(前 2 周就照这个来)

 
  • 周一:快走 4 分钟 + 慢跑 2 分钟 ×7 组(40 分钟)
  • 周二:快走 30 分钟
  • 周三:同周一
  • 周四:休息 / 拉伸
  • 周五:同周一
  • 周六:同周一
  • 周日:休息
 
强度:能说话、不喘、不疼就是最适合你的。
 

 

吃(直接照买照吃)

 

早餐(二选一)

 
  • 鸡蛋 2 个 + 纯牛奶 / 无糖豆浆
  • 无糖燕麦 + 鸡蛋 2 个
 

午餐

 
  • 主食:半碗饭
  • 蛋白:瘦肉 / 鱼 / 鸡胸 / 牛肉 / 豆腐
  • 蔬菜:两大份
 

晚餐(不吃主食

 
  • 蔬菜 + 鸡蛋 / 豆腐 / 瘦肉 / 鱼
  • 不喝汤、不喝粥、不吃甜
 

绝对不碰

 
酒、海鲜、内脏、火锅浓汤、奶茶饮料、油炸夜宵
 

 

你只要记住 3 句话

 
  1. 晚上 19:40 出门运动
  2. 晚餐 不吃主食
  3. 每天 喝够 2.5~3L 水
医院销售代表更新
工作笔记

今天更新医院销售代表

经销商授权申请审批流程优化需求
工作笔记

经销商授权申请审批流程优化需求,见如下详细说明。

2.1 经销商申请授权单时,下拉框选择的客户区域由现在的东南西北四项,在增加一个CL区域选项。

2.2 CE审批时,客户区域下拉框选择项也增加一个CL区域。允许CE做客户区域的内容修改。默认根据经销商提交订单的区域进行内容显示。审批条件修改,单据中的经销商所属类型+客户区域与CE审批人员负责的经销商类型+授权区域相同,才展示带CE审批的数据允许CE审批。

2.3 CMD审批调整,客户区域下拉框选择项也增加一个CL区域,默认根据经销商提交订单的区域进行内容显示。不允许修改。审批条件修改,单据中的经销商所属类型+客户区域与CMD审批人员负责的经销商类型+授权区域相同,才展示对应待审批数据允许CMD人员审批。

2.4 RMD审批调整,客户区域下拉框选择项也增加一个CL区域,默认根据经销商提交订单的区域进行内容显示。不允许修改。审批条件修改,单据中的经销商所属类型+客户区域与RMD审批人员负责的经销商类型+授权区域相同,才展示对应待审批数据允许RMD人员审批。

2.5 总裁办审批调整,客户区域下拉框选择项也增加一个CL区域,默认根据经销商提交订单的区域进行内容显示。不允许修改。审批条件修改,单据中的经销商所属类型+客户区域与总裁办审批人员负责的经销商类型+授权区域相同,才展示对应待审批数据允许总裁办人员审批。

PS

审批流的那个审批状态  CE待审批、CERutrn 等把CXE换成ComEx

把总裁办审批更改成全国渠道审批

经销商基准价功能修改
工作笔记

一:DMS根据BPCS推送的价格数据做经销商基准价的增补,
  1)根据BPCS推送的经销商+产品+价格数据,如果经销商在基准价功能存在,产品在基准价功能不存在的,需要把此价格数据新增到经销商基准价功能(时间都是当前年份的1月1号到12月31号)。
  2)第一步新增好数据后,把新增数据的经销商+产品+价格数据拿出来,在循环增加数据,从2024年开始截止到当前时间的上一年,每年一条记录。
二:货号升级功能调整
  1)系统需要选择新货号、老货号、年份(年份从2024年开始,到当前年),同时要根据老货号,老货号有的年份才有年份,数据选择完成点击数据同步按钮,系统判断,如果新货号+年份在经销商基准价功能无数据,系统自动按照老货号+年份查询出所有记录复制一份给到新货号。
  2)如果选择的新货号+年份在经销商基准价中已存在数据,系统则按照老货号+经销商+年份更新新货号的价格。
三:功能List列表显示、查询、导出功能增加【创建时间】、【年份】字段、年份取值如下:a. 手工上传:取上传字段。b. BPCS 推送:取生效日的“年份”
四:手工上传数据逻辑调整。保证相同经销商,相同货号,相同年份只有一条记录。如果本次上传的数据经销商+产品+年份在当前功能已存在相同数据,系统直接做价格更新。

DDI功能修改等
工作笔记

1.APOC DMS系统的那个DDI匹配后数据报告功能,需要调整一下。在关联产品匹配表的时候,需要用产品代码、名称、规格、单位、经销商相等做条件