Merge remote-tracking branch 'origin/master' into feature/hcs-api-p0

# Conflicts:
#	blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/ContractManageServiceImpl.java
#	blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/PaymentApplicationServiceImpl.java
This commit is contained in:
刘泉佳
2026-10-23 19:18:33 +08:00
85 changed files with 2415 additions and 354 deletions
@@ -207,6 +207,12 @@ public class Dept extends TenantEntity {
@Schema(description = "是否平台公司:0否,1是")
private Integer isPlatformCompany;
/**
* 是否业务部门:0否,1是
*/
@Schema(description = "是否业务部门:0否,1是")
private Integer isBusinessDept;
/**
* OA主键,仅同步记录,不对外展示
*/
@@ -26,6 +26,10 @@ public class FormalSettlementSaveRequest implements Serializable {
private List<Long> sourcePreSettlementIds;
private List<Long> sourceDetailIds;
private List<DetailAdjustment> detailAdjustments;
/** 业务模式(业务字典 business_model) */
private String businessModel;
/** 运输方式(业务字典 transport_type) */
private String transportType;
private LocalDate exchangeRateDate;
private BigDecimal exchangeRate;
private String attachmentsJson;
@@ -55,6 +55,12 @@ public class PreSettlementSaveRequest implements Serializable {
@Schema(description = "结算类型:receivable/payable")
private String settlementType;
@Schema(description = "业务模式(业务字典 business_model)")
private String businessModel;
@Schema(description = "运输方式(业务字典 transport_type)")
private String transportType;
@Schema(description = "汇率日期")
private LocalDate exchangeRateDate;
@@ -199,6 +199,10 @@ public class ContractManage extends TenantEntity {
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private String changeContent;
@TableField(exist = false)
@Schema(description = "变更类型")
private String changeType;
@Schema(description = "变更原因")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private String changeReason;
@@ -32,6 +32,7 @@ import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serial;
import java.math.BigDecimal;
/**
* 评分量化表实体类
@@ -62,5 +63,10 @@ public class CreditScoreQuantification extends TenantEntity {
*/
@Schema(description = "标准说明")
private String standardDescription;
/**
* 减分项目最高扣分限制:客商评分时所有减分项合计不得超过该值,超出按该上限计分
*/
@Schema(description = "减分项目最高扣分限制")
private BigDecimal maxMinusScore;
}
@@ -115,6 +115,10 @@ public class CustomerArchive extends TenantEntity {
@Schema(description = "营业期限类型")
private String businessTermType;
@Schema(description = "营业期限开始日")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private LocalDate businessStartDate;
@Schema(description = "营业期限截止日")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private LocalDate businessEndDate;
@@ -123,6 +127,10 @@ public class CustomerArchive extends TenantEntity {
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal registeredCapital;
@Schema(description = "实缴资本(万元)")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal paidInCapital;
@Schema(description = "客商负责人")
private String principal;
@@ -140,6 +148,10 @@ public class CustomerArchive extends TenantEntity {
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal applyCreditLimit;
@Schema(description = "已使用额度(万元),新建可录历史值,后续由收付款业务累加/减更新")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private BigDecimal usedCreditLimit;
@Schema(description = "备注")
private String remark;
@@ -88,6 +88,14 @@ public class FormalSettlement extends TenantEntity {
* 结算金额(结算币种,含全部合计费用)
*/
private BigDecimal settlementAmount;
/**
* 业务模式(业务字典 business_model)
*/
private String businessModel;
/**
* 运输方式(业务字典 transport_type)
*/
private String transportType;
/**
* 本位币,默认 RMB
*/
@@ -92,6 +92,12 @@ public class PreSettlement extends TenantEntity {
@Schema(description = "结算金额")
private BigDecimal settlementAmount;
@Schema(description = "业务模式(业务字典 business_model)")
private String businessModel;
@Schema(description = "运输方式(业务字典 transport_type)")
private String transportType;
@Schema(description = "本位币")
private String localCurrency;
@@ -29,6 +29,7 @@ import lombok.EqualsAndHashCode;
import org.springblade.transport.pojo.entity.CustomerCreditScore;
import java.io.Serial;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -57,4 +58,11 @@ public class CustomerCreditScoreVO extends CustomerCreditScore {
@Schema(description = "评估标准")
private List<CreditRatingStandardVO> standards = new ArrayList<>();
/**
* 来自评分量化表的减分项目最高扣分限制(非落库字段,供前端计分使用)
*/
@TableField(exist = false)
@Schema(description = "减分项目最高扣分限制")
private BigDecimal maxMinusScore;
}
@@ -43,6 +43,8 @@ public class FormalSettlementVO extends FormalSettlement implements KingdeeUnloc
@TableField(exist = false) private String ids;
@TableField(exist = false) private String approvalStatusName;
@TableField(exist = false) private String settlementTypeName;
@TableField(exist = false) @Schema(description = "业务模式名称") private String businessModelName;
@TableField(exist = false) @Schema(description = "运输方式名称") private String transportTypeName;
@TableField(exist = false) private Integer attachmentCount;
@TableField(exist = false) private String attachmentSyncStatus;
@TableField(exist = false) private String attachmentSyncStatusName;
@@ -85,6 +85,14 @@ public class PreSettlementVO extends PreSettlement {
@Schema(description = "结算类型名称")
private String settlementTypeName;
@TableField(exist = false)
@Schema(description = "业务模式名称")
private String businessModelName;
@TableField(exist = false)
@Schema(description = "运输方式名称")
private String transportTypeName;
@TableField(exist = false)
@Schema(description = "结算明细")
private List<PreSettlementDetail> details;
@@ -56,6 +56,9 @@ public class TripQueryVO implements Serializable {
@Schema(description = "可见组织 ID 集合:非空时只出这些组织的运单行,空集合表示不按组织过滤")
private List<Long> deptIds;
@Schema(description = "可见项目 ID 集合:非空时只出这些项目的运单行,空集合表示不按项目过滤(小程序调度端优先用此口径)")
private List<Long> projectIds;
@Schema(description = "状态:0待接单/1进行中/2已完成/3已取消,不传为全部(不含已取消)")
private Integer status;
@@ -26,6 +26,7 @@ import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import org.springblade.system.pojo.entity.MpUser;
import org.springblade.system.pojo.entity.MpUserInfo;
import org.springblade.system.pojo.vo.MpUserDataScopeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -53,6 +54,7 @@ public interface IMpUserClient {
String UPDATE_USER = API_PREFIX + "/update-user";
String BIND_OPENID = API_PREFIX + "/bind-openid";
String SET_PASSWORD = API_PREFIX + "/set-password";
String RESOLVE_DATA_SCOPE = API_PREFIX + "/resolve-data-scope";
/**
* 按主键查询
@@ -60,6 +62,12 @@ public interface IMpUserClient {
@GetMapping(USER_BY_ID)
R<MpUser> userById(@RequestParam("userId") Long userId);
/**
* 解析小程序用户可见组织(所属组织 + 数据权限范围 + 数据层级范围)
*/
@GetMapping(RESOLVE_DATA_SCOPE)
R<MpUserDataScopeVO> resolveDataScope(@RequestParam("userId") Long userId);
/**
* 按租户 + 手机号查询
*/
@@ -25,6 +25,7 @@
*/
package org.springblade.system.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -35,6 +36,7 @@ import org.springblade.core.tool.sensitive.SensitiveType;
import java.io.Serial;
import java.util.Date;
import java.util.List;
/**
* 小程序用户实体(仅用于小程序登录,与 blade_user 分离)
@@ -113,10 +115,26 @@ public class MpUser extends TenantEntity {
@Schema(description = "小程序身份")
private String identities;
/**
* 部门id
* 部门id(多选,逗号分隔)
*/
@Schema(description = "部门id")
private String deptId;
/**
* 数据权限范围:1-仅所属组织,2-全部组织,3-自定义
*/
@Schema(description = "数据权限范围")
private Integer dataScopeRange;
/**
* 数据层级范围:1-包含下级,2-仅本级
*/
@Schema(description = "数据层级范围")
private Integer dataLevelRange;
/**
* 自定义数据权限组织ID列表(dataScopeRange=3 时生效)
*/
@TableField(exist = false)
@Schema(description = "自定义数据权限组织ID")
private List<Long> dataScopeDeptIds;
/**
* 岗位id
*/
@@ -0,0 +1,44 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.system.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 小程序用户组织数据权限
*
* @author Chill
*/
@Data
@TableName("blade_mp_user_data_scope")
@Schema(description = "小程序用户组织数据权限")
public class MpUserDataScope implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
@Schema(description = "小程序用户主键")
private Long userId;
@Schema(description = "组织主键")
private Long deptId;
}
@@ -0,0 +1,91 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.system.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 小程序用户数据权限解析结果
* <p>
* allDept=true 表示全部组织(查询不过滤);否则按 deptIds 收口,空列表表示无可见组织。
*
* @author Chill
*/
@Data
@Schema(description = "小程序用户数据权限")
public class MpUserDataScopeVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 是否全部组织(不过滤)
*/
@Schema(description = "是否全部组织")
private boolean allDept;
/**
* 可见组织 ID;allDept=false 时生效,空表示无权限
*/
@Schema(description = "可见组织ID")
private List<Long> deptIds = new ArrayList<>();
/**
* 全部组织
*/
public static MpUserDataScopeVO all() {
MpUserDataScopeVO scope = new MpUserDataScopeVO();
scope.setAllDept(true);
return scope;
}
/**
* 无可见组织
*/
public static MpUserDataScopeVO empty() {
MpUserDataScopeVO scope = new MpUserDataScopeVO();
scope.setAllDept(false);
scope.setDeptIds(new ArrayList<>());
return scope;
}
/**
* 指定可见组织
*/
public static MpUserDataScopeVO of(List<Long> deptIds) {
MpUserDataScopeVO scope = new MpUserDataScopeVO();
scope.setAllDept(false);
scope.setDeptIds(deptIds == null ? new ArrayList<>() : new ArrayList<>(deptIds));
return scope;
}
}
@@ -42,6 +42,13 @@ public class MpUserVO extends MpUser {
@Serial
private static final long serialVersionUID = 1L;
/**
* 所属组织名称(逗号分隔)
*/
@TableField(exist = false)
@Schema(description = "所属组织名称")
private String deptName;
/**
* 身份名称(逗号分隔中文)
*/