kongdeqiang
2025-03-24 0011e0e5e859569525a0c1fbfc198bf5ab752e21
fix: 修改计划实体类,增加最大号表
3个文件已修改
3个文件已添加
123 ■■■■■ 已修改文件
platformx-device-api/src/main/java/com/by4cloud/platformx/device/constant/MaxSizeContant.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platformx-device-api/src/main/java/com/by4cloud/platformx/device/entity/DeviceDemandPlan.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platformx-device-api/src/main/java/com/by4cloud/platformx/device/entity/DeviceDemandTotal.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platformx-device-api/src/main/java/com/by4cloud/platformx/device/entity/MaxSize.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platformx-device-biz/src/main/java/com/by4cloud/platformx/device/controller/DeviceDemandPlanController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platformx-device-biz/src/main/java/com/by4cloud/platformx/device/mapper/MaxSizeMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platformx-device-api/src/main/java/com/by4cloud/platformx/device/constant/MaxSizeContant.java
New file
@@ -0,0 +1,25 @@
package com.by4cloud.platformx.device.constant;
public interface MaxSizeContant {
    /**
     * 设备分类编号
     */
    String DEVICE_CLASS_NUM = "DEVICE_CLASS_NUM";
    /**
     * 设备编号
     */
    String DEVICE_NUM = "DEVICE_NUM";
    /**
     * 计划编号
     */
    String PLAN_NUM = "PLAN_NUM";
    /**
     * 合同编号
     */
    String CONTRACT_NUM = "CONTRACT_NUM";
}
platformx-device-api/src/main/java/com/by4cloud/platformx/device/entity/DeviceDemandPlan.java
@@ -22,8 +22,8 @@
@Entity
@Table(appliesTo = "device_demand_plan", comment = "设备需求计划主表")
public class DeviceDemandPlan extends BaseModel<DeviceDemandPlan> {
    @Schema(description = "设备编码")
    @Column(columnDefinition="VARCHAR(64) comment '设备编码'")
    @Schema(description = "编码")
    @Column(columnDefinition="VARCHAR(64) comment '编码'")
    private String number;
    @Schema(description = "年度")
    @Column(columnDefinition="int comment '年度'")
@@ -38,20 +38,22 @@
    @Column(columnDefinition="int comment '申报类型'")
    private Integer type;
    @Schema(description = "申报公司id")
    @Column(columnDefinition="int comment '申报公司id'")
    private Integer declareCompId;
    @Column(columnDefinition="long comment '申报公司id'")
    private Long declareCompId;
    @Schema(description = "申报公司")
    @Column(columnDefinition="VARCHAR(64) comment '申报公司'")
    private String declareCompName;
    @Schema(description = "填报公司id")
    @Column(columnDefinition="int comment '填报公司id'")
    private Integer releaseCompId;
    @Column(columnDefinition="long comment '填报公司id'")
    private Long releaseCompId;
    @Schema(description = "填报公司")
    @Column(columnDefinition="VARCHAR(64) comment '填报公司'")
    private String releaseCompName;
    @Schema(description = "填报人")
    @Column(columnDefinition="VARCHAR(64) comment '填报人'")
    private String releasePerson;
    @Column(columnDefinition = "double(10,2) comment '计划总额'")
    private Double amount;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "填报时间")
platformx-device-api/src/main/java/com/by4cloud/platformx/device/entity/DeviceDemandTotal.java
@@ -1,6 +1,7 @@
package com.by4cloud.platformx.device.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.by4cloud.platformx.common.data.mybatis.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.annotations.Table;
@@ -20,22 +21,24 @@
@Data
@Entity
@Table(appliesTo = "device_demand_total", comment = "设备需求计划项目子表")
public class DeviceDemandTotal extends DeviceBaseModel<DeviceDemandTotal>{
public class DeviceDemandTotal extends BaseModel<DeviceDemandTotal> {
    @Schema(description = "需求计划id")
    @Column(columnDefinition="int comment '需求计划id'")
    private Integer planId;
    @Column(columnDefinition="long comment '需求计划id'")
    private Long planId;
    @Schema(description = "拟使用地点")
    @Column(columnDefinition="VARCHAR(64) comment '拟使用地点'")
    private String place;
    @Schema(description = "申请部门")
    @Column(columnDefinition="int comment '申请部门'")
    private Integer deptId;
    @Column(columnDefinition="long comment '申请部门'")
    private Long deptId;
    @Schema(description = "建议厂家")
    @Column(columnDefinition="VARCHAR(64) comment '建议厂家'")
    private String manu;
    @Schema(description = "投资必要性")
    @Column(columnDefinition="VARCHAR(64) comment '投资必要性'")
    private String necessity;
    @Column(columnDefinition = "double(10,2) comment '计划总额'")
    private Double amount;
    @Transient
    @TableField(exist = false)
platformx-device-api/src/main/java/com/by4cloud/platformx/device/entity/MaxSize.java
New file
@@ -0,0 +1,57 @@
package com.by4cloud.platformx.device.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.by4cloud.platformx.common.data.mybatis.BaseModel;
import lombok.Data;
import org.hibernate.annotations.Table;
import javax.persistence.Column;
import javax.persistence.Entity;
@Data
@TableName("jc_max_size")
@Entity
@javax.persistence.Table(name = "jc_max_size")
@Table(appliesTo ="jc_max_size", comment = "最大号表")
public class MaxSize extends BaseModel<MaxSize> {
    @Column(columnDefinition="VARCHAR(32) comment'主键标识'")
    private String sign;
    @Column(columnDefinition="int comment'当前编号'")
    private Integer currentNumber;
    @Column(columnDefinition="VARCHAR(32) comment'业务名称'")
    private String businessName;
    @Column(columnDefinition="int comment'缓存大小'")
    private Integer cacheSize;
    @Column(columnDefinition="int comment '是否使用前缀,0-不使用,1-使用'")
    private Integer usePrefix;
    @Column(columnDefinition="VARCHAR(32) comment'前缀'")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String prefixName;
    @Column(columnDefinition="int comment'是否使用前缀,0-不使用,1-使用'")
    private Integer useSuffix;
    @Column(columnDefinition="VARCHAR(32) comment '后缀'")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String suffixName;
    @Column(columnDefinition="int comment'是是否全局流水,0-否,1-是'")
    private Integer isAll;
    @Column(columnDefinition="VARCHAR(32) comment'组织内编码'")
    private String innerCode;
    @Column(columnDefinition="int comment'编号长度'")
    private Integer length;
}
platformx-device-biz/src/main/java/com/by4cloud/platformx/device/controller/DeviceDemandPlanController.java
@@ -47,6 +47,9 @@
    @GetMapping("/page" )
    public R getDeviceDemandPlanPage(@ParameterObject Page page, @ParameterObject DeviceDemandPlan deviceDemandPlan) {
        LambdaQueryWrapper<DeviceDemandPlan> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(deviceDemandPlan.getDeclareCompId() !=null,DeviceDemandPlan::getDeclareCompId,deviceDemandPlan.getDeclareCompId());
        wrapper.eq(deviceDemandPlan.getReleasePerson() !=null,DeviceDemandPlan::getReleasePerson,deviceDemandPlan.getReleasePerson());
        wrapper.eq(deviceDemandPlan.getYear() !=null,DeviceDemandPlan::getYear,deviceDemandPlan.getYear());
        return R.ok(deviceDemandPlanService.pageByScope(page, wrapper));
    }
platformx-device-biz/src/main/java/com/by4cloud/platformx/device/mapper/MaxSizeMapper.java
New file
@@ -0,0 +1,11 @@
package com.by4cloud.platformx.device.mapper;
import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper;
import com.by4cloud.platformx.device.entity.MaxSize;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MaxSizeMapper extends PlatformxBaseMapper<MaxSize> {
}