This commit is contained in:
2026-08-26 23:17:56 +08:00
parent 792a988c11
commit b750f6ecf0
50 changed files with 227 additions and 94 deletions
@@ -31,6 +31,10 @@ import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.pojo.entity.Region;
import org.springblade.system.feign.ISysClient;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
/**
@@ -50,6 +54,8 @@ public class RegionCache {
public static final int VILLAGE_LEVEL = 5;
private static final String REGION_CODE = "region:code:";
private static final String REGION_TREE_CACHE = "region:tree";
private static final String REGION_LAZY_TREE = "lazy-tree:";
private static ISysClient sysClient;
@@ -73,4 +79,38 @@ public class RegionCache {
});
}
/**
* 获取行政区划懒加载树
*
* @param parentCode 父区划编号
* @param param 查询参数
* @param loader 数据加载器
* @return 懒加载树
*/
public static List<Map<String, Object>> getLazyTree(
String parentCode,
Map<String, Object> param,
Callable<List<Map<String, Object>>> loader) {
Map<String, Object> query = param == null ? Map.of() : param;
String cacheKey = String.join("|",
cacheKeyPart(parentCode),
cacheKeyPart(query.get("code")),
cacheKeyPart(query.get("name")),
cacheKeyPart(query.get("regionLevel"))
);
return CacheUtil.get(REGION_TREE_CACHE, REGION_LAZY_TREE, cacheKey, loader, Boolean.FALSE);
}
/**
* 清除行政区划懒加载树缓存
*/
public static void clearLazyTree() {
CacheUtil.clear(REGION_TREE_CACHE, Boolean.FALSE);
}
private static String cacheKeyPart(Object value) {
String text = value == null ? "" : String.valueOf(value);
return text.length() + ":" + text;
}
}
@@ -25,6 +25,8 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -88,6 +90,12 @@ public class Driver extends TenantEntity {
*/
@Schema(description = "详细地址")
private String address;
/**
* 驾驶车辆车牌号
*/
@Schema(description = "驾驶车辆车牌号")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private String drivingVehicle;
/**
* 岗位,多个使用逗号分隔
*/
@@ -25,6 +25,8 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -108,6 +110,7 @@ public class MaintenanceRecord extends TenantEntity {
* 里程/航程数
*/
@Schema(description = "里程/航程数")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal mileage;
/**
* 里程单位
@@ -22,6 +22,8 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -87,15 +89,18 @@ public class ProjectApply extends TenantEntity {
private BigDecimal receivableLimit;
@Schema(description = "应收账款回款期限(天)")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private Integer receivableDays;
@Schema(description = "回款账期(天)")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private Integer paymentDays;
@Schema(description = "货物类型")
private String cargoType;
@Schema(description = "预估货物数量")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private String cargoQuantity;
@Schema(description = "业务周期开始日期")
@@ -114,12 +119,15 @@ public class ProjectApply extends TenantEntity {
private String businessType;
@Schema(description = "项目规模(万元)")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal projectScale;
@Schema(description = "预计利润(万元)")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal estimatedProfit;
@Schema(description = "资金需求(万元)")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal fundDemand;
@Schema(description = "结算方式")