From 08d940a6abf8683d826d28412cafb203052b3636 Mon Sep 17 00:00:00 2001 From: dhy1725534722 <1725534722@qq.com> Date: Fri, 19 Apr 2024 13:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BA=93=E5=92=8C=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jjh/common/entity/BaseInfoEntity.java | 6 ++ .../declaration/entity/BmsBigStrongAward.java | 9 +++ .../declaration/entity/BmsBrandingAward.java | 7 ++ .../entity/BmsCarrierConstructionAward.java | 11 +++ .../entity/BmsDeclarationRecords.java | 19 +++++ .../entity/BmsEnterpriseBasicInfo.java | 8 ++ .../declaration/entity/BmsFundingDetail.java | 81 +------------------ .../entity/BmsIndustrialInternetAward.java | 6 ++ .../entity/BmsIntegrationIndustries.java | 14 ++++ .../entity/BmsManufacturingServicesAward.java | 8 ++ .../entity/BmsPlatformConstructionAward.java | 6 ++ .../entity/BmsProjectSettlementAward.java | 11 +++ .../entity/BmsSceneOpeningAward.java | 7 ++ .../entity/vo/BmsApprovalInfoQueryVo.java | 16 +++- .../entity/vo/BmsBigStrongAwardQueryVo.java | 2 + .../vo/BmsProjectSettlementAwardQueryVo.java | 2 + .../impl/BmsBigStrongAwardServiceImpl.java | 35 ++++++++ .../impl/BmsBrandingAwardServiceImpl.java | 36 +++++++++ ...msCarrierConstructionAwardServiceImpl.java | 37 +++++++++ .../impl/BmsCreditManagementServiceImpl.java | 37 +++++++++ .../BmsDeclarationRecordsServiceImpl.java | 33 ++++++++ ...BmsIndustrialInternetAwardServiceImpl.java | 37 ++++++++- .../BmsIntegrationIndustriesServiceImpl.java | 43 ++++++++++ ...sLogisticsDevelopmentAwardServiceImpl.java | 39 +++++++++ ...ManufacturingServicesAwardServiceImpl.java | 39 ++++++++- ...sPlatformConstructionAwardServiceImpl.java | 36 +++++++++ .../BmsProjectSettlementAwardServiceImpl.java | 49 ++++++++++- .../impl/BmsSceneOpeningAwardServiceImpl.java | 34 ++++++++ .../ent/controller/JProjectController.java | 14 +--- .../jjh/ent/service/JProjectService.java | 7 ++ .../ent/service/impl/JProjectServiceImpl.java | 39 +++++++++ .../src/main/resources/application.yml | 2 +- .../mapper/jjh/ent/JProjectMapper.xml | 4 +- .../common/utils/poi/ProjectExcelUtil.java | 57 ++++++------- .../common/utils/poi/ProjectValueUtil.java | 41 +++++----- 35 files changed, 679 insertions(+), 153 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/common/entity/BaseInfoEntity.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/common/entity/BaseInfoEntity.java index 3dde8cb..cc5f212 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/common/entity/BaseInfoEntity.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/common/entity/BaseInfoEntity.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.common.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; @@ -21,12 +22,14 @@ public class BaseInfoEntity implements Serializable { /** * 创建者 */ + @JSONField(serialize=false) @TableField(fill = FieldFill.INSERT) private String createBy; /** * 创建时间 */ + @JSONField(serialize=false) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(fill = FieldFill.INSERT) private Date createTime; @@ -34,12 +37,14 @@ public class BaseInfoEntity implements Serializable { /** * 更新者 */ + @JSONField(serialize=false) @TableField(fill = FieldFill.UPDATE) private String updateBy; /** * 更新时间 */ + @JSONField(serialize=false) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(fill = FieldFill.UPDATE) private Date updateTime; @@ -47,6 +52,7 @@ public class BaseInfoEntity implements Serializable { /** * 备注 */ + @JSONField(serialize=false) private String remark; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBigStrongAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBigStrongAward.java index 1441b80..4f2bbe3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBigStrongAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBigStrongAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; @@ -23,26 +24,32 @@ public class BmsBigStrongAward extends BaseInfoEntity { * 主键id */ @TableId(value = "id", type = IdType.AUTO) + @JSONField(serialize = false) private Long id; /** * 企业id */ @Excel(name = "企业id") + @JSONField(serialize = false) private Long enterpriseId; /** * 是否获得园区其他经营奖励 */ + @Excel(name = "是否获得园区其他经营奖励,0:是,1:否", readConverterExp = "0=是,1=否") + @JSONField(name = "是否获得园区其他经营奖励") private int isGainRewards; + @JSONField(name = "园区其他经营奖励") @Excel(name = "奖励说明") private String rewardDescription; /** * 成立时间 */ + @JSONField(name = "申报成立时间") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "成立时间", width = 30, dateFormat = "yyyy-MM-dd") private Date establishTime; @@ -50,12 +57,14 @@ public class BmsBigStrongAward extends BaseInfoEntity { /** * 企业近3年发展情况及未来发展计划 */ + @JSONField(serialize = false) @Excel(name = "企业近3年发展情况及未来发展计划") private String developmentPlan; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBrandingAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBrandingAward.java index 0dba0be..1a8976e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBrandingAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsBrandingAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -19,36 +20,42 @@ public class BmsBrandingAward extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** * 所获荣誉/所举办活动 */ + @JSONField(name="所获荣誉/所举办活动") @Excel(name = "所获荣誉/所举办活动") private String honorsReceived; /** * 所属等级 */ + @JSONField(name="所属等级") @Excel(name = "所属等级") private Long level; /** * 证明材料 */ + @JSONField(serialize = false) @Excel(name = "证明材料") private String evidence; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsCarrierConstructionAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsCarrierConstructionAward.java index 8e3bf39..e23fd34 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsCarrierConstructionAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsCarrierConstructionAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -20,42 +21,52 @@ public class BmsCarrierConstructionAward extends BaseInfoEntity { private static final long serialVersionUID = 1L; /** 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** 项目名称 */ + @JSONField(name = "项目名称") @Excel(name = "项目名称") private String projectName; /** 文体企业数量占比 */ + @JSONField(name = "文体企业数量占比") @Excel(name = "文体企业数量占比") private String quantityProportion; /** 文体企业营收占比 */ + @JSONField(name = "文体企业营收占比") @Excel(name = "文体企业营收占比") private String revenueProportion; /** 文体企业从业人员占比 */ + @JSONField(name = "文体企业从业人员占比") @Excel(name = "文体企业从业人员占比") private String personnelProportion; /** 相关佐证材料 */ + @JSONField(serialize = false) @Excel(name = "相关佐证材料") private String supportingMaterials; /** 项目工商登记许可 */ + @JSONField(serialize = false) @Excel(name = "项目工商登记许可") private String businessLicense; /** 消防验收报告 */ + @JSONField(serialize = false) @Excel(name = "消防验收报告") private String fireReport; /** 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsDeclarationRecords.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsDeclarationRecords.java index 14e0887..3c3c6ae 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsDeclarationRecords.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsDeclarationRecords.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -21,9 +22,17 @@ import org.apache.commons.lang3.builder.ToStringStyle; public class BmsDeclarationRecords extends BaseInfoEntity { private static final long serialVersionUID = 1L; + /** + * 项目库的Id + */ + @JSONField(serialize = false) + @ApiModelProperty(value = "项目库的Id") + private Long jjhProjectId; + /** * 主键id */ + @JSONField(serialize = false) @ApiModelProperty(value = "id") @TableId(value = "id", type = IdType.AUTO) private Long id; @@ -33,11 +42,14 @@ public class BmsDeclarationRecords extends BaseInfoEntity { */ @ApiModelProperty(value = "项目名称") @Excel(name = "项目名称") + @JSONField(name = "项目名称") private String projectName; + @JSONField(serialize = false) @ApiModelProperty(value = "项目id") private Long projectId; + @JSONField(serialize = false) @ApiModelProperty(value = "事项") @Excel(name = "事项") private String matter; @@ -45,12 +57,14 @@ public class BmsDeclarationRecords extends BaseInfoEntity { /** * 企业id */ + @JSONField(serialize = false) @ApiModelProperty(value = "企业id") private Long enterpriseId; /** * 年份 */ + @JSONField(serialize = false) @ApiModelProperty(value = "年份") @Excel(name = "年份") private String year; @@ -58,18 +72,21 @@ public class BmsDeclarationRecords extends BaseInfoEntity { /** * 在线模板记录id */ + @JSONField(serialize = false) @ApiModelProperty(value = "在线模板记录id") private Long templateRecordId; /** * 申报模版类型 */ + @JSONField(serialize = false) @ApiModelProperty(value = "申报模版类型") private Integer declarationTemplateType; /** * 详情id:对应详情id */ + @JSONField(serialize = false) @ApiModelProperty(value = "详情id:对应详情id") private Long detailId; @@ -77,6 +94,7 @@ public class BmsDeclarationRecords extends BaseInfoEntity { /** * 审批状态 */ + @JSONField(serialize = false) @ApiModelProperty(value = "审批状态") @Excel(name = "审批状态", readConverterExp = "0=草稿,1=初审中,2=复审中,3=专家评审中,4=市级评定中,5=评定通过,6=专家评审-拒绝,7=复审-拒绝,8=初审-拒绝,9=评定驳回") private Long status; @@ -84,6 +102,7 @@ public class BmsDeclarationRecords extends BaseInfoEntity { /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @ApiModelProperty(value = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java index 2a65aea..63083dd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsEnterpriseBasicInfo.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -23,42 +24,49 @@ public class BmsEnterpriseBasicInfo extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize=false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业名称 */ + @JSONField(name = "企业名称") @Excel(name = "企业名称") private String enterpriseName; /** * 企业统一信用代码 */ + @JSONField(name = "企业统一信用代码") @Excel(name = "企业统一信用代码") private String creditCode; /** * 联系人 */ + @JSONField(name = "联系人") @Excel(name = "联系人") private String contacts; /** * 联系人电话 */ + @JSONField(name = "联系人电话") @Excel(name = "联系人电话") private String contactsNumber; /** * 企业地址 */ + @JSONField(name = "企业地址") @Excel(name = "企业地址") private String address; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize=false) @Excel(name = "是否删除",readConverterExp = "0=未删除,1=已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsFundingDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsFundingDetail.java index 8e6b710..e8f43b3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsFundingDetail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsFundingDetail.java @@ -2,8 +2,10 @@ package com.ruoyi.jjh.declaration.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import com.ruoyi.common.annotation.Excel; import com.ruoyi.jjh.common.entity.BaseInfoEntity; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -13,6 +15,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; * @author farben * @date 2023-09-04 */ +@Data +@TableName(value = "bms_funding_detail") public class BmsFundingDetail extends BaseInfoEntity { private static final long serialVersionUID = 1L; @@ -65,81 +69,4 @@ public class BmsFundingDetail extends BaseInfoEntity { */ @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getType() { - return type; - } - - public void setType(Integer type) { - this.type = type; - } - - public int getTemplateRecordId() { - return templateRecordId; - } - - public void setTemplateRecordId(int templateRecordId) { - this.templateRecordId = templateRecordId; - } - - public Long getDetailId() { - return detailId; - } - - public void setDetailId(Long detailId) { - this.detailId = detailId; - } - - public String getVModel() { - return vModel; - } - - public void setVModel(String vModel) { - this.vModel = vModel; - } - - public String getYear() { - return year; - } - - public void setYear(String year) { - this.year = year; - } - - public String getIllustrate() { - return illustrate; - } - - public void setIllustrate(String illustrate) { - this.illustrate = illustrate; - } - - public Long getAmount() { - return amount; - } - - public void setAmount(Long amount) { - this.amount = amount; - } - - public Long getIsDeleted() { - return isDeleted; - } - - public void setIsDeleted(Long isDeleted) { - this.isDeleted = isDeleted; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("type", getType()).append("templateRecordId", getTemplateRecordId()).append("detailId", getDetailId()).append("vModel", getVModel()).append("year", getYear()).append("illustrate", getIllustrate()).append("amount", getAmount()).append("isDeleted", getIsDeleted()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()).toString(); - } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIndustrialInternetAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIndustrialInternetAward.java index c874be4..d7f5c06 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIndustrialInternetAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIndustrialInternetAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -19,30 +20,35 @@ public class BmsIndustrialInternetAward extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** * 荣誉名称 */ + @JSONField(name = "荣誉名称") @Excel(name = "荣誉名称") private String honoraryName; /** * 证明材料 */ + @JSONField(serialize = false) @Excel(name = "证明材料") private String material; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIntegrationIndustries.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIntegrationIndustries.java index d9425d0..b1c4a58 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIntegrationIndustries.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsIntegrationIndustries.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -21,75 +22,88 @@ public class BmsIntegrationIndustries extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; + @JSONField(name = "申报类型") @Excel(name = "申报类型", readConverterExp = "1=两业融合示范企业,2=制造业企业设立财务独立核算的制造服务业职能部门,3=制造业企业剥离服务业务成立独立的法人") private Integer declarationType; /** * 证明材料 */ + @JSONField(serialize = false) @Excel(name = "证明材料") private String evidence; /** * 营业执照 */ + @JSONField(serialize = false) @Excel(name = "营业执照") private String businessLicense; /** * 完税证明 */ + @JSONField(serialize = false) @Excel(name = "完税证明") private String taxPaymentCertificate; /** * 审计报告 */ + @JSONField(serialize = false) @Excel(name = "审计报告") private String auditReport; /** * 股权架构图 */ + @JSONField(serialize = false) @Excel(name = "股权架构图") private String equityStructureChart; /** * 项目申报报告(含企业基本情况和项目基本情况) */ + @JSONField(serialize = false) @Excel(name = "项目申报报告", readConverterExp = "含=企业基本情况和项目基本情况") private String declarationReport; /** * 独立核算相关证明 */ + @JSONField(serialize = false) @Excel(name = "独立核算相关证明") private String independentAccounting; /** * 验资报告 */ + @JSONField(serialize = false) @Excel(name = "验资报告") private String capitalVerificationReport; /** * 证明材料 */ + @JSONField(serialize = false) @Excel(name = "证明材料") private String otherEvidence; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsManufacturingServicesAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsManufacturingServicesAward.java index 2f8e6ad..c3a70f2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsManufacturingServicesAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsManufacturingServicesAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -19,42 +20,49 @@ public class BmsManufacturingServicesAward extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** * 企业投资项目备案通知书或核准批复文件 */ + @JSONField(serialize = false) @Excel(name = "企业投资项目备案通知书或核准批复文件") private String filingNotice; /** * 购置设备发票清单及发票扫描件 */ + @JSONField(serialize = false) @Excel(name = "购置设备发票清单及发票扫描件") private String invoice; /** * 会计师事务所出具的企业申报项目购置设备情况的专项审计报告 */ + @JSONField(serialize = false) @Excel(name = "会计师事务所出具的企业申报项目购置设备情况的专项审计报告") private String auditReport; /** * 会计师事务所出具的企业财务报表审计报告 */ + @JSONField(serialize = false) @Excel(name = "会计师事务所出具的企业财务报表审计报告") private String financialStatements; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsPlatformConstructionAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsPlatformConstructionAward.java index d449dbf..23a8096 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsPlatformConstructionAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsPlatformConstructionAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -19,30 +20,35 @@ public class BmsPlatformConstructionAward extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** * 平台(项目)名称 */ + @JSONField(name = "平台(项目)名称") @Excel(name = "平台(项目)名称") private String platformName; /** * 合作协议 */ + @JSONField(serialize = false) @Excel(name = "合作协议") private String agreement; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsProjectSettlementAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsProjectSettlementAward.java index c404576..7d41b24 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsProjectSettlementAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsProjectSettlementAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; @@ -27,18 +28,21 @@ public class BmsProjectSettlementAward extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** * 申报单位成立时间 */ + @JSONField(name= "申报单位成立时间") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "申报单位成立时间", width = 30, dateFormat = "yyyy-MM-dd") private Date establishTime; @@ -46,36 +50,43 @@ public class BmsProjectSettlementAward extends BaseInfoEntity { /** * 截至目前员工人数 */ + @JSONField(name= "截至目前员工人数") @Excel(name = "截至目前员工人数") private Long employeeNum; /** * 招商协议 */ + @JSONField(serialize = false) + @Excel(name = "招商协议") private String agreement; /** * 验资报告 */ + @JSONField(serialize = false) @Excel(name = "验资报告") private String report; /** * 营业执照 */ + @JSONField(serialize = false) @Excel(name = "营业执照") private String businessLicense; /** * 其他材料 */ + @JSONField(serialize = false) @Excel(name = "其他材料") private String otherMaterials; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsSceneOpeningAward.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsSceneOpeningAward.java index 9607390..c11b862 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsSceneOpeningAward.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/BmsSceneOpeningAward.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; @@ -23,36 +24,42 @@ public class BmsSceneOpeningAward extends BaseInfoEntity { /** * 主键id */ + @JSONField(serialize = false) @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 企业id */ + @JSONField(serialize = false) @Excel(name = "企业id") private Long enterpriseId; /** * 项目名称 */ + @JSONField(name = "项目名称") @Excel(name = "项目名称") private String projectName; /** * 所属类型 */ + @JSONField(name = "所属类型") @Excel(name = "所属类型") private Long type; /** * 公示、发文证明、专家评分表 */ + @JSONField(serialize = false) @Excel(name = "公示、发文证明、专家评分表") private String material; /** * 是否删除:0,未删除;1,已删除 */ + @JSONField(serialize = false) @Excel(name = "是否删除:0,未删除;1,已删除") private Long isDeleted; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsApprovalInfoQueryVo.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsApprovalInfoQueryVo.java index 2c0a0a0..5483fcd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsApprovalInfoQueryVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsApprovalInfoQueryVo.java @@ -3,6 +3,9 @@ package com.ruoyi.jjh.declaration.entity.vo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ruoyi.common.annotation.Excel; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -13,46 +16,55 @@ import java.io.Serializable; * @author farben * @date 2023-09-09 */ +@ApiModel("审批记录信息对象") @Data public class BmsApprovalInfoQueryVo implements Serializable { private static final long serialVersionUID = 1L; /** 主键id */ @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty("主键Id") private Long id; + @ApiModelProperty("默认审批人id") @Excel(name = "默认审批人id") private Long approvalById; + @ApiModelProperty("默认审批人") @Excel(name = "默认审批人") private String approvalByName; /** 审批状态(0=待审核.1=审批通过,2=审批驳回) */ + @ApiModelProperty("审批状态(0=待审核.1=审批通过,2=审批驳回)") @Excel(name = "审批状态(0=待审核.1=审批通过,2=审批驳回)") private Integer approvalStatus; /** 审批意见 */ + @ApiModelProperty("审批意见") @Excel(name = "审批意见") private String approvalOpinions; /** 审批附件 */ + @ApiModelProperty("审批附件") @Excel(name = "审批附件") private String approvalAttachment; /** 是否可审核(0=是,1=否,2=结束) */ + @ApiModelProperty("是否可审核(0=是,1=否,2=结束)") @Excel(name = "是否可审核(0=是,1=否,2=结束)") private Integer isReview; + @ApiModelProperty("是否为拒绝前数据,0:否,1:是") @Excel(name = "是否为拒绝前数据,0:否,1:是") private Integer isBeforeData; /** 排序 */ + @ApiModelProperty("排序") @Excel(name = "排序") private Integer sort; + @ApiModelProperty("审批时间") @Excel(name = "审批时间") private String approvalTime; - - } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsBigStrongAwardQueryVo.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsBigStrongAwardQueryVo.java index 8e52ed0..74686a6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsBigStrongAwardQueryVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsBigStrongAwardQueryVo.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity.vo; +import com.alibaba.fastjson2.annotation.JSONField; import com.ruoyi.jjh.declaration.entity.BmsBigStrongAward; import com.ruoyi.jjh.declaration.entity.BmsFundingDetail; import io.swagger.annotations.ApiModelProperty; @@ -22,5 +23,6 @@ public class BmsBigStrongAwardQueryVo extends BmsBigStrongAward { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "应收列表") + @JSONField(serialize = false) private List fundingDetailList; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsProjectSettlementAwardQueryVo.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsProjectSettlementAwardQueryVo.java index 7c9746c..55c9337 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsProjectSettlementAwardQueryVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/entity/vo/BmsProjectSettlementAwardQueryVo.java @@ -1,5 +1,6 @@ package com.ruoyi.jjh.declaration.entity.vo; +import com.alibaba.fastjson2.annotation.JSONField; import com.ruoyi.jjh.declaration.entity.BmsFundingDetail; import com.ruoyi.jjh.declaration.entity.BmsProjectSettlementAward; import io.swagger.annotations.ApiModelProperty; @@ -22,5 +23,6 @@ public class BmsProjectSettlementAwardQueryVo extends BmsProjectSettlementAward private static final long serialVersionUID = 1L; @ApiModelProperty(value = "应收列表") + @JSONField(serialize = false) private List fundingDetailList; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java index feaa24c..c07a075 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsBigStrongAwardServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.jjh.declaration.service.impl; import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.jjh.declaration.entity.BmsBigStrongAward; import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords; @@ -9,16 +10,21 @@ import com.ruoyi.jjh.declaration.entity.dto.BmsBigStrongAwardAddDto; import com.ruoyi.jjh.declaration.entity.dto.BmsBigStrongAwardUpdateDto; import com.ruoyi.jjh.declaration.entity.dto.BmsFundingDetailAddDto; import com.ruoyi.jjh.declaration.entity.vo.BmsBigStrongAwardQueryVo; +import com.ruoyi.jjh.declaration.entity.vo.BmsProjectSettlementAwardQueryVo; +import com.ruoyi.jjh.declaration.entity.vo.DeclarationRecordsVo; import com.ruoyi.jjh.declaration.mapper.BmsBigStrongAwardMapper; import com.ruoyi.jjh.declaration.service.IBmsBigStrongAwardService; import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService; import com.ruoyi.jjh.declaration.service.IBmsFundingDetailService; import com.ruoyi.jjh.declaration.service.ICommonService; +import com.ruoyi.jjh.ent.entity.JProject; +import com.ruoyi.jjh.ent.service.JProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @@ -41,6 +47,8 @@ public class BmsBigStrongAwardServiceImpl extends ServiceImpl approvalInfoList = jProjectService.getApprovalInfoList(id); + return success(approvalInfoList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JProjectService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JProjectService.java index bf6f224..473b160 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JProjectService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/JProjectService.java @@ -2,6 +2,7 @@ package com.ruoyi.jjh.ent.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.jjh.declaration.entity.BmsFundingDetail; import com.ruoyi.jjh.declaration.entity.vo.BmsApprovalInfoQueryVo; import com.ruoyi.jjh.ent.entity.JProject; @@ -33,5 +34,11 @@ public interface JProjectService extends IService { * @return 单条数据 */ List getApprovalInfoList(Serializable id); + + String getJsonString(List obj); + + String allJsonString(String a1,String a2,String a3,String a4); + + void saveProject(JProject jp,Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JProjectServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JProjectServiceImpl.java index 0c66c0d..3fdf26b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JProjectServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/service/impl/JProjectServiceImpl.java @@ -1,13 +1,18 @@ package com.ruoyi.jjh.ent.service.impl; +import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords; +import com.ruoyi.jjh.declaration.entity.BmsFundingDetail; import com.ruoyi.jjh.declaration.entity.vo.BmsApprovalInfoQueryVo; +import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService; import com.ruoyi.jjh.ent.mapper.JProjectMapper; import com.ruoyi.jjh.ent.entity.JProject; import com.ruoyi.jjh.ent.service.JProjectService; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.io.Serializable; import java.util.List; @@ -20,6 +25,9 @@ import java.util.List; @Service("jProjectService") public class JProjectServiceImpl extends ServiceImpl implements JProjectService { + + @Resource + private IBmsDeclarationRecordsService iBmsDeclarationRecordsService; /** * 分页查询所有数据 * @@ -43,5 +51,36 @@ public class JProjectServiceImpl extends ServiceImpl i return baseMapper.getApprovalInfoList(id); } + @Override + public String getJsonString(List fund) { + StringBuilder str = new StringBuilder(); + //金额 + str.append("{"); + for (BmsFundingDetail v1 : fund) { + str.append('"').append(v1.getYear()).append(v1.getIllustrate()).append('"').append(":").append('"').append(v1.getAmount()).append('"').append(","); + } + str.append("}"); + return String.valueOf(str); + } + + @Override + public String allJsonString(String a1, String a2, String a3, String a4) { + // 创建一个新的JSON对象,并将两个JSON对象合并到新对象中 + JSONObject mergedObj = new JSONObject(); + mergedObj.putAll(JSONObject.parseObject(a1)); + mergedObj.putAll(JSONObject.parseObject(a2)); + mergedObj.putAll(JSONObject.parseObject(a3)); + mergedObj.putAll(JSONObject.parseObject(a4)); + return mergedObj.toJSONString(); + } + + @Override + public void saveProject(JProject jp, Long id) { + this.save(jp); + BmsDeclarationRecords n1 = new BmsDeclarationRecords(); + n1.setId(id); + n1.setJjhProjectId(jp.getId()); + iBmsDeclarationRecordsService.updateById(n1); + } } diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index a6ab81a..340a63a 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -64,7 +64,7 @@ spring: devtools: restart: # 热部署开关 - enabled: true + enabled: false # redis 配置 redis: # 地址 diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JProjectMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JProjectMapper.xml index 3234bbf..4032c8c 100644 --- a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JProjectMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JProjectMapper.xml @@ -40,9 +40,7 @@ left join bms_declaration_records b on a.id = b.jjh_project_id left join bms_approval_info c on b.id = c.declaration_records_id left join sys_user d on c.approval_by_id = d.user_id - - a.id=#{id} - + where a.id=#{id} order by c.sort asc diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectExcelUtil.java index 43bb75a..7bfe5bf 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectExcelUtil.java @@ -75,18 +75,7 @@ import java.math.BigDecimal; import java.text.DecimalFormat; import java.time.LocalDate; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; +import java.util.*; import java.util.stream.Collectors; /** @@ -456,7 +445,7 @@ public class ProjectExcelUtil { int rows = sheet.getLastRowNum(); if (rows > 0) { // 定义一个map用于存放excel列的序号和field. - Map cellMap = new HashMap(); + Map cellMap = new LinkedHashMap<>(); // 获取表头 Row heard = sheet.getRow(titleNum); for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) { @@ -470,7 +459,7 @@ public class ProjectExcelUtil { } // 有数据时才处理 得到类的所有field. List fields = this.getFields(); - Map fieldsMap = new HashMap(); + Map fieldsMap = new LinkedHashMap(); List hasStr = new ArrayList<>(); for (Object[] objects : fields) { Excel attr = (Excel) objects[1]; @@ -558,32 +547,32 @@ public class ProjectExcelUtil { ReflectUtils.invokeSetter(entity, "status", 5); cellMap.entrySet().removeIf(entry -> hasStr.contains(entry.getKey())); StringBuilder str = new StringBuilder(); - Map sortHash = new HashMap<>(); + Map sortHash = new LinkedHashMap<>(); str.append("{"); for (Map.Entry entry : cellMap.entrySet()) { String key1 = entry.getKey(); Object val1 = this.getCellValue(row, entry.getValue()); sortHash.put(key1, String.valueOf(val1)); } - // 自定义比较器按值排序 - Comparator> customComparator = (entry1, entry2) -> { - if (entry1.getValue().length() > entry2.getValue().length()) { - return 1; - } else if (entry1.getValue().length() < entry2.getValue().length()) { - return -1; - } else { - return 0; // 默认升序排序 - } - }; - Map sortedMap = sortHash.entrySet().stream() - .sorted(customComparator) - .collect(Collectors.toMap( - Map.Entry::getKey, - Map.Entry::getValue, - (oldVal, newVal) -> oldVal, - LinkedHashMap::new - )); - for (Map.Entry entry : sortedMap.entrySet()) { +// 自定义比较器按值排序 +// Comparator> customComparator = (entry1, entry2) -> { +// if (entry1.getValue().length() > entry2.getValue().length()) { +// return 1; +// } else if (entry1.getValue().length() < entry2.getValue().length()) { +// return -1; +// } else { +// return 0; // 默认升序排序 +// } +// }; +// Map sortedMap = sortHash.entrySet().stream() +// .sorted(customComparator) +// .collect(Collectors.toMap( +// Map.Entry::getKey, +// Map.Entry::getValue, +// (oldVal, newVal) -> oldVal, +// LinkedHashMap::new +// )); + for (Map.Entry entry : sortHash.entrySet()) { if (Objects.equals(entry.getValue(), "") || entry.getValue() == null) { String nulls = null; str.append('"').append(entry.getKey()).append('"').append(":").append(nulls).append(","); diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectValueUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectValueUtil.java index b798d82..3377499 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectValueUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ProjectValueUtil.java @@ -455,7 +455,7 @@ public class ProjectValueUtil { int rows = sheet.getLastRowNum(); if (rows > 0) { // 定义一个map用于存放excel列的序号和field. - Map cellMap = new HashMap(); + Map cellMap = new LinkedHashMap(); // 获取表头 Row heard = sheet.getRow(titleNum); for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) { @@ -469,7 +469,7 @@ public class ProjectValueUtil { } // 有数据时才处理 得到类的所有field. List fields = this.getFields(); - Map fieldsMap = new HashMap(); + Map fieldsMap = new LinkedHashMap(); List hasStr = new ArrayList<>(); for (Object[] objects : fields) { Excel attr = (Excel) objects[1]; @@ -555,7 +555,7 @@ public class ProjectValueUtil { ReflectUtils.invokeSetter(entity, "status", 5); cellMap.entrySet().removeIf(entry -> hasStr.contains(entry.getKey())); StringBuilder str = new StringBuilder(); - Map sortHash = new HashMap<>(); + Map sortHash = new LinkedHashMap<>(); str.append("{"); for (Map.Entry entry : cellMap.entrySet()) { String key1 = entry.getKey(); @@ -563,24 +563,23 @@ public class ProjectValueUtil { sortHash.put(key1, String.valueOf(val1)); } // 自定义比较器按值排序 - Comparator> customComparator = (entry1, entry2) -> { - if (entry1.getValue().length() > entry2.getValue().length()) { - return 1; - } else if (entry1.getValue().length() < entry2.getValue().length()) { - return -1; - } else { - return 0; // 默认升序排序 - } - }; - Map sortedMap = sortHash.entrySet().stream() - .sorted(customComparator) - .collect(Collectors.toMap( - Map.Entry::getKey, - Map.Entry::getValue, - (oldVal, newVal) -> oldVal, - LinkedHashMap::new - )); - for (Map.Entry entry : sortedMap.entrySet()) { +// Comparator> customComparator = (entry1, entry2) -> { +// if (entry1.getValue().length() > entry2.getValue().length()) { +// return 1; +// } else if (entry1.getValue().length() < entry2.getValue().length()) { +// return -1; +// } else { +// return 0; // 默认升序排序 +// } +// }; +// Map sortedMap = sortHash.entrySet().stream() +// .collect(Collectors.toMap( +// Map.Entry::getKey, +// Map.Entry::getValue, +// (oldVal, newVal) -> oldVal, +// LinkedHashMap::new +// )); + for (Map.Entry entry : sortHash.entrySet()) { if (Objects.equals(entry.getValue(), "") || entry.getValue() == null) { String nulls = null; str.append('"').append(entry.getKey()).append('"').append(":").append(nulls).append(",");