From a1af8711ef8385f6a05800eee9ed1f805f61af44 Mon Sep 17 00:00:00 2001 From: dfdg <2710245601@qq.com> Date: Fri, 24 Oct 2025 17:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0id=E8=BD=ACname=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XzdCsContractInformationService.java | 6 ++ .../core/service/XzdJsCgJungonService.java | 6 ++ .../service/XzdSupplierOpenBankService.java | 6 ++ .../translation/constant/TransConstant.java | 12 +++ .../impl/XzdCsContractInformationImpl.java | 26 +++++ .../core/impl/XzdJsCgJungonImpl.java | 23 ++++ .../XzdPurchaseContractInformationImpl.java | 2 +- .../core/impl/XzdSupplierOpenBankImpl.java | 23 ++++ ...ot.autoconfigure.AutoConfiguration.imports | 3 + .../domain/vo/XzdCsContractChangeVo.java | 9 ++ .../domain/vo/XzdCsContractInformationVo.java | 5 + .../domain/vo/XzdCsContractSuspendVo.java | 5 + .../impl/XzdCsContractChangeServiceImpl.java | 57 ---------- .../XzdCsContractInformationServiceImpl.java | 100 ++++-------------- .../impl/XzdCsContractSuspendServiceImpl.java | 40 +------ .../domain/XzdSfkCaigouFk.java | 4 + .../domain/XzdSfkZonhefuwuFk.java | 5 + .../domain/bo/XzdSfkCaigouFkBo.java | 5 + .../domain/bo/XzdSfkZonhefuwuFkBo.java | 5 + .../domain/vo/XzdSfkCaigouFkVo.java | 12 +++ .../domain/vo/XzdSfkZonhefuwuFkVo.java | 12 +++ .../impl/XzdSfkCaigouFkServiceImpl.java | 48 +-------- .../impl/XzdSfkZonhefuwuFkServiceImpl.java | 49 +-------- .../impl/XzdSupplierOpenBankServiceImpl.java | 20 +++- .../settlement/domain/XzdJsCgJungonEdit.java | 4 + .../domain/bo/XzdJsCgJungonEditBo.java | 5 + .../domain/vo/XzdJsCgJungonEditVo.java | 13 ++- .../settlement/domain/vo/XzdJsCgJungonVo.java | 11 ++ .../domain/vo/XzdJsZhfwJinduVo.java | 5 + .../impl/XzdJsCgJungonEditServiceImpl.java | 55 +--------- .../impl/XzdJsCgJungonServiceImpl.java | 89 ++++------------ .../impl/XzdJsZhfwJinduServiceImpl.java | 35 +----- 32 files changed, 269 insertions(+), 431 deletions(-) create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdCsContractInformationService.java create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdJsCgJungonService.java create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSupplierOpenBankService.java create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdCsContractInformationImpl.java create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJsCgJungonImpl.java create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSupplierOpenBankImpl.java diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdCsContractInformationService.java b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdCsContractInformationService.java new file mode 100644 index 00000000..88a62b68 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdCsContractInformationService.java @@ -0,0 +1,6 @@ +package org.dromara.common.core.service; + +public interface XzdCsContractInformationService { + + String selectNameByIds(String ids); +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdJsCgJungonService.java b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdJsCgJungonService.java new file mode 100644 index 00000000..e5422212 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdJsCgJungonService.java @@ -0,0 +1,6 @@ +package org.dromara.common.core.service; + +public interface XzdJsCgJungonService { + + String selectNameByIds(String ids); +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSupplierOpenBankService.java b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSupplierOpenBankService.java new file mode 100644 index 00000000..8fae45f3 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSupplierOpenBankService.java @@ -0,0 +1,6 @@ +package org.dromara.common.core.service; + +public interface XzdSupplierOpenBankService { + + String selectNameByIds(String ids); +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java index 8aa401da..d75d22b3 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java @@ -57,4 +57,16 @@ public interface TransConstant { * 采购合同id转名称 */ String XZD_PURCHASE_CONTRACT_ID_TO_NAME = "xzd_purchase_contract_id_to_name"; + /** + * 综合服务合同id转名称 + */ + String XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME = "xzd_cs_contract_information_id_to_name"; + /** + * 结算-采购合同竣工结算id转名称 + */ + String XZD_JS_CG_JUNGON_ID_TO_NAME = "xzd_js_cg_jungon_id_to_name"; + /** + * 新中大供应商信息-开户银行id转银行名称 + */ + String XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME = "xzd_supplier_open_bank_id_to_name"; } diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdCsContractInformationImpl.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdCsContractInformationImpl.java new file mode 100644 index 00000000..609718c3 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdCsContractInformationImpl.java @@ -0,0 +1,26 @@ +package org.dromara.common.translation.core.impl; + +import lombok.AllArgsConstructor; +import org.dromara.common.core.service.XzdCsContractInformationService; +import org.dromara.common.core.service.XzdPurchaseContractInformationService; +import org.dromara.common.translation.annotation.TranslationType; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.common.translation.core.TranslationInterface; + +@AllArgsConstructor +@TranslationType(type = TransConstant.XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME) +public class XzdCsContractInformationImpl implements TranslationInterface { + + private final XzdCsContractInformationService xzdCsContractInformationService; + + + @Override + public String translation(Object key, String other) { + if (key instanceof String ids) { + return xzdCsContractInformationService.selectNameByIds(ids); + } else if (key instanceof Long id) { + return xzdCsContractInformationService.selectNameByIds(id.toString()); + } + return null; + } +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJsCgJungonImpl.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJsCgJungonImpl.java new file mode 100644 index 00000000..566df951 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdJsCgJungonImpl.java @@ -0,0 +1,23 @@ +package org.dromara.common.translation.core.impl; + +import lombok.AllArgsConstructor; +import org.dromara.common.core.service.XzdJsCgJungonService; +import org.dromara.common.translation.annotation.TranslationType; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.common.translation.core.TranslationInterface; + +@AllArgsConstructor +@TranslationType(type = TransConstant.XZD_JS_CG_JUNGON_ID_TO_NAME) +public class XzdJsCgJungonImpl implements TranslationInterface { + + private final XzdJsCgJungonService xzdJsCgJungonService; + @Override + public String translation(Object key, String other) { + if (key instanceof String ids) { + return xzdJsCgJungonService.selectNameByIds(ids); + } else if (key instanceof Long id) { + return xzdJsCgJungonService.selectNameByIds(id.toString()); + } + return null; + } +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdPurchaseContractInformationImpl.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdPurchaseContractInformationImpl.java index 0852e183..a252a26b 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdPurchaseContractInformationImpl.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdPurchaseContractInformationImpl.java @@ -11,7 +11,7 @@ import org.dromara.common.translation.core.TranslationInterface; @TranslationType(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME) public class XzdPurchaseContractInformationImpl implements TranslationInterface { - private XzdPurchaseContractInformationService xzdCustomerinformationService; + private final XzdPurchaseContractInformationService xzdCustomerinformationService; @Override diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSupplierOpenBankImpl.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSupplierOpenBankImpl.java new file mode 100644 index 00000000..5e850660 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSupplierOpenBankImpl.java @@ -0,0 +1,23 @@ +package org.dromara.common.translation.core.impl; + +import lombok.AllArgsConstructor; +import org.dromara.common.core.service.XzdSupplierOpenBankService; +import org.dromara.common.translation.annotation.TranslationType; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.common.translation.core.TranslationInterface; + +@AllArgsConstructor +@TranslationType(type = TransConstant.XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME) +public class XzdSupplierOpenBankImpl implements TranslationInterface { + + private final XzdSupplierOpenBankService xzdSupplierOpenBankService; + @Override + public String translation(Object key, String other) { + if (key instanceof String ids) { + return xzdSupplierOpenBankService.selectNameByIds(ids); + } else if (key instanceof Long id) { + return xzdSupplierOpenBankService.selectNameByIds(id.toString()); + } + return null; + } +} diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index b2ba199e..1363b255 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -9,3 +9,6 @@ org.dromara.common.translation.core.impl.XzdCustomerinformationImpl org.dromara.common.translation.core.impl.XzdProjectImpl org.dromara.common.translation.core.impl.XzdPurchaseContractInformationImpl org.dromara.common.translation.core.impl.XzdSupplierInfoImpl +org.dromara.common.translation.core.impl.XzdJsCgJungonImpl +org.dromara.common.translation.core.impl.XzdCsContractInformationImpl +org.dromara.common.translation.core.impl.XzdSupplierOpenBankImpl diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java index 794c6816..103ce673 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractChangeVo.java @@ -4,6 +4,8 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.comprehensive.domain.XzdCsContractChange; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -91,6 +93,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "项目") private Long project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") private String projectName; /** @@ -104,6 +107,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "组织") private Long organization; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "organization") private String organizationName; /** @@ -111,6 +115,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "甲方单位") private Long partyA; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyA") private String partyAName; /** @@ -118,6 +123,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "乙方单位") private Long partyB; + @Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "partyB") private String partyBName; /** @@ -174,6 +180,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "变更后项目经理") private Long afterChangeProjectManager; + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "afterChangeProjectManager") private String afterChangeProjectManagerName; /** @@ -181,6 +188,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "变更后项目责任人") private Long afterChangeProjectLeader; + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "afterChangeProjectLeader") private String afterChangeProjectLeaderName; /** @@ -188,6 +196,7 @@ public class XzdCsContractChangeVo implements Serializable { */ @ExcelProperty(value = "变更后现场经理") private Long afterChangeSiteManager; + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "afterChangeSiteManager") private String afterChangeSiteManagerName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java index ed508751..c965fcd5 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractInformationVo.java @@ -73,6 +73,7 @@ public class XzdCsContractInformationVo implements Serializable { @ExcelProperty(value = "项目ID", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "关=联项目表") private Long projectId; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId") private String projectName; /** @@ -150,6 +151,7 @@ public class XzdCsContractInformationVo implements Serializable { */ @ExcelProperty(value = "开票单位") private Long invoiceIssuer; + @Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "invoiceIssuer") private String invoiceIssuerName; /** @@ -157,6 +159,7 @@ public class XzdCsContractInformationVo implements Serializable { */ @ExcelProperty(value = "收票单位") private Long invoiceReceiver; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "invoiceReceiver") private String invoiceReceiverName; /** @@ -207,6 +210,7 @@ public class XzdCsContractInformationVo implements Serializable { */ @ExcelProperty(value = "签约组织") private Long signOrganization; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "signOrganization") private String signOrganizationName; /** @@ -226,6 +230,7 @@ public class XzdCsContractInformationVo implements Serializable { */ @ExcelProperty(value = "项目责任人") private Long projectOwner; + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "projectOwner") private String projectOwnerName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java index 7455089b..f54ea719 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdCsContractSuspendVo.java @@ -4,6 +4,8 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.comprehensive.domain.XzdCsContractSuspend; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -80,6 +82,7 @@ public class XzdCsContractSuspendVo implements Serializable { */ @ExcelProperty(value = "工程项目") private Long project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") private String projectName; /** @@ -87,6 +90,7 @@ public class XzdCsContractSuspendVo implements Serializable { */ @ExcelProperty(value = "乙方单位") private Long artyBUnit; + @Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "artyBUnit") private String artyBUnitName; /** @@ -94,6 +98,7 @@ public class XzdCsContractSuspendVo implements Serializable { */ @ExcelProperty(value = "甲方单位") private Long partyAUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyAUnit") private String partyAUnitNamme; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java index bca2e4aa..b60ea715 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractChangeServiceImpl.java @@ -62,18 +62,6 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl queryPageList(XzdCsContractChangeBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -338,49 +324,6 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl 0; } - - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdCsContractChangeVo item) { - //项目名称 - if (item.getProject() != null){ - String projectName = xzdProjectService.queryNameById(item.getProject()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //签约组织(客户信息列表) - String dtoR = sysDeptService.selectDeptNameById(item.getOrganization()); - if (dtoR!=null){ - item.setOrganizationName(dtoR); - } - - //甲方单位(客户信息列表) - String byid = iXzdCorrespondentList.queryNameById(item.getPartyA()); - if (byid!=null){ - item.setPartyAName(byid); - } - //乙方单位(供应商信息列表) - String xzdSupplierInfoVo = xzdSupplierInfoService.queryNameById(item.getPartyB()); - if (xzdSupplierInfoVo != null){ - item.setPartyBName(xzdSupplierInfoVo); - } - String name1 = sysUserService.queryNameById(item.getAfterChangeSiteManager()); - if (name1 != null){ - item.setAfterChangeSiteManagerName(name1); - } - String name2 = sysUserService.queryNameById(item.getAfterChangeProjectLeader()); - if (name2 != null){ - item.setAfterChangeProjectLeaderName(name2); - } - String name3 = sysUserService.queryNameById(item.getAfterChangeProjectManager()); - if (name3 != null){ - item.setAfterChangeProjectManagerName(name3); - } - } - /** * 获取合同条款内容 * @param vo diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java index 11abfce1..b773f779 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractInformationServiceImpl.java @@ -1,11 +1,15 @@ package org.dromara.xzd.comprehensive.service.impl; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import io.github.linpeilie.annotations.AutoMapper; import org.dromara.common.core.domain.R; import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.service.XzdCsContractInformationService; import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.SpringUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.PageQuery; @@ -33,6 +37,7 @@ import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; import org.dromara.xzd.enums.XzdClassEnum; import org.dromara.xzd.service.IXzdCorrespondentList; import org.dromara.xzd.service.impl.*; +import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractInformationBo; @@ -52,7 +57,7 @@ import java.util.*; */ @RequiredArgsConstructor @Service -public class XzdCsContractInformationServiceImpl extends ServiceImpl implements IXzdCsContractInformationService { +public class XzdCsContractInformationServiceImpl extends ServiceImpl implements IXzdCsContractInformationService, XzdCsContractInformationService { private final XzdCsContractInformationMapper baseMapper; @@ -65,21 +70,9 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl queryPageList(XzdCsContractInformationBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - for (XzdCsContractInformationVo item : result.getRecords()) { - getName(item); - } return TableDataInfo.build(result); } - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdCsContractInformationVo item) { - //部门名称 - if (item.getDepartmentId() != null){ - String deptName = sysDeptService.selectDeptNameById(item.getDepartmentId()); - if (deptName != null){ - item.setDepartmentName(deptName); - } - } - //项目名称 - if (item.getProjectId() != null){ - String projectName = xzdProjectService.queryNameById(item.getProjectId()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //签约组织(客户信息列表) - - if (item.getSignOrganization() != null){ - String byid = sysDeptService.selectDeptNameById(item.getSignOrganization()); - if (byid!=null){ - item.setSignOrganizationName(byid); - } - } - //甲方单位(客户信息列表) - if (item.getPartyA() != null){ - String byid = iXzdCorrespondentList.queryNameById(item.getPartyA()); - if (byid!=null){ - item.setPartyAName(byid); - } - } - //乙方单位(供应商信息列表) - if (item.getPartyB() != null){ - String unitName = xzdSupplierInfoService.queryNameById(item.getPartyB()); - if (unitName != null){ - - item.setPartyBName(unitName); - } - } - //开票单位名称(供应商名称) - if (item.getInvoiceIssuer() != null){ - String unitName = xzdSupplierInfoService.queryNameById(item.getInvoiceIssuer()); - if (unitName != null){ - item.setInvoiceIssuerName(unitName); - } - } - //收票单位名称(客户名称) - if (item.getInvoiceReceiver()!= null){ - String byid = iXzdCorrespondentList.queryNameById(item.getInvoiceReceiver()); - if (byid!=null){ - item.setInvoiceReceiverName(byid); - } - } - //项目负责人 - if (item.getProjectOwner() != null){ - String s = sysUserService.queryNameById(item.getProjectOwner()); - if (s!=null){ - item.setProjectOwnerName(s); - } - } - } - /** * 查询符合条件的综合服务合同信息列表 * @@ -446,4 +370,16 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl list = new ArrayList<>(); + for (Long id : StringUtils.splitTo(ids, Convert::toLong)) { + XzdCsContractInformationVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id); + if (ObjectUtil.isNotNull(vo)) { + list.add(vo.getContractCode()); + } + } + return String.join(StringUtils.SEPARATOR, list); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java index 0d8b7454..e3fdce08 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdCsContractSuspendServiceImpl.java @@ -45,15 +45,6 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl queryPageList(XzdCsContractSuspendBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -186,28 +172,4 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl 0; } - - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdCsContractSuspendVo item) { - //项目名称 - if (item.getProject() != null){ - String projectName = xzdProjectService.queryNameById(item.getProject()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //甲方单位(客户信息列表) - String byid = iXzdCorrespondentList.queryNameById(item.getPartyAUnit()); - if (byid!=null){ - item.setPartyAUnitNamme(byid); - } - //乙方单位(供应商信息列表) - String xzdSupplierInfoVo = xzdSupplierInfoService.queryNameById(item.getArtyBUnit()); - if (xzdSupplierInfoVo != null){ - item.setArtyBUnitName(xzdSupplierInfoVo); - } - } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkCaigouFk.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkCaigouFk.java index 50698234..642563cd 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkCaigouFk.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkCaigouFk.java @@ -28,6 +28,10 @@ public class XzdSfkCaigouFk extends BaseEntity { */ @TableId(value = "id") private Long id; + /** + * 部门id + */ + private Long deptId; /** * 单据编码(带*,必填) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkZonhefuwuFk.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkZonhefuwuFk.java index 7ef686c4..9fc94ffe 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkZonhefuwuFk.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkZonhefuwuFk.java @@ -29,6 +29,11 @@ public class XzdSfkZonhefuwuFk extends BaseEntity { @TableId(value = "id") private Long id; + /** + * 部门id + */ + private Long deptId; + /** * 单据编码(带*,必填) */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkCaigouFkBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkCaigouFkBo.java index 03b2ca70..781223c3 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkCaigouFkBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkCaigouFkBo.java @@ -32,6 +32,11 @@ public class XzdSfkCaigouFkBo extends BaseEntity { @NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class }) private Long id; + /** + * 部门id + */ + private Long deptId; + /** * 单据编码(带*,必填) */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkZonhefuwuFkBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkZonhefuwuFkBo.java index b759ff1c..4b3858b3 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkZonhefuwuFkBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkZonhefuwuFkBo.java @@ -31,6 +31,11 @@ public class XzdSfkZonhefuwuFkBo extends BaseEntity { @NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class }) private Long id; + /** + * 部门id + */ + private Long deptId; + /** * 单据编码(带*,必填) */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkCaigouFkVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkCaigouFkVo.java index e12b5c17..f28fd5f3 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkCaigouFkVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkCaigouFkVo.java @@ -3,6 +3,8 @@ package org.dromara.xzd.paymentsReceipts.domain.vo; import java.math.BigDecimal; import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkCaigouFk; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -40,6 +42,11 @@ public class XzdSfkCaigouFkVo extends BaseEntity { @ExcelProperty(value = "主键ID,自增") private Long id; + /** + * 部门id + */ + private Long deptId; + /** * 单据编码(带*,必填) */ @@ -67,6 +74,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity { @ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,必填") private Long contractCode; + @Translation(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME, mapper = "contractCode") private String contractCodeName; /** @@ -99,6 +107,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity { */ @ExcelProperty(value = "项目") private Long project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") private String projectName; /** @@ -106,6 +115,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity { */ @ExcelProperty(value = "付款单位") private Long paymentUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "paymentUnit") private String paymentUnitName; /** @@ -114,6 +124,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity { @ExcelProperty(value = "收款单位", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,必填") private Long receiptUnit; + @Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "receiptUnit") private String receiptUnitName; /** @@ -121,6 +132,7 @@ public class XzdSfkCaigouFkVo extends BaseEntity { */ @ExcelProperty(value = "收款银行") private Long receiptBank; + @Translation(type = TransConstant.XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME, mapper = "receiptBank") private String receiptBankName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java index cb161b7f..8709aa08 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java @@ -3,6 +3,8 @@ package org.dromara.xzd.paymentsReceipts.domain.vo; import java.math.BigDecimal; import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkZonhefuwuFk; @@ -40,6 +42,11 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity { @ExcelProperty(value = "主键ID,自增") private Long id; + /** + * 部门id + */ + private Long deptId; + /** * 单据编码(带*,必填) */ @@ -67,6 +74,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity { @ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,必填") private Long contractCode; + @Translation(type = TransConstant.XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME, mapper = "contractCode") private String contractCodeName; /** @@ -99,6 +107,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity { */ @ExcelProperty(value = "项目") private Long project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") private String projectName; /** @@ -106,6 +115,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity { */ @ExcelProperty(value = "付款单位") private Long paymentUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "paymentUnit") private String paymentUnitName; /** @@ -114,6 +124,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity { @ExcelProperty(value = "收款单位", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,必填") private Long receiptUnit; + @Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "receiptUnit") private String receiptUnitName; /** @@ -121,6 +132,7 @@ public class XzdSfkZonhefuwuFkVo extends BaseEntity { */ @ExcelProperty(value = "收款银行") private Long receiptBank; + @Translation(type = TransConstant.XZD_SUPPLIER_OPEN_BANK_ID_TO_NAME, mapper = "receiptBank") private String receiptBankName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkCaigouFkServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkCaigouFkServiceImpl.java index c829111f..c526ddb1 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkCaigouFkServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkCaigouFkServiceImpl.java @@ -73,7 +73,6 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl queryPageList(XzdSfkCaigouFkBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -102,9 +100,7 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl queryList(XzdSfkCaigouFkBo bo) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); - List vos = baseMapper.selectVoList(lqw); - vos.forEach(this::getName); - return vos; + return baseMapper.selectVoList(lqw); } private LambdaQueryWrapper buildQueryWrapper(XzdSfkCaigouFkBo bo) { @@ -113,6 +109,7 @@ public class XzdSfkCaigouFkServiceImpl extends ServiceImpl 0; } - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdSfkCaigouFkVo item) { - //项目名称 - if (item.getProject() != null){ - String projectName = xzdProjectService.queryNameById(item.getProject()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //合同编码 - if (item.getContractCode() != null){ - String code = purchaseContractInformationService.queryCodeById(item.getContractCode()); - if (code != null){ - item.setContractCodeName(code); - } - } - //收款单位(供应商名称) - if (item.getReceiptUnit() != null){ - String unitName = xzdSupplierInfoService.queryNameById(item.getReceiptUnit()); - if (unitName != null){ - item.setReceiptUnitName(unitName); - } - } - //付款单位(客户名称) - if (item.getPaymentUnit()!= null){ - String byid = iXzdCorrespondentList.queryNameById(item.getPaymentUnit()); - if (byid!=null){ - item.setPaymentUnitName(byid); - } - } - //收款银行 - if (item.getReceiptBank() != null){ - String bankName = supplierOpenBankService.queryNameById(item.getReceiptBank()); - if (bankName != null){ - item.setReceiptBankName(bankName); - } - } - } /** * 获取子项 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkZonhefuwuFkServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkZonhefuwuFkServiceImpl.java index fba8b29f..398c61aa 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkZonhefuwuFkServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkZonhefuwuFkServiceImpl.java @@ -72,7 +72,6 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl queryPageList(XzdSfkZonhefuwuFkBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -101,9 +99,7 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl queryList(XzdSfkZonhefuwuFkBo bo) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); - List vos = baseMapper.selectVoList(lqw); - vos.forEach(this::getName); - return vos; + return baseMapper.selectVoList(lqw); } private LambdaQueryWrapper buildQueryWrapper(XzdSfkZonhefuwuFkBo bo) { @@ -112,6 +108,7 @@ public class XzdSfkZonhefuwuFkServiceImpl extends ServiceImpl 0; } - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdSfkZonhefuwuFkVo item) { - //项目名称 - if (item.getProject() != null){ - String projectName = xzdProjectService.queryNameById(item.getProject()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //合同编码 - if (item.getContractCode() != null){ - String code = csContractInformationService.queryCodeById(item.getContractCode()); - if (code != null){ - item.setContractCodeName(code); - } - } - //收款单位(供应商名称) - if (item.getReceiptUnit() != null){ - String unitName = xzdSupplierInfoService.queryNameById(item.getReceiptUnit()); - if (unitName != null){ - item.setReceiptUnitName(unitName); - } - } - //付款单位(客户名称) - if (item.getPaymentUnit()!= null){ - String byid = iXzdCorrespondentList.queryNameById(item.getPaymentUnit()); - if (byid!=null){ - item.setPaymentUnitName(byid); - } - } - //收款银行 - if (item.getReceiptBank() != null){ - String bankName = supplierOpenBankService.queryNameById(item.getReceiptBank()); - if (bankName != null){ - item.setReceiptBankName(bankName); - } - } - } - /** * 获取子项 * @param vo diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierOpenBankServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierOpenBankServiceImpl.java index cbdbadc0..6958cf53 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierOpenBankServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierOpenBankServiceImpl.java @@ -1,8 +1,12 @@ package org.dromara.xzd.service.impl; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.dromara.common.core.domain.R; +import org.dromara.common.core.service.XzdSupplierOpenBankService; import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.SpringUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.PageQuery; @@ -10,6 +14,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo; import org.springframework.stereotype.Service; import org.dromara.xzd.domain.bo.XzdSupplierOpenBankBo; import org.dromara.xzd.domain.vo.XzdSupplierOpenBankVo; @@ -17,6 +22,7 @@ import org.dromara.xzd.domain.XzdSupplierOpenBank; import org.dromara.xzd.mapper.XzdSupplierOpenBankMapper; import org.dromara.xzd.service.IXzdSupplierOpenBankService; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Collection; @@ -29,7 +35,7 @@ import java.util.Collection; */ @RequiredArgsConstructor @Service -public class XzdSupplierOpenBankServiceImpl extends ServiceImpl implements IXzdSupplierOpenBankService { +public class XzdSupplierOpenBankServiceImpl extends ServiceImpl implements IXzdSupplierOpenBankService, XzdSupplierOpenBankService { private final XzdSupplierOpenBankMapper baseMapper; @@ -152,4 +158,16 @@ public class XzdSupplierOpenBankServiceImpl extends ServiceImpl list = new ArrayList<>(); + for (Long id : StringUtils.splitTo(ids, Convert::toLong)) { + XzdSupplierOpenBankVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id); + if (ObjectUtil.isNotNull(vo)) { + list.add(vo.getOpenBank()); + } + } + return String.join(StringUtils.SEPARATOR, list); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java index b6bd7dd9..db7ba4d0 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsCgJungonEdit.java @@ -68,6 +68,10 @@ public class XzdJsCgJungonEdit extends BaseEntity { * 调整后决算金额(带*,必填) */ private BigDecimal adjustedFinalAmount; + /** + * 决算金额 + */ + private BigDecimal finalAmount; /** * 工程项目(带*,必填) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java index a51e02d0..38a485fc 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsCgJungonEditBo.java @@ -76,6 +76,11 @@ public class XzdJsCgJungonEditBo extends BaseEntity { @NotNull(message = "调整后决算金额(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) private BigDecimal adjustedFinalAmount; + /** + * 决算金额 + */ + private BigDecimal finalAmount; + /** * 工程项目(带*,必填) */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java index caf24de2..557cf45f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonEditVo.java @@ -1,6 +1,9 @@ package org.dromara.xzd.settlement.domain.vo; import java.math.BigDecimal; + +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.settlement.domain.XzdJsCgJungonEdit; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -68,8 +71,8 @@ public class XzdJsCgJungonEditVo implements Serializable { * 决算单号(带*,必填) */ @ExcelProperty(value = "决算单号", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "带=*,必填") private Long finalAccountCode; + @Translation(type = TransConstant.XZD_JS_CG_JUNGON_ID_TO_NAME, mapper = "finalAccountCode") private String finalAccountCodeName; @@ -84,6 +87,7 @@ public class XzdJsCgJungonEditVo implements Serializable { */ @ExcelProperty(value = "合同编号") private Long contractCode; + @Translation(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME, mapper = "contractCode") private String contractCodeName; @@ -94,12 +98,18 @@ public class XzdJsCgJungonEditVo implements Serializable { @ExcelDictFormat(readConverterExp = "带=*,必填") private BigDecimal adjustedFinalAmount; + /** + * 决算金额 + */ + private BigDecimal finalAmount; + /** * 工程项目(带*,必填) */ @ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,必填") private Long projectId; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId") private String projectName; /** @@ -107,6 +117,7 @@ public class XzdJsCgJungonEditVo implements Serializable { */ @ExcelProperty(value = "默认财务组织") private Long defaultFinanceOrg; + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "defaultFinanceOrg") private String defaultFinanceOrgName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java index b490f420..e9d449de 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsCgJungonVo.java @@ -1,6 +1,9 @@ package org.dromara.xzd.settlement.domain.vo; import java.math.BigDecimal; + +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.settlement.domain.XzdJsCgJungon; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -70,6 +73,7 @@ public class XzdJsCgJungonVo implements Serializable { @ExcelProperty(value = "合同编号", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,关联合同表") private Long contractCode; + @Translation(type = TransConstant.XZD_PURCHASE_CONTRACT_ID_TO_NAME, mapper = "contractCode") private String contractCodeName; /** @@ -115,6 +119,7 @@ public class XzdJsCgJungonVo implements Serializable { @ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=*,关联项目表") private Long projectId; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId") private String projectName; /** @@ -129,6 +134,7 @@ public class XzdJsCgJungonVo implements Serializable { */ @ExcelProperty(value = "甲方单位") private Long partyA; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyA") private String partyAName; /** @@ -136,6 +142,7 @@ public class XzdJsCgJungonVo implements Serializable { */ @ExcelProperty(value = "乙方单位") private Long partyB; + @Translation(type = TransConstant.XZD_GYSXX_ID_TO_NAME, mapper = "partyB") private String partyBName; /** @@ -156,6 +163,7 @@ public class XzdJsCgJungonVo implements Serializable { @ExcelProperty(value = "业主单位", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") private Long ownerUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "ownerUnit") private String ownerUnitName; /** @@ -164,6 +172,7 @@ public class XzdJsCgJungonVo implements Serializable { @ExcelProperty(value = "监理单位", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") private Long supervisionUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "supervisionUnit") private String supervisionUnitName; /** @@ -172,6 +181,7 @@ public class XzdJsCgJungonVo implements Serializable { @ExcelProperty(value = "施工单位", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") private Long constructionUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "constructionUnit") private String constructionUnitName; /** @@ -180,6 +190,7 @@ public class XzdJsCgJungonVo implements Serializable { @ExcelProperty(value = "审核单位", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") private Long auditUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "auditUnit") private String auditUnitName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java index 84b31b14..f767c4c8 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsZhfwJinduVo.java @@ -2,6 +2,8 @@ package org.dromara.xzd.settlement.domain.vo; import java.math.BigDecimal; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.settlement.domain.XzdAlterationInventory; import org.dromara.xzd.settlement.domain.XzdContractInventory; import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; @@ -71,6 +73,7 @@ public class XzdJsZhfwJinduVo implements Serializable { */ @ExcelProperty(value = "合同编码") private Long contractCode; + @Translation(type = TransConstant.XZD_CS_CONTRACT_INFORMATION_ID_TO_NAME, mapper = "contractCode") private String contractCodeCode; /** @@ -108,6 +111,7 @@ public class XzdJsZhfwJinduVo implements Serializable { */ @ExcelProperty(value = "项目") private Long project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") private String projectName; /** @@ -115,6 +119,7 @@ public class XzdJsZhfwJinduVo implements Serializable { */ @ExcelProperty(value = "结算单位") private Long settlementUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "settlementUnit") private String settlementUnitName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java index 5b3abab8..f8d04633 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonEditServiceImpl.java @@ -44,26 +44,12 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl queryPageList(XzdJsCgJungonEditBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -105,9 +89,7 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl queryList(XzdJsCgJungonEditBo bo) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); - List vos = baseMapper.selectVoList(lqw); - vos.forEach(this::getName); - return vos; + return baseMapper.selectVoList(lqw); } private LambdaQueryWrapper buildQueryWrapper(XzdJsCgJungonEditBo bo) { @@ -238,41 +220,6 @@ public class XzdJsCgJungonEditServiceImpl extends ServiceImpl 0; } - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdJsCgJungonEditVo item) { - //项目名称 - if (item.getProjectId() != null){ - String projectName = xzdProjectService.queryNameById(item.getProjectId()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //决算单据名称 - if (item.getFinalAccountCode() != null){ - String codeName = jungonService.queryNameById(item.getFinalAccountCode()); - if (codeName != null){ - item.setFinalAccountCodeName(codeName); - } - } - //合同编码 - if (item.getContractCode() != null){ - String code = xzdPurchaseContractInformationService.queryCodeById(item.getContractCode()); - if (code != null){ - item.setContractCodeName(code); - } - } - //部门名称 - if (item.getDefaultFinanceOrg() != null){ - String deptName = sysDeptService.selectDeptNameById(item.getDefaultFinanceOrg()); - if (deptName != null){ - item.setDefaultFinanceOrgName(deptName); - } - } - } - /** * 获取扣款与奖励项 * @param vo diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java index dd91ea71..f732fb43 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsCgJungonServiceImpl.java @@ -1,8 +1,12 @@ package org.dromara.xzd.settlement.service.impl; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.service.XzdJsCgJungonService; import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.SpringUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.PageQuery; @@ -13,6 +17,7 @@ import lombok.RequiredArgsConstructor; import org.dromara.common.utils.BatchNumberGenerator; import org.dromara.system.service.impl.SysOssServiceImpl; import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService; +import org.dromara.xzd.domain.vo.XzdProjectVo; import org.dromara.xzd.enums.XzdClassEnum; import org.dromara.xzd.enums.ZxdEnum; import org.dromara.xzd.service.IXzdCorrespondentList; @@ -42,7 +47,7 @@ import java.util.*; */ @RequiredArgsConstructor @Service -public class XzdJsCgJungonServiceImpl extends ServiceImpl implements IXzdJsCgJungonService { +public class XzdJsCgJungonServiceImpl extends ServiceImpl implements IXzdJsCgJungonService, XzdJsCgJungonService { private final XzdJsCgJungonMapper baseMapper; @@ -75,7 +80,7 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl queryPageList(XzdJsCgJungonBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -104,9 +108,7 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl queryList(XzdJsCgJungonBo bo) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); - List vos = baseMapper.selectVoList(lqw); - vos.forEach(this::getName); - return vos; + return baseMapper.selectVoList(lqw); } private LambdaQueryWrapper buildQueryWrapper(XzdJsCgJungonBo bo) { @@ -254,69 +256,6 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl list = new ArrayList<>(); + for (Long id : StringUtils.splitTo(ids, Convert::toLong)) { + XzdJsCgJungonVo vo = SpringUtils.getAopProxy(this).getBaseMapper().selectVoById(id); + if (ObjectUtil.isNotNull(vo)) { + list.add(vo.getDocCode()); + } + } + return String.join(StringUtils.SEPARATOR, list); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java index 5cf62985..956925c6 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsZhfwJinduServiceImpl.java @@ -82,7 +82,6 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl queryPageList(XzdJsZhfwJinduBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - result.getRecords().forEach(this::getName); return TableDataInfo.build(result); } @@ -111,9 +109,7 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl queryList(XzdJsZhfwJinduBo bo) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); - List vos = baseMapper.selectVoList(lqw); - vos.forEach(this::getName); - return vos; + return baseMapper.selectVoList(lqw); } private LambdaQueryWrapper buildQueryWrapper(XzdJsZhfwJinduBo bo) { @@ -282,35 +278,6 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl 0; } - - /** - * 获取部分字段名称 - * @param item - */ - private void getName(XzdJsZhfwJinduVo item) { - //项目名称 - if (item.getProject() != null){ - String projectName = xzdProjectService.queryNameById(item.getProject()); - if (projectName != null){ - item.setProjectName(projectName); - } - } - //合同编码 - if (item.getContractCode() != null){ - String code = csContractInformationService.queryCodeById(item.getContractCode()); - if (code != null){ - item.setContractCodeCode(code); - } - } - //结算单位(客户信息列表) - if (item.getSettlementUnit() != null){ - String byid = iXzdCorrespondentList.queryNameById(item.getSettlementUnit()); - if (byid!=null){ - item.setSettlementUnitName(byid); - } - } - } - /** * 获取扣款与奖励项 * @param vo