From d5f1c22bd46ecdd4f87082aa06041d3ee05ce79a Mon Sep 17 00:00:00 2001 From: dfdg <2710245601@qq.com> Date: Fri, 21 Nov 2025 20:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=90=88=E5=90=8C=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E7=BB=93=E7=AE=97=E3=80=81=E8=AE=BE=E8=AE=A1=E5=90=88?= =?UTF-8?q?=E5=90=8C=E7=AB=A3=E5=B7=A5=E7=BB=93=E7=AE=97=E3=80=81=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=90=88=E5=90=8C=E4=BB=98=E6=AC=BE=E3=80=81=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=90=88=E5=90=8C=E6=94=B6=E6=AC=BE=E7=9A=84=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=81=E4=BF=AE=E6=94=B9=E3=80=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/XzdSjContractInfoService.java | 6 + .../translation/constant/TransConstant.java | 5 + .../core/impl/XzdSjContractInfoImpl.java | 24 ++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + .../domain/XzdSjContractSuspend.java | 2 +- .../domain/bo/XzdSjContractSuspendBo.java | 2 +- .../domain/vo/XzdSjContractChangeVo.java | 2 + .../domain/vo/XzdSjContractInfoVo.java | 2 +- .../domain/vo/XzdSjContractSuspendVo.java | 4 +- .../impl/XzdSjContractChangeServiceImpl.java | 4 +- .../impl/XzdSjContractInfoServiceImpl.java | 19 +- .../controller/XzdSupplierInfoController.java | 16 - .../xzd/domain/bo/XzdSettlementInfoBo.java | 3 +- .../xzd/domain/vo/XzdSettlementInfoVo.java | 3 +- .../org/dromara/xzd/enums/XzdClassEnum.java | 2 + .../java/org/dromara/xzd/enums/ZxdEnum.java | 1 + .../controller/XzdSfkShejiFkController.java | 105 ++++++ .../controller/XzdSfkShejiSkController.java | 105 ++++++ .../domain/XzdSfkShejiFk.java | 233 ++++++++++++ .../domain/XzdSfkShejiSk.java | 188 +++++++++ .../domain/bo/XzdSfkShejiFkBo.java | 248 ++++++++++++ .../domain/bo/XzdSfkShejiSkBo.java | 198 ++++++++++ .../domain/vo/XzdSfkShejiFkVo.java | 311 +++++++++++++++ .../domain/vo/XzdSfkShejiSkVo.java | 257 +++++++++++++ .../mapper/XzdSfkShejiFkMapper.java | 15 + .../mapper/XzdSfkShejiSkMapper.java | 15 + .../service/IXzdSfkShejiFkService.java | 70 ++++ .../service/IXzdSfkShejiSkService.java | 70 ++++ .../impl/XzdSfkShejiFkServiceImpl.java | 304 +++++++++++++++ .../impl/XzdSfkShejiSkServiceImpl.java | 293 ++++++++++++++ .../xzd/publicUrl/XzdPublicUrlConreoller.java | 15 + .../service/impl/XzdCorrespondentListImp.java | 103 ++--- .../controller/XzdJsSjJinduController.java | 154 ++++++++ .../controller/XzdJsSjJungonController.java | 150 ++++++++ .../controller/XzdJsZhfwJinduController.java | 2 +- .../xzd/settlement/domain/XzdJsSjJindu.java | 173 +++++++++ .../xzd/settlement/domain/XzdJsSjJungon.java | 148 ++++++++ .../settlement/domain/bo/XzdJsSjJinduBo.java | 203 ++++++++++ .../settlement/domain/bo/XzdJsSjJungonBo.java | 164 ++++++++ .../settlement/domain/vo/XzdJsSjJinduVo.java | 265 +++++++++++++ .../settlement/domain/vo/XzdJsSjJungonVo.java | 218 +++++++++++ .../settlement/mapper/XzdJsSjJinduMapper.java | 15 + .../mapper/XzdJsSjJungonMapper.java | 15 + .../service/IXzdJsSjJinduService.java | 70 ++++ .../service/IXzdJsSjJungonService.java | 70 ++++ .../impl/XzdJsCgJungonServiceImpl.java | 5 +- .../service/impl/XzdJsSjJinduServiceImpl.java | 357 ++++++++++++++++++ .../impl/XzdJsSjJungonServiceImpl.java | 311 +++++++++++++++ .../impl/XzdJsZhfwJinduServiceImpl.java | 4 +- .../paymentsReceipts/XzdSfkShejiFkMapper.xml | 7 + .../paymentsReceipts/XzdSfkShejiSkMapper.xml | 7 + .../xzd/settlement/XzdJsSjJinduMapper.xml | 7 + .../xzd/settlement/XzdJsSjJungonMapper.xml | 7 + 53 files changed, 4900 insertions(+), 78 deletions(-) create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSjContractInfoService.java create mode 100644 xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSjContractInfoImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiFkController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiSkController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiFk.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiSk.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiFkBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiSkBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiFkVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiSkVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiFkMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiSkMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiFkService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiSkService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiFkServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiSkServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJinduController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJungonController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJindu.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJungon.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJinduBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJungonBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJinduVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJungonVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJinduMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJungonMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJinduService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJungonService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsSjJinduServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsSjJungonServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/paymentsReceipts/XzdSfkShejiFkMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/paymentsReceipts/XzdSfkShejiSkMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJinduMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJungonMapper.xml diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSjContractInfoService.java b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSjContractInfoService.java new file mode 100644 index 00000000..8935e1c5 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/service/XzdSjContractInfoService.java @@ -0,0 +1,6 @@ +package org.dromara.common.core.service; + +public interface XzdSjContractInfoService { + + 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 5a414a17..7e203149 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 @@ -82,5 +82,10 @@ public interface TransConstant { */ String XZD_CBYS_ZJHCB_ID_TO_NAME = "xzd_cbys_zjhcb_id_to_name"; + /** + * 新中大-设计合同信息id转name + */ + String XZD_SJ_CONTRACT_INFO_ID_TO_NAME = "xzd_sj_contract_info_id_to_name"; + } diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSjContractInfoImpl.java b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSjContractInfoImpl.java new file mode 100644 index 00000000..1fa42df6 --- /dev/null +++ b/xinnengyuan/ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/XzdSjContractInfoImpl.java @@ -0,0 +1,24 @@ +package org.dromara.common.translation.core.impl; + +import lombok.AllArgsConstructor; +import org.dromara.common.core.service.XzdSjContractInfoService; +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_SJ_CONTRACT_INFO_ID_TO_NAME) +public class XzdSjContractInfoImpl implements TranslationInterface { + + private final XzdSjContractInfoService xzdSjContractInfoService; + @Override + public String translation(Object key, String other) { + if (key instanceof String ids) { + return xzdSjContractInfoService.selectNameByIds(ids); + } else if (key instanceof Long id) { + return xzdSjContractInfoService.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 432b0264..815441ff 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 @@ -14,3 +14,4 @@ org.dromara.common.translation.core.impl.XzdSupplierOpenBankImpl org.dromara.common.translation.core.impl.XzdProjectManagerApprovalImpl org.dromara.common.translation.core.impl.XzdCbysZjhcbImpl org.dromara.common.translation.core.impl.XzdJXHTTranslation +org.dromara.common.translation.core.impl.XzdSjContractInfoImpl diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdSjContractSuspend.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdSjContractSuspend.java index 5c4150af..c7c099e9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdSjContractSuspend.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/XzdSjContractSuspend.java @@ -92,7 +92,7 @@ public class XzdSjContractSuspend extends BaseEntity { /** * 累计结算金额 */ - private Long cumulativeSettlementAmount; + private BigDecimal cumulativeSettlementAmount; /** * 部门id diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdSjContractSuspendBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdSjContractSuspendBo.java index 0e5192bf..35656d74 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdSjContractSuspendBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/bo/XzdSjContractSuspendBo.java @@ -101,7 +101,7 @@ public class XzdSjContractSuspendBo extends BaseEntity { /** * 累计结算金额 */ - private Long cumulativeSettlementAmount; + private BigDecimal cumulativeSettlementAmount; /** * 部门id diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractChangeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractChangeVo.java index 6b34e92c..d5f2f45e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractChangeVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractChangeVo.java @@ -68,6 +68,8 @@ public class XzdSjContractChangeVo implements Serializable { @ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "关=联合同表") private Long contractCode; + @Translation(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME, mapper = "contractCode") + private String contractCodeName; /** * 合同名称 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractInfoVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractInfoVo.java index eb114c72..044643c4 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractInfoVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractInfoVo.java @@ -218,7 +218,7 @@ public class XzdSjContractInfoVo implements Serializable { @ExcelProperty(value = "签约组织") private Long signOrganization; - @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "signOrganization") + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "signOrganization") private String signOrganizationName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractSuspendVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractSuspendVo.java index 16aa2cf9..e55f092b 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractSuspendVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/domain/vo/XzdSjContractSuspendVo.java @@ -43,6 +43,8 @@ public class XzdSjContractSuspendVo implements Serializable { @ExcelProperty(value = "采购合同信息ID", converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "合=同编码") private Long contractInformationId; + @Translation(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME, mapper = "contractInformationId") + private String contractInformationName; /** * 单据编码 @@ -120,7 +122,7 @@ public class XzdSjContractSuspendVo implements Serializable { * 累计结算金额 */ @ExcelProperty(value = "累计结算金额") - private Long cumulativeSettlementAmount; + private BigDecimal cumulativeSettlementAmount; /** * 部门id diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdSjContractChangeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdSjContractChangeServiceImpl.java index af61ce99..8ffd5955 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdSjContractChangeServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/comprehensive/service/impl/XzdSjContractChangeServiceImpl.java @@ -79,7 +79,9 @@ public class XzdSjContractChangeServiceImpl extends ServiceImpl implements IXzdSjContractInfoService { +public class XzdSjContractInfoServiceImpl extends ServiceImpl implements IXzdSjContractInfoService, XzdSjContractInfoService { private final XzdSjContractInfoMapper baseMapper; @@ -471,4 +476,16 @@ public class XzdSjContractInfoServiceImpl extends ServiceImpl list = new ArrayList<>(); + for (Long id : StringUtils.splitTo(ids, Convert::toLong)) { + XzdSjContractInfoVo 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/controller/XzdSupplierInfoController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdSupplierInfoController.java index 147d30fb..4b0990ba 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdSupplierInfoController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdSupplierInfoController.java @@ -162,22 +162,6 @@ public class XzdSupplierInfoController extends BaseController { return xzdSupplierOpenBankService.queryPageList(bo, pageQuery); } - /** - * 查询供应商信息-开户银行列表 - */ - @SaCheckPermission(value = {"yhzjb:supplierInfo:add","yhzjb:supplierInfo:edit","yhzjb:supplierInfo:list"},mode = SaMode.OR) - @GetMapping("/getOpenBankList") - public R> getOpenBankList(XzdSupplierOpenBankBo bo) { - return R.ok(xzdSupplierOpenBankService.getOpenBankList(bo)); - } - /** - * 查询区域列表 - */ - @SaCheckPermission(value = {"yhzjb:supplierInfo:add","yhzjb:supplierInfo:edit","yhzjb:supplierInfo:list"},mode = SaMode.OR) - @GetMapping("/getPoiAreaList") - public R> getPoiAreaList() { - return R.ok(xzdSupplierOpenBankService.getPoiAreaList()); - } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSettlementInfoBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSettlementInfoBo.java index a477d616..05987f14 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSettlementInfoBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSettlementInfoBo.java @@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode; import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.xzd.domain.XzdSettlementInfo; import org.dromara.xzd.domain.XzdSupplierOpenBank; +import org.dromara.xzd.domain.XzdYhxx; import java.math.BigDecimal; import java.util.List; @@ -144,7 +145,7 @@ public class XzdSettlementInfoBo extends BaseEntity { /** * 开户银行信息 */ - private List openBanks; + private List openBanks; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSettlementInfoVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSettlementInfoVo.java index 44ff2f81..2be684f9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSettlementInfoVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSettlementInfoVo.java @@ -10,6 +10,7 @@ import org.dromara.common.translation.annotation.Translation; import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.domain.XzdSettlementInfo; import org.dromara.xzd.domain.XzdSupplierOpenBank; +import org.dromara.xzd.domain.XzdYhxx; import java.io.Serial; import java.io.Serializable; @@ -187,6 +188,6 @@ public class XzdSettlementInfoVo implements Serializable { /** * 开户银行信息 */ - private List openBanks; + private List openBanks; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java index efb6c500..2b845212 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/XzdClassEnum.java @@ -11,6 +11,8 @@ public enum XzdClassEnum { CS_CONTRACT_CHANGE("xzd_cs_contract_change"), //综合服务合同变更 SJ_CONTRACT_INFO("xzd_sj_contract_info"), //设计合同信息 SJ_CONTRACT_CHANGE("xzd_sj_contract_change"), //设计合同变更 + XZD_JS_SJ_JINDU("xzd_js_sj_jindu"), //设计合同进度结算 + XZD_JS_SJ_JUNGON("xzd_js_sj_jungon"), //设计合同竣工结算 JS_ZHFW_JINDU("xzd_js_zhfw_jindu"), //综合服务合同进度结算 JS_CG_JUNGON("xzd_js_cg_jungon"), //采购合同竣工结算 XZD_JS_CG_JUNGON_EDIT("xzd_js_cg_jungon_edit"), //采购合同竣工结算 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/ZxdEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/ZxdEnum.java index 2d58f18c..f1a3503d 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/ZxdEnum.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/enums/ZxdEnum.java @@ -9,6 +9,7 @@ public enum ZxdEnum { JIXIEHTTONG("机械合同","5"), CAIGOUHET("采购合同","3"), ZONHEFUWUHET("综合服务合同","4"), + SHEJIHET("设计合同","6"), HETONGLEIXING("合同外清单","1"), HETONGLEIXINGNEI("合同内清单","2"), PURCHASE_PREFIX("采购合同信息前缀","CCTEG(CWZ)"), diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiFkController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiFkController.java new file mode 100644 index 00000000..39aab4c9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiFkController.java @@ -0,0 +1,105 @@ +package org.dromara.xzd.paymentsReceipts.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiFkVo; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkShejiFkBo; +import org.dromara.xzd.paymentsReceipts.service.IXzdSfkShejiFkService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 设计合同付款 + * + * @author Lion Li + * @date 2025-11-21 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/paymentsReceipts/sfkShejiFk") +public class XzdSfkShejiFkController extends BaseController { + + private final IXzdSfkShejiFkService xzdSfkShejiFkService; + + /** + * 查询设计合同付款列表 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiFk:list") + @GetMapping("/list") + public TableDataInfo list(XzdSfkShejiFkBo bo, PageQuery pageQuery) { + return xzdSfkShejiFkService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计合同付款列表 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiFk:export") + @Log(title = "设计合同付款", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdSfkShejiFkBo bo, HttpServletResponse response) { + List list = xzdSfkShejiFkService.queryList(bo); + ExcelUtil.exportExcel(list, "设计合同付款", XzdSfkShejiFkVo.class, response); + } + + /** + * 获取设计合同付款详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiFk:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdSfkShejiFkService.queryById(id)); + } + + /** + * 新增设计合同付款 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiFk:add") + @Log(title = "设计合同付款", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdSfkShejiFkBo bo) { + return toAjax(xzdSfkShejiFkService.insertByBo(bo)); + } + + /** + * 修改设计合同付款 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiFk:edit") + @Log(title = "设计合同付款", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdSfkShejiFkBo bo) { + return toAjax(xzdSfkShejiFkService.updateByBo(bo)); + } + + /** + * 删除设计合同付款 + * + * @param ids 主键串 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiFk:remove") + @Log(title = "设计合同付款", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdSfkShejiFkService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiSkController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiSkController.java new file mode 100644 index 00000000..3ec73570 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/controller/XzdSfkShejiSkController.java @@ -0,0 +1,105 @@ +package org.dromara.xzd.paymentsReceipts.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiSkVo; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkShejiSkBo; +import org.dromara.xzd.paymentsReceipts.service.IXzdSfkShejiSkService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 设计合同收款 + * + * @author Lion Li + * @date 2025-11-21 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/paymentsReceipts/sfkShejiSk") +public class XzdSfkShejiSkController extends BaseController { + + private final IXzdSfkShejiSkService xzdSfkShejiSkService; + + /** + * 查询设计合同收款列表 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiSk:list") + @GetMapping("/list") + public TableDataInfo list(XzdSfkShejiSkBo bo, PageQuery pageQuery) { + return xzdSfkShejiSkService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计合同收款列表 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiSk:export") + @Log(title = "设计合同收款", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdSfkShejiSkBo bo, HttpServletResponse response) { + List list = xzdSfkShejiSkService.queryList(bo); + ExcelUtil.exportExcel(list, "设计合同收款", XzdSfkShejiSkVo.class, response); + } + + /** + * 获取设计合同收款详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiSk:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdSfkShejiSkService.queryById(id)); + } + + /** + * 新增设计合同收款 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiSk:add") + @Log(title = "设计合同收款", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdSfkShejiSkBo bo) { + return toAjax(xzdSfkShejiSkService.insertByBo(bo)); + } + + /** + * 修改设计合同收款 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiSk:edit") + @Log(title = "设计合同收款", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdSfkShejiSkBo bo) { + return toAjax(xzdSfkShejiSkService.updateByBo(bo)); + } + + /** + * 删除设计合同收款 + * + * @param ids 主键串 + */ + @SaCheckPermission("paymentsReceipts:sfkShejiSk:remove") + @Log(title = "设计合同收款", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdSfkShejiSkService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiFk.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiFk.java new file mode 100644 index 00000000..ef0cebea --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiFk.java @@ -0,0 +1,233 @@ +package org.dromara.xzd.paymentsReceipts.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 设计合同付款对象 xzd_sfk_sheji_fk + * + * @author Lion Li + * @date 2025-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_sfk_sheji_fk") +public class XzdSfkShejiFk extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编码(带*,必填) + */ + private String docCode; + + /** + * 标题(带*,必填) + */ + private String title; + + /** + * 单据日期(带*,必填) + */ + private LocalDate docDate; + + /** + * 合同编码(带*,必填) + */ + private Long contractCode; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 付款性质(带*,必填) + */ + private Long paymentProperty; + + /** + * 支出合同金额 + */ + private BigDecimal expendContractAmount; + + /** + * 本期审批金额 + */ + private BigDecimal currentApproveAmount; + + /** + * 项目 + */ + private Long project; + + /** + * 付款单位 + */ + private Long paymentUnit; + + /** + * 收款单位(带*,必填) + */ + private Long receiptUnit; + + /** + * 收款银行 + */ + private String receiptBank; + + /** + * 收款银行账号 + */ + private String receiptBankAccount; + + /** + * 统计周期(带*,必填) + */ + private String statCycle; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 税率(带*,必填) + */ + private BigDecimal taxRate; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 备注 + */ + private String remark; + + /** + * 本期进度支付金额 + */ + private BigDecimal currentProgressPayment; + + /** + * 累计进度支付金额 + */ + private BigDecimal totalProgressPayment; + + /** + * 预付款金额 + */ + private BigDecimal advancePayment; + + /** + * 累计支付金额 + */ + private BigDecimal totalPaymentAmount; + + /** + * 本期进度应付金额(带*,必填) + */ + private BigDecimal currentProgressPayable; + + /** + * 累计进度应付金额 + */ + private BigDecimal totalProgressPayable; + + /** + * 预付款扣回金额 + */ + private BigDecimal advanceDeductionAmount; + + /** + * 累计进度结算占合同比例(%) + */ + private BigDecimal totalProgressSettlementRatio; + + /** + * 本期进度支付占本期进度应付(%) + */ + private BigDecimal currentPaymentRatio; + + /** + * 累计进度支付占累计进度应付(%) + */ + private BigDecimal totalPaymentRatio; + + /** + * 预付款剩余未抵扣金额 + */ + private BigDecimal advanceRemainingDeduction; + + /** + * 累计支付占合同比例(%) + */ + private BigDecimal totalPaymentContractRatio; + + /** + * 剩余进度应付未付金额 + */ + private BigDecimal remainingProgressPayable; + + /** + * 累计进度结算金额 + */ + private BigDecimal totalProgressSettlementAmount; + + /** + * 实时刷新(0=未勾选,1=勾选) + */ + private Long realTimeRefresh; + + /** + * 合同含税金额 + */ + private BigDecimal contractTaxInclAmount; + + /** + * 合同累计实际付款金额 + */ + private BigDecimal contractTotalActualPayment; + + /** + * 累计结算金额 + */ + private BigDecimal totalSettlementAmount; + + /** + * 单据引用 + */ + private String documentReference; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 文件ID + */ + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiSk.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiSk.java new file mode 100644 index 00000000..e1ca0e72 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/XzdSfkShejiSk.java @@ -0,0 +1,188 @@ +package org.dromara.xzd.paymentsReceipts.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 设计合同收款对象 xzd_sfk_sheji_sk + * + * @author Lion Li + * @date 2025-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_sfk_sheji_sk") +public class XzdSfkShejiSk extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * id + */ + @TableId(value = "id") + private Long id; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编码 + */ + private String documentCode; + + /** + * 标题 + */ + private String titile; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同id + */ + private Long contractId; + + /** + * 合同编码 + */ + private String contractCode; + + /** + * 收款性质 + */ + private String collectionNature; + + /** + * 实际收款日期 + */ + private LocalDate paymentDate; + + /** + * 项目id + */ + private Long projectId; + + /** + * 付款单位(客户)id + */ + private Long payer; + + /** + * 收款银行 + */ + private String beneficiaryBank; + + /** + * 收款银行账号 + */ + private String bankAccount; + + /** + * 本期审批收款金额 + */ + private BigDecimal paymentAmount; + + /** + * 预收款剩余未抵扣金额 + */ + private BigDecimal undischargedPayment; + + /** + * 税率 + */ + private String taxRate; + + /** + * 累计审定产值金额 + */ + private BigDecimal outputAmount; + + /** + * 累计收款金额(不含本期) + */ + private BigDecimal ljskjeElse; + + /** + * 累计收款金额(含本期) + */ + private BigDecimal ljskjeAll; + + /** + * 已收款比例(不含本期) + */ + private BigDecimal yskblElse; + + /** + * 本次收款比例 + */ + private BigDecimal bcskbl; + + /** + * 截止本期收款比例 + */ + private BigDecimal jzbqskbl; + + /** + * 备注 + */ + private String remark; + + /** + * 0否1是 + */ + private String sssx; + + /** + * 合同含税金额 + */ + private BigDecimal hthsje; + + /** + * 合同累计实际收款金额 + */ + private BigDecimal htljsjskje; + + /** + * 累计结算金额 + */ + private BigDecimal ljjsje; + + /** + * 多文件逗号分隔 + */ + private String fileId; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 收款单位 + */ + private Long partyBUnit; + + /** + * 合同金额 + */ + private BigDecimal contractAmount; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiFkBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiFkBo.java new file mode 100644 index 00000000..7db76975 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiFkBo.java @@ -0,0 +1,248 @@ +package org.dromara.xzd.paymentsReceipts.domain.bo; + +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiFk; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + +/** + * 设计合同付款业务对象 xzd_sfk_sheji_fk + * + * @author Lion Li + * @date 2025-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSfkShejiFk.class, reverseConvertGenerate = false) +public class XzdSfkShejiFkBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编码(带*,必填) + */ + @NotBlank(message = "单据编码(带*,必填)不能为空", groups = { EditGroup.class }) + private String docCode; + + /** + * 标题(带*,必填) + */ + @NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String title; + + /** + * 单据日期(带*,必填) + */ + @NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private LocalDate docDate; + + /** + * 合同编码(带*,必填) + */ + @NotNull(message = "合同编码(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long contractCode; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 付款性质(带*,必填) + */ + @NotNull(message = "付款性质(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long paymentProperty; + + /** + * 支出合同金额 + */ + private BigDecimal expendContractAmount; + + /** + * 本期审批金额 + */ + private BigDecimal currentApproveAmount; + + /** + * 项目 + */ + private Long project; + + /** + * 付款单位 + */ + private Long paymentUnit; + + /** + * 收款单位(带*,必填) + */ + @NotNull(message = "收款单位(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long receiptUnit; + + /** + * 收款银行 + */ + private String receiptBank; + + /** + * 收款银行账号 + */ + private String receiptBankAccount; + + /** + * 统计周期(带*,必填) + */ + @NotBlank(message = "统计周期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String statCycle; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 税率(带*,必填) + */ + @NotNull(message = "税率(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private BigDecimal taxRate; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 备注 + */ + private String remark; + + /** + * 本期进度支付金额 + */ + private BigDecimal currentProgressPayment; + + /** + * 累计进度支付金额 + */ + private BigDecimal totalProgressPayment; + + /** + * 预付款金额 + */ + private BigDecimal advancePayment; + + /** + * 累计支付金额 + */ + private BigDecimal totalPaymentAmount; + + /** + * 本期进度应付金额(带*,必填) + */ + @NotNull(message = "本期进度应付金额(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private BigDecimal currentProgressPayable; + + /** + * 累计进度应付金额 + */ + private BigDecimal totalProgressPayable; + + /** + * 预付款扣回金额 + */ + private BigDecimal advanceDeductionAmount; + + /** + * 累计进度结算占合同比例(%) + */ + private BigDecimal totalProgressSettlementRatio; + + /** + * 本期进度支付占本期进度应付(%) + */ + private BigDecimal currentPaymentRatio; + + /** + * 累计进度支付占累计进度应付(%) + */ + private BigDecimal totalPaymentRatio; + + /** + * 预付款剩余未抵扣金额 + */ + private BigDecimal advanceRemainingDeduction; + + /** + * 累计支付占合同比例(%) + */ + private BigDecimal totalPaymentContractRatio; + + /** + * 剩余进度应付未付金额 + */ + private BigDecimal remainingProgressPayable; + + /** + * 累计进度结算金额 + */ + private BigDecimal totalProgressSettlementAmount; + + /** + * 实时刷新(0=未勾选,1=勾选) + */ + private Long realTimeRefresh; + + /** + * 合同含税金额 + */ + private BigDecimal contractTaxInclAmount; + + /** + * 合同累计实际付款金额 + */ + private BigDecimal contractTotalActualPayment; + + /** + * 累计结算金额 + */ + private BigDecimal totalSettlementAmount; + + /** + * 单据引用 + */ + private String documentReference; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 文件ID + */ + private String fileId; + + + List fukuanList; + + List fapiaoList; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiSkBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiSkBo.java new file mode 100644 index 00000000..ca8a3087 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/bo/XzdSfkShejiSkBo.java @@ -0,0 +1,198 @@ +package org.dromara.xzd.paymentsReceipts.domain.bo; + +import org.dromara.xzd.domain.bo.XzdContractSkxxBo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiSk; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + +/** + * 设计合同收款业务对象 xzd_sfk_sheji_sk + * + * @author Lion Li + * @date 2025-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSfkShejiSk.class, reverseConvertGenerate = false) +public class XzdSfkShejiSkBo extends BaseEntity { + + /** + * id + */ + @NotNull(message = "id不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编码 + */ + private String documentCode; + + /** + * 标题 + */ + private String titile; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同id + */ + private Long contractId; + + /** + * 合同编码 + */ + private String contractCode; + + /** + * 收款性质 + */ + private String collectionNature; + + /** + * 实际收款日期 + */ + private LocalDate paymentDate; + + /** + * 项目id + */ + private Long projectId; + + /** + * 付款单位(客户)id + */ + private Long payer; + + /** + * 收款银行 + */ + private String beneficiaryBank; + + /** + * 收款银行账号 + */ + private String bankAccount; + + /** + * 本期审批收款金额 + */ + private BigDecimal paymentAmount; + + /** + * 预收款剩余未抵扣金额 + */ + private BigDecimal undischargedPayment; + + /** + * 税率 + */ + private String taxRate; + + /** + * 累计审定产值金额 + */ + private BigDecimal outputAmount; + + /** + * 累计收款金额(不含本期) + */ + private BigDecimal ljskjeElse; + + /** + * 累计收款金额(含本期) + */ + private BigDecimal ljskjeAll; + + /** + * 已收款比例(不含本期) + */ + private BigDecimal yskblElse; + + /** + * 本次收款比例 + */ + private BigDecimal bcskbl; + + /** + * 截止本期收款比例 + */ + private BigDecimal jzbqskbl; + + /** + * 备注 + */ + private String remark; + + /** + * 0否1是 + */ + private String sssx; + + /** + * 合同含税金额 + */ + private BigDecimal hthsje; + + /** + * 合同累计实际收款金额 + */ + private BigDecimal htljsjskje; + + /** + * 累计结算金额 + */ + private BigDecimal ljjsje; + + /** + * 多文件逗号分隔 + */ + private String fileId; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 收款单位 + */ + private Long partyBUnit; + + /** + * 合同金额 + */ + private BigDecimal contractAmount; + + /** + * 发票信息 + */ + List fpxx; + + /** + * 收款信息 + */ + List skxx; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiFkVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiFkVo.java new file mode 100644 index 00000000..1d831bfd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiFkVo.java @@ -0,0 +1,311 @@ +package org.dromara.xzd.paymentsReceipts.domain.vo; + +import java.math.BigDecimal; + +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.XzdSfkShejiFk; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; +import java.util.List; + + +/** + * 设计合同付款视图对象 xzd_sfk_sheji_fk + * + * @author Lion Li + * @date 2025-11-21 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSfkShejiFk.class) +public class XzdSfkShejiFkVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 部门id + */ + @ExcelProperty(value = "部门id") + private Long deptId; + + /** + * 单据编码(带*,必填) + */ + @ExcelProperty(value = "单据编码", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String docCode; + + /** + * 标题(带*,必填) + */ + @ExcelProperty(value = "标题", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String title; + + /** + * 单据日期(带*,必填) + */ + @ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private LocalDate docDate; + + /** + * 合同编码(带*,必填) + */ + @ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private Long contractCode; + @Translation(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME, mapper = "contractCode") + private String contractCodeName; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 付款性质(带*,必填) + */ + @ExcelProperty(value = "付款性质", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private Long paymentProperty; + + /** + * 支出合同金额 + */ + @ExcelProperty(value = "支出合同金额") + private BigDecimal expendContractAmount; + + /** + * 本期审批金额 + */ + @ExcelProperty(value = "本期审批金额") + private BigDecimal currentApproveAmount; + + /** + * 项目 + */ + @ExcelProperty(value = "项目") + private Long project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") + private String projectName; + + /** + * 付款单位 + */ + @ExcelProperty(value = "付款单位") + private Long paymentUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "paymentUnit") + private String paymentUnitName; + + /** + * 收款单位(带*,必填) + */ + @ExcelProperty(value = "收款单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private Long receiptUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "receiptUnit") + private String receiptUnitName; + + /** + * 收款银行 + */ + @ExcelProperty(value = "收款银行") + private String receiptBank; + + /** + * 收款银行账号 + */ + @ExcelProperty(value = "收款银行账号") + private String receiptBankAccount; + + /** + * 统计周期(带*,必填) + */ + @ExcelProperty(value = "统计周期", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String statCycle; + + /** + * 项目类型 + */ + @ExcelProperty(value = "项目类型") + private String projectType; + + /** + * 税率(带*,必填) + */ + @ExcelProperty(value = "税率", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private BigDecimal taxRate; + + /** + * 项目大类 + */ + @ExcelProperty(value = "项目大类") + private String projectCategory; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 本期进度支付金额 + */ + @ExcelProperty(value = "本期进度支付金额") + private BigDecimal currentProgressPayment; + + /** + * 累计进度支付金额 + */ + @ExcelProperty(value = "累计进度支付金额") + private BigDecimal totalProgressPayment; + + /** + * 预付款金额 + */ + @ExcelProperty(value = "预付款金额") + private BigDecimal advancePayment; + + /** + * 累计支付金额 + */ + @ExcelProperty(value = "累计支付金额") + private BigDecimal totalPaymentAmount; + + /** + * 本期进度应付金额(带*,必填) + */ + @ExcelProperty(value = "本期进度应付金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private BigDecimal currentProgressPayable; + + /** + * 累计进度应付金额 + */ + @ExcelProperty(value = "累计进度应付金额") + private BigDecimal totalProgressPayable; + + /** + * 预付款扣回金额 + */ + @ExcelProperty(value = "预付款扣回金额") + private BigDecimal advanceDeductionAmount; + + /** + * 累计进度结算占合同比例(%) + */ + @ExcelProperty(value = "累计进度结算占合同比例", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "%=") + private BigDecimal totalProgressSettlementRatio; + + /** + * 本期进度支付占本期进度应付(%) + */ + @ExcelProperty(value = "本期进度支付占本期进度应付", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "%=") + private BigDecimal currentPaymentRatio; + + /** + * 累计进度支付占累计进度应付(%) + */ + @ExcelProperty(value = "累计进度支付占累计进度应付", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "%=") + private BigDecimal totalPaymentRatio; + + /** + * 预付款剩余未抵扣金额 + */ + @ExcelProperty(value = "预付款剩余未抵扣金额") + private BigDecimal advanceRemainingDeduction; + + /** + * 累计支付占合同比例(%) + */ + @ExcelProperty(value = "累计支付占合同比例", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "%=") + private BigDecimal totalPaymentContractRatio; + + /** + * 剩余进度应付未付金额 + */ + @ExcelProperty(value = "剩余进度应付未付金额") + private BigDecimal remainingProgressPayable; + + /** + * 累计进度结算金额 + */ + @ExcelProperty(value = "累计进度结算金额") + private BigDecimal totalProgressSettlementAmount; + + /** + * 实时刷新(0=未勾选,1=勾选) + */ + @ExcelProperty(value = "实时刷新", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0==未勾选,1=勾选") + private Long realTimeRefresh; + + /** + * 合同含税金额 + */ + @ExcelProperty(value = "合同含税金额") + private BigDecimal contractTaxInclAmount; + + /** + * 合同累计实际付款金额 + */ + @ExcelProperty(value = "合同累计实际付款金额") + private BigDecimal contractTotalActualPayment; + + /** + * 累计结算金额 + */ + @ExcelProperty(value = "累计结算金额") + private BigDecimal totalSettlementAmount; + + /** + * 单据引用 + */ + @ExcelProperty(value = "单据引用") + private String documentReference; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private String fileId; + + + List fukuanList; + + List fapiaoList; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiSkVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiSkVo.java new file mode 100644 index 00000000..68871223 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkShejiSkVo.java @@ -0,0 +1,257 @@ +package org.dromara.xzd.paymentsReceipts.domain.vo; + +import java.math.BigDecimal; + +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.xzd.domain.vo.XzdContractSkxxVo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiSk; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; +import java.util.List; + + +/** + * 设计合同收款视图对象 xzd_sfk_sheji_sk + * + * @author Lion Li + * @date 2025-11-21 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSfkShejiSk.class) +public class XzdSfkShejiSkVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * id + */ + @ExcelProperty(value = "id") + private Long id; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + /** + * 部门id + */ + @ExcelProperty(value = "部门id") + private Long deptId; + + /** + * 单据编码 + */ + @ExcelProperty(value = "单据编码") + private String documentCode; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String titile; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDate documentDate; + + /** + * 合同id + */ + @ExcelProperty(value = "合同id") + private Long contractId; + + /** + * 合同编码 + */ + @ExcelProperty(value = "合同编码") + private String contractCode; + + /** + * 收款性质 + */ + @ExcelProperty(value = "收款性质") + private String collectionNature; + + /** + * 实际收款日期 + */ + @ExcelProperty(value = "实际收款日期") + private LocalDate paymentDate; + + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + /** + * 项目名称 + */ + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId") + private String projectName; + + /** + * 付款单位(客户)id + */ + @ExcelProperty(value = "付款单位(客户)id") + private Long payer; + /** + * 付款单位(客户)名称 + */ + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "payer") + private String payerName; + + /** + * 收款银行 + */ + @ExcelProperty(value = "收款银行") + private String beneficiaryBank; + + /** + * 收款银行账号 + */ + @ExcelProperty(value = "收款银行账号") + private String bankAccount; + + /** + * 本期审批收款金额 + */ + @ExcelProperty(value = "本期审批收款金额") + private BigDecimal paymentAmount; + + /** + * 预收款剩余未抵扣金额 + */ + @ExcelProperty(value = "预收款剩余未抵扣金额") + private BigDecimal undischargedPayment; + + /** + * 税率 + */ + @ExcelProperty(value = "税率") + private String taxRate; + + /** + * 累计审定产值金额 + */ + @ExcelProperty(value = "累计审定产值金额") + private BigDecimal outputAmount; + + /** + * 累计收款金额(不含本期) + */ + @ExcelProperty(value = "累计收款金额(不含本期)") + private BigDecimal ljskjeElse; + + /** + * 累计收款金额(含本期) + */ + @ExcelProperty(value = "累计收款金额(含本期)") + private BigDecimal ljskjeAll; + + /** + * 已收款比例(不含本期) + */ + @ExcelProperty(value = "已收款比例(不含本期)") + private BigDecimal yskblElse; + + /** + * 本次收款比例 + */ + @ExcelProperty(value = "本次收款比例") + private BigDecimal bcskbl; + + /** + * 截止本期收款比例 + */ + @ExcelProperty(value = "截止本期收款比例") + private BigDecimal jzbqskbl; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 0否1是 + */ + @ExcelProperty(value = "0否1是") + private String sssx; + + /** + * 合同含税金额 + */ + @ExcelProperty(value = "合同含税金额") + private BigDecimal hthsje; + + /** + * 合同累计实际收款金额 + */ + @ExcelProperty(value = "合同累计实际收款金额") + private BigDecimal htljsjskje; + + /** + * 累计结算金额 + */ + @ExcelProperty(value = "累计结算金额") + private BigDecimal ljjsje; + + /** + * 多文件逗号分隔 + */ + @ExcelProperty(value = "多文件逗号分隔") + private String fileId; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 收款单位 + */ + @ExcelProperty(value = "收款单位") + private Long partyBUnit; + + /** + * 收款单位 + */ + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyBUnit") + private String partyBUnitName; + + /** + * 合同金额 + */ + @ExcelProperty(value = "合同金额") + private BigDecimal contractAmount; + + + /** + * 发票信息 + */ + List fpxx; + + /** + * 收款信息 + */ + List skxx; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiFkMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiFkMapper.java new file mode 100644 index 00000000..cbf3ca25 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiFkMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.paymentsReceipts.mapper; + +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiFk; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiFkVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计合同付款Mapper接口 + * + * @author Lion Li + * @date 2025-11-21 + */ +public interface XzdSfkShejiFkMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiSkMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiSkMapper.java new file mode 100644 index 00000000..85ee4fac --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/mapper/XzdSfkShejiSkMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.paymentsReceipts.mapper; + +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiSk; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiSkVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计合同收款Mapper接口 + * + * @author Lion Li + * @date 2025-11-21 + */ +public interface XzdSfkShejiSkMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiFkService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiFkService.java new file mode 100644 index 00000000..e6297d92 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiFkService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.paymentsReceipts.service; + +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiFkVo; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkShejiFkBo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiFk; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 设计合同付款Service接口 + * + * @author Lion Li + * @date 2025-11-21 + */ +public interface IXzdSfkShejiFkService extends IService{ + + /** + * 查询设计合同付款 + * + * @param id 主键 + * @return 设计合同付款 + */ + XzdSfkShejiFkVo queryById(Long id); + + /** + * 分页查询设计合同付款列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同付款分页列表 + */ + TableDataInfo queryPageList(XzdSfkShejiFkBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计合同付款列表 + * + * @param bo 查询条件 + * @return 设计合同付款列表 + */ + List queryList(XzdSfkShejiFkBo bo); + + /** + * 新增设计合同付款 + * + * @param bo 设计合同付款 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSfkShejiFkBo bo); + + /** + * 修改设计合同付款 + * + * @param bo 设计合同付款 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSfkShejiFkBo bo); + + /** + * 校验并批量删除设计合同付款信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiSkService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiSkService.java new file mode 100644 index 00000000..3f3ba080 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/IXzdSfkShejiSkService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.paymentsReceipts.service; + +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiSkVo; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkShejiSkBo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiSk; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 设计合同收款Service接口 + * + * @author Lion Li + * @date 2025-11-21 + */ +public interface IXzdSfkShejiSkService extends IService{ + + /** + * 查询设计合同收款 + * + * @param id 主键 + * @return 设计合同收款 + */ + XzdSfkShejiSkVo queryById(Long id); + + /** + * 分页查询设计合同收款列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同收款分页列表 + */ + TableDataInfo queryPageList(XzdSfkShejiSkBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计合同收款列表 + * + * @param bo 查询条件 + * @return 设计合同收款列表 + */ + List queryList(XzdSfkShejiSkBo bo); + + /** + * 新增设计合同收款 + * + * @param bo 设计合同收款 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSfkShejiSkBo bo); + + /** + * 修改设计合同收款 + * + * @param bo 设计合同收款 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSfkShejiSkBo bo); + + /** + * 校验并批量删除设计合同收款信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiFkServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiFkServiceImpl.java new file mode 100644 index 00000000..5267e791 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiFkServiceImpl.java @@ -0,0 +1,304 @@ +package org.dromara.xzd.paymentsReceipts.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +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.common.utils.BatchNumberGenerator; +import org.dromara.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.comprehensive.domain.XzdSjContractInfo; +import org.dromara.xzd.comprehensive.domain.vo.XzdSjContractInfoVo; +import org.dromara.xzd.comprehensive.service.IXzdSjContractInfoService; +import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan; +import org.dromara.xzd.paymentsReceipts.service.IXzdSfkFapiaoService; +import org.dromara.xzd.paymentsReceipts.service.IXzdSfkFukuanService; +import org.dromara.xzd.skyfk.jixiehetong.fkxx.domain.XzdSfkJixieFk; +import org.dromara.xzd.skyfk.jixiehetong.fkxx.domain.vo.XzdSfkJixieFkVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Service; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkShejiFkBo; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiFkVo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiFk; +import org.dromara.xzd.paymentsReceipts.mapper.XzdSfkShejiFkMapper; +import org.dromara.xzd.paymentsReceipts.service.IXzdSfkShejiFkService; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.*; + +/** + * 设计合同付款Service业务层处理 + * + * @author Lion Li + * @date 2025-11-21 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class XzdSfkShejiFkServiceImpl extends ServiceImpl implements IXzdSfkShejiFkService { + + private final XzdSfkShejiFkMapper baseMapper; + + @Autowired + private IXzdSfkFapiaoService fapiaoService; + @Autowired + private IXzdSfkFukuanService fukuanService; + @Autowired + private SysOssServiceImpl sysOssService; + @Autowired + private IXzdSjContractInfoService xzdSjContractInfoService; + + /** + * 查询设计合同付款 + * + * @param id 主键 + * @return 设计合同付款 + */ + @Override + public XzdSfkShejiFkVo queryById(Long id){ + XzdSfkShejiFkVo vo = baseMapper.selectVoById(id); + if (vo != null){ + getHttk(vo); + } + return vo; + } + + /** + * 分页查询设计合同付款列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同付款分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSfkShejiFkBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计合同付款列表 + * + * @param bo 查询条件 + * @return 设计合同付款列表 + */ + @Override + public List queryList(XzdSfkShejiFkBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSfkShejiFkBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSfkShejiFk::getId); + lqw.eq(bo.getDeptId() != null, XzdSfkShejiFk::getDeptId, bo.getDeptId()); + lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdSfkShejiFk::getDocCode, bo.getDocCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdSfkShejiFk::getTitle, bo.getTitle()); + lqw.eq(bo.getDocDate() != null, XzdSfkShejiFk::getDocDate, bo.getDocDate()); + lqw.eq(bo.getContractCode() != null, XzdSfkShejiFk::getContractCode, bo.getContractCode()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdSfkShejiFk::getContractName, bo.getContractName()); + lqw.eq(bo.getPaymentProperty() != null, XzdSfkShejiFk::getPaymentProperty, bo.getPaymentProperty()); + lqw.eq(bo.getExpendContractAmount() != null, XzdSfkShejiFk::getExpendContractAmount, bo.getExpendContractAmount()); + lqw.eq(bo.getCurrentApproveAmount() != null, XzdSfkShejiFk::getCurrentApproveAmount, bo.getCurrentApproveAmount()); + lqw.eq(bo.getProject() != null, XzdSfkShejiFk::getProject, bo.getProject()); + lqw.eq(bo.getPaymentUnit() != null, XzdSfkShejiFk::getPaymentUnit, bo.getPaymentUnit()); + lqw.eq(bo.getReceiptUnit() != null, XzdSfkShejiFk::getReceiptUnit, bo.getReceiptUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getReceiptBank()), XzdSfkShejiFk::getReceiptBank, bo.getReceiptBank()); + lqw.eq(StringUtils.isNotBlank(bo.getReceiptBankAccount()), XzdSfkShejiFk::getReceiptBankAccount, bo.getReceiptBankAccount()); + lqw.eq(StringUtils.isNotBlank(bo.getStatCycle()), XzdSfkShejiFk::getStatCycle, bo.getStatCycle()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdSfkShejiFk::getProjectType, bo.getProjectType()); + lqw.eq(bo.getTaxRate() != null, XzdSfkShejiFk::getTaxRate, bo.getTaxRate()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdSfkShejiFk::getProjectCategory, bo.getProjectCategory()); + lqw.eq(bo.getCurrentProgressPayment() != null, XzdSfkShejiFk::getCurrentProgressPayment, bo.getCurrentProgressPayment()); + lqw.eq(bo.getTotalProgressPayment() != null, XzdSfkShejiFk::getTotalProgressPayment, bo.getTotalProgressPayment()); + lqw.eq(bo.getAdvancePayment() != null, XzdSfkShejiFk::getAdvancePayment, bo.getAdvancePayment()); + lqw.eq(bo.getTotalPaymentAmount() != null, XzdSfkShejiFk::getTotalPaymentAmount, bo.getTotalPaymentAmount()); + lqw.eq(bo.getCurrentProgressPayable() != null, XzdSfkShejiFk::getCurrentProgressPayable, bo.getCurrentProgressPayable()); + lqw.eq(bo.getTotalProgressPayable() != null, XzdSfkShejiFk::getTotalProgressPayable, bo.getTotalProgressPayable()); + lqw.eq(bo.getAdvanceDeductionAmount() != null, XzdSfkShejiFk::getAdvanceDeductionAmount, bo.getAdvanceDeductionAmount()); + lqw.eq(bo.getTotalProgressSettlementRatio() != null, XzdSfkShejiFk::getTotalProgressSettlementRatio, bo.getTotalProgressSettlementRatio()); + lqw.eq(bo.getCurrentPaymentRatio() != null, XzdSfkShejiFk::getCurrentPaymentRatio, bo.getCurrentPaymentRatio()); + lqw.eq(bo.getTotalPaymentRatio() != null, XzdSfkShejiFk::getTotalPaymentRatio, bo.getTotalPaymentRatio()); + lqw.eq(bo.getAdvanceRemainingDeduction() != null, XzdSfkShejiFk::getAdvanceRemainingDeduction, bo.getAdvanceRemainingDeduction()); + lqw.eq(bo.getTotalPaymentContractRatio() != null, XzdSfkShejiFk::getTotalPaymentContractRatio, bo.getTotalPaymentContractRatio()); + lqw.eq(bo.getRemainingProgressPayable() != null, XzdSfkShejiFk::getRemainingProgressPayable, bo.getRemainingProgressPayable()); + lqw.eq(bo.getTotalProgressSettlementAmount() != null, XzdSfkShejiFk::getTotalProgressSettlementAmount, bo.getTotalProgressSettlementAmount()); + lqw.eq(bo.getRealTimeRefresh() != null, XzdSfkShejiFk::getRealTimeRefresh, bo.getRealTimeRefresh()); + lqw.eq(bo.getContractTaxInclAmount() != null, XzdSfkShejiFk::getContractTaxInclAmount, bo.getContractTaxInclAmount()); + lqw.eq(bo.getContractTotalActualPayment() != null, XzdSfkShejiFk::getContractTotalActualPayment, bo.getContractTotalActualPayment()); + lqw.eq(bo.getTotalSettlementAmount() != null, XzdSfkShejiFk::getTotalSettlementAmount, bo.getTotalSettlementAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdSfkShejiFk::getDocumentReference, bo.getDocumentReference()); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdSfkShejiFk::getAuditStatus, bo.getAuditStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdSfkShejiFk::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增设计合同付款 + * + * @param bo 设计合同付款 + * @return 是否新增成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(XzdSfkShejiFkBo bo) { + XzdSfkShejiFk add = MapstructUtils.convert(bo, XzdSfkShejiFk.class); + validEntityBeforeSave(add); + String banBen = BatchNumberGenerator.generateBatchNumber("SJHTFK-"); + add.setDocCode(banBen); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + +// 发票信息 + if (bo.getFapiaoList() != null || !bo.getFapiaoList().isEmpty()) { + bo.getFapiaoList().forEach(item -> {item.setMainDocumentId(add.getId());}); + fapiaoService.saveBatch(bo.getFapiaoList()); + } +// 付款信息 + if (bo.getFukuanList() != null || !bo.getFukuanList().isEmpty()) { + bo.getFukuanList().forEach(item -> {item.setMainDocumentId(add.getId());}); + fukuanService.saveBatch(bo.getFukuanList()); + } + return flag; + } + + /** + * 修改设计合同付款 + * + * @param bo 设计合同付款 + * @return 是否修改成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateByBo(XzdSfkShejiFkBo bo) { + XzdSfkShejiFk update = MapstructUtils.convert(bo, XzdSfkShejiFk.class); + validEntityBeforeSave(update); + fapiaoService.remove(new LambdaQueryWrapper().eq(XzdSfkFapiao::getMainDocumentId, bo.getId())); + fukuanService.remove(new LambdaQueryWrapper().eq(XzdSfkFukuan::getMainDocumentId, bo.getId())); + + // 发票信息 + if (bo.getFapiaoList() != null || !bo.getFapiaoList().isEmpty()) { + bo.getFapiaoList().forEach(item -> {item.setMainDocumentId(update.getId());}); + fapiaoService.saveBatch(bo.getFapiaoList()); + } +// 付款信息 + if (bo.getFukuanList() != null || !bo.getFukuanList().isEmpty()) { + bo.getFukuanList().forEach(item -> {item.setMainDocumentId(update.getId());}); + fukuanService.saveBatch(bo.getFukuanList()); + } + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSfkShejiFk entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计合同付款信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdSfkShejiFkVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + deleteIds.addAll(list); + } + } + } + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + fapiaoService.remove(new LambdaQueryWrapper().in(XzdSfkFapiao::getMainDocumentId, ids)); + fukuanService.remove(new LambdaQueryWrapper().in(XzdSfkFukuan::getMainDocumentId, ids)); + return baseMapper.deleteByIds(ids) > 0; + } + + /** + * 获取子项 + * @param vo + */ + private void getHttk(XzdSfkShejiFkVo vo) { + //发票信息 + vo.setFapiaoList(fapiaoService.getBaseMapper().selectList(new LambdaQueryWrapper().eq(XzdSfkFapiao::getMainDocumentId, vo.getId()))); + + //付款信息 + vo.setFukuanList(fukuanService.getBaseMapper().selectList(new LambdaQueryWrapper().eq(XzdSfkFukuan::getMainDocumentId, vo.getId()))); + } + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdsjhtfksp')") + public void processPlansHandlErequipmentList(ProcessEvent processEvent) { + log.info("机械合同信息付款审核任务执行了{}", processEvent.toString()); + String id = processEvent.getBusinessId(); + XzdSfkShejiFk vo = baseMapper.selectById(Long.valueOf(id)); + if (vo == null) { + return; + } + vo.setAuditStatus(processEvent.getStatus()); + this.updateById(vo); + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdsjhtfksp')") + public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { + log.info("机械合同信息付款审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdsjhtfksp')") + public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { + log.info("机械合同信息付款删除流程事件,机械合同信息付款审核任务执行了{}", processDeleteEvent.toString()); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiSkServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiSkServiceImpl.java new file mode 100644 index 00000000..a049bfa0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/service/impl/XzdSfkShejiSkServiceImpl.java @@ -0,0 +1,293 @@ +package org.dromara.xzd.paymentsReceipts.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +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.common.utils.BatchNumberGenerator; +import org.dromara.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.domain.XzdContractSkxx; +import org.dromara.xzd.domain.bo.XzdContractSkxxBo; +import org.dromara.xzd.domain.vo.XzdContractSkxxVo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkFapiaoBo; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkFapiaoVo; +import org.dromara.xzd.service.impl.XzdContractSkxxServiceImpl; +import org.dromara.xzd.skyfk.jixiehetong.skxx.domain.XzdSfkJixieSk; +import org.dromara.xzd.skyfk.jixiehetong.skxx.domain.vo.XzdSfkJixieSkVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Service; +import org.dromara.xzd.paymentsReceipts.domain.bo.XzdSfkShejiSkBo; +import org.dromara.xzd.paymentsReceipts.domain.vo.XzdSfkShejiSkVo; +import org.dromara.xzd.paymentsReceipts.domain.XzdSfkShejiSk; +import org.dromara.xzd.paymentsReceipts.mapper.XzdSfkShejiSkMapper; +import org.dromara.xzd.paymentsReceipts.service.IXzdSfkShejiSkService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 设计合同收款Service业务层处理 + * + * @author Lion Li + * @date 2025-11-21 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class XzdSfkShejiSkServiceImpl extends ServiceImpl implements IXzdSfkShejiSkService { + + private final XzdSfkShejiSkMapper baseMapper; + @Autowired + private XzdSfkFapiaoServiceImpl sfkFapiaoService; + @Autowired + private XzdContractSkxxServiceImpl xzdContractSkxxService; + @Autowired + private SysOssServiceImpl sysOssService; + + /** + * 查询设计合同收款 + * + * @param id 主键 + * @return 设计合同收款 + */ + @Override + public XzdSfkShejiSkVo queryById(Long id){ + XzdSfkShejiSkVo vo = baseMapper.selectVoById(id); + if (vo != null){ + saveValue(vo); + } + return vo; + } + + /** + * 分页查询设计合同收款列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同收款分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSfkShejiSkBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计合同收款列表 + * + * @param bo 查询条件 + * @return 设计合同收款列表 + */ + @Override + public List queryList(XzdSfkShejiSkBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSfkShejiSkBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSfkShejiSk::getId); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdSfkShejiSk::getAuditStatus, bo.getAuditStatus()); + lqw.eq(bo.getDeptId() != null, XzdSfkShejiSk::getDeptId, bo.getDeptId()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdSfkShejiSk::getDocumentCode, bo.getDocumentCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitile()), XzdSfkShejiSk::getTitile, bo.getTitile()); + lqw.eq(bo.getDocumentDate() != null, XzdSfkShejiSk::getDocumentDate, bo.getDocumentDate()); + lqw.eq(bo.getContractId() != null, XzdSfkShejiSk::getContractId, bo.getContractId()); + lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdSfkShejiSk::getContractCode, bo.getContractCode()); + lqw.eq(StringUtils.isNotBlank(bo.getCollectionNature()), XzdSfkShejiSk::getCollectionNature, bo.getCollectionNature()); + lqw.eq(bo.getPaymentDate() != null, XzdSfkShejiSk::getPaymentDate, bo.getPaymentDate()); + lqw.eq(bo.getProjectId() != null, XzdSfkShejiSk::getProjectId, bo.getProjectId()); + lqw.eq(bo.getPayer() != null, XzdSfkShejiSk::getPayer, bo.getPayer()); + lqw.eq(StringUtils.isNotBlank(bo.getBeneficiaryBank()), XzdSfkShejiSk::getBeneficiaryBank, bo.getBeneficiaryBank()); + lqw.eq(StringUtils.isNotBlank(bo.getBankAccount()), XzdSfkShejiSk::getBankAccount, bo.getBankAccount()); + lqw.eq(bo.getPaymentAmount() != null, XzdSfkShejiSk::getPaymentAmount, bo.getPaymentAmount()); + lqw.eq(bo.getUndischargedPayment() != null, XzdSfkShejiSk::getUndischargedPayment, bo.getUndischargedPayment()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxRate()), XzdSfkShejiSk::getTaxRate, bo.getTaxRate()); + lqw.eq(bo.getOutputAmount() != null, XzdSfkShejiSk::getOutputAmount, bo.getOutputAmount()); + lqw.eq(bo.getLjskjeElse() != null, XzdSfkShejiSk::getLjskjeElse, bo.getLjskjeElse()); + lqw.eq(bo.getLjskjeAll() != null, XzdSfkShejiSk::getLjskjeAll, bo.getLjskjeAll()); + lqw.eq(bo.getYskblElse() != null, XzdSfkShejiSk::getYskblElse, bo.getYskblElse()); + lqw.eq(bo.getBcskbl() != null, XzdSfkShejiSk::getBcskbl, bo.getBcskbl()); + lqw.eq(bo.getJzbqskbl() != null, XzdSfkShejiSk::getJzbqskbl, bo.getJzbqskbl()); + lqw.eq(StringUtils.isNotBlank(bo.getSssx()), XzdSfkShejiSk::getSssx, bo.getSssx()); + lqw.eq(bo.getHthsje() != null, XzdSfkShejiSk::getHthsje, bo.getHthsje()); + lqw.eq(bo.getHtljsjskje() != null, XzdSfkShejiSk::getHtljsjskje, bo.getHtljsjskje()); + lqw.eq(bo.getLjjsje() != null, XzdSfkShejiSk::getLjjsje, bo.getLjjsje()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdSfkShejiSk::getFileId, bo.getFileId()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdSfkShejiSk::getContractName, bo.getContractName()); + lqw.eq(bo.getPartyBUnit() != null, XzdSfkShejiSk::getPartyBUnit, bo.getPartyBUnit()); + lqw.eq(bo.getContractAmount() != null, XzdSfkShejiSk::getContractAmount, bo.getContractAmount()); + return lqw; + } + + /** + * 新增设计合同收款 + * + * @param bo 设计合同收款 + * @return 是否新增成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(XzdSfkShejiSkBo bo) { + XzdSfkShejiSk add = MapstructUtils.convert(bo, XzdSfkShejiSk.class); + validEntityBeforeSave(add); + String banBen = BatchNumberGenerator.generateBatchNumber("SJHTSK-"); + add.setDocumentCode(banBen); + boolean flag = baseMapper.insert(add) > 0; + //收款信息 + if (bo.getSkxx() != null && !bo.getSkxx().isEmpty()){ + for (XzdContractSkxxBo skxx : bo.getSkxx()) { + skxx.setMainId(add.getId()); + xzdContractSkxxService.insertByBo(skxx); + } + } + + //发票信息 + if (bo.getFpxx() != null && !bo.getFpxx().isEmpty()){ + for (XzdSfkFapiaoBo fpxx : bo.getFpxx()) { + fpxx.setMainDocumentId(add.getId()); + sfkFapiaoService.insertByBo(fpxx); + } + } + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改设计合同收款 + * + * @param bo 设计合同收款 + * @return 是否修改成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateByBo(XzdSfkShejiSkBo bo) { + XzdSfkShejiSk update = MapstructUtils.convert(bo, XzdSfkShejiSk.class); + validEntityBeforeSave(update); + xzdContractSkxxService.getBaseMapper().delete(new LambdaQueryWrapper().eq(XzdContractSkxx::getMainId, update.getId())); + sfkFapiaoService.getBaseMapper().delete(new LambdaQueryWrapper().eq(XzdSfkFapiao::getMainDocumentId, update.getId())); + if (bo.getSkxx() != null && !bo.getSkxx().isEmpty()){ + bo.getSkxx().forEach(skxx -> { + skxx.setMainId(update.getId()); + }); + xzdContractSkxxService.saveBatch(MapstructUtils.convert(bo.getSkxx(), XzdContractSkxx.class)); + } + if (bo.getFpxx() != null && !bo.getFpxx().isEmpty()){ + bo.getFpxx().forEach(fpxx -> { + fpxx.setMainDocumentId(update.getId()); + }); + sfkFapiaoService.saveBatch(MapstructUtils.convert(bo.getFpxx(), XzdSfkFapiao.class)); + } + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSfkShejiSk entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计合同收款信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdSfkShejiSkVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + deleteIds.addAll(list); + } + } + } + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + + xzdContractSkxxService.getBaseMapper().delete(new LambdaQueryWrapper().in(XzdContractSkxx::getMainId, ids)); + sfkFapiaoService.getBaseMapper().delete(new LambdaQueryWrapper().in(XzdSfkFapiao::getMainDocumentId, ids)); + + return baseMapper.deleteByIds(ids) > 0; + } + + private void saveValue(XzdSfkShejiSkVo vo) { + List xzdContractSkxxVos = xzdContractSkxxService.getBaseMapper().selectVoList(new LambdaQueryWrapper().eq(XzdContractSkxx::getMainId, vo.getId())); + List xzdSfkFapiaoVos = sfkFapiaoService.getBaseMapper().selectVoList(new LambdaQueryWrapper().eq(XzdSfkFapiao::getMainDocumentId, vo.getId())); + + vo.setSkxx(xzdContractSkxxVos); + vo.setFpxx(xzdSfkFapiaoVos); + } + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdsjhtsksp')") + public void processPlansHandlErequipmentList(ProcessEvent processEvent) { + log.info("机械合同信息收款审核任务执行了{}", processEvent.toString()); + String id = processEvent.getBusinessId(); + XzdSfkShejiSk vo = baseMapper.selectById(Long.valueOf(id)); + if (vo == null) { + return; + } + vo.setAuditStatus(processEvent.getStatus()); + this.updateById(vo); + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdsjhtsksp')") + public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { + log.info("机械合同信息收款审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdsjhtsksp')") + public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { + log.info("机械合同信息收款删除流程事件,机械合同信息收款审核任务执行了{}", processDeleteEvent.toString()); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/publicUrl/XzdPublicUrlConreoller.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/publicUrl/XzdPublicUrlConreoller.java index b5aa54cb..072c7c5f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/publicUrl/XzdPublicUrlConreoller.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/publicUrl/XzdPublicUrlConreoller.java @@ -182,6 +182,21 @@ public class XzdPublicUrlConreoller { } + /** + * 查询供应商信息-开户银行列表 + */ + @GetMapping("/getOpenBankList") + public R> getOpenBankList(XzdSupplierOpenBankBo bo) { + return R.ok(xzdSupplierOpenBankService.getOpenBankList(bo)); + } + + /** + * 查询区域列表 + */ + @GetMapping("/getPoiAreaList") + public R> getPoiAreaList() { + return R.ok(xzdSupplierOpenBankService.getPoiAreaList()); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java index e9405396..d5a83d72 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdCorrespondentListImp.java @@ -262,20 +262,21 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList { //开户银行 if(xzdSettlementInfo.getOpenBanks() != null && !xzdSettlementInfo.getOpenBanks().isEmpty()){ - ArrayList xzdYhxxes = new ArrayList<>(); - for (XzdSupplierOpenBank bank : xzdSettlementInfo.getOpenBanks()) { - XzdYhxx xzdYhxxBo = new XzdYhxx(); - xzdYhxxBo.setOpenBank(bank.getOpenBank()); - xzdYhxxBo.setBranchName(bank.getBranchName()); - xzdYhxxBo.setMainId(id); - xzdYhxxBo.setSfmr(bank.getIsDefault()); - xzdYhxxBo.setAccount(bank.getAccount()); - xzdYhxxBo.setKhhm(bank.getPersonName()); - xzdYhxxBo.setType("2"); - xzdYhxxes.add(xzdYhxxBo); - - } - xzdYhxxService.saveBatch(xzdYhxxes); + xzdSettlementInfo.getOpenBanks().forEach(openBank -> {openBank.setType("2");openBank.setMainId(id);}); +// ArrayList xzdYhxxes = new ArrayList<>(); +// for (XzdSupplierOpenBank bank : xzdSettlementInfo.getOpenBanks()) { +// XzdYhxx xzdYhxxBo = new XzdYhxx(); +// xzdYhxxBo.setOpenBank(bank.getOpenBank()); +// xzdYhxxBo.setBranchName(bank.getBranchName()); +// xzdYhxxBo.setMainId(id); +// xzdYhxxBo.setSfmr(bank.getIsDefault()); +// xzdYhxxBo.setAccount(bank.getAccount()); +// xzdYhxxBo.setKhhm(bank.getPersonName()); +// xzdYhxxBo.setType("2"); +// xzdYhxxes.add(xzdYhxxBo); +// +// } + xzdYhxxService.saveBatch(xzdSettlementInfo.getOpenBanks()); } xzdSettlementInfoService.save(info); @@ -491,19 +492,21 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList { xzdSettlementInfoService.saveOrUpdate(MapstructUtils.convert(xzdSettlementInfo, XzdSettlementInfo.class)); //开户银行 if(xzdSettlementInfo.getOpenBanks() != null && !xzdSettlementInfo.getOpenBanks().isEmpty()){ - ArrayList xzdYhxxes = new ArrayList<>(); - for (XzdSupplierOpenBank bank : xzdSettlementInfo.getOpenBanks()) { - XzdYhxx xzdYhxxBo = new XzdYhxx(); - xzdYhxxBo.setOpenBank(bank.getOpenBank()); - xzdYhxxBo.setBranchName(bank.getBranchName()); - xzdYhxxBo.setMainId(dto.getXzdCustomerinformation().getId()); - xzdYhxxBo.setSfmr(bank.getIsDefault()); - xzdYhxxBo.setAccount(bank.getAccount()); - xzdYhxxBo.setKhhm(bank.getPersonName()); - xzdYhxxBo.setType("2"); - xzdYhxxes.add(xzdYhxxBo); - } - xzdYhxxService.saveBatch(xzdYhxxes); + xzdSettlementInfo.getOpenBanks().forEach(xzdYhxx -> {xzdYhxx.setType("2"); + xzdYhxx.setMainId(dto.getXzdCustomerinformation().getId());}); +// ArrayList xzdYhxxes = new ArrayList<>(); +// for (XzdYhxx bank : xzdSettlementInfo.getOpenBanks()) { +// XzdYhxx xzdYhxxBo = new XzdYhxx(); +// xzdYhxxBo.setOpenBank(bank.getOpenBank()); +// xzdYhxxBo.setBranchName(bank.getBranchName()); +// xzdYhxxBo.setMainId(dto.getXzdCustomerinformation().getId()); +// xzdYhxxBo.setSfmr(bank.getIsDefault()); +// xzdYhxxBo.setAccount(bank.getAccount()); +// xzdYhxxBo.setKhhm(bank.getPersonName()); +// xzdYhxxBo.setType("2"); +// xzdYhxxes.add(xzdYhxxBo); +// } + xzdYhxxService.saveBatch(xzdSettlementInfo.getOpenBanks()); } } @@ -607,29 +610,29 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList { bankLambdaQueryWrapper.eq(XzdYhxx::getMainId,dto.getXzdCustomerinformation().getId()); List xzdYhxxList = xzdYhxxService.list(bankLambdaQueryWrapper); if (xzdYhxxList!= null && !xzdYhxxList.isEmpty()) { - List openBanks = new ArrayList<>(); - for (XzdYhxx yhxx : xzdYhxxList) { - XzdSupplierOpenBank byId = xzdSupplierOpenBankService.getBaseMapper().selectOne(new LambdaQueryWrapper() - .eq(XzdSupplierOpenBank::getOpenBank, yhxx.getOpenBank()).eq(XzdSupplierOpenBank::getBranchName,yhxx.getBranchName())); - if (byId != null){ - byId.setAccount(yhxx.getAccount()); - byId.setIsDefault(yhxx.getSfmr()); - byId.setPersonName(yhxx.getKhhm()); - openBanks.add(byId); - } - if ( yhxx != null && "1".equals(yhxx.getSfmr())){ - if (byId!= null){ - dto.getXzdSettlementInfo().setOpeningBank(byId.getOpenBank()); - dto.getXzdSettlementInfo().setAccountNumber(byId.getAccount()); - dto.getXzdSettlementInfo().setAccountName(byId.getOpenBank()); - }else { - dto.getXzdSettlementInfo().setOpeningBank("暂无数据"); - dto.getXzdSettlementInfo().setAccountNumber("暂无数据"); - dto.getXzdSettlementInfo().setAccountName("暂无数据"); - } - } - } - dto.getXzdSettlementInfo().setOpenBanks(openBanks); +// List openBanks = new ArrayList<>(); +// for (XzdYhxx yhxx : xzdYhxxList) { +// XzdSupplierOpenBank byId = xzdSupplierOpenBankService.getBaseMapper().selectOne(new LambdaQueryWrapper() +// .eq(XzdSupplierOpenBank::getOpenBank, yhxx.getOpenBank()).eq(XzdSupplierOpenBank::getBranchName,yhxx.getBranchName())); +// if (byId != null){ +// byId.setAccount(yhxx.getAccount()); +// byId.setIsDefault(yhxx.getSfmr()); +// byId.setPersonName(yhxx.getKhhm()); +// openBanks.add(byId); +// } +// if ( yhxx != null && "1".equals(yhxx.getSfmr())){ +// if (byId!= null){ +// dto.getXzdSettlementInfo().setOpeningBank(byId.getOpenBank()); +// dto.getXzdSettlementInfo().setAccountNumber(byId.getAccount()); +// dto.getXzdSettlementInfo().setAccountName(byId.getOpenBank()); +// }else { +// dto.getXzdSettlementInfo().setOpeningBank("暂无数据"); +// dto.getXzdSettlementInfo().setAccountNumber("暂无数据"); +// dto.getXzdSettlementInfo().setAccountName("暂无数据"); +// } +// } +// } + dto.getXzdSettlementInfo().setOpenBanks(xzdYhxxList); } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJinduController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJinduController.java new file mode 100644 index 00000000..f01ff848 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJinduController.java @@ -0,0 +1,154 @@ +package org.dromara.xzd.settlement.controller; + +import java.util.List; + +import cn.dev33.satoken.annotation.SaMode; +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.xzd.comprehensive.domain.bo.XzdSjContractInfoBo; +import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractInformationVo; +import org.dromara.xzd.comprehensive.domain.vo.XzdSjContractInfoVo; +import org.dromara.xzd.comprehensive.service.IXzdCsContractInformationService; +import org.dromara.xzd.comprehensive.service.IXzdSjContractInfoService; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.bo.XzdPurchaseContractInformationBo; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; +import org.dromara.xzd.domain.bo.XzdBusinessSealBo; +import org.dromara.xzd.domain.vo.XzdBusinessSealVo; +import org.dromara.xzd.service.IXzdBusinessSealService; +import org.springframework.context.annotation.Lazy; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJinduVo; +import org.dromara.xzd.settlement.domain.bo.XzdJsSjJinduBo; +import org.dromara.xzd.settlement.service.IXzdJsSjJinduService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 设计合同进度结算 + * + * @author Lion Li + * @date 2025-11-20 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/xzd/settlement/jsSjJindu") +public class XzdJsSjJinduController extends BaseController { + + private final IXzdJsSjJinduService xzdJsSjJinduService; + + @Lazy + private final IXzdSjContractInfoService xzdSjContractInfoService; + + + private final IXzdBusinessSealService xzdBusinessSealService; + + /** + * 查询印章帮助列表 + */ + @SaCheckPermission(value = {"settlement:jsSjJindu:add","settlement:jsSjJindu:edit","settlement:jsSjJindu:list"},mode = SaMode.OR) + @GetMapping("/businessSealList") + public TableDataInfo list(XzdBusinessSealBo bo, PageQuery pageQuery) { + return xzdBusinessSealService.queryPageList(bo, pageQuery); + } + + + /** + * 获取设计合同信息详细信息 + * + * @param id 主键 + */ + @SaCheckPermission(value = {"settlement:jsSjJindu:add","settlement:jsSjJindu:edit"},mode = SaMode.OR) + @GetMapping("/get/{id}") + public R getCsContractInformationInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdSjContractInfoService.queryById(id)); + } + + /** + * 查询采购合同信息列表 + */ + @SaCheckPermission(value = {"settlement:jsSjJindu:list","settlement:jsSjJindu:add","settlement:jsSjJindu:edit"}, mode = SaMode.OR) + @GetMapping("/getList") + public TableDataInfo list(XzdSjContractInfoBo bo, PageQuery pageQuery) { + return xzdSjContractInfoService.queryPageList(bo, pageQuery); + } + + /** + * 查询设计合同进度结算列表 + */ + @SaCheckPermission("settlement:jsSjJindu:list") + @GetMapping("/list") + public TableDataInfo list(XzdJsSjJinduBo bo, PageQuery pageQuery) { + return xzdJsSjJinduService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计合同进度结算列表 + */ + @SaCheckPermission("settlement:jsSjJindu:export") + @Log(title = "设计合同进度结算", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdJsSjJinduBo bo, HttpServletResponse response) { + List list = xzdJsSjJinduService.queryList(bo); + ExcelUtil.exportExcel(list, "设计合同进度结算", XzdJsSjJinduVo.class, response); + } + + /** + * 获取设计合同进度结算详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsSjJindu:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdJsSjJinduService.queryById(id)); + } + + /** + * 新增设计合同进度结算 + */ + @SaCheckPermission("settlement:jsSjJindu:add") + @Log(title = "设计合同进度结算", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdJsSjJinduBo bo) { + return toAjax(xzdJsSjJinduService.insertByBo(bo)); + } + + /** + * 修改设计合同进度结算 + */ + @SaCheckPermission("settlement:jsSjJindu:edit") + @Log(title = "设计合同进度结算", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdJsSjJinduBo bo) { + return toAjax(xzdJsSjJinduService.updateByBo(bo)); + } + + /** + * 删除设计合同进度结算 + * + * @param ids 主键串 + */ + @SaCheckPermission("settlement:jsSjJindu:remove") + @Log(title = "设计合同进度结算", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsSjJinduService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJungonController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJungonController.java new file mode 100644 index 00000000..25a367d3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsSjJungonController.java @@ -0,0 +1,150 @@ +package org.dromara.xzd.settlement.controller; + +import java.util.List; + +import cn.dev33.satoken.annotation.SaMode; +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.xzd.comprehensive.domain.bo.XzdSjContractInfoBo; +import org.dromara.xzd.comprehensive.domain.vo.XzdSjContractInfoVo; +import org.dromara.xzd.comprehensive.service.IXzdSjContractInfoService; +import org.dromara.xzd.domain.bo.XzdBusinessSealBo; +import org.dromara.xzd.domain.vo.XzdBusinessSealVo; +import org.dromara.xzd.service.IXzdBusinessSealService; +import org.springframework.context.annotation.Lazy; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJungonVo; +import org.dromara.xzd.settlement.domain.bo.XzdJsSjJungonBo; +import org.dromara.xzd.settlement.service.IXzdJsSjJungonService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 设计合同竣工结算 + * + * @author Lion Li + * @date 2025-11-20 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/xzd/settlement/jsSjJungon") +public class XzdJsSjJungonController extends BaseController { + + private final IXzdJsSjJungonService xzdJsSjJungonService; + + @Lazy + private final IXzdSjContractInfoService xzdSjContractInfoService; + + + private final IXzdBusinessSealService xzdBusinessSealService; + + /** + * 查询印章帮助列表 + */ + @SaCheckPermission(value = {"settlement:jsSjJungon:add","settlement:jsSjJungon:edit","settlement:jsSjJungon:list"},mode = SaMode.OR) + @GetMapping("/businessSealList") + public TableDataInfo list(XzdBusinessSealBo bo, PageQuery pageQuery) { + return xzdBusinessSealService.queryPageList(bo, pageQuery); + } + + + /** + * 获取设计合同信息详细信息 + * + * @param id 主键 + */ + @SaCheckPermission(value = {"settlement:jsSjJungon:add","settlement:jsSjJungon:edit"},mode = SaMode.OR) + @GetMapping("/get/{id}") + public R getCsContractInformationInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdSjContractInfoService.queryById(id)); + } + + /** + * 查询设计合同信息列表 + */ + @SaCheckPermission(value = {"settlement:jsSjJungon:list","settlement:jsSjJungon:add","settlement:jsSjJungon:edit"}, mode = SaMode.OR) + @GetMapping("/getList") + public TableDataInfo list(XzdSjContractInfoBo bo, PageQuery pageQuery) { + return xzdSjContractInfoService.queryPageList(bo, pageQuery); + } + + /** + * 查询设计合同竣工结算列表 + */ + @SaCheckPermission("settlement:jsSjJungon:list") + @GetMapping("/list") + public TableDataInfo list(XzdJsSjJungonBo bo, PageQuery pageQuery) { + return xzdJsSjJungonService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计合同竣工结算列表 + */ + @SaCheckPermission("settlement:jsSjJungon:export") + @Log(title = "设计合同竣工结算", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdJsSjJungonBo bo, HttpServletResponse response) { + List list = xzdJsSjJungonService.queryList(bo); + ExcelUtil.exportExcel(list, "设计合同竣工结算", XzdJsSjJungonVo.class, response); + } + + /** + * 获取设计合同竣工结算详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("settlement:jsSjJungon:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdJsSjJungonService.queryById(id)); + } + + /** + * 新增设计合同竣工结算 + */ + @SaCheckPermission("settlement:jsSjJungon:add") + @Log(title = "设计合同竣工结算", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdJsSjJungonBo bo) { + return toAjax(xzdJsSjJungonService.insertByBo(bo)); + } + + /** + * 修改设计合同竣工结算 + */ + @SaCheckPermission("settlement:jsSjJungon:edit") + @Log(title = "设计合同竣工结算", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdJsSjJungonBo bo) { + return toAjax(xzdJsSjJungonService.updateByBo(bo)); + } + + /** + * 删除设计合同竣工结算 + * + * @param ids 主键串 + */ + @SaCheckPermission("settlement:jsSjJungon:remove") + @Log(title = "设计合同竣工结算", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdJsSjJungonService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java index efa180bc..243bbe09 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/controller/XzdJsZhfwJinduController.java @@ -66,7 +66,7 @@ public class XzdJsZhfwJinduController extends BaseController { * * @param id 主键 */ - @SaCheckPermission(value = {"settlement:jsZhfwJindu:add","settlement:jsZhfwJindu:edit" },mode = SaMode.OR) + @SaCheckPermission(value = {"settlement:jsZhfwJindu:add","settlement:jsZhfwJindu:edit"},mode = SaMode.OR) @GetMapping("/get/{id}") public R getCsContractInformationInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJindu.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJindu.java new file mode 100644 index 00000000..89817ff5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJindu.java @@ -0,0 +1,173 @@ +package org.dromara.xzd.settlement.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 设计合同进度结算对象 xzd_js_sj_jindu + * + * @author Lion Li + * @date 2025-11-20 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_js_sj_jindu") +public class XzdJsSjJindu extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID,自增 + */ + @TableId(value = "id") + private Long id; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编码(带*,必填) + */ + private String docCode; + + /** + * 标题(带*,必填) + */ + private String title; + + /** + * 单据日期(带*,必填) + */ + private LocalDate docDate; + + /** + * 合同编码(ID) + */ + private Long contractCode; + + /** + * 合同名称(关联合同后显示) + */ + private String contractName; + + /** + * 统计周期(带*,必填,下拉选择) + */ + private String statCycle; + + /** + * 计量开始(带*,必填) + */ + private LocalDate measureStart; + + /** + * 项目(带*,必填) + */ + private String project; + + /** + * 审批金额(默认0.00) + */ + private BigDecimal approveAmount; + + /** + * 计量结束(带*,必填) + */ + private LocalDate measureEnd; + + /** + * 结算单位(带查询,关联单位表) + */ + private Long settlementUnit; + + /** + * 合同金额(默认0.00) + */ + private BigDecimal contractAmount; + + /** + * 累计结算金额(不含本期)(默认0.00) + */ + private BigDecimal totalSettlementExcludeCurrent; + + /** + * 累计结算金额(含本期)(默认0.00) + */ + private BigDecimal totalSettlementIncludeCurrent; + + /** + * 本次结算比例(默认0.00%) + */ + private BigDecimal currentSettlementRatio; + + /** + * 已结算比例(不含本期)(默认0.00%) + */ + private BigDecimal settledRatioExcludeCurrent; + + /** + * 截止本期结算比例(默认0.00%) + */ + private BigDecimal settlementRatioUntilCurrent; + + /** + * 备注(长文本) + */ + private String remark; + + /** + * 实时刷新(复选框,0=未勾选,1=勾选) + */ + private Long realTimeRefresh; + + /** + * 合同含税金额(默认0.00) + */ + private BigDecimal contractTaxInclAmount; + + /** + * 合同不含税金额(默认0.00) + */ + private BigDecimal contractTaxExclAmount; + + /** + * 累计结算金额(默认0.00) + */ + private BigDecimal totalSettledAmount; + + /** + * 本期扣款金额(默认0.00) + */ + private BigDecimal currentDeductionAmount; + + /** + * 本期奖励金额(默认0.00) + */ + private BigDecimal currentRewardAmount; + + /** + * 单据引用 + */ + private String documentReference; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 文件ID + */ + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJungon.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJungon.java new file mode 100644 index 00000000..b423e7ff --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/XzdJsSjJungon.java @@ -0,0 +1,148 @@ +package org.dromara.xzd.settlement.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 设计合同竣工结算对象 xzd_js_sj_jungon + * + * @author Lion Li + * @date 2025-11-20 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_js_sj_jungon") +public class XzdJsSjJungon extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID,自增 + */ + @TableId(value = "id") + private Long id; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编号(带*,必填) + */ + private String docCode; + + /** + * 标题(带*,必填) + */ + private String title; + + /** + * 单据日期(带*,必填) + */ + private LocalDate docDate; + + /** + * 合同编号(ID) + */ + private Long contractCode; + + /** + * 合同名称(关联合同后显示) + */ + private String contractName; + + /** + * 决算金额 + */ + private BigDecimal finalAmount; + + /** + * 本期决算总额 + */ + private BigDecimal currentPeriodTotal; + + /** + * 本期扣款金额 + */ + private BigDecimal currentDeduction; + + /** + * 本期奖励金额 + */ + private BigDecimal currentReward; + + /** + * 审定日期 + */ + private LocalDate approveDate; + + /** + * 工程项目(带*,关联项目表) + */ + private Long projectId; + + /** + * 统计周期(下拉选择,如“2025年10月”) + */ + private String statCycle; + + /** + * 甲方单位 + */ + private Long partyA; + + /** + * 乙方单位 + */ + private Long partyB; + + /** + * 备注 + */ + private String remark; + + /** + * 集采模式 + */ + private Long procurementMode; + + /** + * 业主单位(带查询,关联单位表) + */ + private Long ownerUnit; + + /** + * 监理单位(带查询,关联单位表) + */ + private Long supervisionUnit; + + /** + * 审核单位(带查询,关联单位表) + */ + private Long auditUnit; + + /** + * 单据引用 + */ + private String documentReference; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 文件ID + */ + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJinduBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJinduBo.java new file mode 100644 index 00000000..84d2dcee --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJinduBo.java @@ -0,0 +1,203 @@ +package org.dromara.xzd.settlement.domain.bo; + +import org.dromara.xzd.settlement.domain.XzdAlterationInventory; +import org.dromara.xzd.settlement.domain.XzdContractInventory; +import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; +import org.dromara.xzd.settlement.domain.XzdJsSjJindu; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + +/** + * 设计合同进度结算业务对象 xzd_js_sj_jindu + * + * @author Lion Li + * @date 2025-11-20 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdJsSjJindu.class, reverseConvertGenerate = false) +public class XzdJsSjJinduBo extends BaseEntity { + + /** + * 主键ID,自增 + */ + @NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编码(带*,必填) + */ + @NotBlank(message = "单据编码(带*,必填)不能为空", groups = { EditGroup.class }) + private String docCode; + + /** + * 标题(带*,必填) + */ + @NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String title; + + /** + * 单据日期(带*,必填) + */ + @NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private LocalDate docDate; + + /** + * 合同编码(ID) + */ + private Long contractCode; + + /** + * 合同名称(关联合同后显示) + */ + private String contractName; + + /** + * 统计周期(带*,必填,下拉选择) + */ + @NotBlank(message = "统计周期(带*,必填,下拉选择)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String statCycle; + + /** + * 计量开始(带*,必填) + */ + @NotNull(message = "计量开始(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private LocalDate measureStart; + + /** + * 项目(带*,必填) + */ + @NotBlank(message = "项目(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String project; + + /** + * 审批金额(默认0.00) + */ + private BigDecimal approveAmount; + + /** + * 计量结束(带*,必填) + */ + @NotNull(message = "计量结束(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private LocalDate measureEnd; + + /** + * 结算单位(带查询,关联单位表) + */ + private Long settlementUnit; + + /** + * 合同金额(默认0.00) + */ + private BigDecimal contractAmount; + + /** + * 累计结算金额(不含本期)(默认0.00) + */ + private BigDecimal totalSettlementExcludeCurrent; + + /** + * 累计结算金额(含本期)(默认0.00) + */ + private BigDecimal totalSettlementIncludeCurrent; + + /** + * 本次结算比例(默认0.00%) + */ + private BigDecimal currentSettlementRatio; + + /** + * 已结算比例(不含本期)(默认0.00%) + */ + private BigDecimal settledRatioExcludeCurrent; + + /** + * 截止本期结算比例(默认0.00%) + */ + private BigDecimal settlementRatioUntilCurrent; + + /** + * 备注(长文本) + */ + private String remark; + + /** + * 实时刷新(复选框,0=未勾选,1=勾选) + */ + private Long realTimeRefresh; + + /** + * 合同含税金额(默认0.00) + */ + private BigDecimal contractTaxInclAmount; + + /** + * 合同不含税金额(默认0.00) + */ + private BigDecimal contractTaxExclAmount; + + /** + * 累计结算金额(默认0.00) + */ + private BigDecimal totalSettledAmount; + + /** + * 本期扣款金额(默认0.00) + */ + private BigDecimal currentDeductionAmount; + + /** + * 本期奖励金额(默认0.00) + */ + private BigDecimal currentRewardAmount; + + /** + * 单据引用 + */ + private String documentReference; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 文件ID + */ + private String fileId; + + /** + * 奖励与扣款 + */ + List kkyjlx; + + /** + * 合同内清单 + */ + List htnqd; + + /** + * 变更增加清单 + */ + List bgzjqd; + + /** + * 合同外清单 + */ + List htwqd; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJungonBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJungonBo.java new file mode 100644 index 00000000..b0411762 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/bo/XzdJsSjJungonBo.java @@ -0,0 +1,164 @@ +package org.dromara.xzd.settlement.domain.bo; + +import org.dromara.xzd.settlement.domain.XzdJsCghtJstzqd; +import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; +import org.dromara.xzd.settlement.domain.XzdJsSjJungon; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + +/** + * 设计合同竣工结算业务对象 xzd_js_sj_jungon + * + * @author Lion Li + * @date 2025-11-20 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdJsSjJungon.class, reverseConvertGenerate = false) +public class XzdJsSjJungonBo extends BaseEntity { + + /** + * 主键ID,自增 + */ + @NotNull(message = "主键ID,自增不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 部门id + */ + private Long deptId; + + /** + * 单据编号(带*,必填) + */ + @NotBlank(message = "单据编号(带*,必填)不能为空", groups = { EditGroup.class }) + private String docCode; + + /** + * 标题(带*,必填) + */ + @NotBlank(message = "标题(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String title; + + /** + * 单据日期(带*,必填) + */ + @NotNull(message = "单据日期(带*,必填)不能为空", groups = { AddGroup.class, EditGroup.class }) + private LocalDate docDate; + + /** + * 合同编号(ID) + */ + private Long contractCode; + + /** + * 合同名称(关联合同后显示) + */ + private String contractName; + + /** + * 决算金额 + */ + private BigDecimal finalAmount; + + /** + * 本期决算总额 + */ + private BigDecimal currentPeriodTotal; + + /** + * 本期扣款金额 + */ + private BigDecimal currentDeduction; + + /** + * 本期奖励金额 + */ + private BigDecimal currentReward; + + /** + * 审定日期 + */ + private LocalDate approveDate; + + /** + * 工程项目(带*,关联项目表) + */ + @NotNull(message = "工程项目(带*,关联项目表)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 统计周期(下拉选择,如“2025年10月”) + */ + private String statCycle; + + /** + * 甲方单位 + */ + private Long partyA; + + /** + * 乙方单位 + */ + private Long partyB; + + /** + * 备注 + */ + private String remark; + + /** + * 集采模式 + */ + private Long procurementMode; + + /** + * 业主单位(带查询,关联单位表) + */ + private Long ownerUnit; + + /** + * 监理单位(带查询,关联单位表) + */ + private Long supervisionUnit; + + /** + * 审核单位(带查询,关联单位表) + */ + private Long auditUnit; + + /** + * 单据引用 + */ + private String documentReference; + + /** + * 审核状态 + */ + private String auditStatus; + + /** + * 文件ID + */ + private String fileId; + + /** + * 奖励与扣款 + */ + List kkyjlx; + + /** + * 决算清单 + */ + List jsqd; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJinduVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJinduVo.java new file mode 100644 index 00000000..e9bb645c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJinduVo.java @@ -0,0 +1,265 @@ +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; +import org.dromara.xzd.settlement.domain.XzdJsSjJindu; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; +import java.util.List; + + +/** + * 设计合同进度结算视图对象 xzd_js_sj_jindu + * + * @author Lion Li + * @date 2025-11-20 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdJsSjJindu.class) +public class XzdJsSjJinduVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID,自增 + */ + @ExcelProperty(value = "主键ID,自增") + private Long id; + + /** + * 部门id + */ + @ExcelProperty(value = "部门id") + private Long deptId; + + /** + * 单据编码(带*,必填) + */ + @ExcelProperty(value = "单据编码", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String docCode; + + /** + * 标题(带*,必填) + */ + @ExcelProperty(value = "标题", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String title; + + /** + * 单据日期(带*,必填) + */ + @ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private LocalDate docDate; + + /** + * 合同编码(ID) + */ + @ExcelProperty(value = "合同编码", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "I=D") + private Long contractCode; + @Translation(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME, mapper = "contractCode") + private String contractCodeName; + + /** + * 合同名称(关联合同后显示) + */ + @ExcelProperty(value = "合同名称", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "关=联合同后显示") + private String contractName; + + /** + * 统计周期(带*,必填,下拉选择) + */ + @ExcelProperty(value = "统计周期", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填,下拉选择") + private String statCycle; + + /** + * 计量开始(带*,必填) + */ + @ExcelProperty(value = "计量开始", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private LocalDate measureStart; + + /** + * 项目(带*,必填) + */ + @ExcelProperty(value = "项目", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String project; + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project") + private String projectName; + + /** + * 审批金额(默认0.00) + */ + @ExcelProperty(value = "审批金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal approveAmount; + + /** + * 计量结束(带*,必填) + */ + @ExcelProperty(value = "计量结束", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private LocalDate measureEnd; + + /** + * 结算单位(带查询,关联单位表) + */ + @ExcelProperty(value = "结算单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") + private Long settlementUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "settlementUnit") + private String settlementUnitName; + + /** + * 合同金额(默认0.00) + */ + @ExcelProperty(value = "合同金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal contractAmount; + + /** + * 累计结算金额(不含本期)(默认0.00) + */ + @ExcelProperty(value = "累计结算金额(不含本期)", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal totalSettlementExcludeCurrent; + + /** + * 累计结算金额(含本期)(默认0.00) + */ + @ExcelProperty(value = "累计结算金额(含本期)", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal totalSettlementIncludeCurrent; + + /** + * 本次结算比例(默认0.00%) + */ + @ExcelProperty(value = "本次结算比例", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00%") + private BigDecimal currentSettlementRatio; + + /** + * 已结算比例(不含本期)(默认0.00%) + */ + @ExcelProperty(value = "已结算比例(不含本期)", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00%") + private BigDecimal settledRatioExcludeCurrent; + + /** + * 截止本期结算比例(默认0.00%) + */ + @ExcelProperty(value = "截止本期结算比例", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00%") + private BigDecimal settlementRatioUntilCurrent; + + /** + * 备注(长文本) + */ + @ExcelProperty(value = "备注", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "长=文本") + private String remark; + + /** + * 实时刷新(复选框,0=未勾选,1=勾选) + */ + @ExcelProperty(value = "实时刷新", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "复=选框,0=未勾选,1=勾选") + private Long realTimeRefresh; + + /** + * 合同含税金额(默认0.00) + */ + @ExcelProperty(value = "合同含税金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal contractTaxInclAmount; + + /** + * 合同不含税金额(默认0.00) + */ + @ExcelProperty(value = "合同不含税金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal contractTaxExclAmount; + + /** + * 累计结算金额(默认0.00) + */ + @ExcelProperty(value = "累计结算金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal totalSettledAmount; + + /** + * 本期扣款金额(默认0.00) + */ + @ExcelProperty(value = "本期扣款金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal currentDeductionAmount; + + /** + * 本期奖励金额(默认0.00) + */ + @ExcelProperty(value = "本期奖励金额", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "默=认0.00") + private BigDecimal currentRewardAmount; + + /** + * 单据引用 + */ + @ExcelProperty(value = "单据引用") + private String documentReference; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private String fileId; + + + /** + * 奖励与扣款 + */ + List kkyjlx; + + /** + * 合同内清单 + */ + List htnqd; + + /** + * 变更增加清单 + */ + List bgzjqd; + + /** + * 合同外清单 + */ + List htwqd; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJungonVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJungonVo.java new file mode 100644 index 00000000..39a7fd52 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/domain/vo/XzdJsSjJungonVo.java @@ -0,0 +1,218 @@ +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.XzdJsCghtJstzqd; +import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; +import org.dromara.xzd.settlement.domain.XzdJsSjJungon; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; +import java.util.List; + + +/** + * 设计合同竣工结算视图对象 xzd_js_sj_jungon + * + * @author Lion Li + * @date 2025-11-20 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdJsSjJungon.class) +public class XzdJsSjJungonVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID,自增 + */ + @ExcelProperty(value = "主键ID,自增") + private Long id; + + /** + * 部门id + */ + @ExcelProperty(value = "部门id") + private Long deptId; + + /** + * 单据编号(带*,必填) + */ + @ExcelProperty(value = "单据编号", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String docCode; + + /** + * 标题(带*,必填) + */ + @ExcelProperty(value = "标题", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private String title; + + /** + * 单据日期(带*,必填) + */ + @ExcelProperty(value = "单据日期", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,必填") + private LocalDate docDate; + + /** + * 合同编号(ID) + */ + @ExcelProperty(value = "合同编号", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "I=D") + private Long contractCode; + @Translation(type = TransConstant.XZD_SJ_CONTRACT_INFO_ID_TO_NAME, mapper = "contractCode") + private String contractCodeName; + + /** + * 合同名称(关联合同后显示) + */ + @ExcelProperty(value = "合同名称", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "关=联合同后显示") + private String contractName; + + /** + * 决算金额 + */ + @ExcelProperty(value = "决算金额") + private BigDecimal finalAmount; + + /** + * 本期决算总额 + */ + @ExcelProperty(value = "本期决算总额") + private BigDecimal currentPeriodTotal; + + /** + * 本期扣款金额 + */ + @ExcelProperty(value = "本期扣款金额") + private BigDecimal currentDeduction; + + /** + * 本期奖励金额 + */ + @ExcelProperty(value = "本期奖励金额") + private BigDecimal currentReward; + + /** + * 审定日期 + */ + @ExcelProperty(value = "审定日期") + private LocalDate approveDate; + + /** + * 工程项目(带*,关联项目表) + */ + @ExcelProperty(value = "工程项目", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=*,关联项目表") + private Long projectId; + + @Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "projectId") + private String projectName; + + /** + * 统计周期(下拉选择,如“2025年10月”) + */ + @ExcelProperty(value = "统计周期", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "下=拉选择,如“2025年10月”") + private String statCycle; + + /** + * 甲方单位 + */ + @ExcelProperty(value = "甲方单位") + private Long partyA; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyA") + private String partyAName; + + /** + * 乙方单位 + */ + @ExcelProperty(value = "乙方单位") + private Long partyB; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyB") + private String partyBName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 集采模式 + */ + @ExcelProperty(value = "集采模式") + private Long procurementMode; + + /** + * 业主单位(带查询,关联单位表) + */ + @ExcelProperty(value = "业主单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") + private Long ownerUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "ownerUnit") + private String ownerUnitName; + + /** + * 监理单位(带查询,关联单位表) + */ + @ExcelProperty(value = "监理单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") + private Long supervisionUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "supervisionUnit") + private String supervisionUnitName; + + /** + * 审核单位(带查询,关联单位表) + */ + @ExcelProperty(value = "审核单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "带=查询,关联单位表") + private Long auditUnit; + @Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "auditUnit") + private String auditUnitName; + + /** + * 单据引用 + */ + @ExcelProperty(value = "单据引用") + private String documentReference; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private String fileId; + + /** + * 奖励与扣款 + */ + List kkyjlx; + + /** + * 决算清单 + */ + List jsqd; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJinduMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJinduMapper.java new file mode 100644 index 00000000..e17bdeea --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJinduMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.settlement.mapper; + +import org.dromara.xzd.settlement.domain.XzdJsSjJindu; +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJinduVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计合同进度结算Mapper接口 + * + * @author Lion Li + * @date 2025-11-20 + */ +public interface XzdJsSjJinduMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJungonMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJungonMapper.java new file mode 100644 index 00000000..3d129f52 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/mapper/XzdJsSjJungonMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.settlement.mapper; + +import org.dromara.xzd.settlement.domain.XzdJsSjJungon; +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJungonVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计合同竣工结算Mapper接口 + * + * @author Lion Li + * @date 2025-11-20 + */ +public interface XzdJsSjJungonMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJinduService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJinduService.java new file mode 100644 index 00000000..d5e6adc0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJinduService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.settlement.service; + +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJinduVo; +import org.dromara.xzd.settlement.domain.bo.XzdJsSjJinduBo; +import org.dromara.xzd.settlement.domain.XzdJsSjJindu; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 设计合同进度结算Service接口 + * + * @author Lion Li + * @date 2025-11-20 + */ +public interface IXzdJsSjJinduService extends IService{ + + /** + * 查询设计合同进度结算 + * + * @param id 主键 + * @return 设计合同进度结算 + */ + XzdJsSjJinduVo queryById(Long id); + + /** + * 分页查询设计合同进度结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同进度结算分页列表 + */ + TableDataInfo queryPageList(XzdJsSjJinduBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计合同进度结算列表 + * + * @param bo 查询条件 + * @return 设计合同进度结算列表 + */ + List queryList(XzdJsSjJinduBo bo); + + /** + * 新增设计合同进度结算 + * + * @param bo 设计合同进度结算 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdJsSjJinduBo bo); + + /** + * 修改设计合同进度结算 + * + * @param bo 设计合同进度结算 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdJsSjJinduBo bo); + + /** + * 校验并批量删除设计合同进度结算信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJungonService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJungonService.java new file mode 100644 index 00000000..b7e318a8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/IXzdJsSjJungonService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.settlement.service; + +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJungonVo; +import org.dromara.xzd.settlement.domain.bo.XzdJsSjJungonBo; +import org.dromara.xzd.settlement.domain.XzdJsSjJungon; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 设计合同竣工结算Service接口 + * + * @author Lion Li + * @date 2025-11-20 + */ +public interface IXzdJsSjJungonService extends IService{ + + /** + * 查询设计合同竣工结算 + * + * @param id 主键 + * @return 设计合同竣工结算 + */ + XzdJsSjJungonVo queryById(Long id); + + /** + * 分页查询设计合同竣工结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同竣工结算分页列表 + */ + TableDataInfo queryPageList(XzdJsSjJungonBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计合同竣工结算列表 + * + * @param bo 查询条件 + * @return 设计合同竣工结算列表 + */ + List queryList(XzdJsSjJungonBo bo); + + /** + * 新增设计合同竣工结算 + * + * @param bo 设计合同竣工结算 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdJsSjJungonBo bo); + + /** + * 修改设计合同竣工结算 + * + * @param bo 设计合同竣工结算 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdJsSjJungonBo bo); + + /** + * 校验并批量删除设计合同竣工结算信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} 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 e6972aeb..db2e122a 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 @@ -86,8 +86,9 @@ public class XzdJsCgJungonServiceImpl extends ServiceImpl implements IXzdJsSjJinduService { + + private final XzdJsSjJinduMapper baseMapper; + + @Autowired + private SysOssServiceImpl sysOssService; + + + @Autowired + private IXzdJsDeductionItemsService deductionItemsService; + + @Autowired + private IXzdContractInventoryService contractInventoryService; + + @Autowired + private IXzdAlterationInventoryService alterationInventoryService; + + /** + * 查询设计合同进度结算 + * + * @param id 主键 + * @return 设计合同进度结算 + */ + @Override + public XzdJsSjJinduVo queryById(Long id){ + XzdJsSjJinduVo vo = baseMapper.selectVoById(id); + if (vo != null){ + getHttk(vo); + } + return vo; + } + + /** + * 分页查询设计合同进度结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同进度结算分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdJsSjJinduBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计合同进度结算列表 + * + * @param bo 查询条件 + * @return 设计合同进度结算列表 + */ + @Override + public List queryList(XzdJsSjJinduBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsSjJinduBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdJsSjJindu::getId); + lqw.eq(bo.getDeptId() != null, XzdJsSjJindu::getDeptId, bo.getDeptId()); + lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdJsSjJindu::getDocCode, bo.getDocCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdJsSjJindu::getTitle, bo.getTitle()); + lqw.eq(bo.getDocDate() != null, XzdJsSjJindu::getDocDate, bo.getDocDate()); + lqw.eq(bo.getContractCode() != null, XzdJsSjJindu::getContractCode, bo.getContractCode()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdJsSjJindu::getContractName, bo.getContractName()); + lqw.eq(StringUtils.isNotBlank(bo.getStatCycle()), XzdJsSjJindu::getStatCycle, bo.getStatCycle()); + lqw.eq(bo.getMeasureStart() != null, XzdJsSjJindu::getMeasureStart, bo.getMeasureStart()); + lqw.eq(StringUtils.isNotBlank(bo.getProject()), XzdJsSjJindu::getProject, bo.getProject()); + lqw.eq(bo.getApproveAmount() != null, XzdJsSjJindu::getApproveAmount, bo.getApproveAmount()); + lqw.eq(bo.getMeasureEnd() != null, XzdJsSjJindu::getMeasureEnd, bo.getMeasureEnd()); + lqw.eq(bo.getSettlementUnit() != null, XzdJsSjJindu::getSettlementUnit, bo.getSettlementUnit()); + lqw.eq(bo.getContractAmount() != null, XzdJsSjJindu::getContractAmount, bo.getContractAmount()); + lqw.eq(bo.getTotalSettlementExcludeCurrent() != null, XzdJsSjJindu::getTotalSettlementExcludeCurrent, bo.getTotalSettlementExcludeCurrent()); + lqw.eq(bo.getTotalSettlementIncludeCurrent() != null, XzdJsSjJindu::getTotalSettlementIncludeCurrent, bo.getTotalSettlementIncludeCurrent()); + lqw.eq(bo.getCurrentSettlementRatio() != null, XzdJsSjJindu::getCurrentSettlementRatio, bo.getCurrentSettlementRatio()); + lqw.eq(bo.getSettledRatioExcludeCurrent() != null, XzdJsSjJindu::getSettledRatioExcludeCurrent, bo.getSettledRatioExcludeCurrent()); + lqw.eq(bo.getSettlementRatioUntilCurrent() != null, XzdJsSjJindu::getSettlementRatioUntilCurrent, bo.getSettlementRatioUntilCurrent()); + lqw.eq(bo.getRealTimeRefresh() != null, XzdJsSjJindu::getRealTimeRefresh, bo.getRealTimeRefresh()); + lqw.eq(bo.getContractTaxInclAmount() != null, XzdJsSjJindu::getContractTaxInclAmount, bo.getContractTaxInclAmount()); + lqw.eq(bo.getContractTaxExclAmount() != null, XzdJsSjJindu::getContractTaxExclAmount, bo.getContractTaxExclAmount()); + lqw.eq(bo.getTotalSettledAmount() != null, XzdJsSjJindu::getTotalSettledAmount, bo.getTotalSettledAmount()); + lqw.eq(bo.getCurrentDeductionAmount() != null, XzdJsSjJindu::getCurrentDeductionAmount, bo.getCurrentDeductionAmount()); + lqw.eq(bo.getCurrentRewardAmount() != null, XzdJsSjJindu::getCurrentRewardAmount, bo.getCurrentRewardAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdJsSjJindu::getDocumentReference, bo.getDocumentReference()); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdJsSjJindu::getAuditStatus, bo.getAuditStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdJsSjJindu::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增设计合同进度结算 + * + * @param bo 设计合同进度结算 + * @return 是否新增成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(XzdJsSjJinduBo bo) { + XzdJsSjJindu add = MapstructUtils.convert(bo, XzdJsSjJindu.class); + validEntityBeforeSave(add); + String banBen = BatchNumberGenerator.generateBatchNumber("JSSJJD-"); + add.setDocCode(banBen); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + + String tableName = XzdClassEnum.XZD_JS_SJ_JINDU.getClassName(); + if (bo.getKkyjlx() != null && !bo.getKkyjlx().isEmpty()) { + //合同条款-扣款与奖励项 + for (XzdJsDeductionItems kkyjlx : bo.getKkyjlx()) { + kkyjlx.setTableName(tableName); + kkyjlx.setMainDocId(add.getId()); + } + deductionItemsService.saveBatch(bo.getKkyjlx()); + } + + //变更增加清单 + if (bo.getBgzjqd() != null && !bo.getBgzjqd().isEmpty()) { + bo.getBgzjqd().forEach(item -> {item.setPrimaryMeterId(add.getId());}); + alterationInventoryService.saveBatch(bo.getBgzjqd()); + } + List list = new ArrayList<>(); + //合同内清单和合同外清单 + if (bo.getHtnqd() != null && !bo.getHtnqd().isEmpty()) { + list.addAll(bo.getHtnqd()); + } + if (bo.getHtwqd() != null && !bo.getHtwqd().isEmpty()) { + list.addAll(bo.getHtwqd()); + } + if (!list.isEmpty()) { + list.forEach(item -> {item.setPrimaryMeterId(add.getId());}); + contractInventoryService.saveBatch(list); + } + return flag; + } + + /** + * 修改设计合同进度结算 + * + * @param bo 设计合同进度结算 + * @return 是否修改成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateByBo(XzdJsSjJinduBo bo) { + XzdJsSjJindu update = MapstructUtils.convert(bo, XzdJsSjJindu.class); + validEntityBeforeSave(update); + //删除奖励与扣款对应数据 + deductionItemsService.remove(new LambdaQueryWrapper().eq(XzdJsDeductionItems::getMainDocId, update.getId())); + alterationInventoryService.remove(new LambdaQueryWrapper().eq(XzdAlterationInventory::getPrimaryMeterId, update.getId())); + contractInventoryService.remove(new LambdaQueryWrapper().eq(XzdContractInventory::getPrimaryMeterId, update.getId())); + //生成奖励与扣款数据 + String tableName = XzdClassEnum.XZD_JS_SJ_JINDU.getClassName(); + if (bo.getKkyjlx() != null && !bo.getKkyjlx().isEmpty()) { + //合同条款-扣款与奖励项 + for (XzdJsDeductionItems kkyjlx : bo.getKkyjlx()) { + kkyjlx.setTableName(tableName); + kkyjlx.setMainDocId(update.getId()); + } + //新增奖励与扣款数据 + deductionItemsService.saveBatch(bo.getKkyjlx()); + } + //变更增加清单 + if (bo.getBgzjqd() != null && !bo.getBgzjqd().isEmpty()) { + bo.getBgzjqd().forEach(item -> {item.setPrimaryMeterId(bo.getId());}); + alterationInventoryService.saveBatch(bo.getBgzjqd()); + } + List list = new ArrayList<>(); + //合同内清单和合同外清单 + if (bo.getHtnqd() != null && !bo.getHtnqd().isEmpty()) { + list.addAll(bo.getHtnqd()); + } + if (bo.getHtwqd() != null && !bo.getHtwqd().isEmpty()) { + list.addAll(bo.getHtwqd()); + } + if (!list.isEmpty()) { + list.forEach(item -> {item.setPrimaryMeterId(bo.getId());}); + contractInventoryService.saveBatch(list); + } + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdJsSjJindu entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计合同进度结算信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdJsSjJinduVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + deleteIds.addAll(list); + } + } + } + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + deductionItemsService.remove(new LambdaQueryWrapper().in(XzdJsDeductionItems::getMainDocId, ids)); + alterationInventoryService.remove(new LambdaQueryWrapper().eq(XzdAlterationInventory::getContractType, ZxdEnum.SHEJIHET.getTypeValue()).in(XzdAlterationInventory::getPrimaryMeterId, ids)); + contractInventoryService.remove(new LambdaQueryWrapper().eq(XzdContractInventory::getContractType, ZxdEnum.SHEJIHET.getTypeValue()).in(XzdContractInventory::getPrimaryMeterId, ids)); + return baseMapper.deleteByIds(ids) > 0; + } + + + /** + * 获取扣款与奖励项 + * @param vo + */ + private void getHttk(XzdJsSjJinduVo vo) { + //结算扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdJsDeductionItems::getMainDocId, vo.getId()); + List list = deductionItemsService.list(lambdaQueryWrapper2); + vo.setKkyjlx(list); + + //变更增加清单 + List list1 = alterationInventoryService.getBaseMapper().selectList(new LambdaQueryWrapper() + .eq(XzdAlterationInventory::getPrimaryMeterId, vo.getId()) + .eq(XzdAlterationInventory::getContractType, ZxdEnum.SHEJIHET.getTypeValue())); + vo.setBgzjqd(list1); + + //获取合同内外清单 + List list2 = contractInventoryService.getBaseMapper().selectList(new LambdaQueryWrapper() + .eq(XzdContractInventory::getPrimaryMeterId, vo.getId()) + .eq(XzdContractInventory::getContractType, ZxdEnum.SHEJIHET.getTypeValue())); + if (list2 != null && !list2.isEmpty()){ + List nList = new ArrayList<>(); + List wList = new ArrayList<>(); + for (XzdContractInventory item : list2) { + if (ZxdEnum.HETONGLEIXING.getTypeValue().equals(item.getType())) { + wList.add(item); + } else { + nList.add(item); + } + } + //合同内清单 + vo.setHtnqd(nList); + //合同外清单 + vo.setHtwqd(wList); + } + } + + + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdJsSjJindu')") + public void processPlansHandlErequipmentList(ProcessEvent processEvent) { + log.info("综合服务合同进度结算审核任务执行了{}", processEvent.toString()); + String id = processEvent.getBusinessId(); + XzdJsSjJindu xzdJsZhfwJindu = baseMapper.selectById(Long.valueOf(id)); + if (xzdJsZhfwJindu == null){ + return; + } + xzdJsZhfwJindu.setAuditStatus(processEvent.getStatus()); + baseMapper.updateById(xzdJsZhfwJindu); + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdJsSjJindu')") + public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { + log.info("综合服务合同进度结算审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdJsSjJindu')") + public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { + log.info("综合服务合同进度结算计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString()); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsSjJungonServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsSjJungonServiceImpl.java new file mode 100644 index 00000000..4123c887 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/settlement/service/impl/XzdJsSjJungonServiceImpl.java @@ -0,0 +1,311 @@ +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 lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; +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; +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.common.utils.BatchNumberGenerator; +import org.dromara.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.enums.XzdClassEnum; +import org.dromara.xzd.enums.ZxdEnum; +import org.dromara.xzd.settlement.domain.XzdJsCgJungon; +import org.dromara.xzd.settlement.domain.XzdJsCghtJstzqd; +import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; +import org.dromara.xzd.settlement.domain.vo.XzdJsCgJungonVo; +import org.dromara.xzd.settlement.service.IXzdJsCghtJstzqdService; +import org.dromara.xzd.settlement.service.IXzdJsDeductionItemsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.dromara.xzd.settlement.domain.bo.XzdJsSjJungonBo; +import org.dromara.xzd.settlement.domain.vo.XzdJsSjJungonVo; +import org.dromara.xzd.settlement.domain.XzdJsSjJungon; +import org.dromara.xzd.settlement.mapper.XzdJsSjJungonMapper; +import org.dromara.xzd.settlement.service.IXzdJsSjJungonService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 设计合同竣工结算Service业务层处理 + * + * @author Lion Li + * @date 2025-11-20 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class XzdJsSjJungonServiceImpl extends ServiceImpl implements IXzdJsSjJungonService { + + private final XzdJsSjJungonMapper baseMapper; + + @Autowired + private SysOssServiceImpl sysOssService; + + + @Autowired + private IXzdJsDeductionItemsService deductionItemsService; + @Autowired + private IXzdJsCghtJstzqdService jsCghtCgrkqdService; + + /** + * 查询设计合同竣工结算 + * + * @param id 主键 + * @return 设计合同竣工结算 + */ + @Override + public XzdJsSjJungonVo queryById(Long id){ + XzdJsSjJungonVo vo = baseMapper.selectVoById(id); + if (vo != null){ + getHttk(vo); + } + return vo; + } + + /** + * 分页查询设计合同竣工结算列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计合同竣工结算分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdJsSjJungonBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计合同竣工结算列表 + * + * @param bo 查询条件 + * @return 设计合同竣工结算列表 + */ + @Override + public List queryList(XzdJsSjJungonBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdJsSjJungonBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdJsSjJungon::getId); + lqw.eq(bo.getDeptId() != null, XzdJsSjJungon::getDeptId, bo.getDeptId()); + lqw.eq(StringUtils.isNotBlank(bo.getDocCode()), XzdJsSjJungon::getDocCode, bo.getDocCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdJsSjJungon::getTitle, bo.getTitle()); + lqw.eq(bo.getDocDate() != null, XzdJsSjJungon::getDocDate, bo.getDocDate()); + lqw.eq(bo.getContractCode() != null, XzdJsSjJungon::getContractCode, bo.getContractCode()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdJsSjJungon::getContractName, bo.getContractName()); + lqw.eq(bo.getFinalAmount() != null, XzdJsSjJungon::getFinalAmount, bo.getFinalAmount()); + lqw.eq(bo.getCurrentPeriodTotal() != null, XzdJsSjJungon::getCurrentPeriodTotal, bo.getCurrentPeriodTotal()); + lqw.eq(bo.getCurrentDeduction() != null, XzdJsSjJungon::getCurrentDeduction, bo.getCurrentDeduction()); + lqw.eq(bo.getCurrentReward() != null, XzdJsSjJungon::getCurrentReward, bo.getCurrentReward()); + lqw.eq(bo.getApproveDate() != null, XzdJsSjJungon::getApproveDate, bo.getApproveDate()); + lqw.eq(bo.getProjectId() != null, XzdJsSjJungon::getProjectId, bo.getProjectId()); + lqw.eq(StringUtils.isNotBlank(bo.getStatCycle()), XzdJsSjJungon::getStatCycle, bo.getStatCycle()); + lqw.eq(bo.getPartyA() != null, XzdJsSjJungon::getPartyA, bo.getPartyA()); + lqw.eq(bo.getPartyB() != null, XzdJsSjJungon::getPartyB, bo.getPartyB()); + lqw.eq(bo.getProcurementMode() != null, XzdJsSjJungon::getProcurementMode, bo.getProcurementMode()); + lqw.eq(bo.getOwnerUnit() != null, XzdJsSjJungon::getOwnerUnit, bo.getOwnerUnit()); + lqw.eq(bo.getSupervisionUnit() != null, XzdJsSjJungon::getSupervisionUnit, bo.getSupervisionUnit()); + lqw.eq(bo.getAuditUnit() != null, XzdJsSjJungon::getAuditUnit, bo.getAuditUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentReference()), XzdJsSjJungon::getDocumentReference, bo.getDocumentReference()); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdJsSjJungon::getAuditStatus, bo.getAuditStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdJsSjJungon::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增设计合同竣工结算 + * + * @param bo 设计合同竣工结算 + * @return 是否新增成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(XzdJsSjJungonBo bo) { + XzdJsSjJungon add = MapstructUtils.convert(bo, XzdJsSjJungon.class); + validEntityBeforeSave(add); + String banBen = BatchNumberGenerator.generateBatchNumber("JSSJJG-"); + add.setDocCode(banBen); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + + String tableName = XzdClassEnum.JS_CG_JUNGON.getClassName(); + if (bo.getKkyjlx() != null && !bo.getKkyjlx().isEmpty()) { + //合同条款-扣款与奖励项 + for (XzdJsDeductionItems kkyjlx : bo.getKkyjlx()) { + kkyjlx.setTableName(tableName); + kkyjlx.setMainDocId(add.getId()); + } + deductionItemsService.saveBatch(bo.getKkyjlx()); + } + //决算清单 + if (bo.getJsqd() != null && !bo.getJsqd().isEmpty()) { + bo.getJsqd().forEach(item -> {item.setMainDocId(add.getId());}); + jsCghtCgrkqdService.saveBatch(bo.getJsqd()); + } + return flag; + } + + /** + * 修改设计合同竣工结算 + * + * @param bo 设计合同竣工结算 + * @return 是否修改成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateByBo(XzdJsSjJungonBo bo) { + XzdJsSjJungon update = MapstructUtils.convert(bo, XzdJsSjJungon.class); + validEntityBeforeSave(update); + //删除奖励与扣款对应数据 + deductionItemsService.remove(new LambdaQueryWrapper().eq(XzdJsDeductionItems::getMainDocId, update.getId())); + jsCghtCgrkqdService.remove(new LambdaQueryWrapper() + .eq(XzdJsCghtJstzqd::getType, ZxdEnum.SFWJSD_S.getTypeValue()) + .eq(XzdJsCghtJstzqd::getMainDocId, update.getId())); + //生成奖励与扣款数据 + String tableName = XzdClassEnum.JS_CG_JUNGON.getClassName(); + if (bo.getKkyjlx() != null && !bo.getKkyjlx().isEmpty()) { + //合同条款-扣款与奖励项 + for (XzdJsDeductionItems kkyjlx : bo.getKkyjlx()) { + kkyjlx.setTableName(tableName); + kkyjlx.setMainDocId(update.getId()); + } + //新增奖励与扣款数据 + deductionItemsService.saveBatch(bo.getKkyjlx()); + } + //决算清单 + if (bo.getJsqd() != null && !bo.getJsqd().isEmpty()) { + bo.getJsqd().forEach(item -> {item.setMainDocId(bo.getId());}); + jsCghtCgrkqdService.saveBatch(bo.getJsqd()); + } + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdJsSjJungon entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计合同竣工结算信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + List deleteIds = new ArrayList<>(); + for (Long id : ids) { + XzdJsSjJungonVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List list = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + deleteIds.addAll(list); + } + } + } + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + deductionItemsService.remove(new LambdaQueryWrapper().in(XzdJsDeductionItems::getMainDocId, ids)); + jsCghtCgrkqdService.remove(new LambdaQueryWrapper().eq(XzdJsCghtJstzqd::getType, ZxdEnum.SFWJSD_S.getTypeValue()) + .in(XzdJsCghtJstzqd::getMainDocId, ids)); + return baseMapper.deleteByIds(ids) > 0; + } + + /** + * 获取扣款与奖励项 + * @param vo + */ + private void getHttk(XzdJsSjJungonVo vo) { + //结算扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdJsDeductionItems::getMainDocId, vo.getId()); + List list = deductionItemsService.list(lambdaQueryWrapper2); + if (list != null && !list.isEmpty()) { + vo.setKkyjlx(list); + } + //决算清单 + List list1 = jsCghtCgrkqdService.getBaseMapper().selectList(new LambdaQueryWrapper() + .eq(XzdJsCghtJstzqd::getMainDocId, vo.getId()) + .eq(XzdJsCghtJstzqd::getType, ZxdEnum.SFWJSD_S.getTypeValue())); + if (list1 != null && !list1.isEmpty()) { + vo.setJsqd(list1); + } + } + + + + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdJsSjJungon')") + public void processPlansHandlErequipmentList(ProcessEvent processEvent) { + log.info("采购合同竣工结算审核任务执行了{}", processEvent.toString()); + String id = processEvent.getBusinessId(); + XzdJsSjJungon xzdJsCgJungon = baseMapper.selectById(Long.valueOf(id)); + if (xzdJsCgJungon == null){ + return; + } + xzdJsCgJungon.setAuditStatus(processEvent.getStatus()); + baseMapper.updateById(xzdJsCgJungon); + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdJsSjJungon')") + public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { + log.info("采购合同竣工结算审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdJsSjJungon')") + public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { + log.info("采购合同竣工结算计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString()); + } +} 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 58fcb170..a3adb503 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 @@ -88,7 +88,9 @@ public class XzdJsZhfwJinduServiceImpl extends ServiceImpl + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/paymentsReceipts/XzdSfkShejiSkMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/paymentsReceipts/XzdSfkShejiSkMapper.xml new file mode 100644 index 00000000..d7856a0b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/paymentsReceipts/XzdSfkShejiSkMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJinduMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJinduMapper.xml new file mode 100644 index 00000000..e9e0d172 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJinduMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJungonMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJungonMapper.xml new file mode 100644 index 00000000..480faf78 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/settlement/XzdJsSjJungonMapper.xml @@ -0,0 +1,7 @@ + + + + +