From d2f70dbba98e651b09c2b4dbe37d250044080ee8 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期三, 21 十月 2026 17:26:18 +0800
Subject: [PATCH] feat(基础数据): 新增油库信息/储罐信息模块(移植自新疆融邦环保分支)

---
 src/main/java/com/ruoyi/basic/mapper/OilDepotMapper.java            |   15 +
 src/main/java/com/ruoyi/basic/service/ITankInfoService.java         |   65 +++++
 src/main/java/com/ruoyi/basic/service/IOilDepotService.java         |   65 +++++
 src/main/resources/application-jsnygcjx.yml                         |   16 
 src/main/java/com/ruoyi/basic/pojo/OilDepot.java                    |   93 +++++++
 src/main/java/com/ruoyi/basic/controller/TankInfoController.java    |   85 ++++++
 src/main/java/com/ruoyi/basic/mapper/TankInfoMapper.java            |   15 +
 src/main/java/com/ruoyi/basic/controller/OilDepotController.java    |   85 ++++++
 src/main/java/com/ruoyi/basic/enums/TankUsageTypeEnum.java          |   29 ++
 src/main/java/com/ruoyi/basic/service/impl/OilDepotServiceImpl.java |   59 ++++
 src/main/java/com/ruoyi/basic/pojo/TankInfo.java                    |  106 ++++++++
 src/main/java/com/ruoyi/basic/service/impl/TankInfoServiceImpl.java |  123 +++++++++
 12 files changed, 748 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/controller/OilDepotController.java b/src/main/java/com/ruoyi/basic/controller/OilDepotController.java
new file mode 100644
index 0000000..b1cbeae
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/controller/OilDepotController.java
@@ -0,0 +1,85 @@
+package com.ruoyi.basic.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.pojo.OilDepot;
+import com.ruoyi.basic.service.IOilDepotService;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.domain.R;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 娌瑰簱淇℃伅Controller
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@RestController
+@RequestMapping("/basic/oilDepot")
+@AllArgsConstructor
+public class OilDepotController {
+    private IOilDepotService oilDepotService;
+
+    /**
+     * 鍒嗛〉鏌ヨ娌瑰簱淇℃伅鍒楄〃
+     */
+    @GetMapping("/list")
+    public R list(Page<OilDepot> page, OilDepot oilDepot) {
+        IPage<OilDepot> result = oilDepotService.selectOilDepotList(page, oilDepot);
+        return R.ok(result);
+    }
+
+    /**
+     * 鏌ヨ鍏ㄩ儴娌瑰簱淇℃伅锛堜緵涓嬫媺閫夋嫨锛�
+     */
+    @GetMapping("/all")
+    public R all() {
+        return R.ok(oilDepotService.selectAll());
+    }
+
+    /**
+     * 鑾峰彇娌瑰簱淇℃伅璇︾粏淇℃伅
+     */
+    @GetMapping(value = "/{id}")
+    public R getInfo(@PathVariable("id") Long id) {
+        return R.ok(oilDepotService.selectOilDepotById(id));
+    }
+
+    /**
+     * 鏂板娌瑰簱淇℃伅
+     */
+    @Log(title = "娌瑰簱淇℃伅", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public R add(@RequestBody OilDepot oilDepot) {
+        return R.ok(oilDepotService.insertOilDepot(oilDepot));
+    }
+
+    /**
+     * 淇敼娌瑰簱淇℃伅
+     */
+    @Log(title = "娌瑰簱淇℃伅", businessType = BusinessType.UPDATE)
+    @PostMapping("/update")
+    public R edit(@RequestBody OilDepot oilDepot) {
+        return R.ok(oilDepotService.updateOilDepot(oilDepot));
+    }
+
+    /**
+     * 鍒犻櫎娌瑰簱淇℃伅
+     */
+    @Log(title = "娌瑰簱淇℃伅", businessType = BusinessType.DELETE)
+    @DeleteMapping("/del")
+    public R remove(@RequestBody Long[] ids) {
+        if (ids == null || ids.length == 0) {
+            return R.fail("璇蜂紶鍏ヨ鍒犻櫎鐨処D");
+        }
+        return R.ok(oilDepotService.deleteOilDepotByIds(ids));
+    }
+}
diff --git a/src/main/java/com/ruoyi/basic/controller/TankInfoController.java b/src/main/java/com/ruoyi/basic/controller/TankInfoController.java
new file mode 100644
index 0000000..3bf6ae6
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/controller/TankInfoController.java
@@ -0,0 +1,85 @@
+package com.ruoyi.basic.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.pojo.TankInfo;
+import com.ruoyi.basic.service.ITankInfoService;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.domain.R;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 鍌ㄧ綈淇℃伅Controller
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@RestController
+@RequestMapping("/basic/tankInfo")
+@AllArgsConstructor
+public class TankInfoController {
+    private ITankInfoService tankInfoService;
+
+    /**
+     * 鍒嗛〉鏌ヨ鍌ㄧ綈淇℃伅鍒楄〃
+     */
+    @GetMapping("/list")
+    public R list(Page<TankInfo> page, TankInfo tankInfo) {
+        IPage<TankInfo> result = tankInfoService.selectTankInfoList(page, tankInfo);
+        return R.ok(result);
+    }
+
+    /**
+     * 鏌ヨ鍏ㄩ儴鍌ㄧ綈淇℃伅锛堜緵涓嬫媺閫夋嫨锛�
+     */
+    @GetMapping("/all")
+    public R all() {
+        return R.ok(tankInfoService.selectAll());
+    }
+
+    /**
+     * 鑾峰彇鍌ㄧ綈淇℃伅璇︾粏淇℃伅
+     */
+    @GetMapping(value = "/{id}")
+    public R getInfo(@PathVariable("id") Long id) {
+        return R.ok(tankInfoService.selectTankInfoById(id));
+    }
+
+    /**
+     * 鏂板鍌ㄧ綈淇℃伅
+     */
+    @Log(title = "鍌ㄧ綈淇℃伅", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public R add(@RequestBody TankInfo tankInfo) {
+        return R.ok(tankInfoService.insertTankInfo(tankInfo));
+    }
+
+    /**
+     * 淇敼鍌ㄧ綈淇℃伅
+     */
+    @Log(title = "鍌ㄧ綈淇℃伅", businessType = BusinessType.UPDATE)
+    @PostMapping("/update")
+    public R edit(@RequestBody TankInfo tankInfo) {
+        return R.ok(tankInfoService.updateTankInfo(tankInfo));
+    }
+
+    /**
+     * 鍒犻櫎鍌ㄧ綈淇℃伅
+     */
+    @Log(title = "鍌ㄧ綈淇℃伅", businessType = BusinessType.DELETE)
+    @DeleteMapping("/del")
+    public R remove(@RequestBody Long[] ids) {
+        if (ids == null || ids.length == 0) {
+            return R.fail("璇蜂紶鍏ヨ鍒犻櫎鐨処D");
+        }
+        return R.ok(tankInfoService.deleteTankInfoByIds(ids));
+    }
+}
diff --git a/src/main/java/com/ruoyi/basic/enums/TankUsageTypeEnum.java b/src/main/java/com/ruoyi/basic/enums/TankUsageTypeEnum.java
new file mode 100644
index 0000000..a520280
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/enums/TankUsageTypeEnum.java
@@ -0,0 +1,29 @@
+package com.ruoyi.basic.enums;
+
+import com.ruoyi.common.enums.BaseEnum;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 鍌ㄧ綈鐢ㄩ�旀灇涓撅紝瀵瑰簲 tank_info.usage_type
+ */
+@Getter
+@AllArgsConstructor
+public enum TankUsageTypeEnum implements BaseEnum<Integer> {
+
+    LEASE(1, "绉熻祦"),
+    SELF_USE(2, "鑷敤");
+
+    private final Integer value;
+    private final String label;
+
+    @Override
+    public Integer getCode() {
+        return value;
+    }
+
+    @Override
+    public String getValue() {
+        return label;
+    }
+}
diff --git a/src/main/java/com/ruoyi/basic/mapper/OilDepotMapper.java b/src/main/java/com/ruoyi/basic/mapper/OilDepotMapper.java
new file mode 100644
index 0000000..04b3060
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/mapper/OilDepotMapper.java
@@ -0,0 +1,15 @@
+package com.ruoyi.basic.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.basic.pojo.OilDepot;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 娌瑰簱淇℃伅Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@Mapper
+public interface OilDepotMapper extends BaseMapper<OilDepot> {
+}
diff --git a/src/main/java/com/ruoyi/basic/mapper/TankInfoMapper.java b/src/main/java/com/ruoyi/basic/mapper/TankInfoMapper.java
new file mode 100644
index 0000000..00d2498
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/mapper/TankInfoMapper.java
@@ -0,0 +1,15 @@
+package com.ruoyi.basic.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.basic.pojo.TankInfo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 鍌ㄧ綈淇℃伅Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@Mapper
+public interface TankInfoMapper extends BaseMapper<TankInfo> {
+}
diff --git a/src/main/java/com/ruoyi/basic/pojo/OilDepot.java b/src/main/java/com/ruoyi/basic/pojo/OilDepot.java
new file mode 100644
index 0000000..5538807
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/pojo/OilDepot.java
@@ -0,0 +1,93 @@
+package com.ruoyi.basic.pojo;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * 娌瑰簱淇℃伅瀵硅薄 oil_depot
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@TableName(value = "oil_depot")
+@Data
+public class OilDepot implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 娌瑰簱id
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 娌瑰簱鍚嶇О
+     */
+    private String depotName;
+
+    /**
+     * 璐熻矗浜�
+     */
+    private String chargePerson;
+
+    /**
+     * 鑱旂郴鐢佃瘽
+     */
+    private String phone;
+
+    /**
+     * 鍚敤鏃ユ湡
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate enableDate;
+
+    /**
+     * 鎵�灞炲叕鍙�
+     */
+    private String company;
+
+    /**
+     * 鍒涘缓鏃堕棿
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    /**
+     * 鍒涘缓浜�
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUser;
+
+    /**
+     * 鏇存柊鏃堕棿
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private LocalDateTime updateTime;
+
+    /**
+     * 鏇存柊浜�
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateUser;
+
+    /**
+     * 绉熸埛id
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long tenantId;
+
+    /**
+     * 閮ㄩ棬id
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long deptId;
+}
diff --git a/src/main/java/com/ruoyi/basic/pojo/TankInfo.java b/src/main/java/com/ruoyi/basic/pojo/TankInfo.java
new file mode 100644
index 0000000..78730ac
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/pojo/TankInfo.java
@@ -0,0 +1,106 @@
+package com.ruoyi.basic.pojo;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 鍌ㄧ綈淇℃伅瀵硅薄 tank_info
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@TableName(value = "tank_info")
+@Data
+public class TankInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 鍌ㄧ綈id
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 鍌ㄧ綈鍙�
+     */
+    private String tankNo;
+
+    /**
+     * 澶х被
+     */
+    private String category;
+
+    /**
+     * 娌瑰搧
+     */
+    private String oilProduct;
+
+    /**
+     * 缃愬
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 搴撳瓨浣欓噺(m3)
+     */
+    private BigDecimal remaining;
+
+    /**
+     * 鏄惁鍚敤 1鍚敤 0鏈惎鐢�
+     */
+    private Integer isEnabled;
+
+    /**
+     * 鐢ㄩ�� 1绉熻祦 2鑷敤锛屽惎鐢ㄥ悗鎵嶉渶瑕侀��
+     */
+    private Integer usageType;
+
+    /**
+     * 绉熷淇℃伅锛屼粎鐢ㄩ��=绉熻祦鏃跺~鍐�
+     */
+    private String tenantInfo;
+
+    /**
+     * 鍒涘缓鏃堕棿
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    /**
+     * 鍒涘缓浜�
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUser;
+
+    /**
+     * 鏇存柊鏃堕棿
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private LocalDateTime updateTime;
+
+    /**
+     * 鏇存柊浜�
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateUser;
+
+    /**
+     * 绉熸埛id
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long tenantId;
+
+    /**
+     * 閮ㄩ棬id
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long deptId;
+}
diff --git a/src/main/java/com/ruoyi/basic/service/IOilDepotService.java b/src/main/java/com/ruoyi/basic/service/IOilDepotService.java
new file mode 100644
index 0000000..7830556
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/service/IOilDepotService.java
@@ -0,0 +1,65 @@
+package com.ruoyi.basic.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.basic.pojo.OilDepot;
+
+import java.util.List;
+
+/**
+ * 娌瑰簱淇℃伅Service鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+public interface IOilDepotService extends IService<OilDepot> {
+
+    /**
+     * 鍒嗛〉鏌ヨ娌瑰簱淇℃伅鍒楄〃
+     *
+     * @param page 鍒嗛〉鍙傛暟
+     * @param oilDepot 鏌ヨ鏉′欢
+     * @return 娌瑰簱淇℃伅闆嗗悎
+     */
+    IPage<OilDepot> selectOilDepotList(Page<OilDepot> page, OilDepot oilDepot);
+
+    /**
+     * 鏌ヨ鍏ㄩ儴娌瑰簱淇℃伅锛堜緵涓嬫媺閫夋嫨锛�
+     *
+     * @return 娌瑰簱淇℃伅闆嗗悎
+     */
+    List<OilDepot> selectAll();
+
+    /**
+     * 鏌ヨ娌瑰簱淇℃伅
+     *
+     * @param id 娌瑰簱淇℃伅涓婚敭
+     * @return 娌瑰簱淇℃伅
+     */
+    OilDepot selectOilDepotById(Long id);
+
+    /**
+     * 鏂板娌瑰簱淇℃伅
+     *
+     * @param oilDepot 娌瑰簱淇℃伅
+     * @return 缁撴灉
+     */
+    boolean insertOilDepot(OilDepot oilDepot);
+
+    /**
+     * 淇敼娌瑰簱淇℃伅
+     *
+     * @param oilDepot 娌瑰簱淇℃伅
+     * @return 缁撴灉
+     */
+    boolean updateOilDepot(OilDepot oilDepot);
+
+    /**
+     * 鎵归噺鍒犻櫎娌瑰簱淇℃伅
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑娌瑰簱淇℃伅涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    boolean deleteOilDepotByIds(Long[] ids);
+}
diff --git a/src/main/java/com/ruoyi/basic/service/ITankInfoService.java b/src/main/java/com/ruoyi/basic/service/ITankInfoService.java
new file mode 100644
index 0000000..7835e4a
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/service/ITankInfoService.java
@@ -0,0 +1,65 @@
+package com.ruoyi.basic.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.basic.pojo.TankInfo;
+
+import java.util.List;
+
+/**
+ * 鍌ㄧ綈淇℃伅Service鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+public interface ITankInfoService extends IService<TankInfo> {
+
+    /**
+     * 鍒嗛〉鏌ヨ鍌ㄧ綈淇℃伅鍒楄〃
+     *
+     * @param page 鍒嗛〉鍙傛暟
+     * @param tankInfo 鏌ヨ鏉′欢
+     * @return 鍌ㄧ綈淇℃伅闆嗗悎
+     */
+    IPage<TankInfo> selectTankInfoList(Page<TankInfo> page, TankInfo tankInfo);
+
+    /**
+     * 鏌ヨ鍏ㄩ儴鍌ㄧ綈淇℃伅锛堜緵涓嬫媺閫夋嫨锛�
+     *
+     * @return 鍌ㄧ綈淇℃伅闆嗗悎
+     */
+    List<TankInfo> selectAll();
+
+    /**
+     * 鏌ヨ鍌ㄧ綈淇℃伅
+     *
+     * @param id 鍌ㄧ綈淇℃伅涓婚敭
+     * @return 鍌ㄧ綈淇℃伅
+     */
+    TankInfo selectTankInfoById(Long id);
+
+    /**
+     * 鏂板鍌ㄧ綈淇℃伅
+     *
+     * @param tankInfo 鍌ㄧ綈淇℃伅
+     * @return 缁撴灉
+     */
+    boolean insertTankInfo(TankInfo tankInfo);
+
+    /**
+     * 淇敼鍌ㄧ綈淇℃伅
+     *
+     * @param tankInfo 鍌ㄧ綈淇℃伅
+     * @return 缁撴灉
+     */
+    boolean updateTankInfo(TankInfo tankInfo);
+
+    /**
+     * 鎵归噺鍒犻櫎鍌ㄧ綈淇℃伅
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鍌ㄧ綈淇℃伅涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    boolean deleteTankInfoByIds(Long[] ids);
+}
diff --git a/src/main/java/com/ruoyi/basic/service/impl/OilDepotServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/OilDepotServiceImpl.java
new file mode 100644
index 0000000..8d15c7d
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/service/impl/OilDepotServiceImpl.java
@@ -0,0 +1,59 @@
+package com.ruoyi.basic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.basic.mapper.OilDepotMapper;
+import com.ruoyi.basic.pojo.OilDepot;
+import com.ruoyi.basic.service.IOilDepotService;
+import com.ruoyi.common.utils.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 娌瑰簱淇℃伅Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@Service
+public class OilDepotServiceImpl extends ServiceImpl<OilDepotMapper, OilDepot> implements IOilDepotService {
+
+    @Override
+    public IPage<OilDepot> selectOilDepotList(Page<OilDepot> page, OilDepot oilDepot) {
+        LambdaQueryWrapper<OilDepot> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.like(StringUtils.isNotBlank(oilDepot.getDepotName()), OilDepot::getDepotName, oilDepot.getDepotName())
+                .like(StringUtils.isNotBlank(oilDepot.getCompany()), OilDepot::getCompany, oilDepot.getCompany())
+                .orderByAsc(OilDepot::getId);
+        return this.page(page, queryWrapper);
+    }
+
+    @Override
+    public List<OilDepot> selectAll() {
+        LambdaQueryWrapper<OilDepot> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.orderByAsc(OilDepot::getId);
+        return this.list(queryWrapper);
+    }
+
+    @Override
+    public OilDepot selectOilDepotById(Long id) {
+        return this.getById(id);
+    }
+
+    @Override
+    public boolean insertOilDepot(OilDepot oilDepot) {
+        return this.save(oilDepot);
+    }
+
+    @Override
+    public boolean updateOilDepot(OilDepot oilDepot) {
+        return this.updateById(oilDepot);
+    }
+
+    @Override
+    public boolean deleteOilDepotByIds(Long[] ids) {
+        return this.removeByIds(List.of(ids));
+    }
+}
diff --git a/src/main/java/com/ruoyi/basic/service/impl/TankInfoServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/TankInfoServiceImpl.java
new file mode 100644
index 0000000..ece224e
--- /dev/null
+++ b/src/main/java/com/ruoyi/basic/service/impl/TankInfoServiceImpl.java
@@ -0,0 +1,123 @@
+package com.ruoyi.basic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.basic.enums.TankUsageTypeEnum;
+import com.ruoyi.basic.mapper.TankInfoMapper;
+import com.ruoyi.basic.pojo.TankInfo;
+import com.ruoyi.basic.service.ITankInfoService;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 鍌ㄧ綈淇℃伅Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2026-09-10
+ */
+@Service
+public class TankInfoServiceImpl extends ServiceImpl<TankInfoMapper, TankInfo> implements ITankInfoService {
+
+    /**
+     * 鏄惁鍚敤锛氬惎鐢ㄣ�備笌 tank_info.is_enabled 鐨勯粯璁ゅ�间竴鑷�
+     */
+    private static final Integer TANK_ENABLED = 1;
+
+    @Override
+    public IPage<TankInfo> selectTankInfoList(Page<TankInfo> page, TankInfo tankInfo) {
+        LambdaQueryWrapper<TankInfo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.like(StringUtils.isNotBlank(tankInfo.getTankNo()), TankInfo::getTankNo, tankInfo.getTankNo())
+                .like(StringUtils.isNotBlank(tankInfo.getCategory()), TankInfo::getCategory, tankInfo.getCategory())
+                .eq(tankInfo.getIsEnabled() != null, TankInfo::getIsEnabled, tankInfo.getIsEnabled())
+                .eq(tankInfo.getUsageType() != null, TankInfo::getUsageType, tankInfo.getUsageType())
+                .orderByAsc(TankInfo::getId);
+        return this.page(page, queryWrapper);
+    }
+
+    /**
+     * 涓嬫媺鐢細鍙繑鍥炲凡鍚敤鐨勫偍缃愩�傛湭鍚敤琛ㄧず杩樻病鎶曠敤锛屼笉搴旇鍏ュ簱绛変笟鍔¢�変腑
+     */
+    @Override
+    public List<TankInfo> selectAll() {
+        LambdaQueryWrapper<TankInfo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(TankInfo::getIsEnabled, TANK_ENABLED)
+                .orderByAsc(TankInfo::getId);
+        return this.list(queryWrapper);
+    }
+
+    @Override
+    public TankInfo selectTankInfoById(Long id) {
+        return this.getById(id);
+    }
+
+    @Override
+    public boolean insertTankInfo(TankInfo tankInfo) {
+        normalizeUsage(tankInfo);
+        return this.save(tankInfo);
+    }
+
+    @Override
+    public boolean updateTankInfo(TankInfo tankInfo) {
+        if (tankInfo.getId() == null) {
+            throw new ServiceException("缂哄皯鍌ㄧ綈id");
+        }
+        normalizeUsage(tankInfo);
+        boolean updated = this.updateById(tankInfo);
+        if (updated) {
+            // usageType / tenantInfo 鏄厑璁歌娓呯┖鐨勶紝鑰� updateById 榛樿璺宠繃 null 瀛楁锛團ieldStrategy.NOT_NULL锛夛紝
+            // 娓呯┖鍔ㄤ綔鏍规湰鍐欎笉杩涘簱锛屾墍浠ヨ繖涓ゅ垪鍗曠嫭琛ヤ竴鏉℃洿鏂�
+            updated = this.update(Wrappers.<TankInfo>lambdaUpdate()
+                    .eq(TankInfo::getId, tankInfo.getId())
+                    .set(TankInfo::getUsageType, tankInfo.getUsageType())
+                    .set(TankInfo::getTenantInfo, tankInfo.getTenantInfo()));
+        }
+        return updated;
+    }
+
+    /**
+     * 褰掍竴鍖栥�屾槸鍚﹀惎鐢� / 鐢ㄩ�� / 绉熷淇℃伅銆嶄笁鑰呯殑鍏崇郴锛�
+     * <ul>
+     *     <li>鏈惎鐢細鐢ㄩ�斾笌绉熷淇℃伅涓�寰嬫竻绌� 鈥斺�� 鍚敤涔嬪悗鎵嶈皥绉熻祦/鑷敤</li>
+     *     <li>鍚敤 + 绉熻祦锛氱瀹俊鎭繀濉�</li>
+     *     <li>鍚敤 + 鑷敤锛氱瀹俊鎭竻绌�</li>
+     *     <li>鍚敤 + 鐢ㄩ�斾负绌猴細瑙嗕负鏈�夋嫨锛屾棦涓嶆牎楠屼篃涓嶆竻绌恒�傝縼绉诲悗鐨勫瓨閲忓偍缃愬氨鏄繖涓姸鎬侊紝
+     *         杩欐牱鑰佸墠绔笉鏀逛篃涓嶄細琚嫤锛屾洿涓嶄細鎶婂凡鏈夌殑绉熷淇℃伅鎶规帀</li>
+     * </ul>
+     */
+    private void normalizeUsage(TankInfo tankInfo) {
+        if (tankInfo.getIsEnabled() == null) {
+            tankInfo.setIsEnabled(TANK_ENABLED);
+        }
+        if (!TANK_ENABLED.equals(tankInfo.getIsEnabled())) {
+            tankInfo.setUsageType(null);
+            tankInfo.setTenantInfo(null);
+            return;
+        }
+        Integer usageType = tankInfo.getUsageType();
+        if (usageType == null) {
+            return;
+        }
+        if (TankUsageTypeEnum.LEASE.getCode().equals(usageType)) {
+            if (StringUtils.isBlank(tankInfo.getTenantInfo())) {
+                throw new ServiceException("绉熻祦鐨勫偍缃愬繀椤诲~鍐欑瀹俊鎭�");
+            }
+            return;
+        }
+        if (TankUsageTypeEnum.SELF_USE.getCode().equals(usageType)) {
+            tankInfo.setTenantInfo(null);
+            return;
+        }
+        throw new ServiceException("鍌ㄧ綈鐢ㄩ�斿彧鑳芥槸绉熻祦鎴栬嚜鐢�");
+    }
+
+    @Override
+    public boolean deleteTankInfoByIds(Long[] ids) {
+        return this.removeByIds(List.of(ids));
+    }
+}
diff --git a/src/main/resources/application-jsnygcjx.yml b/src/main/resources/application-jsnygcjx.yml
index 79280b3..9e7107c 100644
--- a/src/main/resources/application-jsnygcjx.yml
+++ b/src/main/resources/application-jsnygcjx.yml
@@ -7,7 +7,7 @@
   # 鐗堟潈骞翠唤
   copyrightYear: 2025
   # 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /home/ruoyi/uploadPath锛�
-  profile: /home/javaWork/product-inventory-management/file
+  profile: /data/javaWork/product-inventory-management/file
 
   # 鑾峰彇ip鍦板潃寮�鍏�
   addressEnabled: false
@@ -76,9 +76,9 @@
     druid:
       # 涓诲簱鏁版嵁婧�
       master:
-        url: jdbc:mysql://172.17.0.1:3306/product-inventory-management-jsnygcjxkj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://172.17.0.1:10000/product-inventory-management-jsnygcjxkj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: root
-        password: jsnygcjxkj@123456..
+        password: xd@123456..
       # 浠庡簱鏁版嵁婧�
       slave:
         # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
@@ -152,7 +152,7 @@
       #      host: localhost
       host: 172.17.0.1
       # 绔彛锛岄粯璁や负6379
-      port: 6379
+      port: 9999
       # 鏁版嵁搴撶储寮�
       database: 12
       # 瀵嗙爜
@@ -255,11 +255,11 @@
 
 # 鏂囦欢涓婁紶閰嶇疆
 file:
-  temp-dir: /home/javaWork/product-inventory-management/file/temp/uploads   # 涓存椂鐩綍 鍚庢湡鍒犻櫎
-  upload-dir: /home/javaWork/product-inventory-management/file/prod/uploads # 姝e紡鐩綍 鍚庢湡鍒犻櫎
-  path: /home/javaWork/product-inventory-management/file/path/uploads # 涓婁紶鐩綍
+  temp-dir: /data/javaWork/product-inventory-management/file/temp/uploads   # 涓存椂鐩綍 鍚庢湡鍒犻櫎
+  upload-dir: /data/javaWork/product-inventory-management/file/prod/uploads # 姝e紡鐩綍 鍚庢湡鍒犻櫎
+  path: /data/javaWork/product-inventory-management/file/path/uploads # 涓婁紶鐩綍
   urlPrefix: /prod-api/common # 閾炬帴鍓嶇紑
-  domain: http://localhost:8080 # 鍩熷悕鍓嶇紑
+  domain: http://36.213.150.237:9009 # 鍩熷悕鍓嶇紑
   expired: 120 # 杩囨湡鏃堕棿(鍗曚綅:鍒嗛挓)
   useLimit: 10 # 浣跨敤娆℃暟
   compress: true # 鏄惁鍘嬬缉

--
Gitblit v1.9.3