From b1dc619e3394eb720091c78632ebb79b079704cf Mon Sep 17 00:00:00 2001 From: yinq Date: Mon, 20 Oct 2025 14:54:44 +0800 Subject: [PATCH] =?UTF-8?q?1.0.14=20=E5=90=88=E5=90=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oa/erp/domain/ErpContractInfo.java | 25 +++++- .../oa/erp/domain/bo/ErpContractInfoBo.java | 22 ++++- .../oa/erp/domain/vo/ErpContractInfoVo.java | 23 +++++- .../impl/ErpContractInfoServiceImpl.java | 6 +- .../mapper/oa/erp/ErpContractInfoMapper.xml | 80 ++++++++++--------- 5 files changed, 110 insertions(+), 46 deletions(-) diff --git a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/ErpContractInfo.java b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/ErpContractInfo.java index 90700129..82884eda 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/ErpContractInfo.java +++ b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/ErpContractInfo.java @@ -4,6 +4,8 @@ import org.dromara.common.tenant.core.TenantEntity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; @@ -73,7 +75,7 @@ public class ErpContractInfo extends TenantEntity { /** * 合同总价 */ - private Long totalPrice; + private BigDecimal totalPrice; /** * 甲方公司 @@ -163,7 +165,7 @@ public class ErpContractInfo extends TenantEntity { /** * 合同税率(预留) */ - private Long taxRate; + private BigDecimal taxRate; /** * 备注 @@ -186,4 +188,23 @@ public class ErpContractInfo extends TenantEntity { */ @TableField(exist = false) private List contractMaterialList; + + /** + * 甲方公司名称 + */ + @TableField(exist = false) + private String oneCustomerName; + + /** + * 乙方公司名称 + */ + @TableField(exist = false) + private String twoCustomerName; + + /** + * 部门名称 + */ + @TableField(exist = false) + private String deptName; + } diff --git a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/bo/ErpContractInfoBo.java b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/bo/ErpContractInfoBo.java index ad456559..58da769c 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/bo/ErpContractInfoBo.java +++ b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/bo/ErpContractInfoBo.java @@ -1,5 +1,6 @@ package org.dromara.oa.erp.domain.bo; +import com.baomidou.mybatisplus.annotation.TableField; import org.dromara.oa.erp.domain.ErpContractInfo; import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.common.core.validate.EditGroup; @@ -7,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; + +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -73,7 +76,7 @@ public class ErpContractInfoBo extends BaseEntity { /** * 合同总价 */ - private Long totalPrice; + private BigDecimal totalPrice; /** * 甲方公司 @@ -163,7 +166,7 @@ public class ErpContractInfoBo extends BaseEntity { /** * 合同税率(预留) */ - private Long taxRate; + private BigDecimal taxRate; /** * 备注 @@ -180,4 +183,19 @@ public class ErpContractInfoBo extends BaseEntity { */ private List contractMaterialList; + /** + * 甲方公司名称 + */ + private String oneCustomerName; + + /** + * 乙方公司名称 + */ + private String twoCustomerName; + + /** + * 部门名称 + */ + private String deptName; + } diff --git a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ErpContractInfoVo.java b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ErpContractInfoVo.java index f2ee7f49..8b04a589 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ErpContractInfoVo.java +++ b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ErpContractInfoVo.java @@ -1,5 +1,6 @@ package org.dromara.oa.erp.domain.vo; +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import org.dromara.oa.erp.domain.ErpContractInfo; @@ -93,7 +94,7 @@ public class ErpContractInfoVo implements Serializable { * 合同总价 */ @ExcelProperty(value = "合同总价") - private Long totalPrice; + private BigDecimal totalPrice; /** * 甲方公司 @@ -203,7 +204,7 @@ public class ErpContractInfoVo implements Serializable { * 合同税率(预留) */ @ExcelProperty(value = "合同税率(预留)") - private Long taxRate; + private BigDecimal taxRate; /** * 备注 @@ -222,4 +223,22 @@ public class ErpContractInfoVo implements Serializable { * 合同物料List */ private List contractMaterialList; + + /** + * 甲方公司名称 + */ + @ExcelProperty(value = "甲方公司名称") + private String oneCustomerName; + + /** + * 乙方公司名称 + */ + @ExcelProperty(value = "乙方公司名称") + private String twoCustomerName; + + /** + * 部门名称 + */ + private String deptName; + } diff --git a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java index f006421a..7e5bd7cb 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java +++ b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java @@ -60,7 +60,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService { @Override public TableDataInfo queryPageList(ErpContractInfoBo bo, PageQuery pageQuery) { MPJLambdaWrapper lqw = buildQueryWrapper(bo); - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + Page result = baseMapper.selectCustomErpContractInfoVoList(pageQuery.build(), lqw); return TableDataInfo.build(result); } @@ -73,7 +73,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService { @Override public List queryList(ErpContractInfoBo bo) { MPJLambdaWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); + return baseMapper.selectCustomErpContractInfoVoList(lqw); } private MPJLambdaWrapper buildQueryWrapper(ErpContractInfoBo bo) { @@ -159,7 +159,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService { * 保存前的数据校验 */ private void validEntityBeforeSave(ErpContractInfo entity) { - // 注释掉物料列表的强制校验,允许空物料列表 + // 物料列表的强制校验 // if (entity.getContractMaterialList() == null || entity.getContractMaterialList().isEmpty()) { // throw new ServiceException("请填写合同物料!"); // } diff --git a/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ErpContractInfoMapper.xml b/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ErpContractInfoMapper.xml index 98b7f813..2a7ad67d 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ErpContractInfoMapper.xml +++ b/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ErpContractInfoMapper.xml @@ -7,44 +7,50 @@